Browse Source

提交测试

1
mo 4 years ago
parent
commit
db5600a442

+ 4 - 4
src/utils/vueFilter.js

@@ -225,8 +225,8 @@ Vue.filter('jobNature', (value) => {
 // 考勤状态
 Vue.filter('attendanceType', value => {
   let template = {
-    0: "异常签到",
-    1: "正常签到",
+    0: "异常",
+    1: "正常",
     3: "未签到"
   }
   return template[value]
@@ -234,8 +234,8 @@ Vue.filter('attendanceType', value => {
 // 考情签退
 Vue.filter('attendanceOutType', value => {
   let template = {
-    0: "异常签退",
-    1: "正常签退",
+    0: "异常",
+    1: "正常",
     3: "未签退"
   }
   return template[value]

+ 38 - 16
src/views/recodeManager/modals/hand.vue

@@ -2,45 +2,67 @@
   <div>
     <el-form :model="quitForm" ref="quitForm" :rules="quitRules">
       <el-form-item prop="disposeContent">
-        <el-input type="textarea" v-model.trim="quitForm.disposeContent" placeholder="请填写处理意见"></el-input>
+        <el-input
+          type="textarea"
+          v-model="quitForm.disposeContent"
+          placeholder="请填写处理意见"
+        ></el-input>
       </el-form-item>
     </el-form>
-    <div slot="footer" class="dialog-footer" style="text-align: right;">
+    <div slot="footer" class="dialog-footer" style="text-align: right">
       <el-button @click="$emit('close')">取 消</el-button>
       <el-button type="primary" @click="submit">确 定</el-button>
     </div>
   </div>
 </template>
 <script>
-import { teacherAttendanceUpdate } from '../api'
+import { teacherAttendanceUpdate } from "../api";
 export default {
-  props: ['detail'],
+  props: ["detail"],
   data() {
     return {
       quitForm: {
-        reason: null,
+        disposeContent: '',
       },
       quitRules: {
-        reason: [{ required: true, message: "请填写退团退费原因" }],
+        disposeContent: [{ required: true, message: "请填写退团退费原因" }],
       },
+    };
+  },
+  mounted() {
+      //  console.log(this.detail.teacherAttendance.disposeContent);
+    if (this.detail?.teacherAttendance?.disposeContent) {
+      this.$set(
+        this.quitForm,
+        "disposeContent",
+        this.detail.teacherAttendance.disposeContent
+      );
+      // this.quitForm.reason = this.detail?.teacherAttendance?.disposeContent
+    }
+    if(this.detail?.disposeContent){
+          this.$set(
+        this.quitForm,
+        "disposeContent",
+        this.detail.disposeContent
+      );
     }
   },
   methods: {
     submit() {
-      this.$refs.quitForm.validate(async valid => {
+      this.$refs.quitForm.validate(async (valid) => {
         if (valid) {
           try {
             await teacherAttendanceUpdate({
               id: this.detail.teacherAttendanceId,
-              ...this.quitForm
-            })
-            this.$emit('close')
-            this.$emit('submited')
-            this.$message.success("提交成功")
+              ...this.quitForm,
+            });
+            this.$emit("close");
+            this.$emit("submited");
+            this.$message.success("提交成功");
           } catch (error) {}
         }
-      })
-    }
-  }
-}
+      });
+    },
+  },
+};
 </script>

+ 2 - 1
src/views/recodeManager/recodeList.vue

@@ -451,8 +451,9 @@ export default {
       this.search();
     },
     hand(row) {
+        this.detail = row;
       this.handVisible = true;
-      this.detail = row;
+
     },
     appeal(row) {
       this.appealVisible = true;

+ 6 - 5
src/views/returnVisitManager/returnVisitList.vue

@@ -14,7 +14,7 @@
         <el-form-item>
           <el-input
             placeholder="请输入老师姓名"
-            v-model.trim="searchForm.teacher"
+            v-model.trim="searchForm.search"
           ></el-input>
         </el-form-item>
         <el-form-item>
@@ -188,7 +188,7 @@ export default {
   data() {
     return {
       searchForm: {
-        teacher: "",
+        search: "",
         organId: "",
         visiterType: "",
         typeList: [],
@@ -218,7 +218,8 @@ export default {
     this.$store.dispatch("setBranchs");
 
     if(this.$route.query){
-      this.searchForm.teacher = this.$route.query.teacher
+      this.searchForm.search = this.$route.query.teacher // 兼容老功能
+      this.searchForm.search = this.$route.query.search
       this.searchForm.timer = this.$route.query.timer
     }
     this.getList();
@@ -233,7 +234,7 @@ export default {
     },
     search() {
       // this.$router.replace({query:{...this.$route.query,timer:undefined,teacher:undefined}})
-      resetQuery(this,{timer:undefined,teacher:undefined})
+      resetQuery(this,{timer:undefined,search:undefined})
       this.rules.page = 1;
       this.getList();
     },
@@ -241,7 +242,7 @@ export default {
       this.type = [];
       this.timer = [];
       this.searchForm = {
-        teacher: "",
+        search: "",
         organId: "",
         visiterType: "",
         type: "",

+ 98 - 75
src/views/teamDetail/componentCourse/studentRollCall.vue

@@ -1,69 +1,68 @@
 <template>
   <div>
     <el-form :inline="true" class="workForm" style="padding: 0 25px">
-      <el-form-item label="学生总数" >
+      <el-form-item label="学生总数">
         <!-- <el-input disabled
                   :value="studentNum"></el-input> -->
-        <div class="inputStyle">{{studentNum}}</div>
+        <div class="inputStyle">{{ studentNum }}</div>
       </el-form-item>
       <el-form-item label="实际上课学生数">
         <!-- <el-input disabled
                   :value="signInNum"></el-input> -->
-        <div class="inputStyle">{{signInNum}}</div>
+        <div class="inputStyle">{{ signInNum }}</div>
       </el-form-item>
       <el-form-item label="请假学生数">
         <!-- <el-input disabled
                   :value="leaveNum"></el-input> -->
-        <div class="inputStyle">{{leaveNum}}</div>
+        <div class="inputStyle">{{ leaveNum }}</div>
       </el-form-item>
       <el-form-item label="旷课学生数">
         <!-- <el-input disabled
                   :value="leaveNum"></el-input> -->
-        <div class="inputStyle">{{truantNum}}</div>
+        <div class="inputStyle">{{ truantNum }}</div>
       </el-form-item>
     </el-form>
     <div class="tableWrap">
-      <el-table :data='tableList'
-                :header-cell-style="{background:'#EDEEF0',color:'#444'}">
-        <el-table-column align='center'
-                         prop="username"
-                         label="学生姓名">
+      <el-table
+        :data="tableList"
+        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      >
+        <el-table-column align="center" prop="username" label="学生姓名">
           <template slot-scope="scope">
             <div>
-              {{scope.row.username}}
-               <span >({{scope.row.userId}})</span>
-               <!-- style="color: #f56c6c" -->
+              {{ scope.row.username }}
+              <span>({{ scope.row.userId }})</span>
+              <!-- style="color: #f56c6c" -->
             </div>
           </template>
         </el-table-column>
-        <el-table-column align='center'
-                         prop="phone"
-                         label="手机号">
+        <el-table-column align="center" prop="phone" label="手机号">
         </el-table-column>
-        <el-table-column align='center'
-                         prop="signInTime"
-                         label="签到时间">
+        <el-table-column align="center" prop="signInTime" label="签到时间">
           <template slot-scope="scope">
             <div>
-              {{scope.row.signInTime | dateForMinFormat}}
+              {{ scope.row.signInTime | dateForMinFormat }}
             </div>
           </template>
         </el-table-column>
-        <el-table-column align='center'
-                         prop="signOutTime"
-                         label="签退时间">
+        <el-table-column align="center" prop="signOutTime" label="签退时间">
           <template slot-scope="scope">
             <div>
-              {{scope.row.signOutTime | dateForMinFormat}}
+              {{ scope.row.signOutTime | dateForMinFormat }}
             </div>
           </template>
         </el-table-column>
-        <el-table-column align='center'
-                         prop="status"
-                         label="考勤状态">
+        <el-table-column align="center" prop="status" label="考勤状态">
           <template slot-scope="scope">
-            <div v-if="scope.row.courseSchedule && scope.row.courseSchedule.status != 'NOT_START'">
-              <p v-if="scope.row.status">{{scope.row.status | studentRecord}}</p>
+            <div
+              v-if="
+                scope.row.courseSchedule &&
+                scope.row.courseSchedule.status != 'NOT_START'
+              "
+            >
+              <p v-if="scope.row.status">
+                {{ scope.row.status | studentRecord }}
+              </p>
               <p v-else>未签到</p>
             </div>
           </template>
@@ -73,24 +72,42 @@
             <div>{{ scope.row.visitFlag | yesOrNo }}</div>
           </template>
         </el-table-column>
-        <el-table-column align='center'
-                         prop="ctrls"
-                         v-if="permission('visit/add?page=teamCourseList')"
-                         label="操作">
+        <el-table-column
+          align="center"
+          prop="ctrls"
+          label="操作"
+        >
           <template slot-scope="scope">
-            <el-button
-              type="text"
-              @click="addVisit(scope.row)"
-            >新增回访</el-button>
+            <div>
+              <el-button
+                type="text"
+                @click="addVisit(scope.row)"
+                v-if="!scope.row.visitFlag&&permission('visit/add?page=teamCourseList')"
+                >新增回访</el-button
+              >
+                <el-button
+                type="text"
+                @click="lookVisit(scope.row)"
+                v-if="(scope.row.visitFlag)&&permission('visit/queryPage?page=teamCourseList')"
+                >查看回访</el-button
+              >
+            </div>
           </template>
         </el-table-column>
       </el-table>
-      <pagination :total="rules.total"
-                  :page.sync="rules.page"
-                  :limit.sync="rules.limit"
-                  @pagination="getList" />
+      <pagination
+        :total="rules.total"
+        :page.sync="rules.page"
+        :limit.sync="rules.limit"
+        @pagination="getList"
+      />
     </div>
-    <el-dialog title="新增回访" width="500px" :visible.sync="visitVisible" append-to-body>
+    <el-dialog
+      title="新增回访"
+      width="500px"
+      :visible.sync="visitVisible"
+      append-to-body
+    >
       <visit
         v-if="visitVisible && detail"
         :detail="detail"
@@ -103,14 +120,14 @@
   </div>
 </template>
 <script>
-import { findStudentAttendance, sumStudentAttendance } from '@/api/buildTeam'
-import pagination from '@/components/Pagination/index'
-import { permission } from '@/utils/directivePage'
-import visit from '@/views/withdrawal-application/modals/visit'
+import { findStudentAttendance, sumStudentAttendance } from "@/api/buildTeam";
+import pagination from "@/components/Pagination/index";
+import { permission } from "@/utils/directivePage";
+import visit from "@/views/withdrawal-application/modals/visit";
 export default {
-  props: ['courseScheduleId','isMainGo'],
+  props: ["courseScheduleId", "isMainGo"],
   components: { pagination, visit },
-  data () {
+  data() {
     return {
       tableList: [],
       visitVisible: false,
@@ -124,48 +141,54 @@ export default {
       studentNum: null,
       signInNum: null,
       leaveNum: null,
-      truantNum: null
-    }
+      truantNum: null,
+    };
   },
-  mounted () {
-    this.init()
+  mounted() {
+    this.init();
   },
-  activated () {
-    this.init()
+  activated() {
+    this.init();
   },
   methods: {
     permission,
-    init () {
-      console.log(this.courseScheduleId)
-      this.getList()
+    init() {
+      console.log(this.courseScheduleId);
+      this.getList();
 
       //  发请求获取学生签到信息
     },
     addVisit(row) {
-      this.visitVisible = true
-      this.detail = row
+      this.visitVisible = true;
+      this.detail = row;
     },
-    getList () {
+    lookVisit(row){
+      this.$router.push({path:'/studentManager/returnVisitList',query:{search:row.id}})
+    },
+    getList() {
       findStudentAttendance({
-        search: this.courseScheduleId, rows: this.rules.limit,
+        search: this.courseScheduleId,
+        rows: this.rules.limit,
         page: this.rules.page,
-      }).then(res => {
+      }).then((res) => {
         if (res.code == 200) {
           this.tableList = res.data.rows;
-          this.rules.total = res.data.total
+          this.rules.total = res.data.total;
         }
-      })
-      sumStudentAttendance({ courseScheduleId: this.courseScheduleId }).then(res => {
-        if (res.code == 200) {
-          this.studentNum = res.data.studentNum;
-          this.signInNum = res.data.signInNum;
-          this.leaveNum = res.data.leaveNum
-          this.truantNum = res.data.truantNum
+      });
+      sumStudentAttendance({ courseScheduleId: this.courseScheduleId }).then(
+        (res) => {
+          if (res.code == 200) {
+            this.studentNum = res.data.studentNum;
+            this.signInNum = res.data.signInNum;
+            this.leaveNum = res.data.leaveNum;
+            this.truantNum = res.data.truantNum;
+          }
         }
-      })
-    }
-  }
-}
+      );
+    },
+  },
+};
 </script>
 <style lang="scss" scoped>
 .inputStyle {
@@ -173,7 +196,7 @@ export default {
   text-align: center;
 }
 .workForm {
-    /deep/.el-form-item {
+  /deep/.el-form-item {
     margin-bottom: 10px !important;
   }
 }

+ 120 - 54
src/views/teamDetail/componentCourse/teacherList.vue

@@ -12,66 +12,97 @@
       >
         <template slot-scope="scope">
           <div>
-            <span>{{scope.row.teacherName}}</span><br/>
-             <span>(<copy-text>{{scope.row.teacherId}}</copy-text>)</span><!-- style="color: #f56c6c"-->
+            <span
+              >{{ scope.row.teacherName }}-{{
+                scope.row.teacherRole | workType
+              }}</span
+            ><br />
+            <span
+              >(<copy-text>{{ scope.row.teacherId }}</copy-text
+              >)</span
+            ><!-- style="color: #f56c6c"-->
           </div>
         </template>
       </el-table-column>
-      <el-table-column align="center" prop="teacherRole" label="老师类型">
+      <!-- <el-table-column align="center" prop="teacherRole" label="老师类型">
         <template slot-scope="scope">
           <div>
-            {{ scope.row.teacherRole | workType }}
+
           </div>
         </template>
-      </el-table-column>
-      <el-table-column align="center" prop="teacherPhone" label="签到时间">
+      </el-table-column> -->
+      <el-table-column
+        align="center"
+        prop="teacherPhone"
+        label="签到签退"
+        width="200px"
+      >
         <template slot-scope="scope">
           <div>
             {{ scope.row.signInTime | dayjsFormatMinute }}
+            (<span :class="scope.row.signInStatus == 1 ? 'green' : 'red'">{{
+              scope.row.signInStatus | attendanceType
+            }}</span
+            >) -
+            {{ scope.row.signOutTime | dayjsFormatMinute }}
+            (<span :class="scope.row.signOutStatus == 1 ? 'green' : 'red'">{{
+              scope.row.signOutStatus | attendanceOutType
+            }}</span
+            >)
           </div>
         </template>
       </el-table-column>
-      <el-table-column align="center" prop="teacherPhone" label="签退时间">
+      <!-- <el-table-column align="center" prop="teacherPhone" label="签退时间">
         <template slot-scope="scope">
           <div>
-            {{ scope.row.signOutTime | dayjsFormatMinute }}
+
           </div>
         </template>
-      </el-table-column>
-      <el-table-column align="center" prop="teacherPhone" label="签到状态">
+      </el-table-column> -->
+      <!-- <el-table-column align="center" prop="teacherPhone" label="考勤状态">
         <template slot-scope="scope">
-          <div v-if="courseStatus != 'NOT_START'">{{ scope.row.signInStatus | attendanceType}}</div>
+          <div v-if="courseStatus != 'NOT_START'">
+            {{ scope.row.signInStatus | attendanceType }} <br />
+            {{ scope.row.signOutStatus | attendanceOutType }}
+          </div>
         </template>
-      </el-table-column>
-      <el-table-column align="center" prop="teacherPhone" label="签退状态">
+      </el-table-column> -->
+      <!-- <el-table-column align="center" prop="teacherPhone" label="签退状态">
         <template slot-scope="scope">
           <div v-if="courseStatus != 'NOT_START'">{{ scope.row.signOutStatus | attendanceOutType}}</div>
         </template>
-      </el-table-column>
+      </el-table-column> -->
+
       <el-table-column
         align="center"
-        prop="signOutAttachments"
-        label="签退照片"
+        prop="complaintsTime"
+        width="160"
+        label="状态/申诉时间"
       >
         <template slot-scope="scope">
-          <el-image
-            v-if="
-              scope.row.teacherAttendance &&
-              scope.row.teacherAttendance.signOutAttachments
-            "
-            style="width: 60px; height: 60px"
-            fit="cover"
-            :src="scope.row.teacherAttendance.signOutAttachments"
-            :previewSrcList="[scope.row.teacherAttendance.signOutAttachments]"
-          >
-          </el-image>
+          <div>
+            <p>
+              <span :class="complaintscolor(scope.row.teacherAttendance.complaintsStatus)">
+                {{
+                  scope.row.teacherAttendance.complaintsStatus
+                    | complaintsStatusEnum
+                }}
+              </span>
+            </p>
+            <p>
+              {{
+                scope.row.teacherAttendance &&
+                scope.row.teacherAttendance.complaintsTime
+              }}
+            </p>
+          </div>
         </template>
       </el-table-column>
       <el-table-column
         align="center"
         prop="complaintsContent"
         width="120"
-        label="考勤申诉内容"
+        label="申诉内容"
       >
         <template slot-scope="scope">
           <div v-if="scope.row.teacherAttendance">
@@ -84,26 +115,11 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column
-        align="center"
-        prop="complaintsTime"
-        width="160"
-        label="考勤申诉时间"
-      >
-        <template slot-scope="scope">
-          <div>
-            {{
-              scope.row.teacherAttendance &&
-              scope.row.teacherAttendance.complaintsTime
-            }}
-          </div>
-        </template>
-      </el-table-column>
-      <el-table-column
+      <!-- <el-table-column
         align="center"
         prop="complaintsStatus"
-        width="140"
-        label="考勤申诉状态"
+        width="120"
+        label="申诉状态"
       >
         <template slot-scope="scope">
           <div v-if="scope.row.teacherAttendance">
@@ -113,7 +129,7 @@
             }}
           </div>
         </template>
-      </el-table-column>
+      </el-table-column> -->
       <el-table-column align="center" prop="disposeContent" label="处理意见">
         <template slot-scope="scope">
           <overflow-text
@@ -125,6 +141,25 @@
           ></overflow-text>
         </template>
       </el-table-column>
+      <el-table-column
+        align="center"
+        prop="signOutAttachments"
+        label="签退照片"
+      >
+        <template slot-scope="scope">
+          <el-image
+            v-if="
+              scope.row.teacherAttendance &&
+              scope.row.teacherAttendance.signOutAttachments
+            "
+            style="width: 60px; height: 60px"
+            fit="cover"
+            :src="scope.row.teacherAttendance.signOutAttachments"
+            :previewSrcList="[scope.row.teacherAttendance.signOutAttachments]"
+          >
+          </el-image>
+        </template>
+      </el-table-column>
       <el-table-column align="center" width="200px" fixed="right" label="操作">
         <template slot-scope="scope">
           <div>
@@ -157,8 +192,13 @@
                 size="small"
                 type="text"
                 @click="hand(scope.row)"
-                v-if="(scope.row.signInStatus!=1||scope.row.signOutStatus!=1) && courseStatus != 'NOT_START'"
-              >处理意见</el-button>
+                v-if="
+                  (scope.row.signInStatus != 1 ||
+                    scope.row.signOutStatus != 1) &&
+                  courseStatus != 'NOT_START'
+                "
+                >处理意见</el-button
+              >
             </auth>
           </div>
         </template>
@@ -261,8 +301,8 @@ import gpsLoction from "../componentCourse/gpsLocation";
 import hand from "@/views/recodeManager/modals/hand";
 export default {
   components: { gpsLoction, hand },
-  props: ['courseScheduleId', 'teachMode', 'courseStatus'],
-  data () {
+  props: ["courseScheduleId", "teachMode", "courseStatus"],
+  data() {
     return {
       tableList: [],
       gpsVisible: false,
@@ -289,8 +329,8 @@ export default {
       },
     };
   },
-  mounted () {
-    this.init()
+  mounted() {
+    this.init();
     // console.log(this.teachMode, this.courseStatus)
   },
   activated() {},
@@ -312,8 +352,8 @@ export default {
       this.gpsVisible = true;
     },
     hand(row) {
-      this.handVisible = true;
       this.detail = row;
+      this.handVisible = true;
     },
     mackAttendance(row) {
       this.$confirm("确定补考勤", "提示", {
@@ -362,6 +402,21 @@ export default {
       this.innerVisible = true;
       this.activeTeacher = row;
     },
+    complaintscolor(status){
+      /**
+       *    0: "已拒绝",
+    1: "已通过",
+    2: "待处理",
+    3: "已撤销",
+       */
+      if(status==0 || status==2 ){
+        return 'red'
+      }else if(status==1){
+         return 'green'
+      } else{
+        return 'orgin'
+      }
+    },
     resetSalary() {
       let that = this;
       this.$refs["teacherMask"].validate((res) => {
@@ -392,3 +447,14 @@ export default {
   },
 };
 </script>
+<style lang="scss" scoped>
+.red {
+  color: red;
+}
+.green {
+  color: #14928a;
+}
+.orgin {
+  color: #E6A23C;
+}
+</style>

+ 4 - 1
src/views/teamDetail/teamCourseList.vue

@@ -534,7 +534,7 @@
             class="inputStyle"
             :class="
               maskForm.signInStatusEnum == 1 && maskForm.signOutStatusEnum == 1
-                ? null
+                ? 'green'
                 : 'red'
             "
           >
@@ -1385,6 +1385,9 @@ export default {
 .red {
   color: red;
 }
+.green {
+  color: #14928A;
+}
 
 .exportBtn {
   background: #13817a;