loulijun2021
2023-09-19 803e43f2bf21fc9ba86a157e2e25d86c57a4868f
src/views/basicSettings/storageList.vue
@@ -63,7 +63,13 @@
        >
          <div class="bodyTopButtonGroup" style="justify-content: space-between">
            <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
            <el-button v-waves type="success" icon="el-icon-download" @click="$router.push('./../systemSetting/dataImport?fileCode=7')">导入</el-button>
            <el-button
              v-waves
              type="success"
              icon="el-icon-download"
              @click="$router.push('./../systemSetting/dataImport?fileCode=7')"
            >导入
            </el-button>
          </div>
          <div class="bodyTopFormGroup">
@@ -658,7 +664,18 @@
    stckcodeChange(val) {
      this.dialogForm.parentlocacode = ''
      this.parentlocacodeArr = this.treeLeftArr.filter(i => i.idparent === val)
      const res = this.recursiveLookupArray([], val)// 递归查找数组
      this.parentlocacodeArr = res
    },
    recursiveLookupArray(newArr, val) {
      const temp = this.treeLeftArr.filter(i => i.idparent === val)
      if (temp.length > 0 && temp) {
        temp.forEach(i => {
          newArr.push(i)
          this.recursiveLookupArray(newArr, i.code)
        })
      }
      return newArr
    },
    // 递归取子集的所有code