@@ -100,7 +101,10 @@
import echartsMap from "./components/echartsMap.vue";
import echartsLine from "./components/echartsLine.vue";
import echartsPie from "./components/echartsPie.vue";
- import CountTo from 'vue-count-to'
+ import CountTo from 'vue-count-to'
+ import {
+ getChartsHome
+ } from "../../api/dashboard.js"
export default {
components: {
echartsMap,
@@ -109,96 +113,80 @@
CountTo
},
data() {
- return {
+ return {
+ showChart:false,
radiusType1: ['40%', '60%'],
radiusType: '50%',
- ageX: ['0-18', '19-35', '35-60', '60以上'],
- ageY: [33, 56, 17, 44],
- monthX: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
- monthY: [5, 6, 7, 8, 9, 10, 12, 5, 6, 7, 8, 9],
- needX: ['健康体检', '残疾人补贴', '康复', '托养', '无障碍改造'],
- needY: [33, 56, 17, 44, 16],
- peopleData: [{
- value: 310,
- name: '金城镇'
- }, {
- value: 234,
- name: '儒林镇'
- }, {
- value: 135,
- name: '直溪镇'
- }, {
- value: 548,
- name: '朱林镇'
- }, {
- value: 148,
- name: '薛埠镇'
- }, {
- value: 99,
- name: '指前镇'
- }, {
- value: 58,
- name: '东城街道'
- }, {
- value: 158,
- name: '西城街道'
- }, {
- value: 258,
- name: '尧塘街道'
- }],
+ ageX: [],
+ ageY: [],
+ monthX: [],
+ monthY: [],
+ needX: [],
+ needY: [],
+ needNames:{
+ starts_subsidys:'自主创业',
+ starts_addresses:'经营场地',
+ fuels:'燃油补贴',
+ disabilities:'残疾人证',
+ educations:'教育专项',
+ recoveries:"康复设备"
+ },
+ peopleData: [],
sexData: [{
- value: 335,
+ value: 0,
+ text:'man',
name: '男性'
}, {
- value: 335,
+ value: 0,
+ text:'woman',
name: '女性'
}],
jscMtList: [{
icon: require('../../assets/jsc/iconimg1.jpg'),
text: '今年总数',
- num: 100
+ num: 0
}, {
icon: require('../../assets/jsc/iconimg2.jpg'),
text: '今年新增',
- num: 123
+ num: 0
}, {
icon: require('../../assets/jsc/iconimg3.jpg'),
text: '今年减少',
- num: 45
+ num: 0
}, {
icon: require('../../assets/jsc/iconimg4.jpg'),
text: '今年访视',
- num: 99
+ num: 0
}],
jscL1typeList: [{
icon: require('../../assets/jsc/icon_img1.png'),
- text: '视力残疾',
- num: 72
+ text: '视力',
+ num: 0
}, {
icon: require('../../assets/jsc/icon_img2.png'),
- text: '听力残疾',
- num: 36
+ text: '听力',
+ num: 0
}, {
icon: require('../../assets/jsc/icon_img3.png'),
- text: '言语残疾',
- num: 56
+ text: '言语',
+ num: 0
}, {
icon: require('../../assets/jsc/icon_img4.png'),
- text: '肢体残疾',
- num: 87
+ text: '肢体',
+ num: 0
}, {
icon: require('../../assets/jsc/icon_img5.png'),
- text: '智力残疾',
- num: 24
+ text: '智力',
+ num: 0
}, {
icon: require('../../assets/jsc/icon_img1.png'),
- text: '精神残疾',
- num: 101
+ text: '精神',
+ num: 0
}, {
icon: require('../../assets/jsc/icon_img2.png'),
- text: '多重残疾',
- num: 18
+ text: '多重',
+ num: 0
}]
}
},
@@ -213,9 +201,15 @@
that.$refs.echartsLine2.resetCharts()
that.$refs.echartsPie.resetCharts()
that.$refs.echartsPie1.resetCharts()
- }
+ }
+ this.loadData()
},
- methods: {
+ methods: {
+ todashboard(){
+ this.$router.push({
+ path: '/'
+ })
+ },
setRem() {
// 默认使用100px作为基准大小
const baseSize = 100;
@@ -224,6 +218,56 @@
const rem = vW * baseVal; // 以默认比例值乘以当前窗口宽度,得到该宽度下的相应font-size值
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[2].num = res.total.year_des_total
+ this.jscMtList[3].num = res.total.year_viewrecords
+ // 年龄
+ for(var age in res.age_total){
+ this.ageX.push(age)
+ this.ageY.push(res.age_total[age])
+ }
+ //需求类别 业务类别
+ for(var need of res.apply){
+ let names = ''
+ for (var k in this.needNames){
+ if(need.table==k){
+ names = this.needNames[k]
+ }
+ }
+ this.needX.push(names?names:need.name)
+ this.needY.push(need.total)
+ }
+ // 残疾类别
+ for(var type of res.disability_type){
+ for(var type1 of this.jscL1typeList){
+ if(type.value==type1.text){
+ type1.num = type.total
+ }
+ }
+ }
+ // 性别
+ this.sexData[0].value = res.sex_total['man']
+ this.sexData[1].value = res.sex_total['woman']
+ // 街道
+ for(var street of res.street_list){
+ this.peopleData.push({
+ name:street.value,
+ value:street.total
+ })
+ }
+ // 月度访视
+ for(var view of res.viewrecords){
+ this.monthX.push(view.month)
+ this.monthY.push(view.total)
+ }
+
+ this.showChart = true
+ })
}
},
@@ -262,6 +306,9 @@
background: url(../../assets/jsc/headbg.png) no-repeat left bottom;
background-size: 100% auto;
padding: 0 2%;
+ display: flex;
+ justify-content: space-between;
+ align-items: flex-start;
}
.jscT img {
@@ -269,6 +316,15 @@
margin-top: 10px
}
+ .jscT span {
+ font-size: 20px;
+ color: #fff;
+ height: 48px;
+ line-height: 48px;
+ color:#b7efff;
+ cursor: pointer;
+ }
+
.jscB {
display: flex;
justify-content: space-between;
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index d50357a..d95c6d8 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -111,11 +111,13 @@
handleLogin() {
this.$refs.loginForm.validate(valid => {
if (valid) {
- this.loading = true
+ this.loading = true
+ console.log("this.redirect",this.redirect)
+ // return
this.$store.dispatch('user/login', this.loginForm).then(() => {
this.$router.push({
- path: this.redirect || '/'
+ path: '/admin/jsc'
})
this.loading = false
}).catch(() => {
diff --git a/src/views/record/components/addRecord.vue b/src/views/record/components/addRecord.vue
index b948942..bd140cc 100644
--- a/src/views/record/components/addRecord.vue
+++ b/src/views/record/components/addRecord.vue
@@ -409,7 +409,8 @@
}
} else {
this.id = ''
- this.type = ''
+ this.type = ''
+ this.mapform = []
this.$refs['dialog'].reset()
}
},
diff --git a/src/views/record/index.vue b/src/views/record/index.vue
index 0f59d3a..d29a0ac 100644
--- a/src/views/record/index.vue
+++ b/src/views/record/index.vue
@@ -5,13 +5,21 @@
-
+
+
+
+
+
-
-
-
@@ -72,9 +80,10 @@
select: {
pageSize: 10,
pageIndex: 1,
- keyword: ""
- },
- rukuType: '',
+ keyword: "",
+ street:''
+ },
+ streetList:[],
customForm: {
customFormId: 1,
tableName: "records"
@@ -180,6 +189,10 @@
"key": "name",
"op": "like",
"value": this.select.keyword
+ },{
+ "key": "street",
+ "op": "eq",
+ "value": this.select.street
}],
})
this.list = res.data
@@ -298,11 +311,25 @@
},
mounted() {
this.getindex()
- this.getField()
+ this.getField()
+ getparameter({
+ number:'streetList'
+ }).then(res=>{
+ this.streetList = res.detail
+ })
}
}
-
diff --git a/src/views/record/map.vue b/src/views/record/map.vue
index 97ef302..9b5eb30 100644
--- a/src/views/record/map.vue
+++ b/src/views/record/map.vue
@@ -1,5 +1,27 @@
-
+
+
+ 查询
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -13,7 +35,9 @@