yangys
2025-09-25 e4c84d44e70e09ec6d69716bd6c722a953f980da
src/views/wel/shemi.vue
@@ -1,7 +1,7 @@
<template>
  <basic-container>
    <div class="norightmenu" v-if="!isSearch">
      <avue-crud :addBtn="false" :option="option" :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" :table-loading="loading" :data="treeData" ref="crud0"
      <avue-crud :addBtn="false" :option="option" :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" :table-loading="loading" :data="treeData" ref="crud"
        v-model:search="search" v-model:page="mypage" @current-change="currentChange" @size-change="sizeChange"
        @refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad" @row-click="rowClick">
        <template #search>
@@ -22,7 +22,7 @@
                  :value="item.value" /></el-select>
            </el-col>
            <el-col :span="6" class="search-data-flex">
              <span class="search-data-title">时间范围:</span>
              <span class="search-data-title">时间:</span>
              <el-date-picker v-model="searchTreeData.createTime" type="daterange" start-placeholder="开始时间"
                end-placeholder="结束时间" :size="size" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
                @change="createTimeChange" /><!--:disabled-date="disabledDate" 不需要禁用日期-->
@@ -36,29 +36,29 @@
                  style="margin-right: 6px;">
                  <Delete />
                </el-icon>清空</el-button>
              <el-button type="danger" @click="refresh('crud0')">重置表格</el-button>
              <el-button type="danger" @click="refresh()">返回目录</el-button>
            </el-col>
          </el-row>
        </template>
       
        <template #name="{ row }">
          <span>{{ row.name }}</span>
          <el-tag v-if="row.nodeType == 60" size="mini" effect="plain">v{{ row.versionNumber }}</el-tag>
          <el-tag v-if="row.nodeType == 60" style="margin-left:5px" size="mini" effect="plain">v{{ row.versionNumber }}</el-tag>
          <el-button icon="el-icon-download" @click="handleDownload(row)" class="treebtn" v-if="row.nodeType == 70" :size="size" text title="下载"></el-button>
          <el-button class="treebtn" :size="size" text v-if="permission.replace_button && row.nodeType == 60 && row.parentIds.indexOf('0,1,') > -1"
            icon="el-icon-switch" type="primary" @click="replacement(row)" placeholder="替换" title="替换"></el-button>
      <!---->
           <el-button icon="el-icon-unlock" class="treebtn" v-if="permission.lock_button && row.nodeType == 60 && row.parentIds.indexOf('0,2') > -1 && row.isLocked != 1"text type="primary" @click="showLockDlg(row)" placeholder="锁定" title="锁定"></el-button>
        
            <el-button icon="el-icon-lock" class="treebtn" :size="size" text
                v-if="permission.lock_button && row.nodeType == 60 && row.parentIds.indexOf('0,2') > -1 && row.isLocked == 1"
                v-if="permission.lock_button && row.nodeType == 60 && (row.parentIds.indexOf('0,2') > -1 || row.parentIds.indexOf('0,3') > -1)&& row.isLocked == 1"
              type="primary" @click="showUnLockDlg(row)" placeholder="解锁" title="解锁"></el-button>
           
        </template>
      </avue-crud>
    </div>
    <div class="norightmenu" v-else>
      <avue-crud :addBtn="false" :option="option" :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" :table-loading="loading" :data="treeData" ref="crud1"
      <avue-crud :addBtn="false" :option="option" :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" :table-loading="loading" :data="treeData" ref="crud"
        v-model:search="search" v-model:page="mypage" @current-change="currentChange" @size-change="sizeChange"
        @refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad" @row-click="rowClick">
        <template #search>
@@ -71,7 +71,7 @@
                <el-checkbox value="3" label="偏离" />
              </el-checkbox-group>
            </el-col>
            <el-col :span="4" class="search-data-flex">
            <el-col :span="6" class="search-data-flex">
              <span class="search-data-title">零组件号:</span>
              <el-select v-model="searchTreeData.drawingNo" clearable filterable remote reserve-keyword placeholder="输入至少3个字符过滤数据"
                :remote-method="remoteMethod" :loading="searchLoading">
@@ -79,12 +79,12 @@
                  :value="item.value" /></el-select>
            </el-col>
            <el-col :span="6" class="search-data-flex">
              <span class="search-data-title">时间范围:</span>
              <span class="search-data-title">时间:</span>
              <el-date-picker v-model="searchTreeData.createTime" type="daterange" start-placeholder="开始时间"
                end-placeholder="结束时间" :size="size" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
                @change="createTimeChange" /><!--:disabled-date="disabledDate" 不需要禁用日期-->
            </el-col>
            <el-col :span="8" class="search-data-flex">
            <el-col :span="6" class="search-data-flex">
              <el-button type="primary" @click="searchTree" :loading="treeSearchLoad"><el-icon class="el-icon--right"
                  style="margin-right: 6px;">
                  <Search />
@@ -93,7 +93,7 @@
                  style="margin-right: 6px;">
                  <Delete />
                </el-icon>清空</el-button>
                <el-button type="danger" @click="refresh('crud1')">重置表格</el-button>
                <el-button type="danger" @click="refresh()">返回目录</el-button>
            </el-col>
          </el-row>
        </template>
@@ -102,7 +102,8 @@
      </template> -->
        <template #name="{ row }">
          <span>{{ row.name }}</span>
          <el-tag v-if="row.nodeType == 60" size="mini" effect="plain">v{{ row.versionNumber }}</el-tag>
          <el-tag v-if="row.nodeType == 60" style="margin-left:5px" size="mini" effect="plain">v{{ row.versionNumber }}</el-tag>
          <el-button icon="el-icon-download" @click="handleDownload(row)" class="treebtn" v-if="row.nodeType == 70" :size="size" text title="下载"></el-button>
          <!-- 替换  v-if="permission.auto_dispatch"-->
          <el-button class="treebtn" :size="size" text v-if="permission.replace_button && row.nodeType == 60 && row.parentIds.indexOf('0,1,') > -1"
            icon="el-icon-switch" type="primary" @click="replacement(row)" placeholder="替换" title="替换"></el-button>
@@ -110,26 +111,11 @@
            v-if="permission.lock_button && row.nodeType == 60 && row.parentIds.indexOf('0,2') > -1 && row.isLocked != 1"
            icon="el-icon-unlock" type="primary" @click="showLockDlg(row)" placeholder="锁定" title="锁定"></el-button>
          <el-button class="treebtn" :size="size" text
            v-if="permission.lock_button && row.nodeType == 60 && row.parentIds.indexOf('0,2') > -1 && row.isLocked == 1"
            v-if="permission.lock_button && row.nodeType == 60 && (row.parentIds.indexOf('0,2') > -1 || row.parentIds.indexOf('0,3') > -1)&& row.isLocked == 1"
            icon="el-icon-lock" type="primary" @click="showUnLockDlg(row)" placeholder="解锁" title="解锁"></el-button>
        </template>
      </avue-crud>
    </div>
    <!-- 新增节点 -->
    <el-dialog :title="modalTitle" append-to-body v-model="modalBox">
      <avue-form :option="modalOption" v-model="modalForm" @submit="modalSubmit" @reset-change="modalCancel" />
    </el-dialog>
    <el-dialog title="上传文件" append-to-body v-model="uploadmodalBox">
      <avue-form :option="uploadmodalOption" v-model="uploadmodalForm" @submit="uploadmodalSubmit"
        @reset-change="uploadmodalCancel" :upload-before="uploadBefore" :upload-after="uploadAfter">
        <template #fileList="{ }" slot-scope="{ value }">
          <div v-for="(file, index) in fileList" :key="index" v-if="fileList.length != 0">
            {{ file.name }}
          </div>
          <div v-else>没有上传文件</div>
        </template>
      </avue-form>
    </el-dialog>
    <!-- 锁定对话框 -->
    <el-dialog title="程序锁定" append-to-body v-model="lockBox">
@@ -145,13 +131,36 @@
      <div v-html="convertToHtml(fileContent)" class="convertToHtml"></div>
    </template>
    <template v-else-if="tabsType == 'tab4'">
      <!--
      <avue-crud :addBtn="false" :option="tabsFormOption4" :data="tabsForm4" ref="crud4"
        @selection-change="selectionChange">
        <template #menu-left>
          <el-button :size="size" type="primary" @click="comparison"
            :disabled="selectionList.length != 2">对比</el-button>
        </template>
      </avue-crud>
          -->
      <el-table :data="tabsForm4" border :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" max-height="220" highlight-current-row>
            <el-table-column type="index" label="#" width="40" align="center" />
            <el-table-column prop="name" label="程序包名">
            </el-table-column>
            <el-table-column prop="versionNumber" label="程序版本">
            </el-table-column>
            <el-table-column prop="createTime" label="创建时间">
            </el-table-column>
            <el-table-column prop="createUserName" label="创建人">
            </el-table-column>
            <el-table-column fixed="right" label="操作" width="150" align="center">
                <template #default="scope">
                    <a style="color: blue;cursor: pointer;font-size: 12px;margin-right: 4px;" type="text" size="small"
                        @click.stop="showHisFileDlg(scope.$index, scope.row)">程序文件</a>
                </template>
            </el-table-column>
        </el-table>
    </template>
  </basic-container>
@@ -162,6 +171,23 @@
        :filename="codeDiffFileName1" :newFilename="codeDiffFileName2" />
    </div>
  </el-drawer>
  <el-dialog title="查看历史文件" append-to-body v-model="hisFileViewModel">
      <el-table :data="hisFileTableData" ref="hisFilesTable" border @row-click="showHisContent" max-height="200" highlight-current-row>
        <el-table-column type="index" label="#" width="40" align="center"/>
        <el-table-column prop="name" label="文件名称"></el-table-column>
        <el-table-column prop="createTime" label="创建时间" width="180"></el-table-column>
        <el-table-column fixed="right" label="操作" width="80" align="center">
            <template #default="scope">
                <a style="color: blue;cursor: pointer;font-size: 12px;margin-right: 4px;" type="text" size="small"
                    @click.stop="handleDownload(scope.row)">下载</a>
            </template>
        </el-table-column>
      </el-table>
      <h4>程序内容</h4>
      <div v-html="hisFileContent" class="app-content"></div>
  </el-dialog>
  <!-- 替换 -->
  <el-drawer title="替换" append-to-body v-model="replaceModel" size="100%" class="code-box">
    <div class="approve-box">
@@ -175,13 +201,16 @@
      </div>
    </div>
  </el-drawer>
</template>
<script>
import { Delete, Edit, Search, Share, Upload ,Lock,Unlock} from '@element-plus/icons-vue'
import debounce from 'lodash/debounce';
import NProgress from 'nprogress';
import { downloadXls } from '@/utils/util';
import { exportBlob } from '@/api/common';
import { ElMessage } from 'element-plus';
import ReplaceLeft from './components/ReplaceLeft.vue';
import ReplaceRightTop from './components/ReplaceRightTop.vue';
@@ -283,7 +312,7 @@
      fileContent: "",
      isShowTabs: true,
      nodeTypeList: [],
      fileList: [],
      tabsType: "tab1",
      tabsOption: {},
      tabsOption1: {
@@ -304,12 +333,25 @@
          icon: 'el-icon-warning',
          label: '文件内容',
          prop: 'tab3'
        }, {
        }
        ]
      },
      tabsOptionPackage: {
        column: [{
          icon: 'el-icon-info',
          label: '节点信息',
          prop: 'tab1',
        },
        {
          icon: 'el-icon-warning',
          label: '历史记录',
          prop: 'tab4'
        }]
      },
      hisFileViewModel: false,//历史文件列表对话框
      hisFileTableData:[], //历史文件列表数据
      hisFileContent:'',//历史文件内容
      tabsFormOption: {
        submitBtn: false,
        emptyBtn: false,
@@ -337,86 +379,20 @@
            prop: 'createTime',
            disabled: true,
            placeholder: " "
          },/*
          {
            label: '节点描述',
            prop: 'description',
            disabled: true,
            placeholder: " "
          },*/
          },
          {
            label: '修改时间',
            prop: 'updateTime',
            disabled: true,
            placeholder: " "
          }/*,
          {
            label: '备注',
            prop: 'remark',
            disabled: true,
            placeholder: " "
          }*/
        ]
      },
      tabsForm: {},
      uploadmodalBox: false,
      uploadmodalForm: {},
      selectedColumn: {},
      modalForm: {},
      modalOption: {
        submitText: "保存",
        emptyText: "取消",
        menuPosition: "right",
        column: [
          {
            label: '节点类型1',
            prop: 'nodeType',
            labelWidth: "120",
            type: 'select',
            dicUrl: '/blade-system/dict-biz/dictionary?code=nc_node_type',
            props: {
              label: 'dictValue',
              value: 'dictKey',
            },
            disabled: true
          },
          {
            label: '设备(机床)',
            prop: 'machineCode',
            labelWidth: "120",
            type: 'select',
            dicUrl: '/blade-mdm/machine/page',
            props: {
              label: 'name',
              value: 'code',
            },
            dicFormatter(res) {
              return res.data.records;
            }
          },
          {
            label: '节点名称',
            prop: 'name',
            labelWidth: "120",
          },
          {
            label: '节点描述',
            prop: 'description',
            labelWidth: "120",
            hide: true
          },
          {
            label: '备注',
            prop: 'remark',
            type: "textarea",
            labelWidth: "120",
            span: 24
          }
        ]
      },
      modalBox: false,
      modalTitle: "",
      tabsForm: {},
      selectedColumn: {},
      modalForm: {},
      lockOption: {
        submitText: "锁定",
        emptyText: "取消",
@@ -457,6 +433,7 @@
            label: '锁定原因',
            prop: 'remark',
            type: "textarea",
            placeholder:'<内容为空>',
            disabled:true,
            labelWidth: "120",
            span: 24,
@@ -481,6 +458,7 @@
        current: 1,
        total: 0,
      },
      /*
      tabsFormOption4: {
        rowKey: "id",
        selection: true,
@@ -495,7 +473,7 @@
          { label: '创建时间', prop: 'createTime' },
          { label: '创建人', prop: 'createUserName' },
        ]
      },
      },*/
      tabsForm4: {},
      defaultExpandedKeys: [],
      option: {
@@ -547,12 +525,7 @@
          {
            label: '类型',
            prop: 'nodeTypeName'
          },/*
          {
            label: '设备',
            prop: 'machineCode'
          },
          */
          {
            label: '锁定状态',
            prop: 'isLocked',
@@ -600,143 +573,11 @@
        ],
      },
      treeData: [],
      upData: []
    };
  },
  computed: {
    ...mapGetters(['userInfo', 'permission']),
    uploadmodalOption() {
      return {
        submitText: "保存",
        emptyText: "取消",
        menuPosition: "right",
        column: [
          {
            label: '节点类型',
            prop: 'nodeType',
            labelWidth: "120",
            type: 'select',
            dicUrl: '/blade-system/dict-biz/dictionary?code=nc_node_type',
            props: {
              label: 'dictValue',
              value: 'dictKey',
            },
            disabled: true
          },
          {
            label: '设备编号',
            prop: 'machineCode',
            labelWidth: "120",
            type: 'select',
            dicUrl: '/blade-mdm/machine/page',
            props: {
              label: 'name',
              value: 'code',
            },
            dicFormatter(res) {
              return res.data.records;
            },
            rules: [
              {
                required: true,
                message: '请输入设备编号',
                trigger: 'blur'
              }
            ]
          },
          {
            label: '零组件号/图号',
            prop: 'drawingNo',
            labelWidth: "120",
            rules: [
              {
                required: true,
                message: '请输入零组件号/图号',
                trigger: 'blur'
              }
            ]
          },
          {
            label: '工序',
            prop: 'processName',
            labelWidth: "120",
            rules: [
              {
                required: true,
                message: '请输入工序',
                trigger: 'blur'
              }
            ]
          },
          {
            label: '工序版本',
            prop: 'processEdition',
            labelWidth: "120",
            rules: [
              {
                required: true,
                message: '请输入工序版本',
                trigger: 'blur'
              }
            ]
          },
          {
            label: '文件分类',
            prop: 'category',
            labelWidth: "120",
            type: 'select',
            dicUrl: '/blade-system/dict-biz/dictionary?code=node_file_type',
            props: {
              label: 'dictValue',
              value: 'dictKey',
            },
            rules: [
              {
                required: true,
                message: '请选择文件分类',
                trigger: 'change'
              }
            ]
          },
          {
            label: '选择文件',
            prop: 'uploadFile',
            labelWidth: "120",
            type: 'upload',
            data: { nodeId: this.id },
            action: "",
            showFileList: false,
            span: 24,
            tip: "请上传文件,将在提交时统一处理",
            action: "/blade-mdm/program/ncfile/upload",
            rules: [
              {
                validator: (rule, value, callback) => {
                  if (this.fileList.length === 0) {
                    callback(new Error('请上传文件'));
                  } else {
                    callback();
                  }
                },
                trigger: 'blur'
              }
            ]
          },
          {
            label: '已上传文件',
            prop: 'fileList',
            labelWidth: "120"
          },
          {
            label: '备注',
            prop: 'remark',
            type: "textarea",
            labelWidth: "120",
            span: 24
          }
        ]
      }
    }
  },
  watch: {
@@ -787,14 +628,27 @@
          this.drawingNoList = drawingNoList;
        });
    },
    refresh(refname){
    refresh(){
      //表格重置
      this.treeData=[];
      //this.$refs[refname].doLayout();
      this.$refs[refname].refreshTable();
      //this.$refs.curd.refreshTable();
      let curS = this.isSearch;
      this.isSearch = null;
      this.onLoad();
      this.isSearch = !curS
    },
    handleDownload(row){
      NProgress.start();
      exportBlob(
          `/blade-mdm/program/nodehis/download-by-nodeid?nodeId=${row.id}`
      ).then(res => {
          if (res.status !== 200) {
              return this.$message.error(res.msg);
          }
          downloadXls(res.data, `${row.name}`);
          NProgress.done();
      });
    },
    showLockDlg(row){
      //this.lockForm = row;
@@ -854,7 +708,7 @@
        }).then(res => {
          if (res.data.code == 200) {
            this.$message({ type: 'success', message: '解锁流程已启动!' });
            this.addLocalTreeNode(row.parentId);
            //this.addLocalTreeNode(row.parentId);
            this.unlockBox = false;
          } else {
            this.$message({ type: 'error', message: res.data.msg });
@@ -936,6 +790,46 @@
        done();
      });
      
    },
    showHisFileDlg(index,row){
      this.hisFileViewModel = true;
      //查询文件列表
      axios({
        url: '/blade-mdm/program/nodehis/files-by-parent-id',
        method: 'get',
        params: {id: row.id}
      }).then(
      res => {
        if(res.data.code === 200) {
          this.hisFileTableData = res.data.data;
          if(this.hisFileTableData.length > 0){
            this.showHisContent(this.hisFileTableData[0])
            this.$refs.hisFilesTable.setCurrentRow(this.hisFileTableData[0]);
          }
        } else {
          this.$message.error('程序内容加载失败');
        }
      });
    },
    showHisContent(row, column, event) {
      axios({
        url: '/blade-mdm/program/nodehis/content-by-nodeid',
        method: 'get',
        params: {nodeId: row.id}
      }).then(
      res => {
        if(res.data.code === 200) {
            this.hisFileContent = res.data.data;
        } else {
            this.hisFileContent = '程序内容加载失败'
        }
      });
    },
    todoSelectionChange(applist) {
      this.applist = applist;
@@ -1071,64 +965,7 @@
        }
      );
    },
    uploadBefore(file, done, loading, column) {
      this.file = file;
      this.fileList.push(file);
      //done();  放开就上传了
      return false;
    },
    uploadAfter() {
    },
    uploadmodalSubmit(row, done) {  //上传提交接口
      if (this.file == null) {
        this.$message.error('请上传文件');
        return;
      }
      var formData = new FormData();
      formData.append('file', this.file);
      formData.append('nodeId', this.id);
      if (this.isRepeatUpload) {
        formData.append('cofirm', '1');
      }
      Object.keys(this.uploadmodalForm).forEach(key => {
        formData.append(key, this.uploadmodalForm[key]);
      });
      this.loading = true;
      axios({
        url: '/blade-mdm/program/ncfile/upload',
        method: 'post',
        data: formData,
      }).then(res => {
        this.loading = false;
        if (res.data.code == 2) {
          this.$confirm('文件名已存在,确定上传吗?', '提示', {
            distinguishCancelAndClose: true,
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          }).then(() => {
            this.isRepeatUpload = true;
            this.uploadmodalSubmit(row, done);
          }).catch(action => {
            this.isRepeatUpload = false;
            this.$message({
              type: 'info',
              message: '取消上传'
            })
          });
        } else if (res.data.success) {
          this.isRepeatUpload = false;
          this.uploadmodalBox = false;
          this.$message({ type: 'success', message: '操作成功!' });
          this.addLocalTreeNode(row.id);  //重新加载下一级
        } else {
          this.isRepeatUpload = false;
          alert(1)
        }
        done();
      }
      );
    },
    rowClick(row) {
      this.tabsForm = row;
      this.id = row.id;
@@ -1138,17 +975,22 @@
          this.tabsForm.nodeTypeName = item.dictValue;
        }
      })
      if (this.tabsForm.nodeType != 70) {
        this.tabsOption = this.tabsOption1;
      } else {
      if (this.tabsForm.nodeType == 60) {
        //包名节点
        this.tabsOption = this.tabsOptionPackage;
        //获取历史记录
        this.getHistory(row.id);
      } else if (this.tabsForm.nodeType == 70){
        //文件节点
        this.tabsOption = this.tabsOption2;
        //获取文件内容
        this.getFile(row.id);
        //获取历史记录
        this.getHistory(row.id);
        //清空对比记录
        this.content1 = "";
        this.content2 = "";
      }else{
        this.tabsOption = this.tabsOption1;
      }
      this.$nextTick(() => {
        this.tabsType = 'tab1';
@@ -1158,26 +1000,11 @@
    tabsHandleChange(tabs) {
      this.tabsType = tabs.prop;
    },
    showUpload(row) {//获取附件内容(暂时没用)
      this.fileList = [];
      this.uploadmodalForm = row;
      this.loading = true;
      var obj = { parentId: row.id }
      axios({
        url: '/blade-mdm/program/node/lazy-list',
        method: 'get',
        params: obj,
      }).then(
        res => {
          this.loading = false;
          this.uploadmodalBox = true;
        }
      );
    },
    getFile(id) { //查看文件内容
      this.loading = true;
      axios({
        url: '/blade-mdm/program/node/content-by-nodeid',
        url: '/blade-mdm/program/nodehis/content-by-nodeid',
        method: 'get',
        params: { nodeId: id },
      }).then(
@@ -1190,7 +1017,7 @@
    getHistory(id) {  //查看历史记录
      this.loading = true;
      axios({
        url: '/blade-mdm/program/node/history-by-nodeid',
        url: '/blade-mdm/program/nodehis/history-by-nodeid',
        method: 'get',
        params: { id },
      }).then(
@@ -1220,43 +1047,7 @@
    selectionChange(list) {
      this.selectionList = list;
    },
    showEdit(row, done) {
      this.modalTitle = "修改";
      this.modalBox = true;
      this.modalForm = row;
    },
    
    modalSubmit(row, done) {  //新增子节点保存/修改
      if (this.modalTitle == "修改") {
        var url = "/blade-mdm/program/node/update";
      } else {
        var url = "/blade-mdm/program/node/save";
      }
      //调用接口
      this.loading = true;
      axios({
        url,
        method: 'post',
        data: this.modalForm,
      }).then(
        res => {
          this.$message.success('操作成功');
          this.modalBox = false;
          // 修改,更新本地数据
          if (this.modalTitle === "修改") {
            this.addLocalTreeNode(row.parentId);
          } else {
            // 如果是新增操作,可能需要重新加载数据
            //this.$refs.crud.refreshTable();
            //this.onLoad();
            //新增,更新本地数据
            this.addLocalTreeNode(row.parentId);
          }
          this.loading = false;
          done(row);
        }
      );
    },
    addLocalTreeNode(parentId) {
      if (this.modalTitle == "新增根节点") {
        this.onLoad();
@@ -1274,17 +1065,12 @@
          if (parentId == 0) {
            this.treeData = [...children];
          } else {
            this.$refs.crud.$refs.table.store.states.lazyTreeNodeMap.value[parentId] = [...children];
          }
          this.loading = false;
        }
      );
    },
    modalCancel() {
      this.modalBox = false;
    },
    uploadmodalCancel() {
      this.uploadmodalBox = false;
    },
    treeLoad(tree, treeNode, resolve) {
      this.loading = true;