dedsudiyu 1 주 전
부모
커밋
592a6eaf54

+ 9 - 1
src/api/creditViolation/newIndex.js

@@ -1,6 +1,6 @@
 import request from '@/utils/request'
 
-//个人违规记录列表
+//违规列表-历史记录
 export function creditFoulsHis(data) {
   return request({
     url: '/credit/fouls/his',
@@ -97,4 +97,12 @@ export function creditMainGetUserCre(data) {
     data: data
   })
 }
+//个人-违规记录
+export function creditFoulsPersonal(data) {
+  return request({
+    url: '/credit/fouls/personal',
+    method: 'post',
+    data: data
+  })
+}
 

+ 0 - 2
src/views/creditViolation/credit/pointsRecord/index.vue

@@ -42,11 +42,9 @@
             <div class="table-button-box">
               <p class="table-button-null"></p>
               <p class="table-button-p"
-                 v-hasPermiRouter="['points:record:creditscore']"
                  @click="goPage(2,scope.row)"
               >信用分明细</p>
               <p class="table-button-p"
-                 v-hasPermiRouter="['points:record:bonuspoints']"
                  @click="goPage(3,scope.row)"
               >奖励分明细</p>
               <p class="table-button-null"></p>

+ 5 - 9
src/views/creditViolation/credit/violation/index.vue

@@ -66,17 +66,13 @@
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
                    @click="goPage(2,scope.row)"
-                   v-hasPermiRouter="['exam:violationHistory:list']"
                 >历史记录</p>
                 <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)">
                   <p class="table-button-p">更多>></p>
                   <el-dropdown-menu slot="dropdown">
-                    <el-dropdown-item command="1" v-show="scope.row.status == 2"
-                                      v-hasPermiRouter="['credit:blacklists:del']">移除黑名单</el-dropdown-item>
-                    <el-dropdown-item command="2" v-show="scope.row.status == 0 || scope.row.status == 1"
-                                      v-hasPermiRouter="['credit:blacklists:add']">加入黑名单</el-dropdown-item>
-                    <el-dropdown-item command="3" v-show="scope.row.status == 1"
-                                      v-hasPermiRouter="['credit:blacklists:del']">移除负面清单</el-dropdown-item>
+                    <el-dropdown-item command="1" v-show="scope.row.status == 2">移除黑名单</el-dropdown-item>
+                    <el-dropdown-item command="2" v-show="scope.row.status == 0 || scope.row.status == 1">加入黑名单</el-dropdown-item>
+                    <el-dropdown-item command="3" v-show="scope.row.status == 1">移除负面清单</el-dropdown-item>
                   </el-dropdown-menu>
                 </el-dropdown>
                 <p class="table-button-null"></p>
@@ -372,7 +368,7 @@
 </template>
 
 <script>
-  import { creditFoulsAdd,creditFoulsList,creditFoulsAddBlacklists } from "@/api/creditViolation/newIndex";
+  import { creditFoulsAdd,creditFoulsList,creditFoulsAddBlacklists, } from "@/api/creditViolation/newIndex";
   import { delNegivelist,delBlacklist,blackAdd,
     getViolation, delViolation, addViolation, updateViolation,joinBlackList,
     getIntegralMatchingRules,addBlacklist } from "@/api/creditViolation/index";
@@ -683,7 +679,7 @@ export default {
           this.pageType = type;
           this.getList();
         }else if(type == 2){
-          this.propsData.joinUserId = row.joinUserId;
+          this.propsData.identity = row.identity;
           this.pageType = type;
         }
       }

+ 22 - 34
src/views/creditViolation/credit/violation/violationInfo.vue

@@ -8,8 +8,8 @@
     <div class="page-container">
       <div class="page-form-title-box" style="border:none;">
         <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-          <el-form-item label="" prop="overStatus">
-            <el-select v-model="queryParams.overStatus" clearable placeholder="请选择状态">
+          <el-form-item label="" prop="status">
+            <el-select v-model="queryParams.status" clearable placeholder="请选择状态">
               <el-option
                 v-for="dict in bonusTypeOptions"
                 :key="dict.id"
@@ -37,45 +37,34 @@
       </div>
       <div class="page-content-box" style="padding-top:0;">
         <el-table class="table-box" v-loading="loading" border :data="recordList">
-          <el-table-column label="姓名" align="left" prop="joinUserName" width="120" show-overflow-tooltip/>
-          <el-table-column label="违规原因" align="left" prop="reason" show-overflow-tooltip/>
-          <el-table-column label="实验室" align="left" prop="subjectName"  width="200" show-overflow-tooltip/>
-          <el-table-column label="添加人" align="left"  prop="createByName"  width="120" show-overflow-tooltip/>
+          <el-table-column label="姓名" align="left" prop="name" width="120" show-overflow-tooltip/>
+          <el-table-column label="违规原因" align="left" prop="foulsName" show-overflow-tooltip/>
+          <el-table-column label="实验室" align="left" prop="labName"  width="200" show-overflow-tooltip/>
+          <el-table-column label="添加人" align="left"  prop="createBy"  width="120" show-overflow-tooltip/>
           <el-table-column label="添加时间" align="left"  prop="createTime"  width="160" show-overflow-tooltip>
             <template slot-scope="scope">
               <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="扣分值" align="left"  prop="deductionVal" width="100" show-overflow-tooltip>
+          <el-table-column label="扣分值" align="left"  prop="reduceScore" width="100" show-overflow-tooltip>
             <template slot-scope="scope">
-              <span style="color:#FF3131;">-{{scope.row.deductionVal}}</span>
+              <span style="color:#FF3131;">-{{scope.row.reduceScore}}</span>
             </template>
           </el-table-column>
-          <el-table-column label="处理方式" align="left"  prop="treatmentMethod" width="180" show-overflow-tooltip/>
-          <el-table-column label="处理状态" align="left" width="310" show-overflow-tooltip>
+          <el-table-column label="处理方式" align="left"  prop="meansCollect" width="180" show-overflow-tooltip/>
+          <el-table-column label="处理状态" align="left" width="100" show-overflow-tooltip>
             <template slot-scope="scope">
-              <div style="display: flex">
-                <div class="scope-big-box" v-if="scope.row.learnStatus == 0 || scope.row.learnStatus == 1 || scope.row.learnStatus == 2">
-                  <p>学习</p>
-                  <p :class="scope.row.learnStatus == 0 ?'scopeColorA':(scope.row.learnStatus == 1 ?'scopeColorB':(scope.row.learnStatus == 2 ?'scopeColorC':''))">{{scope.row.learnStatus == 0 ?'未完成':(scope.row.learnStatus == 1 ?'已完成':(scope.row.learnStatus == 2 ?'已恢复':''))}}</p>
-                </div>
-                <div style="margin-left:10px;" class="scope-big-box" v-if="scope.row.practiceStatus == 0 || scope.row.practiceStatus == 1 || scope.row.practiceStatus == 2">
-                  <p>做题</p>
-                  <p :class="scope.row.practiceStatus == 0 ?'scopeColorA':(scope.row.practiceStatus == 1 ?'scopeColorB':(scope.row.practiceStatus == 2 ?'scopeColorC':''))">{{scope.row.practiceStatus == 0 ?'未完成':(scope.row.practiceStatus == 1 ?'已完成':(scope.row.practiceStatus == 2 ?'已恢复':''))}}</p>
-                </div>
-                <div style="margin-left:10px;" class="scope-big-box" v-if="scope.row.testStatus == 0 || scope.row.testStatus == 1 || scope.row.testStatus == 2">
-                  <p>考试</p>
-                  <p :class="scope.row.testStatus == 0 ?'scopeColorA':(scope.row.testStatus == 1 ?'scopeColorB':(scope.row.testStatus == 2 ?'scopeColorC':''))">{{scope.row.testStatus == 0 ?'未完成':(scope.row.testStatus == 1 ?'已完成':(scope.row.testStatus == 2 ?'已恢复':''))}}</p>
-                </div>
+              <div class="scope-big-box">
+                <span style="margin:0 auto;text-align: center" :class="scope.row.count==0?'scopeColorB':'scopeColorA'">{{scope.row.count==0?'已完成':'未完成'}}</span>
               </div>
             </template>
           </el-table-column>
-          <el-table-column label="处理截止日期" align="left"  prop="handleDay" width="160" show-overflow-tooltip>
+          <el-table-column label="处理截止日期" align="left"  prop="deadline" width="160" show-overflow-tooltip>
             <template slot-scope="scope">
-              <span>{{ parseTime(scope.row.handleDay,"{y}-{m}-{d} {h}:{i}") }}</span>
+              <span>{{ parseTime(scope.row.deadline,"{y}-{m}-{d} {h}:{i}") }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="信用分" align="left"  prop="creditScore" width="100" show-overflow-tooltip/>
+          <el-table-column label="信用分" align="left"  prop="scoreCredit" width="100" show-overflow-tooltip/>
         </el-table>
         <pagination :page-sizes="[20, 30, 40, 50]"
                     v-show="total>0"
@@ -91,7 +80,7 @@
 </template>
 
 <script>
-  import { examViolationHistoryList,getSemesterList } from "@/api/creditViolation/index";
+  import { creditFoulsHis } from "@/api/creditViolation/newIndex";
   export default {
     props:{
       propsData:{},
@@ -107,13 +96,12 @@
         queryParams: {
           page: 1,
           pageSize:20,
-          overStatus: null,
+          status: null,
         },
         //状态条件
         bonusTypeOptions:[
-          {id:1,name:"已完成"},
-          {id:0,name:"未完成"},
-          {id:2,name:"已恢复"},
+          {id:0,name:"已完成"},
+          {id:1,name:"未完成"},
         ],
         //列表数据
         recordList:[],
@@ -141,8 +129,8 @@
           obj.startTime=null;
           obj.endTime=null
         }
-        obj.joinUserId = this.propsData.joinUserId;
-        examViolationHistoryList(obj).then( response => {
+        obj.identity = this.propsData.identity;
+        creditFoulsHis(obj).then( response => {
           this.$set(this,'recordList',response.data.records);
           this.$set(this,'total',response.data.total);
           this.loading = false;
@@ -159,7 +147,7 @@
         this.$set(this,'queryParams',{
           page: 1,
           pageSize:20,
-          overStatus: null,
+          status: null,
         });
         this.handleQuery();
       },

+ 16 - 32
src/views/creditViolation/myViolation/violation_my/index.vue

@@ -44,45 +44,30 @@
     </div>
     <div class="page-content-box">
       <el-table class="table-box" v-loading="loading" border :data="violationList">
-        <el-table-column label="违规类型" align="left" prop="reason"  width="100" show-overflow-tooltip>
-          <template slot-scope="scope">
-            {{scope.row.violationType == 'negative' ?'负面清单':(scope.row.violationType == 2 ?'黑名单':'')}}
-          </template>
-        </el-table-column>
-        <el-table-column label="违规原因" align="left" prop="reason"  width="300" show-overflow-tooltip/>
-        <el-table-column label="实验室" align="left" prop="subjectName" show-overflow-tooltip width="200"/>
-        <el-table-column label="添加人" align="left" prop="createByName" width="140" show-overflow-tooltip/>
+        <el-table-column label="违规类型" align="left" prop="foulsType"  width="100" show-overflow-tooltip/>
+        <el-table-column label="违规原因" align="left" prop="foulsName"  show-overflow-tooltip/>
+        <el-table-column label="实验室" align="left" prop="labName" show-overflow-tooltip width="200"/>
+        <el-table-column label="添加人" align="left" prop="createBy" width="140" show-overflow-tooltip/>
         <el-table-column label="创建时间" align="left" prop="createTime" width="200" show-overflow-tooltip>
           <template slot-scope="scope">
             {{parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}")}}
           </template>
         </el-table-column>
-        <el-table-column label="扣分值" align="left"  prop="deductionVal" width="100" show-overflow-tooltip/>
-        <el-table-column label="处理方式" align="left"  prop="treatmentMethod" width="180" show-overflow-tooltip/>
-        <el-table-column label="处理状态" align="left" width="310" show-overflow-tooltip>
+        <el-table-column label="扣分值" align="left"  prop="reduceScore" width="100" show-overflow-tooltip/>
+        <el-table-column label="处理方式" align="left"  prop="meansCollect" width="180" show-overflow-tooltip/>
+        <el-table-column label="处理状态" align="left" prop="count" width="110" show-overflow-tooltip>
           <template slot-scope="scope">
-            <div style="display: flex">
-              <div class="scope-big-box" v-if="scope.row.learnStatus == 0 || scope.row.learnStatus == 1 || scope.row.learnStatus == 2">
-                <p>学习</p>
-                <p :class="scope.row.learnStatus == 0 ?'scopeColorA':(scope.row.learnStatus == 1 ?'scopeColorB':(scope.row.learnStatus == 2 ?'scopeColorC':''))">{{scope.row.learnStatus == 0 ?'未完成':(scope.row.learnStatus == 1 ?'已完成':(scope.row.learnStatus == 2 ?'已恢复':''))}}</p>
-              </div>
-              <div style="margin-left:10px;" class="scope-big-box" v-if="scope.row.testStatus == 0 || scope.row.testStatus == 1 || scope.row.testStatus == 2">
-                <p>考试</p>
-                <p :class="scope.row.testStatus == 0 ?'scopeColorA':(scope.row.testStatus == 1 ?'scopeColorB':(scope.row.testStatus == 2 ?'scopeColorC':''))">{{scope.row.testStatus == 0 ?'未完成':(scope.row.testStatus == 1 ?'已完成':(scope.row.testStatus == 2 ?'已恢复':''))}}</p>
-              </div>
-              <div style="margin-left:10px;" class="scope-big-box" v-if="scope.row.practiceStatus == 0 || scope.row.practiceStatus == 1 || scope.row.practiceStatus == 2">
-                <p>做题</p>
-                <p :class="scope.row.practiceStatus == 0 ?'scopeColorA':(scope.row.practiceStatus == 1 ?'scopeColorB':(scope.row.practiceStatus == 2 ?'scopeColorC':''))">{{scope.row.practiceStatus == 0 ?'未完成':(scope.row.practiceStatus == 1 ?'已完成':(scope.row.practiceStatus == 2 ?'已恢复':''))}}</p>
-              </div>
+            <div class="scope-big-box">
+              <span style="margin:0 auto;text-align: center" :class="scope.row.count==0?'scopeColorB':'scopeColorA'">{{scope.row.count==0?'已完成':'未完成'}}</span>
             </div>
           </template>
         </el-table-column>
-        <el-table-column label="处理截止日期" align="left"  prop="handleDayTime" width="160" show-overflow-tooltip>
+        <el-table-column label="处理截止日期" align="left"  prop="deadline" width="160" show-overflow-tooltip>
           <template slot-scope="scope">
-            {{parseTime(scope.row.handleDayTime,"{y}-{m}-{d} {h}:{i}")}}
+            {{parseTime(scope.row.deadline,"{y}-{m}-{d} {h}:{i}")}}
           </template>
         </el-table-column>
-        <el-table-column label="信用分" align="left"  prop="creditScore" width="100" show-overflow-tooltip/>
+        <el-table-column label="信用分" align="left"  prop="scoreCredit" width="100" show-overflow-tooltip/>
       </el-table>
       <pagination :page-sizes="[20, 30, 40, 50]"
                   v-show="total>0"
@@ -97,7 +82,7 @@
 </template>
 
 <script>
-import { creditFoulsHis } from "@/api/creditViolation/newIndex";
+import { creditFoulsPersonal } from "@/api/creditViolation/newIndex";
 
 export default {
   name: "Violation",
@@ -132,9 +117,8 @@ export default {
       rules: {},
       //状态条件
       bonusTypeOptions:[
-        {id:1,name:"已完成"},
-        {id:0,name:"未完成"},
-        {id:2,name:"已恢复"},
+        {id:0,name:"已完成"},
+        {id:1,name:"未完成"},
       ],
       //学期
       semesterList:[
@@ -183,7 +167,7 @@ export default {
         obj.startTime=null;
         obj.endTime=null
       }
-      creditFoulsHis(obj).then(response => {
+      creditFoulsPersonal(obj).then(response => {
         this.violationList = response.data.records;
         this.total = response.data.total;
         this.loading = false;

+ 16 - 15
src/views/creditViolation/record_my/index.vue

@@ -9,7 +9,7 @@
     </div>
     <div class="bottom-el-table">
       <div class="user-info-box">
-        <img class="user-img" :src="userData.avatar" v-if="userData.avatar">
+        <img class="user-img" :src="userData.avatar" v-if="userItem.avatar">
         <img class="user-img" src="@/assets/ZDimages/basicsModules/tx_cion.png" v-else>
         <div class="user-info-min">
           <div class="user-info-min-top">
@@ -19,27 +19,27 @@
           <div class="user-info-min-bottom" v-if="queryParams.pointsType == 1">
             <div>
               <p>获得总奖励分:</p>
-              <p class="num-color-one">{{userData.totalAwadScore}}</p>
+              <p class="num-color-one">{{userData.awadTotalScore}}</p>
             </div>
             <div>
               <p>已扣减奖励分:</p>
-              <p class="num-color-two">{{userData.redeemedScore}}</p>
+              <p class="num-color-two">{{userData.awadRedeemedScore}}</p>
             </div>
           </div>
           <div class="user-info-min-bottom" v-if="queryParams.pointsType == 2">
             <div>
               <p>总信用分:</p>
-              <p class="num-color-one">{{userData.totalCreditScore}}</p>
+              <p class="num-color-one">{{userData.creditTotalScore}}</p>
             </div>
             <div>
               <p>已扣减信用分:</p>
-              <p class="num-color-two">{{userData.redeemedScore}}</p>
+              <p class="num-color-two">{{userData.creditRedeemedScore}}</p>
             </div>
           </div>
         </div>
         <div class="user-info-num">
           <div class="user-info-num-min">
-            <p class="user-info-num-p user-info-num-color-b">{{userData.remainingScore}}</p>
+            <p class="user-info-num-p user-info-num-color-b">{{userData.creditRemainingScore}}</p>
             <div>
               <img src="@/assets/ZDimages/creditViolation/icon_27.png">
               <p>信用分</p>
@@ -47,7 +47,7 @@
           </div>
           <p class="user-info-num-null"></p>
           <div class="user-info-num-min">
-            <p class="user-info-num-p user-info-num-color-a">{{userData.remainingScore}}</p>
+            <p class="user-info-num-p user-info-num-color-a">{{userData.awadRemainingScore}}</p>
             <div>
               <img src="@/assets/ZDimages/creditViolation/icon_28.png">
               <p>奖励分</p>
@@ -109,33 +109,33 @@
       <div class="page-content-box" style="padding:20px 0 0;">
         <el-table class="table-box" v-loading="loading" border :data="recordList" v-if="queryParams.pointsType == 1">
           <!--<el-table-column label="姓名" align="left" prop="userName" />-->
-          <el-table-column label="奖励分变动信息" align="left" prop="messageContent" show-overflow-tooltip/>
+          <el-table-column label="奖励分变动信息" align="left" prop="changeInfo" show-overflow-tooltip/>
           <el-table-column label="时间" align="left" prop="createTime" show-overflow-tooltip>
             <template slot-scope="scope">
               <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="积分变动" align="left" prop="points" show-overflow-tooltip>
+          <el-table-column label="积分变动" align="left" prop="scoreChange" show-overflow-tooltip>
             <template slot-scope="scope">
-              <span :class="scope.row.points>0?'table-colorA':(scope.row.points<0?'table-colorB':'')">{{scope.row.points>0?'+'+scope.row.points:scope.row.points}}</span>
+              <span :class="scope.row.scoreChange>0?'table-colorA':(scope.row.scoreChange<0?'table-colorB':'')">{{scope.row.scoreChange>0?'+'+scope.row.scoreChange:scope.row.scoreChange}}</span>
             </template>
           </el-table-column>
-          <el-table-column label="奖励分余额" align="left"  prop="surplusPoints" show-overflow-tooltip/>
+          <el-table-column label="奖励分余额" align="left"  prop="scoreLeft" show-overflow-tooltip/>
         </el-table>
         <el-table class="table-box" v-loading="loading" border :data="recordList" v-if="queryParams.pointsType == 2">
           <!--<el-table-column label="姓名" align="left" prop="userName" />-->
-          <el-table-column label="信用分变动信息" align="left" prop="messageContent" show-overflow-tooltip/>
+          <el-table-column label="信用分变动信息" align="left" prop="changeInfo" show-overflow-tooltip/>
           <el-table-column label="时间" align="left" prop="createTime" show-overflow-tooltip>
             <template slot-scope="scope">
               <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="积分变动" align="left" prop="points" show-overflow-tooltip>
+          <el-table-column label="积分变动" align="left" prop="scoreChange" show-overflow-tooltip>
             <template slot-scope="scope">
-              <span :class="scope.row.points>0?'table-colorA':(scope.row.points<0?'table-colorB':'')">{{scope.row.points>0?'+'+scope.row.points:scope.row.points}}</span>
+              <span :class="scope.row.scoreChange>0?'table-colorA':(scope.row.scoreChange<0?'table-colorB':'')">{{scope.row.scoreChange>0?'+'+scope.row.scoreChange:scope.row.scoreChange}}</span>
             </template>
           </el-table-column>
-          <el-table-column label="信用分余额" align="left"  prop="surplusPoints" show-overflow-tooltip/>
+          <el-table-column label="信用分余额" align="left"  prop="scoreLeft" show-overflow-tooltip/>
         </el-table>
         <pagination
           v-show="total>0"
@@ -158,6 +158,7 @@ export default {
   name: "Record",
   data() {
     return {
+      userItem:JSON.parse(localStorage.getItem('user')),
       // 遮罩层
       loading: true,
       // 显示搜索条件