|
@@ -7,7 +7,8 @@
|
|
|
<AbilityModal v-if="abModal" :abModal="abModal" :modelId="modelId" :iedType="iedType" @abilityBack="abilityBack">
|
|
<AbilityModal v-if="abModal" :abModal="abModal" :modelId="modelId" :iedType="iedType" @abilityBack="abilityBack">
|
|
|
</AbilityModal>
|
|
</AbilityModal>
|
|
|
<LineDouble v-if="ldModal" :ldModal="ldModal" :modelId="modelId" :startTarget="startTarget" :endTarget="endTarget"
|
|
<LineDouble v-if="ldModal" :ldModal="ldModal" :modelId="modelId" :startTarget="startTarget" :endTarget="endTarget"
|
|
|
- :numCase="numCase" :startText="startText" :endText="endText" :lineType="lineType" @lineBack="lineBack"></LineDouble>
|
|
|
|
|
|
|
+ :numCase="numCase" :startText="startText" :endText="endText" :lineType="lineType" @lineBack="lineBack">
|
|
|
|
|
+ </LineDouble>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -19,7 +20,7 @@ import cid from '@/api/cid/cid'
|
|
|
import systemRow from '@/api/systemRow';
|
|
import systemRow from '@/api/systemRow';
|
|
|
import flow from "@/api/flow/flow"
|
|
import flow from "@/api/flow/flow"
|
|
|
import { ElMessage } from 'element-plus';
|
|
import { ElMessage } from 'element-plus';
|
|
|
-import { useRouter } from 'vue-router';
|
|
|
|
|
|
|
+import { useRouter, useRoute } from 'vue-router';
|
|
|
import AbilityModal from "../drawModal/AbilityModal.vue"
|
|
import AbilityModal from "../drawModal/AbilityModal.vue"
|
|
|
import LineDouble from '../drawModal/LineDouble.vue';
|
|
import LineDouble from '../drawModal/LineDouble.vue';
|
|
|
import { DndPanel, SelectionSelect, Group, Menu, MiniMap, regeister, Snapshot, lfJson2Xml, lfXml2Json } from "@logicflow/extension";
|
|
import { DndPanel, SelectionSelect, Group, Menu, MiniMap, regeister, Snapshot, lfJson2Xml, lfXml2Json } from "@logicflow/extension";
|
|
@@ -67,6 +68,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
setup(props, { emit }) {
|
|
setup(props, { emit }) {
|
|
|
let router = useRouter()
|
|
let router = useRouter()
|
|
|
|
|
+ let route = useRoute()
|
|
|
const container = ref();
|
|
const container = ref();
|
|
|
const lf = ref();
|
|
const lf = ref();
|
|
|
let needColor = props.lineMenuColor
|
|
let needColor = props.lineMenuColor
|
|
@@ -127,8 +129,7 @@ export default {
|
|
|
if (res.data[0].relation_json == null || res.data[0].relation_json == '') return;
|
|
if (res.data[0].relation_json == null || res.data[0].relation_json == '') return;
|
|
|
const origiondata = JSON.parse(res.data[0].relation_json)
|
|
const origiondata = JSON.parse(res.data[0].relation_json)
|
|
|
lf.value.render(origiondata);
|
|
lf.value.render(origiondata);
|
|
|
- //let rl = lfXml2Json(res.data[0].relation_json.replace(/[\t|\r|\n]/gi,''))
|
|
|
|
|
- // console.log(rl)
|
|
|
|
|
|
|
+ console.log('watchRender');
|
|
|
for (let index = 0; index < origiondata.edges.length; index++) {
|
|
for (let index = 0; index < origiondata.edges.length; index++) {
|
|
|
const element = origiondata.edges[index];
|
|
const element = origiondata.edges[index];
|
|
|
if (element.properties != null && element.properties["issv"] === 'SV') {
|
|
if (element.properties != null && element.properties["issv"] === 'SV') {
|
|
@@ -216,15 +217,29 @@ export default {
|
|
|
function momal() {
|
|
function momal() {
|
|
|
lf.value.graphModel.moveNode2Coordinate(copyId.value, setX.value - 0, setY.value - 0, true);
|
|
lf.value.graphModel.moveNode2Coordinate(copyId.value, setX.value - 0, setY.value - 0, true);
|
|
|
}
|
|
}
|
|
|
|
|
+ function lastRender(){
|
|
|
|
|
+ modelId.value = route.query.modelid
|
|
|
|
|
+ cid.getModelInfo(modelId.value).then(res => {
|
|
|
|
|
+ if (res.data[0].relation_json == null || res.data[0].relation_json == '') return;
|
|
|
|
|
+ const origiondata = JSON.parse(res.data[0].relation_json)
|
|
|
|
|
+ lf.value.render(origiondata);
|
|
|
|
|
+ console.log('watchRender');
|
|
|
|
|
+ for (let index = 0; index < origiondata.edges.length; index++) {
|
|
|
|
|
+ const element = origiondata.edges[index];
|
|
|
|
|
+ if (element.properties != null && element.properties["issv"] === 'SV') {
|
|
|
|
|
+ let lineStyle = lf.value.getEdgeModelById(element.id)//.getEdgeStyle();
|
|
|
|
|
+ console.log(lineStyle)
|
|
|
|
|
+ lineStyle.setProperties({ svEdge: { stroke: 'orange' } })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }, { immediate: true })
|
|
|
|
|
+ }
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
coolObj.value = props.needObj
|
|
coolObj.value = props.needObj
|
|
|
coolId.value = props.needId
|
|
coolId.value = props.needId
|
|
|
coolName.value = props.needName
|
|
coolName.value = props.needName
|
|
|
copyObj.value = props.coolObj
|
|
copyObj.value = props.coolObj
|
|
|
numCase.value = props.svOrGoose
|
|
numCase.value = props.svOrGoose
|
|
|
- //systemRow.getChildren({ code: "area_type" }).then(res => {
|
|
|
|
|
- // console.log(res, 'sss');
|
|
|
|
|
- //})
|
|
|
|
|
systemRow.getChildren({ code: "ied_type" }).then(res => {
|
|
systemRow.getChildren({ code: "ied_type" }).then(res => {
|
|
|
needMap.value = res.data.map(item => {
|
|
needMap.value = res.data.map(item => {
|
|
|
return {
|
|
return {
|
|
@@ -403,6 +418,7 @@ export default {
|
|
|
// lf.value.register(logicFlows)
|
|
// lf.value.register(logicFlows)
|
|
|
lf.value.extension.dndPanel.setPatternItems(needMap.value);
|
|
lf.value.extension.dndPanel.setPatternItems(needMap.value);
|
|
|
lf.value.render();
|
|
lf.value.render();
|
|
|
|
|
+ lastRender()
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
function abilityBack(data) {
|
|
function abilityBack(data) {
|
|
@@ -447,6 +463,7 @@ export default {
|
|
|
startText,//开始节点名称
|
|
startText,//开始节点名称
|
|
|
endText,//结束节点名称
|
|
endText,//结束节点名称
|
|
|
lineType,//连接线
|
|
lineType,//连接线
|
|
|
|
|
+ lastRender,//路由跳转的渲染
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
components: {
|
|
components: {
|