From a05f693199eb59958dfbe223a81f4c8bcf8eae8f Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 27 Oct 2022 15:12:48 +0800 Subject: [PATCH] =?UTF-8?q?app2.0=E9=A6=96=E9=A1=B5=E4=BC=98=E5=8C=96=20?= =?UTF-8?q?=E6=88=91=E7=9A=84=E5=AE=A1=E6=89=B9=E8=A7=92=E6=A0=87=20?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=95=B0=E6=8D=AE=E9=87=8D=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/pages/home.vue | 69 +++++++++++++++++-- 1 file changed, 63 insertions(+), 6 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home.vue index 671a8eb32..03828c8f4 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home.vue @@ -14,12 +14,12 @@ 搜索更多应用 - + /> --> @@ -47,8 +47,12 @@ > + + {{CornerMarker}} + {{ item.F_Name }} @@ -189,12 +193,22 @@ export default { cWidth: "", cHeight: "", chartsFontSize: 10, + + ready:false, + CornerMarker:'' }; }, async onLoad(param) { await this.init(param); }, + async onShow() { + if(this.ready){ + this.ready = false + await this.refresh() + this.ready = true + } + }, // 本页面开启下拉刷新,用于刷新首页数据 onPullDownRefresh() { @@ -226,6 +240,7 @@ export default { // 加载页面数据和全局数据 await this.FETCH_CLIENTDATA(); await this.refresh(); + this.ready = true // 监听「我的应用」列表修改 this.ON("home-list-change", () => { @@ -375,7 +390,15 @@ export default { id: item.F_Id, }).then((data) => { if (data && data.value) { - const { value } = data; + let { value } = data; + if(value&&value.length){ + value = value.sort((a,b)=>{ + return new Date(b.f_time).valueOf() - new Date(a.f_time).valueOf() + }) + } + if(item.F_Name == "待办事项"){ + this.CornerMarker = value.length||'0' + } this.noticeData.push({ title: item.F_Name, content: value, @@ -548,9 +571,32 @@ export default { }, // 点击通知公告的标题 - noticeClick(item) { + async noticeClick(item) { console.log(item); - this.NAV_TO("/pages/home/notice", item, true); + if(item.f_category!==undefined){ + this.NAV_TO("/pages/home/notice", item, true); + }else{ + // const result = await this.HTTP_GET( + // 'learun/adms/newwf/mytask', + // { + // pagination:{"rows":100,"page":1,"sidx":"F_CreateDate","sord":"DESC"}, + // queryJson: JSON.stringify({keyword:item.f_title}) + // }, + // '加载任务时出错' + // ) + // if(!result){ + // return + // } + // this.processId = this.currentTask.F_Id + // this.taskId = this.currentTask.F_TaskId + let params = { + F_Id:item.f_processid, + F_TaskId:item.f_id, + mark:"pre", + F_Title:item.f_title, + } + this.NAV_TO('/pages/nworkflow/myflow/single', params, true) + } }, informClick(titleName) { if (titleName == "通知公告") { @@ -591,7 +637,7 @@ export default { } return list; }, []); - + return myFuncList; }, @@ -712,4 +758,15 @@ export default { margin-top: 0 !important; } } +.CornerMarker{ + padding: 1px 2px; + position: absolute; + right: 0px; + top: 0px; + background-color: red; + min-width: 14px; + border-radius: 7px; + font-size: 12px; + color: #fff; +}