|
@@ -25,12 +25,14 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="gbox-item-bottom adfacjb">
|
|
<view class="gbox-item-bottom adfacjb">
|
|
|
<view class="gbox-item-bottom-rightbox adfac" v-if="item.type==1">
|
|
<view class="gbox-item-bottom-rightbox adfac" v-if="item.type==1">
|
|
|
|
|
+ <view class="gbox-item-bottom-right" @click="openEvaluation(item)" v-if="canEditEvaluation(item)">评估修改</view>
|
|
|
<view class="gbox-item-bottom-right report-button-disabled" @click="showReportUnavailable('background')" v-if="item.state==1">背景报告</view>
|
|
<view class="gbox-item-bottom-right report-button-disabled" @click="showReportUnavailable('background')" v-if="item.state==1">背景报告</view>
|
|
|
<view class="gbox-item-bottom-right report-button-disabled" @click="showReportUnavailable('professional')" v-if="item.state==1">教练报告</view>
|
|
<view class="gbox-item-bottom-right report-button-disabled" @click="showReportUnavailable('professional')" v-if="item.state==1">教练报告</view>
|
|
|
<view class="gbox-item-bottom-right" @click="reviewArtifact(item, 'public')" v-if="item.state==1">团队报告</view>
|
|
<view class="gbox-item-bottom-right" @click="reviewArtifact(item, 'public')" 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 class="gbox-item-bottom-rightbox adfac" v-else-if="item.type==2">
|
|
<view class="gbox-item-bottom-rightbox adfac" v-else-if="item.type==2">
|
|
|
|
|
+ <view class="gbox-item-bottom-right" @click="openEvaluation(item)" v-if="canEditEvaluation(item)">评估修改</view>
|
|
|
<view class="gbox-item-bottom-right" @click="reviewArtifact(item, 'background')" v-if="item.state==1">背景报告</view>
|
|
<view class="gbox-item-bottom-right" @click="reviewArtifact(item, 'background')" v-if="item.state==1">背景报告</view>
|
|
|
<view class="gbox-item-bottom-right" @click="reviewArtifact(item, 'professional')" v-if="item.state==1">教练报告</view>
|
|
<view class="gbox-item-bottom-right" @click="reviewArtifact(item, 'professional')" v-if="item.state==1">教练报告</view>
|
|
|
<view class="gbox-item-bottom-right" @click="reviewArtifact(item, 'public')" v-if="item.state==1">团队报告</view>
|
|
<view class="gbox-item-bottom-right" @click="reviewArtifact(item, 'public')" v-if="item.state==1">团队报告</view>
|
|
@@ -56,6 +58,19 @@
|
|
|
<view class="kr-btn" @click="reportReminderShow=false">确定</view>
|
|
<view class="kr-btn" @click="reportReminderShow=false">确定</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view class="evaluation-mask adffcacjc" v-if="evaluationVisible">
|
|
|
|
|
+ <view class="evaluation-box">
|
|
|
|
|
+ <view class="kr-title">修改评估内容</view>
|
|
|
|
|
+ <view class="evaluation-label">总体评估结果</view>
|
|
|
|
|
+ <textarea class="evaluation-textarea" maxlength="20000" v-model="evaluationForm.overallAssessment" placeholder="请输入总体评估结果"></textarea>
|
|
|
|
|
+ <view class="evaluation-label">团队发展建议</view>
|
|
|
|
|
+ <textarea class="evaluation-textarea" maxlength="20000" v-model="evaluationForm.developmentAdvice" placeholder="请输入团队发展建议"></textarea>
|
|
|
|
|
+ <view class="evaluation-actions">
|
|
|
|
|
+ <view class="evaluation-cancel" @click="closeEvaluation">取消</view>
|
|
|
|
|
+ <view class="evaluation-submit" :class="{disabled:evaluationSubmitting}" @click="submitEvaluation">{{evaluationSubmitting?'提交中':'保存提交'}}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
<cus-select-team-user
|
|
<cus-select-team-user
|
|
|
ref="selectTeamUser"
|
|
ref="selectTeamUser"
|
|
|
:show="teamUserShow"
|
|
:show="teamUserShow"
|
|
@@ -71,6 +86,7 @@
|
|
|
<script>
|
|
<script>
|
|
|
import { getPlatformInfo } from '@/utils/platform.js';
|
|
import { getPlatformInfo } from '@/utils/platform.js';
|
|
|
import { reportArtifactUrl } from '@/utils/reportArtifactLinks.js'
|
|
import { reportArtifactUrl } from '@/utils/reportArtifactLinks.js'
|
|
|
|
|
+ import { canEditEvaluation, 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:{
|
|
@@ -104,7 +120,11 @@
|
|
|
selectItem:null,
|
|
selectItem:null,
|
|
|
testShow:false,
|
|
testShow:false,
|
|
|
reportReminderShow:false,
|
|
reportReminderShow:false,
|
|
|
- reportReminderMsg:''
|
|
|
|
|
|
|
+ reportReminderMsg:'',
|
|
|
|
|
+ evaluationVisible:false,
|
|
|
|
|
+ evaluationSubmitting:false,
|
|
|
|
|
+ evaluationReportId:'',
|
|
|
|
|
+ evaluationForm:{overallAssessment:'',developmentAdvice:''}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods:{
|
|
methods:{
|
|
@@ -175,6 +195,38 @@
|
|
|
: '教练报告需要配合团队版评估数据生成';
|
|
: '教练报告需要配合团队版评估数据生成';
|
|
|
this.reportReminderShow = true;
|
|
this.reportReminderShow = true;
|
|
|
},
|
|
},
|
|
|
|
|
+ canEditEvaluation(item){
|
|
|
|
|
+ return canEditEvaluation(item);
|
|
|
|
|
+ },
|
|
|
|
|
+ openEvaluation(item){
|
|
|
|
|
+ if(!this.canEditEvaluation(item)) return;
|
|
|
|
|
+ this.evaluationReportId = item.reportId;
|
|
|
|
|
+ this.evaluationSubmitting = false;
|
|
|
|
|
+ this.evaluationVisible = true;
|
|
|
|
|
+ this.$api.get('/core/report/evaluation/'+item.reportId).then(({data:res})=>{
|
|
|
|
|
+ if(res.code!==0){ this.closeEvaluation(); return this.$showToast(res.msg); }
|
|
|
|
|
+ if(res.data && res.data.processing){ this.closeEvaluation(); return this.$showToast('评估分析正在重新生成中,请稍候'); }
|
|
|
|
|
+ this.evaluationForm = normalizeEvaluationForm(res.data || {});
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ closeEvaluation(){
|
|
|
|
|
+ if(this.evaluationSubmitting) return;
|
|
|
|
|
+ this.evaluationVisible = false;
|
|
|
|
|
+ this.evaluationReportId = '';
|
|
|
|
|
+ },
|
|
|
|
|
+ submitEvaluation(){
|
|
|
|
|
+ if(this.evaluationSubmitting) return;
|
|
|
|
|
+ if(!this.evaluationForm.overallAssessment.trim()) return this.$showToast('请输入总体评估结果');
|
|
|
|
|
+ if(!this.evaluationForm.developmentAdvice.trim()) return this.$showToast('请输入团队发展建议');
|
|
|
|
|
+ this.evaluationSubmitting = true;
|
|
|
|
|
+ this.$api.post('/core/report/evaluation/'+this.evaluationReportId, this.evaluationForm).then(({data:res})=>{
|
|
|
|
|
+ if(res.code!==0) return this.$showToast(res.msg);
|
|
|
|
|
+ this.evaluationVisible = false;
|
|
|
|
|
+ this.$emit('reSendReport');
|
|
|
|
|
+ this.reportReminderMsg = EVALUATION_PROCESSING_PROMPT;
|
|
|
|
|
+ this.reportReminderShow = true;
|
|
|
|
|
+ }).finally(()=>{ this.evaluationSubmitting = false; });
|
|
|
|
|
+ },
|
|
|
sendConfirm(){
|
|
sendConfirm(){
|
|
|
if(this.teamUserList.filter(t=>t.select).length===0) return this.$showToast('请选择要发送的用户')
|
|
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('发送前请先在我的-设置-用户信息中绑定邮箱')
|
|
@@ -427,7 +479,7 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .kind-reminder{
|
|
|
|
|
|
|
+ .kind-reminder{
|
|
|
position: fixed;
|
|
position: fixed;
|
|
|
left: 0;
|
|
left: 0;
|
|
|
right: 0;
|
|
right: 0;
|
|
@@ -485,5 +537,12 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ .evaluation-mask{position:fixed;left:0;right:0;top:0;bottom:0;z-index:30;background:rgba(0,0,0,.45);}
|
|
|
|
|
+ .evaluation-box{width:650rpx;background:#fff;border-radius:16rpx;padding:34rpx 28rpx 26rpx;box-sizing:border-box;}
|
|
|
|
|
+ .evaluation-label{font-size:28rpx;font-weight:bold;color:#333;margin:18rpx 0 12rpx;}
|
|
|
|
|
+ .evaluation-textarea{width:100%;height:180rpx;box-sizing:border-box;background:#f7f7f7;border-radius:8rpx;padding:18rpx;font-size:26rpx;color:#333;}
|
|
|
|
|
+ .evaluation-actions{display:flex;justify-content:flex-end;gap:20rpx;margin-top:28rpx;}
|
|
|
|
|
+ .evaluation-cancel,.evaluation-submit{padding:18rpx 28rpx;border-radius:10rpx;font-size:28rpx;}
|
|
|
|
|
+ .evaluation-cancel{color:#666;background:#f2f2f2;}.evaluation-submit{color:#fff;background:#833478;}.evaluation-submit.disabled{opacity:.5;}
|
|
|
</style>
|
|
</style>
|