Commit b62e2f85 authored by “yiyousong”'s avatar “yiyousong”

pref:修改报表

parent 0b36eb6d
......@@ -2,7 +2,11 @@
<div class="callRecord-Container">
<div class="header_box">
<div>
<a-button type="success" @click="handleExportTable">
<a-button
:loading="btnLoading"
type="success"
@click="handleExportTable"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button>
<b
......@@ -34,13 +38,13 @@
<!-- </a-input-group> -->
<a-range-picker
format="YYYY年MM月DD日"
valueFormat="YYYY-MM-DD"
class="range_picker_style"
v-model="BegindAndEndTime"
@change="rangePickerChange"
>
</a-range-picker>
<a-button type="primary" @click="togetPrintList">搜索</a-button>
<a-button type="primary" @click="handleSearch">搜索</a-button>
<a-button @click="handleReset">重置</a-button>
</a-space>
</span>
......@@ -97,6 +101,7 @@ export default {
name: "fillForm",
data() {
return {
btnLoading: false,
tableHeaders: [
{
title: "序号",
......@@ -198,7 +203,7 @@ export default {
"matterName",
"matterFullName",
"materialName",
"materiaFullName",
"materialFullName",
"idName",
"idCard",
"mobile",
......@@ -219,73 +224,18 @@ export default {
},
},
methods: {
//导出
toexportTable() {
let tableData = [];
if (this.tableSelectedRows.length == 0) {
let pramse = {
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
siteId: this.siteId,
matterName: "%%",
materialName: "%%",
createTimeStart: this.BegindAndEndTime[0],
createTimeEnd: this.BegindAndEndTime[1],
};
if (this.statu && this.statu != 0) {
pramse.type = this.statu;
}
if (this.searchType == 1 && this.searchName) {
pramse.matterName = "%" + this.searchName + "%";
} else if (this.searchName) {
pramse.materialName = "%" + this.searchName + "%";
}
getPrintList(pramse).then((res) => {
const { code, data } = res;
if (code == 1) {
tableData = JSON.parse(JSON.stringify(data.data));
tableData.forEach((item) => {
item.type = item.type == 1 ? "本地打印" : "在线打印";
});
let tableColumns = JSON.parse(JSON.stringify(this.tableHeaders));
let newTableData = tableData.map((item) => {
let obj = {};
for (let key in item) {
obj[key] = item[key];
}
return obj;
});
let exprotExcelName = `${this.nowDay} / ${this.nowTime} / ${
this.$route["meta"]["title"] || "报表信息统计"
}`;
this.exportExcel(tableColumns, newTableData, exprotExcelName);
}
});
} else {
tableData = JSON.parse(JSON.stringify(this.tableSelectedRows));
tableData.forEach((item) => {
item.type = item.type == 1 ? "本地打印" : "在线打印";
});
let tableColumns = JSON.parse(JSON.stringify(this.tableHeaders));
let newTableData = tableData.map((item) => {
let obj = {};
for (let key in item) {
obj[key] = item[key];
}
return obj;
});
let exprotExcelName = `${this.nowDay} / ${this.nowTime} / ${
this.$route["meta"]["title"] || "报表信息统计"
}`;
this.exportExcel(tableColumns, newTableData, exprotExcelName);
}
},
changeStatu(val) {
this.statu = val;
},
changeSearchType(val) {
this.searchType = val;
},
handleSearch() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.togetPrintList();
},
togetPrintList() {
let pramse = {
page: this.tablePagination.current,
......@@ -312,12 +262,6 @@ export default {
}
});
},
rangePickerChange(val) {
this.BegindAndEndTime = [
this.$moment(val[0]).format("YYYY-MM-DD"),
this.$moment(val[1]).format("YYYY-MM-DD"),
];
},
// 重置
handleReset() {
this.BegindAndEndTime = [
......
......@@ -40,7 +40,7 @@
>
<a-icon slot="prefix" type="search" />
</a-input>
<a-button type="primary" @click="getDataList">搜索</a-button>
<a-button type="primary" @click="handleSearch">搜索</a-button>
<a-button @click="resetBtn">重置</a-button>
</a-space>
</span>
......@@ -336,6 +336,8 @@ export default {
},
//重置按钮
resetBtn() {
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.tablePagination.current = 1;
this.searchForm = {
id: "", // 排队机id
......@@ -352,6 +354,13 @@ export default {
this.deviceData = res.data.data;
});
},
// 搜索
handleSearch() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.getCallQueListArr();
},
// 获取列表数据
getCallQueListArr() {
getCallQueList({
......
......@@ -40,7 +40,7 @@
>
<a-icon slot="prefix" type="search" />
</a-input>
<a-button type="primary" @click="getDataList">搜索</a-button>
<a-button type="primary" @click="handleSearch">搜索</a-button>
<a-button @click="resetBtn">重置</a-button>
</a-space>
</span>
......@@ -338,6 +338,8 @@ export default {
//重置按钮
resetBtn() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.searchForm = {
id: "", // 排队机id
style: "", // 状态
......@@ -353,6 +355,13 @@ export default {
this.deviceData = res.data.data;
});
},
// 搜索
handleSearch() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.getQueueDataArr();
},
// 获取列表数据
getQueueDataArr() {
getQueueData({
......
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