From 63eb91e64c149fe701b34a69f8c312ecfa3debd7 Mon Sep 17 00:00:00 2001 From: zcxee <495141071@qq.com> Date: Thu, 10 Aug 2023 09:02:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/sch/classType.js | 10 ++++++++++ .../CheckDialog/components/SignForm.vue | 12 ++++++------ .../zs/sign/components/CheckDialog/index.vue | 9 +++++++++ src/views/zs/sign/components/SignFormDialog.vue | 15 ++++++++++++--- 4 files changed, 37 insertions(+), 9 deletions(-) diff --git a/src/api/sch/classType.js b/src/api/sch/classType.js index 09950b0..702d2a6 100644 --- a/src/api/sch/classType.js +++ b/src/api/sch/classType.js @@ -9,6 +9,16 @@ export function getClassTypeTableList(query) { }); } +// 查询班型列表 +export function getAllList(query) { + return request({ + url: '/sch/classType/all', + method: 'get', + params: query + }); +} + + // 新增班型 export function insertClassType(params) { return request({ diff --git a/src/views/zs/sign/components/CheckDialog/components/SignForm.vue b/src/views/zs/sign/components/CheckDialog/components/SignForm.vue index b58fe74..3a24846 100644 --- a/src/views/zs/sign/components/CheckDialog/components/SignForm.vue +++ b/src/views/zs/sign/components/CheckDialog/components/SignForm.vue @@ -47,14 +47,14 @@ - + - + @@ -64,7 +64,7 @@ - + @@ -181,7 +181,7 @@ import empApi from '@/api/system/employee' import schoolAPi from '@/api/sch/school' import { getAllPlaces } from '@/api/sch/place' -import { getClassTypeTableList } from '@/api/sch/classType' +import { getAllList } from '@/api/sch/classType' import { getCheckRecord } from '@/api/zs/sign' export default { @@ -236,7 +236,7 @@ export default { }, //查询驾校 getSchools() { - schoolAPi.pageList().then((resp) => { + schoolAPi.allList().then((resp) => { this.schoolOptions = resp.data }) }, @@ -250,7 +250,7 @@ export default { }, //查询班型 getClassTypes() { - getClassTypeTableList({ + getAllList({ schoolId: this.modalForm.signSchool, placeId: this.modalForm.signPlace, status: '0', diff --git a/src/views/zs/sign/components/CheckDialog/index.vue b/src/views/zs/sign/components/CheckDialog/index.vue index 408471f..5be9c09 100644 --- a/src/views/zs/sign/components/CheckDialog/index.vue +++ b/src/views/zs/sign/components/CheckDialog/index.vue @@ -47,6 +47,15 @@ export default { console.log('打开弹框') this.resetForm('modalForm') this.modalForm = data + if (this.modalForm.signSchool) { + this.modalForm.signSchool = Number(this.modalForm.signSchool) + } + if (this.modalForm.signClass) { + this.modalForm.signClass = Number(this.modalForm.signClass) + } + if (this.modalForm.signPlace) { + this.modalForm.signPlace = Number(this.modalForm.signPlace) + } this.visible = true this.checkTab = 'one' this.resetForm('modalForm2') diff --git a/src/views/zs/sign/components/SignFormDialog.vue b/src/views/zs/sign/components/SignFormDialog.vue index f273274..e52948b 100644 --- a/src/views/zs/sign/components/SignFormDialog.vue +++ b/src/views/zs/sign/components/SignFormDialog.vue @@ -202,7 +202,7 @@ import { getToken } from '@/utils/auth'; import empApi from '@/api/system/employee'; import schoolAPi from '@/api/sch/school'; import { getAllPlaces } from '@/api/sch/place'; -import { getClassTypeTableList } from '@/api/sch/classType'; +import { getAllList } from '@/api/sch/classType'; import { uploadEvidence, deleteFile } from '@/api/tool/common'; import { getClueList, getConsultRecord } from '@/api/zs/clue'; @@ -337,9 +337,9 @@ export default { }); }, getClassTypes(schoolId, placeId) { - getClassTypeTableList({ schoolId: schoolId, placeId: placeId, status: '0' }).then( + getAllList({ schoolId: schoolId, placeId: placeId, status: '0' }).then( (resp) => { - this.classTypeOptions = resp.rows; + this.classTypeOptions = resp.data; } ); }, @@ -393,6 +393,15 @@ export default { handleUpdate(item) { this.setDate(false); this.modalForm = Object.assign({}, item); + if (this.modalForm.signSchool) { + this.modalForm.signSchool = Number(this.modalForm.signSchool) + } + if (this.modalForm.signClass) { + this.modalForm.signClass = Number(this.modalForm.signClass) + } + if (this.modalForm.signPlace) { + this.modalForm.signPlace = Number(this.modalForm.signPlace) + } this.getPlaces(this.modalForm.signSchool); this.getClassTypes(this.modalForm.signSchool, this.modalForm.signPlace); if (item.clueId) {