From 846e7648f295e6053a006f7ad56acf6f4cf19428 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Thu, 20 Jul 2023 17:15:22 +0800 Subject: [PATCH] ma pmap --- src/views/book/index.vue | 6 +- src/views/component/dialog.vue | 4 +- src/views/dashboard/index.vue | 28 ++++- src/views/jsc/components/echartsMap.vue | 71 ++++++------ src/views/jsc/index.vue | 141 +++++++++++++++++++++--- src/views/record/map.vue | 103 +++++++++++++---- src/views/record/personinfo.vue | 34 +++++- 7 files changed, 297 insertions(+), 90 deletions(-) diff --git a/src/views/book/index.vue b/src/views/book/index.vue index 71e9c09..df34ec0 100644 --- a/src/views/book/index.vue +++ b/src/views/book/index.vue @@ -44,7 +44,8 @@ reform:'reforms', train:'trains', double:'double', - insure:'insures' + insure:'insures', + cancel:'cancels' }, bookTypeObjs: { number: '残疾人证统计', @@ -61,7 +62,8 @@ reform:'无障碍改造统计', train:'培训记录统计', double:'两项补贴统计', - insure:'商业保险统计' + insure:'商业保险统计', + cancel:'死亡注销统计' } } diff --git a/src/views/component/dialog.vue b/src/views/component/dialog.vue index 845b2ea..f68771f 100644 --- a/src/views/component/dialog.vue +++ b/src/views/component/dialog.vue @@ -93,7 +93,7 @@ export default { }, on: { [this.getEventType(i.edit_input)]: (e) => { - if (i.field==='name') { + if (i.field==='name' || i.field==='idcard'|| i.field==='number') { this.openRecords() this.form = Object.assign({}, this.form); }else{ @@ -384,7 +384,7 @@ export default { }, ]; } - + } }); }, diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 3c60af9..f4ea18a 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -44,7 +44,15 @@ y:[] }, list: {}, - mapHeight: 0 + mapHeight: 0, + needNames:{ + starts_subsidys:'自主创业', + starts_addresses:'经营场地', + fuels:'燃油补贴', + disabilities:'残疾人证', + educations:'教育专项', + recoveries:"康复设备" + }, } }, watch: { @@ -90,9 +98,15 @@ } }).catch() await getApplyCharts().then(res => { - for (var k of res) { - this.apply_data.x.push(k.name) - this.apply_data.y.push(k.total) + for (var need of res) { + let names = '' + for (var k in this.needNames){ + if(need.table==k){ + names = this.needNames[k] + } + } + this.apply_data.x.push(names?names:need.name) + this.apply_data.y.push(need.total) } }) this.init() @@ -165,7 +179,11 @@ xAxis: { type: 'category', boundaryGap: false, - data: this.apply_data.x + data: this.apply_data.x, + axisLabel:{ + interval:0, + rotate:60 + } }, yAxis: { type: 'value', diff --git a/src/views/jsc/components/echartsMap.vue b/src/views/jsc/components/echartsMap.vue index 78feefd..cd4e863 100644 --- a/src/views/jsc/components/echartsMap.vue +++ b/src/views/jsc/components/echartsMap.vue @@ -7,11 +7,18 @@ import * as echarts from 'echarts'; import jtmap from './jtmap.json'; - export default { + export default { + props:{ + mapData:{ + type:Array, + default:[] + } + }, data() { return { myChart: null, - hookToolTip: {} + hookToolTip: {}, + // mapData:[] } }, mounted() { @@ -22,26 +29,31 @@ }, watch: { - // hookToolTip: { - // handler(newVal, oldVal) { - // let tooltipButton = document.querySelector(".mapsshow" + newVal.data.id) - // let that = this - // tooltipButton.addEventListener('click', function() { - // that.showInfo(newVal.data.id) - // }) + hookToolTip: { + handler(newVal, oldVal) { + let tooltipButton = document.querySelector(".mapsshow" + newVal.data.id) + let that = this + tooltipButton.addEventListener('click', function() { + that.showInfo(newVal.data.id) + }) - // } - // }, + } + }, }, methods: { - showInfo(id) { - console.log("id", id) + showInfo(id) { + this.$router.push({path:"/record/personinfo",query:{id:id}}) }, resetCharts() { this.myChart.resize() }, drawChart() { - let that = this + let that = this + this.mapData.forEach((m,index)=>{ + if(!m.coord){ + m.coord = ['',''] + } + }) // 基于准备好的dom,初始化echarts实例 this.myChart = echarts.init(document.getElementById('chart')) echarts.registerMap('GX', jtmap); @@ -58,8 +70,7 @@ if (!val.data) { return } - return '
' + val.data.name + '
查看详情
' + val.data.name + '
查看详情
- 进入后台
+
+
+ {{nowYear}}-进入后台
姓名:${res.name}
性别:${res.sex}
残疾类别:${res.disabilitytype}
残疾等级:${res?.disabilitylevel}
现居住地:${res.reside}
` let views = '' let workflows = '' + this.idcard = res.idcard if(res.idcard_viewrecords_idcard_relation.length>0){ for(var k of res.idcard_viewrecords_idcard_relation){ if(k.checkstatus=='通过'){ @@ -126,6 +142,20 @@ this.option['nodeList'][1]['content'] = contents this.option['nodeList'][2]['content'] = workflows this.option['nodeList'][3]['content'] = views + this.getSstt() + }, + getSstt(){ + getSsttIndex({ + idcard:this.idcard, + start_date:'2020-01-01', + page:1 + }).then(res=>{ + let raises = '' + for(var k of res){ + raises+=`${k.start_time?.substring(0,10)}/${k.status_text}
` + } + this.option['nodeList'][4]['content'] = raises + }) } }