From d8366fc56c7d194bb88a93bcf0b1a3a1bbf45d62 Mon Sep 17 00:00:00 2001 From: yxq Date: Wed, 16 Oct 2024 15:13:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=8C=96=E5=8A=9E=E5=85=AC?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OfficeEquipment/list.vue | 42 +++++++++++++------ 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/list.vue index bb413931e..5efb2bb54 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/list.vue @@ -75,10 +75,14 @@ - + + + @@ -179,14 +183,15 @@ methods: { // 页面初始化 async init() { - console.log(this.GET_GLOBAL('user')) this.ON('EducationalAdministration_OfficeEquipment-list-change', this.reset) // 拉取加载列表和数据源 await Promise.all([ this.FETCH_DATASOURCE('teacheruserdata').then(result => { this.dataSource.Name = result.data.map(t => ({ text: t.f_realname, - value: t.f_encode + value: t.f_encode, + f_encode: t.f_encode, + f_userid: t.f_userid, })); }), this.FETCH_DATASOURCE('classdata').then(result => { @@ -259,11 +264,21 @@ result.StartTime = this.dateRange.start result.EndTime = this.dateRange.end } + // 将其他查询项添加到查询 JSON 中 const queryObj = pickBy(this.queryData, t => (Array.isArray(t) ? t.length > 0 : t)) Object.assign(result, mapValues(queryObj, t => (Array.isArray(t) ? t.join(',') : t))) this.searchData = result + + + // 姓名格式化 + if(this.searchData.Name_){ + let arr = this.dataSource.Name + let obj = arr.find(e => e.f_userid == this.queryData.Name_) + this.searchData.Name = obj ? obj.f_encode : '' + } + await this.refreshList(false) }, @@ -293,14 +308,15 @@ return } - this.HTTP_POST('/Learun/adms/EducationalAdministration/officeEquipment/delete', id, '删除失败').then( - success => { - if (!success) { - return - } - this.TOAST('删除成功', 'success') - this.refreshList() - }) + this.HTTP_POST('/Learun/adms/EducationalAdministration/officeEquipment/delete', id, '删除失败') + .then( + success => { + if (!success) { + return + } + this.TOAST('删除成功', 'success') + this.refreshList() + }) return default: