You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

145 lines
3.9 KiB

1 year ago
<template>
<div>
<xy-dialog ref="dialog" :width="70" :is-show.sync="isShow" :type="'form'" :title="'考勤明细'" :form="form">
<template v-slot:settings>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold;width:0;display:none">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>
</div>
<div class="xy-table-item-content" style="flex-grow: 1;">
<div class="txl">
<div>
<div>课时名称管理思维</div>
<div>授课教师王教授</div>
<div>授课教室功能教室1</div>
<div>考勤日期2023.3.2</div>
</div>
<div style="display: flex;align-items: center;margin-bottom:15px">
<div style="margin-right: 10px;">
<el-input v-model="select.name" placeholder="请输入学员姓名"></el-input>
</div>
<div style="margin-right: 10px;">
<el-select v-model="select.type" placeholder="请选择状态" clearable>
<el-option v-for="item in keep_options" :key="item.id" :label="item.value" :value="item.id">
1 year ago
</el-option>
</el-select>
</div>
<div style="margin-right: 10px;">
<el-button type="primary" size="small">查询</el-button>
</div>
</div>
<div>
<xy-table :list="list" :table-item="table_item" :isPage="false">
<template v-slot:btns>
<div></div>
</template>
</xy-table>
</div>
</div>
</div>
</div>
</template>
<template v-slot:footerContent>
<el-button type="primary" plain style='margin-left:5px;margin-bottom:5px;' @click="isShow=false"></el-button>
</template>
</xy-dialog>
</div>
</template>
<script>
import {index} from "@/api/course/courseKeeps.js"
import myMixins from "@/mixin/selectMixin.js";
export default {
mixins: [myMixins],
1 year ago
components: {
},
data() {
return {
isShow: false,
type: 'add',
id: '',
select:{
status:'',
page:1,
page_size:999
},
1 year ago
form: {
settings: '',
},
list:[],
1 year ago
table_item:[{
prop: 'name',
label: '学员姓名',
align: 'center'
},{
prop: 'date',
1 year ago
label: '考勤时间',
align: 'center'
},{
prop: 'status',
label: '状态',
align: 'center',
customFn: (cell) => {
return ( <div style = {{color: cell.status=='1'?"blue":"red"}}
1 year ago
>
{
cell.status?cell.status:''
} </div> )
}
}]
}
},
created() {},
methods: {
setRow(row,status){
this.keepsObj = row
this.select.status = status
this.getList()
},
async getList() {
const res = index({
page:this.select.page,
page_size:this.select.page_size,
filter:[{
key:'course_content_id',
op:'eq',
value:this.keepsObj.id
},{
key:'status',
op:'eq',
value:this.select.status
},{
key:'date',
op:'eq',
value:this.keepsObj.date
}],
1 year ago
})
}
},
watch: {
isShow(newVal) {
if (newVal) {
1 year ago
} else {
this.keepsObj = {}
1 year ago
}
},
}
}
</script>
<style scoped lang="scss">
::v-deep .settings {
flex-basis: 100%;
}
</style>