修复缺陷

This commit is contained in:
duxp 2023-10-09 10:57:16 +08:00
parent b556f340e9
commit 81f4313ee2
2 changed files with 16 additions and 12 deletions

View File

@ -44,7 +44,7 @@ Page({
handleSubmitFile(e){
let _data = e.currentTarget.dataset.item;
wx.navigateTo({
url:'../workReport/workReport?type='+_data.type+'&isRadio=true'+'&data='+JSON.stringify(_data)
url:'../workReport/workReport?type='+_data.type+'&isRadio=true'+'&id='+_data.id
})
},

View File

@ -34,15 +34,19 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options,'option');
if(options && JSON.stringify(options) !== '{}'){
this.setData({
"searchForm.type":options.type,
isRadio:options.isRadio?options.isRadio:false
})
if(this.data.isRadio){
this.setData({
detailData:JSON.parse(options.data)
})
this.loadDetailData({
pageNum:1,
pageSize:10,
type:options.type,
id:options.id
});
}else{
this.loadTargetData({type:options.type});
}
@ -110,7 +114,12 @@ Page({
activeId:e.detail.id,
targetShow:false,
})
this.loadDetailData();
this.loadDetailData({
pageNum:1,
pageSize:10,
type:this.data.searchForm.type,
id:this.data.searchForm.targetId
});
},
//上传之前
@ -330,14 +339,9 @@ Page({
},
//加载详情数据
loadDetailData(){
loadDetailData(param){
let _this = this;
$api.queryList({
pageNum:1,
pageSize:10,
type:_this.data.searchForm.type,
id:_this.data.searchForm.targetId
}).then(res => {
$api.queryList(param).then(res => {
if(res.code === 0){
let _data = null;
if(res.rows.length>0){