bugfix 料仓和料仓动态
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
<el-input v-if="col.input" v-model="dataForm[col.prop]" clearable :disabled="detailMode" v-bind="col.elparams" />
|
||||
<el-input v-if="col.forceDisabled && col.eraseOnSubmit" v-model="shadowDataForm[col.prop]" disabled v-bind="col.elparams" />
|
||||
<el-input v-if="col.forceDisabled && !col.eraseOnSubmit" v-model="dataForm[col.prop]" disabled v-bind="col.elparams" />
|
||||
<el-button type="" plain v-if="col.button" v-bind="col.elparams" style="width: 100%" @click="col.onClick(dataForm.id)">{{ col.label }}</el-button>
|
||||
<el-cascader
|
||||
v-if="col.cascader"
|
||||
v-model="dataForm[col.prop]"
|
||||
@@ -320,10 +321,10 @@ export default {
|
||||
if (res.data) this.dataForm = __pick(res.data, Object.keys(this.dataForm));
|
||||
else {
|
||||
this.$message({
|
||||
message: '后端返回的数据为 null',
|
||||
type: 'error',
|
||||
duration: 2000
|
||||
})
|
||||
message: "后端返回的数据为 null",
|
||||
type: "error",
|
||||
duration: 2000,
|
||||
});
|
||||
}
|
||||
/** 格式化文件上传列表 */
|
||||
if (Array.isArray(this.dataForm.files)) {
|
||||
@@ -363,8 +364,8 @@ export default {
|
||||
if ("autoUpdateProp" in col) {
|
||||
// 自动更新 相关联 的字段
|
||||
// console.log(col.options, eventValue, this.savedDatalist);
|
||||
const item = this.savedDatalist[col.prop].find(item => item.id === eventValue)
|
||||
this.shadowDataForm[col.autoUpdateProp] = item.cate ?? null
|
||||
const item = this.savedDatalist[col.prop].find((item) => item.id === eventValue);
|
||||
this.shadowDataForm[col.autoUpdateProp] = item.cate ?? null;
|
||||
}
|
||||
this.$forceUpdate();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user