瀏覽代碼

重新开始

1
mo 4 年之前
父節點
當前提交
86450ba15f
共有 3 個文件被更改,包括 112 次插入99 次删除
  1. 30 34
      src/views/evaluateManager/evaluateList.vue
  2. 76 60
      src/views/recodeManager/recodeList.vue
  3. 6 5
      src/views/setSilder/addSilder.vue

+ 30 - 34
src/views/evaluateManager/evaluateList.vue

@@ -44,7 +44,11 @@
         </el-select>
       </el-form-item>
       <el-form-item>
-        <remote-search :commit="'setTeachers'" aria-placeholder="请选择指导老师" v-model="searchForm.teacherId" />
+        <remote-search
+          :commit="'setTeachers'"
+          aria-placeholder="请选择指导老师"
+          v-model="searchForm.teacherId"
+        />
       </el-form-item>
       <el-form-item>
         <el-select
@@ -83,23 +87,15 @@
             </copy-text>
           </template>
         </el-table-column>
-        <el-table-column
-          align="center"
-          prop="name"
-          label="课程组名称"
-        >
+        <el-table-column align="center" prop="name" label="课程组名称">
           <template slot-scope="scope">
             <copy-text>
               {{ scope.row.name }}
             </copy-text>
           </template>
         </el-table-column>
-        <el-table-column
-          align="center"
-          prop="organName"
-          label="分部名称"
-        >
-           <template slot-scope="scope">
+        <el-table-column align="center" prop="organName" label="分部名称">
+          <template slot-scope="scope">
             <copy-text>
               {{ scope.row.organName }}
             </copy-text>
@@ -138,13 +134,14 @@
         <el-table-column align="center" label="操作">
           <template slot-scope="scope">
             <div>
-              <el-button
-                type="text"
-                v-permission="'evaluateList/look'"
-                v-show="scope.row.evaluateStatus"
-                @click="gotoEvakuateDetail(scope.row)"
-                >查看</el-button
-              >
+              <auth auths='evaluateList/look'>
+                <el-button
+                  type="text"
+                  v-show="scope.row.evaluateStatus"
+                  @click="gotoEvakuateDetail(scope.row)"
+                  >查看</el-button
+                >
+              </auth>
             </div>
           </template>
         </el-table-column>
@@ -190,12 +187,10 @@ export default {
     };
   },
   created() {
-    this.init();
-  },
-  activated() {
-    this.init();
+
   },
   mounted() {
+      this.init();
     this.$store.dispatch("setBranchs");
   },
   methods: {
@@ -227,16 +222,17 @@ export default {
     },
     getList() {
       // 数据效验
-      let obj = {};
-      obj.hasReport = this.searchForm.hasReport || null;
-      obj.isOver = this.searchForm.isOver || null;
-      obj.month = this.searchForm.month || null;
-      obj.organId = this.searchForm.organId || null;
-      obj.page = this.rules.page;
-      obj.rows = this.rules.limit;
-      obj.search = this.searchForm.search || null;
-      obj.teacherId = this.searchForm.teacherId || null;
-      getReviews(obj).then((res) => {
+      // let obj = {};
+      // obj.hasReport = this.searchForm.hasReport || null;
+      // obj.isOver = this.searchForm.isOver || null;
+      // obj.month = this.searchForm.month || null;
+      // obj.organId = this.searchForm.organId || null;
+      // obj.page = this.rules.page;
+      // obj.rows = this.rules.limit;
+      // obj.search = this.searchForm.search || null;
+      // obj.teacherId = this.searchForm.teacherId || null
+      console.log(this.searchForm)
+      getReviews({...this.searchForm}).then((res) => {
         if (res.code == 200) {
           this.tableData = res.data.rows;
           this.rules.total = res.data.total;
@@ -262,7 +258,7 @@ export default {
       )
         .toISOString()
         .slice(0, 7);
-        this.search()
+      this.search();
     },
     gotoEvakuateDetail(row) {
       let id = row.id;

+ 76 - 60
src/views/recodeManager/recodeList.vue

@@ -3,7 +3,12 @@
   <div class="m-container">
     <h2>
       <div class="squrt"></div>
-      老师考勤列表 <filter-search @reload="reloadSearch" :keys="['attendanceStatus', 'visitFlag']" :moreKeys="['start', 'end', 'organId']"/>
+      老师考勤列表
+      <filter-search
+        @reload="reloadSearch"
+        :keys="['attendanceStatus', 'visitFlag']"
+        :moreKeys="['start', 'end', 'organId']"
+      />
     </h2>
     <div class="m-core">
       <save-form
@@ -242,23 +247,34 @@
             width="220px"
           >
             <template slot-scope="scope">
-              <el-button
-                type="text"
-                v-if="scope.row.jobNature === 'PART_TIME' && scope.row.complaintsStatus ==2 "
-                @click="unappeal(scope.row)"
-                v-permission="'teacherAttendance/repealComplaints'"
-              >撤销申诉</el-button>
-              <el-button
-                v-if="scope.row.jobNature === 'PART_TIME' && (scope.row.complaintsStatus == null || scope.row.complaintsStatus == 3)"
-                type="text"
-                @click="appeal(scope.row)"
-                v-permission="'teacherAttendance/addComplaints'"
-              >申诉</el-button>
-              <el-button
-                type="text"
-                v-permission="'teacherAttendance/update'"
-                @click="hand(scope.row)"
-              >处理意见</el-button>
+              <auth auths="teacherAttendance/repealComplaints">
+                <el-button
+                  type="text"
+                  v-if="
+                    scope.row.jobNature === 'PART_TIME' &&
+                    scope.row.complaintsStatus == 2
+                  "
+                  @click="unappeal(scope.row)"
+                  >撤销申诉</el-button
+                >
+              </auth>
+              <auth auths="teacherAttendance/addComplaints">
+                <el-button
+                  v-if="
+                    scope.row.jobNature === 'PART_TIME' &&
+                    (scope.row.complaintsStatus == null ||
+                      scope.row.complaintsStatus == 3)
+                  "
+                  type="text"
+                  @click="appeal(scope.row)"
+                  >申诉</el-button
+                >
+              </auth>
+              <auth auths="teacherAttendance/update">
+                <el-button type="text" @click="hand(scope.row)"
+                  >处理意见</el-button
+                >
+              </auth>
             </template>
           </el-table-column>
         </el-table>
@@ -297,14 +313,14 @@ import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
 import qs from "qs";
-import cleanDeep from 'clean-deep'
+import cleanDeep from "clean-deep";
 import { getTeacher, getEmployeeOrgan } from "@/api/buildTeam";
 import { queryTeacherAttendances } from "@/api/recodeManager";
 import { jobNature, courseType } from "@/utils/searchArray";
-import { repealComplaints } from './api'
-import appeal from './modals/appeal'
-import hand from './modals/hand'
-import {  getTimes } from "@/utils";
+import { repealComplaints } from "./api";
+import appeal from "./modals/appeal";
+import hand from "./modals/hand";
+import { getTimes } from "@/utils";
 let nowTime = new Date();
 nowTime =
   nowTime.getFullYear() +
@@ -322,13 +338,13 @@ export default {
         signInStatus: null,
         signOutStatus: null,
         jobNature: null,
-         courseTime: [],
+        courseTime: [],
       },
       detail: null,
       appealVisible: false,
       handVisible: false,
       jobNature: jobNature, // 工作类型
-     
+
       courseType,
       // teacherList: [],
       tableList: [],
@@ -344,20 +360,23 @@ export default {
   },
   computed: {
     isEmptyQuery() {
-      return !Object.keys(cleanDeep({
-        ...this.searchForm,
-        // courseTime: this.courseTime,
-      })).length && !this.teacherAttendanceId
+      return (
+        !Object.keys(
+          cleanDeep({
+            ...this.searchForm,
+            // courseTime: this.courseTime,
+          })
+        ).length && !this.teacherAttendanceId
+      );
     },
     teacherAttendanceId() {
-      return this.$route.query.teacherAttendanceId
+      return this.$route.query.teacherAttendanceId;
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
-
-    if(this.searchForm.courseTime.length <=0)
-     this.searchForm.courseTime = [nowTime, nowTime]
+    if (this.searchForm.courseTime.length <= 0)
+      this.searchForm.courseTime = [nowTime, nowTime];
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
@@ -372,15 +391,14 @@ export default {
     //     this.organList = res.data;
     //   }
     // });
-    const { query } = this.$route
+    const { query } = this.$route;
     this.$store.dispatch("setBranchs");
     if (query.organId) {
-      this.searchForm.organId = query.organId
+      this.searchForm.organId = query.organId;
     }
     if (query.start || query.end) {
-      this.searchForm.courseTime = [query.start, query.end]
+      this.searchForm.courseTime = [query.start, query.end];
     } else {
-     
     }
     this.init();
   },
@@ -389,28 +407,28 @@ export default {
       this.getList();
     },
     getSearchValues() {
-         const { courseTime, ...rest } = this.searchForm;
+      const { courseTime, ...rest } = this.searchForm;
       let obj = {
         ...rest,
         page: this.rules.page,
         rows: this.rules.limit,
         attendanceStatus: this.$route.query.attendanceStatus,
         visitFlag: this.$route.query.visitFlag,
-        ...getTimes(courseTime,['courseStartDate','courseEndDate'])
+        ...getTimes(courseTime, ["courseStartDate", "courseEndDate"]),
       };
-      return obj
+      return obj;
     },
     reloadSearch() {
       if (this.isEmptyQuery) {
-        this.courseTime = [nowTime, nowTime]
+        this.courseTime = [nowTime, nowTime];
       }
-      this.getList()
+      this.getList();
     },
     getList() {
-      let obj = this.getSearchValues()
+      let obj = this.getSearchValues();
       if (this.isEmptyQuery) {
         this.$message.error("请至少选择一个条件");
-        return
+        return;
       }
       queryTeacherAttendances(obj).then((res) => {
         if (res.code == 200) {
@@ -424,38 +442,36 @@ export default {
       this.getList();
     },
     onReSet() {
-
-     
       this.$refs["searchForm"].resetFields();
-       this.searchForm.courseTime = [nowTime, nowTime];
+      this.searchForm.courseTime = [nowTime, nowTime];
       this.search();
     },
     hand(row) {
-      this.handVisible = true
-      this.detail = row
+      this.handVisible = true;
+      this.detail = row;
     },
     appeal(row) {
-      this.appealVisible = true
-      this.detail = row
+      this.appealVisible = true;
+      this.detail = row;
     },
     async unappeal(row) {
       try {
-        await this.$confirm('是否确认撤销申诉?', '提示', {
-          type: 'warning'
-        })
+        await this.$confirm("是否确认撤销申诉?", "提示", {
+          type: "warning",
+        });
         await repealComplaints({
           courseScheduleId: row.courseScheduleId,
           userId: row.teacherId,
-        })
-        this.$message.success('撤销成功')
-        this.getList()
+        });
+        this.$message.success("撤销成功");
+        this.getList();
       } catch (error) {}
     },
     onExport() {
-      let obj = this.getSearchValues()
+      let obj = this.getSearchValues();
       if (this.isEmptyQuery) {
         this.$message.error("请至少选择一个条件");
-        return
+        return;
       }
       let url = "/api-web/export/queryTeacherAttendances";
       const options = {
@@ -491,7 +507,7 @@ export default {
                 } else {
                   let objectUrl = URL.createObjectURL(blob);
                   let link = document.createElement("a");
-                  let fname = "考勤列表" + new Date().getTime()+'.xls'; //下载文件的名字
+                  let fname = "考勤列表" + new Date().getTime() + ".xls"; //下载文件的名字
                   link.href = objectUrl;
                   link.setAttribute("download", fname);
                   document.body.appendChild(link);

+ 6 - 5
src/views/setSilder/addSilder.vue

@@ -133,9 +133,9 @@
                       :label-width="formLabelWidth">
           <el-select v-model.trim="form.keepAlive">
             <el-option label="是"
-                       value="0"></el-option>
+                       :value="0"></el-option>
             <el-option label="否"
-                       value="1"></el-option>
+                      :value="1"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="菜单类型"
@@ -186,7 +186,7 @@ export default {
         hid: 1,
         type: 1,
         parentPermission: null,
-        keepAlive: '1'
+        keepAlive: 1
       },
       rules: {
         name: [{ required: true, message: "请输入菜单名", trigger: "blur" }],
@@ -256,6 +256,7 @@ export default {
       this.$refs["ruleForm"].validate(valid => {
         if (valid) {
           let form = this.form
+
           if (this.operationType == 'create') {
             addSilder({
               path: form.path,
@@ -323,7 +324,7 @@ export default {
           sort: res.sort,
           hid: res.hid,
           type: res.type,
-          keepAlive: res.keepAlive,
+          keepAlive: res.keepAlive*1,
           parentPermission: res.parentPermission,
           memo: res.memo
         }
@@ -354,7 +355,7 @@ export default {
         hid: 1,
         type: 1,
         parentPermission: null,
-        keepAlive: null
+        keepAlive: 1
       }
       this.$refs[formName].resetFields()
     }