Commit ddba1c75 authored by wuhao's avatar wuhao 🎯

asder

parent 86cad5fb
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: wuhao930406 1148547900@qq.com * @Author: wuhao930406 1148547900@qq.com
* @Date: 2023-08-16 11:24:18 * @Date: 2023-08-16 11:24:18
* @LastEditors: wuhao930406 1148547900@qq.com * @LastEditors: wuhao930406 1148547900@qq.com
* @LastEditTime: 2023-08-17 14:10:38 * @LastEditTime: 2023-08-17 17:01:37
* @FilePath: /vue3portal/src/viewsCN/dashboardC/layout.vue * @FilePath: /vue3portal/src/viewsCN/dashboardC/layout.vue
* @Description: * @Description:
* *
...@@ -35,13 +35,13 @@ const comps = { ...@@ -35,13 +35,13 @@ const comps = {
const state = reactive({ const state = reactive({
systemTitleConfig: { systemTitleConfig: {
ani:true, ani: true,
width: 800, width: 800,
dur: 6, dur: 6,
gradientReverse: true, gradientReverse: true,
decoration: true, decoration: true,
decorationColorAlt: true, decorationColorAlt: true,
gradientBG:true, gradientBG: true,
}, },
panelTitleConfig: { panelTitleConfig: {
...@@ -112,14 +112,14 @@ const state = reactive({ ...@@ -112,14 +112,14 @@ const state = reactive({
}, },
{ {
id: "l3", id: "l3",
title: "活跃教师榜", title: "活跃学生榜",
component: "echartBarHorizScroll", component: "echartHill",
border: "blank", border: "blank",
}, },
{ {
id: "l1", id: "l1",
title: "行业收入占比", title: "活跃教师榜",
component: "echartHill", component: "echartBarHorizScroll",
border: "blank", border: "blank",
}, },
], ],
......
<!--
* @Author: wuhao930406 1148547900@qq.com
* @Date: 2023-08-08 09:18:08
* @LastEditors: wuhao930406 1148547900@qq.com
* @LastEditTime: 2023-08-17 17:10:48
* @FilePath: /vue3portal/src/viewsCN/dashboardC/portlet/echarts-hill-group/echart-hill.vue
* @Description:
*
* Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
-->
<script setup> <script setup>
import symbols from "./svg" import { http } from "@/api/request";
const state=reactive({
chartData:{
xAxis: ['软件', '硬件', '服务', '安全', '广告', '专利', '许可', '投资'],
colors:[$c.aql4,$c.cbl4,$c.aql3,], const state = reactive({
data: [23, 40, 15, 12, 9, 7, 12, 5], chartData: {
symbolSize:[ legend: ['活跃学生榜'],
[20, 20], colors: [$c.bll4, $c.aql4, $c.ipl3, $c.cbl3,],
[18, 20],
[18, 20],
[18, 20],
[20, 14],
[16, 20],
[20, 20],
[20, 20],
]
}, },
chartOption:{ } chartOption: {}
}) })
const processData=()=>{ const processData = (dataList) => {
let {colors,xAxis,data,symbolSize}=state.chartData, let legend = state.chartData.legend,
processedData=[],subData=[] colors = state.chartData.colors,
processedData = []
data.forEach((item,i)=>{ legend.forEach((item, i) => {
subData.push({
value: data[i],
symbol: symbols['svg'+i],
symbolSize:symbolSize[i]
})
})
processedData.push({ processedData.push({
name: 'hill', name: legend[i],
type: 'pictorialBar', type: 'line',
barCategoryGap: '-130%', barWidth: 10,
// symbol: 'path://M0,10 L10,10 L5,0 L0,10 z', label: {
symbol: 'path://M0,10 L10,10 C5.5,10 5.5,5 5,0 C4.5,5 4.5,10 0,10 z', show: false,
itemStyle: { position: 'insideRight'
opacity: 0.5
}, },
emphasis: {
itemStyle: { itemStyle: {
opacity: 1 color: colors[i],
} borderRadius: 5
}, },
data: data, data: dataList?.map((item) => {
z: 10 return item.count;
}, })
{
name: 'glyph',
type: 'pictorialBar',
barGap: '-100%',
symbolPosition: 'end',
symbolSize: 50,
symbolOffset: [0, '-120%'],
data: subData
}) })
state.chartOption.series=processedData; })
state.chartOption.xAxis.data=xAxis; state.chartOption.series = processedData;
state.chartOption.xAxis.data = dataList?.map(it => it.userName);
state.chartOption.legend.data = legend;
state.chartOption.legend.show = false;
} }
const processOption=()=>{ const processOption = (dataList) => {
const {colors}=state.chartData state.chartOption = {
state.chartOption={ update: true,
update:false, // title:{ text:"barA", left:200, top:0, textStyle:{ color:$c.gyl3, fontSize:16, fontWeight:"normal" }, },
title:{ text:"单位:万元", right:0, top:0, textStyle:{ fontSize:16, fontWeight:"normal" }, },
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { axisPointer: {
type: 'none' type: 'shadow'
},
formatter: function (params) {
return params[0].name + ': ' + params[0].value;
} }
}, },
legend: {
show: true,
data: [],
top: 0,
right: 10,
},
// toolbox: { feature: { magicType: { type: ['line', 'bar'] } }, },
grid: { grid: {
left: '5%', left: '16px',
right: '8%', right: '16px',
bottom: '8%', bottom: '5%',
top: "25%", top: "25%",
containLabel: true containLabel: true
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
splitNumber: 3, splitNumber: 3,
axisLabel: { axisLabel: { align: 'right' },
show:false
}
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
boundaryGap: true,
data: [], data: [],
axisTick: { show: false }, axisLabel: { align: 'center' },
axisLine: { show:false, },
splitLine: { show:false, },
axisLabel: {
align: 'center'
}
}, },
color:colors,
series: [] series: []
} }
processData() processData(dataList)
} }
onMounted(() => { onMounted(() => {
processOption(); //processOption();
http("POST", "/index/statistics/studentVisit", {}).then((res) => {
processOption(res?.data?.dataList);
})
}) })
</script> </script>
<template> <template>
<echartsInit :chartOption="state.chartOption"></echartsInit> <echartsInit :chartOption="state.chartOption"></echartsInit>
</template> </template>
<style lang="less"> <style lang="less"></style>
</style>
/*
* @Author: wuhao930406 1148547900@qq.com
* @Date: 2023-08-08 09:18:08
* @LastEditors: wuhao930406 1148547900@qq.com
* @LastEditTime: 2023-08-17 17:11:38
* @FilePath: /vue3portal/vite.config.js
* @Description:
*
* Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
*/
import { defineConfig } from "vite"; import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue"; import vue from "@vitejs/plugin-vue";
import path from "path"; import path from "path";
export default defineConfig({ export default defineConfig({
server: { server: {
host: "127.0.0.1", host: "192.168.40.100",
proxy: { proxy: {
"/vstp/": { "/vstp/": {
target: "http://192.168.40.117:8044/vstp", target: "http://192.168.40.117:8044/vstp",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment