Commit 2cf14a46 authored by “yiyousong”'s avatar “yiyousong”

perf:修改评价系统数据展示

parent 9918ee89
...@@ -25,24 +25,24 @@ ...@@ -25,24 +25,24 @@
<div class="table-item"> <div class="table-item">
<div> <div>
<DoubleTable <DoubleTable
title="业务评价量统计" title="评价选项统计"
border border
:column="businessColumn" :column="pjOptionColumn"
:data="businessTableData" :data="pjOptionTableData"
:size="businessSearch.size" :size="pjOptionSearch.size"
:current="businessSearch.page" :current="pjOptionSearch.page"
:loading="businessLoading" :loading="pjOptionLoading"
type="business" type="pjOption"
@export="exportbusinessEva" @export="exportPjOptionEva"
@search="handleSearch" @search="handleSearch"
></DoubleTable> ></DoubleTable>
</div> </div>
<Pagination <Pagination
:total="businessSearch.total" :total="pjOptionSearch.total"
:current.sync="businessSearch.page" :current.sync="pjOptionSearch.page"
:size.sync="businessSearch.size" :size.sync="pjOptionSearch.size"
layout="total,prev,pager,next,jumper" layout="total,prev,pager,next,jumper"
@get="getBusinessEva" @get="getPjOptionEva"
></Pagination> ></Pagination>
</div> </div>
<div class="table-item"> <div class="table-item">
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
}, },
siteId: storage.get(2, "siteId"), siteId: storage.get(2, "siteId"),
hallLoading: false, hallLoading: false,
businessLoading: false, pjOptionLoading: false,
deptLoading: false, deptLoading: false,
windowLoading: false, windowLoading: false,
hallSearch: { hallSearch: {
...@@ -121,12 +121,13 @@ export default { ...@@ -121,12 +121,13 @@ export default {
size: 10, size: 10,
hallNameNotList: [""], hallNameNotList: [""],
}, },
businessSearch: { pjOptionSearch: {
total: 0, total: 0,
page: 1, page: 1,
size: 10, size: 10,
businessNotList: [""], pjOptionNotList: [""],
businessList: [], pjOptionList: [],
groupList: ["pjOption"],
}, },
deptSearch: { deptSearch: {
total: 0, total: 0,
...@@ -160,10 +161,10 @@ export default { ...@@ -160,10 +161,10 @@ export default {
}, },
}, },
], ],
businessColumn: [ pjOptionColumn: [
{ {
label: "业务名称", label: "评价选项",
prop: "business", prop: "pjOption",
align: "center", align: "center",
showOverflowTooltip: true, showOverflowTooltip: true,
formatter: (row, column, cellValue) => { formatter: (row, column, cellValue) => {
...@@ -221,7 +222,7 @@ export default { ...@@ -221,7 +222,7 @@ export default {
], ],
hallTableData: [], hallTableData: [],
businessTableData: [], pjOptionTableData: [],
deptTableData: [], deptTableData: [],
windowTableData: [], windowTableData: [],
}; };
...@@ -233,11 +234,11 @@ export default { ...@@ -233,11 +234,11 @@ export default {
this.dateForm.timeStart = dateArr[0]; this.dateForm.timeStart = dateArr[0];
this.dateForm.timeEnd = dateArr[1]; this.dateForm.timeEnd = dateArr[1];
this.hallSearch.page = 1; this.hallSearch.page = 1;
this.businessSearch.page = 1; this.pjOptionSearch.page = 1;
this.deptSearch.page = 1; this.deptSearch.page = 1;
this.windowSearch.page = 1; this.windowSearch.page = 1;
this.getHallEva(); this.getHallEva();
this.getBusinessEva(); this.getPjOptionEva();
this.getDeptEva(); this.getDeptEva();
this.getWindowEva(); this.getWindowEva();
}, },
...@@ -271,10 +272,10 @@ export default { ...@@ -271,10 +272,10 @@ export default {
this.hallLoading = false; this.hallLoading = false;
}, },
async businessEva(form = {}) { async pjOptionEva(form = {}) {
const res = await getEvaSystemList({ const res = await getEvaSystemList({
siteId: this.siteId, siteId: this.siteId,
...this.businessSearch, ...this.pjOptionSearch,
...this.dateForm, ...this.dateForm,
...form, ...form,
}); });
...@@ -292,13 +293,13 @@ export default { ...@@ -292,13 +293,13 @@ export default {
}; };
} }
}, },
// 获取业务评价数据 // 获取评价选项数据
async getBusinessEva() { async getPjOptionEva() {
this.businessLoading = true; this.pjOptionLoading = true;
let { data, total } = await this.businessEva(); let { data, total } = await this.pjOptionEva();
this.businessTableData = data; this.pjOptionTableData = data;
this.businessSearch.total = total; this.pjOptionSearch.total = total;
this.businessLoading = false; this.pjOptionLoading = false;
}, },
async deptEva(form = {}) { async deptEva(form = {}) {
...@@ -377,16 +378,16 @@ export default { ...@@ -377,16 +378,16 @@ export default {
); );
}); });
}, },
// 导出业务评价 // 导出评价选项
exportbusinessEva(type, form) { exportPjOptionEva(type, form) {
let tHeader = this.businessColumn.map((v) => v.label); let tHeader = this.pjOptionColumn.map((v) => v.label);
let filterVal = this.businessColumn.map((v) => v.prop); let filterVal = this.pjOptionColumn.map((v) => v.prop);
let { businessName } = form; let { pjOption } = form;
let searchForm = {}; let searchForm = {};
if (businessName) { if (pjOption) {
searchForm.businessList = [businessName]; searchForm.pjOptionList = [pjOption];
} }
dataSection(this.businessEva, searchForm, (data) => { dataSection(this.pjOptionEva, searchForm, (data) => {
if (!data.length) { if (!data.length) {
this.$message.warning("暂无数据"); this.$message.warning("暂无数据");
return; return;
...@@ -395,7 +396,7 @@ export default { ...@@ -395,7 +396,7 @@ export default {
tHeader, tHeader,
filterVal, filterVal,
data, data,
"业务评价量统计报表" + this.$moment().format("YYYYMMDDHHmmss") "评价选项统计报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
}); });
}, },
...@@ -446,7 +447,7 @@ export default { ...@@ -446,7 +447,7 @@ export default {
// 业务搜索 // 业务搜索
handleSearch(type, form) { handleSearch(type, form) {
const { businessName, deptName, windowNum } = form; const { pjOption, deptName, windowNum } = form;
const setupSearch = (searchObj, listKey, value, searchMethod) => { const setupSearch = (searchObj, listKey, value, searchMethod) => {
searchObj.page = 1; searchObj.page = 1;
...@@ -454,12 +455,12 @@ export default { ...@@ -454,12 +455,12 @@ export default {
searchMethod(); searchMethod();
}; };
if (type === "business") { if (type === "pjOption") {
setupSearch( setupSearch(
this.businessSearch, this.pjOptionSearch,
"businessList", "pjOptionList",
businessName, pjOption,
this.getBusinessEva this.getPjOptionEva
); );
} else if (type === "dept") { } else if (type === "dept") {
setupSearch( setupSearch(
......
...@@ -127,6 +127,7 @@ export default { ...@@ -127,6 +127,7 @@ export default {
size: 10, size: 10,
businessNotList: [""], businessNotList: [""],
businessList: [], businessList: [],
groupList: ["business"],
}, },
deptSearch: { deptSearch: {
total: 0, total: 0,
......
...@@ -10,19 +10,14 @@ ...@@ -10,19 +10,14 @@
> >
<el-select <el-select
v-if="type == 'business'" v-if="type == 'pjOption'"
size="small" size="small"
filterable filterable
v-model="form.businessName" v-model="form.pjOption"
placeholder="请选择业务" placeholder="请选择评价选项"
clearable clearable
> >
<el-option <el-option v-for="(v, i) in pjOption" :key="i" :label="v" :value="v">
v-for="v in businessList"
:key="v.id"
:label="v.businessName"
:value="v.businessName"
>
</el-option> </el-option>
</el-select> </el-select>
<el-select <el-select
...@@ -93,6 +88,7 @@ ...@@ -93,6 +88,7 @@
<script> <script>
import { mapState } from "vuex"; import { mapState } from "vuex";
import storage from "@/utils/storage"; import storage from "@/utils/storage";
let pjOption = ["非常满意", "满意", "基本满意", "不满意", "非常不满意"];
export default { export default {
props: { props: {
data: { data: {
...@@ -136,10 +132,11 @@ export default { ...@@ -136,10 +132,11 @@ export default {
}, },
data() { data() {
return { return {
pjOption,
searchVal: "", searchVal: "",
siteId: storage.get(2, "siteId"), siteId: storage.get(2, "siteId"),
form: { form: {
businessName: "", pjOption: "",
deptName: "", deptName: "",
windowNum: "", windowNum: "",
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment