From edf132557e5eee4e8607ca83d987c5f6b830f025 Mon Sep 17 00:00:00 2001 From: WXL <wl_5969728@163.com> Date: 星期五, 17 十月 2025 16:43:10 +0800 Subject: [PATCH] 档案相关发布 --- src/views/project/donationdetails/index.vue | 255 +++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 228 insertions(+), 27 deletions(-) diff --git a/src/views/project/donationdetails/index.vue b/src/views/project/donationdetails/index.vue index 4038f30..84bc3be 100644 --- a/src/views/project/donationdetails/index.vue +++ b/src/views/project/donationdetails/index.vue @@ -432,7 +432,10 @@ </el-row> --> <el-row> <el-col :span="6"> - <el-form-item label="鎵�鍦ㄥ尰鐤楁満鏋�" prop="occupation"> + <el-form-item + label="鎵�鍦ㄥ尰鐤楁満鏋�" + prop="currentMedicalInstitution" + > <el-input v-model="form.currentMedicalInstitution" placeholder="璇疯緭鍏�" @@ -443,7 +446,7 @@ <el-form-item label-width="130px" label="鎵�鍦ㄥ尰鐤楁満鏋勭瀹�" - prop="education" + prop="currentDept" > <el-input v-model="form.currentDept" placeholder="璇疯緭鍏�" /> </el-form-item> @@ -451,7 +454,7 @@ </el-row> <el-row> <el-col :span="6"> - <el-form-item label="棣栨鍖荤枟鏈烘瀯" prop="occupation"> + <el-form-item label="棣栨鍖荤枟鏈烘瀯" prop="firstMedicalInstitution"> <el-input v-model="form.firstMedicalInstitution" placeholder="璇疯緭鍏�" @@ -462,7 +465,7 @@ <el-form-item label-width="130px" label="棣栨鍖荤枟鏈烘瀯绉戝" - prop="education" + prop="firstDept" > <el-input v-model="form.firstDept" placeholder="璇疯緭鍏�" /> </el-form-item> @@ -534,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 || []" @@ -554,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 || []" @@ -577,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 || []" @@ -590,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 || []" @@ -637,7 +640,7 @@ </el-row> <el-row> <el-col :span="24"> - <el-form-item align="left" label="鏈汉鎰忔効 "> + <el-form-item align="left" label="鏈汉鎰忔効 " prop="selfwill"> <el-checkbox-group v-model="form.selfwill"> <el-checkbox v-for="dict in dict.type.sys_SelfWill || []" @@ -677,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 || []" @@ -1016,7 +1019,7 @@ label-width="100px" label-position="right" > - <el-row> + <el-row> <el-col :span="6"> <el-form-item label="鎹愯禒鑰呮皯鏃�" prop="nation"> <el-select v-model="affirmform.nation" placeholder="璇烽�夋嫨姘戞棌"> @@ -1170,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> @@ -1403,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" @@ -1457,7 +1466,7 @@ <el-table-column label="绉绘鍖婚櫌" align="center" - width="230" + width="280" prop="transplanthospitalno" > <template slot-scope="scope"> @@ -1690,7 +1699,7 @@ <el-col :span="6"> <el-form-item align="left" - label="绛惧瓧鏃堕棿" + label="绛惧瓧鏃ユ湡" label-width="120px" prop="coordinatorSignTime" > @@ -1864,7 +1873,15 @@ <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" + lazy + :load="loadRowData" + :row-key="row => row.organno" + > <el-table-column label="鍣ㄥ畼鍚嶇О" align="center" @@ -1879,12 +1896,12 @@ /> </template> </el-table-column> - <el-table-column + <!-- <el-table-column label="鍣ㄥ畼缂栧彿" align="center" width="90" prop="organno" - /> + /> --> <!-- <el-table-column label="绯荤粺缂栧彿" align="center" @@ -1899,7 +1916,7 @@ </template> </el-table-column> --> <el-table-column - label="鑾峰彇寮�濮嬫椂闂�" + label="鍣ㄥ畼绂讳綋鏃堕棿" align="center" width="200" prop="organgettime" @@ -1912,6 +1929,25 @@ v-model="scope.row.organgettime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" + placeholder="璇疯緭鍏ュ櫒瀹樼浣撴椂闂�" + > + </el-date-picker> + </template> + </el-table-column> + <el-table-column + label="鑾峰彇寮�濮嬫椂闂�" + align="center" + width="200" + prop="organStartTime" + > + <template slot-scope="scope"> + <el-date-picker + clearable + size="small" + style="width: 100%" + v-model="scope.row.organStartTime" + type="datetime" + value-format="yyyy-MM-dd HH:mm:ss" placeholder="璇疯緭鍏ヨ幏鍙栧紑濮嬫椂闂�" > </el-date-picker> @@ -1920,7 +1956,7 @@ <el-table-column label="鑾峰彇鍖婚櫌" align="center" - width="230" + width="280" prop="gainhospitalno" > <template slot-scope="scope"> @@ -2139,12 +2175,12 @@ /> </template> </el-table-column> - <el-table-column + <!-- <el-table-column label="鍣ㄥ畼缂栧彿" align="center" width="90" prop="organno" - /> + /> --> <el-table-column label="绯荤粺缂栧彿" align="center" @@ -2161,7 +2197,7 @@ <el-table-column label="绉绘鍖婚櫌" align="center" - width="220" + width="280" prop="hospitalno" > <template slot-scope="scope"> @@ -2695,6 +2731,20 @@ contacttime: "", reporttime: "" }, + organOrder: [ + "鑲濊剰", + "宸﹁偩", + "鍙宠偩", + "蹇冭剰", + "宸﹁偤", + "鍙宠偤", + "鑳拌吅", + "灏忚偁", + "宸︾溂瑙掕啘", + "鍙崇溂瑙掕啘" + ], // 鎸囧畾鐨勫櫒瀹橀『搴� + isSorting: false, // 鏍囧織浣嶏紝琛ㄧず鏄惁姝e湪鎺掑簭 + tableKey: 0, istb: false, activeName: "", tableDatafile: [ @@ -2715,6 +2765,7 @@ kinship: [] }, organdecision: [], + organdecisionOther: "", // 鍏朵粬閫夐」鐨勫叿浣撴弿杩� kinship: [], ethicform: { infoid: null @@ -2722,7 +2773,8 @@ kinshiplist: ["閰嶅伓", "鐖朵翰", "姣嶄翰", "瀛愬コ", "鍙楁墭浜�"], organselection: [ "鑲濊剰", - "鍙岃偩鑴�", + "宸﹁偩", + "鍙宠偩", "蹇冭剰", "鑲鸿剰", "鑳拌吅", @@ -2826,6 +2878,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" } ], @@ -2835,7 +2902,36 @@ residenceaddress: [ { 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" } + ], + selfwill: [ + { required: true, message: "璇烽�夋嫨鏈汉鎰忔効", trigger: "blur" } + ], + registerAddresss: [ + { required: true, message: "璇疯緭鍏ョ幇鎵�鍦ㄥ湴", trigger: "blur" } + ], + familyrelations: [ + { required: true, message: "璇烽�夋嫨浜插睘涓庢崘鐚�呭叧绯�", trigger: "blur" } + ], + infosources: [ + { required: true, message: "璇烽�夋嫨淇℃伅鏉ユ簮", trigger: "blur" } + ], idcardno: [ { required: true, message: "璇锋纭緭鍏ヨ瘉浠跺彿鐮�", trigger: "blur" } ], @@ -2892,7 +2988,7 @@ education: [ { required: true, message: "瀹跺睘鑱旂郴鐢佃瘽涓嶄负绌�", trigger: "blur" } ], - occupation: [ + occupation: [ { required: true, message: "瀹跺睘鑱旂郴鐢佃瘽涓嶄负绌�", trigger: "blur" } ], signfamilyrelations: [ @@ -2975,9 +3071,36 @@ 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: { + loadRowData(row, treeNode, resolve) { + // 鍙湁褰撹灞曞紑鎴栭渶瑕佹椂鎵嶅畬鏁存覆鏌撳唴閮ㄧ粍浠� + this.$set(row, "loaded", true); + resolve(); + }, // 鑾峰彇涓昏〃鍙婇檮灞炴暟鎹� Getbasicinformation() { // 宸︿晶娴佺▼鏁版嵁 @@ -3065,7 +3188,9 @@ if (response.code == 200 && response.rows[0]) { this.affirmform = response.rows[0]; if (this.affirmform.organdecision) { - this.organdecision = this.affirmform.organdecision.split(","); + this.organdecision = this.affirmform.organdecision + .split(",") + .flatMap(item => (item === "鍙岃偩鑴�" ? ["宸﹁偩", "鍙宠偩"] : item)); } if (this.affirmform.kinship) { this.kinship = this.affirmform.kinship.split(","); @@ -3244,6 +3369,8 @@ this.$refs["form"].validate(valid => { console.log("鎻愪氦鐨勬暟鎹滑锛�", this.form); if (valid) { + console.log(112); + this.form.birthday = this.$moment(this.form.birthday).format( "YYYY-MM-DD HH:mm:ss" ); @@ -3330,6 +3457,8 @@ } }); } + } else { + this.$modal.msgError("鍓嶉儴娼滃湪鎹愮尞琛ㄥ崟淇℃伅鏈夌己婕忚鎺掓煡鍚庨噸鏂颁繚瀛�"); } }); }, @@ -3358,6 +3487,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) { @@ -3567,6 +3699,75 @@ }); } }, + + customOrganSort() { + console.log("璋冪敤"); + + // 1. 鍔犻攣锛岄樆姝㈢洃鍚櫒鎵ц + this.isSorting = true; + this.loading = 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; + this.loading = 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