Commit 3ad5b092 authored by “yiyousong”'s avatar “yiyousong”

pref:修改排号报表

parent e9c5a534
// 导出表格数据
const ExportJsonExcel = require("js-export-excel");
/**
* 导出excel
* @param {导出的表头名信息} tHeader
* @param {导出的表头字段名,需要导出表格字段名} filterVal
* @param {导出数据} list
* @param {导出文件名称} fileName
*/
export const export2Excel = (tHeader, filterVal, list, fileName) => {
let option = {
fileName,
datas: [
{
sheetData: list,
sheetName: "sheet",
sheetFilter: filterVal,
sheetHeader: tHeader,
// columnWidths: columnWidths, // 列宽
},
],
};
let toExcel = new ExportJsonExcel(option);
toExcel.saveExcel(); //保存
};
...@@ -2,16 +2,27 @@ ...@@ -2,16 +2,27 @@
<div class="callRecord-Container"> <div class="callRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button type="success" @click="exportTable"> <a-button
type="success"
@click="handleExportTable"
:loading="btnLoading"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button> </a-button>
<b>叫号次数:<i>{{ tablePagination.total }}</i></b> <b
>叫号次数:<i>{{ tablePagination.total }}</i></b
>
<sub>统计时间段:{{ searchForm.time[0] }}~{{ searchForm.time[1] }}</sub> <sub>统计时间段:{{ searchForm.time[0] }}~{{ searchForm.time[1] }}</sub>
</div> </div>
<span> <span>
<a-space>
<a-select v-model="searchForm.id" style="width: 120px"> <a-select v-model="searchForm.id" style="width: 120px">
<a-select-option value=""> 全部设备 </a-select-option> <a-select-option value=""> 全部设备 </a-select-option>
<a-select-option v-for="item in deviceData" :key="item.id" :value="item.id"> <a-select-option
v-for="item in deviceData"
:key="item.id"
:value="item.id"
>
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
...@@ -23,19 +34,33 @@ ...@@ -23,19 +34,33 @@
</a-select> </a-select>
<a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time"> <a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time">
</a-range-picker> </a-range-picker>
<a-input v-model="searchForm.flownum" placeholder="请输入排队编号搜索"> <a-input
v-model="searchForm.flownum"
placeholder="请输入排队编号搜索"
>
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<a-button type="primary" @click="getDataList">搜索</a-button> <a-button type="primary" @click="getDataList">搜索</a-button>
<a-button @click="resetBtn">重置</a-button> <a-button @click="resetBtn">重置</a-button>
</a-space>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ <a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys, selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" :scroll="{ y: 590 }" :pagination="tablePagination" @change="changeTablePage" :loading="tableLoading" }"
:columns="tableHeaders" :dataSource="tableList"> :scroll="{ y: 590 }"
:pagination="tablePagination"
@change="changeTablePage"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableList"
>
<!-- 序号 --> <!-- 序号 -->
<span slot="num" slot-scope="text, record, index">{{ <span slot="num" slot-scope="text, record, index">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1 (tablePagination.current - 1) * tablePagination.pageSize + index + 1
...@@ -51,13 +76,17 @@ ...@@ -51,13 +76,17 @@
<template slot="people_phone" slot-scope="text"> <template slot="people_phone" slot-scope="text">
{{ text.people_phone ? text.people_phone : "--" }} {{ text.people_phone ? text.people_phone : "--" }}
</template> </template>
<!-- 取号设备 --> <!-- 呼叫设备 -->
<template slot="device_name" slot-scope="text"> <template slot="device_name" slot-scope="text">
{{ text.device_name ? text.device_name : "--" }} {{ text.device_name ? text.device_name : "--" }}
</template> </template>
<!-- 办理业务 --> <!-- 办理业务 -->
<template slot="business" slot-scope="text"> <template slot="business" slot-scope="text">
<a v-if="text.business" @click="openBusiness(text.business, text.businessid)">{{ text.business }}</a> <a
v-if="text.business"
@click="openBusiness(text.business, text.businessid)"
>{{ text.business }}</a
>
<span v-else>--</span> <span v-else>--</span>
</template> </template>
<!-- 办理开始时间 --> <!-- 办理开始时间 -->
...@@ -66,7 +95,11 @@ ...@@ -66,7 +95,11 @@
</template> </template>
<!-- 办理窗口 --> <!-- 办理窗口 -->
<template slot="window_name" slot-scope="text"> <template slot="window_name" slot-scope="text">
{{ text.window_name ? text.window_name : "--" }} {{
text.window_name
? text.window_name + "-" + text.window_fromnum
: "--"
}}
</template> </template>
<!-- 工作人员 --> <!-- 工作人员 -->
<template slot="workman_name" slot-scope="text"> <template slot="workman_name" slot-scope="text">
...@@ -85,11 +118,13 @@ ...@@ -85,11 +118,13 @@
</template> </template>
<!-- 状态 --> <!-- 状态 -->
<template slot="style" slot-scope="text"> <template slot="style" slot-scope="text">
<span :class="{ <span
:class="{
'stand-line': text.style === 0, 'stand-line': text.style === 0,
'on-transact': text.style === 1, 'on-transact': text.style === 1,
'on-end': text.style === 4, 'on-end': text.style === 4,
}"> }"
>
{{ $codeMap.queueState[text.style] }} {{ $codeMap.queueState[text.style] }}
</span> </span>
</template> </template>
...@@ -104,15 +139,21 @@ ...@@ -104,15 +139,21 @@
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import { export2Excel } from "@/utils/js/exportExcel";
import moment from "moment"; import moment from "moment";
import UserInfo from "./components/userInfo.vue"; import UserInfo from "./components/userInfo.vue";
import BusinessInfo from "./components/businessInfo.vue"; import BusinessInfo from "./components/businessInfo.vue";
import WorkpeopleInfo from "./components/workpeopleInfo.vue"; import WorkpeopleInfo from "./components/workpeopleInfo.vue";
import HandlingDetails from "./components/HandlingDetails.vue"; import HandlingDetails from "./components/HandlingDetails.vue";
import { import {
getCalllist, getCallQueList, getBusinessEvent, getQueueInfo, getCalllist,
getWorkerInfo, getPeopleanalyse, getWorkmananalyse getCallQueList,
} from "@/api/dataAdmin" getBusinessEvent,
getQueueInfo,
getWorkerInfo,
getPeopleanalyse,
getWorkmananalyse,
} from "@/api/dataAdmin";
export default { export default {
mixins: [table], mixins: [table],
name: "PortalAdminVuecallRecord", name: "PortalAdminVuecallRecord",
...@@ -243,6 +284,37 @@ export default { ...@@ -243,6 +284,37 @@ export default {
1: "办理中", 1: "办理中",
4: "办理完成", 4: "办理完成",
}, },
tHeader: [
// 导出的表头名信息
"排队编号",
"申报人",
"联系方式",
"取号时间",
"呼叫设备",
"办理业务",
"办理开始时间",
"办理窗口",
"工作人员",
"办理结束时间",
"状态",
],
filterVal: [
// 导出的表头字段名,需要导出表格字段名
"flownum",
"people_name",
"people_phone",
"taketime",
"device_name",
"business",
"calltime",
"window_name",
"workman_name",
"endtime",
"style",
],
btnLoading: false,
tableSelectedKeys: [],
tableSelectedRows: [],
}; };
}, },
components: { components: {
...@@ -253,25 +325,25 @@ export default { ...@@ -253,25 +325,25 @@ export default {
}, },
mounted() { mounted() {
this.setMoment(); this.setMoment();
this.getCalllistArr() this.getCalllistArr();
this.getCallQueListArr() this.getCallQueListArr();
}, },
methods: { methods: {
//搜索按钮 //搜索按钮
getDataList() { getDataList() {
this.tablePagination.current = 1 this.tablePagination.current = 1;
this.getCallQueListArr(); this.getCallQueListArr();
}, },
//重置按钮 //重置按钮
resetBtn() { resetBtn() {
this.tablePagination.current = 1 this.tablePagination.current = 1;
this.searchForm = { this.searchForm = {
id: "", // 排队机id id: "", // 排队机id
style: "", // 状态 style: "", // 状态
time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间 time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间
flownum: "", // 排号编码 flownum: "", // 排号编码
} };
this.getCallQueListArr() this.getCallQueListArr();
}, },
//获取排号机设备列表 //获取排号机设备列表
async getCalllistArr() { async getCalllistArr() {
...@@ -293,50 +365,59 @@ export default { ...@@ -293,50 +365,59 @@ export default {
}, },
//分页 //分页
changeTablePage(page) { changeTablePage(page) {
this.pagTableChange(page) this.pagTableChange(page);
this.getCallQueListArr() this.getCallQueListArr();
}, },
//用户模态框 //用户模态框
async openDeclarant(item) { async openDeclarant(item) {
await getPeopleanalyse({ peopleid: item.peopleid, time: this.searchForm.time }).then(res => { await getPeopleanalyse({
if (res.code = 1) { peopleid: item.peopleid,
this.$refs.UserInfo.dataList = { ...item, ...res.data } time: this.searchForm.time,
}).then((res) => {
if ((res.code = 1)) {
this.$refs.UserInfo.dataList = { ...item, ...res.data };
// console.log(this.$refs.UserInfo.dataList) // console.log(this.$refs.UserInfo.dataList)
} }
}) });
this.$refs.UserInfo.modalInfo.title = "用户信息"; this.$refs.UserInfo.modalInfo.title = "用户信息";
this.$refs.UserInfo.modalInfo.width = "25%"; this.$refs.UserInfo.modalInfo.width = "25%";
this.$refs.UserInfo.modalInfo.visible = true; this.$refs.UserInfo.modalInfo.visible = true;
}, },
//业务关联模块 //业务关联模块
async openBusiness(business, id) { async openBusiness(business, id) {
await getBusinessEvent({ businessid: id, time: this.searchForm.time }).then(res => { await getBusinessEvent({
this.$refs.BusinessInfo.dataList = res.data businessid: id,
}) time: this.searchForm.time,
}).then((res) => {
this.$refs.BusinessInfo.dataList = res.data;
});
this.$refs.BusinessInfo.modalInfo.title = "业务分析"; this.$refs.BusinessInfo.modalInfo.title = "业务分析";
this.$refs.BusinessInfo.title = business this.$refs.BusinessInfo.title = business;
this.$refs.BusinessInfo.modalInfo.visible = true; this.$refs.BusinessInfo.modalInfo.visible = true;
}, },
//工作人员信息模态框 //工作人员信息模态框
async openWorkpeople(id) { async openWorkpeople(id) {
let a, b = {} let a,
await getWorkerInfo({ id }).then(res => { b = {};
a = res.data await getWorkerInfo({ id }).then((res) => {
}) a = res.data;
await getWorkmananalyse({ workmanid: id, time: this.searchForm.time }).then(res => { });
b = res.data await getWorkmananalyse({
}) workmanid: id,
this.$refs.WorkpeopleInfo.infoData = { ...a, ...b } time: this.searchForm.time,
console.log(this.$refs.WorkpeopleInfo.infoData) }).then((res) => {
b = res.data;
});
this.$refs.WorkpeopleInfo.infoData = { ...a, ...b };
this.$refs.WorkpeopleInfo.modalInfo.title = "工作人员信息"; this.$refs.WorkpeopleInfo.modalInfo.title = "工作人员信息";
this.$refs.WorkpeopleInfo.modalInfo.visible = true; this.$refs.WorkpeopleInfo.modalInfo.visible = true;
}, },
//详情信息抽屉 //详情信息抽屉
async openHandlingDetails(id) { async openHandlingDetails(id) {
//获取排队叫号对应ID详情 //获取排队叫号对应ID详情
await getQueueInfo({ id }).then(res => { await getQueueInfo({ id }).then((res) => {
this.$refs.HandlingDetails.dataList = res.data this.$refs.HandlingDetails.dataList = res.data;
}) });
this.$refs.HandlingDetails.modalInfo.title = "办理明细"; this.$refs.HandlingDetails.modalInfo.title = "办理明细";
this.$refs.HandlingDetails.modalInfo.visible = true; this.$refs.HandlingDetails.modalInfo.visible = true;
}, },
...@@ -355,6 +436,64 @@ export default { ...@@ -355,6 +436,64 @@ export default {
return "type0"; return "type0";
} }
}, },
// 选中
onSelectChange(keys, rows) {
this.tableSelectedKeys = keys;
const res = new Map();
this.tableSelectedRows = [...this.tableSelectedRows, ...rows]
.filter((v) => {
return !res.has(v.id) && res.set(v.id, 1);
})
.filter((v) => {
return this.tableSelectedKeys.some((val) => v.id == val);
});
},
// 导出
async handleExportTable() {
this.btnLoading = true;
let obj = {
0: "排队中",
1: "办理中",
4: "办理完成",
};
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
this.tableSelectedRows.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.style == keys) {
item.style = obj[keys];
}
});
});
export2Excel(
this.tHeader,
this.filterVal,
this.tableSelectedRows,
"呼叫记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
getCallQueList({
page: 1,
size: -1,
...this.searchForm,
}).then((res) => {
let { data } = res.data;
for (let item of data) {
Object.keys(obj).forEach((key) => {
if (item.style == key) {
item.style = obj[key];
}
});
}
export2Excel(
this.tHeader,
this.filterVal,
data,
"呼叫记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
});
}
this.btnLoading = false;
},
}, },
}; };
</script> </script>
...@@ -363,5 +502,12 @@ export default { ...@@ -363,5 +502,12 @@ export default {
/deep/.ant-spin-container { /deep/.ant-spin-container {
display: block !important; display: block !important;
} }
.stand-line {
color: #f23a3a;
}
.on-transact {
color: #04ca8f;
}
</style> </style>
<template> <template>
<div class="handling" ref="handling"> <div class="handling" ref="handling">
<a-drawer :destroyOnClose="true" :title="modalInfo.title" :width="modalInfo.width" :visible="modalInfo.visible" <a-drawer
@close="modalClose" @getContainer="() => $refs.handling"> :destroyOnClose="true"
:title="modalInfo.title"
:width="modalInfo.width"
:visible="modalInfo.visible"
@close="modalClose"
@getContainer="() => $refs.handling"
>
<div class="headerInfo"> <div class="headerInfo">
<!-- 头部耗时部分 --> <!-- 头部耗时部分 -->
<p> <p>
<span>总耗时:{{ dataList.alltime || "--" }} <span
<i v-show="dataList.alltime && compareTime(dataList.p_alltime,dataList.alltime)" class="fa fa-long-arrow-down"></i> >总耗时:{{ dataList.alltime || "--" }}
<i
v-show="
dataList.alltime &&
compareTime(dataList.p_alltime, dataList.alltime)
"
class="fa fa-long-arrow-down"
></i>
</span> </span>
<span>等待时间:{{ dataList.waittime || "--" }} <span
<i v-show="dataList.waittime && compareTime(dataList.p_waittime,dataList.waittime)" class="fa fa-long-arrow-down"></i> >等待时间:{{ dataList.waittime || "--" }}
<i
v-show="
dataList.waittime &&
compareTime(dataList.p_waittime, dataList.waittime)
"
class="fa fa-long-arrow-down"
></i>
</span> </span>
<span>办理时间:{{ dataList.bltime || "--" }} <span
<i v-show="dataList.bltime && compareTime(dataList.p_bltime , dataList.bltime)" class="fa fa-long-arrow-down"></i> >办理时间:{{ dataList.bltime || "--" }}
<i
v-show="
dataList.bltime &&
compareTime(dataList.p_bltime, dataList.bltime)
"
class="fa fa-long-arrow-down"
></i>
</span> </span>
</p> </p>
<p> <p>
...@@ -22,7 +49,12 @@ ...@@ -22,7 +49,12 @@
</p> </p>
</div> </div>
<div :class="returnScolor">{{ $codeMap.queueState[dataList.style] }}</div> <div :class="returnScolor">{{ $codeMap.queueState[dataList.style] }}</div>
<a-steps direction="vertical" size="small" :current="approveLs.length" class="steps_box"> <a-steps
direction="vertical"
size="small"
:current="approveLs.length"
class="steps_box"
>
<a-step :disabled="true" class="step_box"> <a-step :disabled="true" class="step_box">
<div class="icon_box" slot="icon"></div> <div class="icon_box" slot="icon"></div>
<div class="title_box" slot="title"> <div class="title_box" slot="title">
...@@ -30,12 +62,27 @@ ...@@ -30,12 +62,27 @@
</div> </div>
<div class="description_box" slot="description"> <div class="description_box" slot="description">
<div class="details"> <div class="details">
<span><i class="lable">申报人:</i>{{ dataList.people_name || "--" }}</span> <span
<span><i class="lable">取号时间:</i>{{ dataList.taketime || "--" }}</span> ><i class="lable">申报人:</i
<span><i class="lable">排队编码:</i>{{ dataList.flownum || "--" }}</span> >{{ dataList.people_name || "--" }}</span
<span><i class="lable">取号方式:</i>{{ $codeMap.takeNumWay[dataList.wy_signin] || "--" }}</span> >
<span
><i class="lable">取号时间:</i
>{{ dataList.taketime || "--" }}</span
>
<span
><i class="lable">排队编码:</i
>{{ dataList.flownum || "--" }}</span
>
<span
><i class="lable">取号方式:</i
>{{ $codeMap.takeNumWay[dataList.wy_signin] || "--" }}</span
>
<span><i class="lable">注册方式:</i>{{ "--" }}</span> <span><i class="lable">注册方式:</i>{{ "--" }}</span>
<span><i class="lable">取号设备:</i>{{ dataList.take_name || "--" }}</span> <span
><i class="lable">取号设备:</i
>{{ dataList.take_name || "--" }}</span
>
</div> </div>
</div> </div>
</a-step> </a-step>
...@@ -46,10 +93,22 @@ ...@@ -46,10 +93,22 @@
</div> </div>
<div class="description_box" slot="description"> <div class="description_box" slot="description">
<div class="details"> <div class="details">
<span><i class="lable">办理窗口:</i>{{ dataList.window_name || "--" }}</span> <span
<span><i class="lable">办理开始时间:</i>{{ dataList.calltime || "--" }}</span> ><i class="lable">办理窗口:</i
<span><i class="lable">工作人员:</i>{{ dataList.workman_name || "--" }}</span> >{{ dataList.window_name || "--" }}</span
<span><i class="lable">叫号设备:</i>{{ dataList.window_fromnum || "--" }}</span> >
<span
><i class="lable">办理开始时间:</i
>{{ dataList.calltime || "--" }}</span
>
<span
><i class="lable">工作人员:</i
>{{ dataList.workman_name || "--" }}</span
>
<span
><i class="lable">叫号设备:</i
>{{ dataList.window_fromnum || "--" }}</span
>
</div> </div>
</div> </div>
</a-step> </a-step>
...@@ -60,18 +119,19 @@ ...@@ -60,18 +119,19 @@
</div> </div>
<div class="description_box" slot="description"> <div class="description_box" slot="description">
<div class="details"> <div class="details">
<span><i class="lable">办理结束时间:</i>{{ dataList.endtime || "--" }}</span> <span
><i class="lable">办理结束时间:</i
>{{ dataList.endtime || "--" }}</span
>
</div> </div>
</div> </div>
</a-step> </a-step>
</a-steps> </a-steps>
</a-drawer> </a-drawer>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: "PortalAdminVueHandlingDetails", name: "PortalAdminVueHandlingDetails",
...@@ -81,8 +141,8 @@ export default { ...@@ -81,8 +141,8 @@ export default {
modalInfo: { modalInfo: {
confirmLoading: false, confirmLoading: false,
visible: false, visible: false,
title: '用户信息', title: "用户信息",
width: '38%', width: "38%",
}, },
dataList: [], dataList: [],
approveLs: [ approveLs: [
...@@ -116,8 +176,7 @@ export default { ...@@ -116,8 +176,7 @@ export default {
} }
}, },
}, },
mounted() { mounted() {},
},
methods: { methods: {
modalClose() { modalClose() {
...@@ -132,18 +191,19 @@ export default { ...@@ -132,18 +191,19 @@ export default {
}, },
// 转换时间为秒 // 转换时间为秒
timeToSec(time) { timeToSec(time) {
if (time !== null && time !== undefined) { if (time) {
var s = ""; var s = "";
if (time.includes("分钟") && time.includes("")) { if (time.includes("分钟") && time.includes("")) {
var min = time.split("分钟")[0]; var min = time.split("分钟")[0];
var sec = time.split("分钟")[1].split("")[0]; var sec = time.split("分钟")[1].split("")[0];
s = Number(min * 60) + Number(sec); s = Number(min * 60) + Number(sec);
return s; return s;
}else{ } else {
sec = time.split("")[0] sec = time.split("")[0];
return sec; return sec;
} }
} else {
return 0;
} }
}, },
}, },
...@@ -253,7 +313,7 @@ export default { ...@@ -253,7 +313,7 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
color: #BDBAB4; color: #bdbab4;
} }
.state1 { .state1 {
...@@ -262,7 +322,7 @@ export default { ...@@ -262,7 +322,7 @@ export default {
top: 150px; top: 150px;
width: 85px; width: 85px;
height: 85px; height: 85px;
border: 5px solid #FCE2D9; border: 5px solid #fce2d9;
border-radius: 50%; border-radius: 50%;
-webkit-transform: rotate(45deg); -webkit-transform: rotate(45deg);
transform: rotate(45deg); transform: rotate(45deg);
...@@ -278,7 +338,7 @@ export default { ...@@ -278,7 +338,7 @@ export default {
top: 150px; top: 150px;
width: 85px; width: 85px;
height: 85px; height: 85px;
border: 5px solid #D9F1E4; border: 5px solid #d9f1e4;
border-radius: 50%; border-radius: 50%;
-webkit-transform: rotate(45deg); -webkit-transform: rotate(45deg);
transform: rotate(45deg); transform: rotate(45deg);
...@@ -315,7 +375,7 @@ export default { ...@@ -315,7 +375,7 @@ export default {
} }
/deep/.ant-steps-item { /deep/.ant-steps-item {
&+.ant-steps-item { & + .ant-steps-item {
margin-top: 25px !important; margin-top: 25px !important;
} }
} }
......
...@@ -2,16 +2,27 @@ ...@@ -2,16 +2,27 @@
<div class="queueRecord-Container"> <div class="queueRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button type="success" @click="exportTable(tHeader, filterVal, style, downAllData)"> <a-button
:loading="btnLoading"
type="success"
@click="handleExportTable"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button> </a-button>
<b>叫号次数:<i>{{ tablePagination.total }}</i></b> <b
>叫号次数:<i>{{ tablePagination.total }}</i></b
>
<sub>统计时间段:{{ searchForm.time[0] }}~{{ searchForm.time[1] }}</sub> <sub>统计时间段:{{ searchForm.time[0] }}~{{ searchForm.time[1] }}</sub>
</div> </div>
<span> <span>
<a-space>
<a-select v-model="searchForm.id" style="width: 120px"> <a-select v-model="searchForm.id" style="width: 120px">
<a-select-option value=""> 全部设备 </a-select-option> <a-select-option value=""> 全部设备 </a-select-option>
<a-select-option v-for="item in deviceData" :key="item.id" :value="item.id"> <a-select-option
v-for="item in deviceData"
:key="item.id"
:value="item.id"
>
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
...@@ -23,19 +34,33 @@ ...@@ -23,19 +34,33 @@
</a-select> </a-select>
<a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time"> <a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time">
</a-range-picker> </a-range-picker>
<a-input v-model="searchForm.flownum" placeholder="请输入排队编号搜索"> <a-input
v-model="searchForm.flownum"
placeholder="请输入排队编号搜索"
>
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<a-button type="primary" @click="getDataList">搜索</a-button> <a-button type="primary" @click="getDataList">搜索</a-button>
<a-button @click="resetBtn">重置</a-button> <a-button @click="resetBtn">重置</a-button>
</a-space>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ <a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys, selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" :scroll="{ y: 590 }" :pagination="tablePagination" @change="changeTablePage" :loading="tableLoading" }"
:columns="tableHeaders" :dataSource="tableList"> :scroll="{ y: 590 }"
:pagination="tablePagination"
@change="changeTablePage"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableList"
>
<!-- 序号 --> <!-- 序号 -->
<span slot="num" slot-scope="text, record, index">{{ <span slot="num" slot-scope="text, record, index">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1 (tablePagination.current - 1) * tablePagination.pageSize + index + 1
...@@ -57,7 +82,11 @@ ...@@ -57,7 +82,11 @@
</template> </template>
<!-- 办理业务 --> <!-- 办理业务 -->
<template slot="business" slot-scope="text"> <template slot="business" slot-scope="text">
<a v-if="text.business" @click="openBusiness(text.business, text.businessid)">{{ text.business }}</a> <a
v-if="text.business"
@click="openBusiness(text.business, text.businessid)"
>{{ text.business }}</a
>
<span v-else>--</span> <span v-else>--</span>
</template> </template>
<!-- 办理开始时间 --> <!-- 办理开始时间 -->
...@@ -66,7 +95,11 @@ ...@@ -66,7 +95,11 @@
</template> </template>
<!-- 办理窗口 --> <!-- 办理窗口 -->
<template slot="window_name" slot-scope="text"> <template slot="window_name" slot-scope="text">
{{ text.window_name ? text.window_name : "--" }} {{
text.window_name
? text.window_name + "-" + text.window_fromnum
: "--"
}}
</template> </template>
<!-- 工作人员 --> <!-- 工作人员 -->
<template slot="workman_name" slot-scope="text"> <template slot="workman_name" slot-scope="text">
...@@ -85,11 +118,13 @@ ...@@ -85,11 +118,13 @@
</template> </template>
<!-- 状态 --> <!-- 状态 -->
<template slot="style" slot-scope="text"> <template slot="style" slot-scope="text">
<span :class="{ <span
:class="{
'stand-line': text.style === 0, 'stand-line': text.style === 0,
'on-transact': text.style === 1, 'on-transact': text.style === 1,
'on-end': text.style === 4, 'on-end': text.style === 4,
}"> }"
>
{{ $codeMap.queueState[text.style] }} {{ $codeMap.queueState[text.style] }}
</span> </span>
</template> </template>
...@@ -110,14 +145,21 @@ import BusinessInfo from "./components/businessInfo.vue"; ...@@ -110,14 +145,21 @@ import BusinessInfo from "./components/businessInfo.vue";
import WorkpeopleInfo from "./components/workpeopleInfo.vue"; import WorkpeopleInfo from "./components/workpeopleInfo.vue";
import HandlingDetails from "./components/HandlingDetails.vue"; import HandlingDetails from "./components/HandlingDetails.vue";
import { import {
getTaskList, getQueueData, getQueueInfo, getBusinessEvent, getTaskList,
getWorkerInfo, getPeopleanalyse, getWorkmananalyse getQueueData,
getQueueInfo,
getBusinessEvent,
getWorkerInfo,
getPeopleanalyse,
getWorkmananalyse,
} from "@/api/dataAdmin"; } from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel";
export default { export default {
mixins: [table],
name: "PortalAdminVueQueueRecord", name: "PortalAdminVueQueueRecord",
mixins: [table],
data() { data() {
return { return {
btnLoading: false,
tableHeaders: [ tableHeaders: [
{ {
title: "序号", title: "序号",
...@@ -212,7 +254,9 @@ export default { ...@@ -212,7 +254,9 @@ export default {
}, },
}, },
], ],
tHeader: [// 导出的表头名信息
tHeader: [
// 导出的表头名信息
"排队编号", "排队编号",
"申报人", "申报人",
"联系方式", "联系方式",
...@@ -225,7 +269,8 @@ export default { ...@@ -225,7 +269,8 @@ export default {
"办理结束时间", "办理结束时间",
"状态", "状态",
], ],
filterVal: [// 导出的表头字段名,需要导出表格字段名 filterVal: [
// 导出的表头字段名,需要导出表格字段名
"flownum", "flownum",
"people_name", "people_name",
"people_phone", "people_phone",
...@@ -269,6 +314,8 @@ export default { ...@@ -269,6 +314,8 @@ export default {
1: "办理中", 1: "办理中",
4: "办理完成", 4: "办理完成",
}, },
tableSelectedKeys: [],
tableSelectedRows: [],
}; };
}, },
components: { components: {
...@@ -285,19 +332,19 @@ export default { ...@@ -285,19 +332,19 @@ export default {
methods: { methods: {
//搜索按钮 //搜索按钮
getDataList() { getDataList() {
this.tablePagination.current = 1 this.tablePagination.current = 1;
this.getQueueDataArr(); this.getQueueDataArr();
}, },
//重置按钮 //重置按钮
resetBtn() { resetBtn() {
this.tablePagination.current = 1 this.tablePagination.current = 1;
this.searchForm = { this.searchForm = {
id: "", // 排队机id id: "", // 排队机id
style: "", // 状态 style: "", // 状态
time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间 time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间
flownum: "", // 排号编码 flownum: "", // 排号编码
} };
this.getQueueDataArr() this.getQueueDataArr();
}, },
//获取排号机设备列表 //获取排号机设备列表
async getTaskListArr() { async getTaskListArr() {
...@@ -319,65 +366,131 @@ export default { ...@@ -319,65 +366,131 @@ export default {
}, },
//分页 //分页
changeTablePage(page) { changeTablePage(page) {
this.pagTableChange(page) this.pagTableChange(page);
this.getQueueDataArr() this.getQueueDataArr();
}, },
//用户模态框 //用户模态框
async openDeclarant(item) { async openDeclarant(item) {
await getPeopleanalyse({ peopleid: item.peopleid, time: this.searchForm.time }).then(res => { await getPeopleanalyse({
if (res.code = 1) { peopleid: item.peopleid,
this.$refs.UserInfo.dataList = { ...item, ...res.data } time: this.searchForm.time,
}).then((res) => {
if ((res.code = 1)) {
this.$refs.UserInfo.dataList = { ...item, ...res.data };
// console.log(this.$refs.UserInfo.dataList) // console.log(this.$refs.UserInfo.dataList)
} }
}) });
this.$refs.UserInfo.modalInfo.title = "用户信息"; this.$refs.UserInfo.modalInfo.title = "用户信息";
this.$refs.UserInfo.modalInfo.width = "25%"; this.$refs.UserInfo.modalInfo.width = "25%";
this.$refs.UserInfo.modalInfo.visible = true; this.$refs.UserInfo.modalInfo.visible = true;
}, },
//业务关联模块 //业务关联模块
async openBusiness(business, id) { async openBusiness(business, id) {
let siteId = localStorage.getItem('siteId') let siteId = localStorage.getItem("siteId");
await getBusinessEvent({ businessid: id, time: this.searchForm.time }).then(res => { await getBusinessEvent({
this.$refs.BusinessInfo.dataList = res.data businessid: id,
}) time: this.searchForm.time,
}).then((res) => {
this.$refs.BusinessInfo.dataList = res.data;
});
this.$refs.BusinessInfo.modalInfo.title = "业务分析"; this.$refs.BusinessInfo.modalInfo.title = "业务分析";
this.$refs.BusinessInfo.title = business this.$refs.BusinessInfo.title = business;
this.$refs.BusinessInfo.modalInfo.visible = true; this.$refs.BusinessInfo.modalInfo.visible = true;
}, },
//工作人员信息模态框 //工作人员信息模态框
async openWorkpeople(id) { async openWorkpeople(id) {
let a, b = {} let a,
await getWorkerInfo({ id }).then(res => { b = {};
a = res.data await getWorkerInfo({ id }).then((res) => {
}) a = res.data;
await getWorkmananalyse({ workmanid: id, time: this.searchForm.time }).then(res => { });
b = res.data await getWorkmananalyse({
}) workmanid: id,
this.$refs.WorkpeopleInfo.infoData = { ...a, ...b } time: this.searchForm.time,
console.log(this.$refs.WorkpeopleInfo.infoData) }).then((res) => {
b = res.data;
});
this.$refs.WorkpeopleInfo.infoData = { ...a, ...b };
this.$refs.WorkpeopleInfo.modalInfo.title = "工作人员信息"; this.$refs.WorkpeopleInfo.modalInfo.title = "工作人员信息";
this.$refs.WorkpeopleInfo.modalInfo.visible = true; this.$refs.WorkpeopleInfo.modalInfo.visible = true;
}, },
//详情信息抽屉 //详情信息抽屉
async openHandlingDetails(id) { async openHandlingDetails(id) {
//获取排队叫号对应ID详情 //获取排队叫号对应ID详情
await getQueueInfo({ id }).then(res => { await getQueueInfo({ id }).then((res) => {
this.$refs.HandlingDetails.dataList = res.data this.$refs.HandlingDetails.dataList = res.data;
}) });
this.$refs.HandlingDetails.modalInfo.title = "办理明细"; this.$refs.HandlingDetails.modalInfo.title = "办理明细";
this.$refs.HandlingDetails.modalInfo.visible = true; this.$refs.HandlingDetails.modalInfo.visible = true;
}, },
//获取全部数据 // 选中
downAllData() { onSelectChange(keys, rows) {
this.tableSelectedKeys = keys;
const res = new Map();
this.tableSelectedRows = [...this.tableSelectedRows, ...rows]
.filter((v) => {
return !res.has(v.id) && res.set(v.id, 1);
})
.filter((v) => {
return this.tableSelectedKeys.some((val) => v.id == val);
});
},
// 导出
async handleExportTable() {
this.btnLoading = true;
let obj = {
0: "排队中",
1: "办理中",
4: "办理完成",
};
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
this.tableSelectedRows.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.style == keys) {
item.style = obj[keys];
}
});
});
export2Excel(
this.tHeader,
this.filterVal,
this.tableSelectedRows,
"排队记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
getQueueData({ getQueueData({
page: 1, page: 1,
size: -1, size: -1,
...this.searchForm, ...this.searchForm,
}).then(res => { }).then((res) => {
return res let { data } = res.data;
for (let item of data) {
Object.keys(obj).forEach((key) => {
if (item.style == key) {
item.style = obj[key];
}
}); });
} }
export2Excel(
this.tHeader,
this.filterVal,
data,
"排队记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
});
}
this.btnLoading = false;
},
//获取全部数据
// downAllData() {
// getQueueData({
// page: 1,
// size: -1,
// ...this.searchForm,
// }).then((res) => {
// return res;
// });
// },
}, },
}; };
</script> </script>
......
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