1
lzhe
2025-07-08 1289e8c4d0a88a1d1ca192a4d126f1ee033d8bb9
src/views/wel/index.vue
@@ -19,7 +19,7 @@
      @row-click="rowClick"
    >
      <template #menu-left>
        <el-button :size="size" type="primary" @click="showAdd()">新增节点</el-button>
        <el-button :size="size" type="primary" @click="showAdd()">新增根节点</el-button>
      </template>
      <template #name="{ row }">
        <span>{{row.name}}</span>
@@ -27,7 +27,7 @@
        <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" icon="el-icon-pie-chart" type="primary" @click="upgrade(row)" placeholder="升级" title="升级"></el-button>
        <el-button :size="size" text v-if="row.nodeType == 70" icon="el-icon-pie-chart" type="primary" @click="upgrade(row)" placeholder="升级" title="升级"></el-button>
        <el-button :size="size" text v-if="row.nodeType == 60 && !isSM" icon="el-icon-position" type="primary" @click="downsend(row)" placeholder="下发" title="下发"></el-button>
      </template>
    </avue-crud>
@@ -42,7 +42,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-for="item in fileList" v-if="fileList.length > 0" class="fileListStyle">
            <span>{{item.name}}</span>
            <span class="delFile" @click="delFile(item)">X</span>
@@ -56,6 +56,7 @@
export default {
  data() {
    return {
      fileContent: "",
      isSM: false,  //是否是涉密网 ,工控网5个,涉密网4个
      isShowTabs: true,
      nodeTypeList: [],
@@ -153,7 +154,16 @@
          },
          {
            label: '设备(机床)',
            prop: 'abc'
            prop: 'machineCode',
            type: 'select',
            dicUrl: '/blade-mdm/machine/page',
            props: {
              label: 'machineGroupName',
              value: 'machineGroupCode',
            },
            dicFormatter(res) {
              return res.data.records;
            }
          },
          {
            label: '节点名称',
@@ -161,7 +171,7 @@
          },
          {
            label: '节点描述',
            prop: 'abc',
            prop: 'description',
            hide: true
          },
          {
@@ -218,7 +228,7 @@
          },
          {
            label: '设备',
            prop: 'abc'
            prop: 'machineCode'
          },
          {
            label: '固化状态',
@@ -263,6 +273,41 @@
              value: 'dictKey',
            },
            disabled: true
          },
          {
            label: '设备编号',
            prop: 'machineCode',
            type: 'select',
            dicUrl: '/blade-mdm/machine/page',
            props: {
              label: 'machineGroupName',
              value: 'machineGroupCode',
            },
            dicFormatter(res) {
              return res.data.records;
            }
          },
          {
            label: '零组件号/图号',
            prop: 'drawingNo'
          },
          {
            label: '工序',
            prop: 'processName'
          },
          {
            label: '工序版本',
            prop: 'processEdition'
          },
          {
            label: '节点分类',
            prop: 'category',
            type: 'select',
            dicUrl: '/blade-system/dict-biz/dictionary?code=node_file_type',
            props: {
              label: 'dictValue',
              value: 'dictKey',
            }
          },
          {
            label: '选择文件',
@@ -358,13 +403,13 @@
    getFile(id) { //查看文件内容
      this.loading = true;
      axios({
        url: '/blade-mdm/program/ncfile/content',
        url: '/blade-mdm/program/ncfile/content-by-nodeid',
        method: 'get',
        params: {id},
        params: {nodeId:id},
      }).then(
        res => {
          this.loading = true;
          console.log(res.data,123)
          this.loading = false;
          this.fileContent = res.data.data;
        }
      );
    },
@@ -409,7 +454,7 @@
    },
    showAdd (row) {  //新增子节点
      if(!row) {
        this.modalTitle = "新增节点";
        this.modalTitle = "新增根节点";
        this.modalForm.nodeType = "10";
        this.modalForm.parentId = 0;
      }else {
@@ -457,6 +502,10 @@
      );
    },
    addLocalTreeNode(parentId) {
      if(this.modalTitle == "新增根节点") {
        this.onLoad();
        return;
      }
      this.loading = true;
      var obj = {parentId: parentId}
      axios({
@@ -571,9 +620,9 @@
        this.nodeTypeList = res.data.data;
      }
    );
    //判断版本  0:涉密网,1:工控网;//工控网5个,涉密网4个
    axios({url: '/blade-system/param/detail?paramKey=networkType',method: 'get'}).then(res => {
        if(res.data.data.paramValue === "0") {
    //判断版本  0:涉密网,1:工控网;//工控网5个,涉密网4个
    axios({url: '/blade-mdm/system/param/getValue?paramKey=networkType',method: 'get'}).then(res => {
        if(res.data.data === "0") {
          this.isSM = true;
        }
      }