修复保存异常问题
This commit is contained in:
@@ -282,15 +282,7 @@
|
||||
class="input"
|
||||
disabled
|
||||
></el-input> -->
|
||||
<el-button
|
||||
class="primary"
|
||||
type="primary"
|
||||
@click="
|
||||
detailsDialog = true;
|
||||
type = 14;
|
||||
value = inquire.whiteErbanNoProductionRatioMap;
|
||||
"
|
||||
>
|
||||
<el-button class="primary" type="primary" @click="detailsClick">
|
||||
查看详情</el-button
|
||||
>
|
||||
</div>
|
||||
@@ -477,7 +469,7 @@ export default {
|
||||
type: null,
|
||||
// 详情
|
||||
detailsTable: [],
|
||||
whiteErbanNoProductionRatioMap:null,
|
||||
whiteErbanNoProductionRatioMap: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -501,11 +493,20 @@ export default {
|
||||
userId: key,
|
||||
val: obj[key],
|
||||
}));
|
||||
var newArr = [];
|
||||
arr.forEach((res, i) => {
|
||||
this.detailsTable[i] = res;
|
||||
this.newArr[i] = res;
|
||||
});
|
||||
this.detailsTable = newArr;
|
||||
});
|
||||
},
|
||||
// 查看详情按钮
|
||||
detailsClick() {
|
||||
this.getData();
|
||||
this.detailsDialog = true;
|
||||
this.type = 14;
|
||||
// this.value = inquire.whiteErbanNoProductionRatioMap;
|
||||
},
|
||||
// 详情新增按钮
|
||||
addDetail() {
|
||||
this.detailsTable.unshift([]);
|
||||
@@ -517,13 +518,24 @@ export default {
|
||||
// 详情确认保存按钮
|
||||
sevaDetail() {
|
||||
var map = {};
|
||||
var lock = true;
|
||||
this.detailsTable.forEach((res) => {
|
||||
if (res.userId == (undefined || "") || res.val == undefined || "") {
|
||||
lock = false;
|
||||
}
|
||||
map[res.userId] = res.val;
|
||||
});
|
||||
console.log(map);
|
||||
this.type = 14;
|
||||
this.whiteErbanNoProductionRatioMap = map;
|
||||
this.editDialogClick();
|
||||
if (lock) {
|
||||
this.editDialogClick();
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "用户ID和值不能为空",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
},
|
||||
// 详情编辑监听
|
||||
handleEdit(index, row) {
|
||||
@@ -581,7 +593,8 @@ export default {
|
||||
} else if (this.type == 11) {
|
||||
obj.followErbanNoList = this.value.split(",");
|
||||
} else if (this.type == 14) {
|
||||
obj.whiteErbanNoProductionRatioMap = this.whiteErbanNoProductionRatioMap;
|
||||
obj.whiteErbanNoProductionRatioMap =
|
||||
this.whiteErbanNoProductionRatioMap;
|
||||
} else if (this.type == 13) {
|
||||
obj.blackErbanNoList = this.value.split(",");
|
||||
}
|
||||
|
Reference in New Issue
Block a user