|
@@ -92,7 +92,7 @@
|
|
|
<el-input type="number" v-model="currentForm.nodeOrder" placeholder="请输入审核顺序" :disabled="false" />
|
|
<el-input type="number" v-model="currentForm.nodeOrder" placeholder="请输入审核顺序" :disabled="false" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="审核人" prop="approver">
|
|
<el-form-item label="审核人" prop="approver">
|
|
|
- <el-select v-model="currentForm.approver" placeholder="请选择审核人" filterable >
|
|
|
|
|
|
|
+ <el-select v-model="currentForm.approver" multiple placeholder="请选择审核人" filterable >
|
|
|
<el-option v-for="item in userList" :key="item.userId" :label="item.userName" :value="item.userId" />
|
|
<el-option v-for="item in userList" :key="item.userId" :label="item.userName" :value="item.userId" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
<!-- <div style="display: flex; align-items: center; gap: 10px">
|
|
<!-- <div style="display: flex; align-items: center; gap: 10px">
|
|
@@ -226,6 +226,7 @@ export default {
|
|
|
listUser(this.queryUserParams).then(response => {
|
|
listUser(this.queryUserParams).then(response => {
|
|
|
this.userList = response.rows;
|
|
this.userList = response.rows;
|
|
|
this.userTotal = response.total;
|
|
this.userTotal = response.total;
|
|
|
|
|
+
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -366,7 +367,8 @@ export default {
|
|
|
// this.queryUserParams.userId = row.approver;
|
|
// this.queryUserParams.userId = row.approver;
|
|
|
this.approverOptions = [];
|
|
this.approverOptions = [];
|
|
|
this.getUserList();
|
|
this.getUserList();
|
|
|
- this.currentForm.approver = row.approver;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ this.currentForm.approver = row.approverList;
|
|
|
this.currentForm.nodeOrder = row.nodeOrder;
|
|
this.currentForm.nodeOrder = row.nodeOrder;
|
|
|
this.currentForm.id = row.id;
|
|
this.currentForm.id = row.id;
|
|
|
// getConfig(id).then(response => {
|
|
// getConfig(id).then(response => {
|
|
@@ -381,14 +383,21 @@ export default {
|
|
|
submitForm() {
|
|
submitForm() {
|
|
|
this.$refs["currentForm"].validate(valid => {
|
|
this.$refs["currentForm"].validate(valid => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
|
+ // 创建表单副本,避免直接修改原始数据
|
|
|
|
|
+ const submitForm = { ...this.currentForm };
|
|
|
|
|
+ console.log("123123");
|
|
|
|
|
+ // 如果 approval 是数组,转换为逗号分隔的字符串
|
|
|
|
|
+ if (Array.isArray(submitForm.approver)) {
|
|
|
|
|
+ submitForm.approver = submitForm.approver.join(',');
|
|
|
|
|
+ }
|
|
|
if (this.currentForm.id != null) {
|
|
if (this.currentForm.id != null) {
|
|
|
- updateConfig(this.currentForm).then(response => {
|
|
|
|
|
|
|
+ updateConfig(submitForm).then(response => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
this.open = false;
|
|
|
this.getList();
|
|
this.getList();
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
- addConfig(this.currentForm).then(response => {
|
|
|
|
|
|
|
+ addConfig(submitForm).then(response => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
this.open = false;
|
|
|
this.getList();
|
|
this.getList();
|