From f6334332118fa7843432e9c069a454039d0b0831 Mon Sep 17 00:00:00 2001 From: 付延余 <f-yanyu@outlook.com> Date: 星期四, 19 五月 2022 14:29:30 +0800 Subject: [PATCH] 其他业务 --- src/pages/show/personnelTalents/personnelTalentsChild/PersonnelTalents_UnitPersonnel.vue | 40 +++++++++++++++++++++++++--------------- src/api/personnelTalents.js | 11 ++++++++--- config/index.js | 2 +- 3 files changed, 34 insertions(+), 19 deletions(-) diff --git a/config/index.js b/config/index.js index 7faa8ad..71f01d5 100644 --- a/config/index.js +++ b/config/index.js @@ -3,7 +3,7 @@ // see http://vuejs-templates.github.io/webpack for documentation. const path = require("path"); -let url = 'http://192.168.0.139:8081' +let url = 'http://192.168.0.140:8081' module.exports = { dev: { diff --git a/src/api/personnelTalents.js b/src/api/personnelTalents.js index e2a24bc..6415c9c 100644 --- a/src/api/personnelTalents.js +++ b/src/api/personnelTalents.js @@ -1,11 +1,16 @@ -import { getRequest, postRequest} from "../libs/axios"; +import {getRequest, postRequest} from "../libs/axios"; // 29. 鏌ヨ浜嬩笟鍗曚綅浜哄憳鎯呭喌琛ㄦ牸鏁版嵁鎺ュ彛 export const getPersonTable = (params) => { - return postRequest('/ybg/webservice/app/personnel/getPersonTable.do',params) + return postRequest('/ybg/webservice/app/personnel/getPersonTable.do', params) } +// 鏌ヨ浜嬩笟骞村害鍙樺寲鎯呭喌鎶樼嚎鍥炬暟鎹帴鍙� +export const getUnitLine = (params) => { + return postRequest('/ybg/webservice/app/personnel/ getUnitLine.do', params) +} + //30.鏌ヨ浜烘墠缁垮崱璐埧琛ヨ创琛ㄦ牸鏁版嵁鎺ュ彛 export const getPersonCardTable = (params) => { - return postRequest('/ybg/webservice/app/personnel/getPersonCardTable.do',params) + return postRequest('/ybg/webservice/app/personnel/getPersonCardTable.do', params) } diff --git a/src/pages/show/personnelTalents/personnelTalentsChild/PersonnelTalents_UnitPersonnel.vue b/src/pages/show/personnelTalents/personnelTalentsChild/PersonnelTalents_UnitPersonnel.vue index 963d7d5..617659e 100644 --- a/src/pages/show/personnelTalents/personnelTalentsChild/PersonnelTalents_UnitPersonnel.vue +++ b/src/pages/show/personnelTalents/personnelTalentsChild/PersonnelTalents_UnitPersonnel.vue @@ -55,7 +55,7 @@ <script> import nowSize from "../../../../libs/nowSize"; -import {getPersonTable} from '@/api/personnelTalents'; +import {getPersonTable,getUnitLine} from '@/api/personnelTalents'; export default { name: "PersonnelTalents_UnitPersonnel", @@ -145,16 +145,16 @@ CARE_GORY: ['浜嬩笟鍗曚綅', '鍦ㄨ亴浜哄憳', '骞翠汉鍧囨敹鍏�'], tableHeight: window.innerHeight - nowSize(1000), isShow:true, - echartSeries:{ - jumin:[120, 132, 101, 134, 90, 230], - chengzhen:[220, 182, 191, 234, 290, 330], - nongcun:[150, 232, 201, 154, 190, 330] + echartSeries: {}, + selectIndex: { + type:1 } } }, mounted() { this.Init_echarts() this.getPersonTable() + this.getUnitLine() }, methods: { mergeColumnTableCell({rowIndex, columnIndex}) { @@ -228,7 +228,7 @@ nameGap: nowSize(92),// 鍧愭爣杞村悕绉颁笌杞寸嚎涔嬮棿鐨勮窛绂汇�� type: 'category', boundaryGap: false,// 鍧愭爣杞翠袱绔暀鐧� - data: ['2017骞�', '2018骞�', '2019骞�', '2020骞�', '2021骞�'], + data: this.echartSeries.years, axisLabel: { show: true, textStyle: { @@ -277,17 +277,17 @@ { name: '灞呮皯浜哄潎鍙敮閰嶆敹鍏�', type: 'line', - data: this.echartSeries.jumin + data: this.echartSeries.quanshi }, { name: '鍩庨晣灞呮皯', type: 'line', - data: this.echartSeries.chengzhen + data: this.echartSeries.shizhi }, { name: '鍐滄潙灞呮皯', type: 'line', - data: this.echartSeries.nongcun + data: this.echartSeries.xian } ] }; @@ -298,17 +298,18 @@ }, // 閫氳繃鐐瑰嚮鏇存崲echarts鍥捐〃淇℃伅 selectEcharts(index) { - console.log(index); + this.selectIndex.type = index+1 switch(index){ case 0: this.isShow = true; - this.echartSeries = { - jumin:[120, 132, 101, 134, 90, 230], - chengzhen:[220, 182, 191, 234, 290, 330], - nongcun:[150, 232, 201, 154, 190, 330] - } + this.getUnitLine() this.Init_echarts() break; + // case 1: + // this.getUnitLine() + // this.Init_echarts() + // console.log('鎴戞槸1'); + // break; default: this.isShow = false; break; @@ -321,6 +322,15 @@ this.tableData = res.list } }) + }, + // 41.鏌ヨ浜嬩笟骞村害鍙樺寲鎯呭喌鎶樼嚎鍥炬暟鎹帴鍙� + getUnitLine(){ + getUnitLine(this.selectIndex).then(res=>{ + if(res.code === 1000){ + this.echartSeries = res.obj + this.Init_echarts() + } + }) } }, created() { -- Gitblit v1.9.1