|
@@ -0,0 +1,160 @@
|
|
|
+<template>
|
|
|
+ <div style="font-size: 10px;">
|
|
|
+ <div class="search-term">
|
|
|
+ <el-form :inline="true" class="demo-form-inline">
|
|
|
+ <el-form-item label="切换分期" prop="phone">
|
|
|
+ <el-select v-model="searchInfo.planId" placeholder="请选择考试分期" >
|
|
|
+ <el-option label="全部" :value="0"></el-option>
|
|
|
+ <el-option v-for="item in planList"
|
|
|
+ :key="item.planId"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.planId"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="用户名字" prop="nickname">
|
|
|
+ <el-input v-model="searchInfo.nickname" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="身份证" prop="cardId">
|
|
|
+ <el-input v-model="searchInfo.cardId" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <el-table :data="tableData" border stripe>
|
|
|
+ <el-table-column label="序号" width="80" prop="id" align="center"></el-table-column>
|
|
|
+ <el-table-column label="姓名" prop="nickname" align="center"></el-table-column>
|
|
|
+ <el-table-column label="身份证" prop="cardId" align="center"></el-table-column>
|
|
|
+ <el-table-column label="报考岗位" prop="courseName" align="center"></el-table-column>
|
|
|
+ <el-table-column label="考试分期" prop="planName" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{planMap[row.planId]}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="更新时间" prop="updateAt" align="center"></el-table-column>
|
|
|
+ <el-table-column align="center" width="160" label="操作">
|
|
|
+ <template slot-scope="{row, $index, _self}">
|
|
|
+ <el-popover width="160px" :ref="`popover-${$index}`">
|
|
|
+ <p style="height: 20px;">你是否确认取消?</p>
|
|
|
+ <div style="text-align: right;margin: 0;">
|
|
|
+ <el-button size="mini" type="text" @click="_self.$refs[`popover-${$index}`].doClose()">取消</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="confirmCancel(row, $index)">确定</el-button>
|
|
|
+ </div>
|
|
|
+ <el-button type="primary" slot="reference">确认</el-button>
|
|
|
+ </el-popover>
|
|
|
+
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <el-pagination :current-page="page" :page-size="size"
|
|
|
+ :page-sizes="[10, 30, 50, 100]" :style="{float:'right',padding:'20px'}"
|
|
|
+ :total="total"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
|
|
+
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import {postData,getTrainPlanList, getAdminUserPlanList} from "@/api/xinpei";
|
|
|
+ import {toDate,toDatetime} from "@/utils/date"
|
|
|
+ import infoList from "@/mixins/infoList";
|
|
|
+
|
|
|
+ export default {
|
|
|
+ name: "Api",
|
|
|
+ mixins: [infoList],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ listApi:getAdminUserPlanList,
|
|
|
+ planId: "",
|
|
|
+ searchInfo:{
|
|
|
+ status:2,
|
|
|
+ planId:0
|
|
|
+ },
|
|
|
+ planMap:{},
|
|
|
+ planList:[],
|
|
|
+ tableData:[]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch:{
|
|
|
+ planId( planId ){
|
|
|
+ this.page=1
|
|
|
+ this.getTableData()
|
|
|
+ },
|
|
|
+ searchInfo:{
|
|
|
+ handler(new_value,old_value){
|
|
|
+ this.page = 1;
|
|
|
+ this.getTableData();
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ methods: {
|
|
|
+ //条件搜索前端看此方法
|
|
|
+ onSubmit() {
|
|
|
+ this.page = 1;
|
|
|
+ this.page = 10;
|
|
|
+ this.getTableData();
|
|
|
+ },
|
|
|
+ getAllTrainPlanList(){
|
|
|
+ postData("getAllTrainPlanList", {}).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.planList = res.data||[]
|
|
|
+ for( let i in this.planList){
|
|
|
+ let item = this.planList[i]
|
|
|
+ this.planMap[item.planId] = item.name;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ confirmCancel( row, index ){
|
|
|
+ let logId = row.id;
|
|
|
+ postData("confirmCancelUserPlan", {logId}).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.tableData.splice(index, 1)
|
|
|
+ this.$message.sucessMsg( "审核成功", 2)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleCurrentChange(page){
|
|
|
+ this.page = page
|
|
|
+ this.getTableData()
|
|
|
+ },
|
|
|
+ handleSizeChange(size){
|
|
|
+ this.size = size
|
|
|
+ this.getTableData()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ filters:{
|
|
|
+ toDate
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getAllTrainPlanList();
|
|
|
+ this.getTableData()
|
|
|
+ }
|
|
|
+ };
|
|
|
+</script>
|
|
|
+<style scoped lang="scss">
|
|
|
+ .button-box {
|
|
|
+ padding: 10px 20px;
|
|
|
+
|
|
|
+ .el-button {
|
|
|
+ float: right;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-tag--mini {
|
|
|
+ margin-left: 5px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .warning {
|
|
|
+ color: #dc143c;
|
|
|
+ }
|
|
|
+</style>
|