Commit 0e04b8a3 authored by 郭铭瑶's avatar 郭铭瑶 🤘

调整

parent a3538341
...@@ -43,7 +43,7 @@ $color-main = #5BD5FF ...@@ -43,7 +43,7 @@ $color-main = #5BD5FF
// color $edgeColor // color $edgeColor
// font-weight bold // font-weight bold
.ivu-divider-horizontal.ivu-divider-with-text-center .ivu-divider-horizontal.ivu-divider-with-text-center
margin .03rem 0 margin 0
&:after &:after
&:before &:before
border-top .01rem dashed $fontColor border-top .01rem dashed $fontColor
......
...@@ -19,7 +19,8 @@ export default { ...@@ -19,7 +19,8 @@ export default {
GET_MARKET_SHARE: '/service-basicdatasync-ddd/public/property/topten', // 市场份额 GET_MARKET_SHARE: '/service-basicdatasync-ddd/public/property/topten', // 市场份额
GET_INDUSTRY_INFO: '/service-documents-ddd/public/industry/supervision', // 行业监管信息 GET_INDUSTRY_INFO: '/service-documents-ddd/public/industry/supervision', // 行业监管信息
GET_REPORT_INFO: '/service-documents-ddd/public/information/report', // 信息上报、重大事件清单 GET_REPORT_INFO: '/service-documents-ddd/public/information/report', // 信息上报、重大事件清单
GET_TASK_LIST: '/service-documents-ddd/public/inforeport/topic', // 信息上报灾情选项
GET_REPAIR_INFO: '/service-documents-ddd/public/property/maintenance', // 物业维修 GET_REPAIR_INFO: '/service-documents-ddd/public/property/maintenance', // 物业维修
GET_COMPLAINT_INFO: '/service-docments-ddd/public/complaint/lettersvisits', // 信访投诉 GET_COMPLAINT_INFO: '/service-documents-ddd/public/complaint/lettersvisits', // 信访投诉
GET_HEALTH_INFO: '/service-documents-ddd/public/property/health/degree', // 物业健康度 GET_HEALTH_INFO: '/service-documents-ddd/public/property/health/degree', // 物业健康度
} }
...@@ -6,6 +6,7 @@ import com from '@/util/common' ...@@ -6,6 +6,7 @@ import com from '@/util/common'
export default { export default {
initData({dispatch}) { initData({dispatch}) {
dispatch('getTaskList')
dispatch('getHandleList') dispatch('getHandleList')
dispatch('getResourceCount') dispatch('getResourceCount')
dispatch('getCommunityRate') dispatch('getCommunityRate')
...@@ -15,6 +16,11 @@ export default { ...@@ -15,6 +16,11 @@ export default {
dispatch('getComplaintInfo') dispatch('getComplaintInfo')
dispatch('getHealthInfo') dispatch('getHealthInfo')
}, },
getTaskList({commit}) {
ajax.get({url: api.GET_TASK_LIST}).then(res => {
commit('SET_TASK_LIST', com.confirm(res, 'data.content', []))
})
},
getHandleList({commit}) { // 获取并全局设置联勤联动处置列表 getHandleList({commit}) { // 获取并全局设置联勤联动处置列表
ajax.get({url: api.GET_HANDLE_LIST}).then(res => { ajax.get({url: api.GET_HANDLE_LIST}).then(res => {
commit('SET_HANDLE_LIST', com.confirm(res, 'data.content', [])) commit('SET_HANDLE_LIST', com.confirm(res, 'data.content', []))
...@@ -41,7 +47,7 @@ export default { ...@@ -41,7 +47,7 @@ export default {
}) })
}, },
getReportInfo({commit, state}) { // 信息上报、重大事件 getReportInfo({commit, state}) { // 信息上报、重大事件
ajax.get({url: api.GET_REPORT_INFO, taskid: state.reportId}).then(res => { ajax.get({url: api.GET_REPORT_INFO, params: {taskid: state.reportId}}).then(res => {
commit('SET_REPORT_INFO', com.confirm(res, 'data.content.typeRatio', [])) commit('SET_REPORT_INFO', com.confirm(res, 'data.content.typeRatio', []))
commit('SET_REPORT_SUM', { commit('SET_REPORT_SUM', {
finish: com.confirm(res, 'data.content.finish', 0), finish: com.confirm(res, 'data.content.finish', 0),
......
...@@ -8,6 +8,9 @@ export default { ...@@ -8,6 +8,9 @@ export default {
SET_COMMAND_MODAL(state, val) { SET_COMMAND_MODAL(state, val) {
state.showCommandModal = val state.showCommandModal = val
}, },
SET_TASK_LIST(state, data) {
state.taskList = data
},
SET_HANDLE_LIST(state, data) { SET_HANDLE_LIST(state, data) {
state.handleList = data state.handleList = data
}, },
......
...@@ -2,6 +2,7 @@ export default { ...@@ -2,6 +2,7 @@ export default {
showLoading: false, showLoading: false,
curDate: null, curDate: null,
showCommandModal: false, showCommandModal: false,
taskList: [],
handleList: [], handleList: [],
resourceCount: {}, resourceCount: {},
communityRate: {}, communityRate: {},
......
...@@ -10,15 +10,14 @@ ...@@ -10,15 +10,14 @@
</div> </div>
</div> </div>
<Divider>投诉分类占比</Divider> <Divider>投诉分类占比</Divider>
<p class="tip">数值为报修数量/占比/密度</p>
<div class="chart-wrapper"> <div class="chart-wrapper">
<template v-if="chartData.length > 0"> <template v-if="chartData.length > 0">
<div class="chart"><m-chart :config="config" :data="chartData" /></div> <div class="chart"><m-chart :config="config" :data="chartData" /></div>
<div class="tips"> <div class="tips">
<div v-for="(item, i) in chartData" :key="item.name"> <div v-for="(item, i) in chartData" :key="item.name">
<span class="dot" :style="`border-color:${config.colors[i]}`"/> <span class="dot" :style="`border-color:${config.colors[i]}`"/>
<p>{{item.name}}</p> <p :title="item.name">{{item.name}}</p>
<p>{{item.value}}</p> <!-- <p>{{item.value}}</p> -->
<p>{{item.rate}}</p> <p>{{item.rate}}</p>
</div> </div>
</div> </div>
...@@ -28,7 +27,9 @@ ...@@ -28,7 +27,9 @@
<p>— 暂无数据 —</p> <p>— 暂无数据 —</p>
</div> </div>
</div> </div>
<!-- <div @click="showMore" v-if="chartData.length > 8" class="more">查看更多</div> -->
<Divider>投诉分布</Divider> <Divider>投诉分布</Divider>
<p class="tip">数值为报修数量/占比/密度</p>
<div class="rate"> <div class="rate">
<RateComponent <RateComponent
:info="rateInfo" :info="rateInfo"
...@@ -48,7 +49,22 @@ export default { ...@@ -48,7 +49,22 @@ export default {
return { return {
curType: 'B', curType: 'B',
config: { config: {
colors: ['#E44949', '#FDA62D', '#FFCE34', '#71C012', '#6BE1B2', '#DC732D', '#5BD5FF', '#006ED4', '#2E43C9', '#826AFA', '#CCCCCC'], colors: ['#E44949', '#FDA62D', '#FFCE34', '#71C012', '#6BE1B2', '#DC732D', '#5BD5FF', '#006ED4', '#2E43C9', '#826AFA', '#CCCCCC', '#1890FF',
'#41D9C7',
'#2FC25B',
'#FACC14',
'#E6965C',
'#223273',
'#7564CC',
'#8543E0',
'#5C8EE6',
'#13C2C2',
'#5CA3E6',
'#3436C7',
'#B381E6',
'#F04864',
'#D598D9',
],
// tooltip: { // tooltip: {
// formatter: '{b}:{c}个 ({d}%)', // formatter: '{b}:{c}个 ({d}%)',
// confine: true, // confine: true,
...@@ -95,12 +111,16 @@ export default { ...@@ -95,12 +111,16 @@ export default {
}, },
} }
</script> </script>
<style lang="stylus">
::-webkit-scrollbar
height .07rem
</style>
<style lang="stylus" scoped> <style lang="stylus" scoped>
.complaint-report .complaint-report
display flex display flex
flex-direction column flex-direction column
.tip .tip
transform translateY(70%)
text-align right text-align right
font-size .08rem font-size .08rem
.no-data .no-data
...@@ -141,20 +161,22 @@ export default { ...@@ -141,20 +161,22 @@ export default {
width 100% width 100%
height 1rem height 1rem
display flex display flex
margin-top .2rem margin-top .1rem
.chart .chart
height 100% height 100%
width 40% width 30%
.tips .tips
flex 1 flex 1
display flex display flex
flex-direction column flex-direction column
flex-wrap wrap flex-wrap wrap
margin-top 2% margin-top 2%
transform translateX(-15%) overflow-x auto
>div >div
height 25% height 25%
margin-left .05rem margin-left .05rem
display flex
align-items center
.dot .dot
display inline-block display inline-block
width .08rem width .08rem
...@@ -162,8 +184,20 @@ export default { ...@@ -162,8 +184,20 @@ export default {
border .02rem solid border .02rem solid
border-radius 50% border-radius 50%
p p
margin 0 .01rem margin 0 .02rem
display inline-block &:nth-of-type(1)
width: .61rem
overflow hidden
text-overflow ellipsis
white-space nowrap
.rate .rate
flex 1 flex 1
.more
color $fontColor
text-align center
cursor pointer
transition all .3s
&:hover
color $edgeColor
text-decoration underline
</style> </style>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<m-count class="count" :value="+reportSum.total" /> <m-count class="count" :value="+reportSum.total" />
</div> </div>
<Select v-model="reportId"> <Select v-model="reportId">
<Option value="2008041192891503">台风黑格比</Option> <Option v-for="option in taskList" :key="option.id" :value="option.taskid">{{option.taskname}}</Option>
</Select> </Select>
</div> </div>
<div class="chart" v-if="chartData.length > 0"><m-chart :config="config" :data="chartData" :options="options" /></div> <div class="chart" v-if="chartData.length > 0"><m-chart :config="config" :data="chartData" :options="options" /></div>
...@@ -77,7 +77,7 @@ export default { ...@@ -77,7 +77,7 @@ export default {
name: 'IndustrySupervise', name: 'IndustrySupervise',
data() { data() {
return { return {
reportId: '2008041192891503', reportId: null,
months: [ months: [
'Jan', 'Jan',
'Feb', 'Feb',
...@@ -114,6 +114,7 @@ export default { ...@@ -114,6 +114,7 @@ export default {
}, },
computed: { computed: {
...mapState([ ...mapState([
'taskList',
'reportInfo', 'reportInfo',
'reportSum', 'reportSum',
'importantList', 'importantList',
...@@ -154,8 +155,14 @@ export default { ...@@ -154,8 +155,14 @@ export default {
}, },
}, },
watch: { watch: {
taskList(cur) {
if (cur && cur.length > 0) {
this.reportId = cur[0].taskid
}
},
reportId: { reportId: {
handler(cur) { handler(cur) {
if (!cur) return
this.$store.commit('SET_REPORT_ID', cur) this.$store.commit('SET_REPORT_ID', cur)
this.$store.dispatch('getReportInfo') this.$store.dispatch('getReportInfo')
}, },
...@@ -245,7 +252,7 @@ export default { ...@@ -245,7 +252,7 @@ export default {
height 45% height 45%
width 100% width 100%
.info .info
flex 1 width 35%
.chart .chart
width 65% width 65%
height 100% height 100%
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="chart" ref="chart"></div> <div class="chart" ref="chart"></div>
<div class="total"> <div class="total">
<p>综合得分</p> <p>综合得分</p>
<m-count style="font-size:0.12rem;color:#75e1b0;" :value="total" /> <m-count :style="`font-size:0.12rem;color:${switchColor};`" :value="total" />
<p class="unit">(分)</p> <p class="unit">(分)</p>
</div> </div>
</div> </div>
...@@ -67,7 +67,7 @@ export default { ...@@ -67,7 +67,7 @@ export default {
show: false, show: false,
}, },
indicator: [ indicator: [
{text: '全市物业诚信计分', index: 0, max: 20}, {text: '物业诚信计分', index: 0, max: 20},
{text: '投诉报修情况', index: 1, max: 20}, {text: '投诉报修情况', index: 1, max: 20},
{text: '小区管理情况', index: 2, max: 20}, {text: '小区管理情况', index: 2, max: 20},
{text: '业主满意度', index: 3, max: 20}, {text: '业主满意度', index: 3, max: 20},
...@@ -107,6 +107,17 @@ export default { ...@@ -107,6 +107,17 @@ export default {
total() { total() {
return this.chartData.reduce((cur, acc) => cur + acc, 0) return this.chartData.reduce((cur, acc) => cur + acc, 0)
}, },
switchColor() {
if (this.total >= 90) {
return '#75e1b0'
}
if (this.total < 90 && this.total >= 80) {
return '#ffd400'
}
if (this.total < 80) {
return '#ff1e1e'
}
},
}, },
methods: { methods: {
init() { init() {
......
...@@ -55,7 +55,8 @@ export default { ...@@ -55,7 +55,8 @@ export default {
width 100% width 100%
height 100% height 100%
>div >div
flex 1 width 50%
height 100%
>div >div
height 65% height 65%
&:nth-child(2) &:nth-child(2)
......
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