This commit is contained in:
@jyuhsin
2025-12-16 16:28:30 +08:00
parent 7426f9a97e
commit 25a89bd68b
2 changed files with 19 additions and 8 deletions
@@ -16,12 +16,12 @@ layout("/layouts/platform.html"){
></el-date-picker>
</search-item>
<search-item label="活动名称">
<el-select @change="activityChange" style="width: 100%" v-model="pageForm.activityId">
<el-select @change="activityChange" style="width: 100%" v-model="pageForm.activityId" filterable>
<el-option :label="item.activityName" :value="item.id" v-for="item in activityList" :key="item.id"></el-option>
</el-select>
</search-item>
<search-item :label="trainType + ''">
<el-select @change="courseChange" :placeholder="'请选择' + trainType" style="width: 100%" v-model="pageForm.courseId">
<el-select @change="courseChange" :placeholder="'请选择' + trainType" style="width: 100%" v-model="pageForm.courseId" filterable>
<el-option :label="item.courseName" :value="item.id" v-for="item in courseList" :key="item.id"></el-option>
</el-select>
</search-item>
@@ -36,7 +36,7 @@ layout("/layouts/platform.html"){
<el-button @click="exportSignPerson" type="primary" size="small">导出签到名单</el-button>
<el-button @click="exportGiftPerson" type="primary" size="small">导出领取名单</el-button>
</table-tool>
<el-table :data="tableData" :size="tableSize">
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder">
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
<el-table-column
:label="column.prop === 'courseNames' ? trainType : column.label"
@@ -45,8 +45,6 @@ layout("/layouts/platform.html"){
align="center"
header-align="center"
show-overflow-tooltip
v-if="(column.prop !== 'state' && column.prop !== 'absentCount') || (reserveMode === 2 && column.prop === 'state' && column.prop !== 'absentCount')
|| (column.prop === 'absentCount' && course.isMobileSign === true)"
v-for="(column,index) in tableColumns"
:key="index"
>
@@ -111,7 +109,8 @@ layout("/layouts/platform.html"){
{ label: "单位", prop: "unitName", sortable: true },
{ label: "分工会", prop: "unionName", sortable: true },
{ label: "课程", prop: "courseNames", sortable: true },
{ label: "缺席次数", prop: "absentCount" },
{ label: "签到次数", prop: "signCount", sortable: true },
{ label: "缺席次数", prop: "absentCount", sortable: true },
{ label: "是否黑名单", prop: "isDisabled", sortable: true }
],
trainType: "培训班",
@@ -198,7 +197,12 @@ layout("/layouts/platform.html"){
this.trainType = type?.name || "培训班"
const resp = await this.$axios.post(loc() + "/getCourseByActivityId", { activityId: val })
this.courseList = resp.data
this.pageForm.courseId = ""
if(this.courseList.length > 0) {
this.$set(this.pageForm, "courseId", this.courseList[0].id)
} else {
this.pageForm.courseId = ""
}
this.doSearch()
})
},
async handleUser(userId) {