|
@@ -14,6 +14,7 @@
|
|
|
v-model="list1SearchGroupDictKey"
|
|
|
placeholder="搜索工序分组"
|
|
|
clearable
|
|
|
+ filterable
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="dict in dictsArray"
|
|
@@ -337,11 +338,11 @@ const list1SearchStr = ref("");
|
|
|
const list1SearchGroupDictKey = ref("");
|
|
|
const showList = computed(() => {
|
|
|
let array = _.cloneDeep(list1.value);
|
|
|
- if (list1SearchGroupDictKey.value) {
|
|
|
- array = array.filter((item) => {
|
|
|
- return item.workSection === list1SearchGroupDictKey.value;
|
|
|
- });
|
|
|
- }
|
|
|
+ // if (list1SearchGroupDictKey.value) {
|
|
|
+ // array = array.filter((item) => {
|
|
|
+ // return item.workSection === list1SearchGroupDictKey.value;
|
|
|
+ // });
|
|
|
+ // }
|
|
|
|
|
|
array.forEach((item) => {
|
|
|
item.baseOperationList = item.baseOperationList.filter((op) => {
|
|
@@ -419,7 +420,7 @@ const cancelInfo = () => {
|
|
|
});
|
|
|
};
|
|
|
const loadTreeData = () => {
|
|
|
- processTreeList().then((res) => {
|
|
|
+ processTreeList(list1SearchGroupDictKey.value).then((res) => {
|
|
|
list1.value = res.data ?? [];
|
|
|
filterDicts();
|
|
|
});
|
|
@@ -429,17 +430,19 @@ const loadTreeData = () => {
|
|
|
const dictsArray = ref([]);
|
|
|
// 从dicts?.workshop_section筛选出list1中返回的字典值,用于最上方的选择框
|
|
|
const filterDicts = () => {
|
|
|
- const workSectionArray = list1.value.map((item) => {
|
|
|
- return item.workSection;
|
|
|
- });
|
|
|
+ dictsArray.value = dicts?.process_type ?? [];
|
|
|
|
|
|
- const arr = [];
|
|
|
- dicts?.workshop_section?.forEach((item) => {
|
|
|
- if (workSectionArray.includes(item?.dictValue)) {
|
|
|
- arr.push(_.cloneDeep(item));
|
|
|
- }
|
|
|
- });
|
|
|
- dictsArray.value = arr;
|
|
|
+ // const workSectionArray = list1.value.map((item) => {
|
|
|
+ // return item.workSection;
|
|
|
+ // });
|
|
|
+ //
|
|
|
+ // const arr = [];
|
|
|
+ // dicts?.workshop_section?.forEach((item) => {
|
|
|
+ // if (workSectionArray.includes(item?.dictValue)) {
|
|
|
+ // arr.push(_.cloneDeep(item));
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // dictsArray.value = arr;
|
|
|
};
|
|
|
|
|
|
const cancelStatus = ref(true);
|
|
@@ -502,6 +505,13 @@ watch(
|
|
|
});
|
|
|
}
|
|
|
);
|
|
|
+
|
|
|
+watch(
|
|
|
+ () => list1SearchGroupDictKey.value,
|
|
|
+ () => {
|
|
|
+ loadTreeData();
|
|
|
+ }
|
|
|
+);
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|