From 3fe66d770d56f5353989230b79c6a0e8484883ab Mon Sep 17 00:00:00 2001 From: liweijie Date: Mon, 21 Sep 2026 17:20:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E5=91=98=E9=98=9F=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E6=95=99=E5=AE=A4=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E4=B8=8B=E6=8B=89=EF=BC=8C=E9=BB=98=E8=AE=A4=E5=9C=A8?= =?UTF-8?q?=E6=A0=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/student/shiftTeam/index.vue | 49 ++++++++++++++++++- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/student/shiftTeam/index.vue b/frontend/src/views/student/shiftTeam/index.vue index 5e44e36eb..0b7c0cbbe 100644 --- a/frontend/src/views/student/shiftTeam/index.vue +++ b/frontend/src/views/student/shiftTeam/index.vue @@ -172,7 +172,25 @@ - + + + @@ -361,6 +379,7 @@ import { } from '@/api/studentRecords/team' import { getDicts } from '@/api/system/dict/data' import { listMajor } from '@/api/subjectMajor/major' +import { listSemesterRooms } from '@/api/studentRecords/semester' const TEAM_TYPE_DICT_CODE = 'stu_type' const SESSION_CATEGORY_DICT_CODE = 'session_category' @@ -406,6 +425,8 @@ export default { dialogTitle: '新增学员队', isAdd: true, formSaving: false, + roomOptions: [], + roomLoading: false, form: this.createEmptyForm(), formRules: { xydbh: [{ required: false }], @@ -490,7 +511,7 @@ export default { zydh: '', zyjsbh: '', bz: '', - zxzt: undefined, + zxzt: 1, rwlb: '', xslx: 1, rxrq: '', @@ -515,6 +536,29 @@ export default { return val === null || val === undefined || val === '' ? '-' : val }, + roomLabel(room) { + if (!room) return '' + const name = room.jsmc || '' + const code = room.jsbh || room.id || '' + return name && code ? `${name}(${code})` : (name || code) + }, + ensureRoomOption(jsbh, jsmc) { + if (!jsbh) return + if (this.roomOptions.some(item => item.jsbh === jsbh)) return + this.roomOptions = [{ jsbh: jsbh, jsmc: jsmc || '' }].concat(this.roomOptions) + }, + searchRooms(keyword) { + this.roomLoading = true + listSemesterRooms({ py: keyword || undefined }).then(res => { + const list = (res && res.data) || [] + this.roomOptions = list + this.ensureRoomOption(this.form.zyjsbh) + this.roomLoading = false + }).catch(() => { + this.roomLoading = false + }) + }, + normalizeSchoolStatus(value) { if (value === 1 || value === '1' || value === '在校') { return 1 @@ -627,6 +671,7 @@ export default { ssdw: d.ssdw || '', ztpxrw: d.ztpxrw !== null && d.ztpxrw !== undefined ? Number(d.ztpxrw) : 1 } + this.ensureRoomOption(this.form.zyjsbh) this.loadTrainingTaskOptions(this.form.ztpxrw) }).catch(() => {}) },