|
@@ -1,7 +1,7 @@
|
|
|
<!--
|
|
|
* @Author:韩玮涛
|
|
|
* @Date: 2022-08-08 09:38:04
|
|
|
- * @LastEditTime: 2022-08-08 15:50:51
|
|
|
+ * @LastEditTime: 2022-08-10 15:11:30
|
|
|
* @LastEditors: D4THYL3
|
|
|
* @Description: In User Settings Edit
|
|
|
* @FilePath: \operationSupport\src\views\patrolManagement\PatrolStatistics.vue
|
|
@@ -78,22 +78,22 @@
|
|
|
></el-table-column>
|
|
|
|
|
|
<el-table-column
|
|
|
- prop="communityName"
|
|
|
+ prop="routeName"
|
|
|
label="巡更路线"
|
|
|
></el-table-column>
|
|
|
|
|
|
<el-table-column
|
|
|
- prop="communityName"
|
|
|
+ prop="userName"
|
|
|
label="巡更人员"
|
|
|
></el-table-column>
|
|
|
|
|
|
<el-table-column
|
|
|
- prop="communityName"
|
|
|
+ prop="patrolDate"
|
|
|
label="巡更日期"
|
|
|
></el-table-column>
|
|
|
|
|
|
<el-table-column
|
|
|
- prop="communityName"
|
|
|
+ prop="patrolTime"
|
|
|
label="巡更时间"
|
|
|
></el-table-column>
|
|
|
|
|
@@ -109,7 +109,11 @@
|
|
|
:key="ine"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- {{ it.optionValue[scope.$index]}}
|
|
|
+ <span
|
|
|
+ v-if="it.optionId[scope.$index] == 1 ? true : false"
|
|
|
+ style="color: red;"
|
|
|
+ >{{ it.optionValue[scope.$index]}}</span>
|
|
|
+ <span v-else>{{ it.optionValue[scope.$index]}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
@@ -132,36 +136,31 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { statSync } from 'fs';
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
- tableData: [
|
|
|
- {
|
|
|
- communityName: '222222',
|
|
|
- index: '1'
|
|
|
- },
|
|
|
- {
|
|
|
- communityName: '555555',
|
|
|
- index: '2'
|
|
|
- },
|
|
|
- ],
|
|
|
- outermostTitle: [
|
|
|
- {
|
|
|
- oneTitle: '1111',
|
|
|
- twoTitle: [
|
|
|
- {
|
|
|
- title: '55566',
|
|
|
- optionValue: ['5555', '44444', '33333'],
|
|
|
- },
|
|
|
- {
|
|
|
- title: '666644',
|
|
|
- optionValue: ['7777', '147878']
|
|
|
- }
|
|
|
- ]
|
|
|
- }, {
|
|
|
- oneTitle: '2222'
|
|
|
- }
|
|
|
- ],
|
|
|
+ tableData: [],
|
|
|
+ outermostTitle: [],
|
|
|
+ // outermostTitle: [
|
|
|
+ // {
|
|
|
+ // oneTitle: '1111',
|
|
|
+ // twoTitle: [
|
|
|
+ // {
|
|
|
+ // title: '55566',
|
|
|
+ // optionValue: ['5555', '44444', '33333'],
|
|
|
+ // optionId: [],
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // title: '666644',
|
|
|
+ // optionValue: ['7777', '147878'],
|
|
|
+ // optionId: [],
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // }, {
|
|
|
+ // oneTitle: '2222'
|
|
|
+ // }
|
|
|
+ // ],
|
|
|
pageset: {
|
|
|
total: 0,
|
|
|
pageSize: 1,
|
|
@@ -170,6 +169,8 @@ export default {
|
|
|
},
|
|
|
currentPage: 1,
|
|
|
mixins_query: {
|
|
|
+ pageNum: '1',
|
|
|
+ pageSize: '15',
|
|
|
communityId: '',
|
|
|
patrolType: '',
|
|
|
startTime: '',
|
|
@@ -179,23 +180,23 @@ export default {
|
|
|
communityList: [],
|
|
|
patrolTypeList: [{
|
|
|
label: '市容市貌',
|
|
|
- value: '1'
|
|
|
+ value: 1
|
|
|
},
|
|
|
{
|
|
|
label: '环境卫生',
|
|
|
- value: '2'
|
|
|
+ value: 2
|
|
|
},
|
|
|
{
|
|
|
label: '公共秩序',
|
|
|
- value: '3'
|
|
|
+ value: 3
|
|
|
},
|
|
|
{
|
|
|
label: '设备设施',
|
|
|
- value: '4'
|
|
|
+ value: 4
|
|
|
},
|
|
|
{
|
|
|
label: '消防安全',
|
|
|
- value: '5'
|
|
|
+ value: 5
|
|
|
},]
|
|
|
|
|
|
}
|
|
@@ -237,7 +238,8 @@ export default {
|
|
|
// 默认选中第一个
|
|
|
this.mixins_query.communityId = this.communityList[0].id;
|
|
|
// 默认选择市容市貌
|
|
|
- this.mixins_query.patrolType = '1';
|
|
|
+ this.mixins_query.patrolType = 1;
|
|
|
+ this.mixinsQuery();
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -249,14 +251,61 @@ export default {
|
|
|
}
|
|
|
this.mixins_query.startTime = !!arr[0] ? arr[0] + ' 00:00:00' : '';
|
|
|
this.mixins_query.endTime = !!arr[1] ? arr[1] + ' 23:59:59' : '';
|
|
|
- console.log('5555', this.mixins_query);
|
|
|
},
|
|
|
mixins_search () {
|
|
|
- console.log('11');
|
|
|
+ if (this.mixins_query.communityId == "" || this.mixins_query.patrolType == "") {
|
|
|
+ this.$message.error('请选择社区或巡更类型');
|
|
|
+ } else {
|
|
|
+ this.mixinsQuery();
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
exportExcel () {
|
|
|
- // this.__exportExcel('/czc-community/assets/building/export/excel');
|
|
|
+ this.__exportExcel('/czc-community/patrol/record/standard/export/list');
|
|
|
},
|
|
|
+ mixinsQuery () {
|
|
|
+ this.$http.post('/czc-community/patrol/record/standard/page', this.mixins_query).then(({ status, data, msg }) => {
|
|
|
+ if (status == 0) {
|
|
|
+ this.tableData = [];
|
|
|
+ this.outermostTitle = [];
|
|
|
+ data.list.forEach((item, index) => {
|
|
|
+ this.tableData.push({
|
|
|
+ communityName: item.communityName,
|
|
|
+ patrolDate: item.patrolDate,
|
|
|
+ patrolTime: item.patrolTime,
|
|
|
+ routeName: item.routeName,
|
|
|
+ userName: item.userName
|
|
|
+ })
|
|
|
+ item.details.forEach((items, indexs) => {
|
|
|
+ if (index == 0) {
|
|
|
+ this.outermostTitle.push({
|
|
|
+ twoTitle: [],
|
|
|
+ oneTitle: items.patrolType == 1 ? '市容市貌' : items.patrolType == 2 ? '环境卫生' : items.patrolType == 3 ? '公共秩序' : items.patrolType == 4 ? '设备设施' : items.patrolType == 5 ? '消防安全' : '-'
|
|
|
+ })
|
|
|
+ items.list.forEach((itd, ind) => {
|
|
|
+ this.outermostTitle[indexs].twoTitle.push({
|
|
|
+ title: itd.content,
|
|
|
+ optionValue: [],
|
|
|
+ optionId: []
|
|
|
+ })
|
|
|
+ })
|
|
|
+ items.list.forEach((itds, inds) => {
|
|
|
+ this.outermostTitle[indexs].twoTitle[inds].optionValue.push(itds.optionValue);
|
|
|
+ this.outermostTitle[indexs].twoTitle[inds].optionId.push(itds.status);
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ items.list.forEach((itds, inds) => {
|
|
|
+ this.outermostTitle[indexs].twoTitle[inds].optionValue.push(itds.optionValue);
|
|
|
+ this.outermostTitle[indexs].twoTitle[inds].optionId.push(itds.status);
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
created () {
|
|
|
this.communityNameList();
|