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