|
@@ -40,8 +40,9 @@
|
|
|
<view class="gbox-item-bottom-right" @click="sendReport(item)" v-if="item.state!=-1">发送报告</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-if="item.state==-1">重新生成</view>
|
|
<view class="gbox-item-bottom-right" @click="reSendReport(item)" v-if="item.state==-1">重新生成</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="gbox-item-generating-mask" v-if="isReportGenerating(item)" @click.stop="showGeneratingReminder"></view>
|
|
|
|
|
+ </view>
|
|
|
</u-list-item>
|
|
</u-list-item>
|
|
|
</u-list>
|
|
</u-list>
|
|
|
<view class="kind-reminder adffcacjc" v-if="testShow">
|
|
<view class="kind-reminder adffcacjc" v-if="testShow">
|
|
@@ -86,7 +87,7 @@
|
|
|
<script>
|
|
<script>
|
|
|
import { getPlatformInfo } from '@/utils/platform.js';
|
|
import { getPlatformInfo } from '@/utils/platform.js';
|
|
|
import { reportArtifactUrl, reportArtifactDownloadUrl } from '@/utils/reportArtifactLinks.js'
|
|
import { reportArtifactUrl, reportArtifactDownloadUrl } from '@/utils/reportArtifactLinks.js'
|
|
|
- import { canEditEvaluation, EVALUATION_PROCESSING_PROMPT, normalizeEvaluationForm } from '@/utils/reportEvaluationEdit.js'
|
|
|
|
|
|
|
+ import { canEditEvaluation, isReportGenerating, EVALUATION_PROCESSING_PROMPT, normalizeEvaluationForm } from '@/utils/reportEvaluationEdit.js'
|
|
|
import CusSelectTeamUser from '@/components/CusSelectTeamUser/index.vue'
|
|
import CusSelectTeamUser from '@/components/CusSelectTeamUser/index.vue'
|
|
|
export default {
|
|
export default {
|
|
|
props:{
|
|
props:{
|
|
@@ -127,7 +128,18 @@
|
|
|
evaluationForm:{overallAssessment:'',developmentAdvice:''}
|
|
evaluationForm:{overallAssessment:'',developmentAdvice:''}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- methods:{
|
|
|
|
|
|
|
+ methods:{
|
|
|
|
|
+ isReportGenerating(item){
|
|
|
|
|
+ return isReportGenerating(item);
|
|
|
|
|
+ },
|
|
|
|
|
+ showGeneratingReminder(){
|
|
|
|
|
+ this.$showToast('报告正在生成中,暂不可操作,请稍候。');
|
|
|
|
|
+ },
|
|
|
|
|
+ guardReportOperation(item){
|
|
|
|
|
+ if(!this.isReportGenerating(item)) return true;
|
|
|
|
|
+ this.showGeneratingReminder();
|
|
|
|
|
+ return false;
|
|
|
|
|
+ },
|
|
|
scrolltolower(){
|
|
scrolltolower(){
|
|
|
this.$emit('scrolltolower')
|
|
this.$emit('scrolltolower')
|
|
|
},
|
|
},
|
|
@@ -140,8 +152,9 @@
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- async forwardReport(item){
|
|
|
|
|
- //发送给账号自己的邮箱
|
|
|
|
|
|
|
+ async forwardReport(item){
|
|
|
|
|
+ if(!this.guardReportOperation(item)) return;
|
|
|
|
|
+ //发送给账号自己的邮箱
|
|
|
if(!uni.getStorageSync('userInfo')||!JSON.parse(uni.getStorageSync('userInfo')).email) return this.$showModal('发送邮件前请先在我的-设置-用户信息中绑定邮箱')
|
|
if(!uni.getStorageSync('userInfo')||!JSON.parse(uni.getStorageSync('userInfo')).email) return this.$showModal('发送邮件前请先在我的-设置-用户信息中绑定邮箱')
|
|
|
uni.showModal({
|
|
uni.showModal({
|
|
|
title:'温馨提示',
|
|
title:'温馨提示',
|
|
@@ -199,6 +212,7 @@
|
|
|
return canEditEvaluation(item);
|
|
return canEditEvaluation(item);
|
|
|
},
|
|
},
|
|
|
openEvaluation(item){
|
|
openEvaluation(item){
|
|
|
|
|
+ if(!this.guardReportOperation(item)) return;
|
|
|
if(!this.canEditEvaluation(item)) return;
|
|
if(!this.canEditEvaluation(item)) return;
|
|
|
this.evaluationReportId = item.reportId;
|
|
this.evaluationReportId = item.reportId;
|
|
|
this.evaluationSubmitting = false;
|
|
this.evaluationSubmitting = false;
|
|
@@ -228,7 +242,8 @@
|
|
|
}).finally(()=>{ this.evaluationSubmitting = false; });
|
|
}).finally(()=>{ this.evaluationSubmitting = false; });
|
|
|
},
|
|
},
|
|
|
sendConfirm(){
|
|
sendConfirm(){
|
|
|
- if(this.teamUserList.filter(t=>t.select).length===0) return this.$showToast('请选择要发送的用户')
|
|
|
|
|
|
|
+ if(!this.guardReportOperation(this.selectItem)) return;
|
|
|
|
|
+ if(this.teamUserList.filter(t=>t.select).length===0) return this.$showToast('请选择要发送的用户')
|
|
|
if(this.sendType===1&&(!uni.getStorageSync('userInfo')||!JSON.parse(uni.getStorageSync('userInfo')).email)) return this.$showModal('发送前请先在我的-设置-用户信息中绑定邮箱')
|
|
if(this.sendType===1&&(!uni.getStorageSync('userInfo')||!JSON.parse(uni.getStorageSync('userInfo')).email)) return this.$showModal('发送前请先在我的-设置-用户信息中绑定邮箱')
|
|
|
|
|
|
|
|
if(this.sendType===1){
|
|
if(this.sendType===1){
|
|
@@ -261,6 +276,7 @@
|
|
|
this.$refs.selectTeamUser.selectAll = false;
|
|
this.$refs.selectTeamUser.selectAll = false;
|
|
|
},
|
|
},
|
|
|
reviewArtifact(item, kind){
|
|
reviewArtifact(item, kind){
|
|
|
|
|
+ if(!this.guardReportOperation(item)) return;
|
|
|
const url = reportArtifactUrl(item, kind)
|
|
const url = reportArtifactUrl(item, kind)
|
|
|
if(!url) return this.$showToast('该报告尚未生成,请稍后再试。')
|
|
if(!url) return this.$showToast('该报告尚未生成,请稍后再试。')
|
|
|
const { isPC, isMobile, platform } = getPlatformInfo();
|
|
const { isPC, isMobile, platform } = getPlatformInfo();
|
|
@@ -310,13 +326,15 @@
|
|
|
const path = (fileUrl || '').split('?')[0].toLowerCase()
|
|
const path = (fileUrl || '').split('?')[0].toLowerCase()
|
|
|
return path.endsWith('.docx') ? 'docx' : 'pdf'
|
|
return path.endsWith('.docx') ? 'docx' : 'pdf'
|
|
|
},
|
|
},
|
|
|
- askReport(item){
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
|
|
|
+ askReport(item){
|
|
|
|
|
+ if(!this.guardReportOperation(item)) return;
|
|
|
|
|
+ uni.navigateTo({
|
|
|
url:`/pages/reportAsk?pdfUrl=${item.fileUrl}&fileName=${this.typeCfg[item.type]||'个人版'}-${item.reportName}`
|
|
url:`/pages/reportAsk?pdfUrl=${item.fileUrl}&fileName=${this.typeCfg[item.type]||'个人版'}-${item.reportName}`
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- async sendReport(item){
|
|
|
|
|
- if(!item.fileUrl) return this.$showModal('该报告尚未生成PDF文件,请等待生成后发送。')
|
|
|
|
|
|
|
+ async sendReport(item){
|
|
|
|
|
+ if(!this.guardReportOperation(item)) return;
|
|
|
|
|
+ if(!item.fileUrl) return this.$showModal('该报告尚未生成PDF文件,请等待生成后发送。')
|
|
|
|
|
|
|
|
this.sendType = 2;
|
|
this.sendType = 2;
|
|
|
this.$refs.selectTeamUser.title = '发送报告'
|
|
this.$refs.selectTeamUser.title = '发送报告'
|
|
@@ -332,8 +350,9 @@
|
|
|
this.teamUserShow = true;
|
|
this.teamUserShow = true;
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- reSendReport(item){
|
|
|
|
|
- this.$api.get(`/core/report/regenerateReport/${item.reportId}`).then(({data:res})=>{
|
|
|
|
|
|
|
+ reSendReport(item){
|
|
|
|
|
+ if(!this.guardReportOperation(item)) return;
|
|
|
|
|
+ this.$api.get(`/core/report/regenerateReport/${item.reportId}`).then(({data:res})=>{
|
|
|
if(res.code!==0) return this.$showToast(res.msg)
|
|
if(res.code!==0) return this.$showToast(res.msg)
|
|
|
this.$emit('reSendReport')
|
|
this.$emit('reSendReport')
|
|
|
})
|
|
})
|
|
@@ -346,12 +365,24 @@
|
|
|
@import '../../../static/_asset-config';
|
|
@import '../../../static/_asset-config';
|
|
|
.gbox{
|
|
.gbox{
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
- &-item{
|
|
|
|
|
- margin-top: 20rpx;
|
|
|
|
|
- background: #FFFFFF;
|
|
|
|
|
- border-radius: 24rpx;
|
|
|
|
|
- padding: 40rpx 20rpx 20rpx;
|
|
|
|
|
- &-top{
|
|
|
|
|
|
|
+ &-item{
|
|
|
|
|
+ margin-top: 20rpx;
|
|
|
|
|
+ background: #FFFFFF;
|
|
|
|
|
+ border-radius: 24rpx;
|
|
|
|
|
+ padding: 40rpx 20rpx 20rpx;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+
|
|
|
|
|
+ &-generating-mask{
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ right: 0;
|
|
|
|
|
+ top: 0;
|
|
|
|
|
+ bottom: 0;
|
|
|
|
|
+ z-index: 10;
|
|
|
|
|
+ border-radius: 24rpx;
|
|
|
|
|
+ background: rgba(255, 255, 255, .35);
|
|
|
|
|
+ }
|
|
|
|
|
+ &-top{
|
|
|
&-type{
|
|
&-type{
|
|
|
width: 98rpx;
|
|
width: 98rpx;
|
|
|
height: 36rpx;
|
|
height: 36rpx;
|