liuhj 1 месяц назад
Родитель
Сommit
84676cfe8e
1 измененных файлов с 10 добавлено и 3 удалено
  1. 10 3
      src/components/OP/performanceanalysis.vue

+ 10 - 3
src/components/OP/performanceanalysis.vue

@@ -31,7 +31,7 @@
             <div class="performanceanalysis-haed">
                 <div class="performanceanalysis-haed-li">
                     <label>月份选择:</label>
-                    <el-date-picker style="width:250px" size="small" v-model="months" type="month" placeholder="选择月">
+                    <el-date-picker @change="AiPerformanceAnalysis_UserList" style="width:250px" size="small" v-model="months" type="month" placeholder="选择月">
                     </el-date-picker>
                     <!-- <el-date-picker style="width:250px" size="small" v-model="datevalue" type="daterange" align="right"
                         unlink-panels range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
@@ -47,7 +47,7 @@
                 </div>
             </div>
             <div>
-                <el-button size="small" type="primary">导出全年分析</el-button>
+                <!-- <el-button size="small" type="primary">导出全年分析</el-button> -->
             </div>
         </div>
         <div class="performanceanalysis-table">
@@ -68,7 +68,8 @@
                     <template slot-scope="scope">
                         <el-button type="primary" @click="AiPerformanceAnalysis_GroupStatistics(scope.row,'生成')"
                             size="mini">生成AI分析</el-button>
-                        <el-button type="primary" @click="AiPerformanceAnalysis_GroupStatistics(scope.row,'查看')" size="mini">查看分析</el-button>
+                        <el-button v-if="scope.row.hasPerformanceData" type="success" @click="AiPerformanceAnalysis_GroupStatistics(scope.row,'查看')" size="mini">查看分析</el-button>
+                        <el-button v-else type="primary" @click="AiPerformanceAnalysis_GroupStatistics(scope.row,'查看')" size="mini">查看分析</el-button>
                         <el-button type="primary" @click="AiPerformanceAnalysis_JobMarketingFileDown(scope.row)" size="mini">下载</el-button>
                     </template>
                 </el-table-column>
@@ -165,6 +166,9 @@ export default {
         },
         //获取renyuan详情
         AiPerformanceAnalysis_UserList(){
+            var new_year = this.months.getFullYear()
+            var month = this.months.getMonth();
+            var new_month = month + 1;
             var url = "/api/PersonnelModule/AiPerformanceAnalysis_UserList"
             var that = this
             this.$axios({
@@ -178,6 +182,8 @@ export default {
                     pageIndex:that.currentPage,
                     pageSize:that.pagesize,
                     screeningCriteria:that.value,
+                    year:new_year,
+                    month:new_month,
                 }
             }).then(function (res) {
                 if(res.data.code==200){
@@ -375,6 +381,7 @@ export default {
         }
     },
     mounted(){
+        this.months=new Date();
         this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
         this.AiPerformanceAnalysis_UserList();
     }