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 @@
"countup.js": "^2.0.7",
"dayjs": "^1.10.4",
"echarts": "^5.0.1",
"echarts-wordcloud": "^2.0.0",
"normalize.css": "^8.0.1",
"qs": "^6.9.6",
"vue": "^3.0.5",
......
......@@ -48,4 +48,16 @@ export default {
GET_DUTY_EVENTS: '/service-special-nandong/compair/getRanking/cmt', // 勤务分析 - 居委事件数量
GET_DUTY_PLACES: '/service-special-nandong/compair/getRanking/addr', // 勤务分析 - 多发地点
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 {
initData({ dispatch }: { dispatch: Dispatch }): void {
dispatch('getPropertySummary')
dispatch('getCaseList')
// dispatch('GET_PUBLICSAFE_ECONOMIC')
},
// 物业三架马车数据 (缺交叉任职数)
async getPropertySummary({ commit }: { commit: Commit }): Promise<void> {
......@@ -218,7 +217,7 @@ export default {
const { content } = (
await ajax.get({ url: api.GET_PUBLICSAFE_OUTHOUSEWALL })
).data
// console.log(content)
// console.log(content, '房屋外立面')
commit('SET_PUBLICSAFE_OUTHOUSEWALL', content)
},
// 公共服务 - 重点关注楼宇
......@@ -240,7 +239,7 @@ export default {
const { content } = (
await ajax.get({ url: api.GET_PUBLICSAFE_PIEDATA })
).data
// console.log(content)
// console.log(content, 'pie')
commit('SET_PUBLICSAFE_PIEDATA', content)
},
// 左侧公共 - 指挥体系
......@@ -415,4 +414,49 @@ export default {
).data
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 {
communityNum: number //小区管理数量
}
export interface YousubidaRankProp {
comprehensiveNum: 0 //综合数量
comprehensiveDispatchNum: 0 //综合派遣数量
streetNum: 0 //街道数量
streetDispatchNum: 0 //街道派遣数量
communityDispatchNum: 0 //小区数量
communityNum: 0 //小区派遣数量
}
export interface DutyDataProp {
week: { [key: string]: unknown }[]
month: { [key: string]: unknown }[]
......@@ -97,6 +105,11 @@ export interface GlobalStateProps {
dutyEvents: Partial<DutyDataProp>
dutyPlaces: Partial<DutyDataProp>
dutyRanking: Partial<DutyDataProp>
/** 公共管理 */
yousubidaRank: Partial<YousubidaRankProp>
classificationRank: any[]
urgentCase: any[]
}
export default createStore<GlobalStateProps>({
......
......@@ -7,6 +7,7 @@ import {
CombineProp,
DutySumProp,
DutyDataProp,
YousubidaRankProp,
} from './index'
export default {
......@@ -184,4 +185,20 @@ export default {
SET_DUTY_RANKING(state: GlobalStateProps, data: DutyDataProp): void {
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 {
dutyEvents: { day: [], week: [], month: [] },
dutyPlaces: { day: [], week: [], month: [] },
dutyRanking: { day: [], week: [], month: [] },
yousubidaRank: {},
classificationRank: [],
urgentCase: [],
} as GlobalStateProps
This diff is collapsed.
This diff is collapsed.
......@@ -141,7 +141,7 @@ export default defineComponent({
})
const clickStreetName = (item: any): void => {
searchModal.value = true
searchModal.value = !searchModal.value
streetData.value = item
}
// const houseSum = ref<SummaryProp[]>([
......
......@@ -46,7 +46,11 @@
<m-pie class="chart2" :dataset="pieData2" :option="pieOption" />
</div>
<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>
<span :style="{ background: pieOption.color[i][0] }" />
{{ item.name }}
......@@ -58,7 +62,11 @@
</div>
</div>
<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>
<span :style="{ background: pieOption.color[i][0] }" />
<m-count class="count" :value="item.value" />
......@@ -104,7 +112,7 @@
v-model="searchModal"
enter="fadeInRight"
leave="fadeOutRight"
offset="55%"
offset="65%"
width="40%"
title="重点关注楼宇清单"
>
......@@ -158,18 +166,106 @@ export default defineComponent({
{ name: '隐患点数', value: 0 },
{ name: '危险点数', value: 0 },
])
const secPieKey = ref('外立面附加设施隐患点') // 默认展示的第二饼图类型
watch(
// 监听年份切花更改检查楼数 隐患点数 危险点数
[() => outHouseWall.value, () => year.value],
([data, year]) => {
if (data.length === 0) return
const { checkNum = 0, hiddenPoint = 0, dangerPoint = 0 } = data.find(
(e: any) => e.year === year
)
const {
checkNum = 0,
hiddenPoint = 0,
dangerPoint = 0,
outerWallDangerPoint = 0,
outerWallFacilityDangerPoint = 0,
outerWallFacilityHiddenPoint = 0,
outerWallHiddenPoint = 0,
} = data.find((e: any) => e.year === year)
houseSum.value = [
{ name: '检查楼数', value: checkNum },
{ name: '隐患点数', value: hiddenPoint },
{ 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 }
)
......@@ -177,6 +273,11 @@ export default defineComponent({
const changeYear = (value: string) => {
year.value = value
}
//切换第二饼图展示的类别
const changePie2 = (item: any) => {
secPieKey.value = item.name
// console.log(secPieKey.value)
}
const list = computed(() => {
return [
......@@ -211,41 +312,39 @@ export default defineComponent({
{ name: '楼宇名称', value: 4, danger: 1 },
{ name: '楼宇名称', value: 4, danger: 1 },
])
const pieData1 = computed(() => {
return {
dimensions: [
{ name: 'name', displayName: '类型' },
{ name: 'value', displayName: '数量' },
],
source: [
{
// name: '外立面附加设施危险点',
// value: outHouseWall.value.outerWallFacilityDangerPoint,
// },
// {
// name: '外立面附加设施隐患点',
// value: outHouseWall.value.outerWallFacilityHiddenPoint,
// },
// {
// name: '外墙面层隐患点',
// value: outHouseWall.value.outerWallHiddenPoint,
// },
// {
// name: '外墙面层危险点',
// value: outHouseWall.value.outerWallDangerPoint,
},
],
}
const pieData1 = ref({
dimensions: [
{ name: 'name', displayName: '类型' },
{ name: 'value', displayName: '数量' },
],
source: [
{
name: '外立面附加设施危险点',
value: 1,
},
{
name: '外立面附加设施隐患点',
value: 1,
},
{
name: '外墙面层隐患点',
value: 1,
},
{
name: '外墙面层危险点',
value: 1,
},
],
})
const pieData2 = ref({
dimensions: [
{ name: 'name', displayName: '类型' },
{ name: 'name', displayName: secPieKey.value },
{ name: 'value', displayName: '数量' },
],
source: [
{ name: '第一工作站', value: 30 },
{ name: '第二工作站', value: 40 },
{ name: '第三工作站', value: 48 },
{ name: '第一工作站', value: 1 },
{ name: '第二工作站', value: 1 },
{ name: '第三工作站', value: 1 },
],
})
const pieOption = ref({
......@@ -284,6 +383,7 @@ export default defineComponent({
buildings,
outHouseWall,
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