From 70e2bdb8631bfb7ec6c24ced81a236ff3197c937 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期四, 14 三月 2024 15:30:09 +0800
Subject: [PATCH] 11

---
 src/views/project/medicalevaluation/index.vue |  236 +++++++++++++++++++++++++++++++---------------------------
 1 files changed, 126 insertions(+), 110 deletions(-)

diff --git a/src/views/project/medicalevaluation/index.vue b/src/views/project/medicalevaluation/index.vue
index a3a9d24..3312ba8 100644
--- a/src/views/project/medicalevaluation/index.vue
+++ b/src/views/project/medicalevaluation/index.vue
@@ -9,7 +9,6 @@
       label-width="70px"
     >
       <el-row :gutter="8">
-        
         <el-col :span="6">
           <el-form-item label="濮撳悕" prop="name">
             <el-input
@@ -35,7 +34,7 @@
           </el-form-item>
         </el-col>
 
-         <el-col :span="6">
+        <el-col :span="6">
           <el-form-item label="鎹愮尞鍦板競">
             <el-select v-model="queryParams.city" placeholder="璇烽�夋嫨鍦板競">
               <el-option
@@ -48,17 +47,17 @@
             </el-select>
           </el-form-item>
         </el-col>
-        
+
         <el-col :span="6">
           <el-form-item label="鎹愮尞杩涘害" prop="recordstate">
             <el-select
-              v-model="queryParams.recordstate"
+              v-model="queryParams.workflow"
               placeholder="璇烽�夋嫨鎹愮尞杩涘害"
               clearable
               size="small"
             >
               <el-option
-                v-for="dict in dict.type.sys_DonationStatus"
+                v-for="dict in dict.type.sys_donornode"
                 :key="dict.value"
                 :label="dict.label"
                 :value="dict.value"
@@ -70,7 +69,10 @@
       <el-row :gutter="8">
         <el-col :span="6">
           <el-form-item label="鎶ュ憡浜�">
-            <el-select v-model="queryParams.reporterno" placeholder="璇烽�夋嫨鎶ュ憡浜�">
+            <el-select
+              v-model="queryParams.reporterno"
+              placeholder="璇烽�夋嫨鎶ュ憡浜�"
+            >
               <el-option
                 v-for="item in reportlist"
                 :key="item.index"
@@ -198,13 +200,16 @@
         width="120"
       >
         <template slot-scope="scope">
-          <dict-tag
-            :options="dict.type.sys_DonationStatus"
-            :value="scope.row.recordstate"
-          />
+          <div v-if="!scope.row.terminationCase">
+            <dict-tag
+            :options="dict.type.sys_donornode"
+              :value="scope.row.workflow"
+            />
+          </div>
+          <div v-else>浠诲姟涓</div>
         </template>
       </el-table-column>
-      
+
       <el-table-column
         label="鎿嶄綔"
         align="center"
@@ -571,7 +576,7 @@
   listDonatebaseinfo,
   getDonatebaseinfo,
   addDonatebaseinfo,
-  updateDonatebaseinfo,
+  updateDonatebaseinfo
   // exportProvincemessage,
 } from "@/api/project/donatebaseinfo";
 
@@ -584,7 +589,7 @@
   delMedicalevaluation,
   addMedicalevaluation,
   updateMedicalevaluation,
-  exportMedicalevaluation,
+  exportMedicalevaluation
 } from "@/api/project/medicalevaluation";
 
 import { listRelativesconfirmation } from "@/api/project/relativesconfirmation";
@@ -599,7 +604,7 @@
   components: {
     Li_area_select,
     OrgSelecter,
-    AnnexUpload,
+    AnnexUpload
   },
   name: "Medicalevaluation",
   dicts: [
@@ -627,6 +632,7 @@
     "sys_CoreAssessConclusion",
     "sys_BaseAssessConclusion",
     "sys_OrganDecision",
+    'sys_donornode'
   ],
   data() {
     //杩欓噷瀛樻斁鏁版嵁
@@ -645,7 +651,7 @@
         sheng: "",
         shi: "",
         qu: "",
-        organizationname: null,
+        organizationname: null
       },
       provinceData: [
         { label: "鍏ㄩ儴", value: "" },
@@ -659,22 +665,22 @@
         { label: "琛㈠窞甯�", value: "8" },
         { label: "鑸熷北甯�", value: "9" },
         { label: "鍙板窞甯�", value: "A" },
-        { label: "涓芥按甯�", value: "B" },
+        { label: "涓芥按甯�", value: "B" }
       ],
       residenceAddresss: {
         sheng: "娴欐睙鐪�",
         shi: "",
-        qu: "",
+        qu: ""
       },
       registerAddresss: {
         sheng: "娴欐睙鐪�",
         shi: "",
-        qu: "",
+        qu: ""
       },
       defultAddresss: {
         sheng: "娴欐睙鐪�",
         shi: "",
-        qu: "",
+        qu: ""
       },
       // 閬僵灞�
       loading: true,
@@ -716,7 +722,7 @@
         donorno: null,
         reportername: null,
         reporttime: null,
-        city: null,
+        city: null
       },
       // 琛ㄥ崟鍙傛暟
       form: {},
@@ -734,7 +740,7 @@
       //纭鐧昏琛╰itle
       confirmationTitle: "",
       //鐢ㄦ埛琛�
-      users: [],
+      users: []
     };
   },
   //鐩戝惉灞炴�� 绫讳技浜巇ata姒傚康
@@ -753,7 +759,7 @@
         this.$moment(this.$route.params.starttime).format("YYYY-MM-DD"),
         this.$moment(this.$route.params.endtime)
           .add(-1, "month")
-          .format("YYYY-MM-DD"),
+          .format("YYYY-MM-DD")
       ];
     }
     if (this.$route.params.reporterno != "") {
@@ -790,7 +796,7 @@
   methods: {
     //鑾峰彇鐢ㄦ埛鍒楄〃
     getuserlist() {
-      listUser().then((res) => {
+      listUser().then(res => {
         this.users = res.data;
       });
     },
@@ -849,13 +855,13 @@
       }
     },
     LoadReportList() {
-      listDonatebaseinfo().then((res) => {
+      listDonatebaseinfo().then(res => {
         let list = res.rows;
         let reportlist = [];
-        list.forEach((element) => {
+        list.forEach(element => {
           reportlist.push({
             reporterno: element.reporterno,
-            reportername: element.reportername,
+            reportername: element.reportername
           });
         });
 
@@ -867,7 +873,7 @@
     },
     resetArr(Arr) {
       var hash = {};
-      Arr = Arr.reduce(function (arr, current) {
+      Arr = Arr.reduce(function(arr, current) {
         hash[current.reporterno]
           ? ""
           : (hash[current.reporterno] = true && arr.push(current));
@@ -904,7 +910,7 @@
       }
       this.queryParams.reportervalue = this.reportervalue;
       this.$nextTick(() => {
-        listnewMedicalevaluation(this.queryParams).then((response) => {
+        listnewMedicalevaluation(this.queryParams).then(response => {
           this.VMedicalevaluation = response.rows;
           console.log("1111111");
           this.total = response.total;
@@ -940,7 +946,7 @@
         coreteamassesstime: null,
         treatmenthospitalname: null,
         coreteamassessconclusion: null,
-        assessannex: null,
+        assessannex: null
       };
       this.resetForm("form");
     },
@@ -973,7 +979,7 @@
         acquisitiontissueno: null,
         reportername: null,
         reporttime: null,
-        city: null,
+        city: null
       };
       this.selecttime = [];
       this.getTimeList();
@@ -981,7 +987,7 @@
         sheng: "",
         shi: "",
         qu: "",
-        organizationname: null,
+        organizationname: null
       };
 
       this.resetForm("queryForm");
@@ -1006,85 +1012,96 @@
       }
       this.setState({
         birthday,
-        sex,
+        sex
       });
     },
 
     /** 鏂板鎸夐挳鎿嶄綔 */
     handleAdd(data) {
       console.log("datadata", data);
+
+      this.$router.push({
+        path: "/organ/donationdetails/",
+        query: {
+          id: data.id,
+          organType: "edit"
+        }
+      });
       // if(data.recordstate != 2 && data.recordstate != 4  && data.recordstate != 5 && data.recordstate != 13){
       //   this.$modal.msgError("褰撳墠鎹愮尞妗堜緥涓嶈兘杩涜鍖诲鎹愮尞璇勪及");
       //   return
       // }
 
-      this.flowname = "鎹愮尞鍖诲璇勪及";
-      this.annexno = "";
-      this.reset();
-      //this.curCase = data;
-      this.curCase = {
-        id: data.id,
-        recordstate: null,
-        donorno: data.donorno,
-      };
-      //鑾峰彇鍖诲鎹愮尞璇勪及璁板綍
-      this.loading = true;
-      if (data.meid) {
-        let searchParam = {
-          id: data.meid,
-        };
-        //listDonatebaseinfo(searchParam).then((response) => {
-        listMedicalevaluation(searchParam).then((response) => {
-          if (response.code == 200 && response.rows.length == 1) {
-            this.title = "淇敼鎹愮尞鍖诲璇勪及";
-            this.form = response.rows[0];
-            this.form.infoid = data.id;
-            this.open = true;
-            this.$nextTick(function () {
-              this.$refs.evaluationannex.getAnnexList();
-            });
-          } else {
-            this.$modal.msgError(
-              "鑾峰彇鍖诲璇勪及璁板綍澶辫触锛�" + JSON.stringify(response)
-            );
-          }
-        });
-      } else {
-        this.title = "鏂板鎹愮尞鍖诲璇勪及";
-        this.form.infoid = data.id;
-        this.form.donorno = data.donorno;
+      // this.flowname = "鎹愮尞鍖诲璇勪及";
+      // this.annexno = "";
+      // this.reset();
+      // //this.curCase = data;
+      // this.curCase = {
+      //   id: data.id,
+      //   recordstate: null,
+      //   donorno: data.donorno
+      // };
+      // //鑾峰彇鍖诲鎹愮尞璇勪及璁板綍
+      // this.loading = true;
+      // if (data.meid) {
+      //   let searchParam = {
+      //     id: data.meid
+      //   };
+      //   //listDonatebaseinfo(searchParam).then((response) => {
+      //   listMedicalevaluation(searchParam).then(response => {
+      //     if (response.code == 200 && response.rows.length == 1) {
+      //       this.title = "淇敼鎹愮尞鍖诲璇勪及";
+      //       this.form = response.rows[0];
+      //       this.form.infoid = data.id;
+      //       this.open = true;
+      //       this.$nextTick(function() {
+      //         this.$refs.evaluationannex.getAnnexList();
+      //       });
+      //     } else {
+      //       this.$modal.msgError(
+      //         "鑾峰彇鍖诲璇勪及璁板綍澶辫触锛�" + JSON.stringify(response)
+      //       );
+      //     }
+      //   });
+      // } else {
+      //   this.title = "鏂板鎹愮尞鍖诲璇勪及";
+      //   this.form.infoid = data.id;
+      //   this.form.donorno = data.donorno;
 
-        this.open = true;
-        this.$nextTick(function () {
-          this.$refs.evaluationannex.getAnnexList();
-        });
-      }
-      this.loading = false;
+      //   this.open = true;
+      //   this.$nextTick(function() {
+      //     this.$refs.evaluationannex.getAnnexList();
+      //   });
+      // }
+      // this.loading = false;
     },
     /** 鎻愪氦鎸夐挳 */
     submitForm() {
       this.loading = true;
-      this.$refs["form"].validate((valid) => {
+      this.$refs["form"].validate(valid => {
         if (valid) {
+          console.log(this.form.id);
           if (this.form.id != null) {
-            updateMedicalevaluation(this.form).then((response) => {
+            updateMedicalevaluation(this.form).then(response => {
               this.loading = false;
               this.$modal.msgSuccess("淇敼鎴愬姛");
               //鏌ヨ鏄惁瀛樺湪纭鐧昏璁板綍
               let searchConfirmParam = {
-                infoid: this.curCase.id.toString(),
+                infoid: this.curCase.id.toString()
               };
               this.loading = true;
-              listRelativesconfirmation(searchConfirmParam).then((response) => {
+              listRelativesconfirmation(searchConfirmParam).then(response => {
                 this.loading = false;
+                console.log(789);
                 if (response.code == 200) {
                   if (response.rows.length > 0) {
                     this.curCase.recordstate = 7;
                   } else {
                     this.curCase.recordstate = 4;
                   }
-                  updateDonatebaseinfo(this.curCase).then((response1) => {
-                    this.getList();
+                  updateDonatebaseinfo(this.curCase).then(response1 => {
+                    // this.getList();
+                    console.log(456);
                     if (response1.code == 200) {
                       if (this.curCase.recordstate == 7) {
                         this.$modal.msgSuccess("鎹愮尞璇勪及瀹屾垚骞朵笂鎶ヤ鸡鐞嗗鏌�");
@@ -1099,19 +1116,20 @@
                   });
                 }
               });
+              console.log(123);
               this.open = false;
               this.getList();
             });
           } else {
-            addMedicalevaluation(this.form).then((response) => {
+            addMedicalevaluation(this.form).then(response => {
               this.loading = false;
               this.$modal.msgSuccess("鏂板鎴愬姛");
               //鏌ヨ鏄惁瀛樺湪纭鐧昏璁板綍
               let searchConfirmParam = {
-                infoid: this.curCase.id.toString(),
+                infoid: this.curCase.id.toString()
               };
               this.loading = true;
-              listRelativesconfirmation(searchConfirmParam).then((response) => {
+              listRelativesconfirmation(searchConfirmParam).then(response => {
                 this.loading = false;
                 if (response.code == 200) {
                   if (response.rows.length > 0) {
@@ -1119,7 +1137,7 @@
                   } else {
                     this.curCase.recordstate = 4;
                   }
-                  updateDonatebaseinfo(this.curCase).then((response1) => {
+                  updateDonatebaseinfo(this.curCase).then(response1 => {
                     this.getList();
                     if (response1.code == 200) {
                       if (this.curCase.recordstate == 7) {
@@ -1185,7 +1203,7 @@
         createBy: null,
         createTime: null,
         updateBy: null,
-        updateTime: null,
+        updateTime: null
       };
       this.resetForm("confirmationform");
     },
@@ -1202,13 +1220,13 @@
       this.annexno = "";
       //鏌ヨ鏄惁瀛樺湪纭鐧昏璁板綍
       let searchConfirmParam = {
-        infoid: row.id.toString(),
+        infoid: row.id.toString()
       };
       this.curCase = row;
       this.resetConfirmForm();
 
       this.loading = true;
-      listRelativesconfirmation(searchConfirmParam).then((response) => {
+      listRelativesconfirmation(searchConfirmParam).then(response => {
         this.loading = false;
         if (response.code == 200) {
           if (response.rows.length == 0) {
@@ -1230,7 +1248,7 @@
               row.residencetownname;
             this.confirmationTitle = "鏂板浜轰綋鍣ㄥ畼鎹愮尞浜插睘纭鐧昏琛�";
             this.isShowConfirmationDialog = true;
-            this.$nextTick(function () {
+            this.$nextTick(function() {
               this.$refs.confirmannex.getAnnexList();
             });
           } else if (response.rows.length == 1) {
@@ -1250,16 +1268,16 @@
               row.residenceprovincename +
               row.residencecityname +
               row.residencetownname;
-            this.defultAddresss.sheng =
-              this.confirmationform.residenceprovincename;
+            this.defultAddresss.sheng = this.confirmationform.residenceprovincename;
             this.defultAddresss.shi = this.confirmationform.residencecityname;
             this.defultAddresss.qu = this.confirmationform.residencetownname;
             //this.form.kinship = this.form.kinship.split(",");
-            this.confirmationform.organdecision =
-              this.confirmationform.organdecision.split(",");
+            this.confirmationform.organdecision = this.confirmationform.organdecision.split(
+              ","
+            );
             this.isShowConfirmationDialog = true;
             this.title = "淇敼浜轰綋鍣ㄥ畼鎹愮尞浜插睘纭鐧昏琛�";
-            this.$nextTick(function () {
+            this.$nextTick(function() {
               this.$refs.confirmannex.getAnnexList();
             });
           } else {
@@ -1275,39 +1293,37 @@
 
     //淇濆瓨瀹跺睘纭琛�
     saveConfirmationForm() {
-      this.$refs["confirmationform"].validate((valid) => {
+      this.$refs["confirmationform"].validate(valid => {
         if (valid) {
           // this.form.kinship = this.form.kinship.join(",");
 
-          this.confirmationform.organdecision =
-            this.confirmationform.organdecision.join(",");
-          this.confirmationform.kinship =
-            this.confirmationform.kinship.join(",");
-          this.confirmationform.residenceprovince =
-            this.$refs.residenceaddresss.getSheng();
-          this.confirmationform.residenceprovincename =
-            this.defultAddresss.sheng;
-          this.confirmationform.residencecity =
-            this.$refs.residenceaddresss.getShi();
+          this.confirmationform.organdecision = this.confirmationform.organdecision.join(
+            ","
+          );
+          this.confirmationform.kinship = this.confirmationform.kinship.join(
+            ","
+          );
+          this.confirmationform.residenceprovince = this.$refs.residenceaddresss.getSheng();
+          this.confirmationform.residenceprovincename = this.defultAddresss.sheng;
+          this.confirmationform.residencecity = this.$refs.residenceaddresss.getShi();
           this.confirmationform.residencecityname = this.defultAddresss.shi;
-          this.confirmationform.residencetown =
-            this.$refs.residenceaddresss.getQu();
+          this.confirmationform.residencetown = this.$refs.residenceaddresss.getQu();
           this.confirmationform.residencetownname = this.defultAddresss.qu;
           if (this.confirmationform.id != null) {
             updateRelativesconfirmation(this.confirmationform).then(
-              (response) => {
+              response => {
                 this.$modal.msgSuccess("淇敼鎴愬姛");
                 this.isShowConfirmationDialog = false;
                 this.getList();
               }
             );
           } else {
-            addRelativesconfirmation(this.confirmationform).then((response) => {
+            addRelativesconfirmation(this.confirmationform).then(response => {
               this.$modal.msgSuccess("鏂板鎴愬姛");
               this.isShowConfirmationDialog = false;
               //涓婃姤浼︾悊瀹℃煡
               this.curCase.recordstate = 7;
-              updateDonatebaseinfo(this.curCase).then((response1) => {
+              updateDonatebaseinfo(this.curCase).then(response1 => {
                 this.getList();
                 if (response1.code == 200) {
                   this.$modal.msgSuccess("涓婃姤浼︾悊瀹℃煡鎴愬姛");
@@ -1321,7 +1337,7 @@
           }
         }
       });
-    },
+    }
   },
 
   //鐢熷懡鍛ㄦ湡 - 鍒涘缓瀹屾垚锛堝彲浠ヨ闂綋鍓峵his瀹炰緥锛�
@@ -1330,7 +1346,7 @@
     this.getuserlist();
     //鑾峰彇鍒楄〃
     this.getList();
-  },
+  }
   // //鐢熷懡鍛ㄦ湡 - 鎸傝浇瀹屾垚锛堝彲浠ヨ闂瓺OM鍏冪礌锛�
   //    mounted() {},
   // beforeCreate() {}, //鐢熷懡鍛ㄦ湡 - 鍒涘缓涔嬪墠

--
Gitblit v1.9.3