| | |
| | | getCompanys, |
| | | queryYearKh, |
| | | queryYearG, |
| | | selectAge |
| | | selectAge, |
| | | } from "../../api/securityUnitOperation/securityUnitOperation"; |
| | | export default { |
| | | data() { |
| | |
| | | sheb: 0, |
| | | addsheb: 0, |
| | | baoanPq: 0, |
| | | addbaoanPq: 0 |
| | | addbaoanPq: 0, |
| | | }, |
| | | options0: [ |
| | | { |
| | | value: "2012", |
| | | label: "2012年" |
| | | label: "2012年", |
| | | }, |
| | | { |
| | | value: "2011", |
| | | label: "2011年" |
| | | label: "2011年", |
| | | }, |
| | | { |
| | | value: "2010", |
| | | label: "2010年" |
| | | label: "2010年", |
| | | }, |
| | | { |
| | | value: "2009", |
| | | label: "2009年" |
| | | label: "2009年", |
| | | }, |
| | | { |
| | | value: "2008", |
| | | label: "2008年" |
| | | label: "2008年", |
| | | }, |
| | | { |
| | | value: "2007", |
| | | label: "2007年" |
| | | } |
| | | label: "2007年", |
| | | }, |
| | | ], |
| | | options1: [], |
| | | options2: [], |
| | |
| | | middleEchart1: null, |
| | | middleEchart2: null, |
| | | bottomEchart: null, |
| | | bottomEchart1: null |
| | | bottomEchart1: null, |
| | | }, |
| | | ageData: { |
| | | qing: 0, |
| | | zhong: 0, |
| | | lao: 0 |
| | | lao: 0, |
| | | }, |
| | | props: { |
| | | children: "children", |
| | | label: "title", |
| | | value: "id" |
| | | value: "id", |
| | | }, |
| | | props2: { |
| | | children: "children", |
| | | label: "enterpriseName", |
| | | value: "departmentid" |
| | | value: "departmentid", |
| | | }, |
| | | node: {} //选中的记录 |
| | | node: {}, //选中的记录 |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | this.loading4 = true; |
| | | let params = { |
| | | jurisdiction: this.value1, |
| | | deptid: this.value2 |
| | | deptid: this.value2, |
| | | }; |
| | | selectAge(params).then(res => { |
| | | selectAge(params).then((res) => { |
| | | if (res.data.code === 200) { |
| | | if (!this.echartDom.bottomEchart1) { |
| | | this.echartDom.bottomEchart1 = echarts.init( |
| | |
| | | "&enterpriseName=" + |
| | | this.enterpriseName + |
| | | "&jurisdiction1=" + |
| | | this.value1 |
| | | this.value1, |
| | | }); |
| | | }, |
| | | getFenju() { |
| | | this.options1 = []; |
| | | this.value1 = ""; |
| | | this.node = {}; |
| | | lazyTrees().then(res => { |
| | | lazyTrees().then((res) => { |
| | | if (res.data.code === 200) { |
| | | this.options1 = res.data.data; |
| | | this.value1 = this.options1[0] ? this.options1[0].id : ""; |
| | |
| | | }, |
| | | |
| | | getCompanys() { |
| | | getCompanys({ jurisdiction: this.value1 }).then(res => { |
| | | getCompanys({ jurisdiction: this.value1 }).then((res) => { |
| | | if (res.data.code === 200) { |
| | | this.options2 = res.data.data; |
| | | // this.value2 = this.options2[0] ? this.options2[0].departmentid : ""; |
| | |
| | | getQueryCounts() { |
| | | let params = { |
| | | jurisdiction: this.value1, |
| | | deptid: this.value2 |
| | | deptid: this.value2, |
| | | }; |
| | | queryCounts(params).then(res => { |
| | | queryCounts(params).then((res) => { |
| | | if (res.data.code === 200) { |
| | | let data = res.data.data[0]; |
| | | this.card = { |
| | | baoanTotal: data.baoan.thisnum, |
| | | baoanTotal: data.baoan.num, |
| | | addbaoanTotal: data.baoan.thisnum - data.baoan.lastnum, |
| | | zcBaoan: data.zcbaoan.thisnum, |
| | | addzcBaoan: data.zcbaoan.thisnum - data.zcbaoan.lastnum, |
| | | czBaoan: data.czbaoan.thisnum, |
| | | czBaoan: data.czbaoan.num, |
| | | addczBaoan: data.czbaoan.thisnum - data.czbaoan.lastnum, |
| | | gkBaoan: 0, |
| | | addgkBaoan: 0, |
| | | kh: data.kh.thisnum, |
| | | kh: data.kh.num, |
| | | addkh: data.kh.thisnum - data.kh.lastnum, |
| | | sheb: data.sheb.thisnum, |
| | | sheb: data.sheb.num, |
| | | addsheb: data.sheb.thisnum - data.sheb.lastnum, |
| | | baoanPq: data.paiq.thisnum, |
| | | addbaoanPq: data.paiq.thisnum - data.paiq.lastnum |
| | | baoanPq: data.paiq.num, |
| | | addbaoanPq: data.paiq.thisnum - data.paiq.lastnum, |
| | | }; |
| | | } |
| | | }); |
| | |
| | | this.loading2 = true; |
| | | let params = { |
| | | jurisdiction: this.value1, |
| | | deptid: this.value2 |
| | | deptid: this.value2, |
| | | }; |
| | | queryYearKh(params).then(res => { |
| | | queryYearKh(params).then((res) => { |
| | | if (res.data.code === 200) { |
| | | if (!this.echartDom.middleEchart2) { |
| | | this.echartDom.middleEchart2 = echarts.init( |
| | |
| | | this.loading3 = true; |
| | | let params = { |
| | | jurisdiction: this.value1, |
| | | deptid: this.value2 |
| | | deptid: this.value2, |
| | | }; |
| | | queryYearG(params).then(res => { |
| | | queryYearG(params).then((res) => { |
| | | if (res.data.code === 200) { |
| | | if (!this.echartDom.middleEchart1) { |
| | | this.echartDom.middleEchart1 = echarts.init( |
| | |
| | | sheb: 0, |
| | | addsheb: 0, |
| | | baoanPq: 0, |
| | | addbaoanPq: 0 |
| | | addbaoanPq: 0, |
| | | }; |
| | | this.ageData = { |
| | | qing: 0, |
| | | zhong: 0, |
| | | lao: 0 |
| | | lao: 0, |
| | | }; |
| | | }, |
| | | changeCompanys() { |
| | | this.options2.forEach(item => { |
| | | this.options2.forEach((item) => { |
| | | if (item.departmentid === this.value2) { |
| | | this.enterpriseName = item.enterpriseName; |
| | | } |
| | |
| | | this.getQueryYearKh(); |
| | | this.getQueryYearG(); |
| | | this.setAgeEchart(); |
| | | } |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.getFenju(); |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |