小小儁爺
2024-10-23 afbc6a6d68513c6d3e40108f37e580c510bfcf9a
src/views/materialManager/unitList.vue
@@ -338,7 +338,7 @@
      mainHeight: 0,
      tableHeight: 0,
      form: {
        tunittype: '', // 单计量(S) 多计量(M)
        tunittype: 'S', // 单计量(S) 多计量(M)
        tunitgroupcode: '', // 计量单位组编码
        prop: 'isGroup', // 排序字段
        order: 'asc', // 排序字段
@@ -379,13 +379,17 @@
    }
  },
  activated() {   window.addEventListener('resize', this.getHeight)   this.getHeight() }, created() {
  activated() {
    window.addEventListener('resize', this.getHeight)
    this.getHeight()
  },
  created() {
  },
  mounted() {
    window.addEventListener('resize', this.getHeight)
    this.getHeight()
    this.handleGetApi('')
    this.handleGetApi('S')
  },
  methods: {
    async handleGetApi(code) {
@@ -400,14 +404,15 @@
      }
    },
    async getTUnitGroup(code) {
      const { data: res } = await TUnitGroup()
      // const { data: res } = await TUnitGroup()
      this.treeLeft = [
        {
          code: '', name: '全部', children: [
            { code: 'S', name: '单计量' },
            { code: 'M', name: '多计量', children: res }
          ]
          code: 'S', name: '计量单位'
          // , children: [
          //   { code: 'S', name: '计量单位' }
          //   // { code: 'M', name: '多计量', children: res }
          // ]
        }
      ]
      this.$nextTick(() => {