From 797cc9c1a5c90f413d46c5cb88e1ee5e3a84b071 Mon Sep 17 00:00:00 2001 From: “dzb” <2632970487@qq.com> Date: 星期二, 04 十月 2022 11:51:05 +0800 Subject: [PATCH] 修改用户只能分配单一角色 --- src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/vio/index.vue | 112 +++++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 86 insertions(+), 26 deletions(-) diff --git a/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/vio/index.vue b/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/vio/index.vue index 2548905..350eb59 100644 --- a/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/vio/index.vue +++ b/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/vio/index.vue @@ -1,9 +1,9 @@ <template> <div class="vio"> <!-- 鍒拌揪鐜板満鎯呭喌 --> - <MyArrive ref="arrive"></MyArrive> + <MyArrive ref="arrive" @getArrive="getArrive"></MyArrive> <!-- 璋冩煡鍙栬瘉 --> - <MyEvidence ref="evidence"></MyEvidence> + <MyEvidence ref="evidence" @getEvidence="getEvidence"></MyEvidence> <!-- 搴曢儴鎸夐挳 --> <div class="footer"> <el-button @click="handleSubmit" type="primary">纭畾</el-button> @@ -15,49 +15,109 @@ import MyArrive from '../components/arrive' import MyEvidence from "../components/evidence" export default { - components:{ - MyArrive,MyEvidence + components: { + MyArrive, MyEvidence }, data() { return { } }, - methods:{ - handleSubmit(){ - const {arrive,evidence} = this.$refs; - const {arriveForm} = arrive.$refs; - const {evidenceForm} = evidence.$refs; - console.log(evidenceForm); - arriveForm.validate((valid)=>{ - console.log(valid); - if(valid){ - evidenceForm.validate((flag)=>{ - if(flag){ - console.log(flag); - }else{ + props: ['caseId', 'closeDialog'], + created() { + console.log(this.caseId); + }, + methods: { + handleSubmit() { + const { arrive, evidence } = this.$refs; + const { arriveForm } = arrive.$refs; + const { evidenceForm } = evidence.$refs; + // console.log(evidence.$refs); + arriveForm.validate((valid) => { + // console.log(valid); + if (valid) { + evidenceForm.validate((flag) => { + if (flag) { + // arrive.arrive;evidence.user;evidence.evidence; + this.$axios({ + method: 'post', + url: `sccg/dispatch_handle/addition_dispose_result/${this.caseId}/${1}`, + data:{ + arrivalAddress: arrive.arrive.arrivalAddress, + arrivalTime: arrive.arrive.arrivalTime, + situationExplain: arrive.arrive.situationExplain, + replyExplain: arrive.arrive.replyExplain, + situationPic: `${arrive.arrive.situationPic}`, + // + undertaker: evidence.evidence.undertaker, + assistant: evidence.evidence.assistant, + investigationTime: evidence.evidence.investigationTime, + address: evidence.evidence.address, + caseAction: evidence.evidence.caseAction, + description: evidence.evidence.description, + pic: `${evidence.evidence.pic}`, + // + illegalType: evidence.user.illegalType, + name: evidence.user.name, + phoneCode: evidence.user.phoneCode, + certificateType: `${evidence.user.certificateType}`, + certificateCode: evidence.user.certificateCode, + educationDegree: `${evidence.user.educationDegree}`, + career: evidence.user.career, + work: evidence.user.work, + nation: evidence.user.nation, + nativePlace: evidence.user.nativePlace, + liveAddress: evidence.user.liveAddress, + registerAddress: evidence.user.registerAddress, + } + }) + .then(res => { + console.log(res); + if (res.code === 200) { + this.$message({ + type: 'success', + message:'涓婁紶鎴愬姛', + }) + this.$emit('closeDialog', { flag: false }); + }else{ + this.$message({ + type:'warning', + message:res.message + }) + } + }) + } else { return false; } }) - }else{ - evidenceForm.validate((flag)=>{ - if(!flag){ + } else { + evidenceForm.validate((flag) => { + if (!flag) { return false; } }) return false; } }) + }, + // 鑾峰緱arrive鐨勪俊鎭� + getArrive(obj) { + console.log(obj); + }, + // 鑾峰緱evidence瀵硅薄 + getEvidence(obj) { + console.log(obj); } } } </script> <style lang="scss" scoped> - .vio{ - padding: 20px 200px; - } +.vio { + padding: 20px 200px; +} + .footer { - display: flex; - justify-content: flex-end; - } + display: flex; + justify-content: flex-end; +} </style> \ No newline at end of file -- Gitblit v1.8.0