Browse Source

app2.0首页优化 我的审批角标 页面数据重加载

娄底高职分支
ndbs 2 years ago
parent
commit
a05f693199
1 changed files with 63 additions and 6 deletions
  1. +63
    -6
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home.vue

+ 63
- 6
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home.vue View File

@@ -14,12 +14,12 @@
<l-icon type="search" color="white" class="margin-lr-sm" />
搜索更多应用
</view>
<l-icon
<!-- <l-icon
@click="msgClick"
type="mail"
color="white"
class="header-right text-xxl margin-right-sm"
/>
/> -->
</view>

<!-- 轮播图片 -->
@@ -47,8 +47,12 @@
>
<view
class="app-item align-center flex flex-wrap justify-center align-center"
style="position: relative;"
>
<l-icon :type="item.icon" color="white" class="text-sl" />
<view v-if="item.F_Name == '我的审批'&&CornerMarker" class="CornerMarker">
{{CornerMarker}}
</view>
</view>
<text>{{ item.F_Name }}</text>
</view>
@@ -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;
}
</style>

Loading…
Cancel
Save