From 633f26d8e772b2441fb3fab72ecab0a047def74c Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期三, 21 二月 2024 15:06:42 +0800
Subject: [PATCH] 11

---
 src/views/project/donateannex/index.vue |  225 +++++++++++++++++++++++++++----------------------------
 1 files changed, 110 insertions(+), 115 deletions(-)

diff --git a/src/views/project/donateannex/index.vue b/src/views/project/donateannex/index.vue
index 35b88b9..a212994 100644
--- a/src/views/project/donateannex/index.vue
+++ b/src/views/project/donateannex/index.vue
@@ -135,7 +135,7 @@
       @selection-change="handleSelectionChange"
     >
       <el-table-column type="selection" width="55" align="center" />
-       <el-table-column
+      <el-table-column
         label="鎹愮尞缂栧彿"
         align="center"
         prop="donorno"
@@ -148,36 +148,29 @@
         width="120"
       >
         <template slot-scope="scope">
-          <dict-tag
-            :options="dict.type.sys_DonationStatus"
-            :value="scope.row.recordstate"
-          />
+          <div v-if="!scope.terminationCase">
+            <dict-tag
+              :options="dict.type.sys_DonationStatus"
+              :value="scope.row.recordstate"
+            />
+          </div>
+          <div v-else>浠诲姟涓</div>
         </template>
       </el-table-column>
-       <el-table-column
-        label="濮撳悕"
-        align="center"
-        prop="name"
-        width="120"
-      />
-       <el-table-column label="鎬у埆" align="center" prop="sex" width="120">
+      <el-table-column label="濮撳悕" align="center" prop="name" width="120" />
+      <el-table-column label="鎬у埆" align="center" prop="sex" width="120">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex" />
         </template>
       </el-table-column>
+      <el-table-column label="骞撮緞" align="center" prop="age" width="120" />
       <el-table-column
-        label="骞撮緞"
-        align="center"
-        prop="age"
-        width="120"
-      />
-     <el-table-column
         label="鍖荤枟鏈烘瀯"
         align="center"
         prop="treatmenthospitalname"
         width="180"
       />
-      
+
       <el-table-column
         label="鎶ュ憡浜�"
         align="center"
@@ -267,11 +260,14 @@
           <el-input v-model="form.donorno" placeholder="璇疯緭鍏ユ崘鐚�呯紪鍙�" />
         </el-form-item>
 
-         <el-form-item label="濮撳悕" prop="name">
-              <el-input disabled v-model="form.name" placeholder="璇疯緭鍏ユ崘鐚�呭鍚�" />
-            </el-form-item>
+        <el-form-item label="濮撳悕" prop="name">
+          <el-input
+            disabled
+            v-model="form.name"
+            placeholder="璇疯緭鍏ユ崘鐚�呭鍚�"
+          />
+        </el-form-item>
 
-       
         <el-table
           :data="attachmentTableData"
           style="width: 100%; margin-bottom: 20px"
@@ -334,7 +330,7 @@
   delDonateannex,
   addDonateannex,
   updateDonateannex,
-  exportDonateannex,
+  exportDonateannex
 } from "@/api/project/donateannex";
 import Li_area_select from "@/components/Address";
 import OrgSelecter from "@/views/project/components/orgselect";
@@ -350,7 +346,7 @@
   // exportProvincemessage,
 } from "@/api/project/donatebaseinfo";
 export default {
-   components: {
+  components: {
     Li_area_select,
     OrgSelecter,
     AnnexUpload
@@ -377,7 +373,7 @@
     "sys_SelfWill",
     "sys_FamilyRelation",
     "sys_Organ",
-    "sys_organstate",
+    "sys_organstate"
   ],
   data() {
     return {
@@ -401,14 +397,14 @@
       title: "",
       // 鏄惁鏄剧ず寮瑰嚭灞�
       open: false,
-      donorno:"",
+      donorno: "",
       // 鏌ヨ鍙傛暟
       queryParams: {
         pageNum: 1,
         pageSize: 10,
         donorno: null,
         annexname: null,
-        annexno: null,
+        annexno: null
       },
       // 琛ㄥ崟鍙傛暟
       form: {},
@@ -426,45 +422,45 @@
               annexname: "鎹愮尞鑰呰韩浠借瘉鏄�",
               annexno: "0001",
               annexurl: "",
-              fileList: [],
+              fileList: []
             },
             {
               annexname: "鎹愮尞鑰呬翰灞炶韩浠借瘉鏄�",
               annexno: "0002",
               annexurl: "",
-              fileList: [],
-            },
-          ],
+              fileList: []
+            }
+          ]
         },
         {
           annexname: "鎹愮尞鑰呭強浜插睘鍏崇郴璇佹槑",
           annexno: "002",
           annexurl: "",
-          fileList: [],
+          fileList: []
         },
         {
           annexname: "鎹愮尞鑰呯梾鎯呯畝浠�",
           annexno: "003",
           annexurl: "",
-          fileList: [],
+          fileList: []
         },
         {
           annexname: "鎹愮尞纭鐧昏琛�",
           annexno: "004",
           annexurl: "",
-          fileList: [],
+          fileList: []
         },
         {
           annexname: "浜轰綋鍣ㄥ畼鎹愮尞浜哄憳璇勪及璧勮川锛堝彲閫夛級",
           annexno: "005",
           annexurl: "",
-          fileList: [],
+          fileList: []
         },
         {
           annexname: "鍏皯閫濅笘鍚庝汉浣撳櫒瀹樻崘鐚憡鐭ヤ功",
           annexno: "006",
           annexurl: "",
-          fileList: [],
+          fileList: []
         },
         {
           annexname: "DBD/DCD鍙鎬ц瘎浼版姤鍛�",
@@ -482,7 +478,7 @@
                   annexname: "浜轰綋鍣ㄥ畼鎹愮尞鐥呮儏璇勪及琛�(DBD)",
                   annexno: "00711",
                   annexurl: "",
-                  fileList: [],
+                  fileList: []
                 },
                 {
                   annexname: "鑴戞浜″垽瀹氱鍚堟姤鍛�:绗﹀悎鍏朵腑涓ら」鍗冲彲",
@@ -494,29 +490,29 @@
                       annexname: "鑴戠數鍥炬姤鍛�",
                       annexno: "007121",
                       annexurl: "",
-                      fileList: [],
+                      fileList: []
                     },
                     {
                       annexname: "鐭綔浼忔湡浣撴劅璇卞彂鐢典綅",
                       annexno: "007122",
                       annexurl: "",
-                      fileList: [],
+                      fileList: []
                     },
                     {
                       annexname: "缁忛澶氭櫘鍕掕秴澹版姤鍛�",
                       annexno: "007123",
                       annexurl: "",
-                      fileList: [],
-                    },
-                  ],
+                      fileList: []
+                    }
+                  ]
                 },
                 {
                   annexname: "浜轰綋鍣ㄥ畼鎹愮尞鐥呮儏璇勪及鎰忚(DBD)",
                   annexno: "00713",
                   annexurl: "",
-                  fileList: [],
-                },
-              ],
+                  fileList: []
+                }
+              ]
             },
             {
               annexname: "锛堜簩锛塂CD鍙鎬ц瘎浼版姤鍛�",
@@ -528,29 +524,29 @@
                   annexname: "浜轰綋鍣ㄥ畼鎹愮尞鐥呮儏璇勪及琛�(DCD)",
                   annexno: "00721",
                   annexurl: "",
-                  fileList: [],
+                  fileList: []
                 },
                 {
                   annexname: "鎾ら櫎蹇冭偤鏀寔60鍒嗛挓鍐呮浜¢闄╄瘎浼板崟",
                   annexno: "00722",
                   annexurl: "",
-                  fileList: [],
+                  fileList: []
                 },
                 {
                   annexname: "浜轰綋鍣ㄥ畼鎹愮尞鐥呮儏璇勪及鎰忚(DCD)",
                   annexno: "00723",
                   annexurl: "",
-                  fileList: [],
-                },
-              ],
-            },
-          ],
-        },
+                  fileList: []
+                }
+              ]
+            }
+          ]
+        }
       ],
       // 涓婁紶鐨勫浘鐗囨湇鍔″櫒鍦板潃
       uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload",
       headers: {
-        Authorization: "Bearer " + getToken(),
+        Authorization: "Bearer " + getToken()
       },
       //鍚勪唤闄勪欢鎵�鍦╝ttachmentTableData鏁扮粍涓殑浣嶇疆
       attachJsonPosition: [
@@ -560,7 +556,7 @@
           annexno: "001",
           annexurl: "",
           level: 2,
-          position: [0, 0],
+          position: [0, 0]
         },
         {
           id: null,
@@ -568,7 +564,7 @@
           annexno: "002",
           annexurl: "",
           level: 2,
-          position: [0, 1],
+          position: [0, 1]
         },
         {
           id: null,
@@ -576,7 +572,7 @@
           annexno: "001",
           annexurl: "",
           level: 1,
-          position: [1],
+          position: [1]
         },
         {
           id: null,
@@ -584,7 +580,7 @@
           annexno: "001",
           annexurl: "",
           level: 1,
-          position: [2],
+          position: [2]
         },
         {
           id: null,
@@ -592,7 +588,7 @@
           annexno: "001",
           annexurl: "",
           level: 1,
-          position: [3],
+          position: [3]
         },
         {
           id: null,
@@ -600,7 +596,7 @@
           annexno: "001",
           annexurl: "",
           level: 1,
-          position: [4],
+          position: [4]
         },
         {
           id: null,
@@ -608,7 +604,7 @@
           annexno: "001",
           annexurl: "",
           level: 1,
-          position: [5],
+          position: [5]
         },
         {
           id: null,
@@ -616,7 +612,7 @@
           annexno: "001",
           annexurl: "",
           level: 3,
-          position: [6, 0, 0],
+          position: [6, 0, 0]
         },
         {
           id: null,
@@ -624,7 +620,7 @@
           annexno: "001",
           annexurl: "",
           level: 4,
-          position: [6, 0, 1, 0],
+          position: [6, 0, 1, 0]
         },
         {
           id: null,
@@ -632,7 +628,7 @@
           annexno: "001",
           annexurl: "",
           level: 4,
-          position: [6, 0, 1, 1],
+          position: [6, 0, 1, 1]
         },
         {
           id: null,
@@ -640,7 +636,7 @@
           annexno: "001",
           annexurl: "",
           level: 4,
-          position: [6, 0, 1, 2],
+          position: [6, 0, 1, 2]
         },
         {
           id: null,
@@ -648,7 +644,7 @@
           annexno: "001",
           annexurl: "",
           level: 3,
-          position: [6, 0, 2],
+          position: [6, 0, 2]
         },
         {
           id: null,
@@ -656,7 +652,7 @@
           annexno: "001",
           annexurl: "",
           level: 3,
-          position: [6, 1, 0],
+          position: [6, 1, 0]
         },
         {
           id: null,
@@ -664,7 +660,7 @@
           annexno: "001",
           annexurl: "",
           level: 3,
-          position: [6, 1, 1],
+          position: [6, 1, 1]
         },
         {
           id: null,
@@ -672,13 +668,13 @@
           annexno: "001",
           annexurl: "",
           level: 3,
-          position: [6, 1, 2],
-        },
+          position: [6, 1, 2]
+        }
       ],
       //鎹愯禒缂栧彿
       donorno: "0001",
       infoid: "8",
-      openType: "edit",
+      openType: "edit"
     };
   },
   created() {
@@ -688,8 +684,8 @@
     /** 鏌ヨ鎹愮尞闄勪欢鍒楄〃 */
     getList() {
       this.loading = true;
-      listnewDonateannex(this.queryParams).then((response) => {
-        console.log("鏂版暟鎹�",response);
+      listnewDonateannex(this.queryParams).then(response => {
+        console.log("鏂版暟鎹�", response);
         this.donateannexList = response.rows;
         console.log(this.donateannexList.donorNo);
         this.total = response.total;
@@ -700,12 +696,13 @@
     cancel() {
       this.open = false;
       this.reset();
-    }, curCase: {
-        donorno: "",
-        name: "",
-        registerAddresss:"",
-        infoid: "",
-      },
+    },
+    curCase: {
+      donorno: "",
+      name: "",
+      registerAddresss: "",
+      infoid: ""
+    },
     // 琛ㄥ崟閲嶇疆
     reset() {
       this.form = {
@@ -785,7 +782,7 @@
         majorrelatives: null,
         familyrelations: null,
         acquisitiontissueno: null,
-        acquisitiontissuename: null,
+        acquisitiontissuename: null
       };
       this.resetForm("form");
     },
@@ -801,7 +798,7 @@
     },
     // 澶氶�夋閫変腑鏁版嵁
     handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.id);
+      this.ids = selection.map(item => item.id);
       this.single = selection.length !== 1;
       this.multiple = !selection.length;
     },
@@ -815,10 +812,10 @@
         let searchParam = {
           donorno: this.donorno,
           infoid: this.infoid,
-          isdel: 0,
+          isdel: 0
         };
         this.loading = true;
-        listDonateannex(searchParam).then((response) => {
+        listDonateannex(searchParam).then(response => {
           //this.donateannexList = response.rows;
           this.loading = false;
           let dataList = response.rows;
@@ -837,7 +834,7 @@
                   const list = Array.isArray(tempUrl)
                     ? tempUrl
                     : tempUrl.split(",");
-                  tempfileList = list.map((item) => {
+                  tempfileList = list.map(item => {
                     if (typeof item === "string") {
                       item = { name: item, url: item };
                     }
@@ -849,10 +846,12 @@
                 let tempPositionArr = this.attachJsonPosition[k].position;
                 let tempData;
                 if (this.attachJsonPosition[k].level == 1) {
-                  this.attachmentTableData[tempPositionArr[0]].fileList =
-                    tempfileList;
-                  this.attachmentTableData[tempPositionArr[0]].annexurl =
-                    tempUrl;
+                  this.attachmentTableData[
+                    tempPositionArr[0]
+                  ].fileList = tempfileList;
+                  this.attachmentTableData[
+                    tempPositionArr[0]
+                  ].annexurl = tempUrl;
                   tempData = this.attachmentTableData[tempPositionArr[0]];
                 } else if (this.attachJsonPosition[k].level == 2) {
                   this.attachmentTableData[tempPositionArr[0]].children[
@@ -861,10 +860,8 @@
                   this.attachmentTableData[tempPositionArr[0]].children[
                     tempPositionArr[1]
                   ].annexurl = tempUrl;
-                  tempData =
-                    this.attachmentTableData[tempPositionArr[0]].children[
-                      tempPositionArr[1]
-                    ];
+                  tempData = this.attachmentTableData[tempPositionArr[0]]
+                    .children[tempPositionArr[1]];
                 } else if (this.attachJsonPosition[k].level == 3) {
                   this.attachmentTableData[tempPositionArr[0]].children[
                     tempPositionArr[1]
@@ -872,10 +869,8 @@
                   this.attachmentTableData[tempPositionArr[0]].children[
                     tempPositionArr[1]
                   ].children[tempPositionArr[2]].annexurl = tempUrl;
-                  tempData =
-                    this.attachmentTableData[tempPositionArr[0]].children[
-                      tempPositionArr[1]
-                    ].children[tempPositionArr[2]];
+                  tempData = this.attachmentTableData[tempPositionArr[0]]
+                    .children[tempPositionArr[1]].children[tempPositionArr[2]];
                 } else if (this.attachJsonPosition[k].level == 4) {
                   this.attachmentTableData[tempPositionArr[0]].children[
                     tempPositionArr[1]
@@ -887,10 +882,9 @@
                   ].children[tempPositionArr[2]].children[
                     tempPositionArr[3]
                   ].annexurl = tempUrl;
-                  tempData =
-                    this.attachmentTableData[tempPositionArr[0]].children[
-                      tempPositionArr[1]
-                    ].children[tempPositionArr[2]].children[tempPositionArr[3]];
+                  tempData = this.attachmentTableData[tempPositionArr[0]]
+                    .children[tempPositionArr[1]].children[tempPositionArr[2]]
+                    .children[tempPositionArr[3]];
                 }
               }
             }
@@ -905,9 +899,9 @@
     handleUpdate(row) {
       this.reset();
       const id = row.id || this.ids;
-      getDonatebaseinfo(id).then((response) => {
+      getDonatebaseinfo(id).then(response => {
         this.form = response.data;
-        console.log("form:",this.form);
+        console.log("form:", this.form);
         // this.form.diseasetype = this.form.diseasetype.split(",");
         // this.form.infectious = this.form.infectious.split(",");
         // this.form.selfwill = this.form.selfwill.split(",");
@@ -924,16 +918,16 @@
       if (this.openType == "edit") {
         //寰幆鏁扮粍锛屽崟涓笂浼狅紝鍚庣画鏀逛负鎵归噺涓婁紶
         for (let i = 0; i < this.attachJsonPosition.length; i++) {
-         let updateParam = {
+          let updateParam = {
             id: this.attachJsonPosition[i].id,
             infoid: this.infoid,
             donorno: this.donorno,
             delFlag: 0,
             annexname: this.attachJsonPosition[i].annexname,
             annexno: this.attachJsonPosition[i].annexno,
-            annexurl: this.attachJsonPosition[i].annexurl,
+            annexurl: this.attachJsonPosition[i].annexurl
           };
-          updateDonateannex(updateParam).then((response) => {
+          updateDonateannex(updateParam).then(response => {
             this.$modal.msgSuccess("淇敼鎴愬姛");
           });
         }
@@ -946,9 +940,9 @@
             delFlag: 0,
             annexname: this.attachJsonPosition[i].annexname,
             annexno: this.attachJsonPosition[i].annexno,
-            annexurl: this.attachJsonPosition[i].annexurl,
+            annexurl: this.attachJsonPosition[i].annexurl
           };
-          addDonateannex(addParam).then((response) => {
+          addDonateannex(addParam).then(response => {
             this.$modal.msgSuccess("鏂板鎴愬姛");
             //this.open = false;
           });
@@ -961,7 +955,7 @@
       const ids = row.id || this.ids;
       this.$modal
         .confirm('鏄惁纭鍒犻櫎鎹愮尞鍩虹缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�')
-        .then(function () {
+        .then(function() {
           return delDonatebaseinfo(ids);
         })
         .then(() => {
@@ -979,7 +973,7 @@
           this.exportLoading = true;
           return exportDonatebaseinfo(queryParams);
         })
-        .then((response) => {
+        .then(response => {
           this.$download.name(response.msg);
           this.exportLoading = false;
         })
@@ -1044,7 +1038,7 @@
           }
         }
       } else {
-        console.log(response.msg);;
+        console.log(response.msg);
       }
     },
 
@@ -1080,8 +1074,9 @@
           this.attachJsonPosition[positionIndex].annexurl =
             attachmentFileInfo.annexurl;
         } else if (position.level == 2) {
-          this.attachmentTableData[positionArr[0]].children[positionArr[1]] =
-            attachmentFileInfo;
+          this.attachmentTableData[positionArr[0]].children[
+            positionArr[1]
+          ] = attachmentFileInfo;
           this.attachJsonPosition[positionIndex].annexurl =
             attachmentFileInfo.annexurl;
         } else if (position.level == 3) {
@@ -1108,7 +1103,7 @@
         strs += list[i].url + separator;
       }
       return strs != "" ? strs.substr(0, strs.length - 1) : "";
-    },
-  },
+    }
+  }
 };
 </script>

--
Gitblit v1.9.3