value
2023-08-24 d94af68ec3f6317124df81296b08c7c110641fca
src/views/standardLibrary/index.vue
@@ -201,11 +201,10 @@
  methods: {
    filterNode(value, data) {
      if (!value) return true;
      return data.label.indexOf(value) !== -1;
      return data.name.indexOf(value) !== -1;
    },
    // 获取bom树的标准数据
    async getStandardTree() {
      console.log(`output->执行力`, "执行力");
      const { data } = await getMaterialList();
      this.standardTree = data.map((item) => {
        let name = null;
@@ -228,14 +227,11 @@
      const treeOptions = JSON.parse(JSON.stringify(this.standardTree));
      this.getDefault(treeOptions, 0);
      this.formTypeOptions = treeOptions;
      console.log(`output->===========`, "===========");
      this.$nextTick().then(() => {
        const firstNode = document.querySelector(
          ".el-tree-node .el-tree-node__children .el-tree-node .el-tree-node__children .el-tree-node .el-tree-node__children .el-tree-node"
        );
        console.log(`output->firstNode`, firstNode);
        firstNode.click();
        // console.log(firstNode);
      });
    },
    getDefault(arr, index) {
@@ -254,10 +250,8 @@
      // 是子节点
      if (node.level === 4) {
        this.getParentData(node.parent, node.data.name);
        console.log(`output->this.msg`, this.msg);
        // 存下选中节点
        this.selectData = data;
        // eslint-disable-next-line prefer-const
        this.getTableByClick(data);
      }
      if (!("children" in data)) {
@@ -289,7 +283,6 @@
          }
        });
        this.tableData = res.data;
        console.log(`output->this.tableData`, this.tableData);
        this.selectDataList();
      });
    },
@@ -361,7 +354,6 @@
      this.getTableByClick(this.selectData);
    },
    changeCascader(data) {
      console.log(`output->----------`, data);
      this.addTreeForm.addTypeArr = data;
    },
    closeAddTreeForm() {
@@ -422,7 +414,6 @@
      } else {
        this.deleteList.splice(0, this.deleteList.length);
      }
      console.log(`output->this.`, this.deleteList);
    },
    //选择某行
    selectTr(selection, row) {
@@ -458,7 +449,6 @@
          }
        });
      }
      console.log(`output->this.deleteList`, this.deleteList);
    },
    //递归子级
    toggleSelect(data, flag, type) {