lijinlong^2
杜函宇 1 year ago
parent 6c93d9fa48
commit b118220391

@ -14,22 +14,36 @@ export default {
arr2: [],
};
},
props: {
loadS: {
type: Boolean,
default: true,
},
newTable: {
type: Array,
default: [],
},
},
mounted() {
this.$nextTick(() => {
this.getData();
});
},
watch: {
newTable(newVal, oldVal) {
this.getData()
},
},
mounted() {},
methods: {
getData(e) {
getData() {
this.arr1 = [];
this.arr2 = [];
e.forEach((value) => {
this.newTable.forEach((value) => {
this.arr1.push(value.institutionName);
this.arr2.push(value.checkEnterpriseCount);
});
this.arr1.reverse();
this.arr2.reverse();
this.initChart();
},
initChart() {

@ -17,13 +17,26 @@ export default {
type: Boolean,
default: true,
},
newTable:{
type: Array,
default: [],
}
},
mounted() {
this.$nextTick(()=>{
this.getData()
})
},
watch: {
newTable(newVal, oldVal) {
this.getData()
},
},
mounted() {},
methods: {
getData(e) {
getData() {
this.arr1 = [];
this.arr2 = [];
e.forEach((value) => {
this.newTable.forEach((value) => {
if (value.institutionName == "苏州市") {
this.arr1.unshift(value.institutionName);
this.arr2.unshift(value.plannedEnterpriseCount);

@ -15,18 +15,31 @@ export default {
numTotal: 0,
};
},
mounted() {},
mounted() {
this.$nextTick(() => {
this.getData();
});
},
props: {
loadS: {
type: Boolean,
default: true,
},
newTable: {
type: Array,
default: [],
},
},
watch: {
newTable(newVal, oldVal) {
this.getData();
},
},
methods: {
getData(e) {
getData() {
this.arr1 = [];
this.arr2 = [];
e.forEach((value1) => {
this.newTable.forEach((value1) => {
if (value1.institutionName != "苏州市") {
this.arr1.push({
value: value1.checkEnterpriseCount,

@ -87,7 +87,7 @@
<template slot-scope="scope">
<div
style="font-family: 'Alibaba PuHuiTi'"
:class="scope.row.checkStatus == '2' ? 'isStyle' : ''"
:class="scope.row.checkStatus == '2' ? 'isStyle' : 'isStyle1'"
>
{{ scope.row.checkStatus == 2 ? "未检查" : "已检查" }}
</div>
@ -478,6 +478,9 @@ export default {
.isStyle {
color: #f71052;
}
.isStyle1{
color: #28B384;
}
.dialog-slot {
.closeClick {
position: absolute;

@ -37,16 +37,16 @@
<!-- 各区域执法计划 -->
<div class="bodyBox boxAllStyle" v-if="activeIndex == 1">
<div id="execution">
<executionPlan ref="executionPlan" :loadS="loadS"></executionPlan>
<executionPlan :newTable="newTable" :loadS="loadS"></executionPlan>
</div>
</div>
<div class="bottomBox" v-if="activeIndex == 1">
<div class="boxAllStyle">
<completePlan ref="completePlan" :loadS="loadS"></completePlan>
<completePlan :newTable="newTable" :loadS="loadS"></completePlan>
</div>
<div style="width: 15px"></div>
<div class="boxAllStyle">
<finishRate ref="finishRate" :loadS="loadS"></finishRate>
<finishRate :newTable="newTable" :loadS="loadS"></finishRate>
</div>
</div>
<div class="bgContent" v-if="activeIndex == 0">
@ -128,7 +128,11 @@
>
</el-table-column>
<el-table-column label="完成率" prop="pt" header-align="center">
<template slot-scope="scope"> {{ scope.row.pt == 'NaN'?'0':(scope.row.pt * 100).toFixed(2) }}% </template>
<template slot-scope="scope">
{{
scope.row.pt == "NaN" ? "0" : (scope.row.pt * 100).toFixed(2)
}}%
</template>
</el-table-column>
</el-table>
</div>
@ -179,6 +183,7 @@ export default {
beforeParams: {},
//
loadS: false,
newTable:[],
};
},
components: {
@ -195,42 +200,27 @@ export default {
methods: {
searchList() {
this.beforeParams = { ...this.beforeParams, ...this.ruleForm };
this.handoff();
this.getHomeList()
},
getHomeList() {
this.load1 = true;
this.loadS = true;
indexRegionalism(this.beforeParams).then((res) => {
this.tableData = res.rows;
res.rows.forEach((value1,index1)=>{
if(value1.institutionName == '苏州市'){
let arr1 = this.tableData.slice(index1,index1+1)
this.tableData.splice(index1,1)
this.tableData.unshift(arr1[0])
this.newTable = res.rows
res.rows.forEach((value1, index1) => {
if (value1.institutionName == "苏州市") {
let arr1 = this.tableData.slice(index1, index1 + 1);
this.tableData.splice(index1, 1);
this.tableData.unshift(arr1[0]);
}
})
});
this.load1 = false;
this.loadS = false;
});
},
handoff() {
if (this.activeIndex == 0) {
this.getHomeList();
} else {
this.loadS = true;
indexRegionalism(this.beforeParams).then((res) => {
this.$refs.executionPlan.getData(res.rows);
this.$refs.completePlan.getData(res.rows);
this.$refs.finishRate.getData(res.rows);
this.loadS = false;
});
}
},
active(e) {
this.activeIndex = e;
this.ruleForm = {
plannedYear: "",
};
this.beforeParams = {};
this.handoff();
},
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 !== 0) {

Loading…
Cancel
Save