finish 基本完成质量检查信息+DialogJustForm
This commit is contained in:
@@ -153,6 +153,11 @@ export default {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
this.configs.extraFields.forEach((cnf) => {
|
||||
dataForm[cnf.prop] = cnf.default ?? null;
|
||||
});
|
||||
|
||||
return {
|
||||
loadingStatus: false,
|
||||
dataForm,
|
||||
@@ -375,6 +380,25 @@ export default {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
this.configs.extraFields.forEach((cnf) => {
|
||||
if (cnf.listenTo) {
|
||||
console.log("set watcher for: ", cnf.prop);
|
||||
const unwatch = this.$watch(
|
||||
() => this.dataForm[cnf.listenTo.prop],
|
||||
(carId) => {
|
||||
console.log("do watcher for: ", cnf.prop);
|
||||
if (!carId) return;
|
||||
if (cnf.disableWatcherOnEdit && this.editMode) return;
|
||||
cnf.listenTo.handler.call(this, this.cachedList[cnf.listenTo.prop], carId);
|
||||
},
|
||||
{
|
||||
immediate: false,
|
||||
}
|
||||
);
|
||||
this.watchList.push(unwatch);
|
||||
}
|
||||
});
|
||||
},
|
||||
computed: {
|
||||
uploadHeaders() {
|
||||
|
||||
Reference in New Issue
Block a user