Commit dd734d18 by liuyong

修改bug

1 parent 8923db80
......@@ -801,4 +801,8 @@ export function postRequest(url, params) {
}
export function postRequestShared(url, params){
return post(EADC_SHARED_ABILITY + url, params)
}
// 获取ArchiBelongId
export function queryArchiBelongId(params) {
return post(EADC_ARRCHITECTURE + '/archi-model-dict-detail/gDictByKey', params)
}
\ No newline at end of file
<template>
<div class="archiAssetVisualShow">
<el-tabs>
<el-tabs @tab-click="tabsClick">
<el-tab-pane label="业务架构">
<Tab1></Tab1>
<Tab1 ref="tab1ComP"></Tab1>
</el-tab-pane>
<el-tab-pane label="应用架构">
<Tab2></Tab2>
<Tab2 ref="tab2ComP"></Tab2>
</el-tab-pane>
<el-tab-pane label="数据架构">
<Tab3></Tab3>
<Tab3 ref="tab3ComP"></Tab3>
</el-tab-pane>
<el-tab-pane label="技术架构">
<Tab4></Tab4>
<Tab4 ref="tab4ComP"></Tab4>
</el-tab-pane>
<el-tab-pane label="安全架构">
<Tab5></Tab5>
<Tab5 ref="tab5ComP"></Tab5>
</el-tab-pane>
</el-tabs>
</div>
......@@ -47,10 +47,28 @@
};
},
mounted(){
this.$refs.tab1ComP.main();
},
methods: {
tabsClick(data) {
switch(data.label){
case '业务架构':
this.$refs.tab1ComP.main();
break;
case '应用架构':
this.$refs.tab2ComP.main();
break;
case '数据架构':
this.$refs.tab3ComP.main();
break;
case '技术架构':
this.$refs.tab4ComP.main();
break;
case '安全架构':
this.$refs.tab5ComP.main();
break;
}
}
}
}
</script>
......
......@@ -53,7 +53,7 @@
</template>
<script>
import { archiAssetShowTree } from '@/api/index.js'
import { archiAssetShowTree, queryArchiBelongId } from '@/api/index.js'
import { MessageBox, Message } from 'element-ui'
export default {
name: 'tab1',
......@@ -65,16 +65,40 @@ export default {
}
},
mounted() {
this.echarts1()
this.getLeftData()
},
methods: {
main() {
this.getArchiBelongId().then(res => {
const current = res.find(item => item.label == '业务架构');
this.getLeftData(current.value);
this.echarts1();
})
},
getArchiBelongId() {
const params = {
"typeValue": "archi_belong"
}
return new Promise((resolve, reject) => {
queryArchiBelongId(params).then((res) => {
if (res.code == 200) {
resolve(res.data)
} else {
Message({
type: 'error',
message: res.msg,
})
reject(res.msg)
}
})
})
},
showCurrent(data) {
this.centerData = data.children
},
getLeftData() {
getLeftData(data) {
const params = {
assertType: 'ARCHI_BUSINESS',
"archiBelongId": data
}
archiAssetShowTree(params).then((res) => {
if (res.code == 200) {
......
......@@ -53,7 +53,7 @@
</template>
<script>
import { archiAssetShowTree } from '@/api/index.js'
import { archiAssetShowTree, queryArchiBelongId } from '@/api/index.js'
import { MessageBox, Message } from 'element-ui'
export default {
name: 'tab2',
......@@ -65,16 +65,40 @@ export default {
}
},
mounted() {
this.echarts1()
this.getLeftData()
},
methods: {
main() {
this.getArchiBelongId().then(res => {
const current = res.find(item => item.label == '应用架构');
this.getLeftData(current.value);
this.echarts1();
})
},
getArchiBelongId() {
const params = {
"typeValue": "archi_belong"
}
return new Promise((resolve, reject) => {
queryArchiBelongId(params).then((res) => {
if (res.code == 200) {
resolve(res.data)
} else {
Message({
type: 'error',
message: res.msg,
})
reject(res.msg)
}
})
})
},
showCurrent(data) {
this.centerData = data.children
},
getLeftData() {
getLeftData(data) {
const params = {
assertType: 'ARCHI_APPLICATION',
"archiBelongId": data
}
archiAssetShowTree(params).then((res) => {
if (res.code == 200) {
......
......@@ -53,7 +53,7 @@
</template>
<script>
import { archiAssetShowTree } from '@/api/index.js'
import { archiAssetShowTree, queryArchiBelongId } from '@/api/index.js'
import { MessageBox, Message } from 'element-ui'
export default {
name: 'tab3',
......@@ -65,16 +65,41 @@ export default {
}
},
mounted() {
this.echarts1()
this.getLeftData()
},
methods: {
main() {
this.getArchiBelongId().then(res => {
const current = res.find(item => item.label == '数据架构');
this.getLeftData(current.value);
this.echarts1();
})
},
getArchiBelongId() {
const params = {
"typeValue": "archi_belong"
}
return new Promise((resolve, reject) => {
queryArchiBelongId(params).then((res) => {
if (res.code == 200) {
console.log(res.data);
resolve(res.data)
} else {
Message({
type: 'error',
message: res.msg,
})
reject(res.msg)
}
})
})
},
showCurrent(data) {
this.centerData = data.children
},
getLeftData() {
getLeftData(data) {
const params = {
assertType: 'ARCHI_DATA',
"archiBelongId": data
}
archiAssetShowTree(params).then((res) => {
if (res.code == 200) {
......
......@@ -53,7 +53,7 @@
</template>
<script>
import { archiAssetShowTree } from '@/api/index.js'
import { archiAssetShowTree, queryArchiBelongId } from '@/api/index.js'
import { MessageBox, Message } from 'element-ui'
export default {
name: 'tab4',
......@@ -65,16 +65,41 @@ export default {
}
},
mounted() {
this.echarts1()
this.getLeftData()
},
methods: {
main() {
this.getArchiBelongId().then(res => {
const current = res.find(item => item.label == '技术架构');
this.getLeftData(current.value);
this.echarts1();
})
},
getArchiBelongId() {
const params = {
"typeValue": "archi_belong"
}
return new Promise((resolve, reject) => {
queryArchiBelongId(params).then((res) => {
if (res.code == 200) {
console.log(res.data);
resolve(res.data)
} else {
Message({
type: 'error',
message: res.msg,
})
reject(res.msg)
}
})
})
},
showCurrent(data) {
this.centerData = data.children
},
getLeftData() {
getLeftData(data) {
const params = {
assertType: 'ARCHI_TECHNOLOGY',
"archiBelongId": data
}
archiAssetShowTree(params).then((res) => {
if (res.code == 200) {
......
......@@ -53,7 +53,7 @@
</template>
<script>
import { archiAssetShowTree } from '@/api/index.js'
import { archiAssetShowTree, queryArchiBelongId } from '@/api/index.js'
import { MessageBox, Message } from 'element-ui'
export default {
name: 'tab5',
......@@ -65,16 +65,41 @@ export default {
}
},
mounted() {
this.echarts1()
this.getLeftData()
},
methods: {
main() {
this.getArchiBelongId().then(res => {
const current = res.find(item => item.label == '安全架构');
this.getLeftData(current.value);
this.echarts1();
})
},
getArchiBelongId() {
const params = {
"typeValue": "archi_belong"
}
return new Promise((resolve, reject) => {
queryArchiBelongId(params).then((res) => {
if (res.code == 200) {
console.log(res.data);
resolve(res.data)
} else {
Message({
type: 'error',
message: res.msg,
})
reject(res.msg)
}
})
})
},
showCurrent(data) {
this.centerData = data.children
},
getLeftData() {
getLeftData(data) {
const params = {
assertType: 'ARCHI_SAFE',
"archiBelongId": data
}
archiAssetShowTree(params).then((res) => {
if (res.code == 200) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!