Commit cf54ed04 authored by 彭松's avatar 彭松

1

parent 4f392e03
VUE_APP_API_BASE_URL=http://192.168.0.98:11072
\ No newline at end of file
VUE_APP_API_BASE_URL=http://8.136.255.30:11072
\ No newline at end of file
# 开发环境配置
NODE_ENV = development
VUE_APP_API_BASE_URL=http://192.168.0.98:11078
VUE_APP_API_BASE_URL=http://8.136.255.30:11078
#图片显示拼接
VUE_APP_API_IMG_URL=http://192.168.0.98:11078/
VUE_APP_API_IMG_URL=http://8.136.255.30:11078/
#余林
VUE_APP_API_PHP_URL=http://192.168.0.98:8090
VUE_APP_API_PHP_URL=http://8.136.255.30:8090
#宜宾
#VUE_APP_API_BASE_URL=http://10.12.185.213:11072
#正式
VUE_APP_API_PRP_RUL=http://112.19.80.237:11007
#test
VUE_APP_API_TEST_RUL=http://8.136.255.30:80
import http from "../request/http";
let baseURL = process.env.VUE_APP_API_PRP_RUL
let baseURL = process.env.VUE_APP_API_TEST_RUL
let proURL = process.env.VUE_APP_API_PRP_RUL;
// http://8.136.255.30/eas/customer/list
// 查询客户管理列表
export function getCustomer(params) {
return http.post(`${baseURL}/eas/customer/list`, params);
}
// http://112.19.80.237:11007/basics_api/base/window/list
// 窗口列表
export function windowList(params) {
return http.post(`${baseURL}/basics_api/base/window/list`, params);
return http.post(`${proURL}/basics_api/base/window/list`, params);
}
......@@ -13,30 +13,24 @@
<b>视频作品数:<i>0个</i></b>
</div>
<span class="topBoxFlex">
<a-input allowClear v-model="searchName" placeholder="请输入用户姓名/手机号搜索">
<a-input allowClear v-model="searchForm.query" placeholder="请输入用户姓名/手机号搜索">
<a-icon slot="prefix" type="search" />
</a-input>
<a-select default-value="001">
<!-- <a-select-option
v-for="(item, index) of selectOptions"
:key="index"
:value="item.value"
>
{{ item.label }}
</a-select-option> -->
<a-select-option value="001"> 等级001 </a-select-option>
<a-select-option value="002"> 等级002 </a-select-option>
<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">
{{ item }}
</a-select-option>
</a-select>
<a-button type="primary">搜索</a-button>
</span>
</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">
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">{{ text }}</a-button>
</template>
......@@ -51,143 +45,144 @@
</template>
<script>
import table from "@/mixins/table";
import UserDetails from "./components/UserDetails.vue";
import PicWorks from "./components/PicWorks.vue";
import {
getCustomer
} from "@/api/customer";
export default {
mixins: [table],
name: "PortalAdminVuePoliticsShow",
data() {
return {
tableHeaders: [{
title: "序号",
dataIndex: "index",
width: "60px",
key: "index",
align: "center",
customRender: (text, record, index) => `${index + 1}`,
},
{
title: "真实姓名",
align: "center",
dataIndex: "zhenshixingming",
scopedSlots: {
customRender: "zhenshixingming",
},
},
{
title: "联系电话",
align: "center",
dataIndex: "lianxidianhua",
},
{
title: "单位名称",
align: "center",
dataIndex: "danweimingcheng",
},
{
title: "图片作品数量",
align: "center",
dataIndex: "tupianzuopinshuliang",
scopedSlots: {
customRender: "tupianzuopinshuliang",
},
},
{
title: "视频作品数量",
align: "center",
dataIndex: "shipinzuopinshuliang",
},
{
title: "会员等级",
align: "center",
dataIndex: "huiyuandengji",
},
{
title: "最近登录时间",
align: "center",
dataIndex: "zuijingdenglushijian",
},
{
title: "使用状态",
align: "center",
dataIndex: "shiyongzhuangtai",
},
],
searchName: undefined,
};
},
components: {
UserDetails,
PicWorks,
},
mounted() {
this.setMoment();
for (let key = 0; key < 20; key++) {
this.tableSourceData.push({
id: `00${key + 1}`,
zhenshixingming: `陈飞云${key + 1}`,
lianxidianhua: `13880888888`,
danweimingcheng: `宜宾人力资源与社保管理局${key + 1}`,
tupianzuopinshuliang: `1${key + 1}`,
shipinzuopinshuliang: `-- ${key + 1}`,
huiyuandengji: `vip ${key + 1}`,
zuijingdenglushijian: `2020-09-09 19:19:19`,
shiyongzhuangtai: `正常 ${key + 1}`,
});
import table from "@/mixins/table";
import UserDetails from "./components/UserDetails.vue";
import PicWorks from "./components/PicWorks.vue";
import {
getCustomer
} from "@/api/customer";
const levelList = {
0: '未开启',
1: '试用客户',
2: 'VIP',
3: '设计师'
}
export default {
mixins: [table],
name: "PortalAdminVuePoliticsShow",
data() {
return {
levelList: levelList,
tableList: [],
searchForm: {
query: "",//姓名手机号查询条件
memberLevel: "",//会员等级查询条件
customerSrc: "",//客户来源查询条件
},
tableHeaders: [{
title: "序号",
dataIndex: "index",
width: "60px",
key: "index",
align: "center",
customRender: (text, record, index) => `${index + 1}`,
},
{
title: "真实姓名",
align: "center",
dataIndex: "custName"
},
{
title: "联系电话",
align: "center",
dataIndex: "contactTelphone",
},
{
title: "单位名称",
align: "center",
dataIndex: "organization",
},
{
title: "图片作品数量",
align: "center",
dataIndex: "customerDesignPictures",
},
{
title: "视频作品数量",
align: "center",
dataIndex: "customerDesignVideos",
},
{
title: "会员等级",
align: "center",
dataIndex: "memberLevel",
customRender: (text, record, index) => levelList[text],
},
{
title: "最近登录时间",
align: "center",
dataIndex: "lastLoginTime",
},
{
title: "使用状态",
align: "center",
dataIndex: "status",
customRender: (text, record, index) => text == 1 ? '正常' : '禁用',
},
],
searchName: undefined,
};
},
components: {
UserDetails,
PicWorks,
},
mounted() {
this.setMoment();
},
created() {
this.getList();
},
methods: {
// 获取列表数据
async getList(search = {}) {
let res = await getCustomer({
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
...this.searchForm,
...search,
});
if (res.code == 1) {
let {
data,
total
} = res.data;
this.tableList = data;
this.tablePagination.total = total;
}
},
created() {
//分页
changeTablePage(page) {
this.pagTableChange(page);
this.getList();
},
methods: {
// 获取列表数据
async getList(search = {}) {
let res = await getCustomer({
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
...this.searchForm,
...search,
});
if (res.code == 1) {
let {
data,
total
} = res.data;
this.tableList = data;
this.tablePagination.total = total;
return data;
}
},
QueueState(type) {
switch (type) {
case 0:
return "type1";
case 1:
return "type2";
QueueState(type) {
switch (type) {
case 0:
return "type1";
case 1:
return "type2";
default:
return "type0";
}
},
openPicWorks() {
this.$refs.PicWorks.modalInfo.title = "作品数量";
this.$refs.PicWorks.modalInfo.visible = true;
this.$refs.PicWorks.modalInfo.width = "32%";
},
openUserDetails() {
this.$refs.UserDetails.modalInfo.title = "客户详情";
this.$refs.UserDetails.modalInfo.visible = true;
},
default:
return "type0";
}
},
openPicWorks() {
this.$refs.PicWorks.modalInfo.title = "作品数量";
this.$refs.PicWorks.modalInfo.visible = true;
this.$refs.PicWorks.modalInfo.width = "32%";
},
openUserDetails() {
this.$refs.UserDetails.modalInfo.title = "客户详情";
this.$refs.UserDetails.modalInfo.visible = true;
},
};
},
};
</script>
<style lang="less" scoped>
/deep/.ant-spin-container {
display: block;
}
/deep/.ant-spin-container {
display: block;
}
</style>
\ No newline at end of file
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