|
@@ -232,77 +232,45 @@
|
|
|
</el-dialog>
|
|
|
<!-- 内容区域 -->
|
|
|
<div class="content">
|
|
|
- <!-- 按钮区域 -->
|
|
|
- <div class="button_top">
|
|
|
- <!-- "启用中"按钮 -->
|
|
|
- <a @click="showopen" :style="{ color: open ? 'black' : 'rgb(179, 179, 179)' }">启用中({{ tableData.length }})</a>
|
|
|
- <!-- "已停用"按钮 -->
|
|
|
- <a @click="showstop" :style="{ color: stop ? 'black' : 'rgb(179, 179, 179)' }">已停用({{ tableData_stop.length }})</a>
|
|
|
- </div>
|
|
|
- <!-- 启用中区域 -->
|
|
|
- <div v-if="open_content">
|
|
|
- <el-table :data="paginatedData" border style="width: 100%;" stripe :header-cell-style="headerCellStyle">
|
|
|
- <el-table-column show-overflow-tooltip prop="company_name" label="组织名称" min-width="32" header-align="center" align="center" />
|
|
|
- <el-table-column show-overflow-tooltip prop="company_number" label="学校名称" min-width="32" header-align="center" align="center" />
|
|
|
- <el-table-column show-overflow-tooltip prop="name" label="姓名" min-width="32" header-align="center" align="center" />
|
|
|
- <el-table-column show-overflow-tooltip prop="account" label="账户" min-width="32" header-align="center" align="center" />
|
|
|
- <el-table-column show-overflow-tooltip label="身份" min-width="32" header-align="center" align="center" >
|
|
|
- <template slot-scope="{ row }">
|
|
|
- <div>{{ roleType(row) }}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column show-overflow-toolti label="操作" min-width="35" header-align="center" align="center">
|
|
|
- <template slot-scope="{ row }">
|
|
|
- <el-button link type="text" size="small" @click="ajax__open_stop(row.userid)">停用</el-button>
|
|
|
- <el-button link type="text" size="small" @click="run(row.userid)">移动</el-button>
|
|
|
-
|
|
|
- <!-- 管理员操作按钮,只有当 row.type === 1 时才显示 -->
|
|
|
- <el-button
|
|
|
- v-if="row.type === 1"
|
|
|
- link
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- @click="ajax_admin(row.userid, row.role, row.type)"
|
|
|
- >
|
|
|
- {{ row.role === 1 ? '已设置管理员' : '设置管理员' }}
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <!-- 分页区域 -->
|
|
|
- <div class="Pagetion" v-if="up_page">
|
|
|
- <el-pagination
|
|
|
- :current-page="currentPage"
|
|
|
- :page-size="pageSize"
|
|
|
- :total="tableData.length"
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
- @current-change="handlePageChange">
|
|
|
- </el-pagination>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!-- 已停用区域 -->
|
|
|
- <div v-if="stop_content">
|
|
|
- <el-table :data="down_paginatedData" border style="width: 100%;" header-align="center" align="center" stripe :header-cell-style="headerCellStyle">
|
|
|
- <el-table-column show-overflow-tooltip prop="company_name" label="组织名称" min-width="35" header-align="center" align="center"/>
|
|
|
- <el-table-column show-overflow-tooltip prop="company_number" label="学校名称" min-width="35" header-align="center" align="center"/>
|
|
|
- <el-table-column show-overflow-tooltip prop="name" label="姓名" min-width="35" header-align="center" align="center"/>
|
|
|
- <el-table-column show-overflow-tooltip prop="account" label="账户" min-width="35" header-align="center" align="center"/>
|
|
|
- <el-table-column label="操作" min-width="25" header-align="center" align="center">
|
|
|
- <template slot-scope="{ row }">
|
|
|
- <el-button link type="text" size="small" @click="ajax__open_stop(row.userid)">启用</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <!-- 分页区域 -->
|
|
|
- <div class="Pagetion" v-if="down_page">
|
|
|
- <el-pagination
|
|
|
- :current-page="down_currentPage"
|
|
|
- :page-size="down_pageSize"
|
|
|
- :total="tableData_stop.length"
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
- @current-change="down_handlePageChange">
|
|
|
- </el-pagination>
|
|
|
- </div>
|
|
|
+ <!-- 合并后的表格 -->
|
|
|
+ <el-table :data="combinedData" border style="width: 100%;" stripe :header-cell-style="headerCellStyle">
|
|
|
+ <el-table-column show-overflow-tooltip prop="company_name" label="组织名称" min-width="32" header-align="center" align="center" />
|
|
|
+ <el-table-column show-overflow-tooltip prop="company_number" label="学校名称" min-width="32" header-align="center" align="center" />
|
|
|
+ <el-table-column show-overflow-tooltip prop="name" label="姓名" min-width="32" header-align="center" align="center" />
|
|
|
+ <el-table-column show-overflow-tooltip prop="account" label="账户" min-width="32" header-align="center" align="center" />
|
|
|
+ <el-table-column show-overflow-tooltip prop="status" label="状态" min-width="32" header-align="center" align="center" />
|
|
|
+ <el-table-column show-overflow-tooltip label="身份" min-width="32" header-align="center" align="center" >
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <div>{{ roleType(row) }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column show-overflow-toolti label="操作" min-width="35" header-align="center" align="center">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <el-button link type="text" size="small" @click="ajax__open_stop(row.userid)">{{ row.status === '启用中' ? '停用' : '启用' }}</el-button>
|
|
|
+ <el-button link type="text" size="small" @click="run(row.userid)">移动</el-button>
|
|
|
+
|
|
|
+ <!-- 管理员操作按钮,只有当 row.type === 1 时才显示 -->
|
|
|
+ <el-button
|
|
|
+ v-if="row.type === 1"
|
|
|
+ link
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ @click="ajax_admin(row.userid, row.role, row.type)"
|
|
|
+ >
|
|
|
+ {{ row.role === 1 ? '已设置管理员' : '设置管理员' }}
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <!-- 分页区域 -->
|
|
|
+ <div class="Pagetion" v-if="up_page">
|
|
|
+ <el-pagination
|
|
|
+ :current-page="currentPage"
|
|
|
+ :page-size="pageSize"
|
|
|
+ :total="combinedData.length"
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
+ @current-change="handlePageChange">
|
|
|
+ </el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -401,6 +369,12 @@ export default {
|
|
|
const end = this.down_currentPage * this.down_pageSize;
|
|
|
return this.tableData_stop.slice(start, end); // 获取当前页的数据
|
|
|
},
|
|
|
+ combinedData() {
|
|
|
+ return [...this.tableData, ...this.tableData_stop].map(item => ({
|
|
|
+ ...item,
|
|
|
+ status: this.tableData.includes(item) ? '启用中' : '已停用'
|
|
|
+ }));
|
|
|
+ },
|
|
|
roleType(){
|
|
|
return function(row){
|
|
|
if(row.type == 2){
|