Commit 6df51bd3 authored by 程卓's avatar 程卓

公共管理接口对接

parent bc95f01b
...@@ -48,4 +48,15 @@ export default { ...@@ -48,4 +48,15 @@ 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/public/c', // 有诉必答-分类排行
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,7 @@ export default { ...@@ -8,7 +8,7 @@ export default {
initData({ dispatch }: { dispatch: Dispatch }): void { initData({ dispatch }: { dispatch: Dispatch }): void {
dispatch('getPropertySummary') dispatch('getPropertySummary')
dispatch('getCaseList') dispatch('getCaseList')
// dispatch('GET_PUBLICSAFE_ECONOMIC') // dispatch('GET_YOUSUBIDA_RANK')
}, },
// 物业三架马车数据 (缺交叉任职数) // 物业三架马车数据 (缺交叉任职数)
async getPropertySummary({ commit }: { commit: Commit }): Promise<void> { async getPropertySummary({ commit }: { commit: Commit }): Promise<void> {
...@@ -415,4 +415,11 @@ export default { ...@@ -415,4 +415,11 @@ 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)
},
} }
...@@ -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 }[]
...@@ -91,6 +99,9 @@ export interface GlobalStateProps { ...@@ -91,6 +99,9 @@ export interface GlobalStateProps {
dutyEvents: Partial<DutyDataProp> dutyEvents: Partial<DutyDataProp>
dutyPlaces: Partial<DutyDataProp> dutyPlaces: Partial<DutyDataProp>
dutyRanking: Partial<DutyDataProp> dutyRanking: Partial<DutyDataProp>
/** 公共管理 */
yousubidaRank: Partial<YousubidaRankProp>
} }
export default createStore<GlobalStateProps>({ export default createStore<GlobalStateProps>({
state, state,
......
...@@ -181,4 +181,8 @@ export default { ...@@ -181,4 +181,8 @@ 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: DutySumProp): void {
state.yousubidaRank = data
},
} }
...@@ -43,4 +43,5 @@ export default { ...@@ -43,4 +43,5 @@ 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: {},
} as GlobalStateProps } as GlobalStateProps
...@@ -56,12 +56,21 @@ export default defineComponent({ ...@@ -56,12 +56,21 @@ export default defineComponent({
name: 'Complain', name: 'Complain',
components: { Tabs, SubTitle }, components: { Tabs, SubTitle },
setup() { setup() {
store.dispatch('GET_YOUSUBIDA_RANK')
const rank = computed(() => store.state.yousubidaRank)
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.comprehensiveDispatchNum)
console.log(rank.value.communityNum)
console.log(rank.value.streetDispatchNum)
return [
{ {
name: '街面管理', name: '街面管理',
value: 75, value: rank.value.streetDispatchNum,
percent: 60, percent: 60,
}, },
{ {
...@@ -74,7 +83,8 @@ export default defineComponent({ ...@@ -74,7 +83,8 @@ export default defineComponent({
value: 85, value: 85,
percent: 78, percent: 78,
}, },
]) ]
})
const tabList = ref<TabsProp[]>([ const tabList = ref<TabsProp[]>([
{ {
key: 'all', key: 'all',
...@@ -147,6 +157,7 @@ export default defineComponent({ ...@@ -147,6 +157,7 @@ export default defineComponent({
chartOption, chartOption,
classChartData, classChartData,
chartOption2, chartOption2,
rank,
} }
}, },
}) })
...@@ -154,19 +165,18 @@ export default defineComponent({ ...@@ -154,19 +165,18 @@ export default defineComponent({
<style lang="stylus" scoped> <style lang="stylus" scoped>
@import '../../components/MyComponent/main.styl' @import '../../components/MyComponent/main.styl'
.summary .summary
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
>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,7 +186,7 @@ export default defineComponent({ ...@@ -176,7 +186,7 @@ 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 43%
...@@ -193,10 +203,10 @@ export default defineComponent({ ...@@ -193,10 +203,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
...@@ -211,18 +221,18 @@ export default defineComponent({ ...@@ -211,18 +221,18 @@ export default defineComponent({
.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>
...@@ -14,10 +14,6 @@ export default defineComponent({ ...@@ -14,10 +14,6 @@ export default defineComponent({
name: 'KeyTask', name: 'KeyTask',
setup() { setup() {
onMounted(() => init()) onMounted(() => init())
setTimeout(() => {
console.log(echarts)
console.log(document.getElementById('cloud'))
}, 1000)
const init = () => { const init = () => {
const cloudCharts = echarts.init(document.getElementById('cloud')) const cloudCharts = echarts.init(document.getElementById('cloud'))
//说明 //说明
......
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