|
@@ -4,17 +4,17 @@
|
|
|
<view class="box adfacjb" style="padding: 32rpx 24rpx 40rpx;">
|
|
<view class="box adfacjb" style="padding: 32rpx 24rpx 40rpx;">
|
|
|
<view class="box-left">
|
|
<view class="box-left">
|
|
|
<view class="box-title">问卷名称</view>
|
|
<view class="box-title">问卷名称</view>
|
|
|
- <view class="box-tip" style="margin-top: 32rpx;">{{'GW+MC PREILL36测评题库版本'}}</view>
|
|
|
|
|
|
|
+ <view class="box-tip" style="margin-top: 32rpx;">{{questionnaireName}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="box-right adfac" @click="handlePreview">
|
|
<view class="box-right adfac" @click="handlePreview">
|
|
|
<text>预览</text>
|
|
<text>预览</text>
|
|
|
<image :src="imgBase+'my_arrow_right.png'"></image>
|
|
<image :src="imgBase+'my_arrow_right.png'"></image>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="box" style="padding: 32rpx 24rpx;">
|
|
|
|
|
|
|
+ <view class="box" style="padding: 32rpx 24rpx;" @click="showTeam">
|
|
|
<view class="box-title">选择团队</view>
|
|
<view class="box-title">选择团队</view>
|
|
|
- <view class="box-team adfacjb" @click="teamShow=true">
|
|
|
|
|
- <view class="box-tip">{{'甜梦2025一期团队'}}</view>
|
|
|
|
|
|
|
+ <view class="box-team adfacjb" @click="showTeam">
|
|
|
|
|
+ <view class="box-tip">{{teamName}}</view>
|
|
|
<image :src="imgBase+'my_arrow_right.png'"></image>
|
|
<image :src="imgBase+'my_arrow_right.png'"></image>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -23,14 +23,14 @@
|
|
|
<view class="box-time adfacjb" style="margin-top: 32rpx;" @click="startShow=true">
|
|
<view class="box-time adfacjb" style="margin-top: 32rpx;" @click="startShow=true">
|
|
|
<view class="box-time-left">开始时间</view>
|
|
<view class="box-time-left">开始时间</view>
|
|
|
<view class="box-time-right adfac">
|
|
<view class="box-time-right adfac">
|
|
|
- <text>{{'2025-10-13 00:00'}}</text>
|
|
|
|
|
|
|
+ <text>{{dto.startTime}}</text>
|
|
|
<image :src="imgBase+'my_arrow_right.png'"></image>
|
|
<image :src="imgBase+'my_arrow_right.png'"></image>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="box-time adfacjb">
|
|
<view class="box-time adfacjb">
|
|
|
<view class="box-time-left">截止时间</view>
|
|
<view class="box-time-left">截止时间</view>
|
|
|
<view class="box-time-right adfac" @click="endShow=true">
|
|
<view class="box-time-right adfac" @click="endShow=true">
|
|
|
- <text>{{'2025-10-20 00:00'}}</text>
|
|
|
|
|
|
|
+ <text>{{dto.endTime}}</text>
|
|
|
<image :src="imgBase+'my_arrow_right.png'"></image>
|
|
<image :src="imgBase+'my_arrow_right.png'"></image>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -40,23 +40,23 @@
|
|
|
<text>限制每位用户提交次数</text>
|
|
<text>限制每位用户提交次数</text>
|
|
|
<u-switch v-model="limit" activeColor="#199C9C" size="38"></u-switch>
|
|
<u-switch v-model="limit" activeColor="#199C9C" size="38"></u-switch>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="box-num adfacjb">
|
|
|
|
|
|
|
+ <view class="box-num adfacjb" v-if="limit">
|
|
|
<view class="box-num-title">可提交次数</view>
|
|
<view class="box-num-title">可提交次数</view>
|
|
|
<view class="box-num-right">
|
|
<view class="box-num-right">
|
|
|
- <cus-number-box :min="1" :number="dto.submitNum" @valChange="valChange"></cus-number-box>
|
|
|
|
|
|
|
+ <cus-number-box :min="1" :number="dto.answerSetting" @valChange="valChange"></cus-number-box>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="box" style="padding: 30rpx 24rpx 0;">
|
|
|
|
|
|
|
+ <view class="box" style="padding: 30rpx 24rpx 0;" v-if="type>1">
|
|
|
<view class="box-title adfacjb">
|
|
<view class="box-title adfacjb">
|
|
|
<text>团队人员</text>
|
|
<text>团队人员</text>
|
|
|
- <view class="box-add">+ 添加</view>
|
|
|
|
|
|
|
+ <view class="box-add" @click="addTeamUser">+ 添加</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="box-user">
|
|
<view class="box-user">
|
|
|
- <view class="box-user-item adfacjb" v-for="(item,index) in dto.userList" :key="index">
|
|
|
|
|
|
|
+ <view class="box-user-item adfacjb" v-for="(item,index) in dto.memberInfos" :key="index">
|
|
|
<view class="box-user-item-left">
|
|
<view class="box-user-item-left">
|
|
|
<view class="box-user-item-left-name adfac">
|
|
<view class="box-user-item-left-name adfac">
|
|
|
- <text>{{'吴亦可'}}</text>
|
|
|
|
|
|
|
+ <text>{{item.realName}}</text>
|
|
|
<view class="type">{{'赞助人Sponsor'}}</view>
|
|
<view class="type">{{'赞助人Sponsor'}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="box-user-item-left-email">{{'123456789@qq.com'}}</view>
|
|
<view class="box-user-item-left-email">{{'123456789@qq.com'}}</view>
|
|
@@ -68,7 +68,8 @@
|
|
|
<view class="bottom">
|
|
<view class="bottom">
|
|
|
<view class="zt_btn" @click="confirmPublish">确认发布</view>
|
|
<view class="zt_btn" @click="confirmPublish">确认发布</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <cus-select :show="teamShow" :list="teamList" :addShow="true" @close="teamShow=false" @confirmTeam="confirmTeam"></cus-select>
|
|
|
|
|
|
|
+ <cus-select :show="teamShow" :list="teamList" :addShow="true"
|
|
|
|
|
+ @close="teamShow=false" @addTeam="addTeam" @confirmTeam="confirmTeam"></cus-select>
|
|
|
<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="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>
|
|
<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>
|
|
</view>
|
|
@@ -81,21 +82,16 @@
|
|
|
components:{ CusNumberBox, CusSelect },
|
|
components:{ CusNumberBox, CusSelect },
|
|
|
data(){
|
|
data(){
|
|
|
return {
|
|
return {
|
|
|
|
|
+ id:'',
|
|
|
|
|
+ type:'',
|
|
|
|
|
+ questionnaireName:'',
|
|
|
limit:true,
|
|
limit:true,
|
|
|
teamShow:false,
|
|
teamShow:false,
|
|
|
startShow:false,
|
|
startShow:false,
|
|
|
endShow:false,
|
|
endShow:false,
|
|
|
- dto:{
|
|
|
|
|
- submitNum:1,
|
|
|
|
|
- userList:[1,1,1,1],
|
|
|
|
|
- startTime:'',
|
|
|
|
|
- endTime:''
|
|
|
|
|
- },
|
|
|
|
|
- teamList:[
|
|
|
|
|
- {id:1,name:'甜梦巧克力有限公司',select:false},
|
|
|
|
|
- {id:2,name:'美银证券',select:false},
|
|
|
|
|
- {id:3,name:'中国银行',select:false}
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ dto:{},
|
|
|
|
|
+ teamName:'',
|
|
|
|
|
+ teamList:[],
|
|
|
minStartTime:new Date().getTime(),
|
|
minStartTime:new Date().getTime(),
|
|
|
minEndTime:''
|
|
minEndTime:''
|
|
|
}
|
|
}
|
|
@@ -104,6 +100,12 @@
|
|
|
this.$refs.datetimePicker1.setFormatter(this.formatter)
|
|
this.$refs.datetimePicker1.setFormatter(this.formatter)
|
|
|
this.$refs.datetimePicker2.setFormatter(this.formatter)
|
|
this.$refs.datetimePicker2.setFormatter(this.formatter)
|
|
|
},
|
|
},
|
|
|
|
|
+ onLoad(options) {
|
|
|
|
|
+ this.teamQuestionnaireId = options.teamQuestionnaireId;
|
|
|
|
|
+ this.type = options.type;
|
|
|
|
|
+ this.questionnaireName = options.questionnaireName;
|
|
|
|
|
+ this.getDetail()
|
|
|
|
|
+ },
|
|
|
methods:{
|
|
methods:{
|
|
|
formatter(type, value) {
|
|
formatter(type, value) {
|
|
|
if (type === 'year') {
|
|
if (type === 'year') {
|
|
@@ -120,6 +122,25 @@
|
|
|
valChange(e){
|
|
valChange(e){
|
|
|
this.dto.submitNum = e;
|
|
this.dto.submitNum = e;
|
|
|
},
|
|
},
|
|
|
|
|
+ getDetail(){
|
|
|
|
|
+ this.$api.get('/core/team/questionnaire/'+this.teamQuestionnaireId).then(({data:res})=>{
|
|
|
|
|
+ if(res.code!==0) return this.$showToast(res.msg)
|
|
|
|
|
+ this.dto = {...this.dto,...res.data}
|
|
|
|
|
+ this.teamName = res.data.teamName;
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ showTeam(){
|
|
|
|
|
+ this.teamShow = true;
|
|
|
|
|
+ this.$api.get('/core/user/team/page',{
|
|
|
|
|
+ page:1,
|
|
|
|
|
+ limit:-1,
|
|
|
|
|
+ coachId:JSON.parse(uni.getStorageSync('userInfo')).id
|
|
|
|
|
+ }).then(({data:res})=>{
|
|
|
|
|
+ if(res.code!==0) return this.$showToast(res.msg)
|
|
|
|
|
+ this.teamList = res.data.list;
|
|
|
|
|
+ this.teamList.forEach(t=>t.name=t.teamName)
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
handlePreview(){
|
|
handlePreview(){
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
url:'/pagesPublish/questionnairePreview'
|
|
url:'/pagesPublish/questionnairePreview'
|
|
@@ -135,7 +156,12 @@
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- confirmTeam(){
|
|
|
|
|
|
|
+ addTeamUser(){
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ confirmTeam(item){
|
|
|
|
|
+ this.teamName = item.teamName;
|
|
|
|
|
+ this.dto.teamId = item.id;
|
|
|
this.teamShow = false;
|
|
this.teamShow = false;
|
|
|
},
|
|
},
|
|
|
startConfirm(e){
|
|
startConfirm(e){
|
|
@@ -148,8 +174,14 @@
|
|
|
this.endShow = false;
|
|
this.endShow = false;
|
|
|
},
|
|
},
|
|
|
confirmPublish(){
|
|
confirmPublish(){
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url:'/pagesPublish/publishResult'
|
|
|
|
|
|
|
+ let params = JSON.parse(JSON.stringify(this.dto));
|
|
|
|
|
+ params.coachId = JSON.parse(uni.getStorageSync('userInfo')).id;
|
|
|
|
|
+ params.type = this.type;
|
|
|
|
|
+ this.$api.get('/core/team/questionnaire',params).then(({data:res})=>{
|
|
|
|
|
+ if(res.code!==0) return this.$showToast(res.msg)
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url:'/pagesPublish/publishResult'
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|