| | |
| | | </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: [], |
| | |
| | | label: 'dictValue', |
| | | value: 'dictKey', |
| | | }, |
| | | disabled: true, |
| | | display: false |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: '设备(机床)', |
| | |
| | | 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]); |
| | | }); |
| | |
| | | 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(); |
| | | } |
| | | ); |
| | |
| | | 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; |
| | | }, |
| | |
| | | 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> |