From 9c86a72e01f9d19d9580d0a38b330a73ef2a1886 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=98=AF=E5=B0=8F=E7=8E=8B=E5=91=80=5C24601?=
<819653817@qq.com>
Date: Fri, 19 Jul 2024 18:45:08 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=9F=A5=E9=97=AE=E5=8D=B7=E8=B7=B3?=
=?UTF-8?q?=E8=BD=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/home/index.vue | 59 ++++++++++++++++++++++++++++++++++++++--
1 file changed, 57 insertions(+), 2 deletions(-)
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 5be7d14..7534272 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -39,7 +39,7 @@
+
@@ -140,6 +140,7 @@
import registerDialog from '@/components/registerDialog';
import { communityActivity, icEventOldDiscuss, advertisingTag, communityPublicity,handelClicsupport,communityPublicityGiveLike } from '@/api/home';
import { querystaffmessage } from '@/api/message';
+import { inspRecord } from '@/api/satisfaction';
export default {
data() {
@@ -183,7 +184,11 @@ export default {
messageText:'没有新的消息!',
day:null,
tipContent:null,
- registerFlag:null
+ registerFlag:null,
+ pageSize: 5,
+ pageNo: 1,
+ list: {},
+ questionnaireUrl:""
};
},
created() {
@@ -197,8 +202,50 @@ export default {
this.querystaffmessage()//获取消息提醒
let date = new Date()
this.day = this.$dayjs(date).format('MM-DD');
+ this.mounth = this.$dayjs(date).format('M');
+ this.data=this
+ this.inspRecord()
},
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){
if(item.coverPic){
this.$router.push({name:'communityPublicityDetail',query:{item:JSON.stringify(item)}})
@@ -331,6 +378,14 @@ export default {
return '--';
}
},
+ handelClickSatis(){
+ if(this.questionnaireUrl){
+ window.open(this.questionnaireUrl)
+ }
+ else{
+ this.$toast("当前社区没有设置调查问卷")
+ }
+ },
handelClickJump(path,item) {
if (path === 'event' || path === 'Enjoyableservices') {
if(path === 'event'){