Commit d74e0b78 by 史敦盼

便签本添加参数

1 parent 36758108
function initSetScratchpad() {
console.log('urlParams', urlParams)
//左侧便签本初始化数据
$.ajax({
method: 'post',
url: `http://${ajaxUrl}/eadc-architecture/short-cut-model/qSCMList`,
data: JSON.stringify({}),
data: {
referenceId: urlParams.referenceId,
referenceType: isMetaModel()
},
success: function (result) {
let images = []
result.data.forEach((item) => {
......@@ -54,6 +58,13 @@ function initSetScratchpad() {
// 若为压缩的xml,则内容是diagram的内容
}
function isMetaModel() {
if(urlParams.page === 'metaModelListDetails') {
return 1
} else {
return 2
}
}
function saveScratchpad(data) {
//左侧便签本保存数据
......
......@@ -1043,7 +1043,7 @@
}
// 二次开发-画布只保留五大架构元素关系图标
const joinGraph_ = JSON.parse(localStorage.getItem('joinGraph'));
if(joinGraph_ && joinGraph_.state == 2) {
if(joinGraph_ && joinGraph_.state == 2 && urlParams.page !== 'metaModelListDetails') {
this.addGeneralPalette(this.customEntries == null);//通用图形
}
// this.addMiscPalette(false); //杂项图形
......
<template>
<iframe
id="drawioGraph"
name="content_frame"
:src="'/drawio/index.html?id='+id+'&info='+info+'&page='+page"
frameborder=0
scrolling="no">
</iframe>
<iframe
id="drawioGraph"
name="content_frame"
:src="getSrc"
frameborder="0"
scrolling="no"
>
</iframe>
</template>
<script>
export default {
props: {
initGraphId: Object
},
data() {
return {
id: null,
info: null,
page: null
};
},
watch: {
initGraphId: {
handler(newVal, oldVal) {
this.id = newVal.id;
this.info = newVal.info;
this.page = newVal.page;
},
}
},
mounted(){
},
}
export default {
props: {
initGraphId: Object,
},
data() {
return {
id: null,
info: null,
page: null,
referenceId: null,
}
},
watch: {
initGraphId: {
handler(newVal, oldVal) {
this.id = newVal.id
this.info = newVal.info
this.page = newVal.page
this.referenceId = newVal.referenceId
},
},
},
computed: {
getSrc() {
return `/drawio/index.html?id=${this.id}&info=${this.info}&page=${this.page}&referenceId=${this.referenceId}`
},
},
mounted() {},
}
</script>
<style scoped>
#drawioGraph{
height: 100%;
width: 100%;
}
#drawioGraph {
height: 100%;
width: 100%;
}
</style>
......@@ -98,11 +98,13 @@
this.getQingDanTable();
this.get_search_select1();
const id = this.$route.query.id;
const graphGroup = this.$route.query.info;
// const id = this.$route.query.id;
// const graphGroup = this.$route.query.info;
const { id, info, referenceId } = this.$route.query
this.routerId = {
id: id,
info: graphGroup
info,
referenceId
}
window.onmessage = e => {
......
......@@ -563,10 +563,7 @@ export default {
JSON.stringify({ state: 2, graph: res2[2].dataEle }),
)
this.$router.push(
`/main/archiViewManageDetails?id=${id}&info=${this.graphGroup}&viewId=${this.viewId}&assetConstant=${this.archiType}`,
() => {},
() => {},
)
`/main/archiViewManageDetails?id=${id}&info=${this.graphGroup}&viewId=${this.viewId}&assetConstant=${this.archiType}&referenceId=${item.viewDetailsId}`)
})
}
})
......
......@@ -73,11 +73,12 @@
this.get_search_select1();
// const id = this.$route.query.id;
// const version = this.$route.query.info;
const {id, info, page } = this.$route.query
const {id, info, page, referenceId } = this.$route.query
this.routerId = {
id,
info,
page
page,
referenceId
}
window.onmessage = e => {
......
......@@ -318,7 +318,7 @@ export default {
localStorage.setItem('commonGraph', JSON.stringify({ show: false, graph: res2[0].dataEle }));
localStorage.setItem('standardGraph', JSON.stringify({ show: true, graph: res2[0].dataEle }));
localStorage.setItem('metaModelJoinGraph', JSON.stringify({ state: 1, graph: res2[0].dataEle }));
this.$router.push( `/main/metaModelListDetails?id=${item.metaModelId}&info=${item.version}&page=metaModelListDetails`);
this.$router.push( `/main/metaModelListDetails?id=${item.metaModelId}&info=${item.version}&page=metaModelListDetails&referenceId=${item.metaModelId}`);
});
}
});
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!