From a00ba8b0e746878192206167cfcf27eac75522b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=BE=9D=E6=A2=A6?= <15822465730@163.com> Date: Mon, 15 Dec 2025 15:32:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=99=E5=B8=88=E7=AB=AF1=E6=9C=9F=20?= =?UTF-8?q?=E5=A7=93=E5=90=8D=E6=90=9C=E7=B4=A2=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/NameFilterSelect/index.vue | 137 ++++++++++++++++++++++ src/views/course/CourseManage.vue | 66 ++++------- 2 files changed, 158 insertions(+), 45 deletions(-) create mode 100644 src/components/NameFilterSelect/index.vue diff --git a/src/components/NameFilterSelect/index.vue b/src/components/NameFilterSelect/index.vue new file mode 100644 index 00000000..bbc5f735 --- /dev/null +++ b/src/components/NameFilterSelect/index.vue @@ -0,0 +1,137 @@ + + + + + diff --git a/src/views/course/CourseManage.vue b/src/views/course/CourseManage.vue index 3bd3e2e4..9ea1b149 100644 --- a/src/views/course/CourseManage.vue +++ b/src/views/course/CourseManage.vue @@ -18,14 +18,15 @@
- +
@@ -86,14 +87,16 @@
- +
@@ -272,14 +275,17 @@
- + +
@@ -347,6 +353,9 @@
+ + +
@@ -438,8 +447,11 @@ import apiUser from "@/api/system/user.js"; import apiStudy from "@/api/modules/courseStudy.js"; import { getToken } from "@/utils/token"; import axios from "axios"; +import NameFilterSelect from "@/components/NameFilterSelect/index.vue"; +NameFilterSelect; export default { + components: { NameFilterSelect }, computed: { ...mapGetters(["resOwnerMap", "sysTypeMap"]), }, @@ -601,8 +613,6 @@ export default { status: "", aid: [], }, - nameList: [], - nameListLoading: false, }; }, mounted() { @@ -622,39 +632,6 @@ export default { loadSysTypes: "sysType/loadSysTypes", }), - async initNameList(keyword) { - console.log("initNameList", keyword); - if (!keyword) { - return; - } - this.nameListLoading = true; - try { - const res = await apiUserbasic.selectUser(keyword); - this.nameListLoading = false; - - if (res && res.status === 200) { - const resultList = res.result || []; - this.nameList = resultList - .map((item) => this.formatCreatorItem(item)) - .filter((item) => item.userId); - } else { - this.creatorOptions = []; - } - } catch (error) { - this.nameList = []; - this.nameListLoading = false; - } finally { - this.nameListLoading = false; - } - }, - - formatCreatorItem(item = {}) { - return { - userId: item.id, - name: item.realName, - code: item.userNo, - }; - }, resetCommonResourceQuery() { this.commonResourceStudyPeopleQuery = { @@ -714,7 +691,7 @@ export default { contentId: this.rousourceRow.contentId, pageIndex: this.examResourceStudyPeopleQuery.pageIndex, pageSize: this.examResourceStudyPeopleQuery.pageSize, - name: '', + name: "", status: this.examResourceStudyPeopleQuery.status, aid: this.examResourceStudyPeopleQuery.aid.join(","), }) @@ -1137,7 +1114,6 @@ export default { }, handleTabClick(tab) { this.tabName = tab.name; - this.nameList = []; if (tab.name === "second") { this.getSignupList(); } else if (tab.name === "third") {