Browse Source

Merge remote-tracking branch 'origin/dev' into data-page

dev
战立标 2 years ago
parent
commit
63d87d74bf
  1. 2
      pages/index/index.js
  2. 4
      pages/work/work.js
  3. 7
      subpages/communitySelfInsp/pages/historyQuery/historyQuery.js
  4. 30
      subpages/communitySelfInsp/pages/synthesis/synthesis.js
  5. 4
      subpages/communitySelfInsp/pages/synthesis/synthesis.wxml

2
pages/index/index.js

@ -22,7 +22,7 @@ Page({
share:app.globalData.share share:app.globalData.share
}) })
await this.getToken() await this.getToken()
await this.getIntelligentMessage() // await this.getIntelligentMessage()
await this.getStaffbasicinfo() await this.getStaffbasicinfo()
}, },
onShow(){ onShow(){

4
pages/work/work.js

@ -216,8 +216,8 @@ Page({
}, },
toDetail(e){ toDetail(e){
wx.navigateTo({ wx.navigateTo({
url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${e.currentTarget.dataset.item.id}&qrCodeImgUrl=${e.currentTarget.dataset.item.qrCodeImgUrl}&agencyName=${e.currentTarget.dataset.item.agencyName}&monthName=${e.currentTarget.dataset.item.monthName}&questionnaireUrl=${e.currentTarget.dataset.item.questionnaireUrl}`, url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${encodeURIComponent(e.currentTarget.dataset.item.id)}&qrCodeImgUrl=${encodeURIComponent(e.currentTarget.dataset.item.qrCodeImgUrl)}&agencyName=${encodeURIComponent(e.currentTarget.dataset.item.agencyName)}&monthName=${encodeURIComponent(e.currentTarget.dataset.item.monthName)}&questionnaireUrl=${encodeURIComponent(e.currentTarget.dataset.item.questionnaireUrl)}&status=${encodeURIComponent(e.currentTarget.dataset.item.status)}`
}) })
}, },
handelClickShare(e) { handelClickShare(e) {
// $wuxActionSheet().showSheet({ // $wuxActionSheet().showSheet({

7
subpages/communitySelfInsp/pages/historyQuery/historyQuery.js

@ -141,7 +141,7 @@ Page({
} }
}, },
handelClickedit(e){ handelClickedit(e){
// console.log(e); console.log(e);
// if(this.data.type == 'resi'){ // if(this.data.type == 'resi'){
// wx.navigateTo({ // wx.navigateTo({
// url: `/subpages/addResi/pages/addResi/addResi?type=edit&resiId=${e.currentTarget.dataset.item.resiId}`, // url: `/subpages/addResi/pages/addResi/addResi?type=edit&resiId=${e.currentTarget.dataset.item.resiId}`,
@ -152,8 +152,11 @@ Page({
// }) // })
// } // }
wx.navigateTo({ wx.navigateTo({
url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${e.currentTarget.dataset.item.id}`, url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${encodeURIComponent(e.currentTarget.dataset.item.id)}&qrCodeImgUrl=${encodeURIComponent(e.currentTarget.dataset.item.qrCodeImgUrl)}&agencyName=${encodeURIComponent(e.currentTarget.dataset.item.agencyName)}&monthName=${encodeURIComponent(e.currentTarget.dataset.item.monthName)}&questionnaireUrl=${encodeURIComponent(e.currentTarget.dataset.item.questionnaireUrl)}&status=${encodeURIComponent(e.currentTarget.dataset.item.status)}`
}) })
// wx.navigateTo({
// url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${e.currentTarget.dataset.item.id}&monthName=${e.currentTarget.dataset.item.monthName}&status=${e.currentTarget.dataset.item.status}`,
// })
}, },
back() { back() {
//返回上一级,关闭当前页面 //返回上一级,关闭当前页面

30
subpages/communitySelfInsp/pages/synthesis/synthesis.js

@ -14,23 +14,39 @@ Page({
synthesisScore:'',//综合得分 synthesisScore:'',//综合得分
inspRecordId:'',//自查表Id inspRecordId:'',//自查表Id
fontSize:'', fontSize:'',
maskStatus:false maskStatus:false,
shareFlag:false,
status:0
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
console.log(options); // 获取参数
this.setData({ this.setData({
statusHeight: app.globalData.deviceInfo.statusHeight, statusHeight: app.globalData.deviceInfo.statusHeight,
navigationHeight: app.globalData.deviceInfo.navigationHeight, navigationHeight: app.globalData.deviceInfo.navigationHeight,
inspRecordId:options.inspRecordId, inspRecordId: decodeURIComponent(options.inspRecordId),
agencyName:options.agencyName, agencyName:decodeURIComponent(options.agencyName),
monthName:options.monthName, monthName:decodeURIComponent(options.monthName),
qrCodeImgUrl:options.qrCodeImgUrl, qrCodeImgUrl:decodeURIComponent(options.qrCodeImgUrl),
questionnaireUrl:options.questionnaireUrl questionnaireUrl:decodeURIComponent(options.questionnaireUrl),
status:decodeURIComponent(options.status)
}) })
// 获取当前日期
const currentDate = new Date();
const currentMonth = currentDate.getMonth() + 1;
if(currentMonth == options.monthName){
this.setData({
shareFlag:true
})
}else{
this.setData({
shareFlag:false
})
}
this.getSynthesis() this.getSynthesis()
}, },

4
subpages/communitySelfInsp/pages/synthesis/synthesis.wxml

@ -6,7 +6,7 @@
</view> </view>
<view class="content"> <view class="content">
<view class="h2" style="font-size: {{fontSize}};">{{agencyName}}{{monthName}}月份满意度自查</view> <view class="h2" style="font-size: {{fontSize}};">{{agencyName}}{{monthName}}月份满意度自查</view>
<view class="tag"> <image src="../../../../images/tag.png" mode=""/> 进行中</view> <view class="tag"> <image src="../../../../images/tag.png" mode=""/> {{status == 1?'进行中':'已结束'}}</view>
</view> </view>
</view> </view>
@ -57,7 +57,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="bto_btn"> <view class="bto_btn" wx:if="{{shareFlag}}">
<button hover-class="btn-hover" class="btn_blue" open-type="share">分享给好友参与测评</button> <button hover-class="btn-hover" class="btn_blue" open-type="share">分享给好友参与测评</button>
<button bind:tap="showCodeImg" class="btn_yellow">满意度自查二维码</button> <button bind:tap="showCodeImg" class="btn_yellow">满意度自查二维码</button>
</view> </view>

Loading…
Cancel
Save