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

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

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

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

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

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

Loading…
Cancel
Save