diff --git a/pages/index/index.js b/pages/index/index.js index 865ff82..80b82dc 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -2,12 +2,14 @@ // 获取应用实例 const app = getApp() import api, {getIntelligentMessage,getToken,getStaffbasicinfo,clearMessage,getSituation,overView} from "../../utils/api" +import {getInspRecord} from '../../utils/api' import config from "../../utils/config" Page({ data: { topDisplay:false, selectList:['全部消息','居民信息采集','房屋信息采集','社区满意度自查'], selectValue:0, + communitySelfInspList:[], pageSize:5, pageNo:1, tableData:[], @@ -32,12 +34,13 @@ Page({ navigationHeight: app.globalData.deviceInfo.navigationHeight, share:app.globalData.share, }) + this.getInspRecord() }, onShow(){ this.getIntelligentMessage() this.getSituation() - + this.getInspRecord() }, onPullDownRefresh() { this.setData({ @@ -46,8 +49,48 @@ Page({ }) this.getIntelligentMessage() this.getStaffbasicinfo() + this.getInspRecord() +}, +getInspRecord(){ + let parm ={ + pageSize:1000, + pageNo:1 + } + getInspRecord(parm).then(res=>{ + res.data.list = res.data.list.reverse(); + let curMonth = new Date().getMonth() - 0 + 1 + let communitySelfInspTop = res.data.list.filter(item => item.monthName-0 === curMonth).length?res.data.list.filter(item => item.monthName-0 === curMonth)[0]:{} + let communitySelfInspList = res.data.list.filter(item => item.monthName-0 !== curMonth).splice(0,2) + this.setData({ + communitySelfInspTop,communitySelfInspList,curMonth + }) + // this.setData({ + // communitySelfInspTop:res.data.list.splice(0,1)[0], + // communitySelfInspList:res.data.list.splice(0,2), + // }) + app.globalData.questionnaireUrl = this.data.communitySelfInspTop.questionnaireUrl + }).catch(err=>{ + wx.hideLoading() + console.log(err); + }) + + +}, +toDetaill(e){ + wx.navigateTo({ + 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)}` + }) +}, +toSynthesis(){ + wx.navigateTo({ + url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${this.data.communitySelfInspTop.id}&qrCodeImgUrl=${this.data.communitySelfInspTop.qrCodeImgUrl}&agencyName=${this.data.communitySelfInspTop.agencyName}&monthName=${this.data.communitySelfInspTop.monthName}&questionnaireUrl=${this.data.communitySelfInspTop.questionnaireUrl}`, + }) +}, +toHistoryQuery(){ + wx.navigateTo({ + url: '/subpages/communitySelfInsp/pages/historyQuery/historyQuery', + }) }, - onScrollToLower(e){ if (this.data.loadMoreType === 'more') { this.setData({ diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 3032129..9bfbf20 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -70,6 +70,53 @@ + + + 满意度自查 + 历史自查> + + + + + + + + {{communitySelfInspTop.agencyName}}{{communitySelfInspTop.monthName}}月份满意度自查 + + 已提交 {{communitySelfInspTop.personQty?communitySelfInspTop.personQty:'--'}} + + + 查看统计 + + + + + + 未创建{{curMonth}}月份满意度自查 + + + 进行中 + + + + + + + + + + + {{item.agencyName}}{{item.monthName}}月份满意度自查 + 已提交:{{item.personQty}}人 + + + {{item.synthesisScore}} + + + + + + 消息提醒 diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 3cbcf2d..d535010 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -997,4 +997,123 @@ line-height: 40rpx; .imge2{ width: 309rpx; height: 300rpx; -} \ No newline at end of file +} +/* pages/work/work.wxss */ + +.list_card { + font-size: 40rpx; + font-family: DIN Alternate; + color: #FF783C; + /* align-items: center; */ +} +.right text{ + font-size: 40rpx; + font-family: DIN Alternate; + color: #FF783C; + /* align-items: center; */ +} +.right{ +} +.bg_new_box{ + background: #F9FBFE; + height: 300rpx; + width: 95%; + margin-top: -30rpx; + margin-left: -10rpx; + margin-bottom: 10rpx; + border-radius: 10px; +} +.bg_new_box { + position: relative; +} +.bg_new_right{ + position: absolute; + float: right; + top: 50%; + transform: translateY(-50%); + right: 0; +} +.new_h2{ + margin-top: 30rpx; + margin-left: 30rpx; + font-family: PingFang SC; + font-weight: bold; + font-size: 34rpx; + color: #333333; + line-height: 52rpx; +} +.new_submitt{ + margin-top: 20rpx; + font-size: 30rpx; + opacity: 0.5; + bottom: 0; + margin-left: 30rpx; +} +.list_card { + display: flex; + flex-direction: column; + justify-content: space-around; + /* align-items: center; */ + color: #333333; + border-bottom: 1px solid #f7f7f7; + padding: 30rpx 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-size: 32rpx; + font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif; + font-weight: 500; +} + +.list_card:last-child { + margin-top: 29rpx; +} + +.list_card .special { + font-size: 40rpx; + font-family: "DIN Alternate", "Helvetica Neue", Arial, sans-serif; + color: #FF783C; +} +.new_left{ + float: left; + margin-left: 32rpx; + font-size: 36rpx; +} +.new_hh{ + margin-bottom: 12rpx; +} +.new_submit{ + margin-top: 30rpx; + font-size: 30rpx; + opacity: 0.5; + bottom: 0; + margin-top: auto; +} +.btn_fx { + margin-left: 32rpx; + width: 160rpx; + font-size: 28rpx; + height: 56rpx; + background: #FF783C; + border-radius: 28rpx; + text-align: center; + line-height: 56rpx; + padding: 0 !important; + color: #fff; + margin-top: 30rpx; +} +.btn_tj { + margin-left: 232rpx; + margin-top: -55rpx; + width: 160rpx; + height: 56rpx; + background: #13c8bd; + border-radius: 28rpx; + text-align: center; + line-height: 56rpx; + color: #fff; + font-size: 28rpx; +} +.bg_new_left{ + margin-right: 20px; +}