Commit 6c08af15 authored by 郭铭瑶's avatar 郭铭瑶 🤘
parents ec16d3b6 f2ea08ce
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
"countup.js": "^2.0.7", "countup.js": "^2.0.7",
"dayjs": "^1.10.4", "dayjs": "^1.10.4",
"echarts": "^5.0.1", "echarts": "^5.0.1",
"echarts-wordcloud": "^2.0.0",
"normalize.css": "^8.0.1", "normalize.css": "^8.0.1",
"qs": "^6.9.6", "qs": "^6.9.6",
"vue": "^3.0.5", "vue": "^3.0.5",
......
...@@ -48,4 +48,16 @@ export default { ...@@ -48,4 +48,16 @@ export default {
GET_DUTY_EVENTS: '/service-special-nandong/compair/getRanking/cmt', // 勤务分析 - 居委事件数量 GET_DUTY_EVENTS: '/service-special-nandong/compair/getRanking/cmt', // 勤务分析 - 居委事件数量
GET_DUTY_PLACES: '/service-special-nandong/compair/getRanking/addr', // 勤务分析 - 多发地点 GET_DUTY_PLACES: '/service-special-nandong/compair/getRanking/addr', // 勤务分析 - 多发地点
GET_DUTY_RANKING: '/service-special-nandong/compair/getRanking/all', // 勤务分析 - 排行 GET_DUTY_RANKING: '/service-special-nandong/compair/getRanking/all', // 勤务分析 - 排行
/** 公共管理 */
GET_YOUSUBIDA_RANK: '/service-special-nandong/compair/willReach', // 有诉必答-占比
GET_YOUSUBIDA_CLASSIFICATION_RANK:
'/service-special-nandong/compair/willReach/ranking', // 有诉必答-分类排行
GET_URGENTCASE: '/service-special-nandong/compairs', // 有诉必答-紧急案件
GET_TODAYCASE: '/service-special-nandong/compair/willTouch', // 有求必应-今日案件数
GET_STAGECASE: '/service-special-nandong/compair/willTouch/status', // 有求必应-各阶段案件数
GET_WORKSTATION: '/service-special-nandong/compair/willTouch/workStation', // 有求必应-工作站分类
GET_TRACKEVENT: '/api/service-special-nandong/compairs', // 有求必应-事件跟踪
GET_CASE_CLASSIFICATION_RANK: '/service-special-nandong/compair/analysis', // 案件分析-分类排行
GET_ADDR: '/service-special-nandong/compair/analysis/addr', // 案件分析-多发地点
} }
...@@ -8,7 +8,6 @@ export default { ...@@ -8,7 +8,6 @@ export default {
initData({ dispatch }: { dispatch: Dispatch }): void { initData({ dispatch }: { dispatch: Dispatch }): void {
dispatch('getPropertySummary') dispatch('getPropertySummary')
dispatch('getCaseList') dispatch('getCaseList')
// dispatch('GET_PUBLICSAFE_ECONOMIC')
}, },
// 物业三架马车数据 (缺交叉任职数) // 物业三架马车数据 (缺交叉任职数)
async getPropertySummary({ commit }: { commit: Commit }): Promise<void> { async getPropertySummary({ commit }: { commit: Commit }): Promise<void> {
...@@ -218,7 +217,7 @@ export default { ...@@ -218,7 +217,7 @@ export default {
const { content } = ( const { content } = (
await ajax.get({ url: api.GET_PUBLICSAFE_OUTHOUSEWALL }) await ajax.get({ url: api.GET_PUBLICSAFE_OUTHOUSEWALL })
).data ).data
// console.log(content) // console.log(content, '房屋外立面')
commit('SET_PUBLICSAFE_OUTHOUSEWALL', content) commit('SET_PUBLICSAFE_OUTHOUSEWALL', content)
}, },
// 公共服务 - 重点关注楼宇 // 公共服务 - 重点关注楼宇
...@@ -240,7 +239,7 @@ export default { ...@@ -240,7 +239,7 @@ export default {
const { content } = ( const { content } = (
await ajax.get({ url: api.GET_PUBLICSAFE_PIEDATA }) await ajax.get({ url: api.GET_PUBLICSAFE_PIEDATA })
).data ).data
// console.log(content) // console.log(content, 'pie')
commit('SET_PUBLICSAFE_PIEDATA', content) commit('SET_PUBLICSAFE_PIEDATA', content)
}, },
// 左侧公共 - 指挥体系 // 左侧公共 - 指挥体系
...@@ -415,4 +414,49 @@ export default { ...@@ -415,4 +414,49 @@ export default {
).data ).data
commit('SET_DUTY_RANKING', content) commit('SET_DUTY_RANKING', content)
}, },
/** 公共管理 */
async GET_YOUSUBIDA_RANK({ commit }: { commit: Commit }): Promise<void> {
// 有诉必答 - 占比
const { content } = (await ajax.get({ url: api.GET_YOUSUBIDA_RANK })).data
// console.log(content, '有诉必答 - 占比')
commit('SET_YOUSUBIDA_RANK', content)
},
async GET_YOUSUBIDA_CLASSIFICATION_RANK(
{
commit,
}: {
commit: Commit
},
managementType: string
): Promise<void> {
// 有诉必答 - 分类排行
const { content } = (
await ajax.get({
url: api.GET_YOUSUBIDA_CLASSIFICATION_RANK,
params: { managementType: managementType },
})
).data
// console.log(content, '有诉必答 - 分类排行')
commit('SET_YOUSUBIDA_CLASSIFICATION_RANK', content)
},
async GET_URGENTCASE(
{
commit,
}: {
commit: Commit
},
params: {
[key: string]: string
}
): Promise<void> {
// 有诉必答 - 紧急案件
const { content } = (
await ajax.get({
url: api.GET_URGENTCASE,
params,
})
).data
console.log(content, '有诉必答 - 紧急案件')
commit('SET_URGENTCASE', content)
},
} }
...@@ -45,6 +45,14 @@ export interface DutySumProp { ...@@ -45,6 +45,14 @@ export interface DutySumProp {
communityNum: number //小区管理数量 communityNum: number //小区管理数量
} }
export interface YousubidaRankProp {
comprehensiveNum: 0 //综合数量
comprehensiveDispatchNum: 0 //综合派遣数量
streetNum: 0 //街道数量
streetDispatchNum: 0 //街道派遣数量
communityDispatchNum: 0 //小区数量
communityNum: 0 //小区派遣数量
}
export interface DutyDataProp { export interface DutyDataProp {
week: { [key: string]: unknown }[] week: { [key: string]: unknown }[]
month: { [key: string]: unknown }[] month: { [key: string]: unknown }[]
...@@ -97,6 +105,11 @@ export interface GlobalStateProps { ...@@ -97,6 +105,11 @@ export interface GlobalStateProps {
dutyEvents: Partial<DutyDataProp> dutyEvents: Partial<DutyDataProp>
dutyPlaces: Partial<DutyDataProp> dutyPlaces: Partial<DutyDataProp>
dutyRanking: Partial<DutyDataProp> dutyRanking: Partial<DutyDataProp>
/** 公共管理 */
yousubidaRank: Partial<YousubidaRankProp>
classificationRank: any[]
urgentCase: any[]
} }
export default createStore<GlobalStateProps>({ export default createStore<GlobalStateProps>({
......
...@@ -7,6 +7,7 @@ import { ...@@ -7,6 +7,7 @@ import {
CombineProp, CombineProp,
DutySumProp, DutySumProp,
DutyDataProp, DutyDataProp,
YousubidaRankProp,
} from './index' } from './index'
export default { export default {
...@@ -184,4 +185,20 @@ export default { ...@@ -184,4 +185,20 @@ export default {
SET_DUTY_RANKING(state: GlobalStateProps, data: DutyDataProp): void { SET_DUTY_RANKING(state: GlobalStateProps, data: DutyDataProp): void {
state.dutyRanking = data state.dutyRanking = data
}, },
/** 公共管理 */
// 有诉必答-占比
SET_YOUSUBIDA_RANK(state: GlobalStateProps, data: YousubidaRankProp): void {
state.yousubidaRank = data
},
// 有诉必答-分类排行
SET_YOUSUBIDA_CLASSIFICATION_RANK(
state: GlobalStateProps,
data: unknown[]
): void {
state.classificationRank = data
},
// 有诉必答-紧急案件
SET_URGENTCASE(state: GlobalStateProps, data: unknown[]): void {
state.urgentCase = data
},
} }
...@@ -168,4 +168,7 @@ export default { ...@@ -168,4 +168,7 @@ export default {
dutyEvents: { day: [], week: [], month: [] }, dutyEvents: { day: [], week: [], month: [] },
dutyPlaces: { day: [], week: [], month: [] }, dutyPlaces: { day: [], week: [], month: [] },
dutyRanking: { day: [], week: [], month: [] }, dutyRanking: { day: [], week: [], month: [] },
yousubidaRank: {},
classificationRank: [],
urgentCase: [],
} as GlobalStateProps } as GlobalStateProps
<template> <template>
<m-card title="有诉必答"> <m-card title="有诉必答">
<div class="summary"> <div class="box">
<div v-if="Object.keys(rank).length > 0" class="summary">
<div v-for="item in summary" :key="item.name"> <div v-for="item in summary" :key="item.name">
<m-wave :value="item.percent" size=".34rem" /> <m-wave :value="item.percent" size=".34rem" />
<div> <div>
...@@ -10,7 +11,7 @@ ...@@ -10,7 +11,7 @@
</div> </div>
</div> </div>
<div class="manage"> <div class="manage">
<Tabs :list="tabList" /> <Tabs :list="tabList" @select="getCurTabKey" />
<div class="content"> <div class="content">
<SubTitle>响应度</SubTitle> <SubTitle>响应度</SubTitle>
<div v-if="showChart" class="chart"> <div v-if="showChart" class="chart">
...@@ -32,21 +33,31 @@ ...@@ -32,21 +33,31 @@
</div> </div>
<div class="emergency"> <div class="emergency">
<m-sub>紧急案件</m-sub> <m-sub>紧急案件</m-sub>
<div class="detail"> <m-scroll :limit="1" :length="1" :step="1" mode="2">
<div
v-for="item in urgentCase.slice(0, 1)"
:key="item"
class="detail"
>
<div> <div>
<p>综合管理 · 事件分类 · 来源</p> <p>
<span>上海市黄浦区北京东路31-91号益丰·外滩源</span> {{ item.managementType }}管理 · {{ item.businsessTypeLv1 }} ·
{{ item.source }}
</p>
<span>{{ item.address }}</span>
</div> </div>
<div> <div>
内容描述内容描述内容描述内容描述内容描述内容描述内容描述内容描述内容描述 {{ item.reportContent }}
</div>
</div> </div>
</m-scroll>
</div> </div>
</div> </div>
</m-card> </m-card>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, ref, computed } from 'vue' import { defineComponent, ref, computed, watch } from 'vue'
import Tabs, { TabsProp } from '../components/tabs.vue' import Tabs, { TabsProp } from '../components/tabs.vue'
import SubTitle from '../components/sub-title.vue' import SubTitle from '../components/sub-title.vue'
import { ECOption } from '@/components/MyComponent/MyChart/my-line.vue' import { ECOption } from '@/components/MyComponent/MyChart/my-line.vue'
...@@ -56,39 +67,139 @@ export default defineComponent({ ...@@ -56,39 +67,139 @@ export default defineComponent({
name: 'Complain', name: 'Complain',
components: { Tabs, SubTitle }, components: { Tabs, SubTitle },
setup() { setup() {
store.dispatch('GET_YOUSUBIDA_RANK')
store.dispatch('GET_YOUSUBIDA_CLASSIFICATION_RANK', '综合')
store.dispatch('GET_URGENTCASE', {
bxmaintainType: '1',
status_in: '待派遣,已派单',
acceptTime_gte: '2021-04-16',
pageSize: 110,
})
const rank = computed(() => store.state.yousubidaRank)
const classificationRank = computed(() => store.state.classificationRank)
const urgentCase = computed(() => store.state.urgentCase)
console.log(urgentCase)
const fontSize = computed(() => Math.floor((screen.height * 1.6) / 100)) const fontSize = computed(() => Math.floor((screen.height * 1.6) / 100))
const showChart = computed(() => store.state.curTheme === 'manage') const showChart = computed(() => store.state.curTheme === 'manage')
const summary = ref([
const summary = computed(() => {
// console.log(rank.value.streetDispatchNum)
// console.log(rank.value.streetNum)
// console.log(rank.value.streetDispatchNum / rank.value.streetNum)
return [
{ {
name: '街面管理', name: '街面管理',
value: 75, value: rank.value.streetDispatchNum,
percent: 60, percent: parseInt(
(rank.value.streetDispatchNum / rank.value.streetNum) * 100
),
}, },
{ {
name: '综合管理', name: '综合管理',
value: 56, value: rank.value.communityNum,
percent: 30, percent:
(rank.value.comprehensiveDispatchNum /
rank.value.comprehensiveNum) *
100,
}, },
{ {
name: '小区管理', name: '小区管理',
value: 85, value: rank.value.communityDispatchNum,
percent: 78, percent: parseInt(
(rank.value.communityDispatchNum / rank.value.communityNum) * 100
),
}, },
]) ]
})
const tabList = ref<TabsProp[]>([ const tabList = ref<TabsProp[]>([
{ {
key: 'all', key: '综合',
name: '综合管理', name: '综合管理',
}, },
{ {
key: 'street', key: '街面',
name: '街面管理', name: '街面管理',
}, },
{ {
key: 'community', key: '小区',
name: '小区管理', name: '小区管理',
}, },
]) ])
const tabKey = ref('综合')
const getCurTabKey = (item: string) => {
tabKey.value = item
store.dispatch('GET_YOUSUBIDA_CLASSIFICATION_RANK', item)
}
const classChartData = ref({
dimensions: [
{ name: 'class1', displayName: '分类1', max: 500 },
{ name: 'class2', displayName: '分类2', max: 500 },
{ name: 'class3', displayName: '分类3', max: 500 },
{ name: 'class4', displayName: '分类4', max: 500 },
{ name: 'class5', displayName: '分类5', max: 500 },
],
source: [
{
seriesName: '分类排行',
class1: 250,
class2: 200,
class3: 200,
class4: 300,
class5: 230,
},
],
})
// 监听年份切花更改检查楼数 隐患点数 危险点数
watch(
[() => classificationRank.value, () => tabKey.value],
([data, key]) => {
// console.log(data, key)
if (data.length === 0) return
const dimensions = [
{ name: 'class1', displayName: '分类1', max: 100 },
{ name: 'class2', displayName: '其他', max: 100 },
{ name: 'class3', displayName: '其他', max: 100 },
{ name: 'class4', displayName: '其他', max: 100 },
{ name: 'class5', displayName: '其他', max: 100 },
]
const source = [
{
seriesName: '分类排行',
class1: 0,
class2: 0,
class3: 0,
class4: 0,
class5: 0,
},
]
let max = data[0].num
for (let i = 0; i < data.length - 1; i++) {
max = max < data[i + 1].num ? data[i + 1].num : max
}
data.forEach((item, index) => {
dimensions[index].displayName = item.businsessType
dimensions[index].max = max
source[0]['class' + ++index] = item.num
})
classChartData.value = {
dimensions,
source,
}
},
{ immediate: true }
)
const responseChartData = ref({ const responseChartData = ref({
dimensions: [ dimensions: [
{ name: 'name', displayName: '坐标名' }, { name: 'name', displayName: '坐标名' },
...@@ -113,25 +224,7 @@ export default defineComponent({ ...@@ -113,25 +224,7 @@ export default defineComponent({
itemHeight: fontSize.value * 0.8, itemHeight: fontSize.value * 0.8,
}, },
}) })
const classChartData = ref({
dimensions: [
{ name: 'class1', displayName: '分类1', max: 500 },
{ name: 'class2', displayName: '分类2', max: 500 },
{ name: 'class3', displayName: '分类3', max: 500 },
{ name: 'class4', displayName: '分类4', max: 500 },
{ name: 'class5', displayName: '分类5', max: 500 },
],
source: [
{
seriesName: '分类排行',
class1: 250,
class2: 200,
class3: 200,
class4: 300,
class5: 230,
},
],
})
const chartOption2 = ref({ const chartOption2 = ref({
color: ['#FF9D27'], color: ['#FF9D27'],
legend: { show: false }, legend: { show: false },
...@@ -147,6 +240,9 @@ export default defineComponent({ ...@@ -147,6 +240,9 @@ export default defineComponent({
chartOption, chartOption,
classChartData, classChartData,
chartOption2, chartOption2,
rank,
urgentCase,
getCurTabKey,
} }
}, },
}) })
...@@ -154,19 +250,24 @@ export default defineComponent({ ...@@ -154,19 +250,24 @@ export default defineComponent({
<style lang="stylus" scoped> <style lang="stylus" scoped>
@import '../../components/MyComponent/main.styl' @import '../../components/MyComponent/main.styl'
.box
flex-direction column
display flex
height 100%
.summary .summary
height 8%
display flex display flex
justify-content space-between justify-content space-between
align-items center align-items center
margin-top .1rem margin-top 0.1rem
margin-bottom 0.1rem
>div >div
display flex display flex
align-items center align-items center
>div >div
margin-left .05rem margin-left 0.05rem
.count .count
font-size .12rem font-size 0.12rem
font-weight bold font-weight bold
p p
color #ccc color #ccc
...@@ -176,10 +277,10 @@ export default defineComponent({ ...@@ -176,10 +277,10 @@ export default defineComponent({
// margin-bottom .05rem // margin-bottom .05rem
.content .content
flex 1 flex 1
padding-left .1rem padding-left 0.1rem
.chart .chart
width 100% width 100%
height 43% height 40%
&.wrapper &.wrapper
display flex display flex
>div >div
...@@ -193,10 +294,10 @@ export default defineComponent({ ...@@ -193,10 +294,10 @@ export default defineComponent({
align-items center align-items center
span span
display inline-block display inline-block
width .06rem width 0.06rem
height @width height @width
border-radius 50% border-radius 50%
margin-right .1rem margin-right 0.1rem
background #826AFA background #826AFA
&:nth-of-type(2) > span &:nth-of-type(2) > span
background #E02020 background #E02020
...@@ -207,22 +308,23 @@ export default defineComponent({ ...@@ -207,22 +308,23 @@ export default defineComponent({
&:nth-of-type(5) > span &:nth-of-type(5) > span
background #32C5FF background #32C5FF
.emergency .emergency
overflow hidden height 25%
// overflow hidden
.detail .detail
display flex display flex
flex-direction column flex-direction column
padding .1rem padding 0.1rem
background url('@/assets/images/border2.png') 100% / 100% 100% no-repeat background url('@/assets/images/border2.png') 100% / 100% 100% no-repeat
margin-bottom .05rem margin-bottom 0.05rem
>div >div
flex 1 flex 1
&:first-child &:first-child
border-bottom .01rem solid $primary-border border-bottom 0.01rem solid $primary-border
padding-bottom .05rem padding-bottom 0.05rem
margin-bottom @padding-bottom margin-bottom @padding-bottom
span span
color #ccc color #ccc
p p
font-size .12rem font-size 0.12rem
font-weight bold font-weight bold
</style> </style>
This diff is collapsed.
...@@ -141,7 +141,7 @@ export default defineComponent({ ...@@ -141,7 +141,7 @@ export default defineComponent({
}) })
const clickStreetName = (item: any): void => { const clickStreetName = (item: any): void => {
searchModal.value = true searchModal.value = !searchModal.value
streetData.value = item streetData.value = item
} }
// const houseSum = ref<SummaryProp[]>([ // const houseSum = ref<SummaryProp[]>([
......
...@@ -46,7 +46,11 @@ ...@@ -46,7 +46,11 @@
<m-pie class="chart2" :dataset="pieData2" :option="pieOption" /> <m-pie class="chart2" :dataset="pieData2" :option="pieOption" />
</div> </div>
<div class="legend"> <div class="legend">
<div v-for="(item, i) in pieData2.source" :key="item.name"> <div
v-for="(item, i) in pieData2.source"
:key="item.name"
style="width: 70%"
>
<p> <p>
<span :style="{ background: pieOption.color[i][0] }" /> <span :style="{ background: pieOption.color[i][0] }" />
{{ item.name }} {{ item.name }}
...@@ -58,7 +62,11 @@ ...@@ -58,7 +62,11 @@
</div> </div>
</div> </div>
<div class="legendBottom"> <div class="legendBottom">
<div v-for="(item, i) in pieData1.source" :key="item.name"> <div
v-for="(item, i) in pieData1.source"
:key="item.name"
@click="changePie2(item)"
>
<p> <p>
<span :style="{ background: pieOption.color[i][0] }" /> <span :style="{ background: pieOption.color[i][0] }" />
<m-count class="count" :value="item.value" /> <m-count class="count" :value="item.value" />
...@@ -104,7 +112,7 @@ ...@@ -104,7 +112,7 @@
v-model="searchModal" v-model="searchModal"
enter="fadeInRight" enter="fadeInRight"
leave="fadeOutRight" leave="fadeOutRight"
offset="55%" offset="65%"
width="40%" width="40%"
title="重点关注楼宇清单" title="重点关注楼宇清单"
> >
...@@ -158,18 +166,106 @@ export default defineComponent({ ...@@ -158,18 +166,106 @@ export default defineComponent({
{ name: '隐患点数', value: 0 }, { name: '隐患点数', value: 0 },
{ name: '危险点数', value: 0 }, { name: '危险点数', value: 0 },
]) ])
const secPieKey = ref('外立面附加设施隐患点') // 默认展示的第二饼图类型
watch( watch(
// 监听年份切花更改检查楼数 隐患点数 危险点数
[() => outHouseWall.value, () => year.value], [() => outHouseWall.value, () => year.value],
([data, year]) => { ([data, year]) => {
if (data.length === 0) return if (data.length === 0) return
const { checkNum = 0, hiddenPoint = 0, dangerPoint = 0 } = data.find( const {
(e: any) => e.year === year checkNum = 0,
) hiddenPoint = 0,
dangerPoint = 0,
outerWallDangerPoint = 0,
outerWallFacilityDangerPoint = 0,
outerWallFacilityHiddenPoint = 0,
outerWallHiddenPoint = 0,
} = data.find((e: any) => e.year === year)
houseSum.value = [ houseSum.value = [
{ name: '检查楼数', value: checkNum }, { name: '检查楼数', value: checkNum },
{ name: '隐患点数', value: hiddenPoint }, { name: '隐患点数', value: hiddenPoint },
{ name: '危险点数', value: dangerPoint }, { name: '危险点数', value: dangerPoint },
] ]
pieData1.value = {
dimensions: [
{ name: 'name', displayName: '类型' },
{ name: 'value', displayName: '数量' },
],
source: [
{
name: '外墙面层隐患点',
value: outerWallHiddenPoint,
},
{
name: '外墙面层危险点',
value: outerWallDangerPoint,
},
{
name: '外立面附加设施隐患点',
value: outerWallFacilityHiddenPoint,
},
{
name: '外立面附加设施危险点',
value: outerWallFacilityDangerPoint,
},
],
}
},
{ immediate: true }
)
watch(
[() => pieData.value, () => year.value, () => secPieKey.value],
([data, year, secPieKey]) => {
if (data.length === 0) return
// console.log(data, year)
const arr: any = []
data.forEach((item: any) => {
if (item.year == year) {
arr.push(item)
}
})
let secPieKeyName = ''
switch (secPieKey) {
case '外墙面层隐患点':
secPieKeyName = 'outerWallHiddenPoint'
break
case '外墙面层危险点':
secPieKeyName = 'outerWallDangerPoint'
break
case '外立面附加设施隐患点':
secPieKeyName = 'outerWallFacilityHiddenPoint'
break
case '外立面附加设施危险点':
secPieKeyName = 'outerWallFacilityDangerPoint'
break
default:
break
}
const first = arr.find(
(e: any) => e.workstationName == '第一综合网格工作站(武胜路)'
)[secPieKeyName]
const second = arr.find(
(e: any) => e.workstationName == '第二综合网格工作站(厦门路)'
)[secPieKeyName]
const third = arr.find(
(e: any) => e.workstationName == '第三综合网格工作站(牯林路)'
)[secPieKeyName]
// // 将第二张饼图的数据更新
pieData2.value = {
dimensions: [
{ name: 'name', displayName: secPieKey },
{ name: 'value', displayName: '数量' },
],
source: [
{ name: '第一工作站', value: first || 0 },
{ name: '第二工作站', value: second || 0 },
{ name: '第三工作站', value: third || 0 },
],
}
}, },
{ immediate: true } { immediate: true }
) )
...@@ -177,6 +273,11 @@ export default defineComponent({ ...@@ -177,6 +273,11 @@ export default defineComponent({
const changeYear = (value: string) => { const changeYear = (value: string) => {
year.value = value year.value = value
} }
//切换第二饼图展示的类别
const changePie2 = (item: any) => {
secPieKey.value = item.name
// console.log(secPieKey.value)
}
const list = computed(() => { const list = computed(() => {
return [ return [
...@@ -211,41 +312,39 @@ export default defineComponent({ ...@@ -211,41 +312,39 @@ export default defineComponent({
{ name: '楼宇名称', value: 4, danger: 1 }, { name: '楼宇名称', value: 4, danger: 1 },
{ name: '楼宇名称', value: 4, danger: 1 }, { name: '楼宇名称', value: 4, danger: 1 },
]) ])
const pieData1 = computed(() => { const pieData1 = ref({
return {
dimensions: [ dimensions: [
{ name: 'name', displayName: '类型' }, { name: 'name', displayName: '类型' },
{ name: 'value', displayName: '数量' }, { name: 'value', displayName: '数量' },
], ],
source: [ source: [
{ {
// name: '外立面附加设施危险点', name: '外立面附加设施危险点',
// value: outHouseWall.value.outerWallFacilityDangerPoint, value: 1,
// }, },
// { {
// name: '外立面附加设施隐患点', name: '外立面附加设施隐患点',
// value: outHouseWall.value.outerWallFacilityHiddenPoint, value: 1,
// }, },
// { {
// name: '外墙面层隐患点', name: '外墙面层隐患点',
// value: outHouseWall.value.outerWallHiddenPoint, value: 1,
// }, },
// { {
// name: '外墙面层危险点', name: '外墙面层危险点',
// value: outHouseWall.value.outerWallDangerPoint, value: 1,
}, },
], ],
}
}) })
const pieData2 = ref({ const pieData2 = ref({
dimensions: [ dimensions: [
{ name: 'name', displayName: '类型' }, { name: 'name', displayName: secPieKey.value },
{ name: 'value', displayName: '数量' }, { name: 'value', displayName: '数量' },
], ],
source: [ source: [
{ name: '第一工作站', value: 30 }, { name: '第一工作站', value: 1 },
{ name: '第二工作站', value: 40 }, { name: '第二工作站', value: 1 },
{ name: '第三工作站', value: 48 }, { name: '第三工作站', value: 1 },
], ],
}) })
const pieOption = ref({ const pieOption = ref({
...@@ -284,6 +383,7 @@ export default defineComponent({ ...@@ -284,6 +383,7 @@ export default defineComponent({
buildings, buildings,
outHouseWall, outHouseWall,
pieData, pieData,
changePie2,
} }
}, },
}) })
......
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