|
@@ -124,26 +124,26 @@ export default {
|
|
|
coolName.value = newVal
|
|
|
})
|
|
|
watch(() => props.coolObj, (newVal) => {
|
|
|
- setTimeout(() => {
|
|
|
- loading.value = true
|
|
|
- copyObj.value = newVal
|
|
|
- modelId.value = copyObj.value.id
|
|
|
- cid.getModelInfo({ id: copyObj.value.id, pageno: 1, pagesize: 20 }).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);
|
|
|
- loading.value = false
|
|
|
- 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' } })
|
|
|
+ setTimeout(() => {
|
|
|
+ loading.value = true
|
|
|
+ copyObj.value = newVal
|
|
|
+ modelId.value = copyObj.value.id
|
|
|
+ cid.getModelInfo({ id: copyObj.value.id, pageno: 1, pagesize: 20 }).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);
|
|
|
+ loading.value = false
|
|
|
+ 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 })
|
|
|
- }, 3000);
|
|
|
+ }, { immediate: true })
|
|
|
+ }, 3000);
|
|
|
})
|
|
|
watch(() => props.svOrGoose, (newVal) => {
|
|
|
numCase.value = newVal
|
|
@@ -225,7 +225,8 @@ export default {
|
|
|
function lastRender() {
|
|
|
loading.value = true
|
|
|
modelId.value = route.query.modelid
|
|
|
- cid.getModelInfo({ id: modelId.value, pageno: 1, pagesize: 20 }).then(res => {
|
|
|
+ console.log(modelId.value, 'modelid')
|
|
|
+ cid.getModelInfo({ id: modelId.value - 0, pageno: 1, pagesize: 20 }).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);
|
|
@@ -401,12 +402,12 @@ export default {
|
|
|
endText.value = end.text.value//结束文本
|
|
|
startTarget.value = start.properties
|
|
|
endTarget.value = end.properties
|
|
|
- console.log(copyColor.value,'copy');
|
|
|
- console.log(data,'data');
|
|
|
- if(copyColor.value == '#255CE7'){
|
|
|
+ console.log(copyColor.value, 'copy');
|
|
|
+ console.log(data, 'data');
|
|
|
+ if (copyColor.value == '#255CE7') {
|
|
|
lf.value.graphModel.updateText(data.data.id, "GOOSE");
|
|
|
console.log('修改了goose');
|
|
|
- }else if(copyColor.value == 'orange'){
|
|
|
+ } else if (copyColor.value == 'orange') {
|
|
|
lf.value.graphModel.updateText(data.data.id, "SV");
|
|
|
console.log('修改了sv');
|
|
|
}
|
|
@@ -435,9 +436,9 @@ export default {
|
|
|
lf.value.extension.dndPanel.setPatternItems(needMap.value);
|
|
|
lf.value.render();
|
|
|
lastRender()
|
|
|
- setTimeout(()=>{
|
|
|
+ setTimeout(() => {
|
|
|
loading.value = false
|
|
|
- },10000)
|
|
|
+ }, 10000)
|
|
|
})
|
|
|
})
|
|
|
function abilityBack(data) {
|
|
@@ -503,6 +504,7 @@ export default {
|
|
|
:deep(.lf-element-text) {
|
|
|
color: black;
|
|
|
}
|
|
|
+
|
|
|
/* :deep(.lf-dndpanel){
|
|
|
w
|
|
|
} */
|