Explorar el Código

老师管理 课表详情换接口

lex-xin hace 4 años
padre
commit
4cecce2e14

+ 15 - 6
src/views/categroyManager/vipNewActive.vue

@@ -246,6 +246,7 @@
 <script>
 import { vipGroupCategory, addVipActive } from "@/api/vipSeting";
 import { getEmployeeOrgan } from "@/api/buildTeam";
+import cleanDeep from 'clean-deep';
 export default {
   name: "vipNewActive",
   data () {
@@ -351,10 +352,18 @@ export default {
       this.$refs["vipform"].validate(valid => {
         if (valid) {
           // 验证通过
-          let coursesStartTime = this.vipform.courseTime[0];
-          let coursesEndTime = this.vipform.courseTime[1];
-          let startTime = this.vipform.activeTime[0];
-          let endTime = this.vipform.activeTime[1];
+          let coursesStartTime = null,
+              coursesEndTime = null,
+              startTime = null,
+              endTime = null
+          if(this.vipform.courseTime && this.vipform.courseTime.length > 0) {
+            coursesStartTime = this.vipform.courseTime[0];
+            coursesEndTime = this.vipform.courseTime[1];
+          }
+          if(this.vipform.activeTime && this.vipform.activeTime.length > 0) {
+            startTime = this.vipform.activeTime[0];
+            endTime = this.vipform.activeTime[1];
+          }
           let organId = this.vipform.organ.join(",");
           let type = this.activeType;
           if(!type) {
@@ -421,7 +430,7 @@ export default {
             offlineSalarySettlement
           };
           // 发请求创建活动
-          addVipActive({
+          addVipActive(cleanDeep({
             coursesStartTime,
             coursesEndTime,
             startTime,
@@ -440,7 +449,7 @@ export default {
             attribute3: this.attribute3,
             offlineClassJoinGradientRewards: this.offlineClassJoinGradientRewards * 1,
             onlineClassJoinGradientRewards: this.onlineClassJoinGradientRewards * 1
-          }).then(res => {
+          })).then(res => {
             if (res.code == 200) {
               this.$message.success("恭喜你,活动创建成功");
               this.onReSet();

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

@@ -18,7 +18,7 @@
             v-model.trim="searchForm.search"
             clearable
             @keyup.enter.native="search"
-            placeholder="老师课程名、课程编号"
+            placeholder="课程编号/课程名称"
           ></el-input>
         </el-form-item>
         <el-form-item prop="organId">

+ 59 - 25
src/views/teacherManager/teacherDetail/components/teacherRecord.vue

@@ -10,6 +10,14 @@
       @reset="onReSet"
     >
       <el-form-item>
+        <el-input
+          placeholder="课程编号/课程名称"
+          @keyup.enter.native="search"
+          v-model.trim="searchForm.search"
+          clearable
+        ></el-input>
+      </el-form-item>
+      <el-form-item>
         <el-date-picker
           style="width: 400px"
           v-model.trim="searchForm.courseDate"
@@ -40,14 +48,6 @@
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-input
-          placeholder="课程名称"
-          @keyup.enter.native="search"
-          v-model.trim="searchForm.classGroupName"
-          clearable
-        ></el-input>
-      </el-form-item>
-      <el-form-item>
         <el-select
           v-model.trim="searchForm.signInStatus"
           filterable
@@ -106,33 +106,66 @@
               </copy-text>
             </template>
           </el-table-column>
-               <el-table-column align="center" prop="name" label="课程名称">
+               <el-table-column align="center" label="课程名称">
             <template slot-scope="scope">
               <copy-text>
-                {{ scope.row.name }}
+                {{ scope.row.courseScheduleName }}
               </copy-text>
             </template>
           </el-table-column>
-          <el-table-column align="center" label="上课时间" width="150">
-            <template slot-scope="scope"
+          <el-table-column align="center" label="上课日期" prop="classDate" width="150">
+            <!-- <template slot-scope="scope"
               >{{ scope.row.classDate }}
               {{ scope.row.startClassTime.substring(0, 5) }}</template
-            >
+            > -->
           </el-table-column>
-          <el-table-column align="center" label="下课时间" width="150">
-            <template slot-scope="scope"
-              >{{ scope.row.classDate }}
-              {{ scope.row.endClassTime.substring(0, 5) }}</template
-            >
+          <el-table-column align="center" label="上课时间" width="150">
+            <template slot-scope="scope">
+              <!-- {{ scope.row.classDate }}
+              {{ scope.row.endClassTime.substring(0, 5) }} -->
+              {{ scope.row.startClassTime + "-" + scope.row.endClassTime }}
+            </template>
           </el-table-column>
           <el-table-column align="center" label="课程类型">
             <template slot-scope="scope">{{
-              scope.row.type | coursesType
+              scope.row.courseScheduleType | coursesType
             }}</template>
           </el-table-column>
-
+          <el-table-column align="center" label="签到时间">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.signInTime }}
+              </div>
+            </template>
+          </el-table-column>
           <el-table-column align="center" label="签到状态">
             <template slot-scope="scope">
+              <div v-if="scope.row.courseScheduleStatus != 'NOT_START'">
+                {{ scope.row.signInStatus | attendanceType }}
+              </div>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            align="center"
+            prop="startClassTime"
+            label="签退时间"
+          >
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.signOutTime }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="签退状态">
+            <template slot-scope="scope">
+              <div v-if="scope.row.courseScheduleStatus != 'NOT_START'">
+                {{ scope.row.signOutStatus | attendanceOutType }}
+              </div>
+            </template>
+          </el-table-column>
+          <!-- <el-table-column align="center" label="签到状态">
+            <template slot-scope="scope">
               <div v-if="scope.row.courseStatus != 'NOT_START'">{{
               scope.row.signInStatus | attendanceType
             }}</div>
@@ -144,7 +177,7 @@
               scope.row.signOutStatus | attendanceOutType
             }}</div>
             </template>
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column
             align="center"
             prop="remark"
@@ -165,11 +198,12 @@
   </div>
 </template>
 <script>
-import { getTeacherPersonalAttendances } from "@/api/teacherManager";
+import { queryTeacherAttendances } from "@/api/recodeManager";
 import pagination from "@/components/Pagination/index";
 import store from "@/store";
 import { courseType, attendance } from "@/utils/searchArray";
 import { getTimes } from "@/utils";
+import cleanDeep from 'clean-deep'
 export default {
   name: "teacherRecord",
   components: {
@@ -183,7 +217,7 @@ export default {
       searchForm: {
         courseStartDate: null,
         courseEndDate: null,
-        classGroupName: null,
+        search: null,
         courseScheduleType: null,
         signInStatus: null,
         signOutStatus: null,
@@ -224,7 +258,7 @@ export default {
       // let params = this.searchForm;
       // params.rows = this.pageInfo.limit;
       // (params.page = this.pageInfo.page), (params.teacherId = this.teacherId);
-      getTeacherPersonalAttendances(params).then((res) => {
+      queryTeacherAttendances(cleanDeep(params)).then((res) => {
         if (res.code == 200) {
           this.tableList = res.data.rows;
           this.pageInfo.total = res.data.total;
@@ -245,7 +279,7 @@ export default {
       this.searchForm = {
         courseStartDate: null,
         courseEndDate: null,
-        classGroupName: null,
+        search: null,
         courseScheduleType: null,
         signInStatus: null,
         signOutStatus: null

+ 7 - 2
src/views/teamBuild/components/teamBaseInfo.vue

@@ -226,7 +226,12 @@
           ></el-date-picker>
         </el-form-item>
         <el-form-item label="招生年级" v-if="basdisabled">
-          <el-tooltip
+          <el-input
+            placeholder="请输入招生年级"
+            v-model.trim="startClassString"
+            :disabled="basdisabled"
+          ></el-input>
+          <!-- <el-tooltip
             class="item"
             effect="dark"
             :content="startClassString"
@@ -235,7 +240,7 @@
             <div style="width: 180px; overflow: hidden">
               {{ startClassString }}
             </div>
-          </el-tooltip>
+          </el-tooltip> -->
         </el-form-item>
         <el-form-item
           label="招生年级"