|
|
|
@ -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()
|
|
|
|
|
}
|
|
|
|
|