From c96768b88d575454ee06d7f4720cfbd52e7c19e0 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期六, 11 十月 2025 13:37:44 +0800
Subject: [PATCH] 捐献案例维护

---
 src/views/project/donationdetails/index.vue |  381 ++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 283 insertions(+), 98 deletions(-)

diff --git a/src/views/project/donationdetails/index.vue b/src/views/project/donationdetails/index.vue
index 7adb765..38ef758 100644
--- a/src/views/project/donationdetails/index.vue
+++ b/src/views/project/donationdetails/index.vue
@@ -278,7 +278,11 @@
               </el-col>
               <el-col :span="6">
                 <el-form-item label="骞撮緞" prop="age">
-                  <el-input v-model="form.age" placeholder="璇疯緭鍏ュ勾榫�" />
+                  <el-input
+                    disabled
+                    v-model="form.andAge"
+                    placeholder="璇疯緭鍏ュ勾榫�"
+                  />
                 </el-form-item>
               </el-col>
               <el-col :span="6">
@@ -377,7 +381,7 @@
             </el-col>
           </el-row>
           <el-row>
-            <el-col :span="6">
+            <!-- <el-col :span="6">
               <el-form-item label="姘戞棌" prop="nation">
                 <el-select v-model="form.nation" placeholder="璇烽�夋嫨姘戞棌">
                   <el-option
@@ -393,14 +397,14 @@
               <el-form-item label="绫嶈疮" prop="nativeplace">
                 <el-input v-model="form.nativeplace" placeholder="璇疯緭鍏ュ浗绫�" />
               </el-form-item>
-            </el-col>
+            </el-col> -->
             <el-col :span="6">
               <el-form-item label="鍥界睄" prop="nationality">
                 <el-input v-model="form.nationality" placeholder="璇疯緭鍏ュ浗绫�" />
               </el-form-item>
             </el-col>
           </el-row>
-          <el-row>
+          <!-- <el-row>
             <el-col :span="6">
               <el-form-item label="鑱屼笟" prop="occupation">
                 <el-select v-model="form.occupation" placeholder="璇烽�夋嫨鑱屼笟">
@@ -425,34 +429,51 @@
                 </el-select>
               </el-form-item>
             </el-col>
-          </el-row>
+          </el-row> -->
           <el-row>
             <el-col :span="6">
-              <el-form-item label="褰撳墠鍖荤枟鏈烘瀯" prop="occupation">
-                <el-input v-model="form.currentMedicalInstitution" placeholder="璇疯緭鍏�" />
+              <el-form-item
+                label="鎵�鍦ㄥ尰鐤楁満鏋�"
+                prop="currentMedicalInstitution"
+              >
+                <el-input
+                  v-model="form.currentMedicalInstitution"
+                  placeholder="璇疯緭鍏�"
+                />
               </el-form-item>
             </el-col>
             <el-col :span="10">
-              <el-form-item label-width="130px" label="褰撳墠鍖荤枟鏈烘瀯绉戝" prop="education">
+              <el-form-item
+                label-width="130px"
+                label="鎵�鍦ㄥ尰鐤楁満鏋勭瀹�"
+                prop="currentDept"
+              >
                 <el-input v-model="form.currentDept" placeholder="璇疯緭鍏�" />
               </el-form-item>
             </el-col>
           </el-row>
           <el-row>
             <el-col :span="6">
-              <el-form-item label="棣栨鍖荤枟鏈烘瀯" prop="occupation">
-                <el-input v-model="form.firstMedicalInstitution" placeholder="璇疯緭鍏�" />
+              <el-form-item label="棣栨鍖荤枟鏈烘瀯" prop="firstMedicalInstitution">
+                <el-input
+                  v-model="form.firstMedicalInstitution"
+                  placeholder="璇疯緭鍏�"
+                />
               </el-form-item>
             </el-col>
             <el-col :span="10">
-              <el-form-item label-width="130px" label="棣栨鍖荤枟鏈烘瀯绉戝" prop="education">
+              <el-form-item
+                label-width="130px"
+                label="棣栨鍖荤枟鏈烘瀯绉戝"
+                prop="firstDept"
+              >
                 <el-input v-model="form.firstDept" placeholder="璇疯緭鍏�" />
               </el-form-item>
             </el-col>
           </el-row>
           <el-row>
             <el-col :span="12">
-              <el-form-item label="浣忓潃" prop="residenceaddress">
+              <el-form-item label="浣忓潃(涓庤韩浠借瘉涓�鑷�)" prop="residenceaddress">
                 <div>
                   <li_area_select
                     ref="residenceSelect"
@@ -516,7 +537,7 @@
             </el-col>
           </el-row>
           <el-row>
-            <el-form-item label="鐤剧梾绫诲瀷" align="left">
+            <el-form-item label="鐤剧梾绫诲瀷" align="left" prop="diseasetype">
               <el-checkbox-group v-model="form.diseasetype">
                 <el-checkbox
                   v-for="dict in dict.type.sys_DiseaseType || []"
@@ -536,7 +557,7 @@
           </el-row>
           <el-row>
             <el-col :span="12">
-              <el-form-item align="left" label="浼犳煋鐥�">
+              <el-form-item align="left" label="浼犳煋鐥�" prop="infectious">
                 <el-checkbox-group v-model="form.infectious">
                   <el-checkbox
                     v-for="dict in dict.type.sys_Infectious || []"
@@ -559,7 +580,7 @@
           </el-row>
           <el-row>
             <el-col :span="9">
-              <el-form-item align="left" label="鐥呬汉鐘跺喌">
+              <el-form-item align="left" label="鐥呬汉鐘跺喌" prop="patientstate">
                 <el-checkbox-group v-model="form.patientstate">
                   <el-checkbox
                     v-for="dict in dict.type.sys_patientstate || []"
@@ -572,7 +593,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="15" align="left">
-              <el-form-item label="鍏朵粬鎯呭喌">
+              <el-form-item label="鍏朵粬鎯呭喌" prop="othercases">
                 <el-checkbox-group v-model="form.othercases">
                   <el-checkbox
                     v-for="dict in dict.type.sys_OtherCases || []"
@@ -659,7 +680,7 @@
           </el-row>
           <el-row>
             <el-col :span="12">
-              <el-form-item align="left" label="淇℃伅鏉ユ簮">
+              <el-form-item align="left" label="淇℃伅鏉ユ簮" prop="infosources">
                 <el-checkbox-group v-model="form.infosources">
                   <el-checkbox
                     v-for="dict in dict.type.sys_InfoSources || []"
@@ -695,7 +716,7 @@
                 />
               </el-form-item>
             </el-col>
-            <el-col :span="8">
+            <!-- <el-col :span="8">
               <el-form-item label="淇℃伅鍛�" prop="infoname">
                 <el-input v-model="form.infoname" placeholder="璇疯緭鍏ヤ俊鎭憳" />
               </el-form-item>
@@ -707,9 +728,9 @@
                   placeholder="璇疯緭鍏ヤ俊鎭憳鑱旂郴鐢佃瘽"
                 />
               </el-form-item>
-            </el-col>
+            </el-col> -->
           </el-row>
-          <el-row>
+          <!-- <el-row>
             <el-col :span="8">
               <el-form-item align="left" label="绾㈠崄瀛椾細" prop="redorganno">
                 <org-selecter
@@ -741,7 +762,7 @@
                 </el-date-picker>
               </el-form-item>
             </el-col>
-          </el-row>
+          </el-row> -->
         </el-form>
         <div class="dialog-footer">
           <el-button
@@ -1000,6 +1021,50 @@
         >
           <el-row>
             <el-col :span="6">
+              <el-form-item label="鎹愯禒鑰呮皯鏃�" prop="nation">
+                <el-select v-model="affirmform.nation" placeholder="璇烽�夋嫨姘戞棌">
+                  <el-option
+                    v-for="dict in dict.type.sys_nation || []"
+                    :key="dict.value"
+                    :label="dict.label"
+                    :value="dict.value"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="鎹愯禒鑰呭鍘�" prop="education">
+                <el-select
+                  v-model="affirmform.education"
+                  placeholder="璇烽�夋嫨瀛﹀巻"
+                >
+                  <el-option
+                    v-for="dict in dict.type.sys_education || []"
+                    :key="dict.value"
+                    :label="dict.label"
+                    :value="dict.value"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="鎹愯禒鑰呰亴涓�" prop="occupation">
+                <el-select
+                  v-model="affirmform.occupation"
+                  placeholder="璇烽�夋嫨鑱屼笟"
+                >
+                  <el-option
+                    v-for="dict in dict.type.sys_occupation || []"
+                    :key="dict.value"
+                    :label="dict.label"
+                    :value="dict.value"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="6">
               <el-form-item label="浜插睘濮撳悕" prop="name">
                 <el-input v-model="affirmform.name" placeholder="璇疯緭鍏ュ鍚�" />
               </el-form-item>
@@ -1024,7 +1089,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item label="韬唤璇佸彿" prop="idcardno">
+              <el-form-item label="浜插睘韬唤璇�" prop="idcardno">
                 <el-input
                   ref="updateBSvalue"
                   class="sfzcode"
@@ -1034,7 +1099,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item label="鑱旂郴鐢佃瘽" prop="phone">
+              <el-form-item label="浜插睘鐢佃瘽" prop="phone">
                 <el-input
                   v-model="affirmform.phone"
                   placeholder="璇疯緭鍏ヨ仈绯荤數璇�"
@@ -1042,56 +1107,18 @@
               </el-form-item>
             </el-col>
           </el-row>
+
           <el-row>
-            <el-col :span="6">
-              <el-form-item label="姘戞棌" prop="nation">
-                <el-select v-model="affirmform.nation" placeholder="璇烽�夋嫨姘戞棌">
-                  <el-option
-                    v-for="dict in dict.type.sys_nation || []"
-                    :key="dict.value"
-                    :label="dict.label"
-                    :value="dict.value"
-                  ></el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="瀛﹀巻" prop="education">
-                <el-select v-model="affirmform.education" placeholder="璇烽�夋嫨瀛﹀巻">
-                  <el-option
-                    v-for="dict in dict.type.sys_education || []"
-                    :key="dict.value"
-                    :label="dict.label"
-                    :value="dict.value"
-                  ></el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-           <el-col :span="6">
-              <el-form-item label="鑱屼笟" prop="occupation">
-                <el-select v-model="affirmform.occupation" placeholder="璇烽�夋嫨鑱屼笟">
-                  <el-option
-                    v-for="dict in dict.type.sys_occupation || []"
-                    :key="dict.value"
-                    :label="dict.label"
-                    :value="dict.value"
-                  ></el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="12">
+            <!-- <el-col :span="12">
               <el-form-item label="浜插睘绫嶈疮" prop="residenceaddresss">
                 <div>
                   <li_area_select
                     v-model="defultAddresss"
                     ref="residenceaddresss"
                   ></li_area_select>
-                  <!-- <div>{{defultAddress}}</div> -->
                 </div>
               </el-form-item>
-            </el-col>
+            </el-col> -->
             <el-col :span="12">
               <el-form-item label="鐜颁綇鍦板潃" prop="residenceaddress">
                 <el-input
@@ -1103,7 +1130,7 @@
           </el-row>
           <el-row>
             <el-col :span="12">
-              <el-form-item label="绛惧瓧浜插睘" prop="kinshipconfirmationsign">
+              <el-form-item label="浜插睘鍏崇郴" prop="kinshipconfirmationsign">
                 <el-checkbox-group v-model="kinship">
                   <el-checkbox
                     v-for="dict in dict.type.sys_kinshipConfirm || []"
@@ -1146,6 +1173,12 @@
                   >{{ item }}
                 </el-checkbox>
               </el-checkbox-group>
+              <el-input
+                v-if="organdecision.includes('鍏朵粬')"
+                v-model="affirmform.organdecisionOther"
+                placeholder="璇疯緭鍏ュ叾浠栨崘鐚喅瀹氱殑鍏蜂綋鍐呭"
+                style="margin-top: 10px; width: 300px;"
+              ></el-input>
             </el-form-item>
           </el-row>
           <el-row>
@@ -1235,7 +1268,7 @@
                   size="small"
                   v-model="affirmform.signdate"
                   type="date"
-                  value-format="yyyy-MM-dd hh:mm:ss"
+                  value-format="yyyy-MM-dd"
                   placeholder="閫夋嫨绛惧瓧鏃ユ湡"
                 >
                 </el-date-picker>
@@ -1379,12 +1412,12 @@
                       />
                     </template>
                   </el-table-column>
-                  <el-table-column
+                  <!-- <el-table-column
                     label="鍣ㄥ畼缂栧彿"
                     align="center"
                     width="90"
                     prop="organno"
-                  />
+                  /> -->
                   <el-table-column
                     label="鍒嗛厤绯荤粺缂栧彿"
                     align="center"
@@ -1433,7 +1466,7 @@
                   <el-table-column
                     label="绉绘鍖婚櫌"
                     align="center"
-                    width="230"
+                    width="280"
                     prop="transplanthospitalno"
                   >
                     <template slot-scope="scope">
@@ -1666,7 +1699,7 @@
             <el-col :span="6">
               <el-form-item
                 align="left"
-                label="绛惧瓧鏃堕棿"
+                label="绛惧瓧鏃ユ湡"
                 label-width="120px"
                 prop="coordinatorSignTime"
               >
@@ -1674,7 +1707,7 @@
                   clearable
                   v-model="witnessform.coordinatorSignTime"
                   type="datetime"
-                  value-format="yyyy-MM-dd HH:mm:ss"
+                  value-format="yyyy-MM-dd"
                   placeholder="閫夋嫨鎵嬫湳缁撴潫鏃堕棿"
                 >
                 </el-date-picker>
@@ -1840,7 +1873,12 @@
           <el-row>
             <el-col>
               <el-form-item>
-                <el-table v-loading="loading" border :data="procureddata">
+                <el-table
+                  v-loading="loading"
+                  border
+                  :key="tableKey"
+                  :data="procureddata"
+                >
                   <el-table-column
                     label="鍣ㄥ畼鍚嶇О"
                     align="center"
@@ -1855,12 +1893,12 @@
                       />
                     </template>
                   </el-table-column>
-                  <el-table-column
+                  <!-- <el-table-column
                     label="鍣ㄥ畼缂栧彿"
                     align="center"
                     width="90"
                     prop="organno"
-                  />
+                  /> -->
                   <!-- <el-table-column
                     label="绯荤粺缂栧彿"
                     align="center"
@@ -1875,7 +1913,7 @@
                     </template>
                   </el-table-column> -->
                   <el-table-column
-                    label="鍣ㄥ畼绂讳綋鏃堕棿"
+                    label="鑾峰彇寮�濮嬫椂闂�"
                     align="center"
                     width="200"
                     prop="organgettime"
@@ -1888,7 +1926,7 @@
                         v-model="scope.row.organgettime"
                         type="datetime"
                         value-format="yyyy-MM-dd HH:mm:ss"
-                        placeholder="璇疯緭鍏ュ櫒瀹樼浣撴椂闂�"
+                        placeholder="璇疯緭鍏ヨ幏鍙栧紑濮嬫椂闂�"
                       >
                       </el-date-picker>
                     </template>
@@ -1896,7 +1934,7 @@
                   <el-table-column
                     label="鑾峰彇鍖婚櫌"
                     align="center"
-                    width="230"
+                    width="280"
                     prop="gainhospitalno"
                   >
                     <template slot-scope="scope">
@@ -2115,12 +2153,12 @@
                       />
                     </template>
                   </el-table-column>
-                  <el-table-column
+                  <!-- <el-table-column
                     label="鍣ㄥ畼缂栧彿"
                     align="center"
                     width="90"
                     prop="organno"
-                  />
+                  /> -->
                   <el-table-column
                     label="绯荤粺缂栧彿"
                     align="center"
@@ -2137,7 +2175,7 @@
                   <el-table-column
                     label="绉绘鍖婚櫌"
                     align="center"
-                    width="220"
+                    width="280"
                     prop="hospitalno"
                   >
                     <template slot-scope="scope">
@@ -2671,6 +2709,20 @@
         contacttime: "",
         reporttime: ""
       },
+      organOrder: [
+        "鑲濊剰",
+        "宸﹁偩",
+        "鍙宠偩",
+        "蹇冭剰",
+        "宸﹁偤",
+        "鍙宠偤",
+        "鑳拌吅",
+        "灏忚偁",
+        "宸︾溂瑙掕啘",
+        "鍙崇溂瑙掕啘"
+      ], // 鎸囧畾鐨勫櫒瀹橀『搴�
+      isSorting: false, // 鏍囧織浣嶏紝琛ㄧず鏄惁姝e湪鎺掑簭
+      tableKey: 0,
       istb: false,
       activeName: "",
       tableDatafile: [
@@ -2691,6 +2743,7 @@
         kinship: []
       },
       organdecision: [],
+      organdecisionOther: "", // 鍏朵粬閫夐」鐨勫叿浣撴弿杩�
       kinship: [],
       ethicform: {
         infoid: null
@@ -2698,7 +2751,8 @@
       kinshiplist: ["閰嶅伓", "鐖朵翰", "姣嶄翰", "瀛愬コ", "鍙楁墭浜�"],
       organselection: [
         "鑲濊剰",
-        "鍙岃偩鑴�",
+        "宸﹁偩",
+        "鍙宠偩",
         "蹇冭剰",
         "鑲鸿剰",
         "鑳拌吅",
@@ -2802,6 +2856,21 @@
         name: [
           { required: true, message: "璇疯緭鍏ユ崘鐚�呭鍚�", trigger: "blur" }
         ],
+        nationality: [
+          { required: true, message: "璇疯緭鍏ュ浗绫�", trigger: "blur" }
+        ],
+        currentMedicalInstitution: [
+          { required: true, message: "璇疯緭鍏ユ墍鍦ㄥ尰鐤楁満鏋�", trigger: "blur" }
+        ],
+        currentDept: [
+          { required: true, message: "鎵�鍦ㄥ尰鐤楁満鏋勭瀹�", trigger: "blur" }
+        ],
+        firstMedicalInstitution: [
+          { required: true, message: "璇疯緭鍏ラ娆″尰鐤楁満鏋�", trigger: "blur" }
+        ],
+        firstDept: [
+          { required: true, message: "璇疯緭鍏ラ娆″尰鐤楁満鏋勭瀹�", trigger: "blur" }
+        ],
         birthday: [
           { required: true, message: "璇烽�夋嫨鍑虹敓鏃ユ湡", trigger: "blur" }
         ],
@@ -2811,12 +2880,29 @@
         residenceaddress: [
           { required: true, message: "璇疯緭鍏ヤ綇鍧�", trigger: "blur" }
         ],
-        contacttime: [
-          {
-            required: true,
-            message: "璇疯緭鍏ョ孩鍗佸瓧浼氳仈绯绘椂闂�",
-            trigger: "blur"
-          }
+        registerAddresss: [
+          { required: true, message: "璇疯緭鍏ョ幇灞呬綇鍦板潃", trigger: "blur" }
+        ],
+        diseasetype: [
+          { required: true, message: "璇烽�夋嫨鐤剧梾绫诲瀷", trigger: "blur" }
+        ],
+        infectious: [
+          { required: true, message: "璇烽�夋嫨浼犳煋鐥呯被鍨�", trigger: "blur" }
+        ],
+        patientstate: [
+          { required: true, message: "璇烽�夋嫨鐥呬汉鐘跺喌", trigger: "blur" }
+        ],
+        kinship: [
+          { required: true, message: "璇烽�夋嫨浜插睘鎯呭喌", trigger: "blur" }
+        ],
+        majorrelatives: [
+          { required: true, message: "璇疯緭鍏ヤ富瑕佷翰灞�", trigger: "blur" }
+        ],
+        familyrelations: [
+          { required: true, message: "璇烽�夋嫨浜插睘涓庢崘鐚�呭叧绯�", trigger: "blur" }
+        ],
+        infosources: [
+          { required: true, message: "璇烽�夋嫨淇℃伅鏉ユ簮", trigger: "blur" }
         ],
         idcardno: [
           { required: true, message: "璇锋纭緭鍏ヨ瘉浠跺彿鐮�", trigger: "blur" }
@@ -2846,16 +2932,6 @@
         infophone: [
           { required: true, message: "璇疯緭鍏ヤ俊鎭憳鑱旂郴鐢佃瘽", trigger: "blur" }
         ],
-        redorganno: [
-          { required: true, message: "璇烽�夋嫨绾㈠崄瀛椾細鏈烘瀯", trigger: "blur" }
-        ],
-        contactperson: [
-          {
-            required: true,
-            message: "绾㈠崄瀛椾細鑱旂郴浜轰笉鑳戒负绌�",
-            trigger: "blur"
-          }
-        ],
         acquisitiontissueno: [
           { required: true, message: "鍣ㄥ畼鑾峰彇缁勭粐涓嶈兘涓虹┖", trigger: "blur" }
         ],
@@ -2876,6 +2952,15 @@
           { required: true, message: "浜插睘濮撳悕涓嶈兘涓虹┖", trigger: "blur" }
         ],
         phone: [
+          { required: true, message: "瀹跺睘鑱旂郴鐢佃瘽涓嶄负绌�", trigger: "blur" }
+        ],
+        nation: [
+          { required: true, message: "浜插睘濮撳悕涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+        education: [
+          { required: true, message: "瀹跺睘鑱旂郴鐢佃瘽涓嶄负绌�", trigger: "blur" }
+        ],
+        occupation: [
           { required: true, message: "瀹跺睘鑱旂郴鐢佃瘽涓嶄负绌�", trigger: "blur" }
         ],
         signfamilyrelations: [
@@ -2958,6 +3043,28 @@
     listReportname("fzr").then(res => {
       this.leaderlist = res.data;
     });
+    // this.customOrganSort();
+  },
+  watch: {
+    // 鐩戝惉 procureddata 鐨勫彉鍖栵紝鏁版嵁鏇存柊鍚庨噸鏂版帓搴�
+    procureddata: {
+      handler(newVal) {
+        if (this.isSorting) {
+          return;
+        }
+        this.customOrganSort();
+      },
+      deep: true // 娣卞害鐩戝惉锛屽洜涓烘暟缁勫唴瀹瑰彲鑳藉彉鍖�
+    },
+    allocateddata: {
+      handler(newVal) {
+        if (this.isSorting) {
+          return;
+        }
+        this.allocateddataSort();
+      },
+      deep: true // 娣卞害鐩戝惉锛屽洜涓烘暟缁勫唴瀹瑰彲鑳藉彉鍖�
+    }
   },
 
   methods: {
@@ -2982,7 +3089,15 @@
       // 琛ㄥ崟鏁版嵁
       getDonatebaseinfo(this.infoid).then(response => {
         this.form = response.data;
-        console.log(this.form, "form");
+        this.form.andAge = `${
+          this.form.age && this.form.age !== 0
+            ? `${this.form.age}${this.form.ageunit}`
+            : ""
+        } ${
+          this.form.age2 && this.form.age2 !== 0
+            ? `${this.form.age2}${this.form.ageunit2}`
+            : ""
+        }`.trim();
 
         if (response.data.terminationCase) {
           this.showTerminationBtn = response.data.terminationCase;
@@ -3333,6 +3448,9 @@
       } else if (this.actives == 2) {
         this.affirmform.infoid = this.infoid;
         this.affirmform.organdecision = this.organdecision.join(",");
+        if (!this.organdecision.includes("鍏朵粬")) {
+          this.affirmform.organdecisionOther = "";
+        }
         this.affirmform.kinship = this.kinship.join(",");
         this.$refs["affirmform"].validate(valid => {
           if (valid) {
@@ -3542,6 +3660,73 @@
         });
       }
     },
+
+    customOrganSort() {
+      console.log("璋冪敤");
+
+      // 1. 鍔犻攣锛岄樆姝㈢洃鍚櫒鎵ц
+      this.isSorting = true;
+      // 鑷畾涔夋帓搴忓嚱鏁�
+      this.procureddata.sort((a, b) => {
+        const indexA = this.organOrder.indexOf(a.organname);
+        const indexB = this.organOrder.indexOf(b.organname);
+
+        // 濡傛灉涓や釜閮藉湪鍒楄〃涓紝鎸夊垪琛ㄤ腑鐨勯『搴忔帓搴�
+        if (indexA !== -1 && indexB !== -1) {
+          return indexA - indexB;
+        }
+        // 濡傛灉 a 鍦ㄥ垪琛ㄤ腑锛宐 涓嶅湪锛宎 鎺掑墠闈�
+        if (indexA !== -1) {
+          return -1;
+        }
+        // 濡傛灉 b 鍦ㄥ垪琛ㄤ腑锛宎 涓嶅湪锛宐 鎺掑墠闈�
+        if (indexB !== -1) {
+          return 1;
+        }
+        // 涓や釜閮戒笉鍦ㄥ垪琛ㄤ腑锛屼繚鎸佸師椤哄簭锛堟垨鎸夊叾浠栬鍒欙紝姣斿鎸夊瓧姣嶆帓搴忥紝杩欓噷鎸夊師濮嬮『搴忥級
+        return 0;
+      });
+      console.log(this.procureddata, "椤哄簭");
+      this.tableKey += 1; // 鏀瑰彉 key 杩娇琛ㄦ牸閲嶆柊娓叉煋
+      // 浣犲彲浠ヤ娇鐢� this.$forceUpdate() 鎴栬�呴噸鏂拌祴鍊兼暟缁勬潵瑙﹀彂鏇存柊
+      this.procureddata = [...this.procureddata];
+      this.$nextTick(() => {
+        this.isSorting = false;
+      });
+    },
+    allocateddataSort() {
+      console.log("璋冪敤");
+
+      // 1. 鍔犻攣锛岄樆姝㈢洃鍚櫒鎵ц
+      this.isSorting = true;
+      // 鑷畾涔夋帓搴忓嚱鏁�
+      this.allocateddata.sort((a, b) => {
+        const indexA = this.organOrder.indexOf(a.organname);
+        const indexB = this.organOrder.indexOf(b.organname);
+
+        // 濡傛灉涓や釜閮藉湪鍒楄〃涓紝鎸夊垪琛ㄤ腑鐨勯『搴忔帓搴�
+        if (indexA !== -1 && indexB !== -1) {
+          return indexA - indexB;
+        }
+        // 濡傛灉 a 鍦ㄥ垪琛ㄤ腑锛宐 涓嶅湪锛宎 鎺掑墠闈�
+        if (indexA !== -1) {
+          return -1;
+        }
+        // 濡傛灉 b 鍦ㄥ垪琛ㄤ腑锛宎 涓嶅湪锛宐 鎺掑墠闈�
+        if (indexB !== -1) {
+          return 1;
+        }
+        // 涓や釜閮戒笉鍦ㄥ垪琛ㄤ腑锛屼繚鎸佸師椤哄簭锛堟垨鎸夊叾浠栬鍒欙紝姣斿鎸夊瓧姣嶆帓搴忥紝杩欓噷鎸夊師濮嬮『搴忥級
+        return 0;
+      });
+      console.log(this.allocateddata, "椤哄簭");
+      this.tableKey += 1; // 鏀瑰彉 key 杩娇琛ㄦ牸閲嶆柊娓叉煋
+      // 浣犲彲浠ヤ娇鐢� this.$forceUpdate() 鎴栬�呴噸鏂拌祴鍊兼暟缁勬潵瑙﹀彂鏇存柊
+      this.allocateddata = [...this.allocateddata];
+      this.$nextTick(() => {
+        this.isSorting = false;
+      });
+    },
     // 鍒囨崲tab
     on_click(e) {
       // if (e != "" || e != null) {

--
Gitblit v1.9.3