From e03e6de8a9f02cab706adfa989907be8f832f22e Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 27 Oct 2022 12:02:14 +0800 Subject: [PATCH] =?UTF-8?q?app2.0=E5=85=AC=E6=96=87=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sys_ReceiveFile/list.vue | 50 +++++++++-------- .../Sys_ReceiveFile/single.vue | 56 ++++++++++++++++--- 2 files changed, 76 insertions(+), 30 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Sys_ReceiveFile/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Sys_ReceiveFile/list.vue index f4fa4f368..d7819ed18 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Sys_ReceiveFile/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Sys_ReceiveFile/list.vue @@ -42,7 +42,7 @@ - + @@ -65,12 +65,12 @@ class="margin-bottom" /> - + /> --> this.total) { return } -this.searchData.ReceiverId=this.GET_GLOBAL('loginUser').userId; + this.searchData.ReceiverId=this.GET_GLOBAL('loginUser').userId; const result = await this.HTTP_GET( 'learun/adms/EducationalAdministration/Sys_ReceiveFile/pagelist', { // 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序) // 代码生成器生成时默认按照主键排序,您可以修改成按创建时间的字段降序 - pagination: { rows: 10, page: this.page, sidx: 'RFileId', sord: 'DESC' }, + pagination: { rows: 10, page: this.page, sidx: 'SendStatus asc,SendTime desc', sord: 'DESC' }, queryJson: JSON.stringify(this.searchData) }, '加载数据时出错' @@ -200,19 +205,19 @@ this.searchData.ReceiverId=this.GET_GLOBAL('loginUser').userId; this.total = result.total this.page = result.page + 1 - this.list = this.list.concat(result.rows) + this.list = isConcat?this.list.concat(result.rows):result.rows this.tips = `已加载 ${Math.min(result.page, result.total)} / ${result.total} 页,共 ${result.records} 项` this.loadState = result.page >= result.total ? '已加载所有项目' : '向下翻以加载更多' }, // 刷新清空列表 - async refreshList() { + async refreshList(isConcat=true) { this.page = 1 this.total = 2 this.list = [] - await this.fetchList() + await this.fetchList(isConcat) }, // 列表下拉 @@ -237,20 +242,21 @@ this.searchData.ReceiverId=this.GET_GLOBAL('loginUser').userId; Object.assign(result, mapValues(queryObj, t => (Array.isArray(t) ? t.join(',') : t))) this.searchData = result - await this.refreshList() + await this.refreshList(false) }, // 点击「清空查询条件」按钮 reset() { + this.queryData = this.COPY(this.defaultQueryData) this.$refs.datefilter.changeDateRange('all') - this.queryData = this.COPY(this.defaultQueryData) - this.searchChange() + // this.searchChange() }, // 点击「编辑」、「查看」、「添加」、「删除」按钮 async action(type, id = '') { switch (type) { case 'view': + this.HTTP_POST(`learun/adms/EducationalAdministration/Sys_ReceiveFile/read`,{keyValue:id}) this.NAV_TO(`./single?type=view&id=${id}`) return @@ -306,14 +312,14 @@ this.searchData.ReceiverId=this.GET_GLOBAL('loginUser').userId; default: return value === null || value === undefined ? '' : value } }, -showStatus(item){ - console.log(item); - if(item.SendStatus==true){ - return "已查阅"; - }else{ - return "未查阅" - } -} + showStatus(item){ + console.log(item); + if(item.SendStatus==true){ + return "已查阅"; + }else{ + return "未查阅" + } + } } } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Sys_ReceiveFile/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Sys_ReceiveFile/single.vue index 4689f37be..639504c0e 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Sys_ReceiveFile/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Sys_ReceiveFile/single.vue @@ -1,12 +1,19 @@ @@ -71,12 +109,13 @@ export default { edit: null, ready: false, // 表单数据 current: {}, + fileList:[], origin: {}, // 表单项数据结构 scheme: { Sys_ReceiveFile: { Sender: { type: "text", title: "发送人" }, Title: { type: "text", title: "主题" }, - SendTime: { type: "datetime", title: "发送时间", dateformat: "0" }, + SendTime: { type: "datetime", title: "发送时间", dateformat: "1" }, SendType: { type: "select", title: "接收对象", @@ -85,7 +124,7 @@ export default { }, Contents: { type: "textarea", title: "内容" }, ReadFlag: { type: "select", title: "状态", dataSource: "0" }, - ReadTime: { type: "datetime", title: "查阅时间", dateformat: "0" }, + ReadTime: { type: "datetime", title: "查阅时间", dateformat: "1" }, }, }, // 数据源 dataSource: { @@ -121,6 +160,7 @@ export default { "learun/adms/EducationalAdministration/Sys_ReceiveFile/form", this.id ); + this.fileList = await this.getFileListById(result.Sys_ReceiveFile.FilePath) this.origin = await this.formatFormData(result); } this.current = this.COPY(this.origin); @@ -151,7 +191,7 @@ export default { } this.LOADING("正在提交..."); const postData = await this.getPostData(this.id); - adms( + this.HTTP_POST( "learun/adms/EducationalAdministration/Sys_ReceiveFile/save", postData, "表单提交保存失败"