You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
120 lines
2.7 KiB
120 lines
2.7 KiB
import { wxNavigateTo } from "@utils/promise-wx-api";
|
|
//import nextTick from "@npm/dai-mp/tools/nextTick.js";
|
|
import commonBehavior from "@mixins/common";
|
|
import listBehavior from "@mixins/list";
|
|
|
|
const app = getApp();
|
|
|
|
Component({
|
|
behaviors: [commonBehavior, listBehavior],
|
|
properties: {
|
|
listParams: {
|
|
type: Object,
|
|
value: {
|
|
statusCondition: "",
|
|
}, // 未处理un_read 处理中 processing 已办结 closed_case
|
|
//// 未读:un_read;已读:read;
|
|
},
|
|
|
|
listUrl: {
|
|
type: String,
|
|
value: "",
|
|
},
|
|
|
|
listIsMock: {
|
|
type: Boolean,
|
|
value: false,
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
data: {
|
|
iniLoaded: false,
|
|
refresherIsTriggered: false,
|
|
demoList:[
|
|
{
|
|
resiEventId:"11",
|
|
eventContent:"我的报事我的报事我的报事我的报事我的报事我的报事我的报事我的报事我的报事我的报事",
|
|
imgList:[],
|
|
redDot:true,//true展示;false不展示
|
|
status:"closed_case",//处理中:processing;已办结:closed_case
|
|
shiftProjectShow:"",
|
|
shiftProject:false,//true:已转项目;false:未立项
|
|
showTime:"2012-09-30 10:10:10",//列表显示时间用此列:yyyy-MM-dd HH:mm:ss;处理中:上报事件时间,处理中:最新一次处理事件;已办结:办结时间
|
|
}
|
|
]
|
|
},
|
|
|
|
lifetimes: {
|
|
ready() {
|
|
this.init();
|
|
},
|
|
},
|
|
|
|
pageLifetimes: {
|
|
async show() {
|
|
await this.refreshData()
|
|
},
|
|
},
|
|
|
|
methods: {
|
|
async init() {
|
|
const { iniLoaded } = this.data;
|
|
const $loading = this.selectComponent("#loading");
|
|
|
|
if (!iniLoaded) {
|
|
$loading.show();
|
|
}
|
|
|
|
await this.getApiData();
|
|
|
|
this.setData({
|
|
iniLoaded: true,
|
|
});
|
|
|
|
$loading.hide();
|
|
},
|
|
|
|
// 刷新
|
|
async refreshData() {
|
|
if (this.data.iniLoaded) {
|
|
// 如果第一页,静默刷新
|
|
const { list } = this.data;
|
|
if (list.page == 2) {
|
|
list.page = 1;
|
|
list.isNone = false;
|
|
this.setData({ list });
|
|
await this.getApiData();
|
|
}
|
|
}
|
|
},
|
|
|
|
// 加载更多
|
|
getMore() {
|
|
this.getApiData();
|
|
},
|
|
|
|
async getApiData() {
|
|
await this.getList();
|
|
},
|
|
|
|
// 查看详情
|
|
handleTapItem(e) {
|
|
const {
|
|
currentTarget: {
|
|
dataset: { id ,replayflag,status,shiftproject},
|
|
},
|
|
} = e;
|
|
|
|
wxNavigateTo("/subpages/index/pages/report/detail/index", {
|
|
eventId: id,
|
|
|
|
status,
|
|
shiftProject:shiftproject?"yes":"no",
|
|
replyButtonFlag:replayflag
|
|
});
|
|
},
|
|
},
|
|
});
|
|
|