Commit 5edaf9c2 authored by 姬鋆屾's avatar 姬鋆屾

推修改所提出的问题

parent 0e7b74a2
...@@ -70,6 +70,18 @@ export function getWLLZInfo(params) { ...@@ -70,6 +70,18 @@ export function getWLLZInfo(params) {
export function getSys12345(params) { export function getSys12345(params) {
return http.get(`${BASEURL}/wllz/complainapi/sys12345`, params); return http.get(`${BASEURL}/wllz/complainapi/sys12345`, params);
} }
// 12345查询受理类型
export function getType(params) {
return http.get(`${BASEURL}/inter/sys12345/getType`, params);
}
// 12345查询写信详情
export function letterInfo(params) {
return http.get(`${BASEURL}/inter/sys12345/letterInfo`, params);
}
// 12345写信报表
export function adminList(params) {
return http.post(`${BASEURL}/inter/sys12345/adminList`, params);
}
// 样表列表 // 样表列表
export function getBillList(params) { export function getBillList(params) {
......
...@@ -17,17 +17,26 @@ ...@@ -17,17 +17,26 @@
<span> <span>
<a-select v-model="status" style="margin: 0 10px"> <a-select v-model="status" style="margin: 0 10px">
<a-select-option value=""> 全部类型 </a-select-option> <a-select-option value=""> 全部类型 </a-select-option>
<a-select-option value="0"> 离线 </a-select-option> <a-select-option
v-for="val in typeList"
:key="val.value"
:value="val.value"
>
{{ val.name }}
</a-select-option>
</a-select> </a-select>
<a-select v-model="source"> <a-select v-model="source">
<a-select-option value=""> 全部来源 </a-select-option> <a-select-option value=""> 全部来源 </a-select-option>
<a-select-option value="0"> 离线 </a-select-option> <a-select-option value="1"> 微官网 </a-select-option>
<a-select-option value="2"> 自助服务系统 </a-select-option>
<a-select-option value="1"> 数字填单系统 </a-select-option>
</a-select> </a-select>
<a-range-picker <a-range-picker
format="YYYY-MM-DD" format="YYYY-MM-DD"
class="range_picker_style" class="range_picker_style"
@change="rangePickerChange" @change="rangePickerChange"
style="margin: 0 10px" style="margin: 0 10px"
v-model="timeList"
> >
</a-range-picker> </a-range-picker>
...@@ -79,13 +88,44 @@ ...@@ -79,13 +88,44 @@
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import { getSys12345 } from "@/api/dataAdmin"; import { adminList, getType, letterInfo } from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel"; import { export2Excel } from "@/utils/js/exportExcel";
import FormDetails from "./components/FormDetails.vue";
const tHeader = [
"序号",
"工单编号",
"信件标题",
"信件类别",
"姓名",
"性别",
"联系电话",
"信件来源",
"提交时间",
"办理状态",
"办理时间",
"办理部门",
];
const filterVal = [
"index",
"LetterCode",
"strTitle",
"strType",
"strUserName",
"strGender",
"strPhone",
"source",
"create_time",
"status",
"update_time",
"AcceptName",
];
export default { export default {
mixins: [table], mixins: [table],
name: "callRecordForm", name: "callRecordForm",
data() { data() {
return { return {
timeList: [],
status: "", status: "",
source: "", source: "",
tableHeaders: [ tableHeaders: [
...@@ -100,48 +140,67 @@ export default { ...@@ -100,48 +140,67 @@ export default {
{ {
title: "工单编号", title: "工单编号",
align: "center", align: "center",
dataIndex: "nickname", dataIndex: "LetterCode",
customRender: (text, record, index) => `${record.nickname || "--"}`, customRender: (text, record, index) => `${record.LetterCode || "--"}`,
}, },
{ {
title: "信件标题", title: "信件标题",
align: "center", align: "center",
dataIndex: "phone", dataIndex: "strTitle",
customRender: (text, record, index) => `${record.phone || "--"}`, customRender: (text, record, index) => `${record.strTitle || "--"}`,
}, },
{ {
title: "信件类别", title: "信件类别",
align: "center", align: "center",
dataIndex: "address", dataIndex: "strType",
customRender: (text, record, index) => `${record.address || "--"}`, customRender: (text, record, index) => `${record.strType || "--"}`,
}, },
{ {
title: "姓名", title: "姓名",
align: "center", align: "center",
dataIndex: "create_time", dataIndex: "strUserName",
customRender: (text, record, index) => customRender: (text, record, index) =>
`${record.create_time || "--"}`, `${record.strUserName || "--"}`,
}, },
{ {
title: "性别", title: "性别",
align: "center", align: "center",
dataIndex: "create_time", dataIndex: "strGender",
customRender: (text, record, index) => customRender: (text, record, index) =>
`${record.create_time || "--"}`, `${
record.strGender
? record.strGender == 0
? ""
: record.strGender == 1
? ""
: record.strGender == 2
? ""
: "--"
: "--"
}`,
}, },
{ {
title: "联系电话", title: "联系电话",
align: "center", align: "center",
dataIndex: "create_time", dataIndex: "strPhone",
customRender: (text, record, index) => customRender: (text, record, index) => `${record.strPhone || "--"}`,
`${record.create_time || "--"}`,
}, },
{ {
title: "信件来源", title: "信件来源",
align: "center", align: "center",
dataIndex: "create_time", dataIndex: "source",
customRender: (text, record, index) => customRender: (text, record, index) =>
`${record.create_time || "--"}`, `${
record.source
? record.source == 1
? "微官网"
: record.source == 2
? "自助服务系统"
: record.source == 3
? "数字填单系统"
: "--"
: "--"
}`,
}, },
{ {
title: "提交时间", title: "提交时间",
...@@ -153,23 +212,21 @@ export default { ...@@ -153,23 +212,21 @@ export default {
{ {
title: "办理状态", title: "办理状态",
align: "center", align: "center",
dataIndex: "create_time", dataIndex: "status",
customRender: (text, record, index) => customRender: (text, record, index) => `${record.status || "--"}`,
`${record.create_time || "--"}`,
}, },
{ {
title: "办理时间", title: "办理时间",
align: "center", align: "center",
dataIndex: "create_time", dataIndex: "update_time",
customRender: (text, record, index) => customRender: (text, record, index) =>
`${record.create_time || "--"}`, `${record.update_time || "--"}`,
}, },
{ {
title: "办理部门", title: "办理部门",
align: "center", align: "center",
dataIndex: "create_time", dataIndex: "AcceptName",
customRender: (text, record, index) => customRender: (text, record, index) => `${record.AcceptName || "--"}`,
`${record.create_time || "--"}`,
}, },
{ {
title: "操作", title: "操作",
...@@ -187,23 +244,49 @@ export default { ...@@ -187,23 +244,49 @@ export default {
searchName: undefined, searchName: undefined,
visible: false, visible: false,
total: 0, total: 0,
typeList: [],
}; };
}, },
components: {}, components: {},
mounted() { mounted() {
this.getList(); this.getList();
this.timeList = [
this.$moment().format("YYYY-MM-DD"),
this.$moment().format("YYYY-MM-DD"),
];
getType().then((res) => {
console.log(res);
res.data ? (this.typeList = res.data) : (this.typeList = []);
});
},
components: {
FormDetails,
}, },
methods: { methods: {
getList() { getList() {
getSys12345({ adminList({
phone: this.searchName, keyword: this.searchName,
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
strTypeID: this.status,
source: this.source,
time: this.timeList,
}).then((res) => { }).then((res) => {
this.tableSourceData = res.data.data; this.tableSourceData = res.data.data;
this.tablePagination.total = res.data.total;
this.total = res.data.total; this.total = res.data.total;
}); });
}, },
// 页面跳转
pagTableChange(pagination) {
this.tablePagination = pagination;
this.getList();
},
rangePickerChange(val) { rangePickerChange(val) {
console.log(val); this.timeList = [
this.$moment(val[0]).format("YYYY-MM-DD"),
this.$moment(val[1]).format("YYYY-MM-DD"),
];
}, },
QueueState(type) { QueueState(type) {
switch (type) { switch (type) {
...@@ -247,12 +330,17 @@ export default { ...@@ -247,12 +330,17 @@ export default {
}); });
} else { } else {
let datas = this.$_.cloneDeep( let datas = this.$_.cloneDeep(
await getSys12345({ await adminList({
page: 1, keyword: this.searchName,
size: -1, page: this.tablePagination.current,
size: this.tablePagination.pageSize,
strTypeID: this.status,
source: this.source,
time: this.timeList,
}) })
); );
data = datas.data.data; data = datas.data.data;
if (!data.length) return; if (!data.length) return;
for (let item of data) { for (let item of data) {
Object.keys(obj).forEach((key) => { Object.keys(obj).forEach((key) => {
...@@ -262,15 +350,40 @@ export default { ...@@ -262,15 +350,40 @@ export default {
}); });
} }
} }
data.forEach((record, i) => {
record.index = i + 1;
record.source = record.source
? record.source == 1
? "微官网"
: record.source == 2
? "自助服务系统"
: record.source == 3
? "数字填单系统"
: "--"
: "--";
record.strGender = record.strGender
? record.strGender == 0
? ""
: record.strGender == 1
? ""
: record.strGender == 2
? ""
: "--"
: "--";
});
export2Excel( export2Excel(
this.tHeader, tHeader,
this.filterVal, filterVal,
data, data,
"填单记录报表" + this.$moment().format("YYYYMMDDHHmmss") "填单记录报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
this.btnLoading = false; this.btnLoading = false;
}, },
showDrawer(val) { showDrawer(val) {
letterInfo({ id: val.id }).then((res) => {
console.log(res);
res.data ? (this.$refs.FormDetails.fromData = res.data) : "";
});
this.visible = true; this.visible = true;
}, },
onClose() { onClose() {
......
<template> <template>
<div class="callRecord-Container"> <div class="callRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button type="primary" class="addclass" @click="handleExportTable" :loading="btnLoading"> <a-button
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> type="primary"
</a-button> class="addclass"
<b>建议次数:<i>{{JYCount}}</i></b> @click="handleExportTable"
<b>回复次数:<i>{{HFCount}}</i></b> :loading="btnLoading"
<sub>统计时间段:{{this.timeList[0]}}~{{this.timeList[1]}}</sub> >
</div> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
<span> </a-button>
<a-space> <b
<a-checkbox @change="changeReply" v-model="isReply"> >建议次数:<i>{{ JYCount }}</i></b
只看未回复 >
</a-checkbox> <b
<a-select placeholder="全部类型" v-model="nowType" @change="changeType"> >回复次数:<i>{{ HFCount }}</i></b
<a-select-option value="1"> 部门建议 </a-select-option> >
<a-select-option value="2"> 办事建议 </a-select-option> <sub>统计时间段:{{ this.timeList[0] }}~{{ this.timeList[1] }}</sub>
<a-select-option value="3"> 网站建议 </a-select-option> </div>
<a-select-option value="4"> 我要就错 </a-select-option> <span>
<a-select-option value="5"> 我要投诉 </a-select-option> <a-space>
</a-select> <a-checkbox @change="changeReply" v-model="isReply">
<a-select placeholder="全部来源" v-model="nowDevice" @change="changeDevice"> 只看未回复
<a-select-option value="1"> 评价系统 </a-select-option> </a-checkbox>
<a-select-option value="2"> 导视系统 </a-select-option> <a-select
<a-select-option value="3"> 自助服务系统 </a-select-option> placeholder="全部类型"
<a-select-option value="4"> 微官网 </a-select-option> v-model="nowType"
<a-select-option value="5"> 数字填单系统 </a-select-option> @change="changeType"
</a-select> >
<a-range-picker style="width:250px;" format="YYYY-MM-DD" class="range_picker_style" <a-select-option value="1"> 部门建议 </a-select-option>
@change="rangePickerChange" v-model="timeList"> <a-select-option value="2"> 办事建议 </a-select-option>
</a-range-picker> <a-select-option value="3"> 网站建议 </a-select-option>
<a-select-option value="4"> 我要就错 </a-select-option>
<a-select-option value="5"> 我要投诉 </a-select-option>
</a-select>
<a-select
placeholder="全部来源"
v-model="nowDevice"
@change="changeDevice"
>
<a-select-option value="1"> 评价系统 </a-select-option>
<a-select-option value="2"> 导视系统 </a-select-option>
<a-select-option value="3"> 自助服务系统 </a-select-option>
<a-select-option value="4"> 微官网 </a-select-option>
<a-select-option value="5"> 数字填单系统 </a-select-option>
</a-select>
<a-range-picker
style="width: 250px"
format="YYYY-MM-DD"
class="range_picker_style"
@change="rangePickerChange"
v-model="timeList"
>
</a-range-picker>
<a-input style="width:250px;" v-model="searchName" placeholder="请输入标题或姓名关键字搜索"> <a-input
<a-icon slot="prefix" type="search" /> style="width: 250px"
</a-input> v-model="searchName"
<a-button type="primary" class="addclass" @click="togetWLLZCount">搜索</a-button> placeholder="请输入标题或姓名关键字搜索"
<a-button @click="resetting">重置</a-button> >
</a-space> <a-icon slot="prefix" type="search" />
</span> </a-input>
</div> <a-button type="primary" class="addclass" @click="togetWLLZCount"
<div class="main"> >搜索</a-button
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ >
selectedRowKeys: tableSelectedKeys, <a-button @click="resetting">重置</a-button>
onChange: onSelectChange, </a-space>
}" :scroll="{ y: 590 }" :pagination="tablePagination" @change="pagTableChange" :loading="tableLoading" </span>
:columns="tableHeaders" :dataSource="tableSourceData">
<template slot="操作" slot-scope="text, record, index">
<a-button type="link" @click="showDrawer(record)">详情</a-button>
</template>
</a-table>
</div>
<FormDetails ref="FormDetails" @onClose="onClose" @showDrawer="showDrawer" :visible="visible"/>
</div> </div>
<div class="main">
<a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange,
}"
:scroll="{ y: 590 }"
:pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<template slot="操作" slot-scope="text, record, index">
<a-button type="link" @click="showDrawer(record)">详情</a-button>
</template>
</a-table>
</div>
<FormDetails
ref="FormDetails"
@onClose="onClose"
@showDrawer="showDrawer"
:visible="visible"
/>
</div>
</template> </template>
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import FormDetails from "./components/FormDetails.vue"; import FormDetails from "./components/FormDetails.vue";
import {getWLLZList,getWLLZCount,getWLLZInfo} from "@/api/dataAdmin" import { getWLLZList, getWLLZCount, getWLLZInfo } from "@/api/dataAdmin";
import {export2Excel} from "@/utils/js/exportExcel"; import { export2Excel } from "@/utils/js/exportExcel";
const tHeader = [ const tHeader = [
// 导出的表头名信息 // 导出的表头名信息
"建议标题", "建议标题",
"建议类型", "建议类型",
"真实姓名", "真实姓名",
"联系电话", "联系电话",
"是否公开", "是否公开",
"是否保密", "是否保密",
"提交日期", "提交日期",
"是否回复", "是否回复",
"回复人", "回复人",
"回复时间", "回复时间",
"所属部门", "所属部门",
] ];
const filterVal = [ const filterVal = [
// 导出的表头字段名,需要导出表格字段名 // 导出的表头字段名,需要导出表格字段名
"title", "title",
"type", "type",
"upname", "upname",
"upphone", "upphone",
"valid", "valid",
"secrecy", "secrecy",
"create_time", "create_time",
"status", "status",
"reply_name", "reply_name",
"update_time", "update_time",
"deptName", "deptName",
] ];
export default { export default {
mixins: [table], mixins: [table],
name: "networkForm", name: "networkForm",
data() { data() {
return { return {
tableHeaders: [ tableHeaders: [
{ {
title: "序号", title: "序号",
dataIndex: "index", dataIndex: "index",
width: "60px", width: "60px",
key: "index", key: "index",
align: "center", align: "center",
customRender: (text, record, index) => `${index + 1}`, customRender: (text, record, index) => `${index + 1}`,
},
{
title: "建议标题",
align: "center",
dataIndex: "title",
width: "300px"
},
{
title: "建议类型",
align: "center",
dataIndex: "type",
customRender: (text, record, index) => {
return text==1?'部门建议':text==2?'办事建议':text==3?'网站建议':text==4?'我要就错':text==5?'我要投诉':'我要咨询'
},
},
{
title: "真实姓名",
align: "center",
dataIndex: "upname",
},
{
title: "联系电话",
align: "center",
dataIndex: "upphone",
},
{
title: "是否公开",
align: "center",
dataIndex: "valid",
customRender: (text, record, index) => {
return text==1?'':''
},
},
{
title: "是否保密",
align: "center",
dataIndex: "secrecy",
customRender: (text, record, index) => {
return text==1?'':''
},
},
{
title: "提交日期",
align: "center",
dataIndex: "create_time",
},
{
title: "是否回复",
align: "center",
dataIndex: "status",
customRender: (text, record, index) => {
return text==1?'':''
},
},
{
title: "回复人",
align: "center",
dataIndex: "reply_name",
},
{
title: "回复时间",
align: "center",
dataIndex: "update_time",
},
{
title: "所属部门",
align: "center",
dataIndex: "deptName",
},
{
title: "操作",
align: "center",
dataIndex: "操作",
scopedSlots: {
customRender: "操作",
},
},
],
searchName: undefined,
visible: false,
nowSite:null,//当前站点
isReply:false,//是否回复
nowType:undefined,//当前类型
nowDevice:undefined,// 来源
timeList:[],// 时间
JYCount:0,//建议次数
HFCount:0,//回复次数
btnLoading: false,
};
},
components: {
FormDetails
},
mounted() {
this.setMoment();
// 设置默认时间为今天
this.timeList=[this.$moment().format("YYYY-MM-DD"),this.$moment().format("YYYY-MM-DD")]
this.nowSite = localStorage.getItem('siteId');
this.togetWLLZCount()
},
watch:{
tablePagination(){
this.togetWLLZCount()
}
},
methods: {
//重置
resetting() {
this.timeList=[this.$moment().format("YYYY-MM-DD"),this.$moment().format("YYYY-MM-DD")]
this.nowType = undefined
this.nowDevice = undefined
this.searchName = undefined
this.isReply = false
this.togetWLLZCount()
},
// 导出
async handleExportTable() {
this.btnLoading = true;
let obj = {
1: "部门建议",
2: "办事建议",
3: "网站建议",
4: "我要就错",
5: "我要投诉",
6: "我要咨询",
};
let data = [];
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
// 深度克隆避免影响页面表格展示
data = this.$_.cloneDeep(this.tableSelectedRows);
data.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.type == keys) {
item.type = obj[keys];
}
});
item.valid == 1?item.valid = "":item.valid = ''
item.secrecy == 1?item.secrecy = "":item.secrecy = ''
item.status == 1?item.status = "":item.status = ''
});
} else {
let datas = this.$_.cloneDeep(
await getWLLZList({
page: 1,
size: -1,
status:this.isReply?0:"",
type:this.nowType,
device:this.nowDevice,
keyword:this.searchName,
time:this.timeList,
})
);
data = datas.data.data
if (!data.length) return;
for (let item of data) {
Object.keys(obj).forEach((key) => {
if (item.type == key) {
item.type = obj[key];
}
});
item.valid == 1?item.valid = "":item.valid = ''
item.secrecy == 1?item.secrecy = "":item.secrecy = ''
item.status == 1?item.status = "":item.status = ''
}
}
export2Excel(
tHeader,
filterVal,
data,
"网络理政报表" + this.$moment().format("YYYYMMDDHHmmss")
);
this.btnLoading = false;
},
changeReply(e){
this.isReply = e.target.checked
}, },
changeType(e){ {
this.nowType = e title: "建议标题",
align: "center",
dataIndex: "title",
width: "300px",
customRender: (text, record, index) => `${record.title || "--"}`,
}, },
changeDevice(e){ {
this.nowDevice=e title: "建议类型",
align: "center",
dataIndex: "type",
customRender: (text, record, index) => {
return text == 1
? "部门建议"
: text == 2
? "办事建议"
: text == 3
? "网站建议"
: text == 4
? "我要就错"
: text == 5
? "我要投诉"
: "我要咨询";
},
}, },
{
togetWLLZInfo(id){ title: "真实姓名",
getWLLZInfo({ align: "center",
id:id dataIndex: "upname",
}).then((res)=>{ customRender: (text, record, index) => `${record.upname || "--"}`,
console.log(res);
const{code,data}=res;
if(code==1){
this.$refs.FormDetails.fromData=data
}
})
}, },
togetWLLZCount(){ {
let option = { title: "联系电话",
siteid:this.nowSite, align: "center",
time:this.timeList, dataIndex: "upphone",
keyword:this.searchName, customRender: (text, record, index) => `${record.upphone || "--"}`,
type:this.nowType,
device:this.nowDevice,
status:this.isReply?0:"",//0处理,空为不处理
}
getWLLZCount(option).then((res)=>{
const {code,data} = res;
if(code==1){
this.JYCount = data.all_count,
this.HFCount = data.hf_count
}
})
let params = {
page:this.tablePagination.current,
size:this.tablePagination.pageSize,
status:this.isReply?0:"",
type:this.nowType,
device:this.nowDevice,
keyword:this.searchName,
time:this.timeList,
}
getWLLZList(params).then((res)=>{
const {code,data} = res;
if(code==1){
this.tableSourceData = data.data
this.tablePagination.total = data.total
}
})
}, },
{
title: "是否公开",
align: "center",
dataIndex: "valid",
customRender: (text, record, index) => {
return record.valid == 1 ? "" : "";
},
},
{
title: "是否保密",
align: "center",
dataIndex: "secrecy",
customRender: (text, record, index) => {
return record.secrecy == 1 ? "" : "";
},
},
{
title: "提交日期",
align: "center",
dataIndex: "create_time",
customRender: (text, record, index) => `${record.create_time || "--"}`,
rangePickerChange(val) {
this.timeList = [this.$moment(val[0]).format("YYYY-MM-DD"),this.$moment(val[1]).format("YYYY-MM-DD")]
}, },
{
title: "是否回复",
align: "center",
dataIndex: "status",
customRender: (text, record, index) => {
return record.status == 1 ? "" : "";
},
},
{
title: "回复人",
align: "center",
dataIndex: "reply_name",
customRender: (text, record, index) => `${record.reply_name || "--"}`,
},
{
title: "回复时间",
align: "center",
dataIndex: "update_time",
customRender: (text, record, index) => `${record.update_time || "--"}`,
showDrawer(record) {
this.visible = true;
this.togetWLLZInfo(record.id)
}, },
onClose() { {
this.visible = false; title: "所属部门",
align: "center",
dataIndex: "deptName",
customRender: (text, record, index) => `${record.deptName || "--"}`,
},
{
title: "操作",
align: "center",
dataIndex: "操作",
scopedSlots: {
customRender: "操作",
},
}, },
],
searchName: undefined,
visible: false,
nowSite: null, //当前站点
isReply: false, //是否回复
nowType: undefined, //当前类型
nowDevice: undefined, // 来源
timeList: [], // 时间
JYCount: 0, //建议次数
HFCount: 0, //回复次数
btnLoading: false,
};
},
components: {
FormDetails,
},
mounted() {
this.setMoment();
// 设置默认时间为今天
this.timeList = [
this.$moment().format("YYYY-MM-DD"),
this.$moment().format("YYYY-MM-DD"),
];
this.nowSite = localStorage.getItem("siteId");
this.togetWLLZCount();
},
watch: {
tablePagination() {
this.togetWLLZCount();
},
},
methods: {
//重置
resetting() {
this.timeList = [
this.$moment().format("YYYY-MM-DD"),
this.$moment().format("YYYY-MM-DD"),
];
this.nowType = undefined;
this.nowDevice = undefined;
this.searchName = undefined;
this.isReply = false;
this.togetWLLZCount();
},
// 导出
async handleExportTable() {
this.btnLoading = true;
let obj = {
1: "部门建议",
2: "办事建议",
3: "网站建议",
4: "我要就错",
5: "我要投诉",
6: "我要咨询",
};
let data = [];
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
// 深度克隆避免影响页面表格展示
data = this.$_.cloneDeep(this.tableSelectedRows);
data.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.type == keys) {
item.type = obj[keys];
}
});
item.valid == 1 ? (item.valid = "") : (item.valid = "");
item.secrecy == 1 ? (item.secrecy = "") : (item.secrecy = "");
item.status == 1 ? (item.status = "") : (item.status = "");
});
} else {
let datas = this.$_.cloneDeep(
await getWLLZList({
page: 1,
size: -1,
status: this.isReply ? 0 : "",
type: this.nowType,
device: this.nowDevice,
keyword: this.searchName,
time: this.timeList,
})
);
data = datas.data.data;
if (!data.length) return;
for (let item of data) {
Object.keys(obj).forEach((key) => {
if (item.type == key) {
item.type = obj[key];
}
});
item.valid == 1 ? (item.valid = "") : (item.valid = "");
item.secrecy == 1 ? (item.secrecy = "") : (item.secrecy = "");
item.status == 1 ? (item.status = "") : (item.status = "");
}
}
export2Excel(
tHeader,
filterVal,
data,
"网络理政报表" + this.$moment().format("YYYYMMDDHHmmss")
);
this.btnLoading = false;
},
changeReply(e) {
this.isReply = e.target.checked;
}, },
changeType(e) {
this.nowType = e;
},
changeDevice(e) {
this.nowDevice = e;
},
// 页面跳转
pagTableChange(pagination) {
this.tablePagination = pagination;
this.togetWLLZCount();
},
togetWLLZInfo(id) {
getWLLZInfo({
id: id,
}).then((res) => {
console.log(res);
const { code, data } = res;
if (code == 1) {
this.$refs.FormDetails.fromData = data;
}
});
},
togetWLLZCount() {
let option = {
siteid: this.nowSite,
time: this.timeList,
keyword: this.searchName,
type: this.nowType,
device: this.nowDevice,
status: this.isReply ? 0 : "", //0处理,空为不处理
};
getWLLZCount(option).then((res) => {
const { code, data } = res;
if (code == 1) {
(this.JYCount = data.all_count), (this.HFCount = data.hf_count);
}
});
let params = {
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
status: this.isReply ? 0 : "",
type: this.nowType,
device: this.nowDevice,
keyword: this.searchName,
time: this.timeList,
};
getWLLZList(params).then((res) => {
const { code, data } = res;
if (code == 1) {
this.tableSourceData = data.data;
this.tablePagination.total = data.total;
}
});
},
rangePickerChange(val) {
this.timeList = [
this.$moment(val[0]).format("YYYY-MM-DD"),
this.$moment(val[1]).format("YYYY-MM-DD"),
];
},
showDrawer(record) {
this.visible = true;
this.togetWLLZInfo(record.id);
},
onClose() {
this.visible = false;
},
},
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/deep/.ant-spin-container { /deep/.ant-spin-container {
display: block; display: block;
} }
.header_box { .header_box {
padding-bottom: 1rem; padding-bottom: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
& > div {
display: flex; display: flex;
justify-content: space-between; justify-content: flex-start;
align-items: center; align-items: center;
&>div { b {
display: flex; font-style: normal;
justify-content: flex-start; font-weight: unset;
align-items: center; font-size: 16px;
margin-left: 20px;
b {
font-style: normal;
font-weight: unset;
font-size: 16px;
margin-left: 20px;
i { i {
color: #0595fd; color: #0595fd;
font-style: normal; font-style: normal;
} }
} }
sub { sub {
font-size: 14px; font-size: 14px;
font-style: normal; font-style: normal;
bottom: unset; bottom: unset;
margin-left: 20px; margin-left: 20px;
}
} }
}
} }
.tabFont { .tabFont {
font-size: 12px; font-size: 12px;
font-weight: 300; font-weight: 300;
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment