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

调整

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