Merge remote-tracking branch 'origin/master'
| | |
| | | }, |
| | | onDefault(defaultId) { |
| | | this.dataForm.srcId = defaultId |
| | | this.dataForm.productType = 2 |
| | | this.dataForm.productType = '1' |
| | | this.activeName = 'first' |
| | | this.$refs.tableObj.query() |
| | | this.$nextTick(() => { |
| | | this.$refs.tableObj.query() |
| | | }) |
| | | }, |
| | | dataLoaded(data) { |
| | | this.dataList = data |
| | |
| | | <el-table-column prop="lineNumber" label="错误行数"/> |
| | | </el-table> |
| | | </el-form> |
| | | <!--<template slot="footer">--> |
| | | <!--<zt-button type="primary" style="float:left" @click="exportExcelModel()">导出Excel导入模板</zt-button>--> |
| | | <!--</template>--> |
| | | </zt-dialog> |
| | | </template> |
| | | |
| | |
| | | } |
| | | ) |
| | | } else { |
| | | clearInterval(this.timer) |
| | | } |
| | | } |
| | | } |
| | |
| | | url: `${window.SITE_CONFIG['apiURL']}/sysPictureBase/getSvgImage?token=${Cookies.get('token')}&id=`, |
| | | productType: '', |
| | | shipId: '', |
| | | namePath:'', |
| | | dataForm: { |
| | | name: '', |
| | | type: '', |
| | |
| | | this.$refs.SelectTyModel.$refs.dialog.init(null, { |
| | | type: this.dataForm.type, |
| | | id: this.dataForm.pid, |
| | | shipId: this.shipId |
| | | shipId: this.shipId, |
| | | namePath: this.namePath |
| | | }) |
| | | } else { |
| | | this.$refs.AddOrUpdate.$refs.dialog.init(null, {id: null, type: 'zt', pid: this.dataForm.pid}) |
| | |
| | | this.dataForm.pid = data.id |
| | | this.dataForm.type = data.productType |
| | | this.productType = data.productType |
| | | this.namePath = data.namePath |
| | | if (data.productType !== '10') { |
| | | this.$refs.tableObj.query() |
| | | } |
| | |
| | | }, |
| | | onDefault(defaultId) { |
| | | this.dataForm.pid = defaultId |
| | | this.dataForm.type = 2 |
| | | this.productType = 2 |
| | | this.dataForm.type = 1 |
| | | this.productType = 1 |
| | | this.$refs.tableObj.query() |
| | | }, |
| | | } |
| | |
| | | }, |
| | | mounted() { |
| | | this.getProductList() |
| | | |
| | | }, |
| | | components: { |
| | | ProductModelTree, |
| | |
| | | }, |
| | | autoResize: true, |
| | | history: true, |
| | | // panning: { |
| | | // enabled: true, |
| | | // }, |
| | | scroller: { |
| | | enabled: true, |
| | | pageVisible: true, |
| | |
| | | }, |
| | | // anchor: 'center', |
| | | connectionPoint: 'anchor', |
| | | allowBlank: false, |
| | | snap: { |
| | | radius: 20, |
| | | }, |
| | |
| | | zIndex: 0, |
| | | }) |
| | | }, |
| | | // validateConnection({targetMagnet}) { |
| | | // return !!targetMagnet |
| | | // }, |
| | | }, |
| | | highlighting: { |
| | | magnetAdsorbed: { |
| | |
| | | rowHeight: 100, |
| | | }, |
| | | }) |
| | | document.getElementById('stencil').appendChild(stencil.container) |
| | | Graph.registerNode( |
| | | 'custom-rect', |
| | | { |
| | |
| | | }, |
| | | ports: { |
| | | ...this.ports |
| | | // items: [ |
| | | // { |
| | | // group: 'top', |
| | | // }, |
| | | // { |
| | | // group: 'bottom', |
| | | // }, |
| | | // ], |
| | | }, |
| | | }, |
| | | true, |
| | | ) |
| | | // |
| | | Graph.registerNode( |
| | | 'custom-circle', |
| | | { |
| | | inherit: 'ellipse', |
| | | width: 120, |
| | | height: 120, |
| | | data: { |
| | | dataId: '', |
| | | finishDate: '' |
| | | }, |
| | | attrs: { |
| | | body: { |
| | | strokeWidth: 1, |
| | | stroke: '#5F95FF', |
| | | fill: '#EFF4FF', |
| | | }, |
| | | //日期 |
| | | title: { |
| | | text: '', |
| | | fontSize: 12, |
| | | fill: '#262626', |
| | | refX: 0.5, |
| | | refY: '100%', |
| | | refY2: -10, |
| | | textAnchor: 'middle', |
| | | textVerticalAnchor: 'bottom', |
| | | }, |
| | | // 名称 |
| | | text: { |
| | | // fontFamily: '仿宋', |
| | | fontSize: 20, |
| | | fill: '#262626', |
| | | textWrap: { |
| | | width: 80, // 宽度为 80px换行 |
| | | ellipsis: false, // 文本超出显示范围时,自动添加省略号 |
| | | breakWord: true, // 是否截断单词 |
| | | } |
| | | }, |
| | | }, |
| | | markup: [ |
| | | { |
| | | tagName: 'ellipse', |
| | | selector: 'body', |
| | | }, |
| | | { |
| | | tagName: 'text', |
| | | selector: 'title', |
| | | }, |
| | | { |
| | | tagName: 'text', |
| | | selector: 'text', |
| | | }, |
| | | ], |
| | | ports: {...this.ports}, |
| | | }, |
| | | true, |
| | | ) |
| | | Graph.registerNode( |
| | | 'custom-circle1', |
| | | { |
| | | inherit: 'ellipse', |
| | | width: 65, |
| | | height: 65, |
| | | data: { |
| | | dataId: '', |
| | | finishDate: '' |
| | | }, |
| | | attrs: { |
| | | body: { |
| | | strokeWidth: 1, |
| | | stroke: '#5F95FF', |
| | | fill: '#EFF4FF', |
| | | }, |
| | | //日期 |
| | | text: { |
| | | // fontFamily: '仿宋', |
| | | fontSize: 12, |
| | | text: '日期节点', |
| | | fill: '#262626', |
| | | }, |
| | | }, |
| | | ports: {...this.ports}, |
| | | }, |
| | | true, |
| | | ) |
| | |
| | | }) |
| | | |
| | | this.graph.on('blank:click', ({cell}) => { |
| | | // this.reset() |
| | | // this.type.value = "grid" |
| | | this.type = 'grid' |
| | | // this.id = cell.id |
| | | }) |
| | | |
| | | this.graph.on('cell:click', ({cell}) => { |
| | |
| | | // 单击node节点 |
| | | this.graph.on('node:click', ({node}) => { |
| | | // this.reset() |
| | | if (node.getData().dataId) { |
| | | this.dialogVisible2 = true |
| | | let param = { |
| | | id: node.getData().dataId, |
| | | modelName: node.attr('label/textWrap/text'), |
| | | } |
| | | this.$nextTick(() => { |
| | | this.$refs.rbdEditImg.init(param) |
| | | }) |
| | | } |
| | | node.attr('line/stroke', '#5F95FF') |
| | | node.prop('labels/0', { |
| | | attrs: { |
| | | body: { |
| | | stroke: '#5F95FF', |
| | | }, |
| | | }, |
| | | }) |
| | | }) |
| | | // 控制连接桩显示/隐藏 |
| | | this.graph.on('node:delete', ({view, e}) => { |
| | |
| | | if (res.data !== null && res.data.content != null) { |
| | | this.dataForm = res.data |
| | | this.diagramJson = JSON.parse(this.dataForm.content) |
| | | // console.log(this.dataForm.content,'this.Diagram content') |
| | | console.log(this.diagramJson, 'this.Diagram json') |
| | | this.graph.fromJSON(this.diagramJson) |
| | | // this.graph.centerContent() |
| | | // this.graph.zoomToFit() |
| | | } else { |
| | | this.dataForm.id = null |
| | | // await this.$alert('该项目还未编制网络图', '提示', { |
| | | // confirmButtonText: '确定' |
| | | // }) |
| | | this.graph.fromJSON(this.emptyJson) |
| | | // this.graph.centerContent() |
| | | // this.graph.zoomToFit() |
| | | // this.graph.freeze() |
| | | } |
| | | }, |
| | | init() { |
| | |
| | | }) |
| | | } |
| | | }, |
| | | // translating: { |
| | | // restrict(view) { |
| | | // const cell = view.cell |
| | | // if (cell.isNode()) { |
| | | // const parent = cell.getParent() |
| | | // if (parent) { |
| | | // return parent.getBBox() |
| | | // } |
| | | // } |
| | | // |
| | | // return null |
| | | // }, |
| | | // }, |
| | | onToolItemCreated({tool}) { |
| | | const handle = tool |
| | | const options = handle.options |
| | |
| | | text: '' |
| | | } |
| | | }, |
| | | // position: { |
| | | // distance: 0.5, |
| | | // angle: 180, |
| | | // options: { |
| | | // keepGradient: true, |
| | | // ensureLegibility: true |
| | | // } |
| | | // } |
| | | }], |
| | | zIndex: 0, |
| | | }) |