Commit 5e8a5879 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents c320cc86 1c98fc0d
......@@ -70,6 +70,18 @@ export function getWLLZInfo(params) {
export function getSys12345(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) {
......
......@@ -17,17 +17,26 @@
<span>
<a-select v-model="status" style="margin: 0 10px">
<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 v-model="source">
<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-range-picker
format="YYYY-MM-DD"
class="range_picker_style"
@change="rangePickerChange"
style="margin: 0 10px"
v-model="timeList"
>
</a-range-picker>
......@@ -79,13 +88,44 @@
<script>
import table from "@/mixins/table";
import { getSys12345 } from "@/api/dataAdmin";
import { adminList, getType, letterInfo } from "@/api/dataAdmin";
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 {
mixins: [table],
name: "callRecordForm",
data() {
return {
timeList: [],
status: "",
source: "",
tableHeaders: [
......@@ -100,48 +140,67 @@ export default {
{
title: "工单编号",
align: "center",
dataIndex: "nickname",
customRender: (text, record, index) => `${record.nickname || "--"}`,
dataIndex: "LetterCode",
customRender: (text, record, index) => `${record.LetterCode || "--"}`,
},
{
title: "信件标题",
align: "center",
dataIndex: "phone",
customRender: (text, record, index) => `${record.phone || "--"}`,
dataIndex: "strTitle",
customRender: (text, record, index) => `${record.strTitle || "--"}`,
},
{
title: "信件类别",
align: "center",
dataIndex: "address",
customRender: (text, record, index) => `${record.address || "--"}`,
dataIndex: "strType",
customRender: (text, record, index) => `${record.strType || "--"}`,
},
{
title: "姓名",
align: "center",
dataIndex: "create_time",
dataIndex: "strUserName",
customRender: (text, record, index) =>
`${record.create_time || "--"}`,
`${record.strUserName || "--"}`,
},
{
title: "性别",
align: "center",
dataIndex: "create_time",
dataIndex: "strGender",
customRender: (text, record, index) =>
`${record.create_time || "--"}`,
`${
record.strGender
? record.strGender == 0
? ""
: record.strGender == 1
? ""
: record.strGender == 2
? ""
: "--"
: "--"
}`,
},
{
title: "联系电话",
align: "center",
dataIndex: "create_time",
customRender: (text, record, index) =>
`${record.create_time || "--"}`,
dataIndex: "strPhone",
customRender: (text, record, index) => `${record.strPhone || "--"}`,
},
{
title: "信件来源",
align: "center",
dataIndex: "create_time",
dataIndex: "source",
customRender: (text, record, index) =>
`${record.create_time || "--"}`,
`${
record.source
? record.source == 1
? "微官网"
: record.source == 2
? "自助服务系统"
: record.source == 3
? "数字填单系统"
: "--"
: "--"
}`,
},
{
title: "提交时间",
......@@ -153,23 +212,21 @@ export default {
{
title: "办理状态",
align: "center",
dataIndex: "create_time",
customRender: (text, record, index) =>
`${record.create_time || "--"}`,
dataIndex: "status",
customRender: (text, record, index) => `${record.status || "--"}`,
},
{
title: "办理时间",
align: "center",
dataIndex: "create_time",
dataIndex: "update_time",
customRender: (text, record, index) =>
`${record.create_time || "--"}`,
`${record.update_time || "--"}`,
},
{
title: "办理部门",
align: "center",
dataIndex: "create_time",
customRender: (text, record, index) =>
`${record.create_time || "--"}`,
dataIndex: "AcceptName",
customRender: (text, record, index) => `${record.AcceptName || "--"}`,
},
{
title: "操作",
......@@ -187,23 +244,49 @@ export default {
searchName: undefined,
visible: false,
total: 0,
typeList: [],
};
},
components: {},
mounted() {
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: {
getList() {
getSys12345({
phone: this.searchName,
adminList({
keyword: this.searchName,
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
strTypeID: this.status,
source: this.source,
time: this.timeList,
}).then((res) => {
this.tableSourceData = res.data.data;
this.tablePagination.total = res.data.total;
this.total = res.data.total;
});
},
// 页面跳转
pagTableChange(pagination) {
this.tablePagination = pagination;
this.getList();
},
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) {
switch (type) {
......@@ -247,12 +330,17 @@ export default {
});
} else {
let datas = this.$_.cloneDeep(
await getSys12345({
page: 1,
size: -1,
await adminList({
keyword: this.searchName,
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
strTypeID: this.status,
source: this.source,
time: this.timeList,
})
);
data = datas.data.data;
if (!data.length) return;
for (let item of data) {
Object.keys(obj).forEach((key) => {
......@@ -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(
this.tHeader,
this.filterVal,
tHeader,
filterVal,
data,
"填单记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
this.btnLoading = false;
},
showDrawer(val) {
letterInfo({ id: val.id }).then((res) => {
console.log(res);
res.data ? (this.$refs.FormDetails.fromData = res.data) : "";
});
this.visible = true;
},
onClose() {
......
......@@ -2,56 +2,99 @@
<div class="callRecord-Container">
<div class="header_box">
<div>
<a-button type="primary" class="addclass" @click="handleExportTable" :loading="btnLoading">
<a-button
type="primary"
class="addclass"
@click="handleExportTable"
:loading="btnLoading"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button>
<b>建议次数:<i>{{JYCount}}</i></b>
<b>回复次数:<i>{{HFCount}}</i></b>
<sub>统计时间段:{{this.timeList[0]}}~{{this.timeList[1]}}</sub>
<b
>建议次数:<i>{{ JYCount }}</i></b
>
<b
>回复次数:<i>{{ HFCount }}</i></b
>
<sub>统计时间段:{{ this.timeList[0] }}~{{ this.timeList[1] }}</sub>
</div>
<span>
<a-space>
<a-checkbox @change="changeReply" v-model="isReply">
只看未回复
</a-checkbox>
<a-select placeholder="全部类型" v-model="nowType" @change="changeType">
<a-select
placeholder="全部类型"
v-model="nowType"
@change="changeType"
>
<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-select placeholder="全部来源" v-model="nowDevice" @change="changeDevice">
<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
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
style="width: 250px"
v-model="searchName"
placeholder="请输入标题或姓名关键字搜索"
>
<a-icon slot="prefix" type="search" />
</a-input>
<a-button type="primary" class="addclass" @click="togetWLLZCount">搜索</a-button>
<a-button type="primary" class="addclass" @click="togetWLLZCount"
>搜索</a-button
>
<a-button @click="resetting">重置</a-button>
</a-space>
</span>
</div>
<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,
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"
>
<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"/>
<FormDetails
ref="FormDetails"
@onClose="onClose"
@showDrawer="showDrawer"
:visible="visible"
/>
</div>
</template>
......@@ -59,8 +102,8 @@
import table from "@/mixins/table";
import FormDetails from "./components/FormDetails.vue";
import {getWLLZList,getWLLZCount,getWLLZInfo} from "@/api/dataAdmin"
import {export2Excel} from "@/utils/js/exportExcel";
import { getWLLZList, getWLLZCount, getWLLZInfo } from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel";
const tHeader = [
// 导出的表头名信息
"建议标题",
......@@ -74,7 +117,7 @@ const tHeader = [
"回复人",
"回复时间",
"所属部门",
]
];
const filterVal = [
// 导出的表头字段名,需要导出表格字段名
"title",
......@@ -88,7 +131,7 @@ const filterVal = [
"reply_name",
"update_time",
"deptName",
]
];
export default {
mixins: [table],
name: "networkForm",
......@@ -107,32 +150,47 @@ export default {
title: "建议标题",
align: "center",
dataIndex: "title",
width: "300px"
width: "300px",
customRender: (text, record, index) => `${record.title || "--"}`,
},
{
title: "建议类型",
align: "center",
dataIndex: "type",
customRender: (text, record, index) => {
return text==1?'部门建议':text==2?'办事建议':text==3?'网站建议':text==4?'我要就错':text==5?'我要投诉':'我要咨询'
return text == 1
? "部门建议"
: text == 2
? "办事建议"
: text == 3
? "网站建议"
: text == 4
? "我要就错"
: text == 5
? "我要投诉"
: "我要咨询";
},
},
{
title: "真实姓名",
align: "center",
dataIndex: "upname",
customRender: (text, record, index) => `${record.upname || "--"}`,
},
{
title: "联系电话",
align: "center",
dataIndex: "upphone",
customRender: (text, record, index) => `${record.upphone || "--"}`,
},
{
title: "是否公开",
align: "center",
dataIndex: "valid",
customRender: (text, record, index) => {
return text==1?'':''
return record.valid == 1 ? "" : "";
},
},
{
......@@ -140,36 +198,44 @@ export default {
align: "center",
dataIndex: "secrecy",
customRender: (text, record, index) => {
return text==1?'':''
return record.secrecy == 1 ? "" : "";
},
},
{
title: "提交日期",
align: "center",
dataIndex: "create_time",
customRender: (text, record, index) => `${record.create_time || "--"}`,
},
{
title: "是否回复",
align: "center",
dataIndex: "status",
customRender: (text, record, index) => {
return text==1?'':''
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 || "--"}`,
},
{
title: "所属部门",
align: "center",
dataIndex: "deptName",
customRender: (text, record, index) => `${record.deptName || "--"}`,
},
{
title: "操作",
......@@ -182,40 +248,46 @@ export default {
],
searchName: undefined,
visible: false,
nowSite:null,//当前站点
isReply:false,//是否回复
nowType:undefined,//当前类型
nowDevice:undefined,// 来源
timeList:[],// 时间
JYCount:0,//建议次数
HFCount:0,//回复次数
nowSite: null, //当前站点
isReply: false, //是否回复
nowType: undefined, //当前类型
nowDevice: undefined, // 来源
timeList: [], // 时间
JYCount: 0, //建议次数
HFCount: 0, //回复次数
btnLoading: false,
};
},
components: {
FormDetails
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()
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();
},
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()
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() {
......@@ -238,23 +310,23 @@ export default {
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 = ''
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,
status: this.isReply ? 0 : "",
type: this.nowType,
device: this.nowDevice,
keyword: this.searchName,
time: this.timeList,
})
);
data = datas.data.data
data = datas.data.data;
if (!data.length) return;
for (let item of data) {
Object.keys(obj).forEach((key) => {
......@@ -262,9 +334,9 @@ export default {
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 = ''
item.valid == 1 ? (item.valid = "") : (item.valid = "");
item.secrecy == 1 ? (item.secrecy = "") : (item.secrecy = "");
item.status == 1 ? (item.status = "") : (item.status = "");
}
}
export2Excel(
......@@ -275,69 +347,75 @@ export default {
);
this.btnLoading = false;
},
changeReply(e){
this.isReply = e.target.checked
changeReply(e) {
this.isReply = e.target.checked;
},
changeType(e){
this.nowType = e
changeType(e) {
this.nowType = e;
},
changeDevice(e){
this.nowDevice=e
changeDevice(e) {
this.nowDevice = e;
},
togetWLLZInfo(id){
// 页面跳转
pagTableChange(pagination) {
this.tablePagination = pagination;
this.togetWLLZCount();
},
togetWLLZInfo(id) {
getWLLZInfo({
id:id
}).then((res)=>{
id: id,
}).then((res) => {
console.log(res);
const{code,data}=res;
if(code==1){
this.$refs.FormDetails.fromData=data
const { code, data } = res;
if (code == 1) {
this.$refs.FormDetails.fromData = data;
}
})
});
},
togetWLLZCount(){
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
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
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")]
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)
this.togetWLLZInfo(record.id);
},
onClose() {
this.visible = false;
......@@ -356,7 +434,7 @@ export default {
justify-content: space-between;
align-items: center;
&>div {
& > div {
display: flex;
justify-content: flex-start;
align-items: center;
......@@ -386,5 +464,3 @@ export default {
font-weight: 300;
}
</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