|
|
@@ -1,10 +1,19 @@
|
|
|
<template>
|
|
|
- <common-home>
|
|
|
+ <common-home
|
|
|
+ :pageSize="pageParams.size"
|
|
|
+ :total="total"
|
|
|
+ :searchKeys="searchKeys"
|
|
|
+ :searchKey="pageParams.key"
|
|
|
+ :searchKeyword="pageParams.keyword"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ @refresh-data="handleRefreshData"
|
|
|
+ @search="handleSearchAction">
|
|
|
<div slot="screen-type">
|
|
|
+ <!-- 认证状态 -->
|
|
|
<label>认证状态</label>
|
|
|
- <el-select v-model="value" placeholder="不限">
|
|
|
+ <el-select v-model="pageParams.validCode" clearable placeholder="不限" @change="handleRefreshData">
|
|
|
<el-option
|
|
|
- v-for="item in options"
|
|
|
+ v-for="item in validCodeOptions"
|
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
|
:value="item.value">
|
|
|
@@ -13,9 +22,9 @@
|
|
|
|
|
|
<!-- 注册来源 -->
|
|
|
<label>注册来源</label>
|
|
|
- <el-select v-model="value" placeholder="不限">
|
|
|
+ <el-select v-model="pageParams.fromApp" clearable placeholder="不限" @change="handleRefreshData">
|
|
|
<el-option
|
|
|
- v-for="item in options"
|
|
|
+ v-for="item in fromAppOptions"
|
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
|
:value="item.value">
|
|
|
@@ -29,28 +38,68 @@
|
|
|
style="width: 100%">
|
|
|
<el-table-column
|
|
|
label="操作"
|
|
|
- width="130"
|
|
|
- align="center">
|
|
|
+ width="120">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="name"
|
|
|
- label="姓名"
|
|
|
- width="180">
|
|
|
+ prop="spaceName"
|
|
|
+ label="公司名称"
|
|
|
+ width="200">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="address"
|
|
|
- label="地址">
|
|
|
+ prop="validCode"
|
|
|
+ label="认证状态"
|
|
|
+ width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.validCode === 0" style="padding-left: 8px;">未申请</span>
|
|
|
+ <span v-if="scope.row.validCode === 1" style="padding-left: 8px;">待认证</span>
|
|
|
+ <span v-if="scope.row.validCode === 2" style="padding-left: 8px;">已认证</span>
|
|
|
+ <span v-if="scope.row.validCode === 3" style="padding-left: 8px;">未通过</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="admin"
|
|
|
+ label="管理员"
|
|
|
+ width="100">
|
|
|
+ <template slot-scope="scope" v-if="scope.row.admin && scope.row.admin.userUU">
|
|
|
+ <span v-text="scope.row.admin.vipName" style="padding-left: 8px;"></span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="registerDate"
|
|
|
+ label="注册时间">
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</common-home>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import _ from 'lodash'
|
|
|
+ import axios from '@/assets/js/axios'
|
|
|
+ import {ValidCode} from '@/Constant'
|
|
|
import CommonHome from '../common/CommonHome'
|
|
|
|
|
|
+ const fromApps = [
|
|
|
+ {
|
|
|
+ label: 'B2B',
|
|
|
+ value: 'b2b'
|
|
|
+ }, {
|
|
|
+ label: 'UAS',
|
|
|
+ value: 'uas'
|
|
|
+ }, {
|
|
|
+ label: '优软商城',
|
|
|
+ value: 'mall'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ const searchKeys = [
|
|
|
+ {
|
|
|
+ label: '企业名称',
|
|
|
+ value: 'spaceName'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+
|
|
|
export default {
|
|
|
name: 'enterprise-home',
|
|
|
components: {
|
|
|
@@ -58,40 +107,66 @@
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
- tableData: [{
|
|
|
- date: '查看',
|
|
|
- name: '王小虎',
|
|
|
- address: '上海市普陀区金沙江路 1518 弄'
|
|
|
- }, {
|
|
|
- date: '查看',
|
|
|
- name: '王小虎',
|
|
|
- address: '上海市普陀区金沙江路 1517 弄'
|
|
|
- }, {
|
|
|
- date: '查看',
|
|
|
- name: '王小虎',
|
|
|
- address: '上海市普陀区金沙江路 1519 弄'
|
|
|
- }, {
|
|
|
- date: '查看',
|
|
|
- name: '王小虎',
|
|
|
- address: '上海市普陀区金沙江路 1516 弄'
|
|
|
- }],
|
|
|
- options: [{
|
|
|
- value: '选项1',
|
|
|
- label: '黄金糕'
|
|
|
- }, {
|
|
|
- value: '选项2',
|
|
|
- label: '双皮奶'
|
|
|
- }, {
|
|
|
- value: '选项3',
|
|
|
- label: '蚵仔煎'
|
|
|
- }, {
|
|
|
- value: '选项4',
|
|
|
- label: '龙须面'
|
|
|
- }, {
|
|
|
- value: '选项5',
|
|
|
- label: '北京烤鸭'
|
|
|
- }],
|
|
|
- value: ''
|
|
|
+ pageParams: {
|
|
|
+ page: 1,
|
|
|
+ size: 8,
|
|
|
+ validCode: null,
|
|
|
+ fromApp: null,
|
|
|
+ key: 'spaceName',
|
|
|
+ keyword: null
|
|
|
+ },
|
|
|
+ pageContent: [],
|
|
|
+ total: 0,
|
|
|
+ fromAppOptions: fromApps,
|
|
|
+ validCodeOptions: ValidCode,
|
|
|
+ searchKeys: searchKeys
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ this.fetchData()
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ tableData () {
|
|
|
+ return this.pageContent
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ '$route': 'fetchData'
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ fetchData () {
|
|
|
+ const params = _.defaultsDeep({}, this.pageParams)
|
|
|
+ params.page = params.page - 1
|
|
|
+
|
|
|
+ const success = page => {
|
|
|
+ this.pageContent = page.content || []
|
|
|
+ this.total = page.totalElements
|
|
|
+ }
|
|
|
+ const error = response => {
|
|
|
+ this.$message.error(response)
|
|
|
+ }
|
|
|
+
|
|
|
+ axios.get('/api/user/space//showSpaceByPagination', { params }).then(success).catch(
|
|
|
+ error)
|
|
|
+ },
|
|
|
+ handleCurrentChange (currentPage) {
|
|
|
+ this.pageParams.page = currentPage
|
|
|
+ this.fetchData()
|
|
|
+ },
|
|
|
+ handleRefreshData () {
|
|
|
+ console.log(this.pageParams)
|
|
|
+ this.fetchData()
|
|
|
+ },
|
|
|
+ handleSearchAction (key, keyword) {
|
|
|
+ console.log(key, keyword)
|
|
|
+ this.pageParams.key = key
|
|
|
+ this.pageParams.keyword = keyword
|
|
|
+
|
|
|
+ this.fetchData()
|
|
|
+ },
|
|
|
+ handleClick (row) {
|
|
|
+ const routeLocation = {name: 'UserBasicInfo', params: row}
|
|
|
+ this.$router.push(routeLocation)
|
|
|
}
|
|
|
}
|
|
|
}
|