<template>
|
<div class="user-manage">
|
<div class="top-card">
|
<CommonSearch
|
:show-add="false"
|
:amount-view="false"
|
placeholder="请输入用户名/手机号"
|
@searchClick="onFilterSearch"
|
>
|
<!-- <template slot="leftButton">
|
<el-button size="small" type="primary" @click="addBtnClick">新建</el-button>
|
</template> -->
|
</CommonSearch>
|
</div>
|
|
<div class="body">
|
<div class="body-card">
|
<div class="list-view">
|
<TableCommonView
|
ref="tableListRef"
|
:table-list="tableList"
|
:show-summary="showSummary"
|
@selClientClick="selClientClick"
|
@selMasterClick="selMasterClick"
|
@selCommonClick="selCommonClick"
|
@getSelectArray="getSelectArray"
|
@selTableCol="selTableCol"
|
>
|
<template slot="tableButton">
|
<el-table-column label="操作" width="90">
|
<template slot-scope="scope">
|
<el-button @click="viewClick(scope.row)" type="text" size="small">查看</el-button>
|
<el-button @click="approveClick(scope.row)" type="text" size="small">审核</el-button>
|
<el-button @click="approveClick(scope.row)" type="text" size="small">启用</el-button>
|
<el-button @click="editClick(scope.row)" type="text" size="small">编辑</el-button>
|
</template>
|
</el-table-column>
|
</template>
|
</TableCommonView>
|
</div>
|
<div class="btn-pager">
|
<PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
|
</div>
|
</div>
|
</div>
|
<!-- 新建/编辑 -->
|
<!-- <AddSubOrderDialog v-if="editConfig.visible" :edit-common-config="editConfig" /> -->
|
</div>
|
</template>
|
|
<script>
|
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
|
|
export default {
|
name: "UserManage",
|
props: {},
|
mixins: [pageMixin],
|
components: {},
|
computed: {},
|
data() {
|
return {
|
tableList: {},
|
tableColumn: [
|
{ label: "序号", prop: "number", default: true },
|
{ label: "用户名", prop: "client_name" },
|
{ label: "手机号", prop: "signTime" }, // 签约日期
|
{ label: "公司名称", prop: "serviceContractType" },
|
{ label: "联系人姓名", prop: "serviceContractStatus" },
|
{ label: "邮箱", prop: "member_name" },
|
{ label: "行业", prop: "productName", isProductName: true },
|
{ label: "地区", prop: "startTime" },
|
{ label: "状态", prop: "endTime" }
|
],
|
showCol: ["序号", "用户名", "手机号", "公司名称", "联系人姓名", "邮箱", "行业", "地区", "状态"]
|
}
|
},
|
created() {
|
this.setTable()
|
},
|
methods: {
|
// 查看
|
viewClick(row) {
|
console.log(row)
|
},
|
// 审核
|
approveClick(row) {
|
console.log(row)
|
},
|
// 编辑
|
editClick(row) {
|
console.log(row)
|
},
|
// 列表初始化
|
setTable() {
|
this.tableList = {
|
selectIndex: true,
|
tableInfomation: [],
|
allcol: [],
|
showcol: this.showCol,
|
tableColumn: this.setColumnVisible(this.showCol)
|
}
|
this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label)
|
this.searchOptions = []
|
for (let i = 0; i < this.tableList.tableColumn.length; i++) {
|
const label = this.tableList.tableColumn[i].label
|
const value = this.tableList.tableColumn[i].prop
|
this.searchOptions.push({ value: value, label: label })
|
}
|
},
|
setColumnVisible(showCol) {
|
return this.tableColumn.map((ele) => {
|
return {
|
...ele,
|
isShowColumn: showCol.includes(ele.label)
|
}
|
})
|
},
|
selTableCol(val) {
|
this.showcol = val
|
this.tableList.tableColumn = this.setColumnVisible(val)
|
}
|
}
|
}
|
</script>
|
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
<style lang="scss" scoped>
|
.user-manage {
|
height: 100%;
|
.top-card {
|
height: 80px;
|
display: flex;
|
align-items: center;
|
margin: 12px 20px 0 20px;
|
border-radius: 12px;
|
background-color: #fff;
|
padding-left: 20px;
|
}
|
.body {
|
box-sizing: border-box;
|
padding: 10px 20px;
|
border-radius: 12px;
|
height: calc(100% - 92px);
|
.body-card {
|
background-color: #fff;
|
border-radius: 12px;
|
height: 100%;
|
overflow: hidden;
|
}
|
.list-view {
|
height: calc(100% - 60px);
|
overflow: hidden;
|
}
|
.btn-pager {
|
display: flex;
|
margin-top: 10px;
|
.page {
|
margin-left: auto;
|
}
|
}
|
}
|
}
|
|
::v-deep {
|
}
|
</style>
|