From 6416b40cf242340eaa163c498bd49d8103e73610 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Mon, 29 Jul 2024 17:01:52 +0800
Subject: [PATCH] 代码优化
---
src/views/cGovernance/statisticalAnalysis/index.vue | 186 ++++++++++++++++++++++++++++++++++++++--------
1 files changed, 154 insertions(+), 32 deletions(-)
diff --git a/src/views/cGovernance/statisticalAnalysis/index.vue b/src/views/cGovernance/statisticalAnalysis/index.vue
index 7caa165..f967b61 100644
--- a/src/views/cGovernance/statisticalAnalysis/index.vue
+++ b/src/views/cGovernance/statisticalAnalysis/index.vue
@@ -6,6 +6,19 @@
@search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
@current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+ <template slot="menuLeft">
+ <!-- <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleOrg('Y')">主办单位
+ </el-button>
+ <el-button type="success" size="small" plain icon="el-icon-upload2" @click="handleOrg('N')">调度单位
+ </el-button> -->
+
+ <el-radio-group size="mini" @change="handleOrg" v-model="radio1">
+ <el-radio-button label="主办单位"></el-radio-button>
+ <el-radio-button label="调度单位"></el-radio-button>
+ </el-radio-group>
+
+ </template>
+
</avue-crud>
</basic-container>
@@ -23,7 +36,9 @@
remove,
update,
add,
- getDetail
+ getDetail,
+ getCount,
+ synchronizeData
} from "@/api/task/eCallEventTwo"
import {
add as circleAdd,
@@ -40,10 +55,14 @@
export default {
data() {
return {
+ radio1: '主办单位',
editPopup: false,
form: {},
editForm: {},
- query: {},
+ query: {
+ tagMain: 'Y',
+ mainFlag: 1
+ },
loading: true,
page: {
pageSize: 10,
@@ -57,12 +76,14 @@
shareCircleRow: {},
option: {
labelWidth: 130,
+ menu: false,
// searchLabelWidth: 96,
searchShow: true,
searchMenuSpan: 3,
menuWidth: 310,
delBtn: false,
editBtn: false,
+ addBtn: false,
height: "auto",
calcHeight: 54,
@@ -70,26 +91,118 @@
tip: false,
border: true,
//stripe:true,
- index: true,
+ // index: true,
viewBtn: true,
- selection: true,
+ // selection: true,
// excelBtn: true,
dialogClickModal: false,
column: [{
- label: "工单号",
- prop: "orderCode",
+ label: "单位名称",
+ prop: "orgName",
+ search: true,
+ overHidden: true,
+
+ },
+ {
+ label: "时间区间",
+ prop: "dateTime",
+ type: "datetimerange",
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ searchSpan: 6,
+ searchRange: true,
+ hide: true,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ search: true,
+ rules: [{
+ required: true,
+ message: "请选择时间区间",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: "工单数",
+ prop: "orderNumber",
span: 12,
searchSpan: 4,
- width: 160,
+ searchLabelWidth: 76,
+ addDisplay: false,
+ },
+ {
+ hide: true,
+ label: "派发单数",
+ prop: "dispatchNumber",
+ span: 12,
+ searchSpan: 4,
+ // overHidden: true,
+ // display: false,
+ searchLabelWidth: 76,
+ // addDisplay: false,
+ },
+
+ {
+ label: "办理单数(率)",
+ prop: "handRate",
+ span: 12,
+ searchSpan: 4,
overHidden: true,
- search: true,
searchLabelWidth: 76,
addDisplay: false,
},
+ {
+ label: "办结单数(率)",
+ prop: "checkRate",
+ span: 12,
+ searchSpan: 4,
+ overHidden: true,
+ searchLabelWidth: 76,
+ addDisplay: false,
+ },
+
+ {
+ label: "答复单数(率)",
+ prop: "doneRate",
+ span: 12,
+ searchSpan: 4,
+ overHidden: true,
+ searchLabelWidth: 76,
+ addDisplay: false,
+ },
+
+ {
+ label: "回访单数(率)",
+ prop: "respRate",
+ span: 12,
+ searchSpan: 4,
+ overHidden: true,
+ searchLabelWidth: 76,
+ addDisplay: false,
+ },
+ {
+ label: "核实单数(率)",
+ prop: "reviewRate",
+ span: 12,
+ searchSpan: 4,
+ overHidden: true,
+ searchLabelWidth: 76,
+ addDisplay: false,
+ },
+ {
+ label: "督办单数",
+ prop: "superviseNumber",
+ span: 12,
+ searchSpan: 4,
+ overHidden: true,
+ searchLabelWidth: 76,
+ addDisplay: false,
+ },
],
},
data: [],
+ tagMain: 'Y'
}
},
@@ -125,6 +238,23 @@
}
},
methods: {
+ handleOrg(tagMain) {
+ console.log("***************" + tagMain)
+ this.page.currentPage = 1
+ this.data = []
+ if (tagMain === '主办单位') {
+ this.query.tagMain = "Y"
+ this.query.mainFlag = 1
+ let dispatchNumberColumn = this.findObject(this.option.column, 'dispatchNumber')
+ dispatchNumberColumn.hide = true
+ } else {
+ let dispatchNumberColumn = this.findObject(this.option.column, 'dispatchNumber')
+ dispatchNumberColumn.hide = false
+ this.query.tagMain = "N"
+ this.query.mainFlag = 2
+ }
+ this.onLoad(this.page, this.query)
+ },
openMap() {
this.$refs.avueInputMap.box = true
console.log(this.$refs.avueInputMap)
@@ -147,13 +277,6 @@
},
rowSave(row, done, loading) {
- console.log("777777777777777777777" + JSON.stringify(row))
-
- // let local = this.locationDispose(row.sceneAddr)
- // row.sceneAddr = local.sceneAddr
- // row.sceneGeoLat = local.latitude
- // row.sceneGeoLng = local.longitude
- console.log("88888888888888888888888888" + JSON.stringify(row))
add(row).then(
() => {
this.onLoad(this.page)
@@ -225,8 +348,14 @@
this.onLoad(this.page)
},
searchChange(params, done) {
- this.query = params
+ Object.assign(this.query, params)
this.page.currentPage = 1
+ console.log("*******params**********" + JSON.stringify(params))
+ if (this.query.mainFlag == 1) {
+ params.sinkOrgName = params.orgName
+ } else {
+ params.subjectOrgName = params.orgName
+ }
this.onLoad(this.page, params)
done()
},
@@ -324,6 +453,7 @@
} = this.query
let values = {
...params,
+ ...this.query,
}
if (dateTime) {
values = {
@@ -335,27 +465,19 @@
values.dateTime = null
}
this.loading = true
- getList(page.currentPage, page.pageSize, values).then((res) => {
+ getCount(this.page.currentPage, this.page.pageSize, values).then((res) => {
const data = res.data.data
this.page.total = data.total
this.data = data.records
- this.data.forEach(item => {
- // this.$set(item, 'phoneflag', false)
- // if (item.imageUrls) {
- // if (item.imageUrls.length > 0) {
- // var urls = []
- // var names = item.imageUrls.split(",")
- // names.forEach(name => {
- // urls.push(website.minioUrl + name)
- // })
- // item.imageUrls = urls.join(",")
- // }
- // }
- })
this.loading = false
- this.selectionClear()
+ // this.selectionClear()
})
- }
+ },
+ getsynchronizeData() {
+ synchronizeData().then((res) => {
+
+ })
+ },
},
}
</script>
--
Gitblit v1.9.3