zouyu
2023-09-11 6e367e4dc24da9085fc93556ee3a778119adebd9
src/components/view/standard.vue
@@ -55,17 +55,13 @@
        <div class="contentTable" v-if="this.typeselect == 0">
          <technology  :tableType="tableType" :tableData="tableData"></technology>
        </div>
        <div v-if="this.typeselect == 1">技术指标</div>
        <div v-if="this.typeselect == 1">
          <target :tableType="tableType" :tableData="tableData"></target>
        </div>
        <div v-if="this.typeselect == 2">
          <material  :tableType="tableType" :tableData="tableData"></material>
        </div>
        <div v-if="this.typeselect == 3">生产工艺</div>
        <!-- <div class="table">
          <technology v-if="tableData.length !== 0" :tableType="tableType" :tableData="tableData"></technology>
        </div> -->
        <!-- <div class="table">
          <technology v-if="tableData.length !== 0" :tableType="tableType" :tableData="tableData"></technology>
        </div> -->
      </div>
    </div>
@@ -87,9 +83,9 @@
<script>
import technology from "./standard-table/technology.vue"
import material from "./standard-table/material.vue"
import target from "./standard-table/target.vue"
export default {
  components: { technology,material },
  components: { technology,material,target },
  data() {
    return {
      // BOM树数据结构
@@ -155,7 +151,6 @@
    TYPE(val) {//类型.数据
      console.log(val);
      this.typeselect = val
      // console.log(this.typeselect);
      this.selectVersion()
    },
@@ -192,11 +187,18 @@
        }
      }).then(res => {
        let arr = res.data;
        for(var i=0;i<arr.length;i++){
            arr[i].id = "0" + i;
        }
        this.formatData(arr)
        this.tableData = arr;
      })
    },
    formatData(data){
      let arr = data;
      for(var i=0;i<arr.length;i++){
            arr[i].rowId = Math.random();
            if(arr[i].children != undefined){
              this.formatData(arr[i].children);
            }
        }
    },
    verevent(val) {
      console.log(val);
@@ -211,7 +213,7 @@
    //五级树
    selectMaterialTree() {
      this.$axios.get(this.$api.url.selectTreeByMaterial).then( res => {
        _that.list = res.data
        this.list = res.data
        this.list.forEach((el, idx, arr) => {
          if (idx == 0) {
            arr[idx].name = '成品'