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

公共管理接口对接

parent bc95f01b
......@@ -48,4 +48,15 @@ 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/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 {
initData({ dispatch }: { dispatch: Dispatch }): void {
dispatch('getPropertySummary')
dispatch('getCaseList')
// dispatch('GET_PUBLICSAFE_ECONOMIC')
// dispatch('GET_YOUSUBIDA_RANK')
},
// 物业三架马车数据 (缺交叉任职数)
async getPropertySummary({ commit }: { commit: Commit }): Promise<void> {
......@@ -415,4 +415,11 @@ 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)
},
}
......@@ -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 }[]
......@@ -91,6 +99,9 @@ export interface GlobalStateProps {
dutyEvents: Partial<DutyDataProp>
dutyPlaces: Partial<DutyDataProp>
dutyRanking: Partial<DutyDataProp>
/** 公共管理 */
yousubidaRank: Partial<YousubidaRankProp>
}
export default createStore<GlobalStateProps>({
state,
......
......@@ -181,4 +181,8 @@ export default {
SET_DUTY_RANKING(state: GlobalStateProps, data: DutyDataProp): void {
state.dutyRanking = data
},
/** 公共管理 */
SET_YOUSUBIDA_RANK(state: GlobalStateProps, data: DutySumProp): void {
state.yousubidaRank = data
},
}
......@@ -43,4 +43,5 @@ export default {
dutyEvents: { day: [], week: [], month: [] },
dutyPlaces: { day: [], week: [], month: [] },
dutyRanking: { day: [], week: [], month: [] },
yousubidaRank: {},
} as GlobalStateProps
......@@ -56,12 +56,21 @@ export default defineComponent({
name: 'Complain',
components: { Tabs, SubTitle },
setup() {
store.dispatch('GET_YOUSUBIDA_RANK')
const rank = computed(() => store.state.yousubidaRank)
const fontSize = computed(() => Math.floor((screen.height * 1.6) / 100))
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: '街面管理',
value: 75,
value: rank.value.streetDispatchNum,
percent: 60,
},
{
......@@ -74,7 +83,8 @@ export default defineComponent({
value: 85,
percent: 78,
},
])
]
})
const tabList = ref<TabsProp[]>([
{
key: 'all',
......@@ -147,6 +157,7 @@ export default defineComponent({
chartOption,
classChartData,
chartOption2,
rank,
}
},
})
......@@ -154,19 +165,18 @@ export default defineComponent({
<style lang="stylus" scoped>
@import '../../components/MyComponent/main.styl'
.summary
display flex
justify-content space-between
align-items center
margin-top .1rem
margin-top 0.1rem
>div
display flex
align-items center
>div
margin-left .05rem
margin-left 0.05rem
.count
font-size .12rem
font-size 0.12rem
font-weight bold
p
color #ccc
......@@ -176,7 +186,7 @@ export default defineComponent({
// margin-bottom .05rem
.content
flex 1
padding-left .1rem
padding-left 0.1rem
.chart
width 100%
height 43%
......@@ -193,10 +203,10 @@ export default defineComponent({
align-items center
span
display inline-block
width .06rem
width 0.06rem
height @width
border-radius 50%
margin-right .1rem
margin-right 0.1rem
background #826AFA
&:nth-of-type(2) > span
background #E02020
......@@ -211,18 +221,18 @@ export default defineComponent({
.detail
display flex
flex-direction column
padding .1rem
padding 0.1rem
background url('@/assets/images/border2.png') 100% / 100% 100% no-repeat
margin-bottom .05rem
margin-bottom 0.05rem
>div
flex 1
&:first-child
border-bottom .01rem solid $primary-border
padding-bottom .05rem
border-bottom 0.01rem solid $primary-border
padding-bottom 0.05rem
margin-bottom @padding-bottom
span
color #ccc
p
font-size .12rem
font-size 0.12rem
font-weight bold
</style>
......@@ -14,10 +14,6 @@ export default defineComponent({
name: 'KeyTask',
setup() {
onMounted(() => init())
setTimeout(() => {
console.log(echarts)
console.log(document.getElementById('cloud'))
}, 1000)
const init = () => {
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