@@ -104,7 +105,13 @@
import CountTo from 'vue-count-to'
import {
getChartsHome
- } from "../../api/dashboard.js"
+ } from "../../api/dashboard.js"
+ import {
+ getparameter
+ } from "@/api/system/dictionary";
+ import {
+ index
+ } from "@/api/system/baseForm.js"
export default {
components: {
echartsMap,
@@ -114,7 +121,19 @@
},
data() {
return {
- showChart:false,
+ showChart:false,
+ showMap:false,
+ nowYear:"",
+ select: {
+ page_size: 5,
+ page: 1,
+ street: '',
+ name: '',
+ table_name: 'records',
+ show_relation: ['admin', 'department'],
+ total: 0
+ },
+ mapList:[],
radiusType1: ['40%', '60%'],
radiusType: '50%',
ageX: [],
@@ -187,11 +206,16 @@
icon: require('../../assets/jsc/icon_img2.png'),
text: '多重',
num: 0
+ }, {
+ icon: require('../../assets/jsc/icon_img2.png'),
+ text: '重残',
+ num: 0
}]
}
},
mounted() {
- let that = this
+ let that = this
+ this.nowYear = new Date().getFullYear() + '年度'
this.setRem()
window.onresize = function() {
that.setRem()
@@ -202,7 +226,9 @@
that.$refs.echartsPie.resetCharts()
that.$refs.echartsPie1.resetCharts()
}
- this.loadData()
+ this.loadData()
+ this.getLabel()
+
},
methods: {
todashboard(){
@@ -219,11 +245,12 @@
window.$size = rem / 100;
document.documentElement.style.fontSize = rem + "px";
},
+
loadData(){
getChartsHome().then(res=>{
// 总量
this.jscMtList[0].num = res.total.year_total
- this.jscMtList[1].num = res.total.year_total - res.total.lastyear_total
+ this.jscMtList[1].num = res.total.year_inc_total
this.jscMtList[2].num = res.total.year_des_total
this.jscMtList[3].num = res.total.year_viewrecords
// 年龄
@@ -250,6 +277,12 @@
}
}
}
+ // 重残
+ for(var type1 of this.jscL1typeList){
+ if(type1.text=='重残'){
+ type1.num = res.serious.disabilitytype_1+res.serious.disabilitytype_2
+ }
+ }
// 性别
this.sexData[0].value = res.sex_total['man']
this.sexData[1].value = res.sex_total['woman']
@@ -260,19 +293,90 @@
value:street.total
})
}
- // 月度访视
+ // 镇街道 月度访视
for(var view of res.viewrecords){
- this.monthX.push(view.month)
+ let value = view.value=='茅山旅游度假区'?'茅山':view.value
+ this.monthX.push(value)
this.monthY.push(view.total)
}
this.showChart = true
})
- }
- },
-
-
+ },
+ async getLabel() {
+ await getparameter({
+ number:'streetList'
+ }).then(res=>{
+ res.detail.forEach((m,index)=>{
+ this.getMapData(m.value,index,res.detail.length-1)
+ })
+ });
+ },
+ async getMapData(street,index1,length) {
+ // this.mapList = []
+ // this.map.remove(this.marker)
+ let res = await index({
+ page_size: this.select.page_size,
+ page: this.select.page,
+ table_name: this.select.table_name,
+ show_relation: this.select.show_relation,
+ filter: [{
+ "key": "street",
+ "op": "eq",
+ "value": street
+ }],
+ })
+ this.select.total = res.total
+ this.mapList.push(...res.data)
+ if(index1==length){
+ this.getLocations()
+ }
+
+ },
+ getLocations(){
+ let _data = []
+ let _nolng = [] //只有地址没有经纬度
+ for (var k of this.mapList) {
+ if (k.longitude && k.latitude) {
+ k.coord = [k.longitude,k.latitude]
+ _data.push(k)
+ } else {
+ if (k.reside == null || k.reside == '') {
+ // return
+ } else {
+ _nolng.push(k)
+ }
+ }
+ }
+ this.mapList = _data
+ var geocoder = null
+ let that = this
+ AMap.plugin("AMap.Geocoder", function() {
+ geocoder = new AMap.Geocoder({
+ city: '常州' // city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode
+ })
+ _nolng.map((k, index) => {
+ geocoder.getLocation(k.reside, function(status, result) {
+ if (status === 'complete' && result.info === 'OK') {
+ // result中对应详细地理坐标信息
+ k.longitude = result.geocodes[0].location.lng
+ k.latitude = result.geocodes[0].location.lat
+ k.coord = [result.geocodes[0].location.lng,result.geocodes[0].location.lat]
+ }
+ if (index == _nolng.length - 1) {
+ that.mapList.push(..._nolng)
+ that.showMap = true
+ }
+ })
+
+ })
+ // this.$refs.echartsMap.mapData = that.mapList
+ })
+
+ }
+
+ }
}
@@ -360,7 +464,7 @@
flex-direction: row;
width: 100%;
flex-wrap: wrap;
- justify-content: space-between;
+ justify-content: flex-start;
padding: 0 .2rem
}
@@ -371,8 +475,9 @@
margin-top: 0.05rem;
margin-bottom: 0.1rem;
background: url(../../assets/jsc/li_type.png) no-repeat left top;
- background-size: 100% auto;
- padding: .15rem
+ background-size: 100% 100%;
+ padding: .15rem;
+ min-width: 32%;
}
.jscL1type img {
diff --git a/src/views/record/map.vue b/src/views/record/map.vue
index 3e4488c..8ce650c 100644
--- a/src/views/record/map.vue
+++ b/src/views/record/map.vue
@@ -8,10 +8,18 @@
-
-
+
+
+
+
+
+
+
+
+
+
@@ -40,7 +48,10 @@
} from "@/api/system/dictionary";
import {
index
- } from "@/api/system/baseForm.js"
+ } from "@/api/system/baseForm.js"
+ import {
+ Message
+ } from 'element-ui'
export default {
data() {
return {
@@ -54,12 +65,16 @@
// markerList: [],
mapList: [],
fullscreenLoading: false,
- streetList: [],
+ streetList: [],
+ typeList:[],
+ levelList:[],
openSearch: false,
select: {
page_size: 50,
page: 1,
- street: '',
+ street: '',
+ disabilitylevel:'',
+ disabilitytype:'',
name: '',
table_name: 'records',
show_relation: ['admin', 'department'],
@@ -67,20 +82,31 @@
},
columns: [{
title: '姓名',
- key: 'name',
+ key: 'name',
+ render:(h,params)=>{
+ return h('i',{
+ attrs:{
+ class:'el-icon-position'
+ }
+ },params.row.name)
+ }
}, {
title: '所属街道',
key: 'street',
+ }, {
+ title: '残疾类别',
+ key: 'disabilitytype',
+ }, {
+ title: '残疾等级',
+ key: 'disabilitylevel',
}]
}
},
- mounted() {
+ mounted() {
+ // typeList:[],
+ // levelList:[],
this.initHeight()
- getparameter({
- number: 'streetList'
- }).then(res => {
- this.streetList = res.detail
- })
+ this.getLabel()
this.$nextTick(function() {
this.mapInit()
})
@@ -93,7 +119,19 @@
// setTimeout(() => {
// this.fullscreenLoading = false;
// }, 2000);
- // },
+ // },
+ async getLabel() {
+ let numbers = {
+ number:['streetList','disabilitylevelList','disabilitytypeList']
+ }
+ const res = await getparameter(numbers);
+ for(var k of res){
+
+ this.streetList = k.number=='streetList'?k.detail:this.streetList
+ this.typeList = k.number=='disabilitytypeList'?k.detail:this.typeList
+ this.levelList = k.number=='disabilitylevelList'?k.detail:this.levelList
+ }
+ },
async initHeight() {
let winHeight = document.body.clientHeight
this.mapHeight = winHeight - 50 - 20
@@ -159,8 +197,6 @@
that.map.remove(that.makerList)
that.makerList = []
// this.map.clearMap();
- console.log("this.makerList", this.makerList)
- console.log("this.mapList", this.mapList)
let list = this.mapList.map((m) => {
return {
id: m.id, //数据id
@@ -254,11 +290,16 @@
this.getindex()
},
movetoperson(row, index) {
- console.log(row)
this.openData = []
- this.openData.push(row)
- this.map.panTo([row.longitude, row.latitude])
- this.infoWindow.open(this.map, [row.longitude, row.latitude])
+ this.openData.push(row)
+ if(row.longitude && row.latitude){
+ this.map.panTo([row.longitude, row.latitude])
+ this.infoWindow.open(this.map, [row.longitude, row.latitude])
+ }else{
+ this.map.panTo(this.center)
+ this.infoWindow.open(this.map, this.center)
+ }
+
},
async getindex() {
this.fullscreenLoading = true;
@@ -277,9 +318,26 @@
"key": "street",
"op": "eq",
"value": this.select.street
+ },{
+ "key": "disabilitytype",
+ "op": "eq",
+ "value": this.select.disabilitytype
+ },{
+ "key": "disabilitylevel",
+ "op": "eq",
+ "value": this.select.disabilitylevel
}],
})
- this.select.total = res.total
+ this.select.total = res.total
+ if(res.data.length<1){
+
+ Message({
+ type: 'warning',
+ message: '暂无数据'
+ })
+ this.fullscreenLoading = false;
+ return
+ }
let _data = []
let _nolng = [] //只有地址没有经纬度
for (var k of res.data) {
@@ -299,7 +357,7 @@
let that = this
AMap.plugin("AMap.Geocoder", function() {
geocoder = new AMap.Geocoder({
- city: '常州市' // city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode
+ city: '常州' // city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode
})
_nolng.map((k, index) => {
geocoder.getLocation(k.reside, function(status, result) {
@@ -401,7 +459,8 @@
cursor: pointer;
}
.street {
- margin-right: 10px
+ margin-right: 10px;
+ width:105px
}
/deep/ .street .el-input__inner {
diff --git a/src/views/record/personinfo.vue b/src/views/record/personinfo.vue
index ae4571e..1200a2c 100644
--- a/src/views/record/personinfo.vue
+++ b/src/views/record/personinfo.vue
@@ -19,6 +19,9 @@
import {
show
} from "@/api/system/baseForm.js"
+ import {
+ getSsttIndex
+ } from "@/api/sstt"
import {
Message
} from 'element-ui'
@@ -27,7 +30,8 @@
return {
count: 0,
form: '',
- mapHeight: 0,
+ mapHeight: 0,
+ idcard:'',
option: {
"name": "视图",
"nodeList": [{
@@ -41,7 +45,7 @@
"id": "person",
"name": "个人信息",
"left": 200,
- "top": 160,
+ "top": 80,
"content":''
},
{
@@ -56,6 +60,13 @@
"left": 900,
"top": 480,
"content":''
+ },
+ {
+ "id": "raises",
+ "name": "居家照护",
+ "left": 200,
+ "top": 480,
+ "content":''
}
],
"lineList": [{
@@ -69,6 +80,10 @@
{
"from": "all",
"to": "view"
+ },
+ {
+ "from": "all",
+ "to": "raises"
}
]
}
@@ -105,6 +120,7 @@
let contents = `
姓名:${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
+ })
}
}