zouyu
2023-09-11 cb44cab30ca6b51d4488c66d7db911deecf4dbea
src/components/view/standard.vue
@@ -16,11 +16,11 @@
      <div class="left">
        <el-input v-model="search" suffix-icon="el-icon-search" placeholder="请输入搜索内容" size="small" clearable></el-input>
        <el-tree :data="list" ref="tree" :default-expand-all="true" :props="{ children: 'children', label: 'name' }"
        <el-tree :data="list" ref="tree" default-expand-all :props="{ children: 'children', label: 'name' }"
          node-key="id" :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current>
          <div class="custom-tree-node" slot-scope="{ node, data }">
            <span><i :class="`node_i ${data.code != '[5]' ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i>
              {{ data.name }}</span>
              {{ data.code }}{{ data.name }}</span>
            <el-button type="text" size="mini" @click.stop="remove(node, data)">
              <i class="el-icon-delete"></i>
            </el-button>
@@ -73,7 +73,7 @@
    <div class="bom-add-model">
      <el-dialog title="BOM新增" :visible.sync="bomAddModelVisible" width="30%">
        <el-form>
        </el-form>
        <span slot="footer" class="dialog-footer">
          <el-button @click="bomAddModelVisible = false">取 消</el-button>
@@ -119,8 +119,8 @@
  //   }
  // },
  mounted() {
    this.tableType=0
    this.selectMaterialTree()
    // this.selectAll()
    this.selectVersion()
  },
  methods: {
@@ -155,7 +155,7 @@
    TYPE(val) {//类型.数据
      console.log(val);
      this.typeselect = val
      // console.log(this.typeselect);
      this.selectVersion()
    },
@@ -163,8 +163,8 @@
      console.log(val);
      this.returntree = val
    },
    selectVersion() {//版本
      this.$axios.get(this.$api.url.selectVersion, {
    async selectVersion() {//版本
      let v=await this.$axios.get(this.$api.url.selectVersion, {
        params: {
          specificationsId: this.returntree.id,
          type: this.typeselect,
@@ -174,8 +174,13 @@
        this.version = this.verdata.map(el => {
          return el = `v${el}`
        })
        console.log(this.verdata);
        // console.log("版本");
        return this.verdata[0]
      })
      this.character=v
      this.VER="v"+v
      console.log(this.character);
      this.selectAll()
    },
    //右侧数据
    selectAll() {
@@ -205,8 +210,8 @@
    },
    //五级树
    selectMaterialTree() {
      this.$axios.get(this.$api.url.selectTreeByMaterial).then(res => {
        this.list = res.data
      this.$axios.get(this.$api.url.selectTreeByMaterial).then( res => {
        _that.list = res.data
        this.list.forEach((el, idx, arr) => {
          if (idx == 0) {
            arr[idx].name = '成品'