Browse Source

调查问卷跳转

feature
是小王呀\24601 1 year ago
parent
commit
9c86a72e01
  1. 59
      src/views/home/index.vue

59
src/views/home/index.vue

@ -39,7 +39,7 @@
<div>我有诉求</div> <div>我有诉求</div>
<div class="font-size13 m-top5" style="color: #d8e6fe;"> 居民点单 社区接单</div> <div class="font-size13 m-top5" style="color: #d8e6fe;"> 居民点单 社区接单</div>
</div> </div>
<div class="verify" @click="handelClickJump('mySatisfaction')"> <div class="verify" @click="handelClickSatis()">
<div>民意调查</div> <div>民意调查</div>
<div class="font-size13 m-top5" style="color: #d8e6fe;">为社区工作提意见</div> <div class="font-size13 m-top5" style="color: #d8e6fe;">为社区工作提意见</div>
</div> </div>
@ -140,6 +140,7 @@
import registerDialog from '@/components/registerDialog'; import registerDialog from '@/components/registerDialog';
import { communityActivity, icEventOldDiscuss, advertisingTag, communityPublicity,handelClicsupport,communityPublicityGiveLike } from '@/api/home'; import { communityActivity, icEventOldDiscuss, advertisingTag, communityPublicity,handelClicsupport,communityPublicityGiveLike } from '@/api/home';
import { querystaffmessage } from '@/api/message'; import { querystaffmessage } from '@/api/message';
import { inspRecord } from '@/api/satisfaction';
export default { export default {
data() { data() {
@ -183,7 +184,11 @@ export default {
messageText:'没有新的消息!', messageText:'没有新的消息!',
day:null, day:null,
tipContent:null, tipContent:null,
registerFlag:null registerFlag:null,
pageSize: 5,
pageNo: 1,
list: {},
questionnaireUrl:""
}; };
}, },
created() { created() {
@ -197,8 +202,50 @@ export default {
this.querystaffmessage()// this.querystaffmessage()//
let date = new Date() let date = new Date()
this.day = this.$dayjs(date).format('MM-DD'); this.day = this.$dayjs(date).format('MM-DD');
this.mounth = this.$dayjs(date).format('M');
this.data=this
this.inspRecord()
}, },
methods: { methods: {
async inspRecord() {
let parm = {
pageSize:this.pageSize,
pageNo:this.pageNo++,
agencyId:this.agencyId
}
let res = await inspRecord(parm)
if (res.code === 0) {
this.loading = false;
const now = new Date();
this.month = now.getMonth() + 1;
if(res.data.list.findIndex(item=>item.monthName == this.month) == -1){
this.currentMonth = true;
}
if (!res.data || res.data.list.length < this.pageSize) {
this.finished = true;
}
console.log(this.mounth);
this.list= res.data.list.filter(item=>{
console.log(item.monthName);
if(item.monthName == this.mounth){
return item
}
})
console.log(this.list);
if(this.list[0]){
this.questionnaireUrl=this.list[0].questionnaireUrl
console.log(this.questionnaireUrl);
}
}
},
async advertisingTag(){
let res = await advertisingTag()
if(res.code === 0){
this.tagList = res.data
}
},
toDetail(item){ toDetail(item){
if(item.coverPic){ if(item.coverPic){
this.$router.push({name:'communityPublicityDetail',query:{item:JSON.stringify(item)}}) this.$router.push({name:'communityPublicityDetail',query:{item:JSON.stringify(item)}})
@ -331,6 +378,14 @@ export default {
return '--'; return '--';
} }
}, },
handelClickSatis(){
if(this.questionnaireUrl){
window.open(this.questionnaireUrl)
}
else{
this.$toast("当前社区没有设置调查问卷")
}
},
handelClickJump(path,item) { handelClickJump(path,item) {
if (path === 'event' || path === 'Enjoyableservices') { if (path === 'event' || path === 'Enjoyableservices') {
if(path === 'event'){ if(path === 'event'){

Loading…
Cancel
Save