From bc4f603fe677aecb273e3a192ff1be69202bbd78 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Tue, 09 Nov 2021 20:49:00 +0800
Subject: [PATCH] 部分改动
---
src/views/securityUnitOperation/economicAnalysis.vue | 197 ++++++++++++++++++++++++++++++++++--------------
1 files changed, 138 insertions(+), 59 deletions(-)
diff --git a/src/views/securityUnitOperation/economicAnalysis.vue b/src/views/securityUnitOperation/economicAnalysis.vue
index 327a2b2..0888a17 100644
--- a/src/views/securityUnitOperation/economicAnalysis.vue
+++ b/src/views/securityUnitOperation/economicAnalysis.vue
@@ -15,21 +15,44 @@
>
</el-option>
</el-select> -->
- <el-select
+ <!-- <el-select
class="select1"
- v-model="value1"
+ ref="treeForm"
+ v-model="node.title"
placeholder="请选择"
- @change="fenjuChange"
>
- <el-option
- v-for="item in options1"
- :key="item.id"
- :label="item.title"
- :value="item.id"
- >
+ <el-option style="height: auto;" :value="node">
+ <el-tree
+ :data="options1"
+ default-expand-all
+ node-key="id"
+ @node-click="handleNodeClick"
+ :props="props"
+ >
+ </el-tree>
</el-option>
- </el-select>
- <el-select
+ </el-select> -->
+ <avue-input-tree
+ class="select1"
+ default-expand-all
+ v-model="value1"
+ placeholder="请选择内容"
+ type="tree"
+ :dic="options1"
+ :props="props"
+ @change="handleNodeClick"
+ ></avue-input-tree>
+ <avue-input-tree
+ class="select2"
+ default-expand-all
+ v-model="value2"
+ placeholder="请选择公司"
+ type="tree"
+ :dic="options2"
+ :props="props2"
+ @change="changeCompanys"
+ ></avue-input-tree>
+ <!-- <el-select
class="select2"
v-model="value2"
placeholder="请选择"
@@ -42,7 +65,7 @@
:value="item.departmentid"
>
</el-option>
- </el-select>
+ </el-select> -->
<el-button @click="toEconomicTable">进入数据统计表</el-button>
</div>
@@ -99,7 +122,7 @@
<script>
import * as echarts from "echarts";
import echartJs from "./securityEchart.js";
-import { lazyTreeJu } from "../../api/index/index";
+import { lazyTreeJu, lazyTrees } from "../../api/index/index";
import {
getCompanys,
selectPCount,
@@ -107,7 +130,7 @@
queryYearSoil,
queryYearAn,
queryYearPz,
- queryYearKh
+ queryYearKh,
} from "../../api/securityUnitOperation/securityUnitOperation";
export default {
data() {
@@ -118,28 +141,28 @@
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: [],
@@ -151,15 +174,31 @@
paiQ: 0,
addPaiQ: 0,
sheBPerson: 0,
- addSheBPerson: 0
+ addSheBPerson: 0,
},
loading1: true,
loading2: true,
loading3: true,
- enterpriseName: ""
+ enterpriseName: "",
+ props: {
+ children: "children",
+ label: "title",
+ value: "id",
+ },
+ props2: {
+ children: "children",
+ label: "enterpriseName",
+ value: "departmentid",
+ },
+ node: {}, //选中的记录
};
},
methods: {
+ //点击节点
+ handleNodeClick(data) {
+ this.value1 = data;
+ this.getCompanys();
+ },
toEconomicTable() {
this.$router.push({
path:
@@ -168,30 +207,31 @@
"&enterpriseName=" +
this.enterpriseName +
"&jurisdiction1=" +
- this.value1
+ this.value1,
});
},
getFenju() {
- lazyTreeJu().then(res => {
+ this.options1 = [];
+ this.value1 = "";
+ this.node = {};
+ lazyTrees().then((res) => {
if (res.data.code === 200) {
this.options1 = res.data.data;
this.value1 = this.options1[0] ? this.options1[0].id : "";
+ this.node = this.options1[0];
this.getCompanys();
} else {
this.$message.error(res.msg);
}
});
},
- fenjuChange() {
- this.getCompanys();
- },
pieChange() {
this.loading2 = true;
let params = {
jurisdiction: this.value1,
- deptid: this.value2
+ deptid: this.value2,
};
- selectPCount(params).then(res => {
+ selectPCount(params).then((res) => {
if (res.data.code === 200) {
let middleEchart2 = echarts.init(
document.getElementById("middleEchart2")
@@ -204,10 +244,10 @@
});
},
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 : "";
+ // this.value2 = this.options2[0] ? this.options2[0].departmentid : "";
this.changeCompanys();
}
});
@@ -215,20 +255,20 @@
getSocialSecurity() {
let params = {
jurisdiction: this.value1,
- deptid: this.value2
+ deptid: this.value2,
};
- selectTo(params).then(res => {
+ selectTo(params).then((res) => {
if (res.data.code === 200) {
let data = res.data.data[0];
- this.socialSecurity.num = data.thismouth;
+ this.socialSecurity.num = data.znum;
this.socialSecurity.addNum = data.thismouth - data.lastmonth;
- this.socialSecurity.money = data.thisamount;
+ this.socialSecurity.money = data.tamountnum;
this.socialSecurity.addMoney = data.thisamount - data.lastamount;
- this.socialSecurity.paiQ = data.userpcthismouth;
+ this.socialSecurity.paiQ = data.userpcnum;
this.socialSecurity.addPaiQ =
data.userpcthismouth - data.userpclastmouth;
this.socialSecurity.sheBPerson =
- data.userthismouth && (data.thismouth / data.userthismouth) * 100
+ data.usernum && (data.znum / data.userthismouth) * 100
? ((data.thismouth / data.userthismouth) * 100).toFixed(2) + "%"
: 0;
this.socialSecurity.addSheBPerson =
@@ -252,11 +292,11 @@
this.loading1 = true;
let params = {
jurisdiction: this.value1,
- deptid: this.value2
+ deptid: this.value2,
};
- queryYearSoil(params).then(res => {
+ queryYearSoil(params).then((res) => {
if (res.data.code === 200) {
- queryYearPz(params).then(res1 => {
+ queryYearPz(params).then((res1) => {
if (res1.data.code === 200) {
let middleEchart1 = echarts.init(
document.getElementById("middleEchart1")
@@ -276,9 +316,9 @@
this.loading3 = 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) {
let bottomEchart = echarts.init(
document.getElementById("bottomEchart")
@@ -291,7 +331,7 @@
});
},
changeCompanys() {
- this.options2.forEach(item => {
+ this.options2.forEach((item) => {
if (item.departmentid === this.value2) {
this.enterpriseName = item.enterpriseName;
}
@@ -300,14 +340,65 @@
this.getSocialSecurity();
this.getQueryYearSoil();
this.getQueryYearAn();
- }
+ },
},
mounted() {
this.getFenju();
- }
+ },
};
</script>
<style lang="scss" scoped>
+@media screen and (max-width: 1280px) {
+ .box-card {
+ font-size: 15px;
+ width: 128px;
+ background: #00aaf1;
+ height: 117px;
+ text-align: center;
+ margin-right: 28px;
+ box-shadow: 5px 5px 5px rgba($color: #000, $alpha: 0.35);
+ line-height: 36px;
+ span:nth-child(2) {
+ color: #06ffff;
+ font-size: 31px;
+ }
+ }
+ .col-content {
+ margin-top: 39px !important;
+ }
+}
+// 适配分辨率1600*900
+@media screen and (min-width: 1281px) and (max-width: 1600px) {
+ .box-card {
+ font-size: 15px;
+ width: 128px;
+ background: #00aaf1;
+ height: 117px;
+ text-align: center;
+ margin-right: 66px;
+ box-shadow: 5px 5px 5px rgba($color: #000, $alpha: 0.35);
+ line-height: 36px;
+ span:nth-child(2) {
+ color: #06ffff;
+ font-size: 31px;
+ }
+ }
+}
+@media screen and(min-width:1601px) and (max-width: 1920px) {
+ .box-card {
+ width: 150px;
+ background: #00aaf1;
+ height: 135px;
+ text-align: center;
+ margin-right: 66px;
+ box-shadow: 5px 5px 5px rgba($color: #000, $alpha: 0.35);
+ line-height: 40px;
+ span:nth-child(2) {
+ color: #06ffff;
+ font-size: 34px;
+ }
+ }
+}
.page1 {
height: 100%;
width: 100%;
@@ -345,23 +436,11 @@
font-weight: 600;
}
}
-.box-card {
- width: 150px;
- background: #00aaf1;
- height: 135px;
- text-align: center;
- margin-right: 66px;
- box-shadow: 5px 5px 5px rgba($color: #000, $alpha: 0.35);
- line-height: 40px;
-}
+
.box-card span {
display: block;
width: 100%;
color: #fff;
-}
-.box-card span:nth-child(2) {
- color: #06ffff;
- font-size: 34px;
}
.rowTitle {
height: 40px;
--
Gitblit v1.9.3