Commit 7b0f0f59 authored by “yiyousong”'s avatar “yiyousong”

feat: 评价数据报表接口调试

parent 542cec95
...@@ -8,6 +8,8 @@ import "element-ui/lib/theme-chalk/index.css"; ...@@ -8,6 +8,8 @@ import "element-ui/lib/theme-chalk/index.css";
Vue.use(ElementUI); Vue.use(ElementUI);
import { message } from "@/utils/resetMessage"; import { message } from "@/utils/resetMessage";
Vue.prototype.$message = message; Vue.prototype.$message = message;
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
Vue.component("ElImageViewer", ElImageViewer);
// 公共样式 // 公共样式
import "@/assets/css/normalize.css"; import "@/assets/css/normalize.css";
import "@/assets/css/reset.css"; import "@/assets/css/reset.css";
......
This diff is collapsed.
...@@ -172,45 +172,6 @@ export default { ...@@ -172,45 +172,6 @@ export default {
size: 10, size: 10,
current: 1, current: 1,
selectionRow: [], selectionRow: [],
pickerOptions: {
shortcuts: [
{
text: "今天",
onClick(picker) {
const end = new Date();
const start = new Date();
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
searchForm: { searchForm: {
type: 1, type: 1,
keyword: "", keyword: "",
...@@ -346,49 +307,30 @@ export default { ...@@ -346,49 +307,30 @@ export default {
align: "center", align: "center",
width: "150", width: "150",
prop: "taketime", prop: "taketime",
formatter: (row) => {
return this.$moment(row.taketime).format("YYYY-MM-DD HH:mm:ss");
},
}, },
{ {
label: "叫号时间", label: "叫号时间",
align: "center", align: "center",
width: "150", width: "150",
prop: "calltime", prop: "calltime",
formatter: (row) => {
return this.$moment(row.taketime).format("YYYY-MM-DD HH:mm:ss");
},
}, },
{ {
label: "结束时间", label: "结束时间",
align: "center", align: "center",
width: "150", width: "150",
prop: "endtime", prop: "endtime",
formatter: (row) => {
return this.$moment(row.taketime).format("YYYY-MM-DD HH:mm:ss");
},
}, },
{ {
label: "等待时间", label: "等待时间",
align: "center", align: "center",
width: "150", width: "150",
prop: "waitTime", prop: "waitTime",
formatter: (row) => {
if (row.waitTime) {
return formatSeconds(row.waitTime);
}
},
}, },
{ {
label: "办理时间", label: "办理时间",
align: "center", align: "center",
width: "150", width: "150",
prop: "handleTime", prop: "handleTime",
formatter: (row) => {
if (row.handleTime) {
return formatSeconds(row.handleTime);
}
},
}, },
{ {
label: "扩展编号", label: "扩展编号",
...@@ -478,6 +420,16 @@ export default { ...@@ -478,6 +420,16 @@ export default {
async getQueueList(form = {}) { async getQueueList(form = {}) {
this.loading = true; this.loading = true;
let { data, total } = await this.getData(form); let { data, total } = await this.getData(form);
data.forEach((v) => {
v.taketime =
v.taketime && this.$moment(v.taketime).format("YYYY-MM-DD HH:mm:ss");
v.endtime =
v.endtime && this.$moment(v.endtime).format("YYYY-MM-DD HH:mm:ss");
v.calltime =
v.calltime && this.$moment(v.calltime).format("YYYY-MM-DD HH:mm:ss");
v.waitTime = v.waitTime && formatSeconds(v.waitTime);
v.handleTime = v.handleTime && formatSeconds(v.handleTime);
});
this.tableData = data; this.tableData = data;
this.total = total; this.total = total;
this.loading = false; this.loading = false;
...@@ -530,18 +482,6 @@ export default { ...@@ -530,18 +482,6 @@ export default {
let filterVal = table.map((v) => v.prop); let filterVal = table.map((v) => v.prop);
if (this.selectionRow.length) { if (this.selectionRow.length) {
let data = this.$cloneDeep(this.selectionRow); let data = this.$cloneDeep(this.selectionRow);
data.forEach((v) => {
v.taketime =
v.taketime &&
this.$moment(v.taketime).format("YYYY-MM-DD HH:mm:ss");
v.endtime =
v.endtime && this.$moment(v.endtime).format("YYYY-MM-DD HH:mm:ss");
v.calltime =
v.calltime &&
this.$moment(v.calltime).format("YYYY-MM-DD HH:mm:ss");
v.waitTime = v.waitTime && formatSeconds(v.waitTime);
v.handleTime = v.handleTime && formatSeconds(v.handleTime);
});
export2Excel( export2Excel(
tHeader, tHeader,
filterVal, filterVal,
......
...@@ -12,15 +12,37 @@ ...@@ -12,15 +12,37 @@
size="medium" size="medium"
labelClassName="label-name" labelClassName="label-name"
> >
<el-descriptions-item <template v-for="(v, i) in dataInfo">
v-for="(v, i) in detailsList" <el-descriptions-item
:key="i" v-if="
:label="v.title" (v.prop == 'photoautograph' || v.prop == 'picture') && v.content
> "
{{ v.content }} :key="i"
</el-descriptions-item> :label="v.title"
>
<img
class="w-[50px] cursor-pointer"
:src="v.content"
@click="handlePreview(v.content)"
/>
</el-descriptions-item>
<el-descriptions-item v-else :key="i" :label="v.title">
{{ v.content }}
</el-descriptions-item>
</template>
</el-descriptions> </el-descriptions>
</div> </div>
<!-- 图片查看 -->
<el-image-viewer
v-if="preview"
:appendToBody="false"
:on-close="
() => {
(preview = false), (filepaths = []);
}
"
:url-list="filepaths"
/>
</el-drawer> </el-drawer>
</template> </template>
...@@ -31,129 +53,166 @@ export default { ...@@ -31,129 +53,166 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
info: {
required: true,
type: Object,
default: () => {},
},
}, },
data() { data() {
return { return {
preview: false,
filepaths: [],
detailsList: [ detailsList: [
{ {
title: "身份证号", title: "身份证号",
content: "测试", prop: "peopleIdcard",
content: "",
}, },
{ {
title: "姓名", title: "姓名",
content: "测试", prop: "peopleName",
content: "",
}, },
{ {
title: "性别", title: "性别",
content: "测试", prop: "peopleSex",
content: "",
}, },
{ {
title: "手机号", title: "手机号",
content: "测试", prop: "peoplePhone",
content: "",
}, },
{ {
title: "评价选项", title: "评价选项",
content: "测试", prop: "pjOption",
content: "",
}, },
{ {
title: "评价标签", title: "评价标签",
content: "测试", prop: "contentTag",
content: "",
}, },
{ {
title: "评价人图片地址", title: "评价人图片地址",
content: "测试", prop: "picUrl",
content: "",
}, },
{ {
title: "部门", title: "部门",
content: "测试", prop: "sectionName",
content: "",
}, },
{ {
title: "大厅名称", title: "大厅名称",
content: "测试", prop: "hallName",
content: "",
}, },
{ {
title: "评价来源", title: "评价来源",
content: "测试", prop: "pjSource",
content: "",
}, },
{ {
title: "手输意见", title: "手输意见",
content: "测试", prop: "opinion",
content: "",
}, },
{ {
title: "窗口名称", title: "窗口名称",
content: "测试", prop: "windowName",
content: "",
}, },
{ {
title: "窗口编号", title: "窗口编号",
content: "测试", prop: "windowFromnum",
content: "",
}, },
{ {
title: "排队编号", title: "排队编号",
content: "测试", prop: "flounum",
content: "",
}, },
{ {
title: "窗口评价", title: "窗口评价",
content: "测试", prop: "pjxt",
content: "",
}, },
{ {
title: "工作人员姓名", title: "工作人员姓名",
content: "测试", prop: "workmanName",
content: "",
}, },
{ {
title: "工作人员工号", title: "工作人员工号",
content: "测试", prop: "workmanNumber",
content: "",
}, },
{ {
title: "评价器MAC地址", title: "评价器MAC地址",
content: "测试", prop: "devicenum",
content: "",
}, },
{ {
title: "评价状态", title: "评价状态",
content: "测试", prop: "evaluatestatus",
content: "",
}, },
{ {
title: "截图还是评价", title: "截图还是评价",
content: "测试", prop: "evaluatetype",
content: "",
}, },
{ {
title: "截图地", title: "截图地址",
content: "测试", prop: "photobefor",
content: "",
}, },
{ {
title: "签字图片", title: "签字图片",
content: "测试", prop: "photoautograph",
content: "",
}, },
{ {
title: "抓拍评价人照片", title: "抓拍评价人照片",
content: "测试", prop: "picture",
content: "",
}, },
{ {
title: "音视频地址", title: "音视频地址",
content: "测试", prop: "process",
content: "",
}, },
{ {
title: "评价标记", title: "评价标记",
content: "测试", prop: "eyevaluate",
content: "",
}, },
{ {
title: "评价指向", title: "评价指向",
content: "测试", prop: "pjType",
content: "",
}, },
{ {
title: "评价时间", title: "评价时间",
content: "测试", prop: "pjTime",
content: "",
}, },
{ {
title: "站点编码", title: "站点编码",
content: "测试", prop: "siteCode",
content: "",
}, },
{ {
title: "站点名称", title: "站点名称",
content: "测试", prop: "siteName",
content: "",
}, },
{ {
title: "扩展编号", title: "扩展编号",
content: "测试", prop: "extNum",
content: "",
}, },
], ],
}; };
...@@ -167,12 +226,24 @@ export default { ...@@ -167,12 +226,24 @@ export default {
this.$emit("update:show", val); this.$emit("update:show", val);
}, },
}, },
dataInfo() {
this.detailsList.forEach((v) => {
v.content = this.info[v.prop];
});
return this.detailsList;
},
},
methods: {
handlePreview(url) {
this.filepaths = [url];
this.preview = true;
},
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
:deep(.label-name) { :deep(.label-name) {
width: 180px !important; width: 120px !important;
} }
</style> </style>
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
</template> </template>
<script> <script>
import { formatSeconds } from "@/utils";
export default { export default {
props: { props: {
show: { show: {
...@@ -190,15 +189,7 @@ export default { ...@@ -190,15 +189,7 @@ export default {
}, },
dataInfo() { dataInfo() {
this.detailsList.forEach((v) => { this.detailsList.forEach((v) => {
if (v.prop == "taketime" || v.prop == "endtime") { v.content = this.info[v.prop];
v.content = this.$moment(this.info[v.prop]).format(
"YYYY-MM-DD HH:mm:ss"
);
} else if (v.prop == "waitTime" || v.prop == "handleTime") {
v.content = formatSeconds(this.info[v.prop]);
} else {
v.content = this.info[v.prop];
}
}); });
return this.detailsList; return this.detailsList;
}, },
......
...@@ -148,7 +148,7 @@ export const dataSection = async (fn, searchForm = {}, callback) => { ...@@ -148,7 +148,7 @@ export const dataSection = async (fn, searchForm = {}, callback) => {
dataList = [...dataList, ...data]; dataList = [...dataList, ...data];
Vue.prototype.$app.loading = true; Vue.prototype.$app.loading = true;
Vue.prototype.$app.percentage = parseInt((dataList.length / total) * 100); Vue.prototype.$app.percentage = parseInt((dataList.length / total) * 100);
if (dataList.length >= total || data.data.length == 0) { if (dataList.length >= total || data.length == 0) {
if (callback) callback(dataList); if (callback) callback(dataList);
Vue.prototype.$app.loading = false; Vue.prototype.$app.loading = false;
Vue.prototype.$app.percentage = 1; Vue.prototype.$app.percentage = 1;
......
...@@ -10,6 +10,13 @@ module.exports = defineConfig({ ...@@ -10,6 +10,13 @@ module.exports = defineConfig({
// "^/file": "", // "^/file": "",
// } // }
}, },
"/uploads": {
target: process.env.VUE_APP_API_BASE_URL,
changeOrigin: true,
// pathRewrite:{
// "^/file": "",
// }
},
}, },
}, },
}); });
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