Commit 5372ddc4 authored by “yiyousong”'s avatar “yiyousong”

fix: 修复搜索引擎评价数据字典获取失败

parent d34c68da
<template>
<div></div>
</template>
<script>
export default {};
</script>
<style lang="less" scoped></style>
<template>
<div class="flex h-full w-full flex-col">
<Search @search="handleSearch"></Search>
<Search @search="handleSearch" :dict="dict"></Search>
<div
class="main flex w-full flex-1 items-center justify-center rounded-[4px] bg-white p-[20px]"
>
......@@ -140,10 +140,11 @@ export default {
month: "",
day: "",
},
dict: {},
};
},
created() {
// this.getEvaStatList();
this.getEvaStatList();
},
methods: {
getData() {},
......@@ -156,26 +157,30 @@ export default {
...form,
});
if (res.data.code == 1) {
let { data, total } = res.data.data;
let { data, total, dict } = res.data.data;
return {
data,
total,
dict,
};
} else {
return {
data: [],
total: 0,
dict: {},
};
}
},
async getEvaStatList() {
this.loading = true;
let { data, total } = await this.evaStatList();
let { data, total, dict } = await this.evaStatList();
data.forEach((v) => {
v.waitTime = v.waitTime ? formatSeconds(v.waitTime) : "";
});
this.total = total;
this.tableData = data;
this.dict = dict;
console.log(dict);
this.loading = false;
},
......
......@@ -171,6 +171,7 @@ export default {
return {
data: [],
total: 0,
dict: {},
};
}
},
......
......@@ -239,7 +239,6 @@
<script>
import { findBottomSubarrays } from "@/utils";
let pjOption = ["非常满意", "满意", "基本满意", "不满意", "非常不满意"];
export default {
components: {},
props: {
......@@ -250,7 +249,7 @@ export default {
},
data() {
return {
pjOption,
pjOption: [],
calcBusiness: [],
calcDept: [],
calcWindow: [],
......@@ -345,10 +344,17 @@ export default {
// 获取搜索配置
changeOptions(dict) {
if (JSON.stringify(dict) == "{}") return;
let { businessList, sectionNameList, windowFromnumList } = dict;
this.calcBusiness = this.businessList = this.getTopKeyList(businessList);
this.calcDept = this.sectionList = this.getTopKeyList(sectionNameList);
this.calcWindow = this.windowList = this.getTopKeyList(windowFromnumList);
let { businessList, sectionNameList, windowFromnumList, pjOption } = dict;
this.pjOption = pjOption ? pjOption : [];
this.calcBusiness = this.businessList = businessList
? this.getTopKeyList(businessList)
: [];
this.calcDept = this.sectionList = sectionNameList
? this.getTopKeyList(sectionNameList)
: [];
this.calcWindow = this.windowList = windowFromnumList
? this.getTopKeyList(windowFromnumList)
: [];
},
changeTab(key) {
this.form.year = "";
......
......@@ -222,7 +222,7 @@ export default {
prop: "business",
},
{
label: "预约编",
label: "预约编",
align: "center",
width: "150",
prop: "ordernumber",
......
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