From 79531dbafa3fc50341ac6978a0fe9352508732a5 Mon Sep 17 00:00:00 2001
From: 赵士淞 <zhaoss@yhzhg.cn>
Date: Tue, 21 Mar 2023 02:43:47 +0000
Subject: [PATCH] 项目负责人更改为多人
---
eladmin-web-master/src/views/project/project/index.vue | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/eladmin-web-master/src/views/project/project/index.vue b/eladmin-web-master/src/views/project/project/index.vue
index 40cfd6d..ffd0219 100644
--- a/eladmin-web-master/src/views/project/project/index.vue
+++ b/eladmin-web-master/src/views/project/project/index.vue
@@ -180,7 +180,7 @@
<el-date-picker v-model="form.planEndDate" type="date" :picker-options="pickerOptionsEnd" placeholder="选择日期" style="width: 200px;" />
</el-form-item>
<el-form-item label="责任人">
- <el-select v-model="form.liableUserId" clearable filterable placeholder="请选择" style="width: 200px;">
+ <el-select v-model="form.liableUserIdList" clearable filterable multiple placeholder="请选择" style="width: 200px;">
<el-option
v-for="item in userList"
:key="item.id"
@@ -392,7 +392,7 @@
import moneyInput from '@/views/assembly/moneyInput/index.vue'
import constant from '@/utils/constant'
-const defaultForm = { id: null, name: null, projectTypeId: null, projectDistinguish: null, requirement: null, unitCurrency: null, performanceObjectives: null, quotationPrice: null, performancePrice: null, contractPrice: null, liableUserId: null, planStartDate: null, planEndDate: null, projectStatus: null, approveStatus: null, remarks: null, createBy: null, createTime: null, updateBy: null, updateTime: null }
+const defaultForm = { id: null, name: null, projectTypeId: null, projectDistinguish: null, requirement: null, unitCurrency: null, performanceObjectives: null, quotationPrice: null, performancePrice: null, contractPrice: null, liableUserId: null, liableUserIdList: [], planStartDate: null, planEndDate: null, projectStatus: null, approveStatus: null, remarks: null, createBy: null, createTime: null, updateBy: null, updateTime: null }
export default {
name: 'Project',
components: { pagination, crudOperation, rrOperation, udOperation, moneyInput },
@@ -710,6 +710,16 @@
projectId: data.id
}
})
+ },
+ // 钩子:提交 - 之前
+ [CRUD.HOOK.beforeSubmit]() {
+ // 责任人ID
+ this.form.liableUserId = null
+ // 循环责任人ID列表
+ for (let i = 0; i < this.form.liableUserIdList.length; i++) {
+ // 责任人ID
+ this.form.liableUserId = this.form.liableUserId === null ? '-' + this.form.liableUserIdList[i] + '-' : this.form.liableUserId + ',' + '-' + this.form.liableUserIdList[i] + '-'
+ }
}
}
}
--
Gitblit v1.9.3