|
- <template>
- <div class="app-container">
- <div class="header_main">
- 分配案件
- <div class="return_btn" @click="onClickLeft"></div>
- </div>
- <div style="height: 58px;"></div>
- <div class="main_box">
- <van-cell>
- <template #title>
- <van-icon name="../../../static/images/lawEnforcement/icon/icon_zxfa.png" size="20"></van-icon>
- <span class="custom-title">登记<i class="bgBlue"></i></span>
- </template>
- </van-cell>
- <van-cell title="案件来源" :border="false" v-model="form.caseSource" />
- <van-cell title="关联方案" :border="false" v-model="form.scheme" />
- <van-cell title="案件属地" :border="false" v-model="form.deptId" />
- <van-cell title="执行主体" :border="false" v-model="form.belongTeam" />
- <van-cell title="案件名称" :border="false" v-model="form.caseName" />
- <van-cell title="登记日期" :border="false" v-model="form.registerDate" />
- <van-cell title="执法类别" :border="false" v-model="form.enforceCategory" />
- <van-cell title="案件简述" :border="false" v-model="form.caseDescribe" />
- </div>
-
- <div class="main_box" style="margin-top: 10px;">
- <van-collapse v-model="activeNames">
- <van-collapse-item name="1">
- <template #title>
- <van-icon name="../../../static/images/lawEnforcement/icon/icon_dsr.png" size="20"></van-icon>
- <span class="custom-title">当事人<i class="bgBlue"></i></span>
- </template>
- <van-cell title="当事人类型" :border="false" v-model="form.type" />
- <template v-if="form.type=='个人/个体工商户'">
- <van-cell title="当事人姓名" :border="false" v-model="form.name" />
- <van-cell title="性别" :border="false" v-model="form.sex" />
- <van-cell title="身份证号" :border="false" v-model="form.cardNum" />
- <van-cell title="出生日期" :border="false" v-model="form.birthday" />
- <van-cell title="民族" :border="false" v-model="form.nation" />
- <van-cell title="工作单位及职务" :border="false" v-model="form.companyPosition" />
- <van-cell title="字号名称" :border="false" v-model="form.zihao" />
- </template>
- <template v-if="form.type=='企业'">
- <van-cell title="企业名称" :border="false" v-model="form.companyName" />
- <van-cell title="法人/负责人" :border="false" v-model="form.legalName" />
- </template>
- <van-cell title="联系电话" :border="false" v-model="form.phone" />
- <van-cell title="联系地址" :border="false" v-model="form.address" />
- <van-cell title="统一社会信用代码" :border="false" v-model="form.uniformCode" />
- </van-collapse-item>
- </van-collapse>
- </div>
-
- <div class="main_box" style="margin-top: 10px;">
- <van-collapse v-model="activeNames1">
- <van-collapse-item name="1">
- <template #title>
- <van-icon name="../../../static/images/lawEnforcement/icon/icon_ajwd.png" size="20"></van-icon>
- <span class="custom-title">附件<i class="bgBlue"></i></span>
- </template>
- <div class="cf">
- <van-uploader v-model="form.attachementList" :show-upload="false" :deletable="false" />
- <van-empty v-if="form.attachement == null " description="暂无文件" />
- </div>
- </van-collapse-item>
- </van-collapse>
- </div>
-
- <div class="main_box" style="margin-top: 10px;">
- <van-collapse v-model="activeNames2">
- <van-collapse-item name="1">
- <template #title>
- <van-icon name="../../../static/images/lawEnforcement/icon/icon_zxry.png" size="20"></van-icon>
- <span class="custom-title">执法人员<i class="bgBlue"></i></span>
- </template>
- <div class="peopleList">
- <van-row class="peoplett">
- <van-col :span="4">序号</van-col>
- <van-col :span="6">执行人员</van-col>
- <van-col :span="10">执法证号</van-col>
- <van-col :span="4">带队人</van-col>
- </van-row>
- <van-row v-for="(item,index) in tEnforceCaseHandlerList" :key="index" >
- <van-col :span="4">{{index+1}}</van-col>
- <van-col :span="6">{{item.enforcerName}}</van-col>
- <van-col :span="10">{{item.enforcerNum}}</van-col>
- <van-col :span="4">
- <div class="icon_box">
- <van-checkbox v-model="item.enforcerLeader" shape="square" @change="checkBoxChange(item.enforcerLeader,index)"></van-checkbox>
- <van-icon name="../../../static/images/lawEnforcement/icon/icon_delete.png" size="20" @click="removePeople(index)"></van-icon>
- </div>
- </van-col>
- </van-row>
- <img src="../../../../static/images/lawEnforcement/new/addPeop_btn.png" style="margin: 0 auto;" @click="$router.push({name:'lawEnforcementCaseLawEnforcer'})">
- </div>
- </van-collapse-item>
- </van-collapse>
- </div>
-
- <p class="submitButton" @click="submitForm()">保存</p>
-
- </div>
- </template>
-
- <script>
- import { getCase , getDeptName , getSurveyByCaseId , updateSurvey , addSurvey , schemeList } from "@/api/lawEnforcement/index";
- import Cookies from "js-cookie";
- export default {
- name: "programmeDetail",
- data() {
- return {
- showBankType:false,
- showPayeeType:false,
- showPicker:false,
- form:{},
-
- bankType:'',
- payeeType:'',
- value:'',
-
- bankTypeOptions:[],
- payeeTypeOptions:[],
- tEnforceSchemeHandlerList:[],
- minDate: new Date(2020, 0, 1),
- maxDate: new Date(2025, 10, 1),
- currentDate: new Date(2021, 0, 17),
-
- activeNames: ['1'],
- activeNames1: ['1'],
- activeNames2: ['1'],
-
- caseSourceOptions:[],
- belongTeamOptions:[],
-
- // 查询参数
- queryParams: {
- // 分页
- pageNum: 1,
- pageSize: 10,
- // 查询排序
- orderByColumn: "id",
- isAsc: "desc",
- name: null, // 搜索参数-执行人姓名或证件号
- belongTeam: null, // 搜索参数-所在中队
- },
- tEnforceCaseHandlerList:[],
- radio:'',
- submitType:'',
- surveyId:'',
- sexOptions:[],
- nationOptions:[],
- };
- },
- created() {
- this.getDicts("case_source").then(response => {
- this.caseSourceOptions = response.data;
- });
- this.getDicts("team_category").then(response => {
- this.belongTeamOptions = response.data;
- });
- this.getDicts("enforce_body_type").then(response => {
- this.typeOptions = response.data;
- });
- this.getDicts("sex").then(response => {
- this.sexOptions = response.data;
- });
- this.getDicts("nationality").then(response => {
- this.nationOptions = response.data;
- });
- this.getDetail();
- },
- beforeRouteEnter (to, from, next) {
- /*
- to:获取你要跳转的路由信息
- from: 获取你从哪个路由来的信息
- next: (放行函数)
- // 第一种写法
- next(); // 直接放行
- // 第二种
- next('/url') //放行到指定的路由
- */
- next(vm => {
- if (from.path === '/lawEnforcement/caseAllocation'){
- location.reload()
- }
- })
- },
- methods: {
- getDetail(){
- getCase(this.$route.query.id).then((response) => {
- response.data.caseSource = response.data.caseSource == '' ? '' : this.selectDictLabel(this.caseSourceOptions, response.data.caseSource);
- response.data.belongTeam = response.data.belongTeam == '' ? '' : this.selectDictLabel(this.belongTeamOptions, response.data.belongTeam);
- response.data.type = response.data.type == '' ? '' : this.selectDictLabel(this.typeOptions, response.data.type);
- response.data.sex = response.data.sex == '' ? '' : this.selectDictLabel(this.sexOptions, response.data.sex);
-
- response.data.nation = response.data.nation == '' ? '' : this.selectDictLabel(this.nationOptions, response.data.nation);
- console.log(this.selectDictLabel(this.nationOptions, response.data.nation))
-
- if(response.data.schemeId){
- var schemeQueryParam = {
- applyStatus: "1"
- };
- schemeList(schemeQueryParam).then((responseScheme) => {
- response.data.scheme = responseScheme.rows.filter(function (e) { return e.id == response.data.schemeId; })[0].schemeName;
- });
- }
-
- getDeptName(response.data.deptId).then(res => {
- response.data.deptId = res.data.deptName
- });
- if (response.data.attachement){
- response.data.attachementList = [];
- var attachement = response.data.attachement.split( "," );
- attachement.forEach(responseAttach=>{
- response.data.attachementList.push({
- url:'/api' + responseAttach,
- isImage: true
- });
- })
- // process.env.VUE_APP_BASE_ROUTING_URL + process.env.VUE_APP_BASE_API
- }
- var that = this ;
- setTimeout(function () {
- that.form = response.data;
- },2000)
-
- });
- getSurveyByCaseId(this.$route.query.id).then((response) => {
- if(response.data != undefined){
- this.tEnforceCaseHandlerList = response.data.tEnforceCaseHandlerList;
- this.surveyId = response.data.id;
- this.submitType = 'update';
- }else{
- this.submitType = 'add';
- }
- });
- },
- removePeople(index){
- this.tEnforceCaseHandlerList.splice(index,1)
- },
- submitForm(){
- let surveyForm = {};
- surveyForm.tEnforceCaseHandlerList = this.tEnforceCaseHandlerList;
- surveyForm.caseId = this.$route.query.id;
- surveyForm.id = this.surveyId;
- if(this.submitType == 'update'){
- updateSurvey(surveyForm).then(response => {
- this.$notify({ type: 'success', message: '保存成功' });
- setTimeout(function(){
- history.back(-1);
- },2000)
- });
- }else if (this.submitType == 'add'){
- addSurvey(surveyForm).then(response => {
- this.$notify({ type: 'success', message: '保存成功' });
- setTimeout(function(){
- history.back(-1);
- },2000)
- });
- }
- },
- checkBoxChange(val,index){
- console.log(val)
- console.log(index)
- this.tEnforceCaseHandlerList[index].enforcerLeader = val ? 'Y' : ''
- },
- afterReadEvidenceForm(file){
- let params1 = new FormData();
- params1.append("file", file.file);
- commonUpload(params1).then((r1) => {
- // this.tEnforceSamplingGoodsList[index].attachement.push(r1.fileName);
- this.form.attachement.push(r1.fileName)
- })
- },
- deleteFileEvidenceForm(file,detail) {
- this.form.attachement.splice(detail.index,1);
- this.form.attachementList.splice(detail.index,1);
- },
- },
- watch: {
- $route (to, from ) {
- // 监听路由变化, 实现类似 小程序的 onShow 事件
- if (to.path === '/lawEnforcement/caseDistribution') {
- console.log('aaaa')
- // do anything you want
- if (Cookies.get('enforcer')){
- getSurveyByCaseId(this.$route.query.id).then((response) => {
- if(response.data != undefined){
- this.tEnforceCaseHandlerList = response.data.tEnforceCaseHandlerList;
- JSON.parse(Cookies.get('enforcer')).map((res,index)=>{
- let array1 = response.data.tEnforceCaseHandlerList.filter(function (e) { return e.enforcerName == res.enforcerName; });
- if ( array1.length < 1 ){
- this.tEnforceCaseHandlerList.push(res)
- }
- })
- }else {
- JSON.parse(Cookies.get('enforcer')).map((res,index)=>{
- let array1 = this.tEnforceCaseHandlerList.filter(function (e) { return e.enforcerName == res.enforcerName; });
- if ( array1.length < 1 ){
- this.tEnforceCaseHandlerList.push(res)
- }
- })
- }
- });
- }
- }
- }
- },
- }
- </script>
-
- <style scoped lang="scss">
- .app-container {
- padding: 2% 0;
- }
- /deep/ .van-collapse-item__content{
- padding: 0;
- }
- /deep/ .van-checkbox{
- justify-content: center;
- }
- .icon_box{
- display: flex;
- justify-content: space-around;
- }
- .cf{
- padding: 0 3%;
- margin-top: 20PX;
- margin-bottom: 20PX;
- .van-row{
- background: #F0F3F5;
- .van-col{
- padding: 5PX 0;
- font-size: 12PX!important;
- text-align: center;
- p{
- color: #1D6FE9;
- }
- }
- &:first-child{
- background: transparent;
- }
- }
- }
- .header_main{
- height: 116px;
- background: url('../../../../static/images/lawEnforcement/new/list_head.png') no-repeat;
- background-size: 100% 100%;
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- font-size: 36px;
- line-height: 116px;
- text-align: center;
- color: #fff;
- z-index: 999;
- .return_btn{
- width: 24px;
- height: 43.2px;
- background: url('../../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
- background-size: 20px 36px;
- position: absolute;
- left: 38px;
- top: 36px;
- }
- .add_btn{
- width: 56.4px;
- height: 40.8px;
- background: url('../../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
- background-size: 47px 34px;
- position: absolute;
- right: 38px;
- top: 36px;
- }
- }
- /deep/ .van-radio--horizontal{
- margin-left: 0.32rem;
- margin-right: 0;
- }
- .peopleList{
- padding: 3%;
- text-align: center;
- .van-row{
- margin-bottom: 10PX;
- background: rgba(196,218,249,0.3);
- border-radius: 5PX;
- .van-col{
- text-align: center;
- font-size: 14PX;
- color: #333333;
- padding: 5PX 0;
- }
- }
- .peoplett{
- background: none;
- .van-col{
- padding: 0;
- color: #1D6FE9;
- }
- }
- }
- .main_title{
- font-size: 0.4rem;
- color: #1D6FE9;
- margin: 0.2rem 6%;
- margin-top: 0;
- position: relative;
- }
- .main_box{
- width: 96%;
- margin: 0 auto;
- border-radius: 10PX;
- box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
- overflow: hidden;
- background-color: #FFF;
- .van-icon{
- vertical-align: middle;
- }
- .custom-title{
- font-size: 17PX;
- color: #333333;
- vertical-align: middle;
- line-height: 1;
- position: relative;
- }
- .tap{
- color: #1D6FE9;
- }
- .bgBlue{
- display: block;
- position: absolute;
- width: 17PX;
- height: 17PX;
- border-radius: 50%;
- background-color: rgba(29,111,233,0.26);
- top: -2PX;
- right: -8PX;
- }
- }
- .submitButton{
- width: 45%;
- margin: 0 auto;
- background-image: linear-gradient(to right, #2E79E9 , #77A6EF);
- text-align: center;
- color: #ffffff;
- height: 70px;
- line-height: 70px;
- border-radius: 8PX;
- margin-top: 25PX;
- }
-
- .addFamily{
- position: absolute;
- top: -2px;
- right: 0;
- border-radius: 50%;
- }
- </style>
|