| | |
| | | <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 == 70 && !isSM" icon="el-icon-position" type="primary" @click="downsend(row)" placeholder="下发" title="下发"></el-button> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | </avue-form> |
| | | </el-dialog> |
| | | <avue-tabs :option="tabsOption" @change="tabsHandleChange" style="margin-top: 30px;" v-if="isShowTabs"></avue-tabs> |
| | | <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}} |
| | | </template> |
| | | <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}} |
| | | </template> |
| | | <el-dialog title="升版" append-to-body v-model="upgradeModal" width="500"> |
| | | <avue-form :option="upgradeModalOption" v-model="upgradeModalForm" @submit="upgradeSubmit" @reset-change="upgradeCancel"></avue-form> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | upgradeModal: false, |
| | | file: null, |
| | | fileContent: "", |
| | | isSM: false, //是否是涉密网 ,工控网5个,涉密网4个 |
| | |
| | | nodeTypeList: [], |
| | | fileList: [], |
| | | tabsType: "tab1", |
| | | upgradeModalForm: {}, |
| | | upgradeModalOption: { |
| | | emptyText: "取消", |
| | | menuPosition: "right", |
| | | column: [{ |
| | | label: '升版', |
| | | prop: 'processEdition', |
| | | labelWidth: "80", |
| | | span: 22 |
| | | }] |
| | | }, |
| | | tabsOption: {}, |
| | | tabsOption1: { |
| | | column: [{ |
| | |
| | | { |
| | | label: '节点类型', |
| | | prop: 'nodeType', |
| | | labelWidth: "120", |
| | | type: 'select', |
| | | dicUrl: '/blade-system/dict-biz/dictionary?code=nc_node_type', |
| | | props: { |
| | |
| | | { |
| | | label: '设备(机床)', |
| | | prop: 'machineCode', |
| | | labelWidth: "120", |
| | | type: 'select', |
| | | dicUrl: '/blade-mdm/machine/page', |
| | | props: { |
| | |
| | | }, |
| | | { |
| | | label: '节点名称', |
| | | prop: 'name' |
| | | prop: 'name', |
| | | labelWidth: "120", |
| | | }, |
| | | { |
| | | label: '节点描述', |
| | | prop: 'description', |
| | | labelWidth: "120", |
| | | hide: true |
| | | }, |
| | | { |
| | | label: '备注', |
| | | prop: 'remark', |
| | | type: "textarea", |
| | | labelWidth: "120", |
| | | span: 24 |
| | | } |
| | | ] |
| | |
| | | { |
| | | label: '节点类型', |
| | | prop: 'nodeType', |
| | | labelWidth: "120", |
| | | type: 'select', |
| | | dicUrl: '/blade-system/dict-biz/dictionary?code=nc_node_type', |
| | | props: { |
| | |
| | | { |
| | | label: '设备编号', |
| | | prop: 'machineCode', |
| | | labelWidth: "120", |
| | | type: 'select', |
| | | dicUrl: '/blade-mdm/machine/page', |
| | | props: { |
| | |
| | | }, |
| | | { |
| | | label: '零组件号/图号', |
| | | prop: 'drawingNo' |
| | | prop: 'drawingNo', |
| | | labelWidth: "120" |
| | | }, |
| | | { |
| | | label: '工序', |
| | | prop: 'processName' |
| | | prop: 'processName', |
| | | labelWidth: "120" |
| | | }, |
| | | { |
| | | label: '工序版本', |
| | | prop: 'processEdition' |
| | | prop: 'processEdition', |
| | | labelWidth: "120" |
| | | }, |
| | | { |
| | | label: '节点分类', |
| | | prop: 'category', |
| | | labelWidth: "120", |
| | | type: 'select', |
| | | dicUrl: '/blade-system/dict-biz/dictionary?code=node_file_type', |
| | | props: { |
| | |
| | | { |
| | | label: '选择文件', |
| | | prop: 'uploadFile', |
| | | labelWidth: "120", |
| | | type: 'upload', |
| | | data: {nodeId: this.id}, |
| | | action: "", |
| | |
| | | { |
| | | label: '文件列表', |
| | | prop: 'fileList', |
| | | labelWidth: "120" |
| | | }, |
| | | { |
| | | label: '备注', |
| | | prop: 'remark', |
| | | type: "textarea", |
| | | labelWidth: "120", |
| | | span: 24 |
| | | } |
| | | ] |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | upgradeSubmit(row,done) { //升版 |
| | | axios({ |
| | | url: '/blade-mdm/program/ncfile/upgrade-process-edition', |
| | | method: 'post', |
| | | data: {id:row.id,newProcessEdition: row.processEdition}, |
| | | }).then( |
| | | res => { |
| | | done(); |
| | | this.upgradeModal = false; |
| | | //this.$message.success('操作成功'); |
| | | } |
| | | ); |
| | | }, |
| | | upgradeCancel() { |
| | | this.upgradeModal = false; |
| | | }, |
| | | downsend(row) { //下发 |
| | | // this.loading = true; |
| | | // axios({ |
| | |
| | | // params: {nodeId:id}, |
| | | // }).then( |
| | | // res => { |
| | | |
| | | //this.loading = false; |
| | | // } |
| | | // ); |
| | | }, |
| | | upgrade(row) { //升级 |
| | | this.loading = true; |
| | | var obj = {id: row.id} |
| | | axios({ |
| | | url: '/blade-mdm/program/ncfile/upgrade-process-edition', |
| | | method: 'post', |
| | | data: obj, |
| | | }).then( |
| | | resp => { |
| | | this.$message.success('升级成功'); |
| | | } |
| | | ); |
| | | upgrade(row) { //升版 |
| | | this.upgradeModalForm = row; |
| | | this.upgradeModal = true; |
| | | }, |
| | | delFile(item) { |
| | | this.loading = true; |
| | |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .el-form-item__label { |
| | | width: 120px!important; |
| | | } |
| | | .delFile { |
| | | color: red; |
| | | margin-left: 12px; |