Authored by 王涛

对比分析

Showing 17 changed files with 986 additions and 30 deletions
... ... @@ -4,7 +4,6 @@
/*最外层样式*/
.container{
background: white;
background-color: #CCCCCC;
padding: 3px 3px;
width:calc(100% - 10px);
... ...
... ... @@ -25,7 +25,12 @@
</slot>
</template>
</el-table-column>
<slot name="tools" v-if="columns.length > 0" ></slot>
<el-table-column v-if="showTools && columns.length > 0" label="操作" width="80">
<template #default="scope">
<slot name="tools" :scope="scope" ></slot>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<div style='text-align: center;background-color: white' v-if="showPage">
... ...
... ... @@ -76,6 +76,10 @@ export default {
type: Number,
default: window.innerWidth
},
showTools:{
type: Boolean,
default: false
},
},
data() {
... ...
<title>对比分析配置</title>
<iframe src="/vue3/index.html#/analysis" class="layadmin-iframe" style="height: 99.5%!important;"/>
\ No newline at end of file
<iframe src="/vue3/index.html#/analysis" class="layadmin-iframe" style="height: 99.5%!important;"/>
... ...
<title>对比分析预览</title>
<script type="text/html" template>
{{#
var viewURL = window.location.origin + '/vue3/index.html#/analysis/view';
layui.use(['sessions','common','admin'], function () {
var $ = layui.$;
var common = layui.common;
var admin = layui.admin;
var arr = [];
window.location.hash.split('/').forEach(function (v, i) {
if (v.indexOf('=') != -1) {
arr.push(v);
}
});
if (arr.length > 0) {
viewURL += "?" + arr.join("&");
}
$('#actionListIframe').attr('src',viewURL);
});
}}
<iframe id="actionListIframe" src="{{viewURL}}" frameborder="0" class="layadmin-iframe" style="height: 99.5%!important;"></iframe>
</script>
... ...
<div class="analysis-index-container">
<div class="iconAdd">
点击添加比对分析
</div>
</div>
\ No newline at end of file
export default {
name: 'addIndex',
template: '',
components:{},
data () {
return {
}
},
setup(){
}
}
\ No newline at end of file
<div :style="{'height':'380px','padding':'6px'}">
<slot name="title">
<div style="text-align: left;margin-bottom: 10px;padding-left: 10px;">对比分析场景</div>
</slot>
<el-row :gutter="5">
<el-col :span="4">
<div style="display: flex;flex-wrap: wrap;width: 100%">
<slot name="lineName">
分析名称
</slot>
</div>
</el-col>
<el-col :span="20" style="text-align: right;padding-right: 10px">
<slot name="timeRange"></slot>
<slot name="frequency"></slot>
<slot name="tools"></slot>
</el-col>
</el-row>
<div :style="{'height':'300px','width':width + 'px'}" :id="id"></div>
</div>
... ...
export default {
name: 'analysisLineChars',
template: '',
components: {},
data() {
},
props: {
showTitle: {
type: Boolean,
default: false
},
title: {
type: String,
default: '示例折线图'
},
legend: {
type: Object,
default: {
data: ['示例1']
}
},
xAxis: {
type: Array,
default: ['示例1', '示例2', '示例3', '示例4', '示例5', '示例6']
},
series: {
default: [{
name: '示例1',
type: 'bar',
data: [5, 20, 36, 10, 10, 20]
}]
}
},
setup(props, {attrs, slots, emit}) {
const {proxy} = Vue.getCurrentInstance();
let height = Vue.ref(window.innerHeight - 10);
let width = Vue.ref(window.innerWidth - 50);
let id = Vue.ref('analysisLineChars'+(new Date()).getTime());
// echarts实例的dom
var myChart = null;
let init = () => {
if(myChart == null){
myChart = echarts.init(document.getElementById(id.value));
}
// 指定图表的配置项和数据
var option = {
title: {
text: props.title
},
grid: {
left: '1%',
right: '1%',
bottom: '1%',
containLabel: true,
},
tooltip: {},
legend: props.legend,
xAxis: {
data: props.xAxis
},
yAxis: {},
series: props.series
};
if (!props.showTitle) {
delete option.title;
}
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
}
// 挂载完
Vue.onMounted(() => {
init();
console.log('onMounted');
})
// 监听编辑状态
Vue.watch(
() => props.xAxis, (newValue, oldVlaue) => {
console.log("id=",id.value);
init();
}
);
return {
height,
width,
id
}
}
}
... ...
... ... @@ -48,7 +48,7 @@
<cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true"
:showBorder="true" :currentPage="currentPage" :loading="false"
:showPage="false" :height="(height - 20)">
:showPage="false" :showTools="true" :height="(height - 20)">
<template #default="{row,prop,column}">
<span v-if="prop == 'resListId'">{{currentNode.label}}</span>
<div v-else>
... ... @@ -128,7 +128,7 @@
</div>
</template>
<template #tools>
<!-- <template #tools>
<el-table-column fixed="right" label="操作" width="80" align="center">
<template #default="scope">
<el-button type="text" size="small" @click.prevent="deleteRow(row,scope.$index)">
... ... @@ -136,6 +136,11 @@
</el-button>
</template>
</el-table-column>
</template>-->
<template #tools="{scope}">
<el-button type="text" size="small" @click.prevent="deleteRow(scope.row,scope.$index)">
<i class="el-icon-delete"/>
</el-button>
</template>
</cm-table-page>
</div>
... ...
... ... @@ -108,14 +108,18 @@ const routes = [{
{
path: '/analysis',
name: 'analysis',
// component: () => myImport('views/analysis/components/addIndex/index')
component: () => myImport('views/analysis/index')
},
{
path: '/analysis/add',
name: 'analysisAdd',
component: () => myImport('components/page/analysis/add/index')
}
component: () => myImport('views/analysis/config/index')
},
{
path: '/analysis/view',
name: 'view',
component: () => myImport('views/analysis/view/index')
}
];
// hash模式: createWebHashHistory
... ...
... ... @@ -3,7 +3,7 @@
<div class="add-top">
<el-row>
<el-col :span="16" class="add-top-title">
<el-button type="primary">场景名称</el-button>
<el-input v-model="input" placeholder="请输入场景名称" />
</el-col>
<el-col :span="8" class="add-top-select">
<el-dropdown>
... ... @@ -172,4 +172,4 @@
</el-button>
</div>
</el-dialog>
</div>
\ No newline at end of file
</div>
... ...
... ... @@ -59,7 +59,6 @@ export default {
create: 'Create'
}
let columns = Vue.ref([
{
prop: 'busId',
label: '业务系统',
... ... @@ -438,4 +437,4 @@ export default {
},
}
}
\ No newline at end of file
}
... ...
<div class="container" :style="{'height':height+'px','max-height':height+'px'}">
<div class="cm-card" :style="{'min-height':height+'px','height':'100%'}">
<analysis-line :legend="lineChart.legend" :xAxis="lineChart.xAxis" :series="lineChart.series">
<template #lineName="scope">
<el-input v-model="form.scene.name" placeholder="请输入场景名称"/>
</template>
<template #tools="scope">
<el-button type="primary" style="margin-left: 10px" @click="showDialogForm(true)">保存</el-button>
</template>
<template #timeRange="scope">
<el-dropdown>
<el-button>
时间范围 <i class="el-icon el-icon-arrow-down"></i>
</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="timeRangeChange(item)" v-for="item in timeRangeArr"
:key="item.ddicId"
:command="{value:item.ddicCode,label:item.ddicName,flag:1}">
<el-radio v-model="form.scene.timeScope" :label="item.ddicCode">{{item.ddicName}}
</el-radio>
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</template>
<template #frequency="scope">
<el-dropdown style="margin-left: 10px">
<el-button>
聚合频率 <i class="el-icon el-icon-arrow-down"></i>
</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item v-for="item in frequencyArr"
:key="item.ddicId"
:command="{value:item.ddicCode,label:item.ddicName,flag:1}">
<el-radio v-model="form.scene.frequency" :label="item.ddicCode">{{item.ddicName}}
</el-radio>
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</template>
</analysis-line>
<el-divider content-position="left">
<div>
<i class="iconfont icon-liebiaomoshi"></i>
<span style="margin-left: 5px">查询条件</span>
</div>
</el-divider>
<div style="width: calc(100% - 12px);padding: 0px 6px">
<el-row :gutter="5">
<el-col :span="4">
<div style="display: flex;flex-wrap: wrap;width: 100%;padding-left: 15px;">
<el-dropdown>
<el-icon class="el-icon--right">
<arrow-down/>
</el-icon>
<cm-biz-type-tree-input multiple clearable collapseTags @callback="getBizType"/>
</el-dropdown>
<el-dropdown>
<el-icon class="el-icon--right">
<arrow-down/>
</el-icon>
<cm-res-type-tree-input multiple clearable collapseTags @callback="getResType"/>
</el-dropdown>
<el-dropdown>
<el-icon class="el-icon--right">
<arrow-down/>
</el-icon>
<cm-kpi-type-tree-input multiple clearable collapseTags @callback="getKpiType"/>
</el-dropdown>
<el-input v-model="keyWords" placeholder="输入关键字" style="margin-top: 15px;width: 225px;"/>
<div style="margin-top: 10px;text-align: center">
<el-button type="primary" @click="onReset()">重置</el-button>
<el-button type="primary" @click="onBtnSearch()" style="margin-left: 10px">查询</el-button>
</div>
</div>
</el-col>
<el-col :span="20">
<el-tabs v-model="activeName" @tab-click="tabClick">
<el-tab-pane label="已添加" name="first">
<cm-table-page :columns="columns" :dataList="tabFirstList" @loaddata="loadFirstList"
:showIndex="true"
:showBorder="true" :loading="false"
:showPage="false" :showTools="true" :height="(height - 500)">
<template #tools="{scope}">
<el-button type="text" size="small"
@click.prevent="deleteRes(scope.row,scope.$index)">
<i class="el-icon-delete"/> 移除
</el-button>
</template>
</cm-table-page>
</el-tab-pane>
<el-tab-pane label="未添加" name="second">
<cm-table-page :columns="columns" :dataList="tabSecondList" @loaddata="loadSecondList"
:showIndex="true"
:showBorder="true" :loading="false"
:showPage="false" :showTools="true" :height="(height - 500)">
<template #tools="{scope}">
<el-button type="text" size="small" @click.prevent="addRes(scope.row,scope.$index)">
<i class="el-icon-plus"/> 添加
</el-button>
</template>
</cm-table-page>
</el-tab-pane>
</el-tabs>
</el-col>
</el-row>
</div>
</div>
<cm-dialog title="保存场景" width="500px" :showDialogVisible="dialogFormVisible" @hidedialog="showDialogForm"
@okfunc="saveAnalysis">
<template v-slot>
<div style="display:inline-block;margin-bottom: 10px">
<el-radio-group v-model="isAdd" @change="analysisChange">
<el-radio :label="false" border>
新增场景分类
</el-radio>
<el-radio :label="true" border>
追加场景分类
</el-radio>
</el-radio-group>
</div>
<div v-if="!isAdd" style="padding: 3px 10px;">
<el-input v-model="form.parentName" placeholder="请输入场景分类"/>
</div>
<div v-else style="padding: 3px 10px;">
<el-select v-model="form.parentId" placeholder="请选择场景分类" style="width: 100%">
<el-option
v-for="item in parentList"
:key="item.id"
:label="item.configName"
:value="item.id">
</el-option>
</el-select>
</div>
<div style="padding: 3px 10px;">
<el-input v-model="form.scene.sort" type="number" placeholder="请输入排序"/>
</div>
</template>
</cm-dialog>
</div>
... ...
/**
* 时间范围:time_scope
* <p>
* 作者: Wang
* 时间:2021/11/20 16:13
*/
const timeRange = () => {
const {proxy} = Vue.getCurrentInstance();
let timeRangeArr = Vue.ref([]);
let loadTimeRange = (callback) => {
if (timeRangeArr.value.length > 0) {
return;
}
proxy.$http.post(`/api-web/manage/ddic/findSucDdics/time_scope`, {}, function (res) {
if (res && res.data) {
timeRangeArr.value = res.data;
if (callback) {
callback(res.data[0].ddicCode);
}
}
});
}
return {
timeRangeArr,
loadTimeRange
}
}
/**
* 契合频率
* <p>
* 作者: Wang
* 时间:2021/11/20 16:38
*/
const frequency = () => {
const {proxy} = Vue.getCurrentInstance();
let frequencyArr = Vue.ref([]);
let loadFrequency = (defCode, callback) => {
if (frequencyArr.value.lnegth > 0) {
return;
}
let param = {
ddicName: defCode
}
proxy.$http.get(`/api-web/ContrastAnalysis/selectTogetherRate`, param, function (res) {
if (res && res.data) {
frequencyArr.value = res.data;
if (callback) {
callback();
}
}
});
}
return {
frequencyArr,
loadFrequency
}
}
export default {
name: 'resIndex',
template: '',
components: {
'analysis-line': Vue.defineAsyncComponent(
() => myImport('components/page/analysis/lineChars/index')
),
},
data() {
return {
props: {
label: 'label',
children: 'children'
}
}
},
setup() {
const {proxy} = Vue.getCurrentInstance();
let height = Vue.ref(window.innerHeight - 10);
let columns = Vue.ref([
{
prop: 'busTypeName',
label: '业务系统',
sortable: true,
align: 'center',
},
{
prop: 'resTypeName',
label: '资源类型',
sortable: true,
align: 'center',
},
{
prop: 'resName',
label: '资源名称',
sortable: true,
align: 'center',
},
{
prop: 'ip',
label: 'ip地址',
sortable: true,
align: 'center',
},
{
prop: 'kpiName',
label: '指标名称',
sortable: true,
align: 'center',
},
{
prop: 'flag',
label: '指标标识',
sortable: true,
align: 'center',
}
]);
var id = proxy.$global.getQueryVariable('configId');
let resTypeArr = Vue.ref([]);
let kpiTypeArr = Vue.ref([]);
let busTypeArr = Vue.ref([]);
let keyWords = Vue.ref('');
let config = Vue.ref(id);
let lineChart = Vue.ref({
legend: {
data: []
},
xAxis: [],
series: [{
name: '',
type: 'bar',
data: []
}]
});
let activeName = Vue.ref('first');
const tabFirstList = Vue.ref([]);
const tabSecondList = Vue.ref([]);
let dialogFormVisible = Vue.ref(false);
let parentList = Vue.ref([]);
let isAdd = Vue.ref(false);
let form = Vue.ref({
parentId: '',
parentName: '',
desc: '',
scene: {
name: '',
desc: '',
sort: 1,
timeScope: '',
frequency: '',
},
resourceList: []
});
let getResType = (arr) => {
console.log(arr);
var types = arr.map(function (v) {
return v.id;
});
resTypeArr.value = types;
loeadTable();
}
let getKpiType = (arr) => {
console.log(arr);
var types = arr.map(function (v) {
e
return v.kpiId;
});
kpiTypeArr.value = types;
loeadTable();
}
let getBizType = (arr) => {
console.log(arr);
var types = arr.map(function (v) {
return v.busId;
});
busTypeArr.value = types;
loeadTable();
}
// 查询参数
let params = {
keyWords: keyWords.value,
resType: resTypeArr.value.join(','),
kpiType: kpiTypeArr.value.join(','),
bizType: busTypeArr.value.join(','),
configId: config.value
}
let loadFirstList = (reload) => {
if (!reload && tabFirstList.value.length > 0) {
return false;
}
proxy.$http.get(`/api-web/ContrastAnalysis/added`, params, function (res) {
if (res && res.data) {
tabFirstList.value = res.data;
}
});
}
let loadSecondList = (reload) => {
if (!reload && tabSecondList.value.length > 0) {
return false;
}
proxy.$http.get(`/api-web/ContrastAnalysis/notAdded`, params, function (res) {
if (res && res.data) {
tabSecondList.value = res.data;
}
});
}
let tabClick = (tab, event) => {
let name = tab.paneName;
if (name == 'first') {
loadFirstList(false);
} else {
loadSecondList(false);
}
}
let loeadTable = (reload) => {
if (activeName.value == 'first') {
loadFirstList(reload);
} else {
loadSecondList(reload);
}
}
const {
frequencyArr,
loadFrequency
} = frequency();
const {
timeRangeArr,
loadTimeRange,
} = timeRange();
let timeRangeChange = (item) => {
let code = item.ddicCode;
loadFrequency(code);
}
let addRes = (row, index) => {
tabFirstList.value.push(row);
activeName.value = 'first'
//proxy.$global.showMsg("添加成功!");
// 加载折线图
getChartData();
}
let deleteRes = (row, index) => {
proxy.$global.confirm("确认删除资源吗?", function () {
// proxy.$global.showMsg("删除成功!")
tabFirstList.value.splice(index, 1);
getChartData();
})
}
let getChartData = () => {
let timeScope = form.value.scene.timeScope.replaceAll("time_scope_", "")
if (timeScope == '') {
proxy.$global.showMsg("请选择时间范围!", "warning");
return;
}
if (form.value.scene.frequency == '') {
proxy.$global.showMsg("请选择契合频率!", "warning");
return;
}
let resList = tabFirstList.value.map(function (v) {
return {resId: v.resId, kpiId: v.kpiId, kpiFlg: v.flag}
});
// let p = {
// timeScope: timeScope,
// frequency: form.value.scene.frequency,
// resource: resList,
// type : 'avg'
// }
let p = {
"timeScope": timeScope,
"frequency": form.value.scene.frequency,
"resource": [
{
"resId": "F6F24DADC01ADE5DD9583144BE6E8E15",
"kpiId": "KPI20352505",
"kpiFlg": "mem"
},
{
"resId": "C5DC239D719ACAB61231ACED7CE68CD1",
"kpiId": "KPI7054BC34",
"kpiFlg": "cpu"
}
],
"type": "avg"
}
proxy.$http.post(`/api-web/ContrastAnalysis/getLineData`, p, function (res) {
if (res && res.map) {
let map = res.map;
let legend = map.legend;
//let units = map.units;
let xAxis = map.x;
let yArr = map.y;
//
let series = [];
legend.forEach(function (v, i) {
series.push({
name: v,
type: 'line',
data: yArr[i]
});
})
lineChart.value = {
legend: {
data: legend
},
xAxis: xAxis,
series: series
}
}
});
}
// 点击按钮搜索
let onBtnSearch = () => {
loeadTable(true);
}
let onReset = () => {
keyWords.value = '';
resTypeArr.value = [];
kpiTypeArr.value = [];
busTypeArr.value = [];
}
let showDialogForm = (flg) => {
dialogFormVisible.value = flg;
}
let analysisChange = (val) => {
if (val && val === true && parentList.value.length == 0) {
// 加载数据
proxy.$http.post(`/api-web/ContrastAnalysis/selectScene`, {}, function (res) {
if (res && res.data) {
parentList.value = res.data;
}
});
}
}
let saveAnalysis = () => {
let formVal = form.value;
let parentName = formVal.parentName;
let parentId = formVal.parentId;
let name = formVal.scene.name;
let sort = formVal.scene.sort;
let timeScope = formVal.scene.timeScope;
let frequency = formVal.scene.frequency;
let resourceList = tabFirstList.value;
if(name == ''){
proxy.$global.showMsg("请输入场景名称!","warning");
return;
}
if(resourceList && resourceList.length == 0){
proxy.$global.showMsg("请添加资源!","warning");
return;
}
let resList = resourceList.map(function (v) {
return {resId: v.resId, kpiId: v.kpiId, kpiFlg: v.flag,resType:v.resType,kpiUnit:v.kpiUnit}
});
let addParam = {
scene: [{
name: name,
desc: '',
sort: sort,
timeScope: timeScope,
frequency: frequency,
resourceList: resList
}]
}
let url = '';
if (isAdd.value == false) {
if(parentName == ''){
proxy.$global.showMsg("请输入场景分类!","warning");
return;
}
addParam['parentName'] = parentName;
url = '/api-web/ContrastAnalysis/insertScene';
} else {
if(parentId == ''){
proxy.$global.showMsg("请选择场景分类!","warning");
return;
}
addParam['parentId'] = parentId;
url = '/api-web/ContrastAnalysis/updateNode';
}
proxy.$http.post(url, addParam, function (res) {
if (res && res.success) {
proxy.$global.showMsg("添加成功!");
setTimeout(function () {
window.top.location.href = window.top.location.origin + "/#/analysis/index"
}, 1500)
}
});
}
// 挂载完
Vue.onMounted(() => {
if(!id){
activeName.value = 'second';
}
loeadTable();
// 先加载时间范围,然后在加载
loadTimeRange(function (defCode) {
form.value.scene.timeScope = defCode;
loadFrequency(defCode, function () {
if (frequencyArr.value.length > 0) {
form.value.scene.frequency = frequencyArr.value[0].ddicCode;
}
});
});
console.log('onMounted');
})
return {
height,
lineChart,
form,
columns,
tabFirstList,
tabSecondList,
addRes,
deleteRes,
onBtnSearch,
onReset,
getResType,
getKpiType,
getBizType,
keyWords,
loadFirstList,
loadSecondList,
activeName,
tabClick,
frequencyArr,
loadFrequency,
timeRangeArr,
loadTimeRange,
timeRangeChange,
isAdd,
analysisChange,
dialogFormVisible,
showDialogForm,
saveAnalysis,
parentList
}
}
}
... ...
<div class="container" :style="{'height':height+'px','max-height':height+'px'}">
<div class="cm-card" :style="{'min-height':height+'px','max-height':height+'px','height':'100%'}">
<div v-for="(item,index) in childArr">
<analysis-line :legend="lineChart[item.node.id].legend" :xAxis="lineChart[item.node.id].xAxis" :series="lineChart[item.node.id].series">
<template #title="scope" >
{{ index == 0 ? item.node.configName : '' }}
</template>
<template #lineName="scope">
{{ item.node.configName }}
</template>
<template #timeRange="scope">
{{ item.node.timeScope }}
</template>
<template #frequency="scope">
{{ item.node.frequency }}
</template>
<template #tools="scope">
<router-link :to="'/analysis/add?configId=' + item.node.id " class="analysis link-type">
编辑
</router-link>
</template>
</analysis-line>
<el-divider content-position="left">
<!--<div>
<i class="iconfont icon-liebiaomoshi"></i>
<span style="margin-left: 5px">查询条件</span>
</div>-->
</el-divider>
</div>
</div>
</div>
... ...
export default {
name: 'analysisViewIndex',
template: '',
components: {
'analysis-line': Vue.defineAsyncComponent(
() => myImport('components/page/analysis/lineChars/index')
)
},
data() {
return {}
},
setup() {
const {proxy} = Vue.getCurrentInstance();
let height = Vue.ref(window.innerHeight - 10);
let parentInfo = Vue.ref([]);
let childArr = Vue.ref({});
let lineChart = Vue.ref({});
var id = proxy.$global.getQueryVariable('id');
if(id && id == ''){
proxy.$global.showMsg("获取场景信息异常,请联系管理员!","warning");
return;
}
let loadDetail = () => {
// 加载数据
proxy.$http.get(`/api-web/ContrastAnalysis/getNode`, {id:id}, function (res) {
if (res && res.map) {
let child = res.map.sNode;
let parentList = res.map.pNode;
parentInfo.value = parentList;
childArr.value =child;
child.forEach(function (v){
getChartData(v);
})
}
});
}
let getChartData = (v) => {
let nodeId = v.node.id;
let resource = v.resource;
lineChart.value[nodeId] = {
legend: {
data: []
},
xAxis: [],
series: []
}
let resList = resource.map(function (v) {
return {resId: v.resId, kpiId: v.kpiId, kpiFlg: v.flag}
});
// let p = {
// "timeScope": v.node.timeScope,
// "frequency": v.node.frequency,
// "resource": resList,
// "type": "avg"
// }
let p = {
"timeScope": 'DAY',
"frequency": '15',
"resource": [
{
"resId": "F6F24DADC01ADE5DD9583144BE6E8E15",
"kpiId": "KPI20352505",
"kpiFlg": "mem"
},
{
"resId": "C5DC239D719ACAB61231ACED7CE68CD1",
"kpiId": "KPI7054BC34",
"kpiFlg": "cpu"
}
],
"type": "avg"
}
proxy.$http.post(`/api-web/ContrastAnalysis/getLineData`, p, function (res) {
if (res && res.map) {
let map = res.map;
let legend = map.legend;
//let units = map.units;
let xAxis = map.x;
let yArr = map.y;
//
let series = [];
legend.forEach(function (v, i) {
series.push({
name: v,
type: 'line',
data: yArr[i]
});
})
lineChart.value[nodeId] = {
legend: {
data: legend
},
xAxis: xAxis,
series: series
}
}
},undefined,undefined,false);
}
// 挂载完
Vue.onMounted(() => {
loadDetail();
console.log('onMounted');
})
return {
height,
childArr,
parentInfo,
lineChart
}
}
}
... ...