|
@@ -13,13 +13,19 @@
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
|
|
|
|
|
<a-form-item label="老师" name="teacherId">
|
|
<a-form-item label="老师" name="teacherId">
|
|
|
- <a-select
|
|
|
|
|
- v-model:value="formState.teacherId"
|
|
|
|
|
- :fieldNames="{ label: 'name', value: 'id' }"
|
|
|
|
|
- :options="userAllListOptions"
|
|
|
|
|
- placeholder="请选择老师"
|
|
|
|
|
- @change="changeCollegeMajor"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+<!-- <a-select-->
|
|
|
|
|
+<!-- v-model:value="formState.teacherId"-->
|
|
|
|
|
+<!-- :fieldNames="{ label: 'name', value: 'id' }"-->
|
|
|
|
|
+<!-- :options="userAllListOptions"-->
|
|
|
|
|
+<!-- placeholder="请选择老师"-->
|
|
|
|
|
+<!-- @change="changeCollegeMajor"-->
|
|
|
|
|
+<!-- />-->
|
|
|
|
|
+ <SelectorList v-model="formState.teacherId"
|
|
|
|
|
+ :options="usertypeOptions"
|
|
|
|
|
+ :total="userTotal"
|
|
|
|
|
+ @onInit="onInit"
|
|
|
|
|
+ @onChange="onChange"
|
|
|
|
|
+ ></SelectorList>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
|
|
|
|
|
<a-form-item label="班级" name="gradesId">
|
|
<a-form-item label="班级" name="gradesId">
|
|
@@ -117,6 +123,7 @@ const downListOptions = ref([]) //专业
|
|
|
const userAllListOptions = ref([]) //专业
|
|
const userAllListOptions = ref([]) //专业
|
|
|
const gradesQueryListOptions = ref([]) //专业
|
|
const gradesQueryListOptions = ref([]) //专业
|
|
|
const courseinfoAllListOptions = ref([]) //专业
|
|
const courseinfoAllListOptions = ref([]) //专业
|
|
|
|
|
+const usertypeOptions = ref([]) //专业
|
|
|
|
|
|
|
|
const COURSE_OPEN_SCHEDULE_TIME_Options = tool.dictList('COURSE_OPEN_SCHEDULE_TIME')
|
|
const COURSE_OPEN_SCHEDULE_TIME_Options = tool.dictList('COURSE_OPEN_SCHEDULE_TIME')
|
|
|
const COURSE_OPEN_WEEK_TYPE_Options = tool.dictList('COURSE_OPEN_WEEK_TYPE')
|
|
const COURSE_OPEN_WEEK_TYPE_Options = tool.dictList('COURSE_OPEN_WEEK_TYPE')
|
|
@@ -128,6 +135,8 @@ const title = ref('添加') //专业
|
|
|
import {addItem, detail, editItem} from '@/api/courseopen'
|
|
import {addItem, detail, editItem} from '@/api/courseopen'
|
|
|
import tool from "@/utils/tool";
|
|
import tool from "@/utils/tool";
|
|
|
import {message} from "ant-design-vue";
|
|
import {message} from "ant-design-vue";
|
|
|
|
|
+import SelectorList from "@/components/SelectorList/index.vue";
|
|
|
|
|
+import forumApi from "@/api/forum/forumApi";
|
|
|
|
|
|
|
|
const visible = ref(false)
|
|
const visible = ref(false)
|
|
|
|
|
|
|
@@ -208,7 +217,30 @@ watch(
|
|
|
},
|
|
},
|
|
|
{deep: true, immediate: true}
|
|
{deep: true, immediate: true}
|
|
|
)
|
|
)
|
|
|
-
|
|
|
|
|
|
|
+const userTotal = ref(0)
|
|
|
|
|
+const userPagination = ref({
|
|
|
|
|
+ size: 10,
|
|
|
|
|
+ current: 1
|
|
|
|
|
+})
|
|
|
|
|
+const getUserAllList = (add) => {
|
|
|
|
|
+ forumApi.allUserList(userPagination.value).then((res) => {
|
|
|
|
|
+ userTotal.value = res.total
|
|
|
|
|
+ let userList = res.records.map((r) => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ label: `${r.name}-${r.eduIdentityName ?? ''}`,
|
|
|
|
|
+ value: r.id,
|
|
|
|
|
+ ...r
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ usertypeOptions.value = add ? [...usertypeOptions.value, ...userList] : userList
|
|
|
|
|
+ console.log('是打开我 我是人员列表',usertypeOptions.value)
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+const onChange = ( page, pageSize) =>{
|
|
|
|
|
+ userPagination.value.size = pageSize
|
|
|
|
|
+ userPagination.value.current = page
|
|
|
|
|
+ getUserAllList()
|
|
|
|
|
+}
|
|
|
const open = () => {
|
|
const open = () => {
|
|
|
|
|
|
|
|
visible.value = true
|
|
visible.value = true
|
|
@@ -216,8 +248,10 @@ const open = () => {
|
|
|
title.value = '添加'
|
|
title.value = '添加'
|
|
|
startPeriodTag.value = false
|
|
startPeriodTag.value = false
|
|
|
endPeriodTag.value = false
|
|
endPeriodTag.value = false
|
|
|
|
|
+ getUserAllList()
|
|
|
}
|
|
}
|
|
|
-const edit = (item) => {
|
|
|
|
|
|
|
+const edit = async (item) => {
|
|
|
|
|
+ await getUserAllList()
|
|
|
visible.value = true
|
|
visible.value = true
|
|
|
mode.value = 'edit'
|
|
mode.value = 'edit'
|
|
|
title.value = '修改'
|
|
title.value = '修改'
|
|
@@ -245,6 +279,11 @@ const edit = (item) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log('会先对象', formState.value)
|
|
console.log('会先对象', formState.value)
|
|
|
|
|
+
|
|
|
|
|
+ usertypeOptions.value.push({
|
|
|
|
|
+ label: formState.value.teacherIdName,
|
|
|
|
|
+ value: formState.value.teacherId,
|
|
|
|
|
+ })
|
|
|
// changeCollegeMajor(formState.collegeId)
|
|
// changeCollegeMajor(formState.collegeId)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|