|
|
@@ -100,6 +100,20 @@
|
|
|
if (!Array.isArray(val)) return;
|
|
|
this.seekListRow = val.slice(0, this.maxLength);
|
|
|
this.deboListRow = val.slice(this.maxLength);
|
|
|
+ // 初始化默认值
|
|
|
+ const defaults = {};
|
|
|
+ val.forEach((item) => {
|
|
|
+ if (
|
|
|
+ item.defaultValue !== undefined &&
|
|
|
+ item.defaultValue !== null &&
|
|
|
+ item.defaultValue !== ''
|
|
|
+ ) {
|
|
|
+ defaults[item.value] = item.defaultValue;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (Object.keys(defaults).length) {
|
|
|
+ this.defaultWhere = { ...defaults, ...this.defaultWhere };
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
defaultWhere: {
|
|
|
@@ -120,6 +134,9 @@
|
|
|
if (cache) {
|
|
|
this.defaultWhere = JSON.parse(cache);
|
|
|
this.search();
|
|
|
+ } else if (Object.keys(this.defaultWhere).length) {
|
|
|
+ // 无缓存但有默认值(如 approvalStatus 默认 2),主动触发一次查询
|
|
|
+ this.search();
|
|
|
}
|
|
|
},
|
|
|
|