Commit f42b5af5 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 9336bc21 c4dcbba7
<template>
<div>
<a-drawer
title="报表管理"
:visible="Visible"
@close="onClose"
:maskClosable="false"
:destroyOnClose="true"
width="850"
>
<div class="search-box flex aic jcb mb20">
<div>
<a-space>
<a-button type="primary" @click="handleAdd"> 新增 </a-button>
<a-button type="danger" @click="handleDelAll"> 批量删除 </a-button>
</a-space>
</div>
<a-input-search
style="width: 300px"
placeholder="请输入报表名称搜索"
enter-button="搜索"
v-model="censusName"
allowClear
@search="onSearch"
/>
</div>
<!-- 表格 -->
<div class="table-content">
<a-table
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
:loading="loading"
bordered
:scroll="{ y: 460 }"
:columns="columns"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: current,
total: total,
pageSize: size,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
onChange: handleChange,
onShowSizeChange: showSizeChange,
}"
:data-source="tableData"
:rowKey="(record) => record.id"
>
<!-- 序号 -->
<span slot="num" slot-scope="text, record, index">{{
(current - 1) * size + index + 1
}}</span>
<!-- 统计类型 -->
<template slot="censusType" slot-scope="text">
{{ filterDict(text.censusType) }}
</template>
<!-- 是否开放 -->
<template slot="status" slot-scope="text">
<a-tag color="blue" v-if="text.status === 1"></a-tag>
<a-tag color="red" v-else></a-tag>
</template>
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space>
<a href="javascript:;" class="edit" @click="handleEdit(text)"
>编辑</a
>
<a href="javascript:;" class="delete" @click="handleDel(text.id)"
>删除</a
>
</a-space>
</template>
</a-table>
</div>
<!-- 新增报表 -->
<AddStatement
:addStatementVisile.sync="addStatementVisile"
:title="title"
:dict="dict"
ref="AddStatement"
@addSuccess="getStatementList"
></AddStatement>
</a-drawer>
</div>
</template>
<script>
import { getStatementList, delStatement } from "@/services/basicsetFun";
import AddStatement from "../modal/AddStatement.vue";
const columns = [
{
title: "序号",
dataIndex: "num",
width: "65px",
scopedSlots: {
customRender: "num",
},
},
{
title: "报表名称",
dataIndex: "censusName",
},
{
title: "统计类型",
scopedSlots: { customRender: "censusType" },
},
{
title: "访问路由",
dataIndex: "censusUrl",
},
{
title: "是否开放",
scopedSlots: { customRender: "status" },
},
{
title: "操作",
width: "100px",
scopedSlots: { customRender: "action" },
},
];
export default {
props: {
StatementVisible: {
type: Boolean,
require: true,
default: false,
},
},
components: {
AddStatement,
},
data() {
return {
columns,
modelInfo: {}, // 模块信息
loading: false,
total: 0,
size: 10,
current: 1,
pageSizeOptions: ["10", "30", "50", "100"],
selectedRowKeys: [],
tableData: [],
addStatementVisile: false,
title: "新增",
censusName: "",
dict: {}, // 字典
};
},
computed: {
Visible: {
get() {
return this.StatementVisible;
},
set(val) {
this.$emit("update:StatementVisible", val);
},
},
},
methods: {
// 获取模块信息
getModelInfo(modelInfo) {
this.modelInfo = modelInfo;
this.getStatementList();
},
// 获取报表列表
async getStatementList() {
this.loading = true;
let res = await getStatementList({
page: this.current,
size: this.size,
modelId: this.modelInfo.id,
censusName: `%${this.censusName}%`,
});
let { code, dict, data } = res.data;
this.dict = dict;
this.loading = false;
if (code == 1) {
if (!data.length && this.current > 1) {
this.current -= 1;
this.getStatementList();
}
this.tableData = data.data;
}
},
handleAdd() {
this.title = "新增报表";
this.addStatementVisile = true;
this.$refs.AddStatement.onAdd(this.modelInfo);
},
handleDelAll() {
if (!this.selectedRowKeys.length) {
this.$message.warning("请先勾选数据");
return;
}
let ids = this.selectedRowKeys.join(",");
this.handleDel(ids);
},
// 关闭抽屉
onClose() {
this.censusName = "";
this.selectedRowKeys = [];
this.Visible = false;
},
// 搜索
onSearch() {
this.current = 1;
this.getStatementList();
},
// 编辑
handleEdit(row) {
this.title = "编辑报表";
this.addStatementVisile = true;
this.$refs.AddStatement.onEdit(row, this.modelInfo);
},
// 翻页
handleChange(cur) {
this.current = cur;
this.getStatementList();
},
// 改变每页显示数量
showSizeChange(current, size) {
this.current = current;
this.size = size;
this.getStatementList();
},
// 删除
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 delStatement({ id });
let { code, msg } = res.data;
if (code === 1) {
_this.$message.success(msg);
_this.getStatementList();
}
},
});
},
// 选中
onSelectChange(keys) {
this.selectedRowKeys = keys;
},
// 过滤列表数据
filterDict(dict) {
let str = "";
Object.keys(this.dict.censusType).forEach((keys) => {
if (dict == keys) {
str = this.dict.censusType[keys];
}
});
return str;
},
},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
...@@ -77,12 +77,20 @@ ...@@ -77,12 +77,20 @@
</template> </template>
<!-- 操作 --> <!-- 操作 -->
<template slot="action" slot-scope="text"> <template slot="action" slot-scope="text">
<a-space>
<a
href="javascript:;"
class="primary"
@click="statementManage(text)"
>配置报表</a
>
<a href="javascript:;" class="edit" @click="handleEdit(text)" <a href="javascript:;" class="edit" @click="handleEdit(text)"
>编辑</a >编辑</a
> >
<a href="javascript:;" class="delete" @click="handleDel(text.id)" <a href="javascript:;" class="delete" @click="handleDel(text.id)"
>删除</a >删除</a
> >
</a-space>
</template> </template>
</a-table> </a-table>
</div> </div>
...@@ -212,12 +220,18 @@ ...@@ -212,12 +220,18 @@
:previewVisible.sync="previewVisible" :previewVisible.sync="previewVisible"
></PrevieModal> ></PrevieModal>
</a-modal> </a-modal>
<!-- 表别管理 -->
<StatementManage
ref="StatementManage"
:StatementVisible.sync="StatementVisible"
></StatementManage>
</div> </div>
</template> </template>
<script> <script>
import { modelList, addMode, delMode } from "@/services/basicsetFun"; import { modelList, addMode, delMode } from "@/services/basicsetFun";
import PrevieModal from "@/components/PrevieModal.vue"; import PrevieModal from "@/components/PrevieModal.vue";
import StatementManage from "./components/StatementManage.vue";
const columns = [ const columns = [
{ {
title: "序号", title: "序号",
...@@ -262,13 +276,14 @@ const columns = [ ...@@ -262,13 +276,14 @@ const columns = [
}, },
{ {
title: "操作", title: "操作",
width: "120px", width: "180px",
scopedSlots: { customRender: "action" }, scopedSlots: { customRender: "action" },
}, },
]; ];
export default { export default {
components: { components: {
PrevieModal, PrevieModal,
StatementManage,
}, },
data() { data() {
return { return {
...@@ -311,6 +326,8 @@ export default { ...@@ -311,6 +326,8 @@ export default {
{ required: true, message: "模块图标不能为空", trigger: "change" }, { required: true, message: "模块图标不能为空", trigger: "change" },
], ],
}, },
StatementVisible: false,
modelInfo: {},
}; };
}, },
created() { created() {
...@@ -485,6 +502,14 @@ export default { ...@@ -485,6 +502,14 @@ export default {
// return false; // return false;
// } // }
// }, // },
statementManage(row) {
let obj = {
id: row.id,
modelName: row.modelName,
};
this.StatementVisible = true;
this.$refs.StatementManage.getModelInfo(obj);
},
}, },
}; };
</script> </script>
...@@ -508,7 +533,6 @@ export default { ...@@ -508,7 +533,6 @@ export default {
// } // }
.edit { .edit {
color: #03d76f; color: #03d76f;
margin-right: 15px;
} }
.delete { .delete {
color: #f94545; color: #f94545;
......
<template>
<div>
<a-modal
v-model="Visible"
:maskClosable="false"
:title="title"
@cancel="handleClose"
:zIndex="1001"
destroyOnClose
>
<template slot="footer">
<a-button @click="handleReset">重置</a-button>
<a-button type="primary" @click="handleOk">确定</a-button>
</template>
<a-form-model
ref="ruleForm"
:model="formData"
:rules="rules"
:label-col="{ span: 4 }"
:wrapper-col="{ span: 20 }"
>
<a-form-model-item label="所属模块">
<a-input disabled :value="modelInfo.modelName" />
</a-form-model-item>
<a-form-model-item label="报表名称" prop="censusName">
<a-input v-model="formData.censusName" placeholder="请输入报表名称" />
</a-form-model-item>
<a-form-model-item label="报表路由" prop="censusUrl">
<a-input
v-model="formData.censusUrl"
placeholder="请输入报表访问路由"
/>
</a-form-model-item>
<a-form-model-item label="统计类型" prop="censusType">
<a-select v-model="formData.censusType" placeholder="请选择统计类型">
<a-select-option
v-for="(v, key) in dict.censusType"
:key="key"
:value="Number(key)"
>
{{ v }}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="是否开放" prop="status">
<YSwitch v-model="formData.status"></YSwitch>
</a-form-model-item>
</a-form-model>
</a-modal>
</div>
</template>
<script>
import { addStatement } from "@/services/basicsetFun";
import YSwitch from "@/components/yswitch/YSwitch.vue";
export default {
props: {
title: {
require: true,
type: String,
default: "",
},
addStatementVisile: {
type: Boolean,
require: true,
default: false,
},
dict: {
type: Object,
require: true,
default: () => {
return {};
},
},
},
components: {
YSwitch,
},
data() {
return {
modelInfo: {},
formData: {
modelId: "", // 模块id
censusName: "", // 报表名称
censusUrl: "", // 报表访问路由
censusType: undefined, // 统计类型
status: 1, // 状态(0:为开通,1:开通)
},
rules: {
censusName: [
{ required: true, message: "请输入报表名称", trigger: "blur" },
],
censusUrl: [
{ required: true, message: "请输入报表访问路由", trigger: "blur" },
],
censusType: [
{ required: true, message: "请选择统计类型", trigger: "change" },
],
},
};
},
computed: {
Visible: {
get() {
return this.addStatementVisile;
},
set(val) {
this.$emit("update:addStatementVisile", val);
},
},
},
methods: {
// 新增
onAdd(modelInfo) {
Object.assign(this.formData, this.$options.data().formData);
this.formData.id && this.$delete(this.formData, "id");
this.modelInfo = modelInfo;
this.formData.modelId = modelInfo.id;
},
// 编辑
onEdit(data, modelInfo) {
this.modelInfo = modelInfo;
this.formData = { ...data };
},
// 关闭弹窗
handleClose() {
this.$refs.ruleForm.resetFields();
this.Visible = false;
},
// 保存
handleOk() {
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
let res = await addStatement(this.formData);
let { code, msg } = res.data;
if (code === 1) {
this.$message.success(msg);
this.$emit("addSuccess");
this.handleClose();
}
}
});
},
// 重置
handleReset() {
this.$refs.ruleForm.resetFields();
},
},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
...@@ -17,6 +17,9 @@ module.exports = { ...@@ -17,6 +17,9 @@ module.exports = {
info: `${BASE_URL}/base/model/info`, info: `${BASE_URL}/base/model/info`,
save: `${BASE_URL}/base/model/save`, save: `${BASE_URL}/base/model/save`,
delete: `${BASE_URL}/base/model/delete`, delete: `${BASE_URL}/base/model/delete`,
saveStatement: `${BASE_URL}/base/model/census/save`,
statementList: `${BASE_URL}/base/model/census/list`,
delStatement: `${BASE_URL}/base/model/census/delete`,
}, },
// 区域 // 区域
area: { area: {
......
...@@ -59,3 +59,15 @@ export async function addMode(data) { ...@@ -59,3 +59,15 @@ export async function addMode(data) {
export async function delMode(data) { export async function delMode(data) {
return request(model.delete, METHOD.GET, data); return request(model.delete, METHOD.GET, data);
} }
// 保存模块报表
export async function addStatement(data) {
return request(model.saveStatement, METHOD.POST, data);
}
// 模块报表列表
export async function getStatementList(data) {
return request(model.statementList, METHOD.POST, data);
}
// 删除报表
export async function delStatement(data) {
return request(model.delStatement, METHOD.GET, data);
}
// 导出表格数据
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,18 +2,30 @@ ...@@ -2,18 +2,30 @@
<div class="callRecord-Container"> <div class="callRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button type="success" @click="toexportTable"> <a-button
:loading="btnLoading"
type="success"
@click="handleExportTable"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button> </a-button>
<b>累计发送短信量:<i>{{allCount}}</i></b> <b
>累计发送短信量:<i>{{ allCount }}</i></b
>
</div> </div>
<span> <span>
<a-space> <a-space>
<a-select :value="nowSite" @change="changeSite"> <a-select :value="nowSite" @change="changeSite">
<a-select-option v-for="item in siteList" :key="item.value" :value="item.value"> {{item.label}} </a-select-option> <a-select-option
v-for="item in siteList"
:key="item.value"
:value="item.value"
>
{{ item.label }}
</a-select-option>
</a-select> </a-select>
<a-button type="primary" @click="togetSMSList()">搜索</a-button> <a-button type="primary" @click="handleSearch">搜索</a-button>
</a-space> </a-space>
</span> </span>
</div> </div>
...@@ -33,8 +45,12 @@ ...@@ -33,8 +45,12 @@
:columns="tableHeaders" :columns="tableHeaders"
:dataSource="tableSourceData" :dataSource="tableSourceData"
> >
<!-- 序号 -->
<span slot="index" slot-scope="text, record, index">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1
}}</span>
<template slot="operation" slot-scope="text, record, index"> <template slot="operation" slot-scope="text, record, index">
<a-button type="link" @click="gotoSMSSystem()">查看明细</a-button> <a-button type="link" @click="gotoSMSSystem">查看明细</a-button>
</template> </template>
</a-table> </a-table>
</div> </div>
...@@ -43,20 +59,22 @@ ...@@ -43,20 +59,22 @@
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import {getSMSList} from "@/api/dataAdmin" import { export2Excel } from "@/utils/js/exportExcel";
import { getSMSList } from "@/api/dataAdmin";
export default { export default {
mixins: [table], mixins: [table],
name: "PortalAdminVuePickUpRecord", name: "PortalAdminVuePickUpRecord",
data() { data() {
return { return {
btnLoading: false,
tableHeaders: [ tableHeaders: [
{ {
title: "序号", title: "序号",
dataIndex: "index",
width: "60px", width: "60px",
key: "index",
align: "center", align: "center",
customRender: (text, record, index) => `${index + 1}`, scopedSlots: {
customRender: "index",
},
}, },
{ {
title: "月度时间", title: "月度时间",
...@@ -86,99 +104,120 @@ export default { ...@@ -86,99 +104,120 @@ export default {
}, },
], ],
searchName: undefined, searchName: undefined,
nowSite:null, nowSite: null,
siteList:[], siteList: [],
allCount:0 allCount: 0,
tableSelectedKeys: [],
tableSelectedRows: [],
tHeader: [
// 导出的表头名信息
"月度时间",
"发送量",
"账单生成时间",
],
filterVal: [
// 导出的表头字段名,需要导出表格字段名
"month",
"send_num",
"update_time",
],
}; };
}, },
components: {}, components: {},
mounted() { mounted() {
this.setMoment(); this.setMoment();
this.getSiteData() this.getSiteData();
this.togetSMSList() this.togetSMSList();
}, },
methods: { methods: {
//导出 gotoSMSSystem() {
toexportTable() { window.open("http://sms.wx3.com.cn/admin", "_blank");
let tableData = [];
if (this.tableSelectedRows.length == 0) {
// 获取表信息
getSMSList({
siteid:this.nowSite,
page:1,
size:-1,
}).then((res)=>{
const {code,data} = res
if(code==1){
tableData = JSON.parse(JSON.stringify(data.list.data));
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));
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);
}
}, },
gotoSMSSystem(){ changeSite(e) {
window.location.href="http://sms.wx3.com.cn/admin" this.nowSite = e;
},
changeSite(e){
this.nowSite = e
}, },
// 获取当前站点和站点列表 // 获取当前站点和站点列表
getSiteData(){ getSiteData() {
this.nowSite = JSON.parse(localStorage.getItem('siteId')) this.nowSite = JSON.parse(localStorage.getItem("siteId"));
this.siteList = [] this.siteList = [];
JSON.parse(localStorage.getItem('siteList')).forEach(item => { JSON.parse(localStorage.getItem("siteList")).forEach((item) => {
this.siteList.push({ this.siteList.push({
label:item.siteName, label: item.siteName,
value:item.id value: item.id,
}) });
}); });
}, },
togetSMSList(){ // 搜索
handleSearch() {
this.tablePagination = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.togetSMSList();
},
togetSMSList() {
// 获取表信息 // 获取表信息
getSMSList({ getSMSList({
siteid:this.nowSite, siteid: this.nowSite,
page:this.tablePagination.current, page: this.tablePagination.current,
size:this.tablePagination.pageSize, size: this.tablePagination.pageSize,
}).then((res)=>{ }).then((res) => {
const {code,data} = res const { code, data } = res;
if(code==1){ if (code == 1) {
console.log(res); console.log(res);
this.tableSourceData = data.list.data this.tableSourceData = data.list.data;
this.allCount=data.all_num this.allCount = data.all_num;
this.tablePagination.total = data.list.total this.tablePagination.total = data.list.total;
} }
});
},
// 选中
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);
});
}, },
watch:{ // 导出
tablePagination(){ async handleExportTable() {
this.togetSMSList() this.btnLoading = true;
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
export2Excel(
this.tHeader,
this.filterVal,
this.tableSelectedRows,
"短信记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
getSMSList({
siteid: this.nowSite,
page: 1,
size: -1,
}).then((res) => {
const { code, data } = res;
if (code == 1) {
if (!data.list.data.length) return;
export2Excel(
this.tHeader,
this.filterVal,
data.list.data,
"短信记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} }
} });
}
this.btnLoading = false;
},
},
watch: {
tablePagination() {
this.togetSMSList();
},
},
}; };
</script> </script>
...@@ -187,7 +226,7 @@ export default { ...@@ -187,7 +226,7 @@ export default {
display: block; display: block;
} }
.header_box { .header_box {
padding-bottom: 1rem; padding-bottom: 1rem;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -208,8 +247,7 @@ export default { ...@@ -208,8 +247,7 @@ export default {
} }
} }
} }
} }
</style> </style>
...@@ -2,25 +2,41 @@ ...@@ -2,25 +2,41 @@
<div class="callRecord-Container"> <div class="callRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button type="success" @click="toexportTable"> <a-button
:loading="btnLoading"
type="success"
@click="handleExportTable"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button> </a-button>
<a-button type="danger" @click="delTable"> <a-button type="danger" @click="delTable">
<span>批量删除</span> <span>批量删除</span>
</a-button> </a-button>
<b>评价次数:<i>{{evaCount}}</i></b> <b
<sub>统计时间段:{{evaDates[0]}}~{{evaDates[1]}}</sub> >评价次数:<i>{{ evaCount }}</i></b
>
<sub
>统计时间段:{{ BegindAndEndTime[0] }}~{{ BegindAndEndTime[1] }}</sub
>
</div> </div>
<span> <span>
<a-space> <a-space>
<a-select placeholder="全部评价" @change="changeEvaChoose" mode="multiple"> <a-select
placeholder="全部评价"
@change="changeEvaChoose"
mode="multiple"
>
<a-select-option value="非常满意"> 非常满意 </a-select-option> <a-select-option value="非常满意"> 非常满意 </a-select-option>
<a-select-option value="基本满意"> 基本满意 </a-select-option> <a-select-option value="基本满意"> 基本满意 </a-select-option>
<a-select-option value="满意"> 满意 </a-select-option> <a-select-option value="满意"> 满意 </a-select-option>
<a-select-option value="不满意"> 不满意 </a-select-option> <a-select-option value="不满意"> 不满意 </a-select-option>
<a-select-option value="非常不满意"> 非常不满意 </a-select-option> <a-select-option value="非常不满意"> 非常不满意 </a-select-option>
</a-select> </a-select>
<a-select placeholder="全部来源" @change="changeEvaFrom" mode="multiple"> <a-select
placeholder="全部来源"
@change="changeEvaFrom"
mode="multiple"
>
<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-option value="3"> 背靠背评价 </a-select-option> <a-select-option value="3"> 背靠背评价 </a-select-option>
...@@ -29,35 +45,62 @@ ...@@ -29,35 +45,62 @@
<a-select-option value="6"> 一体化评价 </a-select-option> <a-select-option value="6"> 一体化评价 </a-select-option>
</a-select> </a-select>
<a-range-picker :allowClear="false" format="YYYY年MM月DD日" class="range_picker_style" @change="rangePickerChange" <a-range-picker
v-model="BegindAndEndTime"> :allowClear="false"
format="YYYY-MM-DD"
class="range_picker_style"
valueFormat="YYYY-MM-DD"
v-model="BegindAndEndTime"
>
</a-range-picker> </a-range-picker>
<a-input v-model="searchName" placeholder="请输入评价人姓名或窗口编号搜索"> <a-input v-model="searchName" placeholder="请输入内容搜索搜索">
<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="resetBtn">重置</a-button>
</a-space> </a-space>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ <a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys, selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" :scroll="{ y: 590 }" :pagination="tablePagination" @change="pagTableChange" :loading="tableLoading" }"
:columns="tableHeaders" :dataSource="tableSourceData"> :scroll="{ y: 590 }"
<template slot="评价人照片" slot-scope="text, record, index"> :pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<!-- 序号 -->
<span slot="index" slot-scope="text, record, index">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1
}}</span>
<template slot="评价人照片" slot-scope="text">
<a-avatar v-if="!text" shape="square" :size="40" icon="user" /> <a-avatar v-if="!text" shape="square" :size="40" icon="user" />
<img v-else :src="process.env.VUE_APP_API_BASE_URL+text" alt="" srcset=""> <img
v-else
:src="process.env.VUE_APP_API_BASE_URL + text"
alt=""
srcset=""
/>
</template> </template>
<template slot="操作" slot-scope="text, record, index"> <template slot="操作" slot-scope="text, record">
<a-button type="link" style="color:#FF7370;">删除</a-button> <a-button type="link" style="color: #ff7370">删除</a-button>
<a-button type="link" @click="openHandlingDetails(record)">详情</a-button> <a-button type="link" @click="openHandlingDetails(record)"
>详情</a-button
>
</template> </template>
</a-table> </a-table>
<HandlingDetails ref="HandlingDetails"/> <HandlingDetails ref="HandlingDetails" />
<a-modal v-model="visible" title="系统提示" @ok="togetEvaDetil()"> <a-modal v-model="visible" title="系统提示" @ok="togetEvaDetil()">
{{content}} {{ content }}
</a-modal> </a-modal>
</div> </div>
</div> </div>
...@@ -66,26 +109,34 @@ ...@@ -66,26 +109,34 @@
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import HandlingDetails from "./components/HandlingDetails.vue"; import HandlingDetails from "./components/HandlingDetails.vue";
import { getEvaList, getEvaData, getEvaDetil, getQueEvaData } from "@/api/dataAdmin"; import {
getEvaList,
getEvaData,
getEvaDetil,
getQueEvaData,
} from "@/api/dataAdmin";
export default { export default {
mixins: [table], mixins: [table],
name: "departmentEvaluation", name: "departmentEvaluation",
data() { data() {
return { return {
btnLoading: false,
tableHeaders: [ tableHeaders: [
{ {
title: "序号", title: "序号",
dataIndex: "index",
width: "60px", width: "60px",
key: "index",
align: "center", align: "center",
customRender: (text, record, index) => `${index + 1}`, scopedSlots: {
customRender: "index",
},
}, },
{ {
title: "部门名称", title: "部门名称",
align: "center", align: "center",
dataIndex: "section", customRender: (text) => {
return text.section ? text.section : "--";
},
}, },
{ {
title: "评价选项", title: "评价选项",
...@@ -95,17 +146,23 @@ export default { ...@@ -95,17 +146,23 @@ export default {
{ {
title: "评价人", title: "评价人",
align: "center", align: "center",
dataIndex: "idcard_Name", customRender: (text) => {
return text.idcard_Name ? text.idcard_Name : "--";
},
}, },
{ {
title: "身份证号", title: "身份证号",
align: "center", align: "center",
dataIndex: "idcard_IDCardNo", customRender: (text) => {
return text.idcard_IDCardNo ? text.idcard_IDCardNo : "--";
},
}, },
{ {
title: "手机号", title: "手机号",
align: "center", align: "center",
dataIndex: "phone", customRender: (text) => {
return text.phone ? text.phone : "--";
},
}, },
{ {
title: "评价时间", title: "评价时间",
...@@ -117,18 +174,18 @@ export default { ...@@ -117,18 +174,18 @@ export default {
align: "center", align: "center",
dataIndex: "pjxt", dataIndex: "pjxt",
customRender: (text, record, index) => { customRender: (text, record, index) => {
if(text == 1){ if (text == 1) {
return '窗口评价' return "窗口评价";
}else if(text == 2){ } else if (text == 2) {
return '自助服务终端' return "自助服务终端";
}else if(text == 3){ } else if (text == 3) {
return '背靠背评价' return "背靠背评价";
}else if(text == 4){ } else if (text == 4) {
return '微官网' return "微官网";
}else if(text == 5){ } else if (text == 5) {
return '好差评' return "好差评";
}else{ } else {
return '一体化评价' return "一体化评价";
} }
}, },
}, },
...@@ -137,12 +194,12 @@ export default { ...@@ -137,12 +194,12 @@ export default {
align: "center", align: "center",
dataIndex: "source", dataIndex: "source",
customRender: (text, record, index) => { customRender: (text, record, index) => {
if(text == 1){ if (text == 1) {
return '安卓' return "安卓";
}else if(text == 2){ } else if (text == 2) {
return '导视机' return "导视机";
}else{ } else {
return '微信' return "微信";
} }
}, },
}, },
...@@ -163,169 +220,160 @@ export default { ...@@ -163,169 +220,160 @@ export default {
}, },
}, },
], ],
BegindAndEndTime: [], BegindAndEndTime: [
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
],
searchName: undefined, searchName: undefined,
//删除窗口判断 //删除窗口判断
visible: false, visible: false,
tableSourceData:[], tableSourceData: [],
evaCount:0,//评价次数 evaCount: 0, //评价次数
evaChoose:[],//评价选项 evaChoose: [], //评价选项
evaFrom:[0],// 评价来源 evaFrom: [0], // 评价来源
evaDates:[],// 评价日期 evaDates: [
content:'此操作将删除该评价信息,是否继续?', this.$moment(new Date()).format("YYYY-MM-DD"),
delId:null,//当前删除id this.$moment(new Date()).format("YYYY-MM-DD"),
], // 评价日期
content: "此操作将删除该评价信息,是否继续?",
delId: null, //当前删除id
tHeader: [
// 导出的表头名信息
"部门名称",
"评价选项",
"评价人",
"身份证号码",
"手机号",
"评价时间",
"评价来源",
"评价设备",
],
filterVal: [
// 导出的表头字段名,需要导出表格字段名
"section",
"option_id",
"idcard_Name",
"idcard_IDCardNo",
"phone",
"create_time",
"pjxt",
"source",
],
tableSelectedKeys: [],
tableSelectedRows: [],
}; };
}, },
components: { components: {
HandlingDetails HandlingDetails,
}, },
mounted() { mounted() {
this.setMoment(); this.setMoment();
// 设置默认时间为今天 this.togetevalist();
this.evaDates=[this.$moment(new Date()).format("YYYY-MM-DD"),this.$moment(new Date()).format("YYYY-MM-DD")]
this.togetevalist()
}, },
methods: { methods: {
//导出 delTable() {
toexportTable() {
let tableData = [];
// 拼接评价选项
let chooseStr = this.evaChoose.join(',')
// 要先拼接评价来源
let fromString = this.evaFrom.join(',')
if (this.tableSelectedRows.length == 0) {
getEvaList({
page:1,
size:-1,
type:'bmpj',
option_id:chooseStr,
pjxt:fromString,//传0代表全部
time:this.evaDates,
info:this.searchName
}).then((res)=>{
const{code,data} = res;
if(code == 1){
tableData = JSON.parse(JSON.stringify(data.data.data));
tableData.forEach((item)=>{
item.pjxt = item.pjxt == 1?'窗口评价':item.pjxt == 2?'自助服务终端':item.pjxt == 3?'背靠背评价':item.pjxt == 4?'微官网':item.pjxt == 5?'好差评':'一体化评价'
item.source = item.source == 1?'安卓': item.source == 2?'导视机':'微信'
})
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.pjxt = item.pjxt == 1?'窗口评价':item.pjxt == 2?'自助服务终端':item.pjxt == 3?'背靠背评价':item.pjxt == 4?'微官网':item.pjxt == 5?'好差评':'一体化评价'
item.source = item.source == 1?'安卓': item.source == 2?'导视机':'微信'
})
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);
}
},
delTable(){
// console.log(this.tableSelectedRows); // console.log(this.tableSelectedRows);
this.visible = true; this.visible = true;
if(!this.tableSelectedRows.length){ if (!this.tableSelectedRows.length) {
this.content = '一条评论都没有选中' this.content = "一条评论都没有选中";
}else{ } else {
this.content = '此操作将删除这些评价信息,是否继续?' this.content = "此操作将删除这些评价信息,是否继续?";
let arr = [] let arr = [];
this.tableSelectedRows.forEach(item => { this.tableSelectedRows.forEach((item) => {
arr.push(item.id) arr.push(item.id);
}); });
this.delId = arr this.delId = arr;
} }
}, },
togetEvaDetil(){ togetEvaDetil() {
getEvaDetil({ getEvaDetil({
id:this.delId id: this.delId,
}).then(res=>{ }).then((res) => {
{ {
this.delId=null this.delId = null;
this.visible = false; this.visible = false;
// 要刷新页面 // 要刷新页面
this.togetevalist() this.togetevalist();
} }
}) });
}, },
togetQueEvaData(record){ togetQueEvaData(record) {
getQueEvaData({ getQueEvaData({
id:record.id id: record.id,
}).then(res=>{ }).then((res) => {
console.log(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;
} }
}) });
}, },
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
} }
}) });
},
// 搜索
handleSearch() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.togetevalist();
},
//重置按钮
resetBtn() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.BegindAndEndTime = [
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
];
this.searchName = "";
this.togetevalist();
}, },
togetevalist(){ togetevalist() {
// 拼接评价选项 // 拼接评价选项
let chooseStr = this.evaChoose.join(',') let chooseStr = this.evaChoose.join(",");
// 要先拼接评价来源 // 要先拼接评价来源
let fromString = this.evaFrom.join(',') let fromString = this.evaFrom.join(",");
getEvaList({ 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: chooseStr,
pjxt:fromString,//传0代表全部 pjxt: fromString, //传0代表全部
time:this.evaDates, time: this.BegindAndEndTime,
info:this.searchName info: this.searchName,
}).then((res)=>{ }).then((res) => {
console.log(11111,res); const { code, data } = res;
const{code,data} = res; if (code == 1) {
if(code == 1){ this.tableSourceData = data.data.data;
this.tableSourceData = data.data.data this.evaCount = data.count;
this.evaCount = data.count this.tablePagination.total = data.count;
this.tablePagination.total = data.count
} }
}) });
}, },
changeEvaFrom(val){ changeEvaFrom(val) {
if(val.length){ if (val.length) {
this.evaFrom = val; this.evaFrom = val;
}else{ } else {
this.evaFrom = [0] this.evaFrom = [0];
} }
}, },
changeEvaChoose(val){ changeEvaChoose(val) {
this.evaChoose = val this.evaChoose = val;
}, },
rangePickerChange(val) { rangePickerChange(val) {
this.evaDates = [this.$moment(val[0]).format("YYYY-MM-DD"),this.$moment(val[1]).format("YYYY-MM-DD")] this.evaDates = [
this.$moment(val[0]).format("YYYY-MM-DD"),
this.$moment(val[1]).format("YYYY-MM-DD"),
];
}, },
QueueState(type) { QueueState(type) {
switch (type) { switch (type) {
...@@ -348,7 +396,7 @@ export default { ...@@ -348,7 +396,7 @@ export default {
// }else{ // }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;
...@@ -356,14 +404,86 @@ export default { ...@@ -356,14 +404,86 @@ export default {
//删除模态框 //删除模态框
showModal(record) { showModal(record) {
this.visible = true; this.visible = true;
this.delId = record.id this.delId = record.id;
}, },
// 选中
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);
});
}, },
watch:{ // 导出
tablePagination(){ async handleExportTable() {
this.togetevalist() this.btnLoading = true;
let obj = {
1: "窗口评价",
2: "自助服务终端",
3: "背靠背评价",
4: "微官网",
5: "好差评",
6: "一体化评价",
};
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
this.tableSelectedRows.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.pjxt == keys) {
item.pjxt = obj[keys];
} }
});
});
export2Excel(
this.tHeader,
this.filterVal,
this.tableSelectedRows,
"办事部门评价记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
// 拼接评价选项
let chooseStr = this.evaChoose.join(",");
// 要先拼接评价来源
let fromString = this.evaFrom.join(",");
getEvaList({
page: 1,
size: -1,
type: "bmpj",
option_id: chooseStr,
pjxt: fromString, //传0代表全部
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) => {
if (item.pjxt == key) {
item.pjxt = obj[key];
}
});
} }
export2Excel(
this.tHeader,
this.filterVal,
data.data.data,
"办事部门评价记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
}
});
}
this.btnLoading = false;
},
},
watch: {
tablePagination() {
this.togetevalist();
},
},
}; };
</script> </script>
...@@ -378,7 +498,7 @@ export default { ...@@ -378,7 +498,7 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
&>div { & > div {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
......
...@@ -2,25 +2,41 @@ ...@@ -2,25 +2,41 @@
<div class="callRecord-Container"> <div class="callRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button type="success" @click="toexportTable"> <a-button
:loading="btnLoading"
type="success"
@click="handleExportTable"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button> </a-button>
<a-button type="danger" @click="delTable"> <a-button type="danger" @click="delTable">
<span>批量删除</span> <span>批量删除</span>
</a-button> </a-button>
<b>评价次数:<i>{{evaCount}}</i></b> <b
<sub>统计时间段:{{evaDates[0]}}~{{evaDates[1]}}</sub> >评价次数:<i>{{ evaCount }}</i></b
>
<sub
>统计时间段:{{ BegindAndEndTime[0] }}~{{ BegindAndEndTime[1] }}</sub
>
</div> </div>
<span> <span>
<a-space> <a-space>
<a-select placeholder="全部评价" @change="changeEvaChoose" mode="multiple"> <a-select
placeholder="全部评价"
@change="changeEvaChoose"
mode="multiple"
>
<a-select-option value="非常满意"> 非常满意 </a-select-option> <a-select-option value="非常满意"> 非常满意 </a-select-option>
<a-select-option value="基本满意"> 基本满意 </a-select-option> <a-select-option value="基本满意"> 基本满意 </a-select-option>
<a-select-option value="满意"> 满意 </a-select-option> <a-select-option value="满意"> 满意 </a-select-option>
<a-select-option value="不满意"> 不满意 </a-select-option> <a-select-option value="不满意"> 不满意 </a-select-option>
<a-select-option value="非常不满意"> 非常不满意 </a-select-option> <a-select-option value="非常不满意"> 非常不满意 </a-select-option>
</a-select> </a-select>
<a-select placeholder="全部来源" @change="changeEvaFrom" mode="multiple"> <a-select
placeholder="全部来源"
@change="changeEvaFrom"
mode="multiple"
>
<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-option value="3"> 背靠背评价 </a-select-option> <a-select-option value="3"> 背靠背评价 </a-select-option>
...@@ -29,35 +45,67 @@ ...@@ -29,35 +45,67 @@
<a-select-option value="6"> 一体化评价 </a-select-option> <a-select-option value="6"> 一体化评价 </a-select-option>
</a-select> </a-select>
<a-range-picker :allowClear="false" format="YYYY年MM月DD日" class="range_picker_style" @change="rangePickerChange" <a-range-picker
v-model="BegindAndEndTime"> allowClear
format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD"
class="range_picker_style"
v-model="BegindAndEndTime"
>
</a-range-picker> </a-range-picker>
<a-input v-model="searchName" placeholder="请输入评价人姓名或窗口编号搜索"> <a-input v-model="searchName" placeholder="请输入内容搜索搜索">
<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="resetBtn">重置</a-button>
</a-space> </a-space>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ <a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys, selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" :scroll="{ y: 590 }" :pagination="tablePagination" @change="pagTableChange" :loading="tableLoading" }"
:columns="tableHeaders" :dataSource="tableSourceData"> :scroll="{ y: 590 }"
<template slot="评价人照片" slot-scope="text, record, index"> :pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<!-- 序号 -->
<span slot="index" slot-scope="text, record, index">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1
}}</span>
<template slot="评价人照片" slot-scope="text">
<a-avatar v-if="!text" shape="square" :size="40" icon="user" /> <a-avatar v-if="!text" shape="square" :size="40" icon="user" />
<img v-else :src="process.env.VUE_APP_API_BASE_URL+text" alt="" srcset=""> <img
v-else
:src="process.env.VUE_APP_API_BASE_URL + text"
alt=""
srcset=""
/>
</template> </template>
<template slot="操作" slot-scope="text, record, index"> <template slot="操作" slot-scope="text, record">
<a-button type="link" style="color:#FF7370;" @click="showModal(record)">删除</a-button> <a-button
<a-button type="link" @click="openHandlingDetails(record)">详情</a-button> type="link"
style="color: #ff7370"
@click="showModal(record)"
>删除</a-button
>
<a-button type="link" @click="openHandlingDetails(record)"
>详情</a-button
>
</template> </template>
</a-table> </a-table>
<HandlingDetails ref="HandlingDetails" /> <HandlingDetails ref="HandlingDetails" />
<a-modal v-model="visible" title="系统提示" @ok="togetEvaDetil()"> <a-modal v-model="visible" title="系统提示" @ok="togetEvaDetil()">
{{content}} {{ content }}
</a-modal> </a-modal>
</div> </div>
</div> </div>
...@@ -65,27 +113,36 @@ ...@@ -65,27 +113,36 @@
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import { export2Excel } from "@/utils/js/exportExcel";
import HandlingDetails from "./components/HandlingDetails.vue"; import HandlingDetails from "./components/HandlingDetails.vue";
import { getEvaList, getEvaData, getEvaDetil, getQueEvaData } from "@/api/dataAdmin"; import {
getEvaList,
getEvaData,
getEvaDetil,
getQueEvaData,
} from "@/api/dataAdmin";
export default { export default {
mixins: [table], mixins: [table],
name: "matterEvaluation", name: "matterEvaluation",
data() { data() {
return { return {
btnLoading: false,
tableHeaders: [ tableHeaders: [
{ {
title: "序号", title: "序号",
dataIndex: "index",
width: "60px", width: "60px",
key: "index",
align: "center", align: "center",
customRender: (text, record, index) => `${index + 1}`, scopedSlots: {
customRender: "index",
},
}, },
{ {
title: "排队编号", title: "排队编号",
align: "center", align: "center",
dataIndex: "flounum", customRender: (text) => {
return text.flounum ? text.flounum : "--";
},
}, },
{ {
title: "评价选项", title: "评价选项",
...@@ -95,17 +152,23 @@ export default { ...@@ -95,17 +152,23 @@ export default {
{ {
title: "评价人", title: "评价人",
align: "center", align: "center",
dataIndex: "idcard_Name", customRender: (text) => {
return text.idcard_Name ? text.idcard_Name : "--";
},
}, },
{ {
title: "身份证号", title: "身份证号",
align: "center", align: "center",
dataIndex: "idcard_IDCardNo", customRender: (text) => {
return text.idcard_IDCardNo ? text.idcard_IDCardNo : "--";
},
}, },
{ {
title: "手机号", title: "手机号",
align: "center", align: "center",
dataIndex: "phone", customRender: (text) => {
return text.phone ? text.phone : "--";
},
}, },
{ {
title: "评价时间", title: "评价时间",
...@@ -117,18 +180,18 @@ export default { ...@@ -117,18 +180,18 @@ export default {
align: "center", align: "center",
dataIndex: "pjxt", dataIndex: "pjxt",
customRender: (text, record, index) => { customRender: (text, record, index) => {
if(text == 1){ if (text == 1) {
return '窗口评价' return "窗口评价";
}else if(text == 2){ } else if (text == 2) {
return '自助服务终端' return "自助服务终端";
}else if(text == 3){ } else if (text == 3) {
return '背靠背评价' return "背靠背评价";
}else if(text == 4){ } else if (text == 4) {
return '微官网' return "微官网";
}else if(text == 5){ } else if (text == 5) {
return '好差评' return "好差评";
}else{ } else {
return '一体化评价' return "一体化评价";
} }
}, },
}, },
...@@ -137,12 +200,12 @@ export default { ...@@ -137,12 +200,12 @@ export default {
align: "center", align: "center",
dataIndex: "source", dataIndex: "source",
customRender: (text, record, index) => { customRender: (text, record, index) => {
if(text == 1){ if (text == 1) {
return '安卓' return "安卓";
}else if(text == 2){ } else if (text == 2) {
return '导视机' return "导视机";
}else{ } else {
return '微信' return "微信";
} }
}, },
}, },
...@@ -163,170 +226,151 @@ export default { ...@@ -163,170 +226,151 @@ export default {
}, },
}, },
], ],
BegindAndEndTime: [], BegindAndEndTime: [
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
],
searchName: undefined, searchName: undefined,
//删除窗口判断 //删除窗口判断
visible: false, visible: false,
tableSourceData:[], tableSourceData: [],
evaCount:0,//评价次数 evaCount: 0, //评价次数
evaChoose:[],//评价选项 evaChoose: [], //评价选项
evaFrom:[0],// 评价来源 evaFrom: [0], // 评价来源
evaDates:[],// 评价日期 evaDates: [], // 评价日期
content:'此操作将删除该评价信息,是否继续?', content: "此操作将删除该评价信息,是否继续?",
delId:null,//当前删除id delId: null, //当前删除id
tHeader: [
// 导出的表头名信息
"排队编号",
"评价选项",
"评价人",
"身份证号码",
"手机号",
"评价时间",
"评价来源",
"评价设备",
],
filterVal: [
// 导出的表头字段名,需要导出表格字段名
"flounum",
"option_id",
"idcard_Name",
"idcard_IDCardNo",
"phone",
"create_time",
"pjxt",
"source",
],
tableSelectedKeys: [],
tableSelectedRows: [],
}; };
}, },
components: { components: {
HandlingDetails HandlingDetails,
}, },
mounted() { mounted() {
this.setMoment(); this.setMoment();
// 设置默认时间为今天 this.togetevalist();
this.evaDates=[this.$moment(new Date()).format("YYYY-MM-DD"),this.$moment(new Date()).format("YYYY-MM-DD")]
this.togetevalist()
}, },
methods: { methods: {
//导出 delTable() {
toexportTable() {
let tableData = [];
// 拼接评价选项
let chooseStr = this.evaChoose.join(',')
// 要先拼接评价来源
let fromString = this.evaFrom.join(',')
if (this.tableSelectedRows.length == 0) {
getEvaList({
page:1,
size:-1,
type:'phpj',
option_id:chooseStr,
pjxt:fromString,//传0代表全部
time:this.evaDates,
info:this.searchName
}).then((res)=>{
const{code,data} = res;
if(code == 1){
tableData = JSON.parse(JSON.stringify(data.data.data));
tableData.forEach((item)=>{
item.pjxt = item.pjxt == 1?'窗口评价':item.pjxt == 2?'自助服务终端':item.pjxt == 3?'背靠背评价':item.pjxt == 4?'微官网':item.pjxt == 5?'好差评':'一体化评价'
item.source = item.source == 1?'安卓': item.source == 2?'导视机':'微信'
})
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.pjxt = item.pjxt == 1?'窗口评价':item.pjxt == 2?'自助服务终端':item.pjxt == 3?'背靠背评价':item.pjxt == 4?'微官网':item.pjxt == 5?'好差评':'一体化评价'
item.source = item.source == 1?'安卓': item.source == 2?'导视机':'微信'
})
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);
}
},
delTable(){
this.visible = true; this.visible = true;
if(!this.tableSelectedRows.length){ if (!this.tableSelectedRows.length) {
this.content = '一条评论都没有选中' this.content = "一条评论都没有选中";
}else{ } else {
this.content = '此操作将删除这些评价信息,是否继续?' this.content = "此操作将删除这些评价信息,是否继续?";
let arr = [] let arr = [];
this.tableSelectedRows.forEach(item => { this.tableSelectedRows.forEach((item) => {
arr.push(item.id) arr.push(item.id);
}); });
this.delId = arr this.delId = arr;
} }
}, },
togetEvaDetil(){ togetEvaDetil() {
getEvaDetil({ getEvaDetil({
id:this.delId id: this.delId,
}).then(res=>{ }).then((res) => {
{ {
this.delId=null this.delId = null;
this.visible = false; this.visible = false;
// 要刷新页面 // 要刷新页面
this.togetevalist() this.togetevalist();
} }
}) });
}, },
togetQueEvaData(record){ togetQueEvaData(record) {
getQueEvaData({ getQueEvaData({
id:record.id id: record.id,
}).then(res=>{ }).then((res) => {
console.log(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;
} }
}) });
}, },
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
} }
}) });
},
// 搜索
handleSearch() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.togetevalist();
}, },
togetevalist(){ //重置按钮
resetBtn() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.BegindAndEndTime = [
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
];
this.searchName = "";
this.togetevalist();
},
togetevalist() {
// 拼接评价选项 // 拼接评价选项
let chooseStr = this.evaChoose.join(',') let chooseStr = this.evaChoose.join(",");
// 要先拼接评价来源 // 要先拼接评价来源
let fromString = this.evaFrom.join(',') let fromString = this.evaFrom.join(",");
getEvaList({ 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: chooseStr,
pjxt:fromString,//传0代表全部 pjxt: fromString, //传0代表全部
time:this.evaDates, time: this.BegindAndEndTime,
info:this.searchName info: this.searchName,
}).then((res)=>{ }).then((res) => {
console.log(11111,res); const { code, data } = res;
const{code,data} = res; if (code == 1) {
if(code == 1){ this.tableSourceData = data.data.data;
this.tableSourceData = data.data.data this.evaCount = data.count;
this.evaCount = data.count this.tablePagination.total = data.count;
this.tablePagination.total = data.count
} }
}) });
}, },
changeEvaFrom(val){ changeEvaFrom(val) {
if(val.length){ if (val.length) {
this.evaFrom = val; this.evaFrom = val;
}else{ } else {
this.evaFrom = [0] this.evaFrom = [0];
} }
}, },
changeEvaChoose(val){ changeEvaChoose(val) {
this.evaChoose = val this.evaChoose = val;
}, },
rangePickerChange(val) {
this.evaDates = [this.$moment(val[0]).format("YYYY-MM-DD"),this.$moment(val[1]).format("YYYY-MM-DD")]
},
QueueState(type) { QueueState(type) {
switch (type) { switch (type) {
case 0: case 0:
...@@ -344,7 +388,7 @@ export default { ...@@ -344,7 +388,7 @@ export default {
// if(record.pjxt==1){ // 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{ // }else{
// this.$refs.HandlingDetails.modalInfo.title = "评价详情"; // this.$refs.HandlingDetails.modalInfo.title = "评价详情";
// this.$refs.HandlingDetails.modalInfo.show = 2; // this.$refs.HandlingDetails.modalInfo.show = 2;
...@@ -356,14 +400,87 @@ export default { ...@@ -356,14 +400,87 @@ export default {
//删除模态框 //删除模态框
showModal(record) { showModal(record) {
this.visible = true; this.visible = true;
this.delId = record.id this.delId = record.id;
}, },
// 选中
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);
});
}, },
watch:{ // 导出
tablePagination(){ async handleExportTable() {
this.togetevalist() this.btnLoading = true;
let obj = {
1: "窗口评价",
2: "自助服务终端",
3: "背靠背评价",
4: "微官网",
5: "好差评",
6: "一体化评价",
};
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
this.tableSelectedRows.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.pjxt == keys) {
item.pjxt = obj[keys];
} }
});
});
export2Excel(
this.tHeader,
this.filterVal,
this.tableSelectedRows,
"办理事项评价评价记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
// 拼接评价选项
let chooseStr = this.evaChoose.join(",");
// 要先拼接评价来源
let fromString = this.evaFrom.join(",");
getEvaList({
page: 1,
size: -1,
type: "phpj",
option_id: chooseStr,
pjxt: fromString, //传0代表全部
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) => {
if (item.pjxt == key) {
item.pjxt = obj[key];
}
});
} }
export2Excel(
this.tHeader,
this.filterVal,
data.data.data,
"办理事项评价评价记录报表" +
this.$moment().format("YYYYMMDDHHmmss")
);
}
});
}
this.btnLoading = false;
},
},
watch: {
tablePagination() {
this.togetevalist();
},
},
}; };
</script> </script>
...@@ -378,7 +495,7 @@ export default { ...@@ -378,7 +495,7 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
&>div { & > div {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
......
...@@ -2,25 +2,41 @@ ...@@ -2,25 +2,41 @@
<div class="callRecord-Container"> <div class="callRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button type="success" @click="toexportTable"> <a-button
type="success"
:loading="btnLoading"
@click="handleExportTable"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button> </a-button>
<a-button type="danger" @click="delTable"> <a-button type="danger" @click="delTable">
<span>批量删除</span> <span>批量删除</span>
</a-button> </a-button>
<b>评价次数:<i>{{evaCount}}</i></b> <b
<sub>统计时间段:{{evaDates[0]}}~{{evaDates[1]}}</sub> >评价次数:<i>{{ evaCount }}</i></b
>
<sub
>统计时间段:{{ BegindAndEndTime[0] }}~{{ BegindAndEndTime[1] }}</sub
>
</div> </div>
<span> <span>
<a-space> <a-space>
<a-select placeholder="全部评价" @change="changeEvaChoose" mode="multiple"> <a-select
placeholder="全部评价"
@change="changeEvaChoose"
mode="multiple"
>
<a-select-option value="非常满意"> 非常满意 </a-select-option> <a-select-option value="非常满意"> 非常满意 </a-select-option>
<a-select-option value="基本满意"> 基本满意 </a-select-option> <a-select-option value="基本满意"> 基本满意 </a-select-option>
<a-select-option value="满意"> 满意 </a-select-option> <a-select-option value="满意"> 满意 </a-select-option>
<a-select-option value="不满意"> 不满意 </a-select-option> <a-select-option value="不满意"> 不满意 </a-select-option>
<a-select-option value="非常不满意"> 非常不满意 </a-select-option> <a-select-option value="非常不满意"> 非常不满意 </a-select-option>
</a-select> </a-select>
<a-select placeholder="全部来源" @change="changeEvaFrom" mode="multiple"> <a-select
placeholder="全部来源"
@change="changeEvaFrom"
mode="multiple"
>
<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-option value="3"> 背靠背评价 </a-select-option> <a-select-option value="3"> 背靠背评价 </a-select-option>
...@@ -29,35 +45,66 @@ ...@@ -29,35 +45,66 @@
<a-select-option value="6"> 一体化评价 </a-select-option> <a-select-option value="6"> 一体化评价 </a-select-option>
</a-select> </a-select>
<a-range-picker :allowClear="false" format="YYYY年MM月DD日" class="range_picker_style" @change="rangePickerChange" <a-range-picker
v-model="BegindAndEndTime"> format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD"
class="range_picker_style"
v-model="BegindAndEndTime"
>
</a-range-picker> </a-range-picker>
<a-input v-model="searchName" placeholder="请输入评价人姓名或窗口编号搜索"> <a-input v-model="searchName" placeholder="请输入内容搜索搜索">
<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="resetBtn">重置</a-button>
</a-space> </a-space>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ <a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys, selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" :scroll="{ y: 590 }" :pagination="tablePagination" @change="pagTableChange" :loading="tableLoading" }"
:columns="tableHeaders" :dataSource="tableSourceData"> :scroll="{ y: 590 }"
<template slot="评价人照片" slot-scope="text, record, index"> :pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<!-- 序号 -->
<span slot="index" slot-scope="text, record, index">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1
}}</span>
<template slot="评价人照片" slot-scope="text">
<a-avatar v-if="!text" shape="square" :size="40" icon="user" /> <a-avatar v-if="!text" shape="square" :size="40" icon="user" />
<img v-else :src="process.env.VUE_APP_API_BASE_URL+text" alt="" srcset=""> <img
v-else
:src="process.env.VUE_APP_API_BASE_URL + text"
alt=""
srcset=""
/>
</template> </template>
<template slot="操作" slot-scope="text, record, index"> <template slot="操作" slot-scope="text, record">
<a-button type="link" style="color:#FF7370;" @click="showModal(record)">删除</a-button> <a-button
<a-button type="link" @click="openHandlingDetails(record)">详情</a-button> type="link"
style="color: #ff7370"
@click="showModal(record)"
>删除</a-button
>
<a-button type="link" @click="openHandlingDetails(record)"
>详情</a-button
>
</template> </template>
</a-table> </a-table>
<HandlingDetails ref="HandlingDetails" /> <HandlingDetails ref="HandlingDetails" />
<a-modal v-model="visible" title="系统提示" @ok="togetEvaDetil()"> <a-modal v-model="visible" title="系统提示" @ok="togetEvaDetil()">
{{content}} {{ content }}
</a-modal> </a-modal>
</div> </div>
</div> </div>
...@@ -65,27 +112,34 @@ ...@@ -65,27 +112,34 @@
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import { export2Excel } from "@/utils/js/exportExcel";
import HandlingDetails from "./components/HandlingDetails.vue"; import HandlingDetails from "./components/HandlingDetails.vue";
import { getEvaList, getEvaData, getEvaDetil, getQueEvaData } from "@/api/dataAdmin"; import {
getEvaList,
getEvaData,
getEvaDetil,
getQueEvaData,
} from "@/api/dataAdmin";
export default { export default {
mixins: [table], mixins: [table],
name: "windowsEvaluation", name: "windowsEvaluation",
data() { data() {
return { return {
btnLoading: false,
tableHeaders: [ tableHeaders: [
{ {
title: "序号", title: "序号",
dataIndex: "index",
width: "60px", width: "60px",
key: "index",
align: "center", align: "center",
customRender: (text, record, index) => `${index + 1}`, scopedSlots: {
customRender: "index",
},
}, },
{ {
title: "窗口编号", title: "窗口编号",
align: "center", align: "center",
dataIndex: "window", dataIndex: "flounum",
}, },
{ {
title: "评价选项", title: "评价选项",
...@@ -95,17 +149,23 @@ export default { ...@@ -95,17 +149,23 @@ export default {
{ {
title: "评价人", title: "评价人",
align: "center", align: "center",
dataIndex: "idcard_Name", customRender: (text) => {
return text.idcard_Name ? text.idcard_Name : "--";
},
}, },
{ {
title: "身份证号", title: "身份证号",
align: "center", align: "center",
dataIndex: "idcard_IDCardNo", customRender: (text) => {
return text.idcard_IDCardNo ? text.idcard_IDCardNo : "--";
},
}, },
{ {
title: "手机号", title: "手机号",
align: "center", align: "center",
dataIndex: "phone", customRender: (text) => {
return text.phone ? text.phone : "--";
},
}, },
{ {
title: "评价时间", title: "评价时间",
...@@ -117,18 +177,18 @@ export default { ...@@ -117,18 +177,18 @@ export default {
align: "center", align: "center",
dataIndex: "pjxt", dataIndex: "pjxt",
customRender: (text, record, index) => { customRender: (text, record, index) => {
if(text == 1){ if (text == 1) {
return '窗口评价' return "窗口评价";
}else if(text == 2){ } else if (text == 2) {
return '自助服务终端' return "自助服务终端";
}else if(text == 3){ } else if (text == 3) {
return '背靠背评价' return "背靠背评价";
}else if(text == 4){ } else if (text == 4) {
return '微官网' return "微官网";
}else if(text == 5){ } else if (text == 5) {
return '好差评' return "好差评";
}else{ } else {
return '一体化评价' return "一体化评价";
} }
}, },
}, },
...@@ -137,12 +197,12 @@ export default { ...@@ -137,12 +197,12 @@ export default {
align: "center", align: "center",
dataIndex: "source", dataIndex: "source",
customRender: (text, record, index) => { customRender: (text, record, index) => {
if(text == 1){ if (text == 1) {
return '安卓' return "安卓";
}else if(text == 2){ } else if (text == 2) {
return '导视机' return "导视机";
}else{ } else {
return '微信' return "微信";
} }
}, },
}, },
...@@ -163,165 +223,149 @@ export default { ...@@ -163,165 +223,149 @@ export default {
}, },
}, },
], ],
BegindAndEndTime: [], BegindAndEndTime: [
searchName: undefined,// 搜索内容 this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
], // 评价日期
searchName: undefined, // 搜索内容
//删除窗口判断 //删除窗口判断
visible: false, visible: false,
tableSourceData:[], tableSourceData: [],
evaCount:0,//评价次数 evaCount: 0, //评价次数
evaChoose:[],//评价选项 evaChoose: [], //评价选项
evaFrom:[0],// 评价来源 evaFrom: [0], // 评价来源
evaDates:[],// 评价日期 // evaDates: [], // 评价日期
content:'此操作将删除该评价信息,是否继续?', content: "此操作将删除该评价信息,是否继续?",
delId:null,//当前删除id delId: null, //当前删除id
tableSelectedKeys: [],
tableSelectedRows: [],
tHeader: [
// 导出的表头名信息
"窗口编号",
"评价选项",
"评价人",
"身份证号码",
"手机号",
"评价时间",
"评价来源",
"评价设备",
],
filterVal: [
// 导出的表头字段名,需要导出表格字段名
"flounum",
"option_id",
"idcard_Name",
"idcard_IDCardNo",
"phone",
"create_time",
"pjxt",
"source",
],
}; };
}, },
components: { components: {
HandlingDetails HandlingDetails,
}, },
mounted() { mounted() {
this.setMoment(); this.setMoment();
// 设置默认时间为今天 this.togetevalist();
this.evaDates=[this.$moment(new Date()).format("YYYY-MM-DD"),this.$moment(new Date()).format("YYYY-MM-DD")]
this.togetevalist()
}, },
methods: { methods: {
//导出 delTable() {
toexportTable() {
let tableData = [];
// 拼接评价选项
let chooseStr = this.evaChoose.join(',')
// 要先拼接评价来源
let fromString = this.evaFrom.join(',')
if (this.tableSelectedRows.length == 0) {
getEvaList({
page:1,
size:-1,
type:'ckpj',
option_id:chooseStr,
pjxt:fromString,//传0代表全部
time:this.evaDates,
info:this.searchName
}).then((res)=>{
const{code,data} = res;
if(code == 1){
tableData = JSON.parse(JSON.stringify(data.data.data));
tableData.forEach((item)=>{
item.pjxt = item.pjxt == 1?'窗口评价':item.pjxt == 2?'自助服务终端':item.pjxt == 3?'背靠背评价':item.pjxt == 4?'微官网':item.pjxt == 5?'好差评':'一体化评价'
item.source = item.source == 1?'安卓': item.source == 2?'导视机':'微信'
})
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.pjxt = item.pjxt == 1?'窗口评价':item.pjxt == 2?'自助服务终端':item.pjxt == 3?'背靠背评价':item.pjxt == 4?'微官网':item.pjxt == 5?'好差评':'一体化评价'
item.source = item.source == 1?'安卓': item.source == 2?'导视机':'微信'
})
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);
}
},
delTable(){
this.visible = true; this.visible = true;
if(!this.tableSelectedRows.length){ if (!this.tableSelectedRows.length) {
this.content = '一条评论都没有选中' this.content = "一条评论都没有选中";
}else{ } else {
this.content = '此操作将删除这些评价信息,是否继续?' this.content = "此操作将删除这些评价信息,是否继续?";
let arr = [] let arr = [];
this.tableSelectedRows.forEach(item => { this.tableSelectedRows.forEach((item) => {
arr.push(item.id) arr.push(item.id);
}); });
this.delId = arr this.delId = arr;
} }
}, },
togetEvaDetil(){ togetEvaDetil() {
getEvaDetil({ getEvaDetil({
id:this.delId id: this.delId,
}).then(res=>{ }).then((res) => {
{ {
this.delId=null this.delId = null;
this.visible = false; this.visible = false;
// 要刷新页面 // 要刷新页面
this.togetevalist() this.togetevalist();
} }
}) });
}, },
togetQueEvaData(record){ togetQueEvaData(record) {
getQueEvaData({ getQueEvaData({
id:record.id id: record.id,
}).then(res=>{ }).then((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;
} }
}) });
}, },
togetEvaData(id){ togetEvaData(id) {
getEvaData({ getEvaData({
id:id id: id,
}).then(res=>{ }).then((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(){ // 搜索
handleSearch() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.togetevalist();
},
//重置按钮
resetBtn() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.BegindAndEndTime = [
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
];
this.searchName = "";
this.togetevalist();
},
togetevalist() {
// 拼接评价选项 // 拼接评价选项
let chooseStr = this.evaChoose.join(',') let chooseStr = this.evaChoose.join(",");
// 要先拼接评价来源 // 要先拼接评价来源
let fromString = this.evaFrom.join(',') let fromString = this.evaFrom.join(",");
getEvaList({ 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: chooseStr,
pjxt:fromString,//传0代表全部 pjxt: fromString, //传0代表全部
time:this.evaDates, time: this.BegindAndEndTime,
info:this.searchName info: this.searchName,
}).then((res)=>{ }).then((res) => {
const{code,data} = res; const { code, data } = res;
if(code == 1){ if (code == 1) {
this.tableSourceData = data.data.data this.tableSourceData = data.data.data;
this.evaCount = data.count this.evaCount = data.count;
this.tablePagination.total = data.count this.tablePagination.total = data.count;
} }
}) });
}, },
changeEvaFrom(val){ changeEvaFrom(val) {
if(val.length){ if (val.length) {
this.evaFrom = val; this.evaFrom = val;
}else{ } else {
this.evaFrom = [0] this.evaFrom = [0];
} }
}, },
changeEvaChoose(val){ changeEvaChoose(val) {
this.evaChoose = val this.evaChoose = val;
},
rangePickerChange(val) {
this.evaDates = [this.$moment(val[0]).format("YYYY-MM-DD"),this.$moment(val[1]).format("YYYY-MM-DD")]
}, },
QueueState(type) { QueueState(type) {
...@@ -338,14 +382,14 @@ export default { ...@@ -338,14 +382,14 @@ export default {
//详情模块 //详情模块
openHandlingDetails(record) { openHandlingDetails(record) {
// 判断为窗口屏或者其他状况,调用不同接口 // 判断为窗口屏或者其他状况,调用不同接口
if(record.pjxt==1){ 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{ } 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;
...@@ -353,14 +397,86 @@ export default { ...@@ -353,14 +397,86 @@ export default {
//删除模态框 //删除模态框
showModal(record) { showModal(record) {
this.visible = true; this.visible = true;
this.delId = record.id this.delId = record.id;
}, },
// 选中
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);
});
}, },
watch:{ // 导出
tablePagination(){ async handleExportTable() {
this.togetevalist() this.btnLoading = true;
let obj = {
1: "窗口评价",
2: "自助服务终端",
3: "背靠背评价",
4: "微官网",
5: "好差评",
6: "一体化评价",
};
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
this.tableSelectedRows.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.pjxt == keys) {
item.pjxt = obj[keys];
} }
});
});
export2Excel(
this.tHeader,
this.filterVal,
this.tableSelectedRows,
"窗口服务评价记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
// 拼接评价选项
let chooseStr = this.evaChoose.join(",");
// 要先拼接评价来源
let fromString = this.evaFrom.join(",");
getEvaList({
page: 1,
size: -1,
type: "ckpj",
option_id: chooseStr,
pjxt: fromString, //传0代表全部
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) => {
if (item.pjxt == key) {
item.pjxt = obj[key];
}
});
} }
export2Excel(
this.tHeader,
this.filterVal,
data.data.data,
"窗口服务评价记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
}
});
}
this.btnLoading = false;
},
},
watch: {
tablePagination() {
this.togetevalist();
},
},
}; };
</script> </script>
...@@ -375,7 +491,7 @@ export default { ...@@ -375,7 +491,7 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
&>div { & > div {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
......
...@@ -2,58 +2,89 @@ ...@@ -2,58 +2,89 @@
<div class="callRecord-Container"> <div class="callRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button type="success" @click="toexportTable"> <a-button
:loading="btnLoading"
type="success"
@click="handleExportTable"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button> </a-button>
<b>填单次数:<i>{{tablePagination.total}}</i></b> <b
<sub>统计时间段:{{BegindAndEndTime[0]}}~{{BegindAndEndTime[1]}}</sub> >填单次数:<i>{{ tablePagination.total }}</i></b
>
<sub
>统计时间段:{{ BegindAndEndTime[0] }}~{{ BegindAndEndTime[1] }}</sub
>
</div> </div>
<span> <span>
<a-space> <a-space>
<!-- <a-input-group compact> --> <!-- <a-input-group compact> -->
<a-select :default-value="1" style="width:25%" @change="changeSearchType"> <a-select
<a-select-option :value="1"> :default-value="1"
按事项 style="width: 25%"
</a-select-option> @change="changeSearchType"
<a-select-option :value="2"> >
按材料 <a-select-option :value="1"> 按事项 </a-select-option>
</a-select-option> <a-select-option :value="2"> 按材料 </a-select-option>
</a-select> </a-select>
<a-input style="width:73%" v-model="searchName" placeholder="请输入评价人姓名或窗口编号搜索">
<a-icon slot="prefix" type="search" />
</a-input>
<!-- </a-input-group> -->
<a-range-picker format="YYYY年MM月DD日" class="range_picker_style" @change="rangePickerChange">
</a-range-picker>
<a-select placeholder="全部状态" @change="changeStatu"> <a-select placeholder="全部状态" @change="changeStatu">
<a-select-option :value="0"> 全部类型 </a-select-option> <a-select-option :value="0"> 全部类型 </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-button type="primary" @click="togetPrintList">搜索</a-button> <a-input v-model="searchName" placeholder="请输入名称搜索">
<a-icon slot="prefix" type="search" />
</a-input>
<!-- </a-input-group> -->
<a-range-picker
format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD"
class="range_picker_style"
v-model="BegindAndEndTime"
>
</a-range-picker>
<a-button type="primary" @click="handleSearch">搜索</a-button>
<a-button @click="handleReset">重置</a-button>
</a-space> </a-space>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ <a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys, selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" :scroll="{ y: 590 }" :pagination="tablePagination" @change="pagTableChange" :loading="tableLoading" }"
:columns="tableHeaders" :dataSource="tableSourceData"> :scroll="{ y: 590 }"
<template slot="事项名称" slot-scope="text, record, index"> :pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<!-- 序号 -->
<span slot="index" slot-scope="text, record, index">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1
}}</span>
<template slot="事项名称" slot-scope="text, record">
<div> <div>
{{record.matterName?record.matterName:'--'}} {{ record.matterName ? record.matterName : "--" }}
</div> </div>
<div class="tabFont"> <div class="tabFont">
事项全称:{{record.matterFullName?record.matterFullName:"--"}} 事项全称:{{ record.matterFullName ? record.matterFullName : "--" }}
</div> </div>
</template> </template>
<template slot="材料名称" slot-scope="text, record, index"> <template slot="材料名称" slot-scope="text, record">
<div> <div>
{{record.materialName?record.materialName:'--'}} {{ record.materialName ? record.materialName : "--" }}
</div> </div>
<div class="tabFont"> <div class="tabFont">
样表全称:{{record.materialFullName?record.materialFullName:"--"}} 样表全称:{{
record.materialFullName ? record.materialFullName : "--"
}}
</div> </div>
</template> </template>
</a-table> </a-table>
...@@ -64,21 +95,21 @@ ...@@ -64,21 +95,21 @@
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import { getPrintList } from "@/api/dataAdmin"; import { getPrintList } from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel";
export default { export default {
mixins: [table], mixins: [table],
name: "fillForm", name: "fillForm",
data() { data() {
return { return {
btnLoading: false,
tableHeaders: [ tableHeaders: [
{ {
title: "序号", title: "序号",
dataIndex: "index",
width: "60px", width: "60px",
key: "index",
align: "center", align: "center",
customRender: (text, record, index) => `${index + 1}`, scopedSlots: {
customRender: "index",
},
}, },
{ {
title: "事项名称", title: "事项名称",
...@@ -101,29 +132,36 @@ export default { ...@@ -101,29 +132,36 @@ export default {
{ {
title: "用户姓名", title: "用户姓名",
align: "center", align: "center",
dataIndex: "idName", customRender: (text) => {
return text.idName ? text.idName : "--";
},
}, },
{ {
title: "身份证号", title: "身份证号",
align: "center", align: "center",
dataIndex: "idCard", customRender: (text) => {
return text.idCard ? text.idCard : "--";
},
}, },
{ {
title: "手机号码", title: "手机号码",
align: "center", align: "center",
dataIndex: "mobile", customRender: (text) => {
return text.mobile ? text.mobile : "--";
},
}, },
{ {
title: "设备名称", title: "设备名称",
align: "center", align: "center",
dataIndex: "deviceName", customRender: (text) => {
return text.deviceName ? text.deviceName : "--";
},
}, },
{ {
title: "结果类型", title: "结果类型",
align: "center", align: "center",
dataIndex: "type",
customRender: (text, record, index) => { customRender: (text, record, index) => {
return text==1?'本地打印':'在线打印' return text == 1 ? "本地打印" : "在线提交";
}, },
}, },
{ {
...@@ -137,123 +175,105 @@ export default { ...@@ -137,123 +175,105 @@ export default {
// dataIndex: "累计耗时", // dataIndex: "累计耗时",
// }, // },
], ],
BegindAndEndTime: [], BegindAndEndTime: [
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
],
searchName: undefined, searchName: undefined,
searchType:1, searchType: 1,
siteId:undefined, siteId: JSON.parse(localStorage.getItem("siteId")),
statu:undefined statu: undefined,
tableSelectedKeys: [],
tableSelectedRows: [],
tHeader: [
// 导出的表头名信息
"事项简称",
"事项全称",
"材料简称",
"材料全称",
"用户姓名",
"身份证号码",
"手机号码",
"设备名称",
"结果类型",
"操作时间",
],
filterVal: [
// 导出的表头字段名,需要导出表格字段名
"matterName",
"matterFullName",
"materialName",
"materialFullName",
"idName",
"idCard",
"mobile",
"deviceName",
"type",
"createTime",
],
}; };
}, },
components: { components: {},
},
mounted() { mounted() {
this.setMoment(); this.setMoment();
this.BegindAndEndTime=[this.$moment(new Date()).format("YYYY-MM-DD"),this.$moment(new Date()).format("YYYY-MM-DD")] this.togetPrintList();
this.siteId = JSON.parse(localStorage.getItem('siteId')) },
this.togetPrintList() watch: {
tablePagination() {
this.togetPrintList();
}, },
watch:{
tablePagination(){
this.togetPrintList()
}
}, },
methods: { methods: {
//导出 changeStatu(val) {
toexportTable() { this.statu = val;
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){ changeSearchType(val) {
this.statu = val this.searchType = val;
}, },
changeSearchType(val){ handleSearch() {
this.searchType = val this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.togetPrintList();
}, },
togetPrintList(){ togetPrintList() {
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:"%%", matterName: "%%",
materialName:"%%", materialName: "%%",
createTimeStart:this.BegindAndEndTime[0], createTimeStart: this.BegindAndEndTime[0],
createTimeEnd:this.BegindAndEndTime[1], createTimeEnd: this.BegindAndEndTime[1],
} };
if(this.statu && this.statu!=0){ if (this.statu && this.statu != 0) {
pramse.type=this.statu pramse.type = this.statu;
} }
if(this.searchType==1 && this.searchName){ if (this.searchType == 1 && this.searchName) {
pramse.matterName = '%'+this.searchName+'%' pramse.matterName = "%" + this.searchName + "%";
}else if(this.searchName){ } else if (this.searchName) {
pramse.materialName='%'+this.searchName+'%' pramse.materialName = "%" + this.searchName + "%";
} }
getPrintList(pramse).then((res)=>{ getPrintList(pramse).then((res) => {
const{code,data} = res; const { code, data } = res;
if(code==1){ if (code == 1) {
console.log(res); this.tableSourceData = data.data;
this.tableSourceData = data.data this.tablePagination.total = data.total;
this.tablePagination.total = data.total
} }
}) });
}, },
rangePickerChange(val) { // 重置
this.BegindAndEndTime=[this.$moment(val[0]).format("YYYY-MM-DD"),this.$moment(val[1]).format("YYYY-MM-DD")] handleReset() {
this.BegindAndEndTime = [
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
];
this.searchName = undefined;
this.searchType = 1;
this.statu = undefined;
this.tablePagination.current = 1;
this.togetPrintList();
}, },
QueueState(type) { QueueState(type) {
switch (type) { switch (type) {
case 0: case 0:
...@@ -265,7 +285,79 @@ export default { ...@@ -265,7 +285,79 @@ export default {
return "type0"; return "type0";
} }
}, },
// 选中
onSelectChange(keys, rows) {
this.tableSelectedKeys = keys;
const res = new Map();
this.tableSelectedRows = [...this.tableSelectedRows, ...rows]
.filter((v) => {
return !res.has(v.id) && res.set(v.id, 1);
})
.filter((v) => {
return this.tableSelectedKeys.some((val) => v.id == val);
});
},
// 导出
handleExportTable() {
this.btnLoading = true;
let obj = {
1: "本地打印",
2: "在线提交",
};
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
this.tableSelectedRows.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.type == keys) {
item.type = obj[keys];
}
});
});
export2Excel(
this.tHeader,
this.filterVal,
this.tableSelectedRows,
"填单记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
let pramse = {
page: 1,
size: -1,
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) => {
if (item.type == key) {
item.type = obj[key];
}
});
}
export2Excel(
this.tHeader,
this.filterVal,
data.data,
"填单记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
}
});
}
this.btnLoading = false;
},
}, },
}; };
</script> </script>
...@@ -281,7 +373,7 @@ export default { ...@@ -281,7 +373,7 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
&>div { & > div {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
......
...@@ -2,16 +2,27 @@ ...@@ -2,16 +2,27 @@
<div class="callRecord-Container"> <div class="callRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button type="success" @click="exportTable"> <a-button
type="success"
@click="handleExportTable"
:loading="btnLoading"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button> </a-button>
<b>叫号次数:<i>{{ tablePagination.total }}</i></b> <b
>叫号次数:<i>{{ tablePagination.total }}</i></b
>
<sub>统计时间段:{{ searchForm.time[0] }}~{{ searchForm.time[1] }}</sub> <sub>统计时间段:{{ searchForm.time[0] }}~{{ searchForm.time[1] }}</sub>
</div> </div>
<span> <span>
<a-space>
<a-select v-model="searchForm.id" style="width: 120px"> <a-select v-model="searchForm.id" style="width: 120px">
<a-select-option value=""> 全部设备 </a-select-option> <a-select-option value=""> 全部设备 </a-select-option>
<a-select-option v-for="item in deviceData" :key="item.id" :value="item.id"> <a-select-option
v-for="item in deviceData"
:key="item.id"
:value="item.id"
>
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
...@@ -23,19 +34,33 @@ ...@@ -23,19 +34,33 @@
</a-select> </a-select>
<a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time"> <a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time">
</a-range-picker> </a-range-picker>
<a-input v-model="searchForm.flownum" placeholder="请输入排队编号搜索"> <a-input
v-model="searchForm.flownum"
placeholder="请输入排队编号搜索"
>
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<a-button type="primary" @click="getDataList">搜索</a-button> <a-button type="primary" @click="handleSearch">搜索</a-button>
<a-button @click="resetBtn">重置</a-button> <a-button @click="resetBtn">重置</a-button>
</a-space>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ <a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys, selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" :scroll="{ y: 590 }" :pagination="tablePagination" @change="changeTablePage" :loading="tableLoading" }"
:columns="tableHeaders" :dataSource="tableList"> :scroll="{ y: 590 }"
:pagination="tablePagination"
@change="changeTablePage"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableList"
>
<!-- 序号 --> <!-- 序号 -->
<span slot="num" slot-scope="text, record, index">{{ <span slot="num" slot-scope="text, record, index">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1 (tablePagination.current - 1) * tablePagination.pageSize + index + 1
...@@ -51,13 +76,17 @@ ...@@ -51,13 +76,17 @@
<template slot="people_phone" slot-scope="text"> <template slot="people_phone" slot-scope="text">
{{ text.people_phone ? text.people_phone : "--" }} {{ text.people_phone ? text.people_phone : "--" }}
</template> </template>
<!-- 取号设备 --> <!-- 呼叫设备 -->
<template slot="device_name" slot-scope="text"> <template slot="device_name" slot-scope="text">
{{ text.device_name ? text.device_name : "--" }} {{ text.device_name ? text.device_name : "--" }}
</template> </template>
<!-- 办理业务 --> <!-- 办理业务 -->
<template slot="business" slot-scope="text"> <template slot="business" slot-scope="text">
<a v-if="text.business" @click="openBusiness(text.business, text.businessid)">{{ text.business }}</a> <a
v-if="text.business"
@click="openBusiness(text.business, text.businessid)"
>{{ text.business }}</a
>
<span v-else>--</span> <span v-else>--</span>
</template> </template>
<!-- 办理开始时间 --> <!-- 办理开始时间 -->
...@@ -66,7 +95,11 @@ ...@@ -66,7 +95,11 @@
</template> </template>
<!-- 办理窗口 --> <!-- 办理窗口 -->
<template slot="window_name" slot-scope="text"> <template slot="window_name" slot-scope="text">
{{ text.window_name ? text.window_name : "--" }} {{
text.window_name
? text.window_name + "-" + text.window_fromnum
: "--"
}}
</template> </template>
<!-- 工作人员 --> <!-- 工作人员 -->
<template slot="workman_name" slot-scope="text"> <template slot="workman_name" slot-scope="text">
...@@ -85,11 +118,13 @@ ...@@ -85,11 +118,13 @@
</template> </template>
<!-- 状态 --> <!-- 状态 -->
<template slot="style" slot-scope="text"> <template slot="style" slot-scope="text">
<span :class="{ <span
:class="{
'stand-line': text.style === 0, 'stand-line': text.style === 0,
'on-transact': text.style === 1, 'on-transact': text.style === 1,
'on-end': text.style === 4, 'on-end': text.style === 4,
}"> }"
>
{{ $codeMap.queueState[text.style] }} {{ $codeMap.queueState[text.style] }}
</span> </span>
</template> </template>
...@@ -104,15 +139,21 @@ ...@@ -104,15 +139,21 @@
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import { export2Excel } from "@/utils/js/exportExcel";
import moment from "moment"; import moment from "moment";
import UserInfo from "./components/userInfo.vue"; import UserInfo from "./components/userInfo.vue";
import BusinessInfo from "./components/businessInfo.vue"; import BusinessInfo from "./components/businessInfo.vue";
import WorkpeopleInfo from "./components/workpeopleInfo.vue"; import WorkpeopleInfo from "./components/workpeopleInfo.vue";
import HandlingDetails from "./components/HandlingDetails.vue"; import HandlingDetails from "./components/HandlingDetails.vue";
import { import {
getCalllist, getCallQueList, getBusinessEvent, getQueueInfo, getCalllist,
getWorkerInfo, getPeopleanalyse, getWorkmananalyse getCallQueList,
} from "@/api/dataAdmin" getBusinessEvent,
getQueueInfo,
getWorkerInfo,
getPeopleanalyse,
getWorkmananalyse,
} from "@/api/dataAdmin";
export default { export default {
mixins: [table], mixins: [table],
name: "PortalAdminVuecallRecord", name: "PortalAdminVuecallRecord",
...@@ -243,6 +284,37 @@ export default { ...@@ -243,6 +284,37 @@ export default {
1: "办理中", 1: "办理中",
4: "办理完成", 4: "办理完成",
}, },
tHeader: [
// 导出的表头名信息
"排队编号",
"申报人",
"联系方式",
"取号时间",
"呼叫设备",
"办理业务",
"办理开始时间",
"办理窗口",
"工作人员",
"办理结束时间",
"状态",
],
filterVal: [
// 导出的表头字段名,需要导出表格字段名
"flownum",
"people_name",
"people_phone",
"taketime",
"device_name",
"business",
"calltime",
"window_name",
"workman_name",
"endtime",
"style",
],
btnLoading: false,
tableSelectedKeys: [],
tableSelectedRows: [],
}; };
}, },
components: { components: {
...@@ -253,25 +325,27 @@ export default { ...@@ -253,25 +325,27 @@ export default {
}, },
mounted() { mounted() {
this.setMoment(); this.setMoment();
this.getCalllistArr() this.getCalllistArr();
this.getCallQueListArr() this.getCallQueListArr();
}, },
methods: { methods: {
//搜索按钮 //搜索按钮
getDataList() { getDataList() {
this.tablePagination.current = 1 this.tablePagination.current = 1;
this.getCallQueListArr(); this.getCallQueListArr();
}, },
//重置按钮 //重置按钮
resetBtn() { resetBtn() {
this.tablePagination.current = 1 this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.tablePagination.current = 1;
this.searchForm = { this.searchForm = {
id: "", // 排队机id id: "", // 排队机id
style: "", // 状态 style: "", // 状态
time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间 time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间
flownum: "", // 排号编码 flownum: "", // 排号编码
} };
this.getCallQueListArr() this.getCallQueListArr();
}, },
//获取排号机设备列表 //获取排号机设备列表
async getCalllistArr() { async getCalllistArr() {
...@@ -280,6 +354,13 @@ export default { ...@@ -280,6 +354,13 @@ export default {
this.deviceData = res.data.data; this.deviceData = res.data.data;
}); });
}, },
// 搜索
handleSearch() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.getCallQueListArr();
},
// 获取列表数据 // 获取列表数据
getCallQueListArr() { getCallQueListArr() {
getCallQueList({ getCallQueList({
...@@ -293,50 +374,59 @@ export default { ...@@ -293,50 +374,59 @@ export default {
}, },
//分页 //分页
changeTablePage(page) { changeTablePage(page) {
this.pagTableChange(page) this.pagTableChange(page);
this.getCallQueListArr() this.getCallQueListArr();
}, },
//用户模态框 //用户模态框
async openDeclarant(item) { async openDeclarant(item) {
await getPeopleanalyse({ peopleid: item.peopleid, time: this.searchForm.time }).then(res => { await getPeopleanalyse({
if (res.code = 1) { peopleid: item.peopleid,
this.$refs.UserInfo.dataList = { ...item, ...res.data } time: this.searchForm.time,
}).then((res) => {
if ((res.code = 1)) {
this.$refs.UserInfo.dataList = { ...item, ...res.data };
// console.log(this.$refs.UserInfo.dataList) // console.log(this.$refs.UserInfo.dataList)
} }
}) });
this.$refs.UserInfo.modalInfo.title = "用户信息"; this.$refs.UserInfo.modalInfo.title = "用户信息";
this.$refs.UserInfo.modalInfo.width = "25%"; this.$refs.UserInfo.modalInfo.width = "25%";
this.$refs.UserInfo.modalInfo.visible = true; this.$refs.UserInfo.modalInfo.visible = true;
}, },
//业务关联模块 //业务关联模块
async openBusiness(business, id) { async openBusiness(business, id) {
await getBusinessEvent({ businessid: id, time: this.searchForm.time }).then(res => { await getBusinessEvent({
this.$refs.BusinessInfo.dataList = res.data businessid: id,
}) time: this.searchForm.time,
}).then((res) => {
this.$refs.BusinessInfo.dataList = res.data;
});
this.$refs.BusinessInfo.modalInfo.title = "业务分析"; this.$refs.BusinessInfo.modalInfo.title = "业务分析";
this.$refs.BusinessInfo.title = business this.$refs.BusinessInfo.title = business;
this.$refs.BusinessInfo.modalInfo.visible = true; this.$refs.BusinessInfo.modalInfo.visible = true;
}, },
//工作人员信息模态框 //工作人员信息模态框
async openWorkpeople(id) { async openWorkpeople(id) {
let a, b = {} let a,
await getWorkerInfo({ id }).then(res => { b = {};
a = res.data await getWorkerInfo({ id }).then((res) => {
}) a = res.data;
await getWorkmananalyse({ workmanid: id, time: this.searchForm.time }).then(res => { });
b = res.data await getWorkmananalyse({
}) workmanid: id,
this.$refs.WorkpeopleInfo.infoData = { ...a, ...b } time: this.searchForm.time,
console.log(this.$refs.WorkpeopleInfo.infoData) }).then((res) => {
b = res.data;
});
this.$refs.WorkpeopleInfo.infoData = { ...a, ...b };
this.$refs.WorkpeopleInfo.modalInfo.title = "工作人员信息"; this.$refs.WorkpeopleInfo.modalInfo.title = "工作人员信息";
this.$refs.WorkpeopleInfo.modalInfo.visible = true; this.$refs.WorkpeopleInfo.modalInfo.visible = true;
}, },
//详情信息抽屉 //详情信息抽屉
async openHandlingDetails(id) { async openHandlingDetails(id) {
//获取排队叫号对应ID详情 //获取排队叫号对应ID详情
await getQueueInfo({ id }).then(res => { await getQueueInfo({ id }).then((res) => {
this.$refs.HandlingDetails.dataList = res.data this.$refs.HandlingDetails.dataList = res.data;
}) });
this.$refs.HandlingDetails.modalInfo.title = "办理明细"; this.$refs.HandlingDetails.modalInfo.title = "办理明细";
this.$refs.HandlingDetails.modalInfo.visible = true; this.$refs.HandlingDetails.modalInfo.visible = true;
}, },
...@@ -355,6 +445,65 @@ export default { ...@@ -355,6 +445,65 @@ export default {
return "type0"; return "type0";
} }
}, },
// 选中
onSelectChange(keys, rows) {
this.tableSelectedKeys = keys;
const res = new Map();
this.tableSelectedRows = [...this.tableSelectedRows, ...rows]
.filter((v) => {
return !res.has(v.id) && res.set(v.id, 1);
})
.filter((v) => {
return this.tableSelectedKeys.some((val) => v.id == val);
});
},
// 导出
async handleExportTable() {
this.btnLoading = true;
let obj = {
0: "排队中",
1: "办理中",
4: "办理完成",
};
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
this.tableSelectedRows.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.style == keys) {
item.style = obj[keys];
}
});
});
export2Excel(
this.tHeader,
this.filterVal,
this.tableSelectedRows,
"呼叫记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
getCallQueList({
page: 1,
size: -1,
...this.searchForm,
}).then((res) => {
let { data } = res.data;
if (!data.length) return;
for (let item of data) {
Object.keys(obj).forEach((key) => {
if (item.style == key) {
item.style = obj[key];
}
});
}
export2Excel(
this.tHeader,
this.filterVal,
data,
"呼叫记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
});
}
this.btnLoading = false;
},
}, },
}; };
</script> </script>
...@@ -363,5 +512,12 @@ export default { ...@@ -363,5 +512,12 @@ export default {
/deep/.ant-spin-container { /deep/.ant-spin-container {
display: block !important; display: block !important;
} }
.stand-line {
color: #f23a3a;
}
.on-transact {
color: #04ca8f;
}
</style> </style>
<template> <template>
<div class="handling" ref="handling"> <div class="handling" ref="handling">
<a-drawer :destroyOnClose="true" :title="modalInfo.title" :width="modalInfo.width" :visible="modalInfo.visible" <a-drawer
@close="modalClose" @getContainer="() => $refs.handling"> :destroyOnClose="true"
:title="modalInfo.title"
:width="modalInfo.width"
:visible="modalInfo.visible"
@close="modalClose"
@getContainer="() => $refs.handling"
>
<div class="headerInfo"> <div class="headerInfo">
<!-- 头部耗时部分 --> <!-- 头部耗时部分 -->
<p> <p>
<span>总耗时:{{ dataList.alltime || "--" }} <span
<i v-show="dataList.alltime && compareTime(dataList.p_alltime,dataList.alltime)" class="fa fa-long-arrow-down"></i> >总耗时:{{ dataList.alltime || "--" }}
<i
v-show="
dataList.alltime &&
compareTime(dataList.p_alltime, dataList.alltime)
"
class="fa fa-long-arrow-down"
></i>
</span> </span>
<span>等待时间:{{ dataList.waittime || "--" }} <span
<i v-show="dataList.waittime && compareTime(dataList.p_waittime,dataList.waittime)" class="fa fa-long-arrow-down"></i> >等待时间:{{ dataList.waittime || "--" }}
<i
v-show="
dataList.waittime &&
compareTime(dataList.p_waittime, dataList.waittime)
"
class="fa fa-long-arrow-down"
></i>
</span> </span>
<span>办理时间:{{ dataList.bltime || "--" }} <span
<i v-show="dataList.bltime && compareTime(dataList.p_bltime , dataList.bltime)" class="fa fa-long-arrow-down"></i> >办理时间:{{ dataList.bltime || "--" }}
<i
v-show="
dataList.bltime &&
compareTime(dataList.p_bltime, dataList.bltime)
"
class="fa fa-long-arrow-down"
></i>
</span> </span>
</p> </p>
<p> <p>
...@@ -22,7 +49,12 @@ ...@@ -22,7 +49,12 @@
</p> </p>
</div> </div>
<div :class="returnScolor">{{ $codeMap.queueState[dataList.style] }}</div> <div :class="returnScolor">{{ $codeMap.queueState[dataList.style] }}</div>
<a-steps direction="vertical" size="small" :current="approveLs.length" class="steps_box"> <a-steps
direction="vertical"
size="small"
:current="approveLs.length"
class="steps_box"
>
<a-step :disabled="true" class="step_box"> <a-step :disabled="true" class="step_box">
<div class="icon_box" slot="icon"></div> <div class="icon_box" slot="icon"></div>
<div class="title_box" slot="title"> <div class="title_box" slot="title">
...@@ -30,12 +62,27 @@ ...@@ -30,12 +62,27 @@
</div> </div>
<div class="description_box" slot="description"> <div class="description_box" slot="description">
<div class="details"> <div class="details">
<span><i class="lable">申报人:</i>{{ dataList.people_name || "--" }}</span> <span
<span><i class="lable">取号时间:</i>{{ dataList.taketime || "--" }}</span> ><i class="lable">申报人:</i
<span><i class="lable">排队编码:</i>{{ dataList.flownum || "--" }}</span> >{{ dataList.people_name || "--" }}</span
<span><i class="lable">取号方式:</i>{{ $codeMap.takeNumWay[dataList.wy_signin] || "--" }}</span> >
<span
><i class="lable">取号时间:</i
>{{ dataList.taketime || "--" }}</span
>
<span
><i class="lable">排队编码:</i
>{{ dataList.flownum || "--" }}</span
>
<span
><i class="lable">取号方式:</i
>{{ $codeMap.takeNumWay[dataList.wy_signin] || "--" }}</span
>
<span><i class="lable">注册方式:</i>{{ "--" }}</span> <span><i class="lable">注册方式:</i>{{ "--" }}</span>
<span><i class="lable">取号设备:</i>{{ dataList.take_name || "--" }}</span> <span
><i class="lable">取号设备:</i
>{{ dataList.take_name || "--" }}</span
>
</div> </div>
</div> </div>
</a-step> </a-step>
...@@ -46,10 +93,22 @@ ...@@ -46,10 +93,22 @@
</div> </div>
<div class="description_box" slot="description"> <div class="description_box" slot="description">
<div class="details"> <div class="details">
<span><i class="lable">办理窗口:</i>{{ dataList.window_name || "--" }}</span> <span
<span><i class="lable">办理开始时间:</i>{{ dataList.calltime || "--" }}</span> ><i class="lable">办理窗口:</i
<span><i class="lable">工作人员:</i>{{ dataList.workman_name || "--" }}</span> >{{ dataList.window_name || "--" }}</span
<span><i class="lable">叫号设备:</i>{{ dataList.window_fromnum || "--" }}</span> >
<span
><i class="lable">办理开始时间:</i
>{{ dataList.calltime || "--" }}</span
>
<span
><i class="lable">工作人员:</i
>{{ dataList.workman_name || "--" }}</span
>
<span
><i class="lable">叫号设备:</i
>{{ dataList.window_fromnum || "--" }}</span
>
</div> </div>
</div> </div>
</a-step> </a-step>
...@@ -60,18 +119,19 @@ ...@@ -60,18 +119,19 @@
</div> </div>
<div class="description_box" slot="description"> <div class="description_box" slot="description">
<div class="details"> <div class="details">
<span><i class="lable">办理结束时间:</i>{{ dataList.endtime || "--" }}</span> <span
><i class="lable">办理结束时间:</i
>{{ dataList.endtime || "--" }}</span
>
</div> </div>
</div> </div>
</a-step> </a-step>
</a-steps> </a-steps>
</a-drawer> </a-drawer>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: "PortalAdminVueHandlingDetails", name: "PortalAdminVueHandlingDetails",
...@@ -81,8 +141,8 @@ export default { ...@@ -81,8 +141,8 @@ export default {
modalInfo: { modalInfo: {
confirmLoading: false, confirmLoading: false,
visible: false, visible: false,
title: '用户信息', title: "用户信息",
width: '38%', width: "38%",
}, },
dataList: [], dataList: [],
approveLs: [ approveLs: [
...@@ -116,8 +176,7 @@ export default { ...@@ -116,8 +176,7 @@ export default {
} }
}, },
}, },
mounted() { mounted() {},
},
methods: { methods: {
modalClose() { modalClose() {
...@@ -132,18 +191,19 @@ export default { ...@@ -132,18 +191,19 @@ export default {
}, },
// 转换时间为秒 // 转换时间为秒
timeToSec(time) { timeToSec(time) {
if (time !== null && time !== undefined) { if (time) {
var s = ""; var s = "";
if (time.includes("分钟") && time.includes("")) { if (time.includes("分钟") && time.includes("")) {
var min = time.split("分钟")[0]; var min = time.split("分钟")[0];
var sec = time.split("分钟")[1].split("")[0]; var sec = time.split("分钟")[1].split("")[0];
s = Number(min * 60) + Number(sec); s = Number(min * 60) + Number(sec);
return s; return s;
}else{ } else {
sec = time.split("")[0] sec = time.split("")[0];
return sec; return sec;
} }
} else {
return 0;
} }
}, },
}, },
...@@ -253,7 +313,7 @@ export default { ...@@ -253,7 +313,7 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
color: #BDBAB4; color: #bdbab4;
} }
.state1 { .state1 {
...@@ -262,7 +322,7 @@ export default { ...@@ -262,7 +322,7 @@ export default {
top: 150px; top: 150px;
width: 85px; width: 85px;
height: 85px; height: 85px;
border: 5px solid #FCE2D9; border: 5px solid #fce2d9;
border-radius: 50%; border-radius: 50%;
-webkit-transform: rotate(45deg); -webkit-transform: rotate(45deg);
transform: rotate(45deg); transform: rotate(45deg);
...@@ -278,7 +338,7 @@ export default { ...@@ -278,7 +338,7 @@ export default {
top: 150px; top: 150px;
width: 85px; width: 85px;
height: 85px; height: 85px;
border: 5px solid #D9F1E4; border: 5px solid #d9f1e4;
border-radius: 50%; border-radius: 50%;
-webkit-transform: rotate(45deg); -webkit-transform: rotate(45deg);
transform: rotate(45deg); transform: rotate(45deg);
...@@ -315,7 +375,7 @@ export default { ...@@ -315,7 +375,7 @@ export default {
} }
/deep/.ant-steps-item { /deep/.ant-steps-item {
&+.ant-steps-item { & + .ant-steps-item {
margin-top: 25px !important; margin-top: 25px !important;
} }
} }
......
...@@ -2,16 +2,27 @@ ...@@ -2,16 +2,27 @@
<div class="queueRecord-Container"> <div class="queueRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button type="success" @click="exportTable(tHeader, filterVal, style, downAllData)"> <a-button
:loading="btnLoading"
type="success"
@click="handleExportTable"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button> </a-button>
<b>叫号次数:<i>{{ tablePagination.total }}</i></b> <b
>叫号次数:<i>{{ tablePagination.total }}</i></b
>
<sub>统计时间段:{{ searchForm.time[0] }}~{{ searchForm.time[1] }}</sub> <sub>统计时间段:{{ searchForm.time[0] }}~{{ searchForm.time[1] }}</sub>
</div> </div>
<span> <span>
<a-space>
<a-select v-model="searchForm.id" style="width: 120px"> <a-select v-model="searchForm.id" style="width: 120px">
<a-select-option value=""> 全部设备 </a-select-option> <a-select-option value=""> 全部设备 </a-select-option>
<a-select-option v-for="item in deviceData" :key="item.id" :value="item.id"> <a-select-option
v-for="item in deviceData"
:key="item.id"
:value="item.id"
>
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
...@@ -23,19 +34,33 @@ ...@@ -23,19 +34,33 @@
</a-select> </a-select>
<a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time"> <a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time">
</a-range-picker> </a-range-picker>
<a-input v-model="searchForm.flownum" placeholder="请输入排队编号搜索"> <a-input
v-model="searchForm.flownum"
placeholder="请输入排队编号搜索"
>
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<a-button type="primary" @click="getDataList">搜索</a-button> <a-button type="primary" @click="handleSearch">搜索</a-button>
<a-button @click="resetBtn">重置</a-button> <a-button @click="resetBtn">重置</a-button>
</a-space>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ <a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys, selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" :scroll="{ y: 590 }" :pagination="tablePagination" @change="changeTablePage" :loading="tableLoading" }"
:columns="tableHeaders" :dataSource="tableList"> :scroll="{ y: 590 }"
:pagination="tablePagination"
@change="changeTablePage"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableList"
>
<!-- 序号 --> <!-- 序号 -->
<span slot="num" slot-scope="text, record, index">{{ <span slot="num" slot-scope="text, record, index">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1 (tablePagination.current - 1) * tablePagination.pageSize + index + 1
...@@ -57,7 +82,11 @@ ...@@ -57,7 +82,11 @@
</template> </template>
<!-- 办理业务 --> <!-- 办理业务 -->
<template slot="business" slot-scope="text"> <template slot="business" slot-scope="text">
<a v-if="text.business" @click="openBusiness(text.business, text.businessid)">{{ text.business }}</a> <a
v-if="text.business"
@click="openBusiness(text.business, text.businessid)"
>{{ text.business }}</a
>
<span v-else>--</span> <span v-else>--</span>
</template> </template>
<!-- 办理开始时间 --> <!-- 办理开始时间 -->
...@@ -66,7 +95,11 @@ ...@@ -66,7 +95,11 @@
</template> </template>
<!-- 办理窗口 --> <!-- 办理窗口 -->
<template slot="window_name" slot-scope="text"> <template slot="window_name" slot-scope="text">
{{ text.window_name ? text.window_name : "--" }} {{
text.window_name
? text.window_name + "-" + text.window_fromnum
: "--"
}}
</template> </template>
<!-- 工作人员 --> <!-- 工作人员 -->
<template slot="workman_name" slot-scope="text"> <template slot="workman_name" slot-scope="text">
...@@ -85,11 +118,13 @@ ...@@ -85,11 +118,13 @@
</template> </template>
<!-- 状态 --> <!-- 状态 -->
<template slot="style" slot-scope="text"> <template slot="style" slot-scope="text">
<span :class="{ <span
:class="{
'stand-line': text.style === 0, 'stand-line': text.style === 0,
'on-transact': text.style === 1, 'on-transact': text.style === 1,
'on-end': text.style === 4, 'on-end': text.style === 4,
}"> }"
>
{{ $codeMap.queueState[text.style] }} {{ $codeMap.queueState[text.style] }}
</span> </span>
</template> </template>
...@@ -110,14 +145,21 @@ import BusinessInfo from "./components/businessInfo.vue"; ...@@ -110,14 +145,21 @@ import BusinessInfo from "./components/businessInfo.vue";
import WorkpeopleInfo from "./components/workpeopleInfo.vue"; import WorkpeopleInfo from "./components/workpeopleInfo.vue";
import HandlingDetails from "./components/HandlingDetails.vue"; import HandlingDetails from "./components/HandlingDetails.vue";
import { import {
getTaskList, getQueueData, getQueueInfo, getBusinessEvent, getTaskList,
getWorkerInfo, getPeopleanalyse, getWorkmananalyse getQueueData,
getQueueInfo,
getBusinessEvent,
getWorkerInfo,
getPeopleanalyse,
getWorkmananalyse,
} from "@/api/dataAdmin"; } from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel";
export default { export default {
mixins: [table],
name: "PortalAdminVueQueueRecord", name: "PortalAdminVueQueueRecord",
mixins: [table],
data() { data() {
return { return {
btnLoading: false,
tableHeaders: [ tableHeaders: [
{ {
title: "序号", title: "序号",
...@@ -212,7 +254,9 @@ export default { ...@@ -212,7 +254,9 @@ export default {
}, },
}, },
], ],
tHeader: [// 导出的表头名信息
tHeader: [
// 导出的表头名信息
"排队编号", "排队编号",
"申报人", "申报人",
"联系方式", "联系方式",
...@@ -225,7 +269,8 @@ export default { ...@@ -225,7 +269,8 @@ export default {
"办理结束时间", "办理结束时间",
"状态", "状态",
], ],
filterVal: [// 导出的表头字段名,需要导出表格字段名 filterVal: [
// 导出的表头字段名,需要导出表格字段名
"flownum", "flownum",
"people_name", "people_name",
"people_phone", "people_phone",
...@@ -269,6 +314,8 @@ export default { ...@@ -269,6 +314,8 @@ export default {
1: "办理中", 1: "办理中",
4: "办理完成", 4: "办理完成",
}, },
tableSelectedKeys: [],
tableSelectedRows: [],
}; };
}, },
components: { components: {
...@@ -285,19 +332,21 @@ export default { ...@@ -285,19 +332,21 @@ export default {
methods: { methods: {
//搜索按钮 //搜索按钮
getDataList() { getDataList() {
this.tablePagination.current = 1 this.tablePagination.current = 1;
this.getQueueDataArr(); this.getQueueDataArr();
}, },
//重置按钮 //重置按钮
resetBtn() { resetBtn() {
this.tablePagination.current = 1 this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.searchForm = { this.searchForm = {
id: "", // 排队机id id: "", // 排队机id
style: "", // 状态 style: "", // 状态
time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间 time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间
flownum: "", // 排号编码 flownum: "", // 排号编码
} };
this.getQueueDataArr() this.getQueueDataArr();
}, },
//获取排号机设备列表 //获取排号机设备列表
async getTaskListArr() { async getTaskListArr() {
...@@ -306,6 +355,13 @@ export default { ...@@ -306,6 +355,13 @@ export default {
this.deviceData = res.data.data; this.deviceData = res.data.data;
}); });
}, },
// 搜索
handleSearch() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.getQueueDataArr();
},
// 获取列表数据 // 获取列表数据
getQueueDataArr() { getQueueDataArr() {
getQueueData({ getQueueData({
...@@ -319,65 +375,132 @@ export default { ...@@ -319,65 +375,132 @@ export default {
}, },
//分页 //分页
changeTablePage(page) { changeTablePage(page) {
this.pagTableChange(page) this.pagTableChange(page);
this.getQueueDataArr() this.getQueueDataArr();
}, },
//用户模态框 //用户模态框
async openDeclarant(item) { async openDeclarant(item) {
await getPeopleanalyse({ peopleid: item.peopleid, time: this.searchForm.time }).then(res => { await getPeopleanalyse({
if (res.code = 1) { peopleid: item.peopleid,
this.$refs.UserInfo.dataList = { ...item, ...res.data } time: this.searchForm.time,
}).then((res) => {
if ((res.code = 1)) {
this.$refs.UserInfo.dataList = { ...item, ...res.data };
// console.log(this.$refs.UserInfo.dataList) // console.log(this.$refs.UserInfo.dataList)
} }
}) });
this.$refs.UserInfo.modalInfo.title = "用户信息"; this.$refs.UserInfo.modalInfo.title = "用户信息";
this.$refs.UserInfo.modalInfo.width = "25%"; this.$refs.UserInfo.modalInfo.width = "25%";
this.$refs.UserInfo.modalInfo.visible = true; this.$refs.UserInfo.modalInfo.visible = true;
}, },
//业务关联模块 //业务关联模块
async openBusiness(business, id) { async openBusiness(business, id) {
let siteId = localStorage.getItem('siteId') let siteId = localStorage.getItem("siteId");
await getBusinessEvent({ businessid: id, time: this.searchForm.time }).then(res => { await getBusinessEvent({
this.$refs.BusinessInfo.dataList = res.data businessid: id,
}) time: this.searchForm.time,
}).then((res) => {
this.$refs.BusinessInfo.dataList = res.data;
});
this.$refs.BusinessInfo.modalInfo.title = "业务分析"; this.$refs.BusinessInfo.modalInfo.title = "业务分析";
this.$refs.BusinessInfo.title = business this.$refs.BusinessInfo.title = business;
this.$refs.BusinessInfo.modalInfo.visible = true; this.$refs.BusinessInfo.modalInfo.visible = true;
}, },
//工作人员信息模态框 //工作人员信息模态框
async openWorkpeople(id) { async openWorkpeople(id) {
let a, b = {} let a,
await getWorkerInfo({ id }).then(res => { b = {};
a = res.data await getWorkerInfo({ id }).then((res) => {
}) a = res.data;
await getWorkmananalyse({ workmanid: id, time: this.searchForm.time }).then(res => { });
b = res.data await getWorkmananalyse({
}) workmanid: id,
this.$refs.WorkpeopleInfo.infoData = { ...a, ...b } time: this.searchForm.time,
console.log(this.$refs.WorkpeopleInfo.infoData) }).then((res) => {
b = res.data;
});
this.$refs.WorkpeopleInfo.infoData = { ...a, ...b };
this.$refs.WorkpeopleInfo.modalInfo.title = "工作人员信息"; this.$refs.WorkpeopleInfo.modalInfo.title = "工作人员信息";
this.$refs.WorkpeopleInfo.modalInfo.visible = true; this.$refs.WorkpeopleInfo.modalInfo.visible = true;
}, },
//详情信息抽屉 //详情信息抽屉
async openHandlingDetails(id) { async openHandlingDetails(id) {
//获取排队叫号对应ID详情 //获取排队叫号对应ID详情
await getQueueInfo({ id }).then(res => { await getQueueInfo({ id }).then((res) => {
this.$refs.HandlingDetails.dataList = res.data this.$refs.HandlingDetails.dataList = res.data;
}) });
this.$refs.HandlingDetails.modalInfo.title = "办理明细"; this.$refs.HandlingDetails.modalInfo.title = "办理明细";
this.$refs.HandlingDetails.modalInfo.visible = true; this.$refs.HandlingDetails.modalInfo.visible = true;
}, },
//获取全部数据 // 选中
downAllData() { onSelectChange(keys, rows) {
this.tableSelectedKeys = keys;
const res = new Map();
this.tableSelectedRows = [...this.tableSelectedRows, ...rows]
.filter((v) => {
return !res.has(v.id) && res.set(v.id, 1);
})
.filter((v) => {
return this.tableSelectedKeys.some((val) => v.id == val);
});
},
// 导出
async handleExportTable() {
this.btnLoading = true;
let obj = {
0: "排队中",
1: "办理中",
4: "办理完成",
};
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
this.tableSelectedRows.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.style == keys) {
item.style = obj[keys];
}
});
});
export2Excel(
this.tHeader,
this.filterVal,
this.tableSelectedRows,
"排队记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
getQueueData({ getQueueData({
page: 1, page: 1,
size: -1, size: -1,
...this.searchForm, ...this.searchForm,
}).then(res => { }).then((res) => {
return res let { data } = res.data;
if (!data.length) return;
for (let item of data) {
Object.keys(obj).forEach((key) => {
if (item.style == key) {
item.style = obj[key];
}
});
}
export2Excel(
this.tHeader,
this.filterVal,
data,
"排队记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
}); });
} }
this.btnLoading = false;
},
//获取全部数据
// downAllData() {
// getQueueData({
// page: 1,
// size: -1,
// ...this.searchForm,
// }).then((res) => {
// return res;
// });
// },
}, },
}; };
</script> </script>
......
...@@ -2,54 +2,74 @@ ...@@ -2,54 +2,74 @@
<div class="callRecord-Container"> <div class="callRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button type="success" @click="toexportTable"> <a-button
:loading="btnLoading"
type="success"
@click="handleExportTable"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button> </a-button>
<b>查看样表次数:<i>{{tablePagination.total}}</i></b> <b
<sub>统计时间段:{{BegindAndEndTime[0]}}~{{BegindAndEndTime[1]}} >查看样表次数:<i>{{ tablePagination.total }}</i></b
>
<sub
>统计时间段:{{ BegindAndEndTime[0] }}~{{ BegindAndEndTime[1] }}
</sub> </sub>
</div> </div>
<span> <span>
<!-- <a-input-group compact> --> <a-space>
<a-select :default-value="1" style="width:25%" @change="changeSearchType"> <a-select :default-value="1" @change="changeSearchType">
<a-select-option :value="1"> <a-select-option :value="1"> 按事项 </a-select-option>
按事项 <a-select-option :value="2"> 按材料 </a-select-option>
</a-select-option>
<a-select-option :value="2">
按材料
</a-select-option>
</a-select> </a-select>
<a-input style="width:73%" v-model="searchName" placeholder="请输入评价人姓名或窗口编号搜索"> <a-input v-model="searchName" 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 format="YYYY年MM月DD日" class="range_picker_style" @change="rangePickerChange"> <a-range-picker
v-model="BegindAndEndTime"
format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD"
class="range_picker_style"
>
</a-range-picker> </a-range-picker>
<a-button type="primary" @click="togetBillList">搜索</a-button> <a-button type="primary" @click="handleSearch">搜索</a-button>
<a-button @click="handleReset">重置</a-button>
</a-space>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ <a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys, selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" :scroll="{ y: 590 }" :pagination="tablePagination" @change="pagTableChange" :loading="tableLoading" }"
:columns="tableHeaders" :dataSource="tableSourceData"> :scroll="{ y: 590 }"
:pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<!-- 序号 -->
<span slot="index" slot-scope="text, record, index">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1
}}</span>
<template slot="事项名称" slot-scope="text, record, index"> <template slot="事项名称" slot-scope="text, record, index">
<div> <div>
{{record.matterName}} {{ record.matterName }}
</div>
<div class="tabFont">
事项全称:{{record.matterFullName}}
</div> </div>
<div class="tabFont">事项全称:{{ record.matterFullName }}</div>
</template> </template>
<template slot="材料名称" slot-scope="text, record, index"> <template slot="材料名称" slot-scope="text, record, index">
<div> <div>
{{record.materialName}} {{ record.materialName }}
</div>
<div class="tabFont">
样表全称:{{record.materialFullName}}
</div> </div>
<div class="tabFont">样表全称:{{ record.materialFullName }}</div>
</template> </template>
</a-table> </a-table>
</div> </div>
...@@ -59,21 +79,21 @@ ...@@ -59,21 +79,21 @@
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import { getBillList } from "@/api/dataAdmin"; import { getBillList } from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel";
export default { export default {
mixins: [table], mixins: [table],
name: "sampleForm", name: "sampleForm",
data() { data() {
return { return {
btnLoading: false,
tableHeaders: [ tableHeaders: [
{ {
title: "序号", title: "序号",
dataIndex: "index",
width: "60px", width: "60px",
key: "index",
align: "center", align: "center",
customRender: (text, record, index) => `${index + 1}`, scopedSlots: {
customRender: "index",
},
}, },
{ {
title: "事项名称", title: "事项名称",
...@@ -94,7 +114,9 @@ export default { ...@@ -94,7 +114,9 @@ export default {
{ {
title: "设备名称", title: "设备名称",
align: "center", align: "center",
dataIndex: "deviceName", customRender: (text) => {
return text.deviceName ? text.deviceName : "--";
},
}, },
{ {
title: "操作时间", title: "操作时间",
...@@ -104,106 +126,80 @@ export default { ...@@ -104,106 +126,80 @@ export default {
{ {
title: "查看时间", title: "查看时间",
align: "center", align: "center",
dataIndex: "查看时间", customRender: (text) => {
return text.operTime ? text.operTime : "--";
},
}, },
], ],
BegindAndEndTime: [],//时间段 BegindAndEndTime: [
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
], //时间段
searchName: undefined, searchName: undefined,
searchType:1, searchType: 1,
siteId:undefined, siteId: localStorage.getItem("siteId"),
tableSelectedKeys: [],
tableSelectedRows: [],
tHeader: [
// 导出的表头名信息
"事项简称",
"事项全称",
"材料简称",
"材料全称",
"设备名称",
"操作时间",
"查看时间",
],
filterVal: [
// 导出的表头字段名,需要导出表格字段名
"matterName",
"matterFullName",
"materialName",
"materialFullName",
"deviceName",
"createTime",
"operTime",
],
}; };
}, },
components: { components: {},
},
mounted() { mounted() {
this.setMoment(); this.setMoment();
this.BegindAndEndTime=[this.$moment(new Date()).format("YYYY-MM-DD"),this.$moment(new Date()).format("YYYY-MM-DD")] this.togetBillList();
this.siteId = localStorage.getItem('siteId')
this.togetBillList()
}, },
methods: { methods: {
//导出 handleSearch() {
toexportTable() { this.tablePagination.current = 1;
let tableData = []; this.tableSelectedKeys = [];
if (this.tableSelectedRows.length == 0) { this.tableSelectedRows = [];
this.togetBillList();
let pramse = {
page:1,
size:-1,
siteId:this.siteId,
matterName:"%%",
materialName:"%%",
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){
tableData = JSON.parse(JSON.stringify(data.data));
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));
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);
}
}, },
togetBillList() {
togetBillList(){
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:"%%", matterName: "%%",
materialName:"%%", materialName: "%%",
operTimeStart:this.BegindAndEndTime[0], operTimeStart: this.BegindAndEndTime[0],
operTimeEnd:this.BegindAndEndTime[1] operTimeEnd: this.BegindAndEndTime[1],
} };
if(this.searchType==1 && this.searchName){ if (this.searchType == 1 && this.searchName) {
pramse.matterName = '%'+this.searchName+'%' pramse.matterName = "%" + this.searchName + "%";
}else if(this.searchName){ } else if (this.searchName) {
pramse.materialName='%'+this.searchName+'%' pramse.materialName = "%" + this.searchName + "%";
} }
getBillList(pramse).then((res)=>{ getBillList(pramse).then((res) => {
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;
} }
}) });
},
changeSearchType(val){
this.searchType = val
}, },
rangePickerChange(val) { changeSearchType(val) {
this.BegindAndEndTime=[this.$moment(val[0]).format("YYYY-MM-DD"),this.$moment(val[1]).format("YYYY-MM-DD")] this.searchType = val;
}, },
QueueState(type) { QueueState(type) {
switch (type) { switch (type) {
case 0: case 0:
...@@ -215,7 +211,71 @@ export default { ...@@ -215,7 +211,71 @@ export default {
return "type0"; return "type0";
} }
}, },
// 重置
handleReset() {
this.BegindAndEndTime = [
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.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.togetBillList();
},
// 选中
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);
});
},
// 导出
handleExportTable() {
this.btnLoading = true;
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
export2Excel(
this.tHeader,
this.filterVal,
this.tableSelectedRows,
"样表记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
let pramse = {
page: 1,
size: -1,
siteId: this.siteId,
matterName: "%%",
materialName: "%%",
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(
this.tHeader,
this.filterVal,
data.data,
"样表记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
}
});
}
this.btnLoading = false;
},
}, },
}; };
</script> </script>
...@@ -231,7 +291,7 @@ export default { ...@@ -231,7 +291,7 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
&>div { & > div {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
......
...@@ -55,26 +55,6 @@ ...@@ -55,26 +55,6 @@
{{ itm.censusName }} {{ itm.censusName }}
</li> </li>
</template> </template>
<li class="content_list" @click="pushRouter1">易政秀报表</li>
<li class="content_list" @click="pushRouter2">排队叫号报表</li>
<li class="content_list" @click="pushRouter3">预约记录报表</li>
<li class="content_list" @click="pushRouter4">服务类数据分析</li>
<li class="content_list" @click="pushRouter5">
无感一码通实时数据报表
</li>
<li class="content_list" @click="pushRouter6">
AI效能监察异常行为数据报表
</li>
<li class="content_list" @click="pushRouter7">
智能边缘物联网异常告警报表
</li>
<li class="content_list" @click="pushRouter8">取件记录报表</li>
<li class="content_list" @click="pushRouter9">短信记录报表</li>
<li class="content_list" @click="pushRouter10">评价记录报表</li>
<li class="content_list" @click="pushRouter11">样表记录报表</li>
<li class="content_list" @click="pushRouter12">填单记录样表</li>
<li class="content_list" @click="pushRouter13">微官网注册报表</li>
<li class="content_list" @click="pushRouter14">网络理政报表</li>
</ul> </ul>
<p class="bottom">协同类数据分析<a-icon type="swap-right" /></p> <p class="bottom">协同类数据分析<a-icon type="swap-right" /></p>
</li> </li>
...@@ -190,106 +170,105 @@ export default { ...@@ -190,106 +170,105 @@ export default {
CensusType_4, CensusType_4,
CensusType_5, CensusType_5,
} = res.data.data; } = res.data.data;
if (CensusType_1 && CensusType_1.length) this.CensusType_1 = CensusType_1; if (CensusType_1 && CensusType_1.length)
if (CensusType_2 && CensusType_2.length) this.CensusType_2 = CensusType_2; this.CensusType_1 = CensusType_1.filter((v) => v.status != 0);
if (CensusType_3 && CensusType_3.length) this.CensusType_3 = CensusType_3; if (CensusType_2 && CensusType_2.length)
if (CensusType_4 && CensusType_4.length) this.CensusType_4 = CensusType_4; this.CensusType_2 = CensusType_2.filter((v) => v.status != 0);
if (CensusType_5 && CensusType_5.length) this.CensusType_5 = CensusType_5; if (CensusType_3 && CensusType_3.length)
this.CensusType_3 = CensusType_3.filter((v) => v.status != 0);
if (CensusType_4 && CensusType_4.length)
this.CensusType_4 = CensusType_4.filter((v) => v.status != 0);
if (CensusType_5 && CensusType_5.length)
this.CensusType_5 = CensusType_5.filter((v) => v.status != 0);
}, },
// 查看数据 // 查看数据
handleCkeck(url) { handleCkeck(path) {
let a = document.createElement("a"); this.$router.push(path);
a.style.display = "none";
a.href = url;
a.target = "_blank";
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
},
pushRouter1() {
// 易政秀报表
this.$router.push({
path: "/home/dataManagement/easyPoliticsShow/PoliticsShow",
});
},
pushRouter2() {
// 排队叫号
this.$router.push({
path: "/home/dataManagement/queueCall/queueRecord",
});
},
pushRouter3() {
// 预约记录
this.$router.push({
path: "/home/dataManagement/makeRecordReport/RecordReport",
});
},
pushRouter4() {
// 服务类数据分析
this.$router.push({
path: "/home/dataManagement/serviceDataAnalyse/makeTrendResearch",
});
},
pushRouter5() {
// 无感一码通实时数据报表
this.$router.push({
path: "/home/dataManagement/oneYardPass/reportForm",
});
},
pushRouter6() {
// AI效能监察异常行为数据报表
this.$router.push({
path: "/home/dataManagement/AIEfficiency/abnormalReportForm",
});
},
pushRouter7() {
// 智能边缘物联网异常告警报表
this.$router.push({
path: "/home/dataManagement/IOT/alerting",
});
},
pushRouter8() {
// 取件记录报表
this.$router.push({
path: "/home/dataManagement/pickUp/pickUpRecord",
});
},
pushRouter9() {
// 短信记录报表
this.$router.push({
path: "/home/dataManagement/SMS/SMSRecord",
});
},
pushRouter10() {
// 评价记录报表
this.$router.push({
path: "/home/dataManagement/evaluationRecordReport/windowsEvaluation",
});
},
pushRouter11() {
// 样记录报表
this.$router.push({
path: "/home/dataManagement/sampleRecordReport/sampleForm",
});
},
pushRouter12() {
// 填单记录样表
this.$router.push({
path: "/home/dataManagement/fillRecordReport/fillForm",
});
},
pushRouter13() {
// 微官网注册报表
this.$router.push({
path: "/home/dataManagement/microOfficialWebsite/microForm",
});
},
pushRouter14() {
// 网络理政报表
this.$router.push({
path: "/home/dataManagement/networkGovernance/networkForm",
});
}, },
// pushRouter1() {
// // 易政秀报表
// this.$router.push({
// path: "/home/dataManagement/easyPoliticsShow/PoliticsShow",
// });
// },
// pushRouter2() {
// // 排队叫号
// this.$router.push({
// path: "/home/dataManagement/queueCall/queueRecord",
// });
// },
// pushRouter3() {
// // 预约记录
// this.$router.push({
// path: "/home/dataManagement/makeRecordReport/RecordReport",
// });
// },
// pushRouter4() {
// // 服务类数据分析
// this.$router.push({
// path: "/home/dataManagement/serviceDataAnalyse/makeTrendResearch",
// });
// },
// pushRouter5() {
// // 无感一码通实时数据报表
// this.$router.push({
// path: "/home/dataManagement/oneYardPass/reportForm",
// });
// },
// pushRouter6() {
// // AI效能监察异常行为数据报表
// this.$router.push({
// path: "/home/dataManagement/AIEfficiency/abnormalReportForm",
// });
// },
// pushRouter7() {
// // 智能边缘物联网异常告警报表
// this.$router.push({
// path: "/home/dataManagement/IOT/alerting",
// });
// },
// pushRouter8() {
// // 取件记录报表
// this.$router.push({
// path: "/home/dataManagement/pickUp/pickUpRecord",
// });
// },
// pushRouter9() {
// // 短信记录报表
// this.$router.push({
// path: "/home/dataManagement/SMS/SMSRecord",
// });
// },
// pushRouter10() {
// // 评价记录报表
// this.$router.push({
// path: "/home/dataManagement/evaluationRecordReport/windowsEvaluation",
// });
// },
// pushRouter11() {
// // 样记录报表
// this.$router.push({
// path: "/home/dataManagement/sampleRecordReport/sampleForm",
// });
// },
// pushRouter12() {
// // 填单记录样表
// this.$router.push({
// path: "/home/dataManagement/fillRecordReport/fillForm",
// });
// },
// pushRouter13() {
// // 微官网注册报表
// this.$router.push({
// path: "/home/dataManagement/microOfficialWebsite/microForm",
// });
// },
// pushRouter14() {
// // 网络理政报表
// this.$router.push({
// path: "/home/dataManagement/networkGovernance/networkForm",
// });
// },
}, },
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment