Pārlūkot izejas kodu

商邀ai绩效生成、下载、查看

liuhj 5 dienas atpakaļ
vecāks
revīzija
f8adec1241
1 mainītis faili ar 39 papildinājumiem un 0 dzēšanām
  1. 39 0
      src/components/OP/performanceanalysis.vue

+ 39 - 0
src/components/OP/performanceanalysis.vue

@@ -554,6 +554,31 @@ export default {
                 }
             })
         },
+        //生成商邀绩效
+        AiPerformanceAnalysis_BusinessInvitation(val){
+            var url = "/api/PersonnelModule/AiPerformanceAnalysis_BusinessInvitation?userId="+val.id+"&start="+this.datetime(this.months[0])+"&end="+this.datetime(this.months[1])+"&createUserId="+this.userId
+            var that = this
+            this.$axios({
+                method: 'get',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer '
+                }
+            }).then(function (res) {
+                if(res.data.code==200){
+                    that.performanLoading=false;
+                    that.AIVisible=true;
+                    if (that.$marked && typeof that.$marked === 'function') {
+                        that.marktext = that.$marked(res.data.data.answer+that.texehr);
+                        that.marktexts = that.$marked(res.data.data.kaoqinAnswer);
+                    }
+                    that.AiPerformanceAnalysis_UserList();
+                }else{
+                    that.performanLoading=false;
+                    that.$message.error(res.data.msg);
+                }
+            })
+        },
         //生成市场部绩效
         MarketingDepartment(val,text){
             var new_year = this.months[0].getFullYear()
@@ -669,6 +694,20 @@ export default {
                 }
                 return
             }
+            if (val.jobName=='商邀') {
+                this.performanLoading=true;
+                if(text=='查看'){
+                    if (val.hasPerformanceData==false) {
+                        this.performanLoading=false;
+                        this.$message.error('该用户尚未生成AI绩效分析,请先生成!');
+                        return
+                    }
+                    this.AiPerformanceAnalysis_Query(val)
+                }else{
+                    this.AiPerformanceAnalysis_BusinessInvitation(val);
+                }
+                return
+            }
             if (val.depName=='信息部') {
                 this.performanLoading=true;
                 if(text=='查看'){