1
lzhe
2025-07-08 561224d0c6ea8767766a8114ce15c98e31b6a0d9
src/views/wel/index.vue
@@ -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: [],
@@ -100,7 +101,7 @@
          },
          {
            label: '创建人',
            prop: 'createUser',
            prop: 'createUserName',
            disabled: true,
            placeholder: " "
          },
@@ -153,7 +154,16 @@
          },
          {
            label: '设备(机床)',
            prop: 'abc'
            prop: 'machineCode',
            type: 'select',
            dicUrl: '/blade-mdm/machine/page',
            props: {
              label: 'name',
              value: 'code',
            },
            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: '固化状态',
@@ -238,7 +248,7 @@
          },
          {
            label: '创建人',
            prop: 'createUser',
            prop: 'createUserName',
            width: '180'
          }
        ],
@@ -263,6 +273,41 @@
              value: 'dictKey',
            },
            disabled: true
          },
          {
            label: '设备编号',
            prop: 'machineCode',
            type: 'select',
            dicUrl: '/blade-mdm/machine/page',
            props: {
              label: 'name',
              value: 'code',
            },
            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;
        }
      );
    },
@@ -575,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;
        }
      }