Commit f7450639 by 史敦盼

echarts本地public中去除

1 parent df2a3185
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
"@wangeditor/editor-for-vue": "^1.0.2", "@wangeditor/editor-for-vue": "^1.0.2",
"axios": "^1.6.2", "axios": "^1.6.2",
"core-js": "^3.8.3", "core-js": "^3.8.3",
"echarts": "^5.5.0",
"element-ui": "^2.15.14", "element-ui": "^2.15.14",
"jquery": "^3.7.1", "jquery": "^3.7.1",
"scss": "^0.2.4", "scss": "^0.2.4",
......
This diff could not be displayed because it is too large.
<!DOCTYPE html> <!DOCTYPE html>
<html lang=""> <html lang="">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<title><%= htmlWebpackPlugin.options.title %></title> <title><%= htmlWebpackPlugin.options.title %></title>
<link type="text/css" rel="stylesheet" href="./jsmind/jsmind.css" /> <link type="text/css" rel="stylesheet" href="./jsmind/jsmind.css" />
<script type="text/javascript" src="./jsmind/jsmind.js"></script> <script type="text/javascript" src="./jsmind/jsmind.js"></script>
<script type="text/javascript" src="./jsmind/jsmind.draggable-node.js"></script> <script
type="text/javascript"
src="./jsmind/jsmind.draggable-node.js"
></script>
<script type="text/javascript" src="./jsmind/dom-to-image.js"></script> <script type="text/javascript" src="./jsmind/dom-to-image.js"></script>
<script type="text/javascript" src="./jsmind/jsmind.screenshot.js"></script> <script type="text/javascript" src="./jsmind/jsmind.screenshot.js"></script>
<script type="text/javascript" src="./echarts.min.js"></script> <!-- <script type="text/javascript" src="./echarts.min.js"></script> -->
</head> </head>
<body> <body>
<noscript> <noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> <strong
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
properly without JavaScript enabled. Please enable it to
continue.</strong
>
</noscript> </noscript>
<div id="app"></div> <div id="app"></div>
<!-- <script type="text/javascript" src="http://192.168.0.186:9001/web-apps/apps/api/documents/api.js"></script> --> <!-- <script type="text/javascript" src="http://192.168.0.186:9001/web-apps/apps/api/documents/api.js"></script> -->
...@@ -23,19 +30,20 @@ ...@@ -23,19 +30,20 @@
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
</body> </body>
<style> <style>
html,body{ html,
body {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
::-webkit-scrollbar{ ::-webkit-scrollbar {
width: 8px; width: 8px;
} }
::-webkit-scrollbar-track{ ::-webkit-scrollbar-track {
background-color: #fff; background-color: #fff;
} }
::-webkit-scrollbar-thumb{ ::-webkit-scrollbar-thumb {
border-radius: 8px; border-radius: 8px;
background-color: #ccc; background-color: #ccc;
} }
......
...@@ -2,12 +2,14 @@ import Vue from 'vue' ...@@ -2,12 +2,14 @@ import Vue from 'vue'
import App from './App.vue' import App from './App.vue'
import router from './router' import router from './router'
import store from './store' import store from './store'
import * as echarts from 'echarts'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css' import 'element-ui/lib/theme-chalk/index.css'
import './styles/element-variables.scss' import './styles/element-variables.scss'
import initDirective from './directive' import initDirective from './directive'
initDirective(Vue) initDirective(Vue)
Vue.prototype.$echarts = echarts
Vue.config.productionTip = false Vue.config.productionTip = false
......
<template> <template>
<div class="archiIntelligenceSearch"> <div class="archiIntelligenceSearch">
<div class="left_container"> <div class="left_container">
<div class="search_menu_item" style="margin-top: 15px;"> <div class="search_menu_item" style="margin-top: 15px">
<span class="search_title">架构内容:</span> <span class="search_title">架构内容:</span>
<!-- <el-input v-no-backslash v-model="query_item1" placeholder="请输入" style="width: 300px;" maxlength="100"></el-input> --> <!-- <el-input v-no-backslash v-model="query_item1" placeholder="请输入" style="width: 300px;" maxlength="100"></el-input> -->
<el-input placeholder="请输入内容" v-no-backslash v-model="query_item1" clearable style="width: 300px;"> <el-input
placeholder="请输入内容"
v-no-backslash
v-model="query_item1"
clearable
style="width: 300px"
>
<template slot="append"> <template slot="append">
<div style="cursor: pointer;width: 50px;height: 35px;display: flex;justify-content: center;align-items: center;" @click="select1"> <div
style="
cursor: pointer;
width: 50px;
height: 35px;
display: flex;
justify-content: center;
align-items: center;
"
@click="select1"
>
<i class="el-icon-search"></i> <i class="el-icon-search"></i>
</div> </div>
</template> </template>
...@@ -14,8 +30,19 @@ ...@@ -14,8 +30,19 @@
</div> </div>
<div class="search_menu_item"> <div class="search_menu_item">
<span class="search_title">架构版本:</span> <span class="search_title">架构版本:</span>
<el-select v-model="query_item2" clearable placeholder="请选择" style="width: 300px;" @change="select2"> <el-select
<el-option v-for="item in archiList" :key="item.versionId" :label="item.versionName" :value="item.versionId"></el-option> v-model="query_item2"
clearable
placeholder="请选择"
style="width: 300px"
@change="select2"
>
<el-option
v-for="item in archiList"
:key="item.versionId"
:label="item.versionName"
:value="item.versionId"
></el-option>
</el-select> </el-select>
</div> </div>
<el-tree <el-tree
...@@ -28,11 +55,12 @@ ...@@ -28,11 +55,12 @@
node-key="id" node-key="id"
:check-strictly="true" :check-strictly="true"
@check="treeCheckChange" @check="treeCheckChange"
ref="tree"> ref="tree"
>
</el-tree> </el-tree>
</div> </div>
<div class="right_container"> <div class="right_container">
<div id="echartsContainer" style="width: 100%;height: 100%;"></div> <div id="echartsContainer" style="width: 100%; height: 100%"></div>
</div> </div>
</div> </div>
</template> </template>
...@@ -40,10 +68,10 @@ ...@@ -40,10 +68,10 @@
<script> <script>
import { import {
archiIntelligenceSearchTree, archiIntelligenceSearchTree,
archiIntelligenceSearchVersionList archiIntelligenceSearchVersionList,
} from '@/api/index.js'; } from '@/api/index.js'
import { MessageBox, Message } from 'element-ui'; import { MessageBox, Message } from 'element-ui'
import $ from 'jquery'; import $ from 'jquery'
export default { export default {
name: 'ArchiIntelligenceSearch', name: 'ArchiIntelligenceSearch',
...@@ -53,96 +81,100 @@ export default { ...@@ -53,96 +81,100 @@ export default {
myChart: null, myChart: null,
query_item1: null, query_item1: null,
query_item2: null, query_item2: null,
archiList: [] archiList: [],
}; }
}, },
mounted(){ mounted() {
this.getTreeData(); this.getTreeData()
this.getVisionList(); this.getVisionList()
}, },
methods: { methods: {
select1() { select1() {
this.getTreeData(); this.getTreeData()
}, },
select2(data) { select2(data) {
if(this.myChart) { if (this.myChart) {
this.myChart.dispose(); this.myChart.dispose()
} }
this.getTreeData(); this.getTreeData()
}, },
echarts1(seriesData, linkData) { echarts1(seriesData, linkData) {
this.myChart = echarts.init(document.getElementById('echartsContainer')); this.myChart = this.$echarts.init(
document.getElementById('echartsContainer'),
)
var option = { var option = {
tooltip: { tooltip: {
formatter: function (x) { formatter: function (x) {
return x.data.name; return x.data.name
} },
}, },
series: [ series: [
{ {
type: 'graph', type: 'graph',
layout: 'force', layout: 'force',
roam: true, roam: true,
symbolSize: [ 120, 60 ], symbolSize: [120, 60],
label: { label: {
normal: { normal: {
show: true, show: true,
width: 80, width: 80,
overflow: 'truncate', overflow: 'truncate',
textStyle: { textStyle: {
fontSize: 12 fontSize: 12,
},
}, },
}
}, },
lineStyle: { lineStyle: {
normal: { normal: {
opacity: 0.9, opacity: 0.9,
width: 5, width: 5,
curveness: 0 curveness: 0,
} },
}, },
force: { force: {
// repulsion: 500, // repulsion: 500,
repulsion: 1000, //节点之间的斥力因子。 repulsion: 1000, //节点之间的斥力因子。
edgeLength: 100 //边的两个节点之间的距离,这个距离也会受 repulsion。 edgeLength: 100, //边的两个节点之间的距离,这个距离也会受 repulsion。
}, },
// edgeSymbol: ['circle', 'arrow'], // edgeSymbol: ['circle', 'arrow'],
data: seriesData, data: seriesData,
links: linkData links: linkData,
},
],
} }
]
};
this.myChart.setOption(option); this.myChart.setOption(option)
}, },
getVisionList() {//查询架构版本 getVisionList() {
archiIntelligenceSearchVersionList({}).then(res => { //查询架构版本
if(res.code == 200) { archiIntelligenceSearchVersionList({}).then((res) => {
this.archiList = res.data; if (res.code == 200) {
this.archiList = res.data
} }
}); })
}, },
getTreeData() {//查询左侧树 getTreeData() {
//查询左侧树
const params = { const params = {
"assetName": this.query_item1, assetName: this.query_item1,
"versionId": this.query_item2, versionId: this.query_item2,
} }
archiIntelligenceSearchTree(params).then(res => { archiIntelligenceSearchTree(params).then((res) => {
if(res.code == 200) { if (res.code == 200) {
this.treeData = res.data; this.treeData = res.data
} }
}); })
}, },
treeCheckChange(data, tree) {//左侧树勾选 treeCheckChange(data, tree) {
let seriesData = [], linkData = []; //左侧树勾选
let seriesData = [],
linkData = []
if(tree.checkedNodes.length > 0) { if (tree.checkedNodes.length > 0) {
tree.checkedNodes.forEach((item) => {
tree.checkedNodes.forEach(item => { if (!item.targetList) {
if(!item.targetList){ return
return;
} }
seriesData.push({ seriesData.push({
name: item.assetName, name: item.assetName,
...@@ -151,12 +183,12 @@ export default { ...@@ -151,12 +183,12 @@ export default {
draggable: true, draggable: true,
itemStyle: { itemStyle: {
normal: { normal: {
color: item.color color: item.color,
}, },
} },
}); })
if(item.targetList.length > 0) { if (item.targetList.length > 0) {
item.targetList.forEach(item2 => { item.targetList.forEach((item2) => {
seriesData.push({ seriesData.push({
name: item2.assetName, name: item2.assetName,
id: item2.assetCode, id: item2.assetCode,
...@@ -164,9 +196,9 @@ export default { ...@@ -164,9 +196,9 @@ export default {
draggable: true, draggable: true,
itemStyle: { itemStyle: {
normal: { normal: {
color: item2.color color: item2.color,
},
}, },
}
}) })
linkData.push({ linkData.push({
source: item.assetCode, source: item.assetCode,
...@@ -188,60 +220,57 @@ export default { ...@@ -188,60 +220,57 @@ export default {
new_arr2.push(seriesData[i]) new_arr2.push(seriesData[i])
} }
} }
seriesData = new_arr2; seriesData = new_arr2
this.echarts1(seriesData, linkData);
}else { this.echarts1(seriesData, linkData)
this.myChart.dispose(); } else {
this.myChart.dispose()
} }
}, },
} },
} }
</script> </script>
<style> <style></style>
</style>
<style scoped> <style scoped>
.filter-tree{ .filter-tree {
width: 300px; width: 300px;
height: calc(100% - 120px); height: calc(100% - 120px);
overflow-y: auto; overflow-y: auto;
display: inline-block; display: inline-block;
} }
/deep/ .is-leaf { /deep/ .is-leaf {
background-color: #fff !important; background-color: #fff !important;
} }
.search_menu_item{ .search_menu_item {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-bottom: 10px; margin-bottom: 10px;
} }
.search_title{ .search_title {
font-size: 14px; font-size: 14px;
color: #606291; color: #606291;
flex-shrink: 0; flex-shrink: 0;
margin-right: 10px; margin-right: 10px;
} }
.archiIntelligenceSearch{ .archiIntelligenceSearch {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
} }
.left_container{ .left_container {
width: 25%; width: 25%;
margin-right: 20px; margin-right: 20px;
height: 100%; height: 100%;
border: 1px solid #ccc; border: 1px solid #ccc;
text-align: center; text-align: center;
} }
.right_container{ .right_container {
width: 75%; width: 75%;
height: 100%; height: 100%;
pornhub: hidden; pornhub: hidden;
} }
/deep/ .el-input-group__append{ /deep/ .el-input-group__append {
padding: 0; padding: 0;
} }
</style> </style>
<template> <template>
...@@ -8,26 +8,23 @@ ...@@ -8,26 +8,23 @@
default-expand-all default-expand-all
node-key="assetId" node-key="assetId"
@node-click="treeClick" @node-click="treeClick"
ref="tree"> ref="tree"
>
</el-tree> </el-tree>
<div class="right_container"> <div class="right_container">
<div id="echartsContainer" style="width: 800px;height: 500px;"></div> <div id="echartsContainer" style="width: 800px; height: 500px"></div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { import { archiAssetShowTree } from '@/api/index.js'
archiAssetShowTree, import { MessageBox, Message } from 'element-ui'
} from '@/api/index.js'; import $ from 'jquery'
import { MessageBox, Message } from 'element-ui';
import $ from 'jquery';
export default { export default {
name: 'ArchiAssetVisualShow', name: 'ArchiAssetVisualShow',
components: { components: {},
},
data() { data() {
return { return {
treeData: [ treeData: [
...@@ -35,88 +32,92 @@ export default { ...@@ -35,88 +32,92 @@ export default {
{ id: 'APP', name: '应用架构', children: [] }, { id: 'APP', name: '应用架构', children: [] },
{ id: 'DATA', name: '数据架构', children: [] }, { id: 'DATA', name: '数据架构', children: [] },
{ id: 'TECH', name: '技术架构', children: [] }, { id: 'TECH', name: '技术架构', children: [] },
{ id: 'SAFE', name: '安全架构', children: [] } { id: 'SAFE', name: '安全架构', children: [] },
], ],
myChart: null myChart: null,
}; }
}, },
mounted(){ mounted() {
this.getTreeData('BUSI'); this.getTreeData('BUSI')
this.echarts1(); this.echarts1()
}, },
methods: { methods: {
echarts1(seriesData, linkData) { echarts1(seriesData, linkData) {
this.myChart = echarts.init(document.getElementById('echartsContainer')); this.myChart = this.$echarts.init(
document.getElementById('echartsContainer'),
)
var option = { var option = {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { axisPointer: {
type: 'shadow' type: 'shadow',
} },
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
}, },
yAxis: { yAxis: {
type: 'value' type: 'value',
}, },
series: [ series: [
{ {
data: [120, 200, 150, 80, 70, 110, 130], data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar' type: 'bar',
},
],
} }
]
};
this.myChart.setOption(option); this.myChart.setOption(option)
}, },
getTreeData(type) {//查询左侧树 getTreeData(type) {
//查询左侧树
const params = { const params = {
"assetEnum": type assetEnum: type,
} }
archiAssetShowTree(params).then(res => { archiAssetShowTree(params).then((res) => {
if(res.code == 200) { if (res.code == 200) {
this.treeData.forEach(item => { this.treeData.forEach((item) => {
if(item.id == type) { if (item.id == type) {
item.children = res.data; item.children = res.data
} }
}) })
} }
}); })
}, },
treeClick(data, node, e) {//树点击的时候 treeClick(data, node, e) {
//树点击的时候
// console.log(data.assetId); // console.log(data.assetId);
const type = [ 'BUSI', 'APP', 'DATA', 'TECH', 'SAFE' ]; const type = ['BUSI', 'APP', 'DATA', 'TECH', 'SAFE']
if(type.includes(data.id)) { if (type.includes(data.id)) {
this.getTreeData(data.id); this.getTreeData(data.id)
}
}
} }
},
},
} }
</script> </script>
<style scoped> <style scoped>
.archiAssetVisualShow{ .archiAssetVisualShow {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.filter-tree{ .filter-tree {
width: 300px; width: 300px;
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
border-right: 1px solid #ccc; border-right: 1px solid #ccc;
} }
.right_container{ .right_container {
width: calc(100% - 300px); width: calc(100% - 300px);
height: 100%; height: 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
/deep/ .is-leaf { /deep/ .is-leaf {
background-color: #fff !important; background-color: #fff !important;
} }
</style> </style>
<template> <template>
<div class="tab1"> <div class="tab1">
<div class="containerLeft"> <div class="containerLeft">
<p style="text-align: left;margin-left: 20px;">业务域</p> <p style="text-align: left; margin-left: 20px">业务域</p>
<el-divider></el-divider> <el-divider></el-divider>
<div class="buttonContainer"> <div class="buttonContainer">
<span v-for="item in leftData" :key="item.assetId"> <span v-for="item in leftData" :key="item.assetId">
<el-button style="margin: 10px 20px;" @click="showCurrent(item)">{{ item.assetName }}</el-button> <el-button style="margin: 10px 20px" @click="showCurrent(item)">{{
item.assetName
}}</el-button>
</span> </span>
</div> </div>
</div> </div>
<div class="containerCenter"> <div class="containerCenter">
<el-collapse accordion v-for="item in centerData" :key="item.assetId" style="margin-bottom: 20px;"> <el-collapse
accordion
v-for="item in centerData"
:key="item.assetId"
style="margin-bottom: 20px"
>
<el-collapse-item> <el-collapse-item>
<template slot="title"> <template slot="title">
<div style="width: 100%;display: flex;align-items: center;padding-left: 20px;"> <div
style="
width: 100%;
display: flex;
align-items: center;
padding-left: 20px;
"
>
<el-button size="medium">{{ item.assetName }}</el-button> <el-button size="medium">{{ item.assetName }}</el-button>
<p style="width: 76%;margin-left: 20px;border-top: 1px dotted #000;"></p> <p
style="
width: 76%;
margin-left: 20px;
border-top: 1px dotted #000;
"
></p>
</div> </div>
</template> </template>
<span v-for="item2 in item.children" :key="item2.assetId"> <span v-for="item2 in item.children" :key="item2.assetId">
<el-button style="margin: 10px 20px;">{{ item2.assetName }}</el-button> <el-button style="margin: 10px 20px">{{
item2.assetName
}}</el-button>
</span> </span>
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
</div> </div>
<div class="containerRight"> <div class="containerRight">
<div id="echartsContainer" style="width: 800px;height: 500px;"></div> <div id="echartsContainer" style="width: 800px; height: 500px"></div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { import { archiAssetShowTree } from '@/api/index.js'
archiAssetShowTree import { MessageBox, Message } from 'element-ui'
} from '@/api/index.js'; export default {
import { MessageBox, Message } from 'element-ui';
export default {
name: 'tab1', name: 'tab1',
components: { components: {},
},
data() { data() {
return { return {
leftData: [], leftData: [],
centerData: [] centerData: [],
}; }
}, },
mounted(){ mounted() {
this.echarts1(); this.echarts1()
this.getLeftData(); this.getLeftData()
}, },
methods: { methods: {
showCurrent(data) { showCurrent(data) {
this.centerData = data.children; this.centerData = data.children
}, },
getLeftData() { getLeftData() {
const params = { const params = {
"assertType": "ARCHI_BUSINESS" assertType: 'ARCHI_BUSINESS',
} }
archiAssetShowTree(params).then(res => { archiAssetShowTree(params).then((res) => {
if(res.code == 200) { if (res.code == 200) {
this.leftData = res.data; this.leftData = res.data
}else { } else {
Message({ Message({
type: 'error', type: 'error',
message: res.msg message: res.msg,
}); })
} }
}) })
}, },
echarts1() { echarts1() {
this.myChart = echarts.init(document.getElementById('echartsContainer')); this.myChart = this.$echarts.init(
document.getElementById('echartsContainer'),
)
var option = { var option = {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { axisPointer: {
type: 'shadow' type: 'shadow',
} },
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
}, },
yAxis: { yAxis: {
type: 'value' type: 'value',
}, },
series: [ series: [
{ {
data: [120, 200, 150, 80, 70, 110, 130], data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar' type: 'bar',
},
],
} }
]
};
this.myChart.setOption(option); this.myChart.setOption(option)
}, },
} },
} }
</script> </script>
<style> <style>
.el-tabs__nav{ .el-tabs__nav {
margin-left: 20px; margin-left: 20px;
} }
</style> </style>
<style scoped> <style scoped>
.tab1{ .tab1 {
height: calc(100% - 20px); height: calc(100% - 20px);
display: flex; display: flex;
} }
.buttonContainer{ .buttonContainer {
height: calc(100% - 90px); height: calc(100% - 90px);
overflow-y: auto; overflow-y: auto;
text-align: left; text-align: left;
} }
/deep/ .el-collapse-item__content{ /deep/ .el-collapse-item__content {
text-align: left; text-align: left;
} }
.containerLeft{ .containerLeft {
width: 20%; width: 20%;
height: 100%; height: 100%;
border-right: 2px solid #ccc; border-right: 2px solid #ccc;
} }
.containerCenter{ .containerCenter {
width: 35%; width: 35%;
height: 100%; height: 100%;
border-right: 2px solid #ccc; border-right: 2px solid #ccc;
overflow-y: auto; overflow-y: auto;
} }
.containerRight{ .containerRight {
width: 45%; width: 45%;
height: 100%; height: 100%;
} }
.el-button--primary{ .el-button--primary {
background: rgba(13,134,127,1); background: rgba(13, 134, 127, 1);
color: #fff; color: #fff;
border: 0; border: 0;
} }
</style> </style>
<template> <template>
<div class="tab2"> <div class="tab2">
<div class="containerLeft"> <div class="containerLeft">
<p style="text-align: left;margin-left: 20px;">业务域</p> <p style="text-align: left; margin-left: 20px">业务域</p>
<el-divider></el-divider> <el-divider></el-divider>
<div class="buttonContainer"> <div class="buttonContainer">
<span v-for="item in leftData" :key="item.assetId"> <span v-for="item in leftData" :key="item.assetId">
<el-button style="margin: 10px 20px;" @click="showCurrent(item)">{{ item.assetName }}</el-button> <el-button style="margin: 10px 20px" @click="showCurrent(item)">{{
item.assetName
}}</el-button>
</span> </span>
</div> </div>
</div> </div>
<div class="containerCenter"> <div class="containerCenter">
<el-collapse accordion v-for="item in centerData" :key="item.assetId" style="margin-bottom: 20px;"> <el-collapse
accordion
v-for="item in centerData"
:key="item.assetId"
style="margin-bottom: 20px"
>
<el-collapse-item> <el-collapse-item>
<template slot="title"> <template slot="title">
<div style="width: 100%;display: flex;align-items: center;padding-left: 20px;"> <div
style="
width: 100%;
display: flex;
align-items: center;
padding-left: 20px;
"
>
<el-button size="medium">{{ item.assetName }}</el-button> <el-button size="medium">{{ item.assetName }}</el-button>
<p style="width: 76%;margin-left: 20px;border-top: 1px dotted #000;"></p> <p
style="
width: 76%;
margin-left: 20px;
border-top: 1px dotted #000;
"
></p>
</div> </div>
</template> </template>
<span v-for="item2 in item.children" :key="item2.assetId"> <span v-for="item2 in item.children" :key="item2.assetId">
<el-button style="margin: 10px 20px;">{{ item2.assetName }}</el-button> <el-button style="margin: 10px 20px">{{
item2.assetName
}}</el-button>
</span> </span>
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
</div> </div>
<div class="containerRight"> <div class="containerRight">
<div id="echartsContainer2" style="width: 800px;height: 500px;"></div> <div id="echartsContainer2" style="width: 800px; height: 500px"></div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { import { archiAssetShowTree } from '@/api/index.js'
archiAssetShowTree import { MessageBox, Message } from 'element-ui'
} from '@/api/index.js'; export default {
import { MessageBox, Message } from 'element-ui';
export default {
name: 'tab2', name: 'tab2',
components: { components: {},
},
data() { data() {
return { return {
leftData: [], leftData: [],
centerData: [] centerData: [],
}; }
}, },
mounted(){ mounted() {
this.echarts1(); this.echarts1()
this.getLeftData(); this.getLeftData()
}, },
methods: { methods: {
showCurrent(data) { showCurrent(data) {
this.centerData = data.children; this.centerData = data.children
}, },
getLeftData() { getLeftData() {
const params = { const params = {
"assertType": "ARCHI_APPLICATION" assertType: 'ARCHI_APPLICATION',
} }
archiAssetShowTree(params).then(res => { archiAssetShowTree(params).then((res) => {
if(res.code == 200) { if (res.code == 200) {
this.leftData = res.data; this.leftData = res.data
}else { } else {
Message({ Message({
type: 'error', type: 'error',
message: res.msg message: res.msg,
}); })
} }
}) })
}, },
echarts1() { echarts1() {
this.myChart = echarts.init(document.getElementById('echartsContainer2')); this.myChart = this.$echarts.init(
document.getElementById('echartsContainer2'),
)
var option = { var option = {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { axisPointer: {
type: 'shadow' type: 'shadow',
} },
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
}, },
yAxis: { yAxis: {
type: 'value' type: 'value',
}, },
series: [ series: [
{ {
data: [120, 200, 150, 80, 70, 110, 130], data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar' type: 'bar',
},
],
} }
]
};
this.myChart.setOption(option); this.myChart.setOption(option)
}, },
} },
} }
</script> </script>
<style> <style>
.el-tabs__nav{ .el-tabs__nav {
margin-left: 20px; margin-left: 20px;
} }
</style> </style>
<style scoped> <style scoped>
.tab2{ .tab2 {
height: calc(100% - 20px); height: calc(100% - 20px);
display: flex; display: flex;
} }
/deep/ .el-collapse-item__content{ /deep/ .el-collapse-item__content {
text-align: left; text-align: left;
} }
.buttonContainer{ .buttonContainer {
height: calc(100% - 90px); height: calc(100% - 90px);
overflow-y: auto; overflow-y: auto;
text-align: left; text-align: left;
} }
.containerLeft{ .containerLeft {
width: 20%; width: 20%;
height: 100%; height: 100%;
border-right: 2px solid #ccc; border-right: 2px solid #ccc;
} }
.containerCenter{ .containerCenter {
width: 35%; width: 35%;
height: 100%; height: 100%;
border-right: 2px solid #ccc; border-right: 2px solid #ccc;
overflow-y: auto; overflow-y: auto;
} }
.containerRight{ .containerRight {
width: 45%; width: 45%;
height: 100%; height: 100%;
} }
.el-button--primary{ .el-button--primary {
background: rgba(13,134,127,1); background: rgba(13, 134, 127, 1);
color: #fff; color: #fff;
border: 0; border: 0;
} }
</style> </style>
<template> <template>
<div class="tab3"> <div class="tab3">
<div class="containerLeft"> <div class="containerLeft">
<p style="text-align: left;margin-left: 20px;">业务域</p> <p style="text-align: left; margin-left: 20px">业务域</p>
<el-divider></el-divider> <el-divider></el-divider>
<div class="buttonContainer"> <div class="buttonContainer">
<span v-for="item in leftData" :key="item.assetId"> <span v-for="item in leftData" :key="item.assetId">
<el-button style="margin: 10px 20px;" @click="showCurrent(item)">{{ item.assetName }}</el-button> <el-button style="margin: 10px 20px" @click="showCurrent(item)">{{
item.assetName
}}</el-button>
</span> </span>
</div> </div>
</div> </div>
<div class="containerCenter"> <div class="containerCenter">
<el-collapse accordion v-for="item in centerData" :key="item.assetId" style="margin-bottom: 20px;"> <el-collapse
accordion
v-for="item in centerData"
:key="item.assetId"
style="margin-bottom: 20px"
>
<el-collapse-item> <el-collapse-item>
<template slot="title"> <template slot="title">
<div style="width: 100%;display: flex;align-items: center;padding-left: 20px;"> <div
style="
width: 100%;
display: flex;
align-items: center;
padding-left: 20px;
"
>
<el-button size="medium">{{ item.assetName }}</el-button> <el-button size="medium">{{ item.assetName }}</el-button>
<p style="width: 76%;margin-left: 20px;border-top: 1px dotted #000;"></p> <p
style="
width: 76%;
margin-left: 20px;
border-top: 1px dotted #000;
"
></p>
</div> </div>
</template> </template>
<span v-for="item2 in item.children" :key="item2.assetId"> <span v-for="item2 in item.children" :key="item2.assetId">
<el-button style="margin: 10px 20px;">{{ item2.assetName }}</el-button> <el-button style="margin: 10px 20px">{{
item2.assetName
}}</el-button>
</span> </span>
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
</div> </div>
<div class="containerRight"> <div class="containerRight">
<div id="echartsContainer3" style="width: 800px;height: 500px;"></div> <div id="echartsContainer3" style="width: 800px; height: 500px"></div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { import { archiAssetShowTree } from '@/api/index.js'
archiAssetShowTree import { MessageBox, Message } from 'element-ui'
} from '@/api/index.js'; export default {
import { MessageBox, Message } from 'element-ui';
export default {
name: 'tab3', name: 'tab3',
components: { components: {},
},
data() { data() {
return { return {
leftData: [], leftData: [],
centerData: [] centerData: [],
}; }
}, },
mounted(){ mounted() {
this.echarts1(); this.echarts1()
this.getLeftData(); this.getLeftData()
}, },
methods: { methods: {
showCurrent(data) { showCurrent(data) {
this.centerData = data.children; this.centerData = data.children
}, },
getLeftData() { getLeftData() {
const params = { const params = {
"assertType": "ARCHI_DATA" assertType: 'ARCHI_DATA',
} }
archiAssetShowTree(params).then(res => { archiAssetShowTree(params).then((res) => {
if(res.code == 200) { if (res.code == 200) {
this.leftData = res.data; this.leftData = res.data
}else { } else {
Message({ Message({
type: 'error', type: 'error',
message: res.msg message: res.msg,
}); })
} }
}) })
}, },
echarts1() { echarts1() {
this.myChart = echarts.init(document.getElementById('echartsContainer3')); this.myChart = this.$echarts.init(
document.getElementById('echartsContainer3'),
)
var option = { var option = {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { axisPointer: {
type: 'shadow' type: 'shadow',
} },
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
}, },
yAxis: { yAxis: {
type: 'value' type: 'value',
}, },
series: [ series: [
{ {
data: [120, 200, 150, 80, 70, 110, 130], data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar' type: 'bar',
},
],
} }
]
};
this.myChart.setOption(option); this.myChart.setOption(option)
}, },
} },
} }
</script> </script>
<style> <style>
.el-tabs__nav{ .el-tabs__nav {
margin-left: 20px; margin-left: 20px;
} }
</style> </style>
<style scoped> <style scoped>
.tab3{ .tab3 {
height: calc(100% - 20px); height: calc(100% - 20px);
display: flex; display: flex;
} }
/deep/ .el-collapse-item__content{ /deep/ .el-collapse-item__content {
text-align: left; text-align: left;
} }
.buttonContainer{ .buttonContainer {
height: calc(100% - 90px); height: calc(100% - 90px);
overflow-y: auto; overflow-y: auto;
text-align: left; text-align: left;
} }
.containerLeft{ .containerLeft {
width: 20%; width: 20%;
height: 100%; height: 100%;
border-right: 2px solid #ccc; border-right: 2px solid #ccc;
} }
.containerCenter{ .containerCenter {
width: 35%; width: 35%;
height: 100%; height: 100%;
border-right: 2px solid #ccc; border-right: 2px solid #ccc;
overflow-y: auto; overflow-y: auto;
} }
.containerRight{ .containerRight {
width: 45%; width: 45%;
height: 100%; height: 100%;
} }
.el-button--primary{ .el-button--primary {
background: rgba(13,134,127,1); background: rgba(13, 134, 127, 1);
color: #fff; color: #fff;
border: 0; border: 0;
} }
</style> </style>
<template> <template>
<div class="tab4"> <div class="tab4">
<div class="containerLeft"> <div class="containerLeft">
<p style="text-align: left;margin-left: 20px;">业务域</p> <p style="text-align: left; margin-left: 20px">业务域</p>
<el-divider></el-divider> <el-divider></el-divider>
<div class="buttonContainer"> <div class="buttonContainer">
<span v-for="item in leftData" :key="item.assetId"> <span v-for="item in leftData" :key="item.assetId">
<el-button style="margin: 10px 20px;" @click="showCurrent(item)">{{ item.assetName }}</el-button> <el-button style="margin: 10px 20px" @click="showCurrent(item)">{{
item.assetName
}}</el-button>
</span> </span>
</div> </div>
</div> </div>
<div class="containerCenter"> <div class="containerCenter">
<el-collapse accordion v-for="item in centerData" :key="item.assetId" style="margin-bottom: 20px;"> <el-collapse
accordion
v-for="item in centerData"
:key="item.assetId"
style="margin-bottom: 20px"
>
<el-collapse-item> <el-collapse-item>
<template slot="title"> <template slot="title">
<div style="width: 100%;display: flex;align-items: center;padding-left: 20px;"> <div
style="
width: 100%;
display: flex;
align-items: center;
padding-left: 20px;
"
>
<el-button size="medium">{{ item.assetName }}</el-button> <el-button size="medium">{{ item.assetName }}</el-button>
<p style="width: 76%;margin-left: 20px;border-top: 1px dotted #000;"></p> <p
style="
width: 76%;
margin-left: 20px;
border-top: 1px dotted #000;
"
></p>
</div> </div>
</template> </template>
<span v-for="item2 in item.children" :key="item2.assetId"> <span v-for="item2 in item.children" :key="item2.assetId">
<el-button style="margin: 10px 20px;">{{ item2.assetName }}</el-button> <el-button style="margin: 10px 20px">{{
item2.assetName
}}</el-button>
</span> </span>
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
</div> </div>
<div class="containerRight"> <div class="containerRight">
<div id="echartsContainer4" style="width: 800px;height: 500px;"></div> <div id="echartsContainer4" style="width: 800px; height: 500px"></div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { import { archiAssetShowTree } from '@/api/index.js'
archiAssetShowTree import { MessageBox, Message } from 'element-ui'
} from '@/api/index.js'; export default {
import { MessageBox, Message } from 'element-ui';
export default {
name: 'tab4', name: 'tab4',
components: { components: {},
},
data() { data() {
return { return {
leftData: [], leftData: [],
centerData: [] centerData: [],
}; }
}, },
mounted(){ mounted() {
this.echarts1(); this.echarts1()
this.getLeftData(); this.getLeftData()
}, },
methods: { methods: {
showCurrent(data) { showCurrent(data) {
this.centerData = data.children; this.centerData = data.children
}, },
getLeftData() { getLeftData() {
const params = { const params = {
"assertType": "ARCHI_TECHNOLOGY" assertType: 'ARCHI_TECHNOLOGY',
} }
archiAssetShowTree(params).then(res => { archiAssetShowTree(params).then((res) => {
if(res.code == 200) { if (res.code == 200) {
this.leftData = res.data; this.leftData = res.data
}else { } else {
Message({ Message({
type: 'error', type: 'error',
message: res.msg message: res.msg,
}); })
} }
}) })
}, },
echarts1() { echarts1() {
this.myChart = echarts.init(document.getElementById('echartsContainer4')); this.myChart = this.$echarts.init(
document.getElementById('echartsContainer4'),
)
var option = { var option = {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { axisPointer: {
type: 'shadow' type: 'shadow',
} },
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
}, },
yAxis: { yAxis: {
type: 'value' type: 'value',
}, },
series: [ series: [
{ {
data: [120, 200, 150, 80, 70, 110, 130], data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar' type: 'bar',
},
],
} }
]
};
this.myChart.setOption(option); this.myChart.setOption(option)
}, },
} },
} }
</script> </script>
<style> <style>
.el-tabs__nav{ .el-tabs__nav {
margin-left: 20px; margin-left: 20px;
} }
</style> </style>
<style scoped> <style scoped>
.tab4{ .tab4 {
height: calc(100% - 20px); height: calc(100% - 20px);
display: flex; display: flex;
} }
/deep/ .el-collapse-item__content{ /deep/ .el-collapse-item__content {
text-align: left; text-align: left;
} }
.buttonContainer{ .buttonContainer {
height: calc(100% - 90px); height: calc(100% - 90px);
overflow-y: auto; overflow-y: auto;
text-align: left; text-align: left;
} }
.containerLeft{ .containerLeft {
width: 20%; width: 20%;
height: 100%; height: 100%;
border-right: 2px solid #ccc; border-right: 2px solid #ccc;
} }
.containerCenter{ .containerCenter {
width: 35%; width: 35%;
height: 100%; height: 100%;
border-right: 2px solid #ccc; border-right: 2px solid #ccc;
overflow-y: auto; overflow-y: auto;
} }
.containerRight{ .containerRight {
width: 45%; width: 45%;
height: 100%; height: 100%;
} }
.el-button--primary{ .el-button--primary {
background: rgba(13,134,127,1); background: rgba(13, 134, 127, 1);
color: #fff; color: #fff;
border: 0; border: 0;
} }
</style> </style>
<template> <template>
<div class="tab5"> <div class="tab5">
<div class="containerLeft"> <div class="containerLeft">
<p style="text-align: left;margin-left: 20px;">业务域</p> <p style="text-align: left; margin-left: 20px">业务域</p>
<el-divider></el-divider> <el-divider></el-divider>
<div class="buttonContainer"> <div class="buttonContainer">
<span v-for="item in leftData" :key="item.assetId"> <span v-for="item in leftData" :key="item.assetId">
<el-button style="margin: 10px 20px;" @click="showCurrent(item)">{{ item.assetName }}</el-button> <el-button style="margin: 10px 20px" @click="showCurrent(item)">{{
item.assetName
}}</el-button>
</span> </span>
</div> </div>
</div> </div>
<div class="containerCenter"> <div class="containerCenter">
<el-collapse accordion v-for="item in centerData" :key="item.assetId" style="margin-bottom: 20px;"> <el-collapse
accordion
v-for="item in centerData"
:key="item.assetId"
style="margin-bottom: 20px"
>
<el-collapse-item> <el-collapse-item>
<template slot="title"> <template slot="title">
<div style="width: 100%;display: flex;align-items: center;padding-left: 20px;"> <div
style="
width: 100%;
display: flex;
align-items: center;
padding-left: 20px;
"
>
<el-button size="medium">{{ item.assetName }}</el-button> <el-button size="medium">{{ item.assetName }}</el-button>
<p style="width: 76%;margin-left: 20px;border-top: 1px dotted #000;"></p> <p
style="
width: 76%;
margin-left: 20px;
border-top: 1px dotted #000;
"
></p>
</div> </div>
</template> </template>
<span v-for="item2 in item.children" :key="item2.assetId"> <span v-for="item2 in item.children" :key="item2.assetId">
<el-button style="margin: 10px 20px;">{{ item2.assetName }}</el-button> <el-button style="margin: 10px 20px">{{
item2.assetName
}}</el-button>
</span> </span>
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
</div> </div>
<div class="containerRight"> <div class="containerRight">
<div id="echartsContainer5" style="width: 800px;height: 500px;"></div> <div id="echartsContainer5" style="width: 800px; height: 500px"></div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { import { archiAssetShowTree } from '@/api/index.js'
archiAssetShowTree import { MessageBox, Message } from 'element-ui'
} from '@/api/index.js'; export default {
import { MessageBox, Message } from 'element-ui';
export default {
name: 'tab5', name: 'tab5',
components: { components: {},
},
data() { data() {
return { return {
leftData: [], leftData: [],
centerData: [] centerData: [],
}; }
}, },
mounted(){ mounted() {
this.echarts1(); this.echarts1()
this.getLeftData(); this.getLeftData()
}, },
methods: { methods: {
showCurrent(data) { showCurrent(data) {
this.centerData = data.children; this.centerData = data.children
}, },
getLeftData() { getLeftData() {
const params = { const params = {
"assertType": "ARCHI_SAFE" assertType: 'ARCHI_SAFE',
} }
archiAssetShowTree(params).then(res => { archiAssetShowTree(params).then((res) => {
if(res.code == 200) { if (res.code == 200) {
this.leftData = res.data; this.leftData = res.data
}else { } else {
Message({ Message({
type: 'error', type: 'error',
message: res.msg message: res.msg,
}); })
} }
}) })
}, },
echarts1() { echarts1() {
this.myChart = echarts.init(document.getElementById('echartsContainer5')); this.myChart = this.$echarts.init(
document.getElementById('echartsContainer5'),
)
var option = { var option = {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { axisPointer: {
type: 'shadow' type: 'shadow',
} },
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
}, },
yAxis: { yAxis: {
type: 'value' type: 'value',
}, },
series: [ series: [
{ {
data: [120, 200, 150, 80, 70, 110, 130], data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar' type: 'bar',
},
],
} }
]
};
this.myChart.setOption(option); this.myChart.setOption(option)
}, },
} },
} }
</script> </script>
<style> <style>
.el-tabs__nav{ .el-tabs__nav {
margin-left: 20px; margin-left: 20px;
} }
</style> </style>
<style scoped> <style scoped>
.tab5{ .tab5 {
height: calc(100% - 20px); height: calc(100% - 20px);
display: flex; display: flex;
} }
.buttonContainer{ .buttonContainer {
height: calc(100% - 90px); height: calc(100% - 90px);
overflow-y: auto; overflow-y: auto;
text-align: left; text-align: left;
} }
/deep/ .el-collapse-item__content{ /deep/ .el-collapse-item__content {
text-align: left; text-align: left;
} }
.containerLeft{ .containerLeft {
width: 20%; width: 20%;
height: 100%; height: 100%;
border-right: 2px solid #ccc; border-right: 2px solid #ccc;
} }
.containerCenter{ .containerCenter {
width: 35%; width: 35%;
height: 100%; height: 100%;
border-right: 2px solid #ccc; border-right: 2px solid #ccc;
overflow-y: auto; overflow-y: auto;
} }
.containerRight{ .containerRight {
width: 45%; width: 45%;
height: 100%; height: 100%;
} }
.el-button--primary{ .el-button--primary {
background: rgba(13,134,127,1); background: rgba(13, 134, 127, 1);
color: #fff; color: #fff;
border: 0; border: 0;
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!