|
|
@@ -41,6 +41,13 @@ export default defineComponent({
|
|
|
title: '组件支撑次数',
|
|
|
interval: null,
|
|
|
allTimes: ref(0),
|
|
|
+ objTypes: [
|
|
|
+ { type: '地图浏览工具', includes: ['地图浏览工具'], times: 0 },
|
|
|
+ { type: '服务加载工具', includes: ['服务加载工具'], times: 0 },
|
|
|
+ { type: 'GIS功能工具', includes: ['地图基础工具','GIS功能工具','测量工具','绘制工具'], times: 0 },
|
|
|
+ { type: '空间分析工具', includes: ['空间分析工具','空间分析'], times: 0 },
|
|
|
+ { type: '三维可视化效果工具', includes: ['底图和模型加载','覆盖物','天气效果','三维可视化效果工具'], times: 0 },
|
|
|
+ ],
|
|
|
});
|
|
|
const domRef = ref(null);
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
@@ -54,21 +61,21 @@ export default defineComponent({
|
|
|
let sum = 0;
|
|
|
let xAxisData = [],
|
|
|
seriesData = [];
|
|
|
- //const res = await queryApiUseCountDays()
|
|
|
- // if(res.dateArr){
|
|
|
- // res.dateArr.map(item=>{
|
|
|
- // const Arr = item.split('-')
|
|
|
- // xAxisData.push(`${Arr[1]}/${Arr[2]}`)
|
|
|
- // })
|
|
|
- // res.list.map(item=>{
|
|
|
- // seriesData.push(parseInt(item))
|
|
|
- // })
|
|
|
- // }
|
|
|
res.map((item) => {
|
|
|
- xAxisData.push(item['SOURCE']);
|
|
|
- seriesData.push(parseInt(item['SUM(NUM)']));
|
|
|
+ // xAxisData.push(item['SOURCE']);
|
|
|
+ // seriesData.push(parseInt(item['SUM(NUM)']));
|
|
|
sum += parseInt(item['SUM(NUM)']);
|
|
|
});
|
|
|
+ data.objTypes.map(item=>{
|
|
|
+ const objData = res.filter(re=>item.includes.indexOf(re['SOURCE']))
|
|
|
+ let times = 0
|
|
|
+ objData.map(od=>{
|
|
|
+ times+=parseInt(od['SUM(NUM)'])
|
|
|
+ })
|
|
|
+ xAxisData.push(item['type']);
|
|
|
+ seriesData.push(times);
|
|
|
+ })
|
|
|
+
|
|
|
data.allTimes = sum;
|
|
|
if (seriesData.length < 1 || xAxisData.length < 1) return;
|
|
|
const option = getOption(seriesData, xAxisData);
|