diff --git a/business-css/frontend/src/assets/table/u419_disabled.png b/business-css/frontend/src/assets/table/del_disabled.png similarity index 100% rename from business-css/frontend/src/assets/table/u419_disabled.png rename to business-css/frontend/src/assets/table/del_disabled.png diff --git a/business-css/frontend/src/components/antvx6/viewx6.vue b/business-css/frontend/src/components/antvx6/viewx6.vue index 56d4cdb..0fe0658 100644 --- a/business-css/frontend/src/components/antvx6/viewx6.vue +++ b/business-css/frontend/src/components/antvx6/viewx6.vue @@ -72,46 +72,49 @@ function getScenarioResults(){ }) } function addAttrText(item:any){ - // item.attrs.text = item.deviceInfo.name graph.addNode({ + shape: 'rect-text', x: item.position.x , y: item.position.y + 150, width: 100, height: 40, - label: item.deviceInfo.name, attrs: { body: { stroke: 'transparent', fill: 'transparent', strokeWidth: 1, }, - text: { - text: '', + label: { + textAnchor: 'left', + refX: 0, + text: item.deviceInfo.name, fill: '#363636', fontSize: 16, - }, + } }, }) - graph.addNode({ + shape: 'rect-text', x: item.position.x , y: item.position.y + 180, width: 100, height: 30, - label: 'keff:' + item.scenarioResults[item.scenarioResults.length - 1].keffValue, attrs: { body: { stroke: 'transparent', fill: 'transparent', strokeWidth: 1, }, - text: { - text: '', + label: { + textAnchor: 'left', + refX: 0, + text: 'keff:' + item.scenarioResults[item.scenarioResults.length - 1].keffValue, fill: item.scenarioResults[item.scenarioResults.length - 1].keffValue > 0.98 ? '#ff4d4f' : '#363636', fontSize: 14, - }, + } }, }) + graph.addNode({ shape: 'image-node', x: item.position.x + 135 , @@ -230,6 +233,7 @@ function appendAttrText(item:any,data:any){ for(let i = 0;i { }, true, ) -// Graph.registerNode( -// 'image-echarts', -// { -// inherit: 'rect', -// width: 120, -// height: 60, -// markup: [ -// { -// tagName: 'rect', -// selector: 'body', -// }, -// { -// tagName: 'image', -// selector: 'img', -// }, -// { -// tagName: 'text', -// selector: 'label', -// }, -// ], -// attrs: { -// body: { -// stroke: 'transparent', -// strokeWidth: 1, -// fill: 'transparent', -// rx: 6, -// ry: 6, -// }, -// img: { -// 'xlink:href': 'https://gw.alipayobjects.com/zos/antfincdn/FLrTNDvlna/antv.png', -// width: 24, -// height: 24, -// x: 0, -// y: 0, -// }, -// label: { -// text: 'Image Node', -// fill: '#333', -// fontSize: 12, -// refX: 0.5, -// refY: 0.5, -// textAnchor: 'middle', -// dy: 10, -// }, -// }, -// }, -// true, -// ) + Graph.registerNode( + 'rect-text', + { + inherit: 'rect', + width: 120, + height: 60, + markup: [ + { + tagName: 'rect', + selector: 'body', + }, + { + tagName: 'image', + selector: 'img', + }, + { + tagName: 'text', + selector: 'label', + }, + ], + attrs: { + body: { + stroke: 'transparent', + strokeWidth: 1, + fill: 'transparent', + rx: 6, + ry: 6, + }, + label: { + text: '', + fill: '#333', + fontSize: 12, + refX: 0.5, + refY: 0.5, + textAnchor: 'middle', + dy: 10, + }, + '.': { + class: 'custom-image-node', + }, + }, + }, + true, +) + + + + + + projectsById({projectId:route.query.projectId}).then((res:any) => { if(res.topology != null && res.topology != ''){ projectInfo.value = res @@ -590,6 +596,7 @@ onMounted(() => { customImageData.value.push(topology.designData[i]) } } + console.log(topology.designData) graph.fromJSON(topology.designData); getScenarioResults() } @@ -647,7 +654,8 @@ function isDisplayClick(){ isDisplay.value = false let tempGraph:any = graph.toJSON().cells for(let i = 0;i { - // item.segments.forEach((segment:any) => { - // segment.timeline.forEach((timeline:any) => { - // console.log(timeline) - // timelineList.value.push(timeline) - // }) - // }) - // }) let item = menuList.value[menuIndex.value] item.segments.forEach((segment:any) => { segment.timeline.forEach((timeline:any) => { @@ -293,7 +271,7 @@ function getDeviceInfo(e:any){ // 获取设备信息 :class="{'condition-item-active': index == menuIndex}" @click="menuClick(index)"> {{ item.label }} - + @@ -321,7 +299,9 @@ function getDeviceInfo(e:any){ // 获取设备信息
{{ item.segmentId }} - +
+ 新增分段 diff --git a/business-css/frontend/src/views/component/scenario/index.vue b/business-css/frontend/src/views/component/scenario/index.vue index 5dd735e..6b080ae 100644 --- a/business-css/frontend/src/views/component/scenario/index.vue +++ b/business-css/frontend/src/views/component/scenario/index.vue @@ -406,8 +406,10 @@ function changeShowResult(isShow:boolean){ // 切换显示结果模型 @click="resultClick(scope.row)" style="cursor: pointer; "> - +