|
@@ -2968,14 +2968,21 @@ export default {
|
|
|
res.data.data.forEach((element) => {
|
|
|
element.dictKey = Number(element.dictKey);
|
|
|
});
|
|
|
- this.standardTypeOptions = res.data.data;
|
|
|
+ // 定义要过滤的 dictKey 值
|
|
|
+ const targetKeys = [1, 2, 3, 4];
|
|
|
+ // 过滤数组
|
|
|
+ const filteredOptions = res.data.data.filter((item) =>
|
|
|
+ targetKeys.includes(item.dictKey)
|
|
|
+ );
|
|
|
+
|
|
|
+ this.standardTypeOptions = filteredOptions;
|
|
|
});
|
|
|
},
|
|
|
changeStandType(val) {
|
|
|
let parentId = "";
|
|
|
this.standardTypeOptions.forEach((item) => {
|
|
|
if (item.dictKey == val) {
|
|
|
- parentId = item.parentId; // 找到匹配项,提取 parentId
|
|
|
+ parentId = item.id; // 找到匹配项,提取 parentId
|
|
|
}
|
|
|
});
|
|
|
|