1
李喆(开发组)
昨天 7e4c95dee70b72cf582e086816589cbd776d8af4
src/views/wel/index.vue
@@ -57,14 +57,14 @@
</template>
<script>
import { ElMessage } from 'element-plus';
export default {
  data() {
    return {
      upgradeModal: false,
      file: null,
      fileContent: "",
      isSM: false,  //是否是涉密网 ,工控网5个,涉密网4个
      isSM: true,  //是否是涉密网 ,工控网5个,涉密网4个
      isShowTabs: true,
      nodeTypeList: [],
      fileList: [],
@@ -175,8 +175,7 @@
              label: 'dictValue',
              value: 'dictKey',
            },
            disabled: true,
            display: false
            disabled: true
          },
          {
            label: '设备(机床)',
@@ -496,6 +495,9 @@
      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]);
      });
@@ -504,11 +506,33 @@
        url: '/blade-mdm/program/ncfile/upload',
        method: 'post',
        data: formData,
      }).then(
        res => {
      }).then(res => {
          this.loading = false;
          this.uploadmodalBox = false;
          this.addLocalTreeNode(row.id);  //重新加载下一级
          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();
        }
      );
@@ -606,11 +630,6 @@
        this.selectedColumn.name = "";
        this.selectedColumn.id = "";
        this.modalForm = this.selectedColumn;
      }
      if(this.modalForm.nodeType == 20) {
        this.modalOption.column[0].display = true;
      }else {
        this.modalOption.column[0].display = false;
      }
      this.modalBox = true;
    },
@@ -728,13 +747,13 @@
        this.nodeTypeList = res.data.data;
      }
    );
    //判断版本  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;
        }
      }
    );
    //判断版本  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;
    //     }
    //   }
    // );
  }
};
</script>