|
|
@@ -54,6 +54,80 @@
|
|
|
<el-button @click="changeAdminVisible = false">取 消</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 更换记录查看对话框 -->
|
|
|
+ <el-dialog
|
|
|
+ title="更换记录"
|
|
|
+ :visible.sync="changeRecordVisible"
|
|
|
+ width="1070px"
|
|
|
+ :show-close="true"
|
|
|
+ :append-to-body="true">
|
|
|
+ <!-- 更换记录列表 -->
|
|
|
+ <div class="change-records-list">
|
|
|
+ <el-table
|
|
|
+ :data="recordsData"
|
|
|
+ stripe
|
|
|
+ style="width: 100%">
|
|
|
+ <el-table-column
|
|
|
+ prop="oldAdminName"
|
|
|
+ label="原管理员"
|
|
|
+ width="110">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="oldAdminTel"
|
|
|
+ label="原手机号"
|
|
|
+ width="120">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="newAdminName"
|
|
|
+ label="新管理员"
|
|
|
+ width="110">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="newAdminTel"
|
|
|
+ label="新手机号"
|
|
|
+ width="120">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="sponsorName"
|
|
|
+ label="申请人"
|
|
|
+ width="110">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="sponsorTel"
|
|
|
+ label="申请人手机号"
|
|
|
+ width="120">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="changeType"
|
|
|
+ label="更换方式"
|
|
|
+ width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.changeType === 'ADMIN_OPERATION'">管理员操作</span>
|
|
|
+ <span v-if="scope.row.changeType === 'USER_APPEAL'">人工申诉</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="launchTime"
|
|
|
+ label="时间"
|
|
|
+ :formatter="formatDate">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 对话框尾部 -->
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ layout="prev, pager, next"
|
|
|
+ prev-text="< 上一页"
|
|
|
+ next-text="下一页 >"
|
|
|
+ :page-size="recordsPageParams.size"
|
|
|
+ :total="total"
|
|
|
+ @current-change="handleCurrentPage">
|
|
|
+ </el-pagination>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -61,6 +135,7 @@
|
|
|
import axios from '@/assets/js/axios'
|
|
|
import MessageList from './common/MessageList'
|
|
|
import * as types from '@/store/mutation-types'
|
|
|
+ import { formatDate } from '@/assets/js/utils'
|
|
|
|
|
|
const keys = [
|
|
|
{
|
|
|
@@ -77,6 +152,10 @@
|
|
|
}
|
|
|
]
|
|
|
|
|
|
+ function showRecordsByPagination (params) {
|
|
|
+ return axios.get('/api/user/space/admin//showRecordsByPagination', { params })
|
|
|
+ }
|
|
|
+
|
|
|
export default {
|
|
|
name: 'enterprise-admin',
|
|
|
components: {
|
|
|
@@ -88,7 +167,15 @@
|
|
|
items: keys,
|
|
|
key: 'userUU',
|
|
|
keyword: '',
|
|
|
- adminUser: {}
|
|
|
+ adminUser: {},
|
|
|
+ changeRecordVisible: false,
|
|
|
+ recordsPageParams: {
|
|
|
+ page: 1,
|
|
|
+ size: 9,
|
|
|
+ spaceUU: ''
|
|
|
+ },
|
|
|
+ recordsData: [],
|
|
|
+ total: 0
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -118,6 +205,7 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ formatDate: formatDate,
|
|
|
changeAdmin () {
|
|
|
// 初始化对话框信息
|
|
|
this.key = 'userUU'
|
|
|
@@ -127,8 +215,15 @@
|
|
|
this.changeAdminVisible = true
|
|
|
},
|
|
|
showRecords () {
|
|
|
- const routeLocation = {name: 'AppealHome', replace: true}
|
|
|
- this.$router.push(routeLocation)
|
|
|
+ this.changeRecordVisible = true
|
|
|
+ this.recordsPageParams = {
|
|
|
+ page: 1,
|
|
|
+ size: 9,
|
|
|
+ spaceUU: this.enterprise.spaceUU
|
|
|
+ }
|
|
|
+ this.fetchRecordData()
|
|
|
+ /*const routeLocation = {name: 'AppealHome', replace: true}
|
|
|
+ this.$router.push(routeLocation)*/
|
|
|
},
|
|
|
searchAndSelectAdmin () {
|
|
|
const params = { spaceUU: this.enterprise.spaceUU, key: this.key, keyword: this.keyword }
|
|
|
@@ -168,6 +263,24 @@
|
|
|
axios.put(`/api/user/space/${spaceUU}/changeAdmin`, {}, { params })
|
|
|
.then(success)
|
|
|
.catch(error)
|
|
|
+ },
|
|
|
+ fetchRecordData () {
|
|
|
+ const params = _.defaultsDeep({}, this.recordsPageParams)
|
|
|
+ params.page = params.page - 1
|
|
|
+
|
|
|
+ const success = pageInfo => {
|
|
|
+ this.recordsData = pageInfo.content
|
|
|
+ this.total = pageInfo.totalElements
|
|
|
+ console.log(pageInfo)
|
|
|
+ }
|
|
|
+ const error = error => {
|
|
|
+ console.log(error)
|
|
|
+ }
|
|
|
+ showRecordsByPagination(params).then(success).catch(error)
|
|
|
+ },
|
|
|
+ handleCurrentPage (currentPage) {
|
|
|
+ this.recordsPageParams.page = currentPage
|
|
|
+ this.fetchRecordData()
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -246,6 +359,10 @@
|
|
|
|
|
|
color: #4A7DE1;
|
|
|
}
|
|
|
+ .change-records-list {
|
|
|
+ margin: -22px 0 0 -40px;
|
|
|
+ min-height: 440px;
|
|
|
+ }
|
|
|
</style>
|
|
|
|
|
|
<style>
|
|
|
@@ -307,4 +424,79 @@
|
|
|
background-color: #4E8EFC;
|
|
|
color: #FFFFFF;
|
|
|
}
|
|
|
+ /* List */
|
|
|
+ .change-records-list .el-table th.is-leaf:first-child {
|
|
|
+ padding-left: 35px;
|
|
|
+ }
|
|
|
+ .change-records-list .el-table--enable-row-transition .el-table__body td:first-child {
|
|
|
+ padding-left: 35px;
|
|
|
+ }
|
|
|
+ .change-records-list .el-table th>.cell {
|
|
|
+ color: #000000;
|
|
|
+ font-size: 13px;
|
|
|
+ font-weight: normal;
|
|
|
+ font-family: "Microsoft YaHei", sans-serif;
|
|
|
+ }
|
|
|
+ .change-records-list .el-table th {
|
|
|
+ padding: 9px 0 8px;
|
|
|
+ }
|
|
|
+ .change-records-list .el-table--enable-row-hover .el-table__body tr:hover>td {
|
|
|
+ background-color: #D0E5F5;
|
|
|
+
|
|
|
+ color: #000000;
|
|
|
+ font-size: 13px;
|
|
|
+ font-family: "Microsoft YaHei", sans-serif;
|
|
|
+ }
|
|
|
+ /* striped row */
|
|
|
+ .change-records-list .el-table--enable-row-hover .el-table__body tr.el-table__row--striped:hover>td {
|
|
|
+ background-color: #D0E5F5;
|
|
|
+
|
|
|
+ color: #000000;
|
|
|
+ font-size: 13px;
|
|
|
+ font-family: "Microsoft YaHei", sans-serif;
|
|
|
+ }
|
|
|
+ .change-records-list .el-table td {
|
|
|
+ padding: 10px 0;
|
|
|
+
|
|
|
+ font-size: 13px;
|
|
|
+ font-family: "Microsoft YaHei", sans-serif;
|
|
|
+ }
|
|
|
+ .change-records-list .el-table--striped .el-table__body tr.el-table__row--striped td {
|
|
|
+ background: #F4F4F4;
|
|
|
+ }
|
|
|
+ .dialog-footer .el-pagination button,
|
|
|
+ .dialog-footer .el-pagination span:not([class*=suffix]) {
|
|
|
+ color: #000000;
|
|
|
+ font-weight: normal;
|
|
|
+ }
|
|
|
+ .dialog-footer .el-pagination button span {
|
|
|
+ height: 26px;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ border: none;
|
|
|
+ border-radius: 0;
|
|
|
+ }
|
|
|
+ .dialog-footer .el-pagination.is-background .btn-next,
|
|
|
+ .dialog-footer .el-pagination.is-background .btn-prev,
|
|
|
+ .dialog-footer .el-pagination.is-background .el-pager li {
|
|
|
+ font-weight: normal;
|
|
|
+ }
|
|
|
+ .dialog-footer .el-pagination.is-background .btn-next,
|
|
|
+ .dialog-footer .el-pagination.is-background .btn-prev {
|
|
|
+ padding-right: 5px;
|
|
|
+ padding-left: 5px;
|
|
|
+
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ border: 1px solid #CFCFCF;
|
|
|
+ border-radius: 0;
|
|
|
+ }
|
|
|
+ .dialog-footer .el-pagination.is-background .el-pager li {
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ border: 1px solid #CFCFCF;
|
|
|
+ border-radius: 0;
|
|
|
+ }
|
|
|
+ .dialog-footer .el-pagination.is-background .el-pager li.active {
|
|
|
+ background-color: #303743;
|
|
|
+ border-color: #303743;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
</style>
|