|
@@ -11,16 +11,16 @@
|
|
|
<view class="progress-left adfac">
|
|
<view class="progress-left adfac">
|
|
|
<view class="progress-left-text">作答进度:</view>
|
|
<view class="progress-left-text">作答进度:</view>
|
|
|
<view class="progress-left-box">
|
|
<view class="progress-left-box">
|
|
|
- <view class="progress-left-box-current" :style="{'width':(item.yzdNum/item.sum*100)+'%'}"></view>
|
|
|
|
|
|
|
+ <view class="progress-left-box-current" :style="{'width':(item.finishNum/item.userNum*100)+'%'}"></view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="progress-right"><span>{{item.yzdNum}}/</span>{{item.sum}}</view>
|
|
|
|
|
|
|
+ <view class="progress-right"><span>{{item.finishNum}}/</span>{{item.userNum}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="bottom adfacjb">
|
|
<view class="bottom adfacjb">
|
|
|
<view class="bottom-left">截止时间:{{item.endTime}}</view>
|
|
<view class="bottom-left">截止时间:{{item.endTime}}</view>
|
|
|
<view class="bottom-right" v-if="item.status===0" @click.stop="handleAnswer(item)">立即作答</view>
|
|
<view class="bottom-right" v-if="item.status===0" @click.stop="handleAnswer(item)">立即作答</view>
|
|
|
- <view class="bottom-right" v-else-if="item.status===1" @click.stop="createReport(item)">生成报告</view>
|
|
|
|
|
- <view class="bottom-right" v-else-if="item.status===2" @click.stop="sendReport(item)">发送报告</view>
|
|
|
|
|
|
|
+ <view class="bottom-right" v-else-if="item.status===1&&!item.fileUrl" @click.stop="createReport(item)">生成报告</view>
|
|
|
|
|
+ <view class="bottom-right" v-else-if="item.status===1&&item.fileUrl" @click.stop="sendReport(item)">发送报告</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</up-list-item>
|
|
</up-list-item>
|
|
@@ -40,13 +40,13 @@
|
|
|
<view class="dbox-progress-left adfac">
|
|
<view class="dbox-progress-left adfac">
|
|
|
<view class="dbox-progress-left-text">作答进度:</view>
|
|
<view class="dbox-progress-left-text">作答进度:</view>
|
|
|
<view class="dbox-progress-left-box">
|
|
<view class="dbox-progress-left-box">
|
|
|
- <view class="dbox-progress-left-box-current" :style="{'width':(dto.yzdNum/dto.sum*100)+'%'}"></view>
|
|
|
|
|
|
|
+ <view class="dbox-progress-left-box-current" :style="{'width':(dto.finishNum/dto.userNum*100)+'%'}"></view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="dbox-progress-right"><span>{{dto.yzdNum}}/</span>{{dto.sum}}</view>
|
|
|
|
|
|
|
+ <view class="dbox-progress-right"><span>{{dto.finishNum}}/</span>{{dto.userNum}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="dbox-menu">
|
|
<view class="dbox-menu">
|
|
|
- <view class="dbox-menu-pre adffcac" v-for="(item,index) in menuList" :key="index" @click="handleMenuClick(index)">
|
|
|
|
|
|
|
+ <view class="dbox-menu-pre adffcac" v-for="(item,index) in menuListCopy" :key="index" @click="handleMenuClick(item,index)">
|
|
|
<image :src="item.img"></image>
|
|
<image :src="item.img"></image>
|
|
|
<text>{{item.text}}</text>
|
|
<text>{{item.text}}</text>
|
|
|
</view>
|
|
</view>
|
|
@@ -58,7 +58,7 @@
|
|
|
<view class="dialog-box-title">团队信息</view>
|
|
<view class="dialog-box-title">团队信息</view>
|
|
|
<image class="dialog-box-close" :src="imgBase+'remind_close.png'" @click="teamInfoShow=false"></image>
|
|
<image class="dialog-box-close" :src="imgBase+'remind_close.png'" @click="teamInfoShow=false"></image>
|
|
|
<view class="dialog-box-teaminfo">
|
|
<view class="dialog-box-teaminfo">
|
|
|
- <cus-team-info-fill confirmText="保存" @handleConfirm="handleConfirm"></cus-team-info-fill>
|
|
|
|
|
|
|
+ <cus-team-info-fill ref="teamRef" confirmText="保存" @handleConfirm="handleConfirm"></cus-team-info-fill>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -123,32 +123,35 @@
|
|
|
text:'发送报告'
|
|
text:'发送报告'
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
|
|
+ menuListCopy:[],
|
|
|
teamUserList:[
|
|
teamUserList:[
|
|
|
- {
|
|
|
|
|
- name:'张三',
|
|
|
|
|
- email:'2233983769@qq.com',
|
|
|
|
|
- type:1,
|
|
|
|
|
- status:0
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name:'李四',
|
|
|
|
|
- email:'2233983769@qq.com',
|
|
|
|
|
- type:2,
|
|
|
|
|
- status:0
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name:'王五',
|
|
|
|
|
- email:'2233983769@qq.com',
|
|
|
|
|
- type:3,
|
|
|
|
|
- status:1
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name:'赵六',
|
|
|
|
|
- email:'2233983769@qq.com',
|
|
|
|
|
- type:1,
|
|
|
|
|
- status:1
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // {
|
|
|
|
|
+ // name:'张三',
|
|
|
|
|
+ // email:'2233983769@qq.com',
|
|
|
|
|
+ // type:1,
|
|
|
|
|
+ // status:0
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // name:'李四',
|
|
|
|
|
+ // email:'2233983769@qq.com',
|
|
|
|
|
+ // type:2,
|
|
|
|
|
+ // status:0
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // name:'王五',
|
|
|
|
|
+ // email:'2233983769@qq.com',
|
|
|
|
|
+ // type:3,
|
|
|
|
|
+ // status:1
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // name:'赵六',
|
|
|
|
|
+ // email:'2233983769@qq.com',
|
|
|
|
|
+ // type:1,
|
|
|
|
|
+ // status:1
|
|
|
|
|
+ // }
|
|
|
],
|
|
],
|
|
|
|
|
+ teamScaleData:[],
|
|
|
|
|
+ teamLevelData:[],
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods:{
|
|
methods:{
|
|
@@ -157,29 +160,76 @@
|
|
|
},
|
|
},
|
|
|
showDialog(item){
|
|
showDialog(item){
|
|
|
this.dto = item;
|
|
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;
|
|
|
},
|
|
},
|
|
|
- handleMenuClick(type){
|
|
|
|
|
- if(type===0){
|
|
|
|
|
|
|
+ async getTeamScaleData(){
|
|
|
|
|
+ return new Promise((resolve,reject)=>{
|
|
|
|
|
+ this.$api.get('/getListByType/team_scale').then(({data:res})=>{
|
|
|
|
|
+ if(res.code!==0) return this.$showToast(res.msg)
|
|
|
|
|
+ this.teamScaleData = res.data.map(d=>({name:d.dictLabel,id:d.dictValue}))
|
|
|
|
|
+ resolve()
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ async getTeamHierarchyData(){
|
|
|
|
|
+ return new Promise((resolve,reject)=>{
|
|
|
|
|
+ this.$api.get('/getListByType/team_hierarchy').then(({data:res})=>{
|
|
|
|
|
+ if(res.code!==0) return this.$showToast(res.msg)
|
|
|
|
|
+ this.teamLevelData = res.data.map(d=>({name:d.dictLabel,id:d.dictValue}))
|
|
|
|
|
+ resolve()
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ async handleMenuClick(item){
|
|
|
|
|
+ if(item.text==='编辑问卷'){
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
url:`/pagesHome/questionnaireEdit?teamQuestionnaireId=${this.dto.teamQuestionnaireId}&type=${this.dto.type}&questionnaireName=${this.dto.title}`
|
|
url:`/pagesHome/questionnaireEdit?teamQuestionnaireId=${this.dto.teamQuestionnaireId}&type=${this.dto.type}&questionnaireName=${this.dto.title}`
|
|
|
})
|
|
})
|
|
|
- }else if(type===1){
|
|
|
|
|
|
|
+ }else if(item.text==='分享问卷'){
|
|
|
|
|
|
|
|
- }else if(type===2) this.teamInfoShow = true
|
|
|
|
|
- else if(type===3) {
|
|
|
|
|
|
|
+ }else if(item.text==='团队信息'){
|
|
|
|
|
+ this.teamInfoShow = true;
|
|
|
|
|
+ await this.getTeamScaleData()
|
|
|
|
|
+ await this.getTeamHierarchyData()
|
|
|
|
|
+ this.$api.get(`/core/user/team/${this.dto.teamId}`).then(({data:res})=>{
|
|
|
|
|
+ if(res.code!==0) return this.$showToast(res.msg)
|
|
|
|
|
+ this.$refs.teamRef.setTeamInfo(res.data)
|
|
|
|
|
+ this.$refs.teamRef.teamInfo.functionIds = res.data.functions.map(f=>f.id);
|
|
|
|
|
+ this.$refs.teamRef.teamInfo.orgIds = res.data.organizations.map(o=>o.id);
|
|
|
|
|
+ this.$refs.teamRef.areaText = res.data.provinceName+res.data.cityName;
|
|
|
|
|
+ this.$refs.teamRef.industryText = res.data.industryName;
|
|
|
|
|
+ this.$refs.teamRef.functionTypeText = res.data.functions.map(f=>f.functionName).join('、');
|
|
|
|
|
+ this.$refs.teamRef.architectureTypeText = res.data.organizations.map(f=>f.orgName).join('、');
|
|
|
|
|
+ this.$refs.teamRef.teamScaleText = this.teamScaleData.find(d=>d.id==res.data.scale).name;
|
|
|
|
|
+ this.$refs.teamRef.teamLevelText = this.teamLevelData.find(d=>d.id==res.data.hierarchy).name;
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ else if(item.text==='复制链接') {
|
|
|
this.$showToast('复制成功')
|
|
this.$showToast('复制成功')
|
|
|
}
|
|
}
|
|
|
- else if(type===4) this.teamUserShow = true
|
|
|
|
|
- else if(type===5){
|
|
|
|
|
- this.$showToast('问卷未完成,全部团队人员作答后才能生成报告')
|
|
|
|
|
|
|
+ else if(item.text==='团队人员'){
|
|
|
|
|
+ this.$api.get(`/core/member/listByQueTeamId/${this.dto.teamQuestionnaireId}`).then(({data:res})=>{
|
|
|
|
|
+ if(res.code!==0) return this.$showToast(res.msg)
|
|
|
|
|
+ this.teamUserShow = true
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ else if(item.text==='生成报告'){
|
|
|
|
|
+ if(this.dto.status==0) return this.$showToast('问卷未完成,全部团队人员作答后才能生成报告')
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
- else if(type===6){
|
|
|
|
|
- this.alertShow = true;
|
|
|
|
|
|
|
+ else if(item.text==='发送报告'){
|
|
|
|
|
+ if(this.dto.status==0) return this.$showToast('请先生成报告后再进行发送报告')
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- handleConfirm(){
|
|
|
|
|
- this.teamInfoShow = false;
|
|
|
|
|
|
|
+ handleConfirm(data){
|
|
|
|
|
+ data.coachId = JSON.parse(uni.getStorageSync('userInfo')).id;
|
|
|
|
|
+ this.$api.put('/core/user/team',data).then(({data:res})=>{
|
|
|
|
|
+ if(res.code!==0) return this.$showToast(res.msg)
|
|
|
|
|
+ this.$showToast('保存成功')
|
|
|
|
|
+ this.teamInfoShow = false;
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
handleAnswer(item){
|
|
handleAnswer(item){
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|