htc 4 dagen geleden
bovenliggende
commit
bad473136c

+ 2 - 12
pagesHome/components/createList.vue

@@ -156,17 +156,6 @@ export default {
 		}
 	},
 	methods:{
-		onShareAppMessage(res) {
-		    // res.from === 'button' // 来自页面内分享按钮
-		    // res.from === 'menu'   // 来自右上角菜单分享
-		    const sharerId = JSON.parse(uni.getStorageSync('userInfo'))?.id;
-		    console.log(`准备分享,团队问卷ID: ${this.dto.teamQuestionnaireId}, 分享者ID: ${sharerId}`);
-		    return {
-		      title: this.dto.title || '发现一个好物,分享给你!',
-		      path: `/pages/home?shareTQId=${this.dto.teamQuestionnaireId}&shareUserId=${sharerId}`,
-		      // imageUrl: this.$imgBase+''
-		    };
-		},
 		scrolltolower(){
 			this.$emit('scrolltolower')
 		},
@@ -174,7 +163,8 @@ export default {
 			this.dto = item;
 			if(this.dto.type==1) this.menuListCopy = this.menuList.filter((_, index) => index !== 4);
 			else this.menuListCopy = JSON.parse(JSON.stringify(this.menuList))
-			this.show = true;
+			this.show = true;
+			this.$emit('showDialogFn',item);
 		},
 		async getTeamScaleData(){
 			return new Promise((resolve,reject)=>{

+ 1 - 0
pagesHome/components/receiveList.vue

@@ -136,6 +136,7 @@ The following statements in the assessment describe the ideal state of a team. P
 			showDialog(item){
 				this.dto = item;
 				this.show = true;
+				this.$emit('showDialogFn',item);
 			},
 			showNotice(item){
 				this.dto = item;

+ 2 - 2
pagesHome/components/report/generateList.vue

@@ -29,7 +29,7 @@
 							<view class="gbox-item-bottom-left-text">创建时间:</view>
 							<view class="gbox-item-bottom-left-time">{{item.createDate||''}}</view>
 						</view>
-						<view class="gbox-item-bottom-right" @click="reviewPdf(item.type)"  v-if="item.state==1">预览</view>
+						<view class="gbox-item-bottom-right" @click="reviewPdf(item.type)">预览</view>
 						<view class="gbox-item-bottom-right" @click="sendReport(item)" v-if="item.state!=-1">发送报告</view>
 						<view class="gbox-item-bottom-right" @click="reSendReport(item)" v-else>重新生成</view>
 					</view>
@@ -72,7 +72,7 @@
 			},
 			reviewPdf(type){
 				let url = '/pagesHome/pdf';
-				if(type==2) url = '/pagesHome/pdfZyb'
+				// if(type==2) url = '/pagesHome/pdfZyb'
 				uni.navigateTo({ url })
 			},
 			sendReport(item){

+ 13 - 2
pagesHome/questionnaire.vue

@@ -15,10 +15,10 @@
 		</view>
 		<view class="box">
 			<template v-if="tindex===0">
-				<receive-list :list="receiveList" @scrolltolower="receiveScrolltolower"></receive-list>
+				<receive-list :list="receiveList" @scrolltolower="receiveScrolltolower" @showDialogFn="showDialog"></receive-list>
 			</template>
 			<template v-else-if="tindex===1">
-				<create-list :list="createList" @scrolltolower="createScrolltolower"></create-list>
+				<create-list :list="createList" @scrolltolower="createScrolltolower" @showDialogFn="showDialog"></create-list>
 			</template>
 		</view>
 	</view>
@@ -37,7 +37,15 @@
 				receiveList:[],
 				createList:[],
 				teamUserShow:false,
+				dto:null
 			}
+		},
+		onShareAppMessage(res) {
+			const sharerId = JSON.parse(uni.getStorageSync('userInfo'))?.id;
+			return {
+			  title: this.dto.title || '发现一个好物,分享给你!',
+			  path: `/pages/home?shareTQId=${this.dto.teamQuestionnaireId}&shareUserId=${sharerId}&shareType=Questionnaire`,
+			};
 		},
 		onShow() {
 			if(this.tindex===0){
@@ -63,6 +71,9 @@
 			} 
 		},
 		methods:{
+			showDialog(dto){
+				this.dto = dto;
+			},
 			changeTab(index){
 				if(this.tindex===index) return
 				this.tindex = index;