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

pref:修改易政秀报表

parent 619b968b
......@@ -4,42 +4,79 @@
<div>
<a-button
:loading="btnLoading"
type="primary" class="addclass"
type="primary"
class="addclass"
@click="handleExportTable"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button>
<b>用户总数:<i>{{tableData.total}}</i></b>
<b>试用客户:<i>{{tableData.trial}}</i></b>
<b>VIP:<i>{{tableData.vip}}</i></b>
<b>设计师:<i>{{tableData.designer}}</i></b>
<b>图片作品数:<i>{{tableData.picturesCount}}</i></b>
<b>视频作品数:<i>{{tableData.videosCount}}</i></b>
<b
>用户总数:<i>{{ tableData.total }}</i></b
>
<b
>试用客户:<i>{{ tableData.trial }}</i></b
>
<!-- <b>VIP:<i>{{tableData.vip}}</i></b> -->
<b
>设计师:<i>{{ tableData.designer }}</i></b
>
<b
>图片作品数:<i>{{ tableData.picturesCount }}</i></b
>
<b
>视频作品数:<i>{{ tableData.videosCount }}</i></b
>
</div>
<span class="topBoxFlex">
<a-input allowClear v-model="searchForm.query" placeholder="请输入用户姓名/手机号搜索">
<a-space>
<a-input
allowClear
v-model="searchForm.query"
placeholder="请输入用户姓名/手机号搜索"
>
<a-icon slot="prefix" type="search" />
</a-input>
<a-select v-model="searchForm.memberLevel">
<a-select-option value=""> 全部 </a-select-option>
<a-select-option v-for="(item, index) of levelList" :key="index" :value="index">
<a-select-option
v-for="(item, index) of levelList"
:key="index"
:value="index"
>
{{ item }}
</a-select-option>
</a-select>
<a-button type="primary" class="addclass" @click="getList">搜索</a-button>
<a-button type="primary" class="addclass" @click="getList"
>搜索</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="tableList">
<template slot="zhenshixingming" slot-scope="text, record, index">
<a-button type="link" @click="openUserDetails(record)">{{ text?text:'--' }}</a-button>
}"
:scroll="{ y: 590 }"
:pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableList"
>
<template slot="zhenshixingming" slot-scope="text">
<a-button type="link" @click="openUserDetails(record)">{{
text ? text : "--"
}}</a-button>
</template>
<template slot="tupianzuopinshuliang" slot-scope="text, record, index">
<a-button type="link" @click="openPicWorks(record.id)">{{ (text || text==0)?text:'--' }}</a-button>
<template slot="tupianzuopinshuliang" slot-scope="text">
<a-button type="link" @click="openPicWorks(record.id)">{{
text || text == 0 ? text : "--"
}}</a-button>
</template>
</a-table>
<PicWorks ref="PicWorks" />
......@@ -53,15 +90,13 @@ import table from "@/mixins/table";
import UserDetails from "./components/UserDetails.vue";
import PicWorks from "./components/PicWorks.vue";
import { export2Excel } from "@/utils/js/exportExcel";
import {
getCustomer
} from "@/api/customer";
import { getCustomer } from "@/api/customer";
const levelList = {
0: '未开启',
1: '试用客户',
2: 'VIP',
3: '设计师'
}
0: "未开启",
1: "试用客户",
// 2: "VIP",
3: "设计师",
};
export default {
mixins: [table],
name: "PortalAdminVuePoliticsShow",
......@@ -70,19 +105,23 @@ export default {
btnLoading: false,
levelList: levelList,
tableList: [],
tableData:{},
tableData: {},
searchForm: {
query: "",//姓名手机号查询条件
memberLevel: "",//会员等级查询条件
customerSrc: "",//客户来源查询条件
query: "", //姓名手机号查询条件
memberLevel: "", //会员等级查询条件
customerSrc: "", //客户来源查询条件
},
tableHeaders: [{
tableHeaders: [
{
title: "序号",
dataIndex: "index",
width: "60px",
key: "index",
align: "center",
customRender: (text, record, index) => `${index + 1}`,
customRender: (text, record, index) =>
(this.tablePagination.current - 1) * this.tablePagination.pageSize +
index +
1,
},
{
title: "真实姓名",
......@@ -96,13 +135,13 @@ export default {
title: "联系电话",
align: "center",
dataIndex: "contactTelphone",
customRender: (text) => `${text?text:'--'}`,
customRender: (text) => `${text ? text : "--"}`,
},
{
title: "单位名称",
align: "center",
dataIndex: "organization",
customRender: (text) => `${text?text:'--'}`,
customRender: (text) => `${text ? text : "--"}`,
},
{
title: "图片作品数量",
......@@ -116,7 +155,7 @@ export default {
title: "视频作品数量",
align: "center",
dataIndex: "customerDesignVideos",
customRender: (text) => `${(text || text==0)?text:'--'}`,
customRender: (text) => `${text || text == 0 ? text : "--"}`,
},
{
title: "会员等级",
......@@ -128,22 +167,22 @@ export default {
title: "最近登录时间",
align: "center",
dataIndex: "lastLoginTime",
customRender: (text) => `${text?text:'--'}`,
customRender: (text) => `${text ? text : "--"}`,
},
{
title: "使用状态",
align: "center",
dataIndex: "status",
customRender: (text, record, index) => text == 1 ? '正常' : '禁用',
customRender: (text, record, index) => (text == 1 ? "正常" : "禁用"),
},
],
searchName: undefined,
tablePagination:{
current:1,
pageSize:10
tablePagination: {
current: 1,
pageSize: 10,
},
tableSelectedKeys:[],
tableSelectedRows:[],
tableSelectedKeys: [],
tableSelectedRows: [],
tHeader: [
// 导出的表头名信息
"真实姓名",
......@@ -164,7 +203,7 @@ export default {
"customerDesignVideos",
"memberLevel",
"lastLoginTime",
"status"
"status",
],
};
},
......@@ -188,22 +227,18 @@ export default {
...search,
});
if (res.code == 1) {
let {
data,
total,
pageInfo
} = res.data;
let { data, total, pageInfo } = res.data;
this.tableList = data;
this.tableData = res.data
this.tableData = res.data;
this.tablePagination.total = total;
return data
return data;
}
},
//分页
pagTableChange(page) {
this.tablePagination.current = page.current
this.tablePagination.pageSize = page.pageSize
this.tablePagination.current = page.current;
this.tablePagination.pageSize = page.pageSize;
this.getList();
},
// 选中
......@@ -225,7 +260,7 @@ export default {
1: "正常",
2: "禁用",
};
let data = []
let data = [];
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
// 深度克隆避免影响页面表格展示
data = this.$_.cloneDeep(this.tableSelectedRows);
......@@ -243,9 +278,7 @@ export default {
"易政秀报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
data = this.$_.cloneDeep(
await this.getList({ page: 1, size: -1 })
);
data = this.$_.cloneDeep(await this.getList({ page: 1, size: -1 }));
if (!data.length) return;
for (let item of data) {
Object.keys(obj).forEach((key) => {
......@@ -278,7 +311,7 @@ export default {
this.$refs.PicWorks.modalInfo.title = "作品数量";
this.$refs.PicWorks.modalInfo.visible = true;
this.$refs.PicWorks.modalInfo.width = "32%";
this.$refs.PicWorks.modalInfo.id = id
this.$refs.PicWorks.modalInfo.id = id;
},
openUserDetails(record) {
this.$refs.UserDetails.modalInfo.title = "客户详情";
......
......@@ -2,29 +2,48 @@
<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>{{ tablePagination.total }}</i></b>
<b
>叫号次数:<i>{{ tablePagination.total }}</i></b
>
<sub>统计时间段:{{ searchForm.time[0] }}~{{ searchForm.time[1] }}</sub>
</div>
<span>
<a-space>
<a-select v-model="searchForm.hallid">
<a-select-option value=""> 全部大厅 </a-select-option>
<a-select-option v-for="item in datingList" :key="item.id" :value="item.id">
<a-select-option
v-for="item in datingList"
:key="item.id"
:value="item.id"
>
{{ item.hallName }}
</a-select-option>
</a-select>
<a-select v-model="searchForm.sectionid">
<a-select-option value=""> 全部部门 </a-select-option>
<a-select-option v-for="item in bumenList" :key="item.id" :value="item.id">
<a-select-option
v-for="item in bumenList"
:key="item.id"
:value="item.id"
>
{{ item.name }}
</a-select-option>
</a-select>
<a-select v-model="searchForm.id">
<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 }}
</a-select-option>
</a-select>
......@@ -36,20 +55,36 @@
</a-select>
<a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time">
</a-range-picker>
<a-input v-model="searchForm.flownum" placeholder="请输入排队编号搜索" @pressEnter="handleSearch">
<a-input
v-model="searchForm.flownum"
placeholder="请输入排队编号搜索"
@pressEnter="handleSearch"
>
<a-icon slot="prefix" type="search" />
</a-input>
<a-button type="primary" class="addclass" @click="handleSearch">搜索</a-button>
<a-button type="primary" class="addclass" @click="handleSearch"
>搜索</a-button
>
<a-button @click="resetBtn">重置</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="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">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1
......@@ -71,7 +106,11 @@
</template>
<!-- 办理业务 -->
<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>
</template>
<!-- 办理开始时间 -->
......@@ -112,11 +151,13 @@
</template>
<!-- 状态 -->
<template slot="style" slot-scope="text">
<span :class="{
<span
:class="{
'stand-line': text.style === 0,
'on-transact': text.style === 1,
'on-end': text.style === 4,
}">
}"
>
{{ $codeMap.queueState[text.style] }}
</span>
</template>
......@@ -280,7 +321,7 @@ export default {
time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间
flownum: "", // 排号编码
hallid: "",
sectionid: ""
sectionid: "",
},
// 大厅列表
datingList: [],
......@@ -354,7 +395,7 @@ export default {
this.getCalllistArr();
this.getCallQueListArr();
},
mounted() { },
mounted() {},
methods: {
// 获取大厅列表
async getDatingListArr() {
......@@ -379,7 +420,7 @@ export default {
time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间
flownum: "", // 排号编码
hallid: "",
sectionid: ""
sectionid: "",
};
this.getCallQueListArr();
},
......@@ -408,7 +449,7 @@ export default {
let { data, total } = res.data;
this.tableList = data;
this.tablePagination.total = total;
console.log(this.tableList)
console.log(this.tableList);
return data;
}
},
......
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