Commit 999a3858 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 6d6be053 2df16650
...@@ -56,6 +56,21 @@ export function getEvaData(params) { ...@@ -56,6 +56,21 @@ export function getEvaData(params) {
export function getEvaDetil(params) { export function getEvaDetil(params) {
return http.get(`${BASEURL}/bkb/evaluate/evaluatedl`, params); return http.get(`${BASEURL}/bkb/evaluate/evaluatedl`, params);
} }
// 窗口暂离记录报表
export function stopToWindow(params) {
return http.post(`${BASEURL}/admin/stopjl/stopToWindow`, params);
}
// 工作人员暂离记录报表
export function stopToWorkman(params) {
return http.post(`${BASEURL}/admin/stopjl/stopToWorkman`, params);
}
// 工作人员/窗口暂离记录详情
export function stopInfo(params) {
return http.post(`${BASEURL}/admin/stopjl/stopInfo`, params);
}
// 排号评价详情 // 排号评价详情
export function getQueEvaData(params) { export function getQueEvaData(params) {
return http.get(`${BASEURL}/bkb/evaluate/queEvaluateInfo`, params); return http.get(`${BASEURL}/bkb/evaluate/queEvaluateInfo`, params);
......
<template>
<!-- 窗口评价报表搜索 -->
<div class="search-form">
<a-space direction="vertical" size="middle">
<a-button block class="export-btn" icon="upload" @click="handleExport">
导出
</a-button>
<a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time" />
<a-input
allowClear
placeholder="请输入工作人员姓名搜索"
v-model="searchForm.workman_name"
/>
<a-button block class="search-btn" icon="search" @click="handleSearch">
搜索
</a-button>
</a-space>
</div>
</template>
<script>
import storage from "@/utils/js/Storage";
import { mapMutations } from "vuex";
import { getDatingList, getBumenList, getOptonList } from "@/api/dataAdmin";
import { debounce } from "lodash";
export default {
name: "staffLeft-search",
data() {
return {
siteId: storage.get(2, "siteId"),
datingList: [], // 大厅列表
deptList: [], // 部门列表
evaChoose: [], //评价选项
evaFrom: [], // 评价来源
evaDates: [], // 评价日期
optonList: [], // 评价选项列表
// 搜索数据
searchForm: {
workman_name: "",
type: "ckpj",
time: [
this.$moment().format("YYYY-MM-DD"),
this.$moment().format("YYYY-MM-DD"),
], // 时间区间
},
};
},
created() {
this.getDatingListArr();
this.getBumenListArr();
this.getOptonList();
},
methods: {
...mapMutations("search", ["set_searForm", "set_isExport", "reset"]),
// 获取大厅列表
async getDatingListArr() {
let res = await getDatingList({
page: 1,
size: -1,
siteId: this.siteId,
});
if (res.code == 1) {
let { data } = res.data;
this.datingList = data;
}
},
// // 获取部门列表
async getBumenListArr() {
let res = await getBumenList({
page: 1,
size: -1,
siteId: this.siteId,
});
if (res.code == 1) {
let { data } = res.data;
this.deptList = data;
}
},
// 获取评价选项
async getOptonList() {
let res = await getOptonList();
if (res.code == 1) {
this.optonList = res.data;
}
},
// 搜索
handleSearch() {
let option_id = this.evaChoose.join(",");
let pjxt = this.evaFrom.join(",");
this.searchForm.option_id = option_id;
this.searchForm.pjxt = pjxt;
this.set_searForm(this.searchForm);
},
// 导出
handleExport: debounce(
function () {
this.$bus.$emit("export");
},
2000,
{
leading: true,
trailing: false,
}
),
},
beforeDestroy() {
this.reset();
},
};
</script>
<style lang="less" scoped>
</style>
<template>
<!-- 窗口评价报表搜索 -->
<div class="search-form">
<a-space direction="vertical" size="middle">
<a-button block class="export-btn" icon="upload" @click="handleExport">
导出
</a-button>
<a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time" />
<a-input
allowClear
placeholder="请输入窗口编号搜索"
v-model="searchForm.window_num"
/>
<a-button block class="search-btn" icon="search" @click="handleSearch">
搜索
</a-button>
</a-space>
</div>
</template>
<script>
import storage from "@/utils/js/Storage";
import { mapMutations } from "vuex";
import { getDatingList, getBumenList, getOptonList } from "@/api/dataAdmin";
import { debounce } from "lodash";
export default {
name: "windowLeft-search",
data() {
return {
siteId: storage.get(2, "siteId"),
datingList: [], // 大厅列表
deptList: [], // 部门列表
evaChoose: [], //评价选项
evaFrom: [], // 评价来源
evaDates: [], // 评价日期
optonList: [], // 评价选项列表
// 搜索数据
searchForm: {
window_num: "",
time: [
this.$moment().format("YYYY-MM-DD"),
this.$moment().format("YYYY-MM-DD"),
], // 时间区间
},
};
},
created() {
this.getDatingListArr();
this.getBumenListArr();
this.getOptonList();
},
methods: {
...mapMutations("search", ["set_searForm", "set_isExport", "reset"]),
// 获取大厅列表
async getDatingListArr() {
let res = await getDatingList({
page: 1,
size: -1,
siteId: this.siteId,
});
if (res.code == 1) {
let { data } = res.data;
this.datingList = data;
}
},
// // 获取部门列表
async getBumenListArr() {
let res = await getBumenList({
page: 1,
size: -1,
siteId: this.siteId,
});
if (res.code == 1) {
let { data } = res.data;
this.deptList = data;
}
},
// 获取评价选项
async getOptonList() {
let res = await getOptonList();
if (res.code == 1) {
this.optonList = res.data;
}
},
// 搜索
handleSearch() {
this.set_searForm(this.searchForm);
},
// 导出
handleExport: debounce(
function () {
this.$bus.$emit("export");
},
2000,
{
leading: true,
trailing: false,
}
),
},
beforeDestroy() {
this.reset();
},
};
</script>
<style lang="less" scoped>
</style>
...@@ -329,6 +329,30 @@ const routes = [ ...@@ -329,6 +329,30 @@ const routes = [
activeMenu: "/home/dataManagement", activeMenu: "/home/dataManagement",
}, },
}, },
{
path: "windowLeft",
name: "windowLeft",
component: () =>
import(
/* webpackChunkName: "windowLeft" */ "@/views/dataAdmin/components/evaluationRecordReport/windowLeft.vue"
),
meta: {
title: "窗口暂离记录报表",
activeMenu: "/home/dataManagement",
},
},
{
path: "staffLeft",
name: "staffLeft",
component: () =>
import(
/* webpackChunkName: "staffLeft" */ "@/views/dataAdmin/components/evaluationRecordReport/staffLeft.vue"
),
meta: {
title: "工作人员暂离记录报表",
activeMenu: "/home/dataManagement",
},
},
], ],
}, },
{ {
...@@ -449,6 +473,8 @@ const routes = [ ...@@ -449,6 +473,8 @@ const routes = [
activeMenu: "/home/dataManagement", activeMenu: "/home/dataManagement",
}, },
}, },
], ],
}, },
], ],
......
<template>
<div>
<a-drawer
:title="title"
placement="right"
width="700px"
:visible="Visible"
@close="onClose"
>
<!-- 头部 -->
<div class="header">
<div class="elapsed-time">
<p class="elapsed-time-title">
<span>累计次数</span>
</p>
<p class="time">{{ detailsInfo.total }}</p>
</div>
<div class="elapsed-time">
<p class="elapsed-time-title">
<span>累计时长</span>
</p>
<p class="time">
<span>{{ allTime }}</span>
</p>
</div>
<div class="elapsed-time">
<p class="elapsed-time-title">
<span>最近暂离时间</span>
</p>
<p class="time">
{{ createTime }}
</p>
</div>
</div>
<!-- 步骤条 -->
<a-steps direction="vertical">
<a-step
:title="index + 1"
v-for="(item, index) in detailsInfo.data"
:key="item.stopid"
>
<a-icon type="environment" slot="icon" />
<div slot="description" class="transact-step">
<a-row :gutter="[0, 8]">
<a-col :span="12">
<span>窗口编号:</span>{{ item.window_num || "--" }}
</a-col>
<a-col :span="12">
<span>工作人员:</span>{{ item.workman_name || "--" }}
</a-col>
</a-row>
<a-row :gutter="[0, 8]">
<a-col :span="12">
<span>暂离时间:</span>{{ item.create_time || "--" }}
</a-col>
<a-col :span="12">
<span>回归时间:</span>{{ item.end_time || "--" }}
</a-col>
</a-row>
<a-row :gutter="[0, 8]">
<a-col :span="12">
<span>暂离时长:</span>
{{ item.zl_time + " 分钟" || "--" }}
</a-col>
<a-col :span="12">
<span>暂离原因:</span>
{{ item.stoptitle || "--" }}
</a-col>
</a-row>
</div>
</a-step>
</a-steps>
</a-drawer>
</div>
</template>
<script>
export default {
props: {
type: {
type: Number,
// required: true,
default: 1,
},
title: {
type: String,
required: true,
default: "",
},
detailsVisible: {
type: Boolean,
required: true,
default: false,
},
detailsInfo: {
type: Object,
required: true,
default: () => {
return {};
},
},
allTime: {
type: String,
default: "--",
},
createTime: {
type: String,
default: "--",
},
},
data() {
return {
baseurl: process.env.VUE_APP_API_PHP_URL,
};
},
computed: {
Visible: {
get() {
return this.detailsVisible;
},
set(val) {
this.$emit("update:detailsVisible", val);
},
},
},
created() {},
methods: {
onClose() {
this.Visible = false;
},
// 比较时间大小
compareTime(time1, time2) {
if (this.timeToSec(time1) - this.timeToSec(time2) > 0) {
return true;
}
return false;
},
// 转换时间为秒
timeToSec(time) {
if (time == 0) return time;
if (time !== null && time !== undefined) {
let s = "";
if (time.includes("分钟") && time.includes("")) {
let min = time.split("分钟")[0];
let sec = time.split("分钟")[1].split("")[0];
s = Number(min * 60) + Number(sec);
return s;
}
}
},
},
};
</script>
<style lang="less" scoped>
:deep(.ant-steps-item-title) {
color: #1890ff !important;
}
.header {
height: 90px;
margin-bottom: 20px;
border-left: 5px solid #1890ff;
border-radius: 0px 8px 8px 0px;
background-color: #e6f2fd;
display: flex;
justify-content: space-around;
align-items: center;
.elapsed-time-title {
font-size: 16px;
}
.time {
color: #1890ff;
}
}
.transact-step {
position: relative;
.transact-tips1,
.transact-tips2,
.transact-tips3 {
width: 90px;
height: 90px;
font-size: 16px;
font-weight: 600;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: -27px;
right: 0px;
transform: rotate(45deg);
}
.transact-tips1 {
border: 8px solid rgba(0, 168, 112, 0.1);
color: #00a870;
}
.transact-tips2 {
border: 8px solid rgba(8, 87, 232, 0.1);
color: #0857e8;
}
.transact-tips3 {
border: 8px solid rgba(101, 101, 101, 0.1);
color: #656565;
}
}
</style>
<template> <template>
<div class="h-full w-full flex flex-col"> <div class="h-full w-full flex flex-col">
<div class="total-info"> <div class="total-info">
<span class="mr-[30px]">评价次数:{{ total ?? 0 }}</span> <span class="mr-[30px]" v-if="isShow">评价次数{{ total || 0 }}</span>
<span>统计时间段:{{ time[0] }} - {{ time[1] }}</span> <span>统计时间段:{{ time[0] }} - {{ time[1] }}</span>
</div> </div>
<div class="reportforms-out-box"> <div class="reportforms-out-box">
...@@ -45,6 +45,14 @@ export default { ...@@ -45,6 +45,14 @@ export default {
"evaluationRecordReport" "evaluationRecordReport"
); );
}, },
isShow(){
let val = this.$route.path
if ((val=='/home/dataManagement/evaluationRecordReport/windowLeft')||(val=='/home/dataManagement/evaluationRecordReport/staffLeft')) {
return false
}else{
return true
}
}
}, },
mounted() {}, mounted() {},
methods: { methods: {
......
<template>
<div>
<a-table
style="width: 1500px"
size="middle"
:columns="columns"
:data-source="tableData"
:loading="loading"
:scroll="{
y: 490,
}"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
:rowKey="(record) => record.id"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: current,
total: total,
pageSize: size,
showQuickJumper: true,
}"
@change="changeTable"
>
<!-- 评价人照片 -->
<template slot="picture" slot-scope="text">
<a-avatar v-if="!text" shape="square" :size="40" icon="user" />
<img
v-else
:src="baseurl + '/' + text"
class="cursor-pointer w-[50px] max-h-[50px] rounded-[4px]"
@click="$viewerApi({ images: [baseurl + '/' + text] })"
/>
</template>
<!-- 操作 -->
<template slot="action" slot-scope="text, record">
<a-space>
<a-tag
class="cursor-pointer"
color="blue"
@click="
checkInfo(record.workmanid, record.all_time, record.create_time)
"
>
详情
</a-tag>
</a-space>
</template>
</a-table>
<!-- 详情 -->
<StepoutDetails
:detailsInfo="detailsInfo"
:detailsVisible.sync="detailsVisible"
:title="title"
:allTime="allTime"
:createTime="createTime"
></StepoutDetails>
</div>
</template>
<script>
import { mapState } from "vuex";
import storage from "@/utils/js/Storage";
import StepoutDetails from "./components/StepoutDetails.vue";
import { export2Excel } from "@/utils/js/exportExcel";
import { stopToWorkman, stopInfo } from "@/api/dataAdmin";
const tHeader = ["工作人员", "暂离次数", "累计计时(分钟)", "最近暂离时间"]; // 导出的表头名信息
const filterVal = ["workman_name", "count", "all_time", "create_time"]; // 导出的表头字段名,需要导出表格字段名
export default {
components: {
StepoutDetails,
},
data() {
const columns = [
{
title: "序号",
width: 100,
align: "center",
customRender: (text, record, index) => {
return (this.current - 1) * this.size + index + 1;
},
},
{
title: "工作人员",
width: 100,
dataIndex: "workman_name",
customRender: (text) => {
return text ? text : "--";
},
},
{
title: "暂离次数",
width: 100,
dataIndex: "count",
customRender: (text) => {
return text ? text : "--";
},
},
{
title: "累计计时(分钟)",
width: 100,
dataIndex: "all_time",
customRender: (text) => {
return text ? text : "--";
},
},
{
title: "最近暂离时间",
width: 100,
dataIndex: "create_time",
customRender: (text) => {
return text ? text : "--";
},
},
{
title: "操作",
width: 150,
align: "center",
scopedSlots: {
customRender: "action",
},
},
];
return {
baseurl: process.env.VUE_APP_API_PHP_URL,
siteId: storage.get(2, "siteId"),
columns,
tHeader,
filterVal,
tableData: [],
current: 1,
size: 10,
total: 0,
searchForm: {
info: "",
type: "phpj",
sectionid: "", // 部门id
hallid: "", // 大厅id
option_id: "", // 评价ids
pjxt: "", // 评价来源
time: [
this.$moment().format("YYYY-MM-DD"),
this.$moment().format("YYYY-MM-DD"),
], // 时间区间
},
loading: false,
selectedRowKeys: [], // 表格选中的key
excelData: [], // 导出数据
detailsInfo: {}, // 详情信息
allTime: "",
createTime: "",
detailsVisible: false,
title: "办理明细",
};
},
computed: {
...mapState("search", ["searForm"]),
},
watch: {
searForm: {
handler(newForm) {
if (JSON.stringify(newForm) != "{}") {
this.searchForm = newForm;
this.current = 1;
this.stopToWorkman();
}
},
deep: true,
},
},
created() {
this.stopToWorkman();
this.$bus.$off("export");
this.$bus.$on("export", () => {
this.exportExcel();
});
},
methods: {
// 获取报表
async stopToWorkman() {
this.loading = true;
let { data, total } = await this.getDataList();
this.total = total;
this.tableData = data;
this.$emit("update", { total, time: this.searchForm.time });
this.loading = false;
},
// 获取数据函数
async getDataList(searchForm) {
let list = [];
let listTotal = 0;
let res = await stopToWorkman({
page: this.current,
size: this.size,
...this.searchForm,
...searchForm,
});
if (res.code == 1) {
let { data, total } = res.data.data;
list = data;
listTotal = total;
}
return {
data: list,
total: listTotal,
};
},
// 翻页
changeTable(pagination) {
let { current } = pagination;
this.current = current;
this.stopToWorkman();
},
// 勾选表格
onSelectChange(keys, rows) {
this.selectedRowKeys = keys;
const res = new Map();
this.excelData = [...this.excelData, ...rows]
.filter((v) => {
return !res.has(v.id) && res.set(v.id, 1);
})
.filter((v) => {
return this.selectedRowKeys.some((val) => v.id == val);
});
},
// 导出表格
async exportExcel() {
let obj = {
1: "窗口评价",
2: "自助服务终端",
3: "背靠背评价",
4: "微官网",
5: "好差评",
6: "一体化评价",
};
if (this.selectedRowKeys.length && this.excelData.length) {
// 深度克隆避免影响页面表格展示
let data = this.$_.cloneDeep(this.excelData);
data.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.pjxt == keys) {
item.pjxt = obj[keys];
}
});
});
export2Excel(
this.tHeader,
this.filterVal,
data,
"办理事项评价记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
this.dataSection(this.getDataList, {}, (data) => {
if (!data.length) {
this.$message.warning("暂无数据");
return;
}
data.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.pjxt == keys) {
item.pjxt = obj[keys];
}
});
});
export2Excel(
this.tHeader,
this.filterVal,
data,
"办理事项评价记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
});
}
},
// 数据切片
async dataSection(fn, searchForm, callback) {
let dataList = [];
let page = 1;
let size = 1000;
let execute = async () => {
let { data, total } = await fn({ page, size, ...searchForm });
dataList = [...dataList, ...data];
this.$app.progressFile.show = true;
this.$app.progressFile.percent = parseInt(
(dataList.length / total) * 100
);
if (dataList.length >= total || data.length == 0) {
if (callback) callback(dataList);
this.$app.progressFile.show = false;
this.$app.progressFile.percent = 1;
return;
}
setTimeout(() => {
page += 1;
execute();
});
};
execute();
},
// 详情
async checkInfo(id, alltime, createtime) {
let res = await stopInfo({
page: 1,
size: -1,
time: this.searchForm.time,
workmanid: id,
});
if (res.code == 1) {
let { data } = res;
this.detailsInfo = data;
this.detailsVisible = true;
this.allTime = alltime;
this.createTime = createtime;
}
},
},
};
</script>
<style lang="less" scoped></style>
<template>
<div>
<a-table
style="width: 1500px"
size="middle"
:columns="columns"
:data-source="tableData"
:loading="loading"
:scroll="{
y: 490,
}"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
:rowKey="(record) => record.id"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: current,
total: total,
pageSize: size,
showQuickJumper: true,
}"
@change="changeTable"
>
<!-- 评价人照片 -->
<template slot="picture" slot-scope="text">
<a-avatar v-if="!text" shape="square" :size="40" icon="user" />
<img
v-else
:src="baseurl + '/' + text"
class="cursor-pointer w-[50px] max-h-[50px] rounded-[4px]"
@click="$viewerApi({ images: [baseurl + '/' + text] })"
/>
</template>
<!-- 操作 -->
<template slot="action" slot-scope="text, record">
<a-space>
<a-tag
class="cursor-pointer"
color="blue"
@click="
checkInfo(record.windowid, record.all_time, record.create_time)
"
>
详情
</a-tag>
</a-space>
</template>
</a-table>
<!-- 详情 -->
<StepoutDetails
:detailsInfo="detailsInfo"
:detailsVisible.sync="detailsVisible"
:title="title"
:allTime="allTime"
:createTime="createTime"
></StepoutDetails>
</div>
</template>
<script>
import { mapState } from "vuex";
import storage from "@/utils/js/Storage";
import StepoutDetails from "./components/StepoutDetails.vue";
import { export2Excel } from "@/utils/js/exportExcel";
import { stopToWindow, stopInfo } from "@/api/dataAdmin";
const tHeader = ["窗口编号", "暂离次数", "累计计时(分钟)", "最近暂离时间"]; // 导出的表头名信息
const filterVal = ["window_num", "count", "all_time", "create_time"]; // 导出的表头字段名,需要导出表格字段名
export default {
components: {
StepoutDetails,
},
data() {
const columns = [
{
title: "序号",
width: 100,
align: "center",
customRender: (text, record, index) => {
return (this.current - 1) * this.size + index + 1;
},
},
{
title: "窗口编号",
width: 100,
dataIndex: "window_num",
customRender: (text) => {
return text ? text : "--";
},
},
{
title: "暂离次数",
width: 100,
dataIndex: "count",
customRender: (text) => {
return text ? text : "--";
},
},
{
title: "累计计时(分钟)",
width: 100,
dataIndex: "all_time",
customRender: (text) => {
return text ? text : "--";
},
},
{
title: "最近暂离时间",
width: 100,
dataIndex: "create_time",
customRender: (text) => {
return text ? text : "--";
},
},
{
title: "操作",
width: 150,
align: "center",
scopedSlots: {
customRender: "action",
},
},
];
return {
baseurl: process.env.VUE_APP_API_PHP_URL,
siteId: storage.get(2, "siteId"),
columns,
tHeader,
filterVal,
tableData: [],
current: 1,
size: 10,
total: 0,
searchForm: {
info: "",
type: "phpj",
sectionid: "", // 部门id
hallid: "", // 大厅id
option_id: "", // 评价ids
pjxt: "", // 评价来源
time: [
this.$moment().format("YYYY-MM-DD"),
this.$moment().format("YYYY-MM-DD"),
], // 时间区间
},
loading: false,
selectedRowKeys: [], // 表格选中的key
excelData: [], // 导出数据
detailsInfo: {}, // 详情信息
allTime: "",
createTime: "",
detailsVisible: false,
title: "详情",
};
},
computed: {
...mapState("search", ["searForm"]),
},
watch: {
searForm: {
handler(newForm) {
if (JSON.stringify(newForm) != "{}") {
this.searchForm = newForm;
this.current = 1;
this.stopToWindow();
}
},
deep: true,
},
},
created() {
this.stopToWindow();
this.$bus.$off("export");
this.$bus.$on("export", () => {
this.exportExcel();
});
},
methods: {
// 获取报表
async stopToWindow() {
this.loading = true;
let { data, total } = await this.getDataList();
this.total = total;
this.tableData = data;
this.$emit("update", { total, time: this.searchForm.time });
this.loading = false;
},
// 获取数据函数
async getDataList(searchForm) {
let list = [];
let listTotal = 0;
let res = await stopToWindow({
page: this.current,
size: this.size,
...this.searchForm,
...searchForm,
});
if (res.code == 1) {
let { data, total } = res.data.data;
list = data;
listTotal = total;
}
return {
data: list,
total: listTotal,
};
},
// 翻页
changeTable(pagination) {
let { current } = pagination;
this.current = current;
this.stopToWindow();
},
// 勾选表格
onSelectChange(keys, rows) {
this.selectedRowKeys = keys;
const res = new Map();
this.excelData = [...this.excelData, ...rows]
.filter((v) => {
return !res.has(v.id) && res.set(v.id, 1);
})
.filter((v) => {
return this.selectedRowKeys.some((val) => v.id == val);
});
},
// 导出表格
async exportExcel() {
let obj = {
1: "窗口评价",
2: "自助服务终端",
3: "背靠背评价",
4: "微官网",
5: "好差评",
6: "一体化评价",
};
if (this.selectedRowKeys.length && this.excelData.length) {
// 深度克隆避免影响页面表格展示
let data = this.$_.cloneDeep(this.excelData);
data.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.pjxt == keys) {
item.pjxt = obj[keys];
}
});
});
export2Excel(
this.tHeader,
this.filterVal,
data,
"办理事项评价记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
this.dataSection(this.getDataList, {}, (data) => {
if (!data.length) {
this.$message.warning("暂无数据");
return;
}
data.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.pjxt == keys) {
item.pjxt = obj[keys];
}
});
});
export2Excel(
this.tHeader,
this.filterVal,
data,
"办理事项评价记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
});
}
},
// 数据切片
async dataSection(fn, searchForm, callback) {
let dataList = [];
let page = 1;
let size = 1000;
let execute = async () => {
let { data, total } = await fn({ page, size, ...searchForm });
dataList = [...dataList, ...data];
this.$app.progressFile.show = true;
this.$app.progressFile.percent = parseInt(
(dataList.length / total) * 100
);
if (dataList.length >= total || data.length == 0) {
if (callback) callback(dataList);
this.$app.progressFile.show = false;
this.$app.progressFile.percent = 1;
return;
}
setTimeout(() => {
page += 1;
execute();
});
};
execute();
},
// 详情
async checkInfo(id, alltime, createtime) {
let res = await stopInfo({
page: 1,
size: -1,
time: this.searchForm.time,
windowid: id,
});
if (res.code == 1) {
let { data } = res;
this.detailsInfo = data;
this.detailsVisible = true;
this.allTime = alltime;
this.createTime = createtime;
}
},
},
};
</script>
<style lang="less" scoped></style>
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