| | |
| | | @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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | fileContent: "", |
| | | isSM: false, //是否是涉密网 ,工控网5个,涉密网4个 |
| | | isShowTabs: true, |
| | | nodeTypeList: [], |
| | |
| | | }, |
| | | { |
| | | label: '创建人', |
| | | prop: 'createUser', |
| | | prop: 'createUserName', |
| | | disabled: true, |
| | | placeholder: " " |
| | | }, |
| | |
| | | }, |
| | | { |
| | | label: '设备(机床)', |
| | | prop: 'abc' |
| | | prop: 'machineCode', |
| | | type: 'select', |
| | | dicUrl: '/blade-mdm/machine/page', |
| | | props: { |
| | | label: 'name', |
| | | value: 'code', |
| | | }, |
| | | dicFormatter(res) { |
| | | return res.data.records; |
| | | } |
| | | }, |
| | | { |
| | | label: '节点名称', |
| | |
| | | }, |
| | | { |
| | | label: '节点描述', |
| | | prop: 'abc', |
| | | prop: 'description', |
| | | hide: true |
| | | }, |
| | | { |
| | |
| | | }, |
| | | { |
| | | label: '设备', |
| | | prop: 'abc' |
| | | prop: 'machineCode' |
| | | }, |
| | | { |
| | | label: '固化状态', |
| | |
| | | }, |
| | | { |
| | | label: '创建人', |
| | | prop: 'createUser', |
| | | prop: 'createUserName', |
| | | width: '180' |
| | | } |
| | | ], |
| | |
| | | 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: '选择文件', |
| | |
| | | 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; |
| | | } |
| | | ); |
| | | }, |
| | |
| | | }, |
| | | showAdd (row) { //新增子节点 |
| | | if(!row) { |
| | | this.modalTitle = "新增节点"; |
| | | this.modalTitle = "新增根节点"; |
| | | this.modalForm.nodeType = "10"; |
| | | this.modalForm.parentId = 0; |
| | | }else { |
| | |
| | | ); |
| | | }, |
| | | addLocalTreeNode(parentId) { |
| | | if(this.modalTitle == "新增根节点") { |
| | | this.onLoad(); |
| | | return; |
| | | } |
| | | this.loading = true; |
| | | var obj = {parentId: parentId} |
| | | axios({ |
| | |
| | | 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; |
| | | } |
| | | } |