From a66ed825a99a236681d1af1eb5f106a8e32c541b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=93=E7=90=AA?= Date: Thu, 15 Sep 2022 17:14:38 +0800 Subject: [PATCH] =?UTF-8?q?app2.0=20=E9=A6=96=E9=A1=B5=E5=BE=85=E5=8A=9E?= =?UTF-8?q?=E4=BA=8B=E9=A1=B9=E8=B7=B3=E8=BD=AC=20=E6=88=91=E7=9A=84?= =?UTF-8?q?=E5=AE=A1=E6=89=B9=E5=A2=9E=E5=8A=A0=E8=A7=92=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/pages/home.vue | 65 +++++++++++++++++-- .../pages/nworkflow/myflow/single.vue | 4 ++ 2 files changed, 65 insertions(+), 4 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 1bcbd954d..268043c77 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 @@ -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 + } 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; +} diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue index 0a42f97a7..a32091a8a 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue @@ -89,6 +89,10 @@ export default { processId: this.processId, taskId: this.taskId }) + this.currentTask = { + ...this.currentTask, + F_TaskType:(this.processInfo.task&&this.processInfo.task[0])?this.processInfo.task[0].F_Type:undefined, + } this.currentNode = this.getCurrentNode(this.processInfo) this.processList = get(this.processInfo, 'info.TaskLogList', []) // wfForms 的数组成员 t,表示表单数据项(TAB页)