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