[fix][V]:完善周次选择器

master
aiyadc 5 years ago
parent 2e3c97a4ed
commit 47ad2e7d09

@ -70,6 +70,7 @@
import {get, post} from "~/utils";
import detail from "~/components/supManager/detail" ;
import refuseReason from "~/components/supManager/refuseReason" ;
export default {
name:'checking',
@ -162,8 +163,16 @@
},
refuse_apply(rowData){
// rowData+
this.$refs.refuseReason.isshowrefuse=true
// this.$prompt('', '', {
// confirmButtonText: '',
// cancelButtonText: ''
// }).then(async ({ value }) => {
// this.data.refuseReason = value
// await post('lb/labrecord/refuse',this.data)
// this.$emit('complete')
// this.show = false
// showSuccess('',this)
// }).catch(()=>{})
}
}
@ -174,4 +183,4 @@
<style>
</style>
</style>

@ -12,6 +12,7 @@
<el-menu-item index="1" route="../">首页</el-menu-item>
<el-menu-item index="2" route="labManager">实验室管理</el-menu-item>
<el-menu-item index="3" route="userManage">用户管理</el-menu-item>
<el-menu-item index="4" route="check">审核</el-menu-item>
<drop-down-user :user="nickname" @back="backLogin" @goPersonal="goPersonal"></drop-down-user>
</el-menu>
</div>

@ -9,7 +9,23 @@
</el-input>
</div>
</el-header>
<el-table :data="tableData" border ref="mar">
<el-form style="align-content: center;margin:auto;">
<el-row>
<el-col style="border:1.5px lightslategrey;width:50%;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;">
<el-button style="width:100%;text-align:center;float:right;background-color: peachpuff" icon="el-icon-circle-plus-outline"
@click="isCheck=0" >待审核</el-button>
</el-col>
<el-col style="border:1.5px lightslategrey;width:50%;border-right-style:solid;border-bottom-style:solid;">
<el-button style="width:100%;text-align:center;float:right;background:silver" icon="el-icon-circle-plus-outline"
@click="isCheck=1" >已审核</el-button>
</el-col>
</el-row>
</el-form >
<el-table :data="tableDataComputed" border ref="mar" style="align-content: center;margin:auto;" :cell-style="cellStyle">
<el-table-column prop="position" label="实验室地点"></el-table-column>
<el-table-column prop="lab_name" label="实验室名称"></el-table-column>
<el-table-column prop="classes" label="授课班级"></el-table-column>
@ -29,15 +45,16 @@
:type="scope.row.status === 0 ? 'primary' : scope.row.status ===2 ? 'success': 'warning'"
disable-transitions>
{{scope.row.status ===0 ? '待审核' :
scope.row.status ===2 ? '审核通过': '审核失败'}}
scope.row.status ===2 ? '审核通过': '未通过'}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="100px" align="center">
<template slot-scope="scope">
<el-button @click="showDetail(scope.row)" type="primary" size="mini"
:disabled="scope.row.status!==0">审核
<el-button @click="showDetail(scope.row)" :type="isCheck===0?'primary':'danger'" size="mini"
>{{isCheck===0?'审核':'重新审核'}}
</el-button>
</template>
</el-table-column>
</el-table>
@ -60,6 +77,7 @@
},
data() {
return {
isCheck:0,
tableData: []
}
},
@ -67,6 +85,9 @@
async load(){
this.tableData = await get('/lb/labrecord/getRecordList')
},
cellStyle(){
return ""
},
async showDetail(item){
const data = await get('lb/labrecord/getRecordDetail',item)
data.create_time = new Date(data.create_time).toLocaleString( )
@ -75,6 +96,17 @@
this.$refs.detail.show = true
}
},
computed:{
tableDataComputed(){
if (this.isCheck===0){
return this.tableData.filter(data=>data.status===0)
}else {
return this.tableData.filter(data=>data.status===1 || data.status===2)
}
}
},
async mounted() {
await this.load()
}

@ -22,7 +22,6 @@ import labManager from "~/components/supManager/labManage";
//manager
import check from "~/components/supManager/check";
import applyRecord from "~/pages/manager/applyRecord";
import managerHome from "~/components/manager/home"
import managerIndex from "~/components/manager/index";
@ -122,7 +121,7 @@ const routes = [
},
{
path: 'check',
component: check
component: applyRecord
}
]
}

Loading…
Cancel
Save