Commit 1c7f67b3 authored by “yiyousong”'s avatar “yiyousong”

pref;修改填单、样表、排队、评价报表

parent 6bc36d84
...@@ -13,22 +13,16 @@ export default { ...@@ -13,22 +13,16 @@ export default {
showQuickJumper: true, //是否可以快速跳转至某页 showQuickJumper: true, //是否可以快速跳转至某页
showSizeChanger: true, //是否可以改变 pageSize showSizeChanger: true, //是否可以改变 pageSize
showTotal: (total, range) => `共${total}条`, showTotal: (total, range) => `共${total}条`,
pageSizeOptions: ["10", "20", "30"], pageSizeOptions: ["10", "20", "30", "40", "50", "100", "200"],
}, },
tableSourceData: [], tableSourceData: [],
tableSelectedRows: [], //选中的行数据 tableSelectedRows: [], //选中的行数据
tableSelectedKeys: [], //选中的id tableSelectedKeys: [], //选中的id
sourceInfoForm: {}, sourceInfoForm: {},
} };
},
computed: {
},
created() {
}, },
computed: {},
created() {},
beforeDestroy() { beforeDestroy() {
if (this.timer) { if (this.timer) {
clearInterval(this.timer); clearInterval(this.timer);
...@@ -37,20 +31,22 @@ export default { ...@@ -37,20 +31,22 @@ export default {
methods: { methods: {
//导出 //导出
exportTable(tHeader, filterVal, transformText) { exportTable(tHeader, filterVal, transformText) {
console.log(tHeader, filterVal) console.log(tHeader, filterVal);
let tableData = []; //列表数据 let tableData = []; //列表数据
if (this.tableSelectedRows.length == 0) { if (this.tableSelectedRows.length == 0) {
tableData = this.downAllData() tableData = this.downAllData();
} else { } else {
tableData = JSON.parse(JSON.stringify(this.tableSelectedRows)); tableData = JSON.parse(JSON.stringify(this.tableSelectedRows));
} }
// let tableColumns = JSON.parse(JSON.stringify(this.tableHeaders)); // let tableColumns = JSON.parse(JSON.stringify(this.tableHeaders));
console.log('表格数据', tableData) console.log("表格数据", tableData);
// console.log('表头内容', tableColumns) // console.log('表头内容', tableColumns)
// let newTableData = tableData.map(item => { // let newTableData = tableData.map(item => {
// // console.log(item) // // console.log(item)
// }) // })
let exprotExcelName = `${this.nowDay} / ${this.nowTime} / ${this.$route['meta']['title'] || '报表信息统计'}`; let exprotExcelName = `${this.nowDay} / ${this.nowTime} / ${
this.$route["meta"]["title"] || "报表信息统计"
}`;
this.exportExcel(tHeader, filterVal, tableData, exprotExcelName); this.exportExcel(tHeader, filterVal, tableData, exprotExcelName);
}, },
exportExcel(tHeader, filterVal, tableData, exprotExcelName) { exportExcel(tHeader, filterVal, tableData, exprotExcelName) {
...@@ -58,12 +54,13 @@ export default { ...@@ -58,12 +54,13 @@ export default {
// console.log(tableData); // console.log(tableData);
// console.log(exprotExcelName); // console.log(exprotExcelName);
let exportHeaderName = []; // ***即将导出的表头 let exportHeaderName = []; // ***即将导出的表头
let exportData = tableData.map((item, j) => { // ***即将导出的表格 let exportData = tableData.map((item, j) => {
// ***即将导出的表格
let obj = {}; let obj = {};
for (let i = 0; i < tableColumns.length; i++) { for (let i = 0; i < tableColumns.length; i++) {
for (let key in item) { for (let key in item) {
if (tableColumns[i]["dataIndex"] == key) { if (tableColumns[i]["dataIndex"] == key) {
console.log(tableColumns[i]["dataIndex"]) console.log(tableColumns[i]["dataIndex"]);
if (j == 0) { if (j == 0) {
exportHeaderName.push(tableColumns[i]["title"]); exportHeaderName.push(tableColumns[i]["title"]);
} }
...@@ -74,7 +71,7 @@ export default { ...@@ -74,7 +71,7 @@ export default {
} }
} }
return obj; return obj;
}) });
// console.log(exportData); // console.log(exportData);
// console.log(exportHeaderName); // console.log(exportHeaderName);
// 开始导出 **** // 开始导出 ****
...@@ -94,9 +91,9 @@ export default { ...@@ -94,9 +91,9 @@ export default {
setMoment() { setMoment() {
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.nowDay = this.$moment(new Date()).format("YYYY年MM月DD日"); this.nowDay = this.$moment(new Date()).format("YYYY年MM月DD日");
this.nowWeek = this.$moment().format('dddd'); this.nowWeek = this.$moment().format("dddd");
this.nowTime = this.$moment(new Date()).format("LTS"); this.nowTime = this.$moment(new Date()).format("LTS");
}, 1000) }, 1000);
}, },
onSelectChange(selectedRowKeys, selectedRows) { onSelectChange(selectedRowKeys, selectedRows) {
...@@ -107,10 +104,7 @@ export default { ...@@ -107,10 +104,7 @@ export default {
}, },
pagTableChange(pagination) { pagTableChange(pagination) {
this.tablePagination = pagination this.tablePagination = pagination;
}, },
}, },
} };
\ No newline at end of file
...@@ -21,15 +21,15 @@ ...@@ -21,15 +21,15 @@
.ant-modal-confirm { // .ant-modal-confirm {
.ant-modal { // .ant-modal {
top: 328px !important; // top: 328px !important;
// position: absolute !important; // position: absolute !important;
// left: 50% !important; // left: 50% !important;
// top: 50% !important; // top: 50% !important;
// transform: translate(-50%, -50%) !important; // transform: translate(-50%, -50%) !important;
} // }
} // }
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 7px; width: 7px;
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
<a-select <a-select
v-model="evaChoose" v-model="evaChoose"
placeholder="全部评价" placeholder="全部评价"
@change="changeEvaChoose"
mode="multiple" mode="multiple"
style="max-width: 140px" style="max-width: 140px"
> >
...@@ -34,7 +33,6 @@ ...@@ -34,7 +33,6 @@
<a-select <a-select
v-model="evaFrom" v-model="evaFrom"
placeholder="全部来源" placeholder="全部来源"
@change="changeEvaFrom"
mode="multiple" mode="multiple"
style="max-width: 160px" style="max-width: 160px"
> >
...@@ -59,11 +57,12 @@ ...@@ -59,11 +57,12 @@
style="width: 280px" style="width: 280px"
v-model="searchName" v-model="searchName"
placeholder="请输入评价人姓名或部门名称搜索" placeholder="请输入评价人姓名或部门名称搜索"
@pressEnter="handleSearch"
> >
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<a-button type="primary" @click="togetevalist()">搜索</a-button> <a-button type="primary" @click="handleSearch">搜索</a-button>
<a-button @click="clearnAllChoose()">重置</a-button> <a-button @click="clearnAllChoose">重置</a-button>
</a-space> </a-space>
</span> </span>
</div> </div>
...@@ -78,7 +77,7 @@ ...@@ -78,7 +77,7 @@
}" }"
:scroll="{ y: 590 }" :scroll="{ y: 590 }"
:pagination="tablePagination" :pagination="tablePagination"
@change="pagTableChange" @change="changeTablePage"
:loading="tableLoading" :loading="tableLoading"
:columns="tableHeaders" :columns="tableHeaders"
:dataSource="tableSourceData" :dataSource="tableSourceData"
...@@ -99,16 +98,18 @@ ...@@ -99,16 +98,18 @@
/> />
</template> </template>
<template slot="操作" slot-scope="text, record"> <template slot="操作" slot-scope="text, record">
<a-button type="link" style="color: #ff7370">删除</a-button> <a-button
type="link"
style="color: #ff7370"
@click="handleDel(record.id)"
>删除</a-button
>
<a-button type="link" @click="openHandlingDetails(record)" <a-button type="link" @click="openHandlingDetails(record)"
>详情</a-button >详情</a-button
> >
</template> </template>
</a-table> </a-table>
<HandlingDetails ref="HandlingDetails" /> <HandlingDetails ref="HandlingDetails" />
<a-modal v-model="visible" title="系统提示" @ok="togetEvaDetil()">
{{ content }}
</a-modal>
</div> </div>
</div> </div>
</template> </template>
...@@ -137,7 +138,10 @@ export default { ...@@ -137,7 +138,10 @@ export default {
width: "60px", width: "60px",
key: "index", key: "index",
align: "center", align: "center",
customRender: (text, record, index) => `${index + 1}`, customRender: (text, record, index) =>
(this.tablePagination.current - 1) * this.tablePagination.pageSize +
index +
1,
}, },
{ {
title: "部门名称", title: "部门名称",
...@@ -246,9 +250,7 @@ export default { ...@@ -246,9 +250,7 @@ export default {
evaChoose: [], //评价选项 evaChoose: [], //评价选项
evaFrom: [], // 评价来源 evaFrom: [], // 评价来源
evaDates: [], // 评价日期 evaDates: [], // 评价日期
content: "此操作将删除该评价信息,是否继续?", baseurl: process.env.VUE_APP_API_PHP_URL,
delId: null, //当前删除id
baseurl: "",
optonList: [], optonList: [],
tableSelectedKeys: [], tableSelectedKeys: [],
tableSelectedRows: [], tableSelectedRows: [],
...@@ -279,24 +281,18 @@ export default { ...@@ -279,24 +281,18 @@ export default {
components: { components: {
HandlingDetails, HandlingDetails,
}, },
mounted() { created() {
this.setMoment();
// // 设置默认时间为今天
// this.evaDates = [
// this.$moment(new Date()).format("YYYY-MM-DD"),
// this.$moment(new Date()).format("YYYY-MM-DD"),
// ];
this.togetevalist(); this.togetevalist();
},
mounted() {
getOptonList().then((res) => { getOptonList().then((res) => {
console.log(res);
if (res.code == 1) { if (res.code == 1) {
this.optonList = res.data; this.optonList = res.data;
} }
}); });
}, },
methods: { methods: {
// 重置
clearnAllChoose() { clearnAllChoose() {
this.evaChoose = []; this.evaChoose = [];
this.evaFrom = []; this.evaFrom = [];
...@@ -317,32 +313,17 @@ export default { ...@@ -317,32 +313,17 @@ export default {
this.tableSelectedRows = []; this.tableSelectedRows = [];
this.togetevalist(); this.togetevalist();
}, },
// 批量删除
delTable() { delTable() {
// console.log(this.tableSelectedRows);
this.visible = true; this.visible = true;
if (!this.tableSelectedRows.length) { if (!this.tableSelectedRows.length) {
this.content = "一条评论都没有选中"; this.$message.warning("请先勾选数据");
} else { return;
this.content = "此操作将删除这些评价信息,是否继续?";
let arr = [];
this.tableSelectedRows.forEach((item) => {
arr.push(item.id);
});
this.delId = arr;
} }
let ids = this.tableSelectedRows.map((v) => v.id).join(",");
this.handleDel(ids);
}, },
togetEvaDetil() { // 办理明细
getEvaDetil({
id: this.delId,
}).then((res) => {
{
this.delId = null;
this.visible = false;
// 要刷新页面
this.togetevalist();
}
});
},
togetQueEvaData(record) { togetQueEvaData(record) {
getQueEvaData({ getQueEvaData({
id: record.id, id: record.id,
...@@ -353,6 +334,7 @@ export default { ...@@ -353,6 +334,7 @@ export default {
} }
}); });
}, },
// 评价详情
togetEvaData(id) { togetEvaData(id) {
getEvaData({ getEvaData({
id: id, id: id,
...@@ -364,71 +346,46 @@ export default { ...@@ -364,71 +346,46 @@ export default {
} }
}); });
}, },
togetevalist() { // 获取数据列表
async togetevalist(search = {}) {
// 拼接评价选项 // 拼接评价选项
let chooseStr = this.evaChoose.join(","); let option_id = this.evaChoose.join(",");
// 要先拼接评价来源 // 要先拼接评价来源
let fromString = this.evaFrom.join(","); let pjxt = this.evaFrom.join(",");
getEvaList({ let res = await getEvaList({
page: this.tablePagination.current, page: this.tablePagination.current,
size: this.tablePagination.pageSize, size: this.tablePagination.pageSize,
type: "bmpj", type: "bmpj",
option_id: chooseStr, option_id,
pjxt: fromString, //传0代表全部 pjxt,
time: this.BegindAndEndTime, time: this.BegindAndEndTime,
info: this.searchName, info: this.searchName,
}).then((res) => { ...search,
console.log(11111, res);
const { code, data } = res;
if (code == 1) {
this.tableSourceData = data.data.data;
this.evaCount = data.count;
this.tablePagination.total = data.count;
}
}); });
}, if (res.code == 1) {
changeEvaFrom(val) { let { data, total } = res.data.data;
if (val.length) { if (!data.length && this.tablePagination.current > 1) {
this.evaFrom = val; this.tablePagination.current -= 1;
} else { this.togetevalist();
this.evaFrom = [0];
} }
}, this.tableSourceData = data;
changeEvaChoose(val) { this.evaCount = total;
this.evaChoose = val; this.tablePagination.total = total;
}, return data;
QueueState(type) {
switch (type) {
case 0:
return "type1";
case 1:
return "type2";
default:
return "type0";
} }
}, },
// 分页
changeTablePage(page) {
this.pagTableChange(page);
this.togetevalist();
},
//详情模块 //详情模块
openHandlingDetails(record) { openHandlingDetails(record) {
// 判断为窗口屏或者其他状况,调用不同接口
// if(record.pjxt==1){
// this.$refs.HandlingDetails.modalInfo.title = "办理明细";
// this.$refs.HandlingDetails.modalInfo.show = 1;
// this.togetQueEvaData(record)
// }else{
this.$refs.HandlingDetails.modalInfo.title = "评价详情"; this.$refs.HandlingDetails.modalInfo.title = "评价详情";
this.$refs.HandlingDetails.modalInfo.show = 2; this.$refs.HandlingDetails.modalInfo.show = 2;
this.togetEvaData(record.id); this.togetEvaData(record.id);
// }
this.$refs.HandlingDetails.modalInfo.visible = true; this.$refs.HandlingDetails.modalInfo.visible = true;
}, },
//删除模态框
showModal(record) {
this.visible = true;
this.delId = record.id;
},
// 选择数据 // 选择数据
onSelectChange(keys, rows) { onSelectChange(keys, rows) {
this.tableSelectedKeys = keys; this.tableSelectedKeys = keys;
...@@ -467,23 +424,12 @@ export default { ...@@ -467,23 +424,12 @@ export default {
"办事部门评价记录报表" + this.$moment().format("YYYYMMDDHHmmss") "办事部门评价记录报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
} else { } else {
// 拼接评价选项 let data = await this.togetevalist({
let chooseStr = this.evaChoose.join(","); page: 1,
// 要先拼接评价来源
let fromString = this.evaFrom.join(",");
getEvaList({
page: this.tablePagination.current,
size: -1, size: -1,
type: "bmpj", });
option_id: chooseStr, if (!data.length) return;
pjxt: fromString, //传0代表全部 for (let item of data) {
time: this.BegindAndEndTime,
info: this.searchName,
}).then((res) => {
const { code, data } = res;
if (code == 1) {
if (!data.data.data.length) return;
for (let item of data.data.data) {
Object.keys(obj).forEach((key) => { Object.keys(obj).forEach((key) => {
if (item.pjxt == key) { if (item.pjxt == key) {
item.pjxt = obj[key]; item.pjxt = obj[key];
...@@ -493,22 +439,36 @@ export default { ...@@ -493,22 +439,36 @@ export default {
export2Excel( export2Excel(
this.tHeader, this.tHeader,
this.filterVal, this.filterVal,
data.data.data, data,
"办事部门评价记录报表" + this.$moment().format("YYYYMMDDHHmmss") "办事部门评价记录报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
} }
});
}
this.btnLoading = false; this.btnLoading = false;
}, },
// 删除
handleDel(id) {
let _this = this;
this.$confirm({
title: "系统提示",
content: "删除不可恢复,确定要删除吗?",
okText: "确定",
okType: "danger",
cancelText: "取消",
centered: true,
icon: "exclamation-circle",
maskClosable: true,
async onOk() {
let res = await getEvaDetil({
id,
});
let { code, msg } = res;
if (code == 1) {
_this.$message.success(msg);
_this.togetevalist();
}
}, },
watch: { });
tablePagination() {
this.togetevalist();
},
}, },
created() {
this.baseurl = process.env.VUE_APP_API_PHP_URL;
}, },
}; };
</script> </script>
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
<a-select <a-select
v-model="evaChoose" v-model="evaChoose"
placeholder="全部评价" placeholder="全部评价"
@change="changeEvaChoose"
mode="multiple" mode="multiple"
style="max-width: 140px" style="max-width: 140px"
> >
...@@ -34,7 +33,6 @@ ...@@ -34,7 +33,6 @@
<a-select <a-select
v-model="evaFrom" v-model="evaFrom"
placeholder="全部来源" placeholder="全部来源"
@change="changeEvaFrom"
mode="multiple" mode="multiple"
style="max-width: 160px" style="max-width: 160px"
> >
...@@ -59,11 +57,12 @@ ...@@ -59,11 +57,12 @@
style="width: 280px" style="width: 280px"
v-model="searchName" v-model="searchName"
placeholder="请输入评价人姓名或排号编号搜索" placeholder="请输入评价人姓名或排号编号搜索"
@pressEnter="handleSearch"
> >
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<a-button type="primary" @click="togetevalist()">搜索</a-button> <a-button type="primary" @click="handleSearch">搜索</a-button>
<a-button @click="clearnAllChoose()">重置</a-button> <a-button @click="clearnAllChoose">重置</a-button>
</a-space> </a-space>
</span> </span>
</div> </div>
...@@ -78,7 +77,7 @@ ...@@ -78,7 +77,7 @@
}" }"
:scroll="{ y: 590 }" :scroll="{ y: 590 }"
:pagination="tablePagination" :pagination="tablePagination"
@change="pagTableChange" @change="changeTablePage"
:loading="tableLoading" :loading="tableLoading"
:columns="tableHeaders" :columns="tableHeaders"
:dataSource="tableSourceData" :dataSource="tableSourceData"
...@@ -102,7 +101,7 @@ ...@@ -102,7 +101,7 @@
<a-button <a-button
type="link" type="link"
style="color: #ff7370" style="color: #ff7370"
@click="showModal(record)" @click="handleDel(record.id)"
>删除</a-button >删除</a-button
> >
<a-button type="link" @click="openHandlingDetails(record)" <a-button type="link" @click="openHandlingDetails(record)"
...@@ -111,9 +110,6 @@ ...@@ -111,9 +110,6 @@
</template> </template>
</a-table> </a-table>
<HandlingDetails ref="HandlingDetails" /> <HandlingDetails ref="HandlingDetails" />
<a-modal v-model="visible" title="系统提示" @ok="togetEvaDetil()">
{{ content }}
</a-modal>
</div> </div>
</div> </div>
</template> </template>
...@@ -142,7 +138,10 @@ export default { ...@@ -142,7 +138,10 @@ export default {
width: "60px", width: "60px",
key: "index", key: "index",
align: "center", align: "center",
customRender: (text, record, index) => `${index + 1}`, customRender: (text, record, index) =>
(this.tablePagination.current - 1) * this.tablePagination.pageSize +
index +
1,
}, },
{ {
title: "排队编号", title: "排队编号",
...@@ -251,9 +250,7 @@ export default { ...@@ -251,9 +250,7 @@ export default {
evaChoose: [], //评价选项 evaChoose: [], //评价选项
evaFrom: [], // 评价来源 evaFrom: [], // 评价来源
evaDates: [], // 评价日期 evaDates: [], // 评价日期
content: "此操作将删除该评价信息,是否继续?", baseurl: process.env.VUE_APP_API_PHP_URL,
delId: null, //当前删除id
baseurl: "",
optonList: [], optonList: [],
tableSelectedKeys: [], tableSelectedKeys: [],
tableSelectedRows: [], tableSelectedRows: [],
...@@ -284,24 +281,13 @@ export default { ...@@ -284,24 +281,13 @@ export default {
components: { components: {
HandlingDetails, HandlingDetails,
}, },
mounted() { created() {
this.setMoment();
// 设置默认时间为今天
// this.evaDates = [
// this.$moment(new Date()).format("YYYY-MM-DD"),
// this.$moment(new Date()).format("YYYY-MM-DD"),
// ];
this.togetevalist(); this.togetevalist();
this.getOptonList();
getOptonList().then((res) => {
console.log(res);
if (res.code == 1) {
this.optonList = res.data;
}
});
}, },
methods: { methods: {
// 重置
clearnAllChoose() { clearnAllChoose() {
this.evaChoose = []; this.evaChoose = [];
this.evaFrom = []; this.evaFrom = [];
...@@ -315,32 +301,31 @@ export default { ...@@ -315,32 +301,31 @@ export default {
]; ];
this.togetevalist(); this.togetevalist();
}, },
// 搜索
handleSearch() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.togetevalist();
},
// 获取评价选项
async getOptonList() {
let res = await getOptonList();
if (res.code == 1) {
this.optonList = res.data;
}
},
// 批量删除
delTable() { delTable() {
this.visible = true; this.visible = true;
if (!this.tableSelectedRows.length) { if (!this.tableSelectedRows.length) {
this.content = "一条评论都没有选中"; this.$message.warning("请先勾选数据");
} else { return;
this.content = "此操作将删除这些评价信息,是否继续?";
let arr = [];
this.tableSelectedRows.forEach((item) => {
arr.push(item.id);
});
this.delId = arr;
}
},
togetEvaDetil() {
getEvaDetil({
id: this.delId,
}).then((res) => {
{
this.delId = null;
this.visible = false;
// 要刷新页面
this.togetevalist();
} }
}); let ids = this.tableSelectedRows.map((v) => v.id).join(",");
this.handleDel(ids);
}, },
// 办理明细
togetQueEvaData(record) { togetQueEvaData(record) {
getQueEvaData({ getQueEvaData({
id: record.id, id: record.id,
...@@ -352,87 +337,58 @@ export default { ...@@ -352,87 +337,58 @@ export default {
} }
}); });
}, },
// 评价详情
togetEvaData(id) { togetEvaData(id) {
getEvaData({ getEvaData({
id: id, id: id,
}).then((res) => { }).then((res) => {
console.log(res);
const { code, data } = res; const { code, data } = res;
if (code == 1) { if (code == 1) {
this.$refs.HandlingDetails.queEvaData = data; this.$refs.HandlingDetails.queEvaData = data;
} }
}); });
}, },
togetevalist() { // 获取评价列表
async togetevalist(search = {}) {
// 拼接评价选项 // 拼接评价选项
let chooseStr = this.evaChoose.join(","); let option_id = this.evaChoose.join(",");
// 要先拼接评价来源 // 要先拼接评价来源
let fromString = this.evaFrom.join(","); let pjxt = this.evaFrom.join(",");
getEvaList({ let res = await getEvaList({
page: this.tablePagination.current, page: this.tablePagination.current,
size: this.tablePagination.pageSize, size: this.tablePagination.pageSize,
type: "phpj", type: "phpj",
option_id: chooseStr, option_id,
pjxt: fromString, //传0代表全部 pjxt,
time: this.evaDates, time: this.BegindAndEndTime,
info: this.searchName, info: this.searchName,
}).then((res) => { ...search,
const { code, data } = res;
if (code == 1) {
this.tableSourceData = data.data.data;
this.evaCount = data.count;
this.tablePagination.total = data.count;
}
}); });
}, if (res.code == 1) {
changeEvaFrom(val) { let { data, total } = res.data.data;
if (val.length) { if (!data.length && this.tablePagination.current > 1) {
this.evaFrom = val; this.tablePagination.current -= 1;
} else { this.togetevalist();
this.evaFrom = [0]; }
this.tableSourceData = data;
this.evaCount = total;
this.tablePagination.total = total;
return data;
} }
}, },
changeEvaChoose(val) { // 分页
this.evaChoose = val; changeTablePage(page) {
this.pagTableChange(page);
this.togetevalist();
}, },
// rangePickerChange(val) {
// this.evaDates = [
// this.$moment(val[0]).format("YYYY-MM-DD"),
// this.$moment(val[1]).format("YYYY-MM-DD"),
// ];
// },
QueueState(type) {
switch (type) {
case 0:
return "type1";
case 1:
return "type2";
default:
return "type0";
}
},
//详情模块 //详情模块
openHandlingDetails(record) { openHandlingDetails(record) {
// 判断为窗口屏或者其他状况,调用不同接口
// if(record.pjxt==1){
this.$refs.HandlingDetails.modalInfo.title = "办理明细"; this.$refs.HandlingDetails.modalInfo.title = "办理明细";
this.$refs.HandlingDetails.modalInfo.show = 1; this.$refs.HandlingDetails.modalInfo.show = 1;
this.togetQueEvaData(record); this.togetQueEvaData(record);
// }else{
// this.$refs.HandlingDetails.modalInfo.title = "评价详情";
// this.$refs.HandlingDetails.modalInfo.show = 2;
// this.togetEvaData(record.id)
// }
this.$refs.HandlingDetails.modalInfo.visible = true; this.$refs.HandlingDetails.modalInfo.visible = true;
}, },
//删除模态框
showModal(record) {
this.visible = true;
this.delId = record.id;
},
// 选择数据 // 选择数据
onSelectChange(keys, rows) { onSelectChange(keys, rows) {
this.tableSelectedKeys = keys; this.tableSelectedKeys = keys;
...@@ -471,23 +427,12 @@ export default { ...@@ -471,23 +427,12 @@ export default {
"办理事项评价记录报表" + this.$moment().format("YYYYMMDDHHmmss") "办理事项评价记录报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
} else { } else {
// 拼接评价选项 let data = await this.togetevalist({
let chooseStr = this.evaChoose.join(","); page: 1,
// 要先拼接评价来源
let fromString = this.evaFrom.join(",");
getEvaList({
page: this.tablePagination.current,
size: -1, size: -1,
type: "phpj", });
option_id: chooseStr, if (!data.length) return;
pjxt: fromString, //传0代表全部 for (let item of data) {
time: this.BegindAndEndTime,
info: this.searchName,
}).then((res) => {
const { code, data } = res;
if (code == 1) {
if (!data.data.data.length) return;
for (let item of data.data.data) {
Object.keys(obj).forEach((key) => { Object.keys(obj).forEach((key) => {
if (item.pjxt == key) { if (item.pjxt == key) {
item.pjxt = obj[key]; item.pjxt = obj[key];
...@@ -497,22 +442,36 @@ export default { ...@@ -497,22 +442,36 @@ export default {
export2Excel( export2Excel(
this.tHeader, this.tHeader,
this.filterVal, this.filterVal,
data.data.data, data,
"办理事项评价记录报表" + this.$moment().format("YYYYMMDDHHmmss") "办理事项评价记录报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
} }
});
}
this.btnLoading = false; this.btnLoading = false;
}, },
// 删除
handleDel(id) {
let _this = this;
this.$confirm({
title: "系统提示",
content: "删除不可恢复,确定要删除吗?",
okText: "确定",
okType: "danger",
cancelText: "取消",
centered: true,
icon: "exclamation-circle",
maskClosable: true,
async onOk() {
let res = await getEvaDetil({
id,
});
let { code, msg } = res;
if (code == 1) {
_this.$message.success(msg);
_this.togetevalist();
}
}, },
watch: { });
tablePagination() {
this.togetevalist();
},
}, },
created() {
this.baseurl = process.env.VUE_APP_API_PHP_URL;
}, },
}; };
</script> </script>
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
<a-select <a-select
v-model="evaChoose" v-model="evaChoose"
placeholder="全部评价" placeholder="全部评价"
@change="changeEvaChoose"
mode="multiple" mode="multiple"
style="max-width: 140px" style="max-width: 140px"
> >
...@@ -34,7 +33,6 @@ ...@@ -34,7 +33,6 @@
<a-select <a-select
v-model="evaFrom" v-model="evaFrom"
placeholder="全部来源" placeholder="全部来源"
@change="changeEvaFrom"
mode="multiple" mode="multiple"
style="max-width: 160px" style="max-width: 160px"
> >
...@@ -59,6 +57,7 @@ ...@@ -59,6 +57,7 @@
style="width: 280px" style="width: 280px"
v-model="searchName" v-model="searchName"
placeholder="请输入评价人姓名或窗口编号搜索" placeholder="请输入评价人姓名或窗口编号搜索"
@pressEnter="handleSearch"
> >
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
...@@ -78,7 +77,7 @@ ...@@ -78,7 +77,7 @@
}" }"
:scroll="{ y: 590 }" :scroll="{ y: 590 }"
:pagination="tablePagination" :pagination="tablePagination"
@change="pagTableChange" @change="changeTablePage"
:loading="tableLoading" :loading="tableLoading"
:columns="tableHeaders" :columns="tableHeaders"
:dataSource="tableSourceData" :dataSource="tableSourceData"
...@@ -93,8 +92,6 @@ ...@@ -93,8 +92,6 @@
<img <img
v-else v-else
:src="baseurl + '/' + text" :src="baseurl + '/' + text"
alt=""
srcset=""
style="max-width: 100px; max-height: 100px" style="max-width: 100px; max-height: 100px"
/> />
</template> </template>
...@@ -102,7 +99,7 @@ ...@@ -102,7 +99,7 @@
<a-button <a-button
type="link" type="link"
style="color: #ff7370" style="color: #ff7370"
@click="showModal(record)" @click="handleDel(record.id)"
>删除</a-button >删除</a-button
> >
<a-button type="link" @click="openHandlingDetails(record)" <a-button type="link" @click="openHandlingDetails(record)"
...@@ -111,9 +108,6 @@ ...@@ -111,9 +108,6 @@
</template> </template>
</a-table> </a-table>
<HandlingDetails ref="HandlingDetails" /> <HandlingDetails ref="HandlingDetails" />
<a-modal v-model="visible" title="系统提示" @ok="togetEvaDetil()">
{{ content }}
</a-modal>
</div> </div>
</div> </div>
</template> </template>
...@@ -142,7 +136,10 @@ export default { ...@@ -142,7 +136,10 @@ export default {
width: "60px", width: "60px",
key: "index", key: "index",
align: "center", align: "center",
customRender: (text, record, index) => `${index + 1}`, customRender: (text, record, index) =>
(this.tablePagination.current - 1) * this.tablePagination.pageSize +
index +
1,
}, },
{ {
title: "窗口编号", title: "窗口编号",
...@@ -233,7 +230,6 @@ export default { ...@@ -233,7 +230,6 @@ export default {
{ {
title: "操作", title: "操作",
align: "center", align: "center",
dataIndex: "操作",
scopedSlots: { scopedSlots: {
customRender: "操作", customRender: "操作",
}, },
...@@ -251,9 +247,7 @@ export default { ...@@ -251,9 +247,7 @@ export default {
evaChoose: [], //评价选项 evaChoose: [], //评价选项
evaFrom: [], // 评价来源 evaFrom: [], // 评价来源
evaDates: [], // 评价日期 evaDates: [], // 评价日期
content: "此操作将删除该评价信息,是否继续?", baseurl: process.env.VUE_APP_API_PHP_URL,
delId: null, //当前删除id
baseurl: "",
optonList: [], optonList: [],
tableSelectedKeys: [], tableSelectedKeys: [],
tableSelectedRows: [], tableSelectedRows: [],
...@@ -284,23 +278,13 @@ export default { ...@@ -284,23 +278,13 @@ export default {
components: { components: {
HandlingDetails, HandlingDetails,
}, },
mounted() {
this.setMoment();
// 设置默认时间为今天
// this.evaDates = [
// this.$moment(new Date()).format("YYYY-MM-DD"),
// this.$moment(new Date()).format("YYYY-MM-DD"),
// ];
created() {
this.getOptonList();
this.togetevalist(); this.togetevalist();
getOptonList().then((res) => {
if (res.code == 1) {
this.optonList = res.data;
}
});
}, },
methods: { methods: {
// 重置
clearnAllChoose() { clearnAllChoose() {
this.evaChoose = []; this.evaChoose = [];
this.evaFrom = []; this.evaFrom = [];
...@@ -321,31 +305,17 @@ export default { ...@@ -321,31 +305,17 @@ export default {
this.tableSelectedRows = []; this.tableSelectedRows = [];
this.togetevalist(); this.togetevalist();
}, },
// 批量删除
delTable() { delTable() {
this.visible = true; this.visible = true;
if (!this.tableSelectedRows.length) { if (!this.tableSelectedRows.length) {
this.content = "一条评论都没有选中"; this.$message.warning("请先勾选数据");
} else { return;
this.content = "此操作将删除这些评价信息,是否继续?";
let arr = [];
this.tableSelectedRows.forEach((item) => {
arr.push(item.id);
});
this.delId = arr;
} }
let ids = this.tableSelectedRows.map((v) => v.id).join(",");
this.handleDel(ids);
}, },
togetEvaDetil() { // 办理明细
getEvaDetil({
id: this.delId,
}).then((res) => {
{
this.delId = null;
this.visible = false;
// 要刷新页面
this.togetevalist();
}
});
},
togetQueEvaData(record) { togetQueEvaData(record) {
getQueEvaData({ getQueEvaData({
id: record.id, id: record.id,
...@@ -356,6 +326,12 @@ export default { ...@@ -356,6 +326,12 @@ export default {
} }
}); });
}, },
// 分页
changeTablePage(page) {
this.pagTableChange(page);
this.togetevalist();
},
// 评价详情
togetEvaData(id) { togetEvaData(id) {
getEvaData({ getEvaData({
id: id, id: id,
...@@ -366,48 +342,39 @@ export default { ...@@ -366,48 +342,39 @@ export default {
} }
}); });
}, },
togetevalist() { // 获取评价选项
async getOptonList() {
let res = await getOptonList();
if (res.code == 1) {
this.optonList = res.data;
}
},
// 获取评价列表
async togetevalist(search = {}) {
// 拼接评价选项 // 拼接评价选项
let chooseStr = this.evaChoose.join(","); let option_id = this.evaChoose.join(",");
// 要先拼接评价来源 // 要先拼接评价来源
let fromString = this.evaFrom.join(","); let pjxt = this.evaFrom.join(",");
getEvaList({ let res = await getEvaList({
page: this.tablePagination.current, page: this.tablePagination.current,
size: this.tablePagination.pageSize, size: this.tablePagination.pageSize,
type: "ckpj", type: "ckpj",
option_id: chooseStr, option_id,
pjxt: fromString, //传0代表全部 pjxt,
time: this.BegindAndEndTime, time: this.BegindAndEndTime,
info: this.searchName, info: this.searchName,
}).then((res) => { ...search,
const { code, data } = res;
if (code == 1) {
this.tableSourceData = data.data.data;
this.evaCount = data.count;
this.tablePagination.total = data.count;
}
}); });
}, if (res.code == 1) {
changeEvaFrom(val) { let { data, total } = res.data.data;
if (val.length) { if (!data.length && this.tablePagination.current > 1) {
this.evaFrom = val; this.tablePagination.current -= 1;
} else { this.togetevalist();
this.evaFrom = [0];
} }
}, this.tableSourceData = data;
changeEvaChoose(val) { this.evaCount = total;
this.evaChoose = val; this.tablePagination.total = total;
}, return data;
QueueState(type) {
switch (type) {
case 0:
return "type1";
case 1:
return "type2";
default:
return "type0";
} }
}, },
//详情模块 //详情模块
...@@ -425,11 +392,6 @@ export default { ...@@ -425,11 +392,6 @@ export default {
this.$refs.HandlingDetails.modalInfo.visible = true; this.$refs.HandlingDetails.modalInfo.visible = true;
}, },
//删除模态框
showModal(record) {
this.visible = true;
this.delId = record.id;
},
// 选择数据 // 选择数据
onSelectChange(keys, rows) { onSelectChange(keys, rows) {
this.tableSelectedKeys = keys; this.tableSelectedKeys = keys;
...@@ -468,23 +430,12 @@ export default { ...@@ -468,23 +430,12 @@ export default {
"窗口服务评价记录报表" + this.$moment().format("YYYYMMDDHHmmss") "窗口服务评价记录报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
} else { } else {
// 拼接评价选项 let data = await this.togetevalist({
let chooseStr = this.evaChoose.join(","); page: 1,
// 要先拼接评价来源
let fromString = this.evaFrom.join(",");
getEvaList({
page: this.tablePagination.current,
size: -1, size: -1,
type: "ckpj", });
option_id: chooseStr, if (!data.length) return;
pjxt: fromString, //传0代表全部 for (let item of data) {
time: this.BegindAndEndTime,
info: this.searchName,
}).then((res) => {
const { code, data } = res;
if (code == 1) {
if (!data.data.data.length) return;
for (let item of data.data.data) {
Object.keys(obj).forEach((key) => { Object.keys(obj).forEach((key) => {
if (item.pjxt == key) { if (item.pjxt == key) {
item.pjxt = obj[key]; item.pjxt = obj[key];
...@@ -494,22 +445,36 @@ export default { ...@@ -494,22 +445,36 @@ export default {
export2Excel( export2Excel(
this.tHeader, this.tHeader,
this.filterVal, this.filterVal,
data.data.data, data,
"窗口服务评价记录报表" + this.$moment().format("YYYYMMDDHHmmss") "窗口服务评价记录报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
} }
});
}
this.btnLoading = false; this.btnLoading = false;
}, },
// 删除
handleDel(id) {
let _this = this;
this.$confirm({
title: "系统提示",
content: "删除不可恢复,确定要删除吗?",
okText: "确定",
okType: "danger",
cancelText: "取消",
centered: true,
icon: "exclamation-circle",
maskClosable: true,
async onOk() {
let res = await getEvaDetil({
id,
});
let { code, msg } = res;
if (code == 1) {
_this.$message.success(msg);
_this.togetevalist();
}
}, },
watch: { });
tablePagination() {
this.togetevalist();
},
}, },
created() {
this.baseurl = process.env.VUE_APP_API_PHP_URL;
}, },
}; };
</script> </script>
......
...@@ -13,7 +13,9 @@ ...@@ -13,7 +13,9 @@
>填单次数:<i>{{ tablePagination.total }}</i></b >填单次数:<i>{{ tablePagination.total }}</i></b
> >
<sub <sub
>统计时间段:{{ BegindAndEndTime[0] }}~{{ BegindAndEndTime[1] }}</sub >统计时间段:{{ searchForm.BegindAndEndTime[0] }}~{{
searchForm.BegindAndEndTime[1]
}}</sub
> >
</div> </div>
<span> <span>
...@@ -22,17 +24,21 @@ ...@@ -22,17 +24,21 @@
<a-select <a-select
:default-value="1" :default-value="1"
style="width: 25%" style="width: 25%"
@change="changeSearchType" v-model="searchForm.type"
> >
<a-select-option :value="1"> 按事项 </a-select-option> <a-select-option :value="1"> 按事项 </a-select-option>
<a-select-option :value="2"> 按材料 </a-select-option> <a-select-option :value="2"> 按材料 </a-select-option>
</a-select> </a-select>
<a-select placeholder="全部状态" @change="changeStatu"> <a-select placeholder="全部状态" v-model="searchForm.status">
<a-select-option :value="0"> 全部类型 </a-select-option> <a-select-option value=""> 全部类型 </a-select-option>
<a-select-option :value="1"> 本地打印 </a-select-option> <a-select-option :value="1"> 本地打印 </a-select-option>
<a-select-option :value="2"> 在线提交 </a-select-option> <a-select-option :value="2"> 在线提交 </a-select-option>
</a-select> </a-select>
<a-input v-model="searchName" placeholder="请输入名称搜索"> <a-input
v-model="searchForm.searchName"
@pressEnter="handleSearch"
placeholder="请输入名称搜索"
>
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<!-- </a-input-group> --> <!-- </a-input-group> -->
...@@ -40,7 +46,7 @@ ...@@ -40,7 +46,7 @@
format="YYYY-MM-DD" format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD" valueFormat="YYYY-MM-DD"
class="range_picker_style" class="range_picker_style"
v-model="BegindAndEndTime" v-model="searchForm.BegindAndEndTime"
> >
</a-range-picker> </a-range-picker>
...@@ -60,7 +66,7 @@ ...@@ -60,7 +66,7 @@
}" }"
:scroll="{ y: 590 }" :scroll="{ y: 590 }"
:pagination="tablePagination" :pagination="tablePagination"
@change="pagTableChange" @change="changeTablePage"
:loading="tableLoading" :loading="tableLoading"
:columns="tableHeaders" :columns="tableHeaders"
:dataSource="tableSourceData" :dataSource="tableSourceData"
...@@ -113,8 +119,8 @@ export default { ...@@ -113,8 +119,8 @@ export default {
}, },
{ {
title: "事项名称", title: "事项名称",
align: "center",
dataIndex: "事项名称", dataIndex: "事项名称",
ellipsis: true,
width: 300, width: 300,
scopedSlots: { scopedSlots: {
customRender: "事项名称", customRender: "事项名称",
...@@ -122,7 +128,7 @@ export default { ...@@ -122,7 +128,7 @@ export default {
}, },
{ {
title: "材料名称", title: "材料名称",
align: "center", ellipsis: true,
dataIndex: "materialName", dataIndex: "materialName",
width: 300, width: 300,
scopedSlots: { scopedSlots: {
...@@ -161,7 +167,7 @@ export default { ...@@ -161,7 +167,7 @@ export default {
title: "结果类型", title: "结果类型",
align: "center", align: "center",
customRender: (text, record, index) => { customRender: (text, record, index) => {
return text == 1 ? "本地打印" : "在线提交"; return text.type == 1 ? "本地打印" : "在线提交";
}, },
}, },
{ {
...@@ -175,14 +181,18 @@ export default { ...@@ -175,14 +181,18 @@ export default {
// dataIndex: "累计耗时", // dataIndex: "累计耗时",
// }, // },
], ],
searchName: undefined,
searchForm: {
type: 1, // 事项或者材料搜索
status: "", // 打印或者提交
searchName: "", // 搜索内容
BegindAndEndTime: [ BegindAndEndTime: [
this.$moment(new Date()).format("YYYY-MM-DD"), this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"), this.$moment(new Date()).format("YYYY-MM-DD"),
], ],
searchName: undefined, },
searchType: 1,
siteId: JSON.parse(localStorage.getItem("siteId")), siteId: JSON.parse(localStorage.getItem("siteId")),
statu: undefined,
tableSelectedKeys: [], tableSelectedKeys: [],
tableSelectedRows: [], tableSelectedRows: [],
tHeader: [ tHeader: [
...@@ -211,79 +221,66 @@ export default { ...@@ -211,79 +221,66 @@ export default {
"type", "type",
"createTime", "createTime",
], ],
i: 1,
}; };
}, },
components: {}, components: {},
mounted() { created() {
this.setMoment();
this.togetPrintList();
},
watch: {
tablePagination() {
this.togetPrintList(); this.togetPrintList();
}, },
}, mounted() {},
methods: { methods: {
changeStatu(val) { // 搜索
this.statu = val;
},
changeSearchType(val) {
this.searchType = val;
},
handleSearch() { handleSearch() {
this.tablePagination.current = 1; this.tablePagination.current = 1;
this.tableSelectedKeys = []; this.tableSelectedKeys = [];
this.tableSelectedRows = []; this.tableSelectedRows = [];
this.togetPrintList(); this.togetPrintList();
}, },
togetPrintList() { // 获取报表列表
async togetPrintList(searchForm = {}) {
let pramse = { let pramse = {
page: this.tablePagination.current, page: this.tablePagination.current,
size: this.tablePagination.pageSize, size: this.tablePagination.pageSize,
siteId: this.siteId, siteId: this.siteId,
matterName: "%%", type: this.searchForm.status,
materialName: "%%", createTimeStart: this.searchForm.BegindAndEndTime[0],
createTimeStart: this.BegindAndEndTime[0], createTimeEnd: this.searchForm.BegindAndEndTime[1],
createTimeEnd: this.BegindAndEndTime[1], ...searchForm,
}; };
if (this.statu && this.statu != 0) { if (this.searchForm.type == 1) {
pramse.type = this.statu; pramse.matterName = `%${this.searchForm.searchName}%`;
} } else {
if (this.searchType == 1 && this.searchName) { pramse.materialName = `%${this.searchForm.searchName}%`;
pramse.matterName = "%" + this.searchName + "%";
} else if (this.searchName) {
pramse.materialName = "%" + this.searchName + "%";
} }
getPrintList(pramse).then((res) => { let res = await getPrintList(pramse);
const { code, data } = res; let { code, data } = res;
if (code == 1) { if (code == 1) {
this.tableSourceData = data.data; this.tableSourceData = data.data;
this.tablePagination.total = data.total; this.tablePagination.total = data.total;
return data.data;
} }
});
}, },
// 重置 // 重置搜索
handleReset() { handleReset() {
this.BegindAndEndTime = [ this.searchForm = {
type: 1,
status: "",
searchName: "",
BegindAndEndTime: [
this.$moment(new Date()).format("YYYY-MM-DD"), this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"), this.$moment(new Date()).format("YYYY-MM-DD"),
]; ],
this.searchName = undefined; };
this.searchType = 1; this.tableSelectedKeys = [];
this.statu = undefined; this.tableSelectedRows = [];
this.tablePagination.current = 1; this.tablePagination.current = 1;
this.togetPrintList(); this.togetPrintList();
}, },
QueueState(type) { // 分页
switch (type) { changeTablePage(page) {
case 0: this.pagTableChange(page);
return "type1"; this.togetPrintList();
case 1:
return "type2";
default:
return "type0";
}
}, },
// 选中 // 选中
onSelectChange(keys, rows) { onSelectChange(keys, rows) {
...@@ -298,7 +295,7 @@ export default { ...@@ -298,7 +295,7 @@ export default {
}); });
}, },
// 导出 // 导出
handleExportTable() { async handleExportTable() {
this.btnLoading = true; this.btnLoading = true;
let obj = { let obj = {
1: "本地打印", 1: "本地打印",
...@@ -319,28 +316,9 @@ export default { ...@@ -319,28 +316,9 @@ export default {
"填单记录报表" + this.$moment().format("YYYYMMDDHHmmss") "填单记录报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
} else { } else {
let pramse = { let data = await this.togetPrintList({ page: 1, size: -1 });
page: 1, if (!data.length) return;
size: -1, for (let item of data) {
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) {
if (!data.data.length) return;
for (let item of data.data) {
Object.keys(obj).forEach((key) => { Object.keys(obj).forEach((key) => {
if (item.type == key) { if (item.type == key) {
item.type = obj[key]; item.type = obj[key];
...@@ -350,12 +328,10 @@ export default { ...@@ -350,12 +328,10 @@ export default {
export2Excel( export2Excel(
this.tHeader, this.tHeader,
this.filterVal, this.filterVal,
data.data, data,
"填单记录报表" + this.$moment().format("YYYYMMDDHHmmss") "填单记录报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
} }
});
}
this.btnLoading = false; this.btnLoading = false;
}, },
}, },
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
<a-input <a-input
v-model="searchForm.flownum" v-model="searchForm.flownum"
placeholder="请输入排队编号搜索" placeholder="请输入排队编号搜索"
@pressEnter="handleSearch"
> >
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
...@@ -318,17 +319,12 @@ export default { ...@@ -318,17 +319,12 @@ export default {
WorkpeopleInfo, WorkpeopleInfo,
HandlingDetails, HandlingDetails,
}, },
mounted() { created() {
this.setMoment();
this.getCalllistArr(); this.getCalllistArr();
this.getCallQueListArr(); this.getCallQueListArr();
}, },
mounted() {},
methods: { methods: {
//搜索按钮
getDataList() {
this.tablePagination.current = 1;
this.getCallQueListArr();
},
//重置按钮 //重置按钮
resetBtn() { resetBtn() {
this.tableSelectedKeys = []; this.tableSelectedKeys = [];
...@@ -345,7 +341,6 @@ export default { ...@@ -345,7 +341,6 @@ export default {
//获取排号机设备列表 //获取排号机设备列表
async getCalllistArr() { async getCalllistArr() {
await getCalllist({ page: 1, size: -1 }).then((res) => { await getCalllist({ page: 1, size: -1 }).then((res) => {
// console.log(res.data.data)
this.deviceData = res.data.data; this.deviceData = res.data.data;
}); });
}, },
...@@ -357,15 +352,19 @@ export default { ...@@ -357,15 +352,19 @@ export default {
this.getCallQueListArr(); this.getCallQueListArr();
}, },
// 获取列表数据 // 获取列表数据
getCallQueListArr() { async getCallQueListArr(search = {}) {
getCallQueList({ let res = getCallQueList({
page: this.tablePagination.current, page: this.tablePagination.current,
size: this.tablePagination.pageSize, size: this.tablePagination.pageSize,
...this.searchForm, ...this.searchForm,
}).then((res) => { ...search,
this.tableList = res.data.data;
this.tablePagination.total = res.data.total;
}); });
if (res.code == 1) {
let { data, total } = res.data;
this.tableList = data;
this.tablePagination.total = total;
return data;
}
}, },
//分页 //分页
changeTablePage(page) { changeTablePage(page) {
...@@ -426,9 +425,6 @@ export default { ...@@ -426,9 +425,6 @@ export default {
this.$refs.HandlingDetails.modalInfo.title = "办理明细"; this.$refs.HandlingDetails.modalInfo.title = "办理明细";
this.$refs.HandlingDetails.modalInfo.visible = true; this.$refs.HandlingDetails.modalInfo.visible = true;
}, },
rangePickerChange(val) {
console.log(val);
},
QueueState(type) { QueueState(type) {
switch (type) { switch (type) {
...@@ -476,12 +472,10 @@ export default { ...@@ -476,12 +472,10 @@ export default {
"呼叫记录报表" + this.$moment().format("YYYYMMDDHHmmss") "呼叫记录报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
} else { } else {
getCallQueList({ let data = await this.getCallQueListArr({
page: 1, page: 1,
size: -1, size: -1,
...this.searchForm, });
}).then((res) => {
let { data } = res.data;
if (!data.length) return; if (!data.length) return;
for (let item of data) { for (let item of data) {
Object.keys(obj).forEach((key) => { Object.keys(obj).forEach((key) => {
...@@ -496,7 +490,6 @@ export default { ...@@ -496,7 +490,6 @@ export default {
data, data,
"呼叫记录报表" + this.$moment().format("YYYYMMDDHHmmss") "呼叫记录报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
});
} }
this.btnLoading = false; this.btnLoading = false;
}, },
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
<a-input <a-input
v-model="searchForm.flownum" v-model="searchForm.flownum"
placeholder="请输入排队编号搜索" placeholder="请输入排队编号搜索"
@pressEnter="handleSearch"
> >
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
...@@ -324,17 +325,12 @@ export default { ...@@ -324,17 +325,12 @@ export default {
WorkpeopleInfo, WorkpeopleInfo,
HandlingDetails, HandlingDetails,
}, },
mounted() { created() {
this.setMoment();
this.getTaskListArr(); this.getTaskListArr();
this.getQueueDataArr(); this.getQueueDataArr();
}, },
mounted() {},
methods: { methods: {
//搜索按钮
getDataList() {
this.tablePagination.current = 1;
this.getQueueDataArr();
},
//重置按钮 //重置按钮
resetBtn() { resetBtn() {
this.tablePagination.current = 1; this.tablePagination.current = 1;
...@@ -351,7 +347,6 @@ export default { ...@@ -351,7 +347,6 @@ export default {
//获取排号机设备列表 //获取排号机设备列表
async getTaskListArr() { async getTaskListArr() {
await getTaskList({ page: 1, size: -1 }).then((res) => { await getTaskList({ page: 1, size: -1 }).then((res) => {
// console.log(res.data.data)
this.deviceData = res.data.data; this.deviceData = res.data.data;
}); });
}, },
...@@ -363,15 +358,19 @@ export default { ...@@ -363,15 +358,19 @@ export default {
this.getQueueDataArr(); this.getQueueDataArr();
}, },
// 获取列表数据 // 获取列表数据
getQueueDataArr() { async getQueueDataArr(search = {}) {
getQueueData({ let res = await getQueueData({
page: this.tablePagination.current, page: this.tablePagination.current,
size: this.tablePagination.pageSize, size: this.tablePagination.pageSize,
...this.searchForm, ...this.searchForm,
}).then((res) => { ...search,
this.tableList = res.data.data;
this.tablePagination.total = res.data.total;
}); });
if (res.code == 1) {
let { data, total } = res.data;
this.tableList = data;
this.tablePagination.total = total;
return data;
}
}, },
//分页 //分页
changeTablePage(page) { changeTablePage(page) {
...@@ -396,7 +395,6 @@ export default { ...@@ -396,7 +395,6 @@ export default {
}, },
//业务关联模块 //业务关联模块
async openBusiness(business, id) { async openBusiness(business, id) {
let siteId = localStorage.getItem("siteId");
await getBusinessEvent({ await getBusinessEvent({
businessid: id, businessid: id,
time: this.searchForm.time, time: this.searchForm.time,
...@@ -468,12 +466,7 @@ export default { ...@@ -468,12 +466,7 @@ export default {
"排队记录报表" + this.$moment().format("YYYYMMDDHHmmss") "排队记录报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
} else { } else {
getQueueData({ let data = await this.getQueueDataArr({ page: 1, size: -1 });
page: 1,
size: -1,
...this.searchForm,
}).then((res) => {
let { data } = res.data;
if (!data.length) return; if (!data.length) return;
for (let item of data) { for (let item of data) {
Object.keys(obj).forEach((key) => { Object.keys(obj).forEach((key) => {
...@@ -488,20 +481,9 @@ export default { ...@@ -488,20 +481,9 @@ export default {
data, data,
"排队记录报表" + this.$moment().format("YYYYMMDDHHmmss") "排队记录报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
});
} }
this.btnLoading = false; this.btnLoading = false;
}, },
//获取全部数据
// downAllData() {
// getQueueData({
// page: 1,
// size: -1,
// ...this.searchForm,
// }).then((res) => {
// return res;
// });
// },
}, },
}; };
</script> </script>
......
...@@ -13,21 +13,27 @@ ...@@ -13,21 +13,27 @@
>查看样表次数:<i>{{ tablePagination.total }}</i></b >查看样表次数:<i>{{ tablePagination.total }}</i></b
> >
<sub <sub
>统计时间段:{{ BegindAndEndTime[0] }}~{{ BegindAndEndTime[1] }} >统计时间段:{{ searchForm.BegindAndEndTime[0] }}~{{
searchForm.BegindAndEndTime[1]
}}
</sub> </sub>
</div> </div>
<span> <span>
<a-space> <a-space>
<a-select :default-value="1" @change="changeSearchType"> <a-select v-model="searchForm.type">
<a-select-option :value="1"> 按事项 </a-select-option> <a-select-option :value="1"> 按事项 </a-select-option>
<a-select-option :value="2"> 按材料 </a-select-option> <a-select-option :value="2"> 按材料 </a-select-option>
</a-select> </a-select>
<a-input v-model="searchName" placeholder="请输入名称搜索"> <a-input
v-model="searchForm.searchName"
@pressEnter="handleSearch"
placeholder="请输入名称搜索"
>
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<!-- </a-input-group> --> <!-- </a-input-group> -->
<a-range-picker <a-range-picker
v-model="BegindAndEndTime" v-model="searchForm.BegindAndEndTime"
format="YYYY-MM-DD" format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD" valueFormat="YYYY-MM-DD"
class="range_picker_style" class="range_picker_style"
...@@ -50,7 +56,7 @@ ...@@ -50,7 +56,7 @@
}" }"
:scroll="{ y: 590 }" :scroll="{ y: 590 }"
:pagination="tablePagination" :pagination="tablePagination"
@change="pagTableChange" @change="changeTablePage"
:loading="tableLoading" :loading="tableLoading"
:columns="tableHeaders" :columns="tableHeaders"
:dataSource="tableSourceData" :dataSource="tableSourceData"
...@@ -59,13 +65,13 @@ ...@@ -59,13 +65,13 @@
<span slot="index" slot-scope="text, record, index">{{ <span slot="index" slot-scope="text, record, index">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1 (tablePagination.current - 1) * tablePagination.pageSize + index + 1
}}</span> }}</span>
<template slot="事项名称" slot-scope="text, record, index"> <template slot="事项名称" slot-scope="text, record">
<div> <div>
{{ record.matterName }} {{ record.matterName }}
</div> </div>
<div class="tabFont">事项全称:{{ record.matterFullName }}</div> <div class="tabFont">事项全称:{{ record.matterFullName }}</div>
</template> </template>
<template slot="材料名称" slot-scope="text, record, index"> <template slot="材料名称" slot-scope="text, record">
<div> <div>
{{ record.materialName }} {{ record.materialName }}
</div> </div>
...@@ -131,12 +137,16 @@ export default { ...@@ -131,12 +137,16 @@ export default {
}, },
}, },
], ],
searchForm: {
type: 1, // 事项或者材料搜索
status: "", // 打印或者提交
searchName: "", // 搜索内容
BegindAndEndTime: [ BegindAndEndTime: [
this.$moment(new Date()).format("YYYY-MM-DD"), this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"), this.$moment(new Date()).format("YYYY-MM-DD"),
], //时间段 ],
searchName: undefined, },
searchType: 1,
siteId: localStorage.getItem("siteId"), siteId: localStorage.getItem("siteId"),
tableSelectedKeys: [], tableSelectedKeys: [],
tableSelectedRows: [], tableSelectedRows: [],
...@@ -163,10 +173,10 @@ export default { ...@@ -163,10 +173,10 @@ export default {
}; };
}, },
components: {}, components: {},
mounted() { created() {
this.setMoment();
this.togetBillList(); this.togetBillList();
}, },
methods: { methods: {
handleSearch() { handleSearch() {
this.tablePagination.current = 1; this.tablePagination.current = 1;
...@@ -174,56 +184,50 @@ export default { ...@@ -174,56 +184,50 @@ export default {
this.tableSelectedRows = []; this.tableSelectedRows = [];
this.togetBillList(); this.togetBillList();
}, },
togetBillList() { async togetBillList(searchForm = {}) {
let pramse = { let pramse = {
page: this.tablePagination.current, page: this.tablePagination.current,
size: this.tablePagination.pageSize, size: this.tablePagination.pageSize,
siteId: this.siteId, siteId: this.siteId,
matterName: "%%", operTimeStart: this.searchForm.BegindAndEndTime[0],
materialName: "%%", operTimeEnd: this.searchForm.BegindAndEndTime[1],
operTimeStart: this.BegindAndEndTime[0], ...searchForm,
operTimeEnd: this.BegindAndEndTime[1],
}; };
if (this.searchType == 1 && this.searchName) { if (this.searchForm.type == 1) {
pramse.matterName = "%" + this.searchName + "%"; pramse.matterName = `%${this.searchForm.searchName}%`;
} else if (this.searchName) { } else {
pramse.materialName = "%" + this.searchName + "%"; pramse.materialName = `%${this.searchForm.searchName}%`;
} }
getBillList(pramse).then((res) => { let res = await getBillList(pramse);
const { code, data } = res; const { code, data } = res;
if (code == 1) { if (code == 1) {
this.tableSourceData = data.data; this.tableSourceData = data.data;
this.tablePagination.total = data.total; this.tablePagination.total = data.total;
return data.data;
} }
});
},
changeSearchType(val) {
this.searchType = val;
}, },
QueueState(type) {
switch (type) {
case 0:
return "type1";
case 1:
return "type2";
default:
return "type0";
}
},
// 重置 // 重置
handleReset() { handleReset() {
this.BegindAndEndTime = [ this.searchForm = {
type: 1,
status: "",
searchName: "",
BegindAndEndTime: [
this.$moment(new Date()).format("YYYY-MM-DD"), this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"), this.$moment(new Date()).format("YYYY-MM-DD"),
]; ],
this.searchName = undefined; };
this.searchType = 1;
this.tablePagination.current = 1; this.tablePagination.current = 1;
this.tableSelectedKeys = []; this.tableSelectedKeys = [];
this.tableSelectedRows = []; this.tableSelectedRows = [];
this.togetBillList(); this.togetBillList();
}, },
// 分页
changeTablePage(page) {
this.pagTableChange(page);
this.togetBillList();
},
// 选中 // 选中
onSelectChange(keys, rows) { onSelectChange(keys, rows) {
this.tableSelectedKeys = keys; this.tableSelectedKeys = keys;
...@@ -237,7 +241,7 @@ export default { ...@@ -237,7 +241,7 @@ export default {
}); });
}, },
// 导出 // 导出
handleExportTable() { async handleExportTable() {
this.btnLoading = true; this.btnLoading = true;
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) { if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
export2Excel( export2Excel(
...@@ -247,33 +251,22 @@ export default { ...@@ -247,33 +251,22 @@ export default {
"样表记录报表" + this.$moment().format("YYYYMMDDHHmmss") "样表记录报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
} else { } else {
let pramse = { let data = await this.getBillList({ page: 1, size: -1 });
page: 1, if (!data.length) return;
size: -1, // for (let item of data) {
siteId: this.siteId, // Object.keys(obj).forEach((key) => {
matterName: "%%", // if (item.type == key) {
materialName: "%%", // item.type = obj[key];
operTimeStart: this.BegindAndEndTime[0], // }
operTimeEnd: this.BegindAndEndTime[1], // });
}; // }
if (this.searchType == 1 && this.searchName) {
pramse.matterName = "%" + this.searchName + "%";
} else if (this.searchName) {
pramse.materialName = "%" + this.searchName + "%";
}
getBillList(pramse).then((res) => {
const { code, data } = res;
if (code == 1) {
if (!data.data.length) return;
export2Excel( export2Excel(
this.tHeader, this.tHeader,
this.filterVal, this.filterVal,
data.data, data,
"样表记录报表" + this.$moment().format("YYYYMMDDHHmmss") "样表记录报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
} }
});
}
this.btnLoading = false; this.btnLoading = false;
}, },
}, },
......
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