瀏覽代碼

问卷编辑机发布结果静态页

htc 14 小時之前
父節點
當前提交
fdd6f683b3
共有 4 個文件被更改,包括 344 次插入11 次删除
  1. 6 0
      pages.json
  2. 153 6
      pagesHome/questionnaireEdit.vue
  3. 13 5
      pagesPublish/fillTeamInfo.vue
  4. 172 0
      pagesPublish/publishResult.vue

+ 6 - 0
pages.json

@@ -153,6 +153,12 @@
 					"style": {
 						"navigationStyle": "custom"
 					}
+				},
+				{
+					"path": "publishResult",
+					"style": {
+						"navigationStyle": "custom"
+					}
 				}
 			]
 		},

+ 153 - 6
pagesHome/questionnaireEdit.vue

@@ -13,14 +13,14 @@
 		</view>
 		<view class="box" style="padding: 32rpx 24rpx;">
 			<view class="box-title">选择团队</view>
-			<view class="box-team adfacjb">
+			<view class="box-team adfacjb" @click="teamShow=true">
 				<view class="box-tip">{{'甜梦2025一期团队'}}</view>
 				<image :src="imgBase+'my_arrow_right.png'"></image>
 			</view>
 		</view>
 		<view class="box" style="padding: 32rpx 24rpx 0;">
 			<view class="box-title">问卷作答时间设置</view>
-			<view class="box-time adfacjb" style="margin-top: 32rpx;">
+			<view class="box-time adfacjb" style="margin-top: 32rpx;" @click="startShow=true">
 				<view class="box-time-left">开始时间</view>
 				<view class="box-time-right adfac">
 					<text>{{'2025-10-13 00:00'}}</text>
@@ -29,7 +29,7 @@
 			</view>
 			<view class="box-time adfacjb">
 				<view class="box-time-left">截止时间</view>
-				<view class="box-time-right adfac">
+				<view class="box-time-right adfac" @click="endShow=true">
 					<text>{{'2025-10-20 00:00'}}</text>
 					<image :src="imgBase+'my_arrow_right.png'"></image>
 				</view>
@@ -66,8 +66,26 @@
 			</view>
 		</view>
 		<view class="bottom">
-			<view class="zt_btn">确认发布</view>
+			<view class="zt_btn" @click="confirmPublish">确认发布</view>
+		</view>
+		<view class="dialog adffc" v-if="teamShow">
+			<view class="dbox adffc">
+				<view class="db-top">选择团队</view>
+				<image class="db-close" :src="imgBase+'remind_close.png'" @click="teamShow=false"></image>
+				<view class="db-bottom" @click="addTeam">+ 新增团队</view>
+				<view class="db-list">
+					<view class="db-list-item adfacjb" v-for="(item,index) in teamList" :key="item.id" @click="selectTeam(item,index)">
+						<view class="db-list-item-left" :class="{'active':item.select}">{{item.name}}</view>
+						<view class="db-list-item-right">
+							<u-icon name="checkbox-mark" color="#199C9C" size="42rpx" v-if="item.select"></u-icon>
+						</view>
+					</view>
+				</view>
+				<view class="zt_btn" style="margin-top: 40rpx;" @click="confirmTeam">确定</view>
+			</view>
 		</view>
+		<u-datetime-picker ref="datetimePicker1" title="开始时间" :minDate="minStartTime" itemHeight="88" :show="startShow" v-model="dto.startTime" mode="datetime" :formatter="formatter" @cancel="startShow=false" @confirm="startConfirm"></u-datetime-picker>
+		<u-datetime-picker ref="datetimePicker2" title="结束时间" :minDate="minEndTime" itemHeight="88" :show="endShow" v-model="dto.endTime" mode="datetime" :formatter="formatter" @cancel="endShow=false" @confirm="endConfirm"></u-datetime-picker>
 	</view>
 </template>
 
@@ -78,13 +96,41 @@
 		data(){
 			return {
 				limit:true,
+				teamShow:false,
+				startShow:false,
+				endShow:false,
 				dto:{
 					submitNum:1,
-					userList:[1,1,1,1]
-				}
+					userList:[1,1,1,1],
+					startTime:'',
+					endTime:''
+				},
+				teamList:[
+					{id:1,name:'甜梦巧克力有限公司',select:false},
+					{id:2,name:'美银证券',select:false},
+					{id:3,name:'中国银行',select:false}
+				],
+				minStartTime:new Date().getTime(),
+				minEndTime:''
 			}
+		},
+		onReady() {
+			this.$refs.datetimePicker1.setFormatter(this.formatter)
+			this.$refs.datetimePicker2.setFormatter(this.formatter)
 		},
 		methods:{
+			formatter(type, value) {
+				if (type === 'year') {
+					return `${value}年`
+				}
+				if (type === 'month') {
+					return `${value}月`
+				}
+				if (type === 'day') {
+					return `${value}日`
+				}
+				return value
+			},
 			valChange(e){
 				this.dto.submitNum = e;
 			},
@@ -92,6 +138,38 @@
 				uni.navigateTo({
 					url:'/pagesPublish/questionnairePreview'
 				})
+			},
+			selectTeam(item,index){
+				this.teamList.forEach((t,i)=>{
+					this.$set(this.teamList[i],'select',i===index)
+				})
+			},
+			addTeam(){
+				uni.navigateTo({
+					url:'/pagesPublish/fillTeamInfo?type=add',
+					events:{
+						saveTeamInfo: data =>{
+							console.log(data);
+						}
+					}
+				})
+			},
+			confirmTeam(){
+				this.teamShow = false;
+			},
+			startConfirm(e){
+				this.dto.startTime = e.value;
+				this.minEndTime = e.value;
+				this.startShow = false;
+			},
+			endConfirm(e){
+				this.dto.endTime = e.value;
+				this.endShow = false;
+			},
+			confirmPublish(){
+				uni.navigateTo({
+					url:'/pagesPublish/publishResult'
+				})
 			}
 		}
 	}
@@ -253,5 +331,74 @@
 			bottom: 0;
 			z-index: 888;
 		}
+	
+		.dialog{
+			position: fixed;
+			left: 0;
+			right: 0;
+			top: 0;
+			bottom: 0;
+			z-index: 1000;
+			background: rgba(0, 0, 0, .4);
+			justify-content: flex-end;
+			.dbox{
+				width: 100%;
+				height: 1200rpx;
+				background: #FFFFFF;
+				box-shadow: 0rpx -2rpx 6rpx 0rpx rgba(0,0,0,0.07);
+				border-radius: 24rpx 24rpx 0rpx 0rpx;
+				padding: 41rpx 30rpx 64rpx;
+				box-sizing: border-box;
+				position: relative;
+				.db-top{
+					font-family: PingFang-SC, PingFang-SC;
+					font-weight: bold;
+					font-size: 36rpx;
+					color: #002846;
+					line-height: 36rpx;
+					text-align: center;
+				}
+				.db-close{
+					width: 48rpx;
+					height: 48rpx;
+					position: absolute;
+					top: 35rpx;
+					right: 30rpx;
+				}
+				.db-list{
+					flex: 1;
+					overflow-y: auto;
+					margin-top: 58rpx;
+					&-item{
+						box-shadow: inset 0rpx -1rpx 0rpx 0rpx #EFEFEF;
+						padding: 39rpx 0;
+						&-left{
+							font-family: PingFangSC, PingFang SC;
+							font-weight: 400;
+							font-size: 32rpx;
+							color: #002846;
+							line-height: 32rpx;
+							&.active{
+								font-weight: bold;
+								color: #009191;
+							}
+						}
+					}
+				}
+				.db-bottom{
+					width: 100%;
+					height: 88rpx;
+					background: rgba(25,156,156,0.1);
+					border-radius: 44rpx;
+					font-family: PingFang-SC, PingFang-SC;
+					font-weight: bold;
+					font-size: 32rpx;
+					color: #009191;
+					line-height: 88rpx;
+					text-align: center;
+					margin-top: 40rpx;
+				}
+			}
+		}
 	}
 </style>

+ 13 - 5
pagesPublish/fillTeamInfo.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="default_page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
 		<cus-header title='填写所在团队信息'></cus-header>
-		<cus-team-info-fill @handleConfirm="handleConfirm"></cus-team-info-fill>
+		<cus-team-info-fill @handleConfirm="handleConfirm" confirmText="确定"></cus-team-info-fill>
 	</view>
 </template>
 
@@ -11,14 +11,22 @@
 		components:{ CusTeamInfoFill },
 		data(){
 			return {
-				
+				type:''
 			}
 		},
+		onLoad(options) {
+			this.type = options.type||''
+		},
 		methods:{
 			handleConfirm(){
-				uni.navigateTo({
-					url:'/pagesPublish/questionnaireFill'
-				})
+				if(!this.type){
+					uni.navigateTo({
+						url:'/pagesPublish/questionnaireFill'
+					})				
+				}else{
+					this.getOpenerEventChannel().emit('saveTeamInfo',111)
+					uni.navigateBack()
+				} 
 			}
 		}
 	}

+ 172 - 0
pagesPublish/publishResult.vue

@@ -0,0 +1,172 @@
+<template>
+	<view class="default_page adffc" :style="{'height':h+'px', 'padding-top':mt+'px'}">
+		<cus-header title='发布结果'></cus-header>
+		<view class="xcx">
+			<view class="box">
+				<view class="box-title">{{'GW+MC PREILL36测评题库版本'}}</view>
+				<view class="box-fill">
+					<view class="box-fill-bottom adfacjb">
+						<view class="box-fill-bottom-left adfac">
+							<image :src="imgBase+'publish_result_avatar.png'"></image>
+							<text>邀请填写</text>
+						</view>
+						<view class="box-fill-bottom-right">进入</view>
+					</view>
+				</view>
+				<view class="box-bottom adfac">
+					<image :src="imgBase+'publish_result_xcx.png'"></image>
+					<text>小程序</text>		
+				</view>
+			</view>
+		</view>
+		<view class="share">
+			<view class="share-title">分享到</view>
+			<view class="share-menu adf">
+				<view class="share-menu-pre adffcac">
+					<image :src="imgBase+'publish_result_wx.png'"></image>
+					<text>微信好友</text>
+				</view>
+				<view class="share-menu-pre adffcac">
+					<image :src="imgBase+'publish_result_pyq.png'"></image>
+					<text>朋友圈</text>
+				</view>
+				<view class="share-menu-pre adffcac">
+					<image :src="imgBase+'publish_result_copy.png'"></image>
+					<text>复制链接</text>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data(){
+			return {
+				
+			}
+		},
+		methods:{
+			
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.default_page{
+		box-sizing: border-box;
+		.xcx{
+			padding: 70rpx 155rpx;
+			.box{
+				background: #FFFFFF;
+				border-radius: 8rpx;
+				padding: 40rpx 24rpx 18rpx;
+				&-title{
+					font-family: PingFangSC, PingFang SC;
+					font-weight: 400;
+					font-size: 24rpx;
+					color: #002846;
+					line-height: 32rpx;
+				}
+				&-fill{
+					margin-top: 34rpx;
+					width: 100%;
+					height: 322rpx;
+					background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/publish_result_bg1.png') no-repeat;
+					background-size: 100% 100%;
+					display: flex;
+					flex-direction: column;
+					justify-content: flex-end;
+					padding: 0 5rpx 5rpx;
+					&-bottom{
+						width: 100%;
+						height: 84rpx;
+						background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/publish_result_bg2.png') no-repeat;
+						background-size: 100% 100%;
+						padding: 13rpx 16rpx;
+						box-sizing: border-box;
+						&-left{
+							image{
+								width: 56rpx;
+								height: 56rpx;
+							}
+							text{
+								font-family: PingFangSC, PingFang SC;
+								font-weight: 400;
+								font-size: 24rpx;
+								color: #002846;
+								line-height: 33rpx;
+								margin-left: 12rpx;
+							}
+						}
+						&-right{
+							width: 86rpx;
+							height: 42rpx;
+							background: #33A7A7;
+							border-radius: 10rpx;
+							font-family: PingFangSC, PingFang SC;
+							font-weight: 400;
+							font-size: 24rpx;
+							color: #FFFFFF;
+							line-height: 42rpx;
+							text-align: center;
+							letter-spacing: 2rpx;
+						}
+					}
+				}
+				&-bottom{
+					margin-top: 16rpx;
+					border-top: 1rpx solid #EFEFEF;
+					padding-top: 10rpx;
+					image{
+						width: 24rpx;
+						height: 24rpx;
+					}
+					text{
+						font-family: PingFangSC, PingFang SC;
+						font-weight: 400;
+						font-size: 20rpx;
+						color: #95A5B1;
+						line-height: 20rpx;
+						margin-left: 8rpx;
+					}
+				}
+			}
+		}
+		
+		.share{
+			flex: 1;
+			background: #FFFFFF;
+			border-radius: 24rpx 24rpx 0rpx 0rpx;
+			padding: 40rpx 30rpx;
+			&-title{
+				font-family: PingFang-SC, PingFang-SC;
+				font-weight: bold;
+				font-size: 30rpx;
+				color: #002846;
+				line-height: 42rpx;
+				padding-left: 10rpx;
+			}
+			&-menu{
+				flex-wrap: wrap;
+				&-pre{
+					width: calc(100% / 3);
+					margin-top: 42rpx;
+					image{
+						width: 102rpx;
+						height: 102rpx;
+					}
+					text{
+						font-family: PingFangSC, PingFang SC;
+						font-weight: 400;
+						font-size: 26rpx;
+						color: #002846;
+						line-height: 37rpx;
+						text-align: center;
+						margin-top: 24rpx;
+					}
+				}
+			}
+		}
+	}
+</style>