|
|
@@ -11,6 +11,13 @@
|
|
|
<a-select-option value="男">男</a-select-option>
|
|
|
<a-select-option value="女">女</a-select-option>
|
|
|
</a-select>
|
|
|
+
|
|
|
+ <a-select v-model:value="searchForm.classs" placeholder="请选择班级" style="width: 120px; margin-right: 12px">
|
|
|
+ <a-select-option v-for="(item, index) in classOptions" :key="index" :value="item.value">{{
|
|
|
+ item.label
|
|
|
+ }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
+
|
|
|
<a-select v-model:value="searchForm.userStatus" placeholder="请选择状态" style="width: 120px; margin-right: 12px">
|
|
|
<a-select-option v-for="(item, index) in statusOptions" :key="index" :value="item.value">{{
|
|
|
item.label
|
|
|
@@ -21,9 +28,13 @@
|
|
|
v-model:value="searchForm.date"
|
|
|
style="margin-right: 12px; width: 240px"
|
|
|
/>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
<a-button type="primary" @click="onSearch" style="margin-right: 8px">查询</a-button>
|
|
|
<a-button @click="onReset">重置</a-button>
|
|
|
</div>
|
|
|
+ <div style="height: 20px"></div>
|
|
|
<!-- 操作按钮 -->
|
|
|
<div class="action-bar">
|
|
|
<a-button type="primary" @click="onAddStudent" style="margin-right: 8px">+ 新增学员</a-button>
|
|
|
@@ -41,11 +52,10 @@
|
|
|
<!-- 表格 -->
|
|
|
<a-table
|
|
|
:columns="columns"
|
|
|
- :row-key="rowKey"
|
|
|
+
|
|
|
:data-source="pagedDatas"
|
|
|
:pagination="false"
|
|
|
- :row-selection="rowSelection"
|
|
|
- :scroll="{ x: 1000, y: 320 }"
|
|
|
+ :scroll="{ x: 1500, y: 320 }"
|
|
|
bordered
|
|
|
class="student-table"
|
|
|
>
|
|
|
@@ -187,7 +197,7 @@
|
|
|
import { ref, reactive, computed, onMounted, unref} from 'vue'
|
|
|
import { message } from 'ant-design-vue'
|
|
|
import { DownOutlined } from '@ant-design/icons-vue'
|
|
|
- import { getDepartmentMembers } from '@/api/course/courseDetail'
|
|
|
+ import { getDepartmentMembers ,getClass } from '@/api/course/courseDetail'
|
|
|
import studentDetailsApi from '@/api/courseCenter/studentDetails.js'
|
|
|
import { getStudentDetail } from '@/api/course/courseDetail'
|
|
|
import studentSelection from './studentSelection.vue'
|
|
|
@@ -216,26 +226,28 @@
|
|
|
])
|
|
|
|
|
|
const searchForm = reactive({
|
|
|
- queryInfo: null,
|
|
|
- gender: null,
|
|
|
- userStatus: null,
|
|
|
+ queryInfo: undefined,
|
|
|
+ gender: undefined,
|
|
|
+ userStatus: undefined,
|
|
|
date: [],
|
|
|
- startTime: null, // 新增开始时间字段
|
|
|
- endTime: null // 新增结束时间字段
|
|
|
+ startTime: undefined, // 新增开始时间字段
|
|
|
+ endTime: undefined,// 新增结束时间字段
|
|
|
+ classs : undefined
|
|
|
})
|
|
|
|
|
|
const columns = [
|
|
|
- { title: '学员编号', dataIndex: 'ACCOUNT', align: 'center' },
|
|
|
- { title: '姓名', dataIndex: 'userIdName', align: 'center' },
|
|
|
- { title: '性别', dataIndex: 'gender', align: 'center' },
|
|
|
- { title: '账号状态', dataIndex: 'userStatusName', align: 'center' },
|
|
|
- { title: '手机号', dataIndex: 'phone', align: 'center' },
|
|
|
- { title: '在线状态', dataIndex: 'isLoginName', align: 'center' },
|
|
|
- { title: '最后登录', dataIndex: 'latestLoginTime', align: 'center' },
|
|
|
- { title: '操作', dataIndex: 'actions', fixed: 'right', align: 'center', width: 220 }
|
|
|
+ { title: '学员编号', dataIndex: 'ACCOUNT',width: 5 },
|
|
|
+ { title: '姓名', dataIndex: 'userIdName',width: 5 },
|
|
|
+ { title: '性别', dataIndex: 'gender',width: 5 },
|
|
|
+ { title: '账号状态', dataIndex: 'userStatusName' ,width: 5 },
|
|
|
+ { title: '手机号', dataIndex: 'phone',width: 10 },
|
|
|
+ { title: '在线状态', dataIndex: 'isLoginName',width: 5},
|
|
|
+ { title: '最后登录', dataIndex: 'latestLoginTime',width: 10 },
|
|
|
+ { title: '操作', dataIndex: 'actions', fixed: 'right', width:15 }
|
|
|
]
|
|
|
const studentIdss = ref([]) //学员回显id
|
|
|
const statusOptions = tool.dictList('COMMON_STATUS') //学员状态
|
|
|
+ const classOptions = ref([])
|
|
|
const currentPage = ref(1)
|
|
|
const pageSize = ref(10)
|
|
|
const total = ref(0)
|
|
|
@@ -378,12 +390,13 @@
|
|
|
}
|
|
|
}
|
|
|
function onReset() {
|
|
|
- searchForm.queryInfo = null
|
|
|
- searchForm.gender = null
|
|
|
- searchForm.userStatus = null
|
|
|
- searchForm.startTime = null
|
|
|
- searchForm.date = null
|
|
|
- searchForm.endTime = null
|
|
|
+ searchForm.queryInfo = undefined
|
|
|
+ searchForm.gender = undefined
|
|
|
+ searchForm.userStatus = undefined
|
|
|
+ searchForm.startTime = undefined
|
|
|
+ searchForm.date = undefined
|
|
|
+ searchForm.classs = undefined
|
|
|
+ searchForm.endTime = undefined
|
|
|
currentPage.value = 1
|
|
|
getList()
|
|
|
}
|
|
|
@@ -501,9 +514,25 @@
|
|
|
})
|
|
|
.filter(Boolean)
|
|
|
})
|
|
|
+
|
|
|
+ const initClass = () => {
|
|
|
+ // classOptions
|
|
|
+ classOptions.value = []
|
|
|
+ getClass().then((res) => {
|
|
|
+ res.data.forEach((item) => {
|
|
|
+ classOptions.value.push({
|
|
|
+ value: item.gradesId,
|
|
|
+ label: item.gradesName
|
|
|
+ })
|
|
|
+ })
|
|
|
+ // console.log("获取所有班级",res)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
onMounted(async () => {
|
|
|
departments.value = await getDepartmentMembers()
|
|
|
getList()
|
|
|
+ initClass()
|
|
|
})
|
|
|
function onDetail(record) {
|
|
|
detailVisible.value = true
|