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

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

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