From 70897b9f8935d377c9e890b4b04966c1d2cd5d82 Mon Sep 17 00:00:00 2001
From: “dzb” <2632970487@qq.com>
Date: 星期六, 08 十月 2022 14:34:14 +0800
Subject: [PATCH] 对接案件池违建部分接口

---
 src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/ill/index.vue |  152 +++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 136 insertions(+), 16 deletions(-)

diff --git a/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/ill/index.vue b/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/ill/index.vue
index b74dfdb..58b14d6 100644
--- a/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/ill/index.vue
+++ b/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/ill/index.vue
@@ -1,11 +1,14 @@
 <template>
     <div class="ill">
         <!-- 鍒拌揪鐜板満鎯呭喌 -->
-        <MyArrive></MyArrive>
+        <MyArrive ref="arrive"></MyArrive>
         <!-- 璋冩煡鍙栬瘉 -->
-        <MyEvidence></MyEvidence>
+        <MyEvidence ref="evidence"></MyEvidence>
         <!-- 鏂囩涔︾被 -->
-        <MyBook></MyBook>
+        <MyBook ref="book"></MyBook>
+        <!-- <div class="result">
+            <el-input v-model="result" placeholder="璇疯緭鍏ュ鐞嗘剰瑙�"></el-input>
+        </div> -->
         <!-- 搴曢儴鎸夐挳 -->
         <div class="footer">
             <el-button @click="handleSubmit" type="primary">纭畾</el-button>
@@ -18,31 +21,148 @@
 import MyEvidence from "../components/evidence"
 import MyBook from "../components/book"
 export default {
-    components:{
-        MyArrive,MyEvidence,MyBook
+    components: {
+        MyArrive, MyEvidence, MyBook
     },
     data() {
         return {
-
+            // result:'',
         }
     },
-    props:['caseId'],
-    created(){
+    props: ['caseId'],
+    created() {
         console.log(this.caseId);
+        this.getUserId();
     },
-    methods:{
-        handleSubmit(){
+    methods: {
+        handleSubmit() {
+            const { arrive, evidence, book } = this.$refs;
+            const { arriveForm } = arrive.$refs;
+            const { evidenceForm } = evidence.$refs;
+            const { bookForm } = book.$refs;
+            arriveForm.validate((valid) => {
+                if (valid) {
+                    console.log(valid);
+                    evidenceForm.validate((flag) => {
+                        if (flag) {
+                            console.log(flag);
+                            bookForm.validate((bookFlag) => {
+                                console.log(bookFlag);
+                                if (bookFlag) {
+                                    this.$axios({
+                                        method: 'post',
+                                        url: `sccg/dispatch_handle/addition_dispose_result?caseId=${this.caseId}&type=2`,
+                                        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,
+                                            //
+                                            writType: book.book.writType,
+                                            writCode: book.book.writCode,
+                                            // illegalType: book.book.illegalType,
+                                            sendTime: book.book.sendTime,
+                                            limitTime: book.book.limitTime,
+                                            sendContent: book.book.sendContent,
+                                            rectifySituation:book.book.rectifySituation,
+                                            rectifyTime: book.book.rectifyTime,
+                                            remark: book.book.remark,
+                                            writPic: `${book.book.writPic}`,
+                                            originalPic: `${book.book.originalPic}`,
+                                            rectifiedPic: `${book.book.rectifiedPic}`,
+                                            otherPic: `${book.book.otherPic}`,
+                                        }
+                                    })
+                                        .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 {
+                            return false;
+                        }
+                    })
+                } else {
+                    evidenceForm.validate((flag) => {
+                        if (!flag) {
+                            console.log(bookForm);
+                            bookForm.validate((bookFlag) => {
+                                console.log(bookFlag);
+                                if (!bookFlag) {
+                                    return false;
+                                }
+                            })
+                            return false;
+                        } else {
+                            bookForm.validate((bookFlag) => {
+                                if (!bookFlag) {
+                                    return false
+                                }
+                            })
+                        }
+                    })
+                    return false;
+                }
+            })
+        },
+        // 鑾峰彇鐢ㄦ埛id
+        getUserId(){
+            const myname = sessionStorage.getItem('name');
+            this.$axios({
+                method:'get',
+                url:'sccg/admin/info?name='+myname,
+            })
+            .then(res=>{
+                console.log(res);
+            })
         }
     }
 }
 </script>
 <style lang="scss" scoped>
-    .ill{
-        padding: 20px 200px;
-    }
+.ill {
+    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