1
李喆(开发组)
2025-07-31 54b1233ba127cfde66bf04365097f53a071960d4
src/views/wel/index.vue
@@ -38,8 +38,8 @@
        <span>{{row.name}}</span>
        <el-button :size="size" text v-if="row.nodeType != 70" icon="el-icon-setting" type="primary" placeholder="修改" @click="showEdit(row)" title="修改"></el-button>
        <el-button :size="size" text icon="el-icon-delete" type="primary" @click="showDel(row)" placeholder="删除" title="删除"></el-button>
        <el-button :size="size" text v-if="row.nodeType < 60" icon="el-icon-document-add" type="primary" @click="showAdd(row)" placeholder="新增子级" title="新增子级"></el-button>
        <el-button :size="size" text v-if="row.nodeType == 60" icon="el-icon-upload" type="primary" @click="showUpload(row)" placeholder="文件上传" title="文件上传"></el-button>
        <el-button :size="size" text v-if="row.nodeType != 60 && row.nodeType != 70" icon="el-icon-document-add" type="primary" @click="showAdd(row)" placeholder="新增子级" title="新增子级"></el-button>
        <el-button :size="size" text v-if="row.nodeType == 60 || row.nodeType == 50" icon="el-icon-upload" type="primary" @click="showUpload(row)" placeholder="文件上传" title="文件上传"></el-button>
        <!-- 涉密网才有 -->
        <el-button :size="size" text v-if="row.nodeType == 70 && isSM" icon="el-icon-pie-chart" type="primary" @click="upgrade(row)" placeholder="升版" title="升版"></el-button>
        <!-- 工控网才有 -->
@@ -64,7 +64,7 @@
    <avue-form v-if="tabsType == 'tab1'" :option="tabsFormOption" v-model="tabsForm"></avue-form>
    <span v-else-if="tabsType == 'tab2'">版本信息</span>
    <template v-else-if="tabsType == 'tab3'">
        {{fileContent}}
        <div v-html="convertToHtml(fileContent)"></div>
    </template>
    <el-dialog title="升版" append-to-body v-model="upgradeModal" width="500">
      <avue-form :option="upgradeModalOption" v-model="upgradeModalForm" @submit="upgradeSubmit" @reset-change="upgradeCancel"></avue-form>
@@ -183,7 +183,7 @@
        menuPosition: "right",
        column: [
          {
            label: '节点类型',
            label: '节点类型1',
            prop: 'nodeType',
            labelWidth: "120",
            type: 'select',
@@ -468,6 +468,9 @@
    }
  },
  methods: {
    convertToHtml(text) {
        return text.replace(/\r\n/g, '<br>');
    },
    removeHasChildren(treeData) {  //查询时候使用,删掉hasChildren 
      return treeData.map(node => {
        if (node.children && node.children.length > 0) {
@@ -642,7 +645,7 @@
          this.tabsForm.nodeTypeName = item.dictValue;
        }
      })
      if(this.tabsForm.nodeType < 70) {
      if(this.tabsForm.nodeType != 70) {
        this.tabsOption = this.tabsOption1;
      }else {
        this.tabsOption = this.tabsOption2;
@@ -714,14 +717,20 @@
    showAdd (row) {  //新增子节点
      if(!row) {
        this.modalTitle = "新增根节点";
        this.modalForm.nodeType = "10";
        this.modalForm.nodeType = this.nodeTypeList[0].dictKey;
        this.modalForm.parentId = 0;
      }else {
        if(row.nodeType == 60) {
        if(row.nodeType == 60) { //程序包
          return;
        }
        var defalutNodeType = "";  //下一级节点类型
        for(var i=0;i<this.nodeTypeList.length;i++) {
          if(row.nodeType == this.nodeTypeList[i].dictKey) {
            defalutNodeType = this.nodeTypeList[i+1].dictKey;
          }
        }
        this.modalTitle = "新增子节点";
        this.selectedColumn.nodeType = String(Number(row.nodeType) + 10);
        this.selectedColumn.nodeType = defalutNodeType;
        this.selectedColumn.parentId = row.id;
        this.selectedColumn.name = "";
        this.selectedColumn.id = "";