diff --git a/src/api/screen/index.ts b/src/api/screen/index.ts index 351b80e..478cd0e 100644 --- a/src/api/screen/index.ts +++ b/src/api/screen/index.ts @@ -32,5 +32,18 @@ export const ScreenApi = { }, getCenter: async (params: any) => { return await request.get({ url: `/system/big-view-data/getCenter`, params }) + }, + /** + * 获取地图数据 + * @param params + */ + getMapData: async (params: any) => { + return await request.get({ url: `/system/big-view-data/getMapData`, params }) + }, + /** + * 获取空气指标 + */ + getAirData: async (params: any) => { + return await request.get({ url: `/system/quality-collection/latest`, params }) } } diff --git a/src/assets/svgs/weather-fine.svg b/src/assets/svgs/weather-fine.svg deleted file mode 100644 index 5f63b4e..0000000 --- a/src/assets/svgs/weather-fine.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/assets/svgs/weather/feng.svg b/src/assets/svgs/weather/feng.svg new file mode 100644 index 0000000..91b0542 --- /dev/null +++ b/src/assets/svgs/weather/feng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/weather/qing.svg b/src/assets/svgs/weather/qing.svg new file mode 100644 index 0000000..bf224f7 --- /dev/null +++ b/src/assets/svgs/weather/qing.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/weather/xue.svg b/src/assets/svgs/weather/xue.svg new file mode 100644 index 0000000..64d9f9f --- /dev/null +++ b/src/assets/svgs/weather/xue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/weather/yin.svg b/src/assets/svgs/weather/yin.svg new file mode 100644 index 0000000..9957d44 --- /dev/null +++ b/src/assets/svgs/weather/yin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/weather/yu.svg b/src/assets/svgs/weather/yu.svg new file mode 100644 index 0000000..2df03dc --- /dev/null +++ b/src/assets/svgs/weather/yu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/UserInfo/src/UserInfo.vue b/src/layout/components/UserInfo/src/UserInfo.vue index 6c5e05f..b335b02 100644 --- a/src/layout/components/UserInfo/src/UserInfo.vue +++ b/src/layout/components/UserInfo/src/UserInfo.vue @@ -22,8 +22,6 @@ const avatar = computed(() => userStore.user.avatar || avatarImg) const realName = computed(() => userStore.user.realName ?? '管理员') const deptName = computed(() => userStore.user.deptName ?? '管理员') - - const loginOut = async () => { try { await ElMessageBox.confirm(t('common.loginOutMessage'), t('common.reminder'), { diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 9763b4c..4a5cde2 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -120,6 +120,7 @@ export enum DICT_TYPE { ENTERPRISES_QUA = 'enterprise_qua', //========== 任务 ========== SELECT_WEEK = 'select_week', + BIG_VIEW_WEEK='big_view_week',//大屏查询周期 // ========== SYSTEM 模块 ========== SYSTEM_USER_SEX = 'system_user_sex', diff --git a/src/views/enterprises/index.vue b/src/views/enterprises/index.vue index 52ceed9..d72d231 100644 --- a/src/views/enterprises/index.vue +++ b/src/views/enterprises/index.vue @@ -134,6 +134,7 @@ /> diff --git a/src/views/enterprises/update.vue b/src/views/enterprises/update.vue index 4e3c815..66b26be 100644 --- a/src/views/enterprises/update.vue +++ b/src/views/enterprises/update.vue @@ -68,17 +68,17 @@ :readonly="isView" /> - + diff --git a/src/views/screen/compenonts/airQuality.vue b/src/views/screen/compenonts/airQuality.vue index c469365..cb5581b 100644 --- a/src/views/screen/compenonts/airQuality.vue +++ b/src/views/screen/compenonts/airQuality.vue @@ -82,8 +82,8 @@ + diff --git a/src/views/screen/compenonts/leftwrapper.vue b/src/views/screen/compenonts/leftwrapper.vue index 714cbf2..3230884 100644 --- a/src/views/screen/compenonts/leftwrapper.vue +++ b/src/views/screen/compenonts/leftwrapper.vue @@ -3,10 +3,10 @@ - + - + @@ -22,15 +22,17 @@ let observer: Nullable = null const row1Options = ref({ grid: { - top: 40, + top: 10, bottom: 0, - left: 10, + left: 0, right: 10, containLabel: true }, xAxis: { - type: 'category', - data: ['日常任务', '周期任务', '污染防治', '环境监测', '排污管控'], + type: 'value', + max: (v) => { + return Math.floor(v.max + (v.max % 10)) + }, axisTick: { show: false }, @@ -38,6 +40,9 @@ const row1Options = ref({ show: false }, axisLine: { + show: true, + symbol: ['none', 'arrow'], + symbolSize: [5, 5], lineStyle: { color: 'rgba(255, 255, 255, 0.20)' } @@ -59,7 +64,17 @@ const row1Options = ref({ } }, axisLabel: { - show: false + show: true, + color: '#fff', + fontSize: 12 + }, + axisLine: { + show: true, + symbol: ['none', 'arrow'], + symbolSize: [5, 5], + lineStyle: { + color: 'rgba(255, 255, 255, 0.20)' + } }, splitLine: { show: true, @@ -68,50 +83,41 @@ const row1Options = ref({ } } }, - series: [ - { - type: 'bar', - data: [100, 90, 10, 90, 90, 20, 56, 89], - barWidth: 5, - itemStyle: { - color: { - type: 'linear', - x: 0, - y: 1, - x2: 0, - y2: 0, - colorStops: [ - { - offset: 0, - color: 'rgba(50, 215, 75, 0)' - }, - { - offset: 1, - color: 'rgba(50, 215, 75, 0.4)' - } - ] - } - } + tooltip: { + show: true, + trigger: 'item', + backgroundColor: 'rgba(29,183,57,0.91)', + borderColor: 'transparent', + formatter: (v) => { + return `${v.data[2].name}
任务数:${v.data[0]}
企业数:${v.data[1]}` }, + textStyle: { + color: '#fff' + } + }, + series: [ { name: '任务类型占比', type: 'scatter', - data: [100, 90, 10, 90, 90, 20, 56, 89], + data: [], symbol: 'image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAASOSURBVHgBzVhBbBNHFP0z610Ht4SkIieSxrRSpZJIlEOpzKElUlult1SFtjcKSs9FIucW7iCFM2mhtxSomlur5hDSQ61yaQ5JD0hVHBxOICVxkIN3vTP8N95dDMTJrOJEPMmenfXszvOfP///N4JSYqRI+aygESXpqCA6ybe6og+wqolKQpvPbE3T1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5NUokc4hoIczar2edSR+DSRYIWR/lQX/5pN0hFZH6MlyqakzYlBHkrQ/qc4E9aD7bbUk1CcTARii9I6peS6yQrSSY1RJGTs6Wm2+HoeIeRPWwZnIhYS+kYUJRuQBdjAYDoCxGQtl7uqi195YraaFzUwWewTKkOG5oRCchI0ZpHKqHI/I4kiyoThV3zcQyStKvWBxzlFxxSnzUfx7D+Ojv5fiN3tkKqAysejKOZo5QOsxz0brTtwOpFQDYZpcLigNs830JNnhzpoZxBkkTSRp6cTHmk9xRXBRnSHOR+CgAAAABJRU5ErkJggg==', - symbolSize: 15 - } - ], - legend: { - top: 0, - left: 'center', - show: true, - itemWidth: 15, - itemHeight: 15, - textStyle: { - color: '#fff' + symbolSize: 15, + symbolKeepAspect: true, + clip: false, + + label: { + show: true, + position: 'top', + textBorderColor: 'transparent', + color: 'white', + offset: [0, 0], + formatter: (v) => { + return `${v.data[2].name}` + } + } } - } + ] }) const row2Options = ref({ color: [ @@ -122,8 +128,8 @@ const row2Options = ref({ 'rgba(4, 180, 64, .2)' ], title: { - text: '500', - subtext: '入驻企业', + text: '', + subtext: '任务数', left: '49%', top: '35%', textAlign: 'center', @@ -150,32 +156,11 @@ const row2Options = ref({ formatter: '{b} : {c}', color: '#fff' }, - data: [ - { - value: 335, - name: '一大队' - }, - { - value: 310, - name: '二大队' - }, - { - value: 234, - name: '三大队' - }, - { - value: 135, - name: '四大队' - }, - { - value: 500, - name: '五大队' - } - ] + data: [] } ] }) -const row3Options:any = ref({ +const row3Options: any = ref({ grid: { top: 10, bottom: 10, @@ -186,7 +171,7 @@ const row3Options:any = ref({ yAxis: [ { type: 'category', - data: ['一大队', '二大队', '三大队', '四大队', '五大队'], + data: [], axisTick: { show: false }, @@ -203,7 +188,7 @@ const row3Options:any = ref({ }, { type: 'category', - data: ['1', '2', '3', '4', '5'], + data: [], axisTick: { show: false }, @@ -220,7 +205,6 @@ const row3Options:any = ref({ } ], xAxis: { - max: 110, type: 'value', axisTick: { show: false @@ -307,21 +291,9 @@ const row1Chart = ref() const row2Chart = ref() const row3Chart = ref() const initChart = () => { - // leftFirst() - // leftSecond() - // leftThird() - const row1Data=new Array(5).fill(1).map(i=>{ - return Math.floor(Math.random()*100) - }) - row1Options.value.series[0].data=row1Data - row1Options.value.series[1].data=row1Data - const row3Data=new Array(5).fill(1).map(i=>{ - return Math.floor(Math.random()*100) - }) - row3Options.value.series[1].data=row3Data - row3Options.value.series[2].data=row3Data - row3Options.value.yAxis[1].data=row3Data - + leftFirst() + leftSecond() + leftThird() } const handlerResize = () => { @@ -332,32 +304,46 @@ const handlerResize = () => { const queryParams: any = ref() -//左一数据 +//左一 const leftFirst = async () => { const data: any = await ScreenApi.getLeftFirst(queryParams.value) - row1Options.value.xAxis.data = data.map((i) => i.name) - row1Options.value.series[0].data = data.map((i) => i.value) - row1Options.value.series[1].data = data.map((i) => i.value) + row1Options.value.series[0].data = data.map((i) => { + return [ + i.taskCount, + i.enterpriseCount, + { + value: 10, + name: i.name + } + ] + }) } -//左二数据 +//左二 const leftSecond = async () => { const data = await ScreenApi.getLeftSecond(queryParams.value) - row2Options.value.title.text = data.enterpriseCount - row2Options.value.series[0].data = data.enterpriseCountGroup + row2Options.value.title.text = data.reduce((r, i) => r + i.value, 0) + row2Options.value.series[0].data = data.map((i) => { + return { + ...i, + name: i.label + } + }) } -//左三数据 +//左三 const leftThird = async () => { const data = await ScreenApi.getLeftThird(queryParams.value) + const max = Math.max(...data.map((i) => i.taskCount)) row3Options.value.yAxis[0].data = data.map((i) => i.name) - row3Options.value.yAxis[1].data = data.map((i) => i.execCount) - row3Options.value.series[1].data = data.map((i) => i.finishCount) + row3Options.value.yAxis[1].data = data.map((i) => i.taskCount) + row3Options.value.series[0].data = data.map(() => Math.floor(max * 1.1 + 1)) + row3Options.value.series[1].data = data.map((i) => i.taskCount) row3Options.value.series[2].data = data.map((i) => { return { name: i.name, - value: i.finishCount, - symbolSize: !i.finishCount ? 0 : [10, 15] + value: i.taskCount, + symbolSize: !i.taskCount ? 0 : [10, 15] } }) } diff --git a/src/views/screen/compenonts/map.vue b/src/views/screen/compenonts/map.vue index 37a9b9a..ad6ccaf 100644 --- a/src/views/screen/compenonts/map.vue +++ b/src/views/screen/compenonts/map.vue @@ -1,11 +1,10 @@ diff --git a/src/views/screen/compenonts/numbox.vue b/src/views/screen/compenonts/numbox.vue index 0295347..0cc7a13 100644 --- a/src/views/screen/compenonts/numbox.vue +++ b/src/views/screen/compenonts/numbox.vue @@ -15,7 +15,7 @@ getCenter()