From d4b9b197632366be60796f059030394aef6802ea Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期日, 17 五月 2026 19:29:30 +0800
Subject: [PATCH] 专家类型多选
---
src/views/business/allocation/allocationInfo.vue | 89 +++++++++++++++++++++-----------------------
1 files changed, 43 insertions(+), 46 deletions(-)
diff --git a/src/views/business/allocation/allocationInfo.vue b/src/views/business/allocation/allocationInfo.vue
index 29b9bbe..c2106f3 100644
--- a/src/views/business/allocation/allocationInfo.vue
+++ b/src/views/business/allocation/allocationInfo.vue
@@ -12,7 +12,7 @@
<el-button
type="success"
@click="handleConfirmAllocation"
- :disabled="form.allocationStatus === '1'"
+ :disabled="form.allocationStatus == '1'"
:loading="confirmLoading"
>
纭鍒嗛厤
@@ -44,7 +44,7 @@
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
- :disabled="form.allocationStatus === '1'"
+ :disabled="form.allocationStatus == '1'"
/>
</el-form-item>
</el-col>
@@ -77,17 +77,17 @@
<div style="float: right;">
<el-tag
:type="
- form.allocationStatus === '1'
+ form.allocationStatus == '1'
? 'success'
- : form.allocationStatus === '2'
+ : form.allocationStatus == '2'
? 'danger'
: 'warning'
"
>
{{
- form.allocationStatus === "1"
+ form.allocationStatus == "1"
? "宸插垎閰�"
- : form.allocationStatus === "2"
+ : form.allocationStatus == "2"
? "浣滃簾"
: "鏈垎閰�"
}}
@@ -112,7 +112,7 @@
v-for="dict in dict.type.sys_Organ || []"
:key="dict.value"
:label="dict.value"
- :disabled="form.allocationStatus === '1'"
+ :disabled="form.allocationStatus == '1'"
>
{{ dict.label }}
</el-checkbox>
@@ -162,7 +162,7 @@
<el-input
v-model="scope.row.caseno"
placeholder="鍒嗛厤绯荤粺缂栧彿"
- :disabled="form.allocationStatus === '1'"
+ :disabled="form.allocationStatus == '1'"
/>
</template>
</el-table-column>
@@ -182,7 +182,7 @@
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="閫夋嫨鍒嗛厤鎺ユ敹鏃堕棿"
- :disabled="form.allocationStatus === '1'"
+ :disabled="form.allocationStatus == '1'"
/>
</template>
</el-table-column>
@@ -197,7 +197,7 @@
<el-input
v-model="scope.row.name"
placeholder="鍙椾綋濮撴皬"
- :disabled="form.allocationStatus === '1'"
+ :disabled="form.allocationStatus == '1'"
/>
</template>
</el-table-column>
@@ -233,7 +233,7 @@
clearable
v-model="scope.row.reallocationreason"
placeholder="璇疯緭鍏ヨ鏄�"
- :disabled="form.allocationStatus === '1'"
+ :disabled="form.allocationStatus == '1'"
/>
</template>
</el-table-column>
@@ -297,17 +297,17 @@
<span class="stat-value">
<el-tag
:type="
- form.allocationStatus === '1'
+ form.allocationStatus == '1'
? 'success'
- : form.allocationStatus === '2'
+ : form.allocationStatus == '2'
? 'danger'
: 'warning'
"
>
{{
- form.allocationStatus === "1"
+ form.allocationStatus == "1"
? "宸插垎閰�"
- : form.allocationStatus === "2"
+ : form.allocationStatus == "2"
? "浣滃簾"
: "鏈垎閰�"
}}
@@ -332,7 +332,7 @@
:loading="saveLoading"
:disabled="
!allocationData.serviceDonateorganList ||
- allocationData.serviceDonateorganList.length === 0
+ allocationData.serviceDonateorganList.length == 0
"
>
淇濆瓨鍒嗛厤璁板綍
@@ -505,7 +505,6 @@
id: undefined,
infoid: undefined,
donationcategory: "",
- recordstate: "",
caseNo: "",
donorno: "",
treatmenthospitalname: "",
@@ -535,9 +534,6 @@
],
diagnosisname: [
{ required: true, message: "鐤剧梾璇婃柇涓嶈兘涓虹┖", trigger: "blur" }
- ],
- recordstate: [
- { required: true, message: "璁板綍鐘舵�佷笉鑳戒负绌�", trigger: "change" }
]
},
// 鍒嗛厤璁板綍楠岃瘉瑙勫垯
@@ -645,7 +641,7 @@
methods: {
// 鏍规嵁瀛楀吀value鑾峰彇label
getOrganLabel(organValue) {
- const dictItem = this.organDict.find(item => item.value === organValue);
+ const dictItem = this.organDict.find(item => item.value == organValue);
return dictItem ? dictItem.label : organValue;
},
@@ -702,17 +698,14 @@
donateorganBaseinfoInfo(id);
try {
const response = await allocationList({ infoid });
- if (
- response.code === 200 &&
- response.data &&
- response.data.length > 0
- ) {
+ if (response.code == 200 && response.data && response.data.length > 0) {
const data = response.data[0];
+ data.allocationStatus = JSON.stringify(data.allocationStatus);
// 濉厖琛ㄥ崟鏁版嵁
Object.assign(this.form, data);
// 杞崲闄勪欢涓洪泦鍚�
- this.parseFilePatch(this.form.fileName);
+ this.parseFilePatch(this.form.fileName);
// 鍒濆鍖栭檮浠�
if (this.form.attachments) {
@@ -741,7 +734,7 @@
if (item.organname) {
const dictItem = this.organDict.find(
org =>
- org.label === item.organname ||
+ org.label == item.organname ||
(item.organname && item.organname.includes(org.label))
);
return dictItem ? dictItem.value : null;
@@ -881,7 +874,7 @@
let organName = this.getOrganLabel(organValue);
// 濡傛灉鏄�"鍏朵粬"鍣ㄥ畼涓旀湁杈撳叆鍊�
- if (organValue === "C01" && this.otherOrganInput) {
+ if (organValue == "C01" && this.otherOrganInput) {
organName = `鍏朵粬(${this.otherOrganInput})`;
}
@@ -902,7 +895,7 @@
// 鍖婚櫌閫夋嫨鍙樺寲
handleHospitalChange(row, hospitalNo) {
const hospital = this.hospitalList.find(
- item => item.hospitalNo === hospitalNo
+ item => item.hospitalNo == hospitalNo
);
if (hospital) {
row.transplantHospitalName = hospital.hospitalName;
@@ -942,7 +935,7 @@
},
// 鏋勫缓 filePatch 瀛楁
buildFilePatch() {
- if (!this.attachments || this.attachments.length === 0) {
+ if (!this.attachments || this.attachments.length == 0) {
return "";
}
return JSON.stringify(this.attachments);
@@ -962,23 +955,27 @@
serviceDonateorganList:
this.allocationData.serviceDonateorganList || []
};
- saveData.fileName=this.buildFilePatch();
+ if (
+ submitData.allocationStatus == 1 ||
+ !submitData.allocationStatus
+ ) {
+ submitData.allocationStatus = 2;
+ }
+ saveData.fileName = this.buildFilePatch();
saveData.serviceDonateorganList.forEach(item => {
item.baseid = this.form.id;
item.infoid = this.form.infoid;
});
- console.log(this.form.recordstate);
- this.form.recordstate = 1;
const apiMethod = this.form.id ? allocationedit : allocationadd;
const response = await apiMethod(saveData);
- if (response.code === 200) {
+ if (response.code == 200) {
this.$message.success("淇濆瓨鎴愬姛");
- if (!this.form.id && response.data && response.data.id) {
- this.form.id = response.data.id;
- this.$router.replace({
- query: { ...this.$route.query, id: this.form.id }
- });
+ if (!this.form.id && response.data) {
+ this.form.id = response.data;
+ // this.$router.replace({
+ // query: { ...this.$route.query, id: this.form.id }
+ // });
}
} else {
this.$message.error("淇濆瓨澶辫触锛�" + (response.msg || "鏈煡閿欒"));
@@ -1009,7 +1006,7 @@
const response = await allocationedit(saveData);
- if (response.code === 200) {
+ if (response.code == 200) {
this.$message.success("鍒嗛厤璁板綍淇濆瓨鎴愬姛");
} else {
this.$message.error(
@@ -1037,7 +1034,7 @@
})
.then(async () => {
this.confirmLoading = true;
- this.form.allocationStatus = "1";
+ this.form.allocationStatus = "3";
this.form.allocationTime = new Date()
.toISOString()
.replace("T", " ")
@@ -1053,7 +1050,7 @@
const response = await allocationedit(saveData);
- if (response.code === 200) {
+ if (response.code == 200) {
this.$message.success("鍣ㄥ畼鍒嗛厤宸插畬鎴�");
} else {
this.$message.error(
@@ -1084,7 +1081,7 @@
handleAttachmentRemove(file) {
if (file.url) {
const index = this.attachments.findIndex(
- item => item.path === file.url || item.fileUrl === file.url
+ item => item.path == file.url || item.fileUrl == file.url
);
if (index > -1) {
this.attachments.splice(index, 1);
@@ -1095,7 +1092,7 @@
/** 涓婁紶鎴愬姛澶勭悊 */
handleUploadSuccess({ file, fileList, response }) {
- if (response.code === 200) {
+ if (response.code == 200) {
const attachmentObj = {
fileName: file.name,
path: response.fileUrl || file.url,
@@ -1224,7 +1221,7 @@
/** 鏍煎紡鍖栨枃浠跺ぇ灏� */
formatFileSize(bytes) {
- if (!bytes || bytes === 0) return "0 B";
+ if (!bytes || bytes == 0) return "0 B";
const k = 1024;
const sizes = ["B", "KB", "MB", "GB"];
const i = Math.floor(Math.log(bytes) / Math.log(k));
--
Gitblit v1.9.3