From a2f87651731f95ad00045b4c2fff9b736355337f Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Wed, 12 Jul 2023 15:39:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=20=E5=8F=B0=E8=B4=A6=20?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E9=80=89=E6=8B=A9=20=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/dashboard.js | 4 +- src/views/applybook/education.vue | 9 + src/views/applybook/finance.vue | 9 + src/views/applybook/health.vue | 9 + src/views/applybook/office.vue | 9 + src/views/applybook/reform.vue | 9 + src/views/book/index.vue | 28 +- src/views/component/dialog.vue | 43 +- src/views/component/recordModal.vue | 127 ++++ src/views/component/table.vue | 4 +- src/views/dashboard/components/PanelGroup.vue | 118 +--- src/views/dashboard/index.vue | 596 +++++++++--------- src/views/jsc/components/echartsLine.vue | 2 +- src/views/jsc/components/echartsMap.vue | 32 +- src/views/jsc/index.vue | 176 ++++-- src/views/login/index.vue | 6 +- src/views/record/components/addRecord.vue | 3 +- src/views/record/index.vue | 45 +- src/views/record/map.vue | 234 ++++++- .../viewrecords/components/addViewRecord.vue | 88 ++- src/views/viewrecords/components/check.vue | 6 +- src/views/viewrecords/index.vue | 6 +- 22 files changed, 1018 insertions(+), 545 deletions(-) create mode 100644 src/views/applybook/education.vue create mode 100644 src/views/applybook/finance.vue create mode 100644 src/views/applybook/health.vue create mode 100644 src/views/applybook/office.vue create mode 100644 src/views/applybook/reform.vue create mode 100644 src/views/component/recordModal.vue diff --git a/src/api/dashboard.js b/src/api/dashboard.js index 858d041..6b86cfa 100644 --- a/src/api/dashboard.js +++ b/src/api/dashboard.js @@ -10,7 +10,7 @@ export function getCounts() { export function getChartsData(params) { return request({ - url: '/api/admin/get-charts-data', + url: '/api/admin/other/total', method: 'get', params: params }) @@ -18,7 +18,7 @@ export function getChartsData(params) { export function getChartsHome(params) { return request({ - url: '/api/admin/chart/home', + url: '/api/admin/other/home', method: 'get', params: params }) diff --git a/src/views/applybook/education.vue b/src/views/applybook/education.vue new file mode 100644 index 0000000..2b354fd --- /dev/null +++ b/src/views/applybook/education.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/applybook/finance.vue b/src/views/applybook/finance.vue new file mode 100644 index 0000000..2b354fd --- /dev/null +++ b/src/views/applybook/finance.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/applybook/health.vue b/src/views/applybook/health.vue new file mode 100644 index 0000000..2b354fd --- /dev/null +++ b/src/views/applybook/health.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/applybook/office.vue b/src/views/applybook/office.vue new file mode 100644 index 0000000..2b354fd --- /dev/null +++ b/src/views/applybook/office.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/applybook/reform.vue b/src/views/applybook/reform.vue new file mode 100644 index 0000000..2b354fd --- /dev/null +++ b/src/views/applybook/reform.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/book/index.vue b/src/views/book/index.vue index 961e075..5186bbd 100644 --- a/src/views/book/index.vue +++ b/src/views/book/index.vue @@ -40,20 +40,22 @@ raise: 'raises', cars: 'fuels', address: 'starts_addresses', - starts: 'starts_subsidys' + starts: 'starts_subsidys', + reform:'reforms' }, bookTypeObjs: { - number: '残疾人证台账', - drug: '免费服药台账', - children: '儿童康复台账', - help: '辅具适配台账', - health: '社区康复台账', - student: '优秀学生奖学金台账', - education: '教育专项台账', - raise: '托养台账', - cars: '燃油补贴台账', - address: '创业场地补贴台账', - starts: '创业补贴台账' + number: '残疾人证统计', + drug: '免费服药统计', + children: '儿童康复统计', + help: '辅具适配统计', + health: '社区康复统计', + student: '优秀学生奖学金统计', + education: '教育专项统计', + raise: '托养统计', + cars: '燃油补贴统计', + address: '创业场地补贴统计', + starts: '创业补贴统计', + reform:'无障碍改造统计' } } @@ -90,8 +92,6 @@ this.monthY.push(m.total) } this.showCharts = true - console.log('res',res) - console.log(this.monthX) } }, diff --git a/src/views/component/dialog.vue b/src/views/component/dialog.vue index a43bd2a..beb4f7c 100644 --- a/src/views/component/dialog.vue +++ b/src/views/component/dialog.vue @@ -3,7 +3,11 @@ import { save, show, index } from "@/api/system/baseForm"; import { getparameter } from "@/api/system/dictionary"; import { domMap } from "@/const/inputType"; import { addPropsMap } from "@/const/addProps"; +import recordModal from '../component/recordModal.vue' export default { + components:{ + recordModal + }, props: { formInfo: { type: Array, @@ -27,6 +31,14 @@ export default { }, }, [ + h("recordModal", + { + ref: "recordModal", + on:{ + getRecordInfo:this.getRecordInfo + } + }, + ""), h( "el-form", { @@ -42,7 +54,6 @@ export default { (() => { let dom = []; this.formInfo.filter(i => i.form_show).forEach((i, index) => { - console.log("i",i) dom.push( h( "el-form-item", @@ -82,10 +93,13 @@ export default { }, on: { [this.getEventType(i.edit_input)]: (e) => { - if (i.field) { + if (i.field==='name') { + this.openRecords() + }else{ this.form[i.field] = e; - this.form = Object.assign({}, this.form); + // this.form = Object.assign({}, this.form); } + }, }, scopedSlots: @@ -150,6 +164,7 @@ export default { })() ), h("template", { slot: "footer" }, [ + h( "el-button", { @@ -199,6 +214,20 @@ export default { }; }, methods: { + openRecords(){ + this.$refs.recordModal.isShow = true + }, + getRecordInfo(e){ + for(var k in e){ + for(var m in this.form){ + if(m == k){ + this.$set(this.form,m,e[k]) + } + } + } + this.$set(this.form,'work_status','待审核') + this.$forceUpdate() + }, findKey(obj, value, compare = (a, b) => a === b) { return Object.keys(obj).find(k => compare(parseInt(obj[k]), parseInt(value))) }, @@ -341,14 +370,14 @@ export default { const res = await show({ id: this.id, table_name: this.tableName }); this.$integrateData(this.form, res); this.form = Object.assign({}, this.form); - + console.log("formInfo",this.formInfo) this.formInfo.forEach((i) => { if (i && i.edit_input === "file") { this.file[i.field] = [ { - name: res[i.link_with_name]?.original_name, - url: res[i.link_with_name]?.url, - response: res[i.link_with_name], + name: res[i._relations.link_with_name]?.original_name, + url: res[i._relations.link_with_name]?.url, + response: res[i._relations.link_with_name], }, ]; } diff --git a/src/views/component/recordModal.vue b/src/views/component/recordModal.vue new file mode 100644 index 0000000..70d57e7 --- /dev/null +++ b/src/views/component/recordModal.vue @@ -0,0 +1,127 @@ + + + + + diff --git a/src/views/component/table.vue b/src/views/component/table.vue index 8f90246..68018b9 100644 --- a/src/views/component/table.vue +++ b/src/views/component/table.vue @@ -436,13 +436,13 @@ export default { ? getparameter({ id: i._relations.parameter_id },false).then((res) => { i._params = res.detail; }) - : this.index({ + : (i._relations.link_table_name==='uploads'?'':this.index({ table_name: i._relations.link_table_name, page: 1, page_size: 9999, }).then((res) => { i._params = res.data; - }); + })) } }); this.form = fields.sort(this.handle('sort')); diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index ffc9509..10baa8f 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -1,55 +1,26 @@ @@ -123,26 +69,16 @@ type: Object, default: { - "business": { - "server_money_total": 0, - "nurse_money_total": 0, - "remain_money_total": 0 - }, - "person_efficiency": { - "server_time_total": "0", - "expect": 0, - "act": 0 - }, - "customer": { - "active": 0, - "add": 0, - "wash": 0 - }, - "order": { - "server_total": 0, - "cycle_total": 0, - "unit_total": 0 + "apply": { + "month_total": 0, + "today_inc": 0, + "total": 0 }, + "record": { + "month_total": 0, + "today_total": 0, + "total": 0 + } } } }, @@ -193,10 +129,10 @@ .box { position: relative; - width: 33%; - margin-left: 0.5%; - margin-right: 0.5%; - margin-bottom: 2.375rem; + width: 48%; + margin-left: 1%; + margin-right: 1%; + margin-bottom: 1.375rem; box-shadow: 0px 8px 15px 0px rgba(212, 84, 32, 0.3100); border-radius: 8px; box-sizing: border-box; diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 1b8c496..59b9241 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -1,314 +1,292 @@ - - - - - diff --git a/src/views/jsc/components/echartsLine.vue b/src/views/jsc/components/echartsLine.vue index b3a2852..dd96bd7 100644 --- a/src/views/jsc/components/echartsLine.vue +++ b/src/views/jsc/components/echartsLine.vue @@ -66,7 +66,7 @@ textStyle: { show: true, color: this.color[1] - }, + } } }], yAxis: [{ diff --git a/src/views/jsc/components/echartsMap.vue b/src/views/jsc/components/echartsMap.vue index c75587a..78feefd 100644 --- a/src/views/jsc/components/echartsMap.vue +++ b/src/views/jsc/components/echartsMap.vue @@ -22,16 +22,16 @@ }, 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) { @@ -109,6 +109,17 @@ } } }, + regions: [{ + name: "指前镇", + itemStyle: { + normal: { + areaColor: "red", + }, + emphasis: { + areaColor: "red", + }, + }, + }], effect: { show: true, @@ -119,7 +130,8 @@ markPoint: { symbol: 'image://' + require('@/assets/logo-mini.png'), // 自定义图片路径 - symbolSize: [28, 49], // 图片大小 + symbolSize: [50, 40], // 图片大小 + symbolOffset: [0, -30], label: { position: 'bottom', color: "#fff", diff --git a/src/views/jsc/index.vue b/src/views/jsc/index.vue index 54ad5da..0b4b5ea 100644 --- a/src/views/jsc/index.vue +++ b/src/views/jsc/index.vue @@ -2,8 +2,9 @@
+ 进入后台
-
+
@@ -79,7 +80,7 @@ 需求类别分析
- +
@@ -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 @@