浏览代码

模块卷改写完成

谢杰标 3 年之前
父节点
当前提交
0a2820ee06

+ 105 - 0
src/components/BaseDialog.vue

@@ -0,0 +1,105 @@
+<template>
+  <el-dialog
+    :visible.sync="visible"
+    :width="width"
+    :show-close="false"
+    :close-on-click-modal="false"
+    :append-to-body="appendToBody"
+    @closed="close"
+  >
+    <div slot="title" class="hearders">
+      <div class="leftTitle">{{ title }}</div>
+      <div class="rightBoxs">
+        <img
+          src="@/assets/images/Close@2x.png"
+          alt=""
+          @click="visible = false"
+        />
+      </div>
+    </div>
+    <slot></slot>
+    <div slot="footer" class="dialog-footer" v-if="isShowFooter">
+      <el-button :loading="disabledBtn" @click="visible = false">{{
+        cancelName
+      }}</el-button>
+      <el-button :loading="disabledBtn" type="primary" @click="confirmBtn">{{
+        confirmName
+      }}</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  name: "BaseDialog",
+  props: {
+    title: {
+      type: String,
+      default: "",
+    },
+    isShow: {
+      type: Boolean,
+      default: false,
+    },
+    width: {
+      type: String,
+      default: "600px",
+    },
+    cancelName: {
+      type: String,
+      default: "取 消",
+    },
+    confirmName: {
+      type: String,
+      default: "确 定",
+    },
+    isShowFooter: {
+      type: Boolean,
+      default: true,
+    },
+    appendToBody: {
+      type: Boolean,
+      default: false,
+    },
+    disabledBtn: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  data() {
+    return {};
+  },
+  methods: {
+    confirmBtn() {
+      this.$emit("submit", "123");
+    },
+    close() {
+      this.$emit("close");
+    },
+  },
+  computed: {
+    visible: {
+      get() {
+        return this.isShow;
+      },
+      set(val) {
+        this.$emit("update:isShow", false);
+      },
+    },
+  },
+
+  watch: {
+    visible(val) {
+      // 在此做显示与隐藏的交互
+      if (val === false) {
+        // 重置操作
+      } else {
+        // 展示时操作
+      }
+    },
+  },
+};
+</script>
+
+<style scoped lang="scss">
+</style>

+ 3 - 0
src/main.js

@@ -21,6 +21,8 @@ import './permission' // permission control
 import { getDicts } from "@/api/system/dict/data";
 import { getConfigKey } from "@/api/system/config";
 import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
+// 通用弹窗
+import BaseDialog from "@/components/BaseDialog";
 // 分页组件
 import Pagination from "@/components/Paginations";
 // 自定义表格工具组件
@@ -57,6 +59,7 @@ Vue.prototype.$bus = bus
 // 全局组件挂载
 Vue.component('DictTag', DictTag)
 Vue.component('Pagination', Pagination)
+Vue.component('BaseDialog', BaseDialog)
 Vue.component('RightToolbar', RightToolbar)
 Vue.component('Editor', Editor)
 Vue.component('FileUpload', FileUpload)

+ 7 - 3
src/views/education/classManageMent/classHoursReview/component/ChapterTable.vue

@@ -13,16 +13,16 @@
         'border-left-color': '#1565C0',
       }"
     >
-      <el-table-column label="章" type="expand" width="70px">
+      <el-table-column :label="label" type="expand" width="70px">
         <template slot-scope="scope">
           <Lesson-table
-            :tabledata="scope.row.classPeriodSectionList"
+            :tabledata="scope.row.classPeriodSectionList || []"
           ></Lesson-table>
         </template>
       </el-table-column>
       <el-table-column align="center" prop="realName" label="姓名">
       </el-table-column>
-      <el-table-column align="center" prop="typeName" label="章标题">
+      <el-table-column align="center" prop="typeName" :label="label + '标题'">
       </el-table-column>
       <el-table-column align="center" prop="classHours" label="学时">
       </el-table-column>
@@ -56,6 +56,10 @@ export default {
         return [];
       },
     },
+    label: {
+      type: String,
+      default: "章",
+    },
   },
   data() {
     return {};

+ 137 - 0
src/views/education/classManageMent/classHoursReview/component/CheatDialog.vue

@@ -0,0 +1,137 @@
+<template>
+  <Base-dialog
+    title="操作提示:"
+    :disabledBtn="disabledBtn"
+    :isShow.sync="isShow"
+    @submit="submitForm"
+    @close="close"
+  >
+    <el-form
+      :model="formData"
+      ref="formData"
+      label-width="80px"
+      label-position="right"
+    >
+      <el-form-item
+        label="作弊原因"
+        prop="cheating_reason"
+        :rules="[
+          {
+            required: true,
+            message: '请填写作弊原因',
+            trigger: ['blur', 'change'],
+          },
+        ]"
+      >
+        <el-input
+          v-model="formData.cheating_reason"
+          type="textarea"
+          :rows="4"
+          placeholder="请输入作弊原因"
+        ></el-input>
+      </el-form-item>
+      <ul style="padding-left: 80px">
+        <li
+          class="li_sty"
+          @click="uploadText(item.label)"
+          v-for="(item, index) in msgTitle"
+          :key="index"
+        >
+          {{ item.label }}
+        </li>
+      </ul>
+    </el-form>
+  </Base-dialog>
+</template>
+
+<script>
+export default {
+  props: {
+    vidBoxHours: {
+      type: Boolean,
+      default: false,
+    },
+    disabledBtn: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  data() {
+    return {
+      msgTitle: [
+        { label: "学习拍照异常", value: 1 },
+        {
+          label: "学习拍照太黑无法识别人像,请确保拍照光线充足并拍到全脸",
+          value: 2,
+        },
+        {
+          label: "学习拍照太模糊无法识别人像,请确保拍照光线充足并拍到全脸",
+          value: 3,
+        },
+        {
+          label: "学习拍照人像不全无法识别,请确保拍照光线充足并拍到全脸",
+          value: 4,
+        },
+      ],
+      formData: {
+        cheating_reason: "",
+      },
+    };
+  },
+  methods: {
+    submitForm() {
+      this.$refs.formData.validate((valid) => {
+        if (valid) {
+          this.$emit("submit", this.formData.cheating_reason);
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    uploadText(msg) {
+      this.formData.cheating_reason = msg;
+    },
+    close() {
+      this.$emit("close");
+    },
+  },
+  computed: {
+    isShow: {
+      get() {
+        return this.vidBoxHours;
+      },
+      set(val) {
+        this.$emit("update:vidBoxHours", false);
+      },
+    },
+  },
+  watch: {
+    vidBoxHours(val) {
+      if (val === false) {
+        this.uploadText("");
+      } else {
+        this.$nextTick(() => {
+          this.$refs.formData.clearValidate();
+        });
+      }
+    },
+  },
+};
+</script>
+
+<style  lang="less" scoped>
+.li_sty {
+  cursor: pointer;
+  transition: all 0.3s;
+  background-color: #eee;
+  padding: 0px 10px;
+  margin-bottom: 6px;
+  font-size: 12px;
+  line-height: 26px;
+  display: table;
+  &:hover {
+    box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, 0.2);
+  }
+}
+</style>

+ 43 - 42
src/views/education/classManageMent/classHoursReview/component/LessonTable.vue

@@ -68,7 +68,7 @@
                 size="small"
                 type="success"
                 :loading="disabledBtn"
-                @click="changeStatus(scope.row, 1, scope.$index)"
+                @click="changeStatus(scope.row.periodStatusId, 1)"
                 >通过</el-button
               >
               <el-button
@@ -76,7 +76,7 @@
                 class="btnstyles"
                 size="small"
                 type="danger"
-                @click="changeStatus(scope.row, 2, scope.$index)"
+                @click="changeStatus(scope.row.periodStatusId, 0)"
                 >作弊</el-button
               >
             </div>
@@ -85,7 +85,7 @@
       </el-table-column>
 
       <el-table-column
-        v-for="(item, index) in tableSet3"
+        v-for="(item, index) in tableSet"
         :width="item.width"
         :key="index"
         :label="item.label"
@@ -159,10 +159,15 @@
         </template>
       </el-table-column>
     </el-table>
+    <Cheat-dialog
+      :vidBoxHours.sync="vidBoxHours"
+      @submit="submit"
+    ></Cheat-dialog>
   </div>
 </template>
 
 <script>
+import CheatDialog from "./CheatDialog.vue";
 export default {
   props: {
     tabledata: {
@@ -172,10 +177,10 @@ export default {
       },
     },
   },
-  inject: ["userData"],
+  inject: ["userData", "getUserInfo"],
   data() {
     return {
-      tableSet3: [
+      tableSet: [
         {
           label: "选择",
           prop: "numIndex",
@@ -258,9 +263,30 @@ export default {
         },
       ],
       disabledBtn: false,
+      vidBoxHours: false,
+      formData: {
+        status: "",
+        id: "",
+      },
     };
   },
   methods: {
+    submit(text) {
+      this.formData.auditReason = text;
+      this.$api
+        .editGradeUsereditPeriode(this.formData)
+        .then((res) => {
+          this.$message.success("修改成功");
+          this.vidBoxHours = false;
+          this.getUserInfo(true);
+        })
+        .finally(() => {
+          this.disabledBtn = false;
+        });
+    },
+    loadingClose() {
+      this.disabledBtn = false;
+    },
     comput(item) {
       var ast = item.studyEndTime - item.studyStartTime;
       if (ast < item.durationTime) {
@@ -294,48 +320,23 @@ export default {
         this.getUserInfo();
       });
     },
-    changeStatus(item, int, index1, msg) {
-      var data = {
-        id: item.periodStatusId,
+    changeStatus(id, status) {
+      this.formData = {
+        status,
+        id,
       };
-      if (int === 1) {
-        this.disabledBtn = true;
-        data.status = 1;
-      }
-      if (int === 2) {
-        if (msg) {
-          data.status = 0;
-          data.auditReason = msg;
-        } else {
-          this.copyDatas = {
-            type: 3,
-            item: item,
-            int: int,
-            index1: index1,
-          };
-          this.statusPop = 1; // 1单个点击状态 2批量点击状态
-          this.formData.cheating_reason = "";
-          this.vidBoxHours = true;
-          return;
-        }
+      if (status == 0) {
+        this.vidBoxHours = true;
+      } else {
+        this.submit();
       }
-      this.$api
-        .editGradeUsereditPeriode(data)
-        .then((res) => {
-          this.$message.success("修改成功");
-          this.vidBoxHours = false;
-          this.getNewList(index1, item.numIndex, item);
-          this.checkUpload(item.periodStatusId);
-        })
-        .finally(() => {
-          this.disabledBtn = false;
-        });
     },
   },
-  created() {
-    
-  },
+  created() {},
   mounted() {},
+  components: {
+    CheatDialog,
+  },
 };
 </script>
 

+ 9 - 1
src/views/education/classManageMent/classHoursReview/component/ModulTable.vue

@@ -15,7 +15,15 @@
     >
       <el-table-column label="模块" type="expand" width="70px">
         <template slot-scope="scope">
-          <Chapter-table :tabledata="scope.row.classPeriods"></Chapter-table>
+          <Chapter-table
+            v-if="scope.row.classPeriods.length"
+            :tabledata="scope.row.classPeriods"
+          ></Chapter-table>
+          <Chapter-table
+            v-if="scope.row.arr"
+            label="卷"
+            :tabledata="scope.row.arr"
+          ></Chapter-table>
         </template>
       </el-table-column>
       <el-table-column align="center" prop="realName" label="姓名">

+ 190 - 154
src/views/education/classManageMent/classHoursReview/component/StudyTables.vue

@@ -39,17 +39,9 @@
         <div class="flex_style_study">
           <div class="num_style" style="color: #0047d0">
             {{
-              userData.periodStatus === 0
-                ? "未通过"
-                : userData.periodStatus === 2
-                ? "待审核"
-                : userData.periodStatus === -1
-                ? "不可审核"
-                : userData.periodStatus === 1
-                ? "通过审核"
-                : userData.periodStatus === 3
-                ? "审核中"
-                : "未知状态,请联系管理员"
+              ["不可审核", "未通过", "通过审核", "待审核", "审核中"][
+                userData.periodStatus + 1
+              ]
             }}
           </div>
           <div style="clear: both"></div>
@@ -97,96 +89,86 @@
         @change="handleCheckedCitiesChange"
       >
         <component
-          :is="keys[index]"
-          v-for="(item, index) in tablesData"
-          :key="index"
-          :tabledata="item"
+          :is="keys[key]"
+          v-for="key in Object.keys(tablesData)"
+          :key="key"
+          :tabledata="tablesData[key]"
+          :lable="key == 5 ? '卷' : '章'"
         ></component>
       </el-checkbox-group>
     </div>
-    <el-dialog
-      @closed="loadingClose"
-      :visible.sync="vidBoxHours"
-      v-if="vidBoxHours"
-      width="560px"
-      :show-close="false"
-      :close-on-click-modal="false"
+    <Cheat-dialog
+      :disabledBtn="disabledBtn"
+      :vidBoxHours.sync="vidBoxHours"
+      @close="loadingClose"
+      @submit="
+        (reason) => {
+          submitOK(2, reason);
+        }
+      "
+    ></Cheat-dialog>
+    <Base-dialog
+      title="操作提示:"
+      :disabledBtn="disabledBtn"
+      :isShow.sync="through"
+      @close="loadingClose"
+      @submit="
+        () => {
+          submitOK(1);
+        }
+      "
     >
-      <div slot="title" class="hearders">
-        <div class="leftTitle">操作提示:</div>
-        <div class="rightBoxs">
-          <img
-            src="@/assets/images/Close@2x.png"
-            alt=""
-            @click="vidBoxHours = false"
-          />
-        </div>
-      </div>
       <div>
-        <el-form
-          :model="formData"
-          :rules="rules"
-          ref="formData"
-          label-width="80px"
-          label-position="right"
-        >
-          <el-form-item label="作弊原因" prop="cheating_reason">
-            <el-input
-              v-model="formData.cheating_reason"
-              type="textarea"
-              :rows="4"
-              placeholder="请输入作弊原因"
-            ></el-input>
-            <ul>
-              <li
-                class="li_sty"
-                @click="uploadText(item.label)"
-                v-for="(item, index) in msgTitle"
-                :key="index"
-              >
-                {{ item.label }}
-              </li>
-            </ul>
-          </el-form-item>
-        </el-form>
+        确定所勾选的内容,审核结果为【通过】?<br />
+        确认后,初审不可再修改,请检查清楚再操作!
       </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button :loading="disabledBtn" @click="vidBoxHours = false"
-          >取 消</el-button
-        >
-        <el-button :loading="disabledBtn" @click="submitForm('formData')"
-          >确 定</el-button
-        >
-      </span>
-    </el-dialog>
-    <el-dialog
-      @closed="loadingClose"
-      :visible.sync="through"
-      width="560px"
-      :show-close="false"
-      :close-on-click-modal="false"
+    </Base-dialog>
+    <Base-dialog
+      title="操作提示:"
+      :disabledBtn="disabledBtn"
+      :isShow.sync="popback"
+      @close="loadingClose"
+      @submit="uploadForm"
     >
-      <div slot="title" class="hearders">
-        <div class="leftTitle">操作提示:</div>
-        <div class="rightBoxs">
-          <img
-            src="@/assets/images/Close@2x.png"
-            alt=""
-            @click="through = false"
-          />
+      <div>
+        <div style="color: red">
+          <h4 style="margin: 0px">当前勾选了{{ checkList.length }}条数据:</h4>
+          <ul style="margin: 0px 0px 6px; max-height: 500px; overflow: auto">
+            <li v-for="(item, index) in checkList" :key="index">
+              {{ index + 1 }}.{{ getSecName(item) }}
+            </li>
+          </ul>
+        </div>
+        <div style="text-align: center; font-weight: bold">
+          所选数据,确定要打回待审核状态吗?<br />
+          打回后,重新走审核流程,请慎重操作。
         </div>
       </div>
+    </Base-dialog>
+    <Base-dialog
+      title="操作提示:"
+      :disabledBtn="disabledBtn"
+      :isShow.sync="approvedOK"
+      @close="loadingClose"
+      @submit="approvedOKFunc"
+    >
       <div>
-        确定所勾选的内容,审核结果为【通过】?<br />
-        确认后,初审不可再修改,请检查清楚再操作!
+        <div style="color: red">
+          <h4 style="margin: 0px">确认审核通过结果后:</h4>
+          <ul style="margin: 0px 0px 6px">
+            <li>
+              (1)有做官方接口的,自动触发【学时官方推送】<br />
+              (2)公开【学习学时记录-学时记录】按钮,权限人可查看【审核结果】<br />
+              (3)有匹配的预约考试,可走预约流程
+            </li>
+          </ul>
+        </div>
+        <div style="font-weight: bold; margin-top: 20px">
+          确认提交审核通过结果?<br />
+          确认后,不能再修改,请慎重操作。
+        </div>
       </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button :loading="disabledBtn" @click="through = false"
-          >取 消</el-button
-        >
-        <el-button :loading="disabledBtn" @click="submitOK(1)">确 定</el-button>
-      </span>
-    </el-dialog>
+    </Base-dialog>
   </div>
 </template>
 
@@ -194,12 +176,13 @@
 import ModulTable from "./ModulTable.vue";
 import ChapterTable from "./ChapterTable.vue";
 import LessonTable from "./LessonTable.vue";
+import CheatDialog from "./CheatDialog.vue";
 export default {
   props: {
     tablesData: {
-      type: Array,
+      type: Object,
       default: () => {
-        return [];
+        return {};
       },
     },
     userData: {
@@ -214,10 +197,15 @@ export default {
         return {};
       },
     },
+    getUserInfo: {
+      type: Function,
+      default: () => {},
+    },
   },
   provide() {
     return {
       userData: this.userData,
+      getUserInfo: this.getUserInfo,
     };
   },
   data() {
@@ -228,14 +216,46 @@ export default {
       isIndeterminate: false,
       vidBoxHours: false,
       through: false,
+      popback: false,
+      approvedOK: false,
+      disabledBtn: false,
       formData: {
         cheating_reason: "",
       },
       statusPop: "", //1单个2批量
+      rules: {
+        cheating_reason: [
+          {
+            required: true,
+            message: "请填写作弊原因",
+            trigger: ["blur", "change"],
+          },
+        ],
+      },
+      msgTitle: [
+        { label: "学习拍照异常", value: 1 },
+        {
+          label: "学习拍照太黑无法识别人像,请确保拍照光线充足并拍到全脸",
+          value: 2,
+        },
+        {
+          label: "学习拍照太模糊无法识别人像,请确保拍照光线充足并拍到全脸",
+          value: 3,
+        },
+        {
+          label: "学习拍照人像不全无法识别,请确保拍照光线充足并拍到全脸",
+          value: 4,
+        },
+      ],
+      allType3List: [],
     };
   },
   methods: {
+    submitAllSlect(reason) {
+      this.submitOK(2, reason);
+    },
     handleCheckedCitiesChange(value) {
+      console.log(value, 132);
       let checkedCount = value.length;
       if (checkedCount) {
         this.checkAll = checkedCount === this.allIds.length;
@@ -255,6 +275,7 @@ export default {
       }
       data.forEach((ele) => {
         if (ele.type == 3 || ele.type == 4) {
+          this.allType3List.push(ele);
           ele.status === 2 && this.allIds.push(ele.periodStatusId);
         } else {
           this.getAllId(
@@ -287,59 +308,6 @@ export default {
     loadingClose() {
       this.disabledBtn = false;
     },
-    submitForm(formName) {
-      this.$refs[formName].validate((valid) => {
-        if (valid) {
-          if (this.statusPop === 1) {
-            this.formSubmits();
-          }
-          if (this.statusPop === 2) {
-            this.submitOK(2, this.formData.cheating_reason);
-          }
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-    formSubmits() {
-      this.disabledBtn = true;
-      var self = this;
-      switch (this.copyDatas.type) {
-        case 1:
-          self.changeStatusModule(
-            this.copyDatas.item,
-            this.copyDatas.int,
-            this.copyDatas.index1,
-            this.copyDatas.index2,
-            this.copyDatas.index3,
-            this.formData.cheating_reason
-          );
-          break;
-        case 2:
-          self.changeStatusCharpter(
-            this.copyDatas.item,
-            this.copyDatas.int,
-            this.copyDatas.index1,
-            this.copyDatas.index2,
-            this.formData.cheating_reason
-          );
-          break;
-        case 3:
-          self.changeStatus(
-            this.copyDatas.item,
-            this.copyDatas.int,
-            this.copyDatas.index1,
-            this.formData.cheating_reason
-          );
-          break;
-
-        default:
-          this.$message.warning("提交失败,请联系管理人员检查问题");
-          this.disabledBtn = false;
-          break;
-      }
-    },
     submitOK(int, msg) {
       this.disabledBtn = true;
       var data = {
@@ -357,7 +325,7 @@ export default {
       }
       this.$api
         .editGradeUsereditPeriodeAll(data)
-        .then(async (res) => {
+        .then((res) => {
           if (int === 1) {
             this.$message.success("状态全部通过修改成功");
             this.through = false;
@@ -369,8 +337,66 @@ export default {
           this.checkList = [];
           this.isIndeterminate = false;
           this.checkAll = false;
-          // await this.getUserInfo();
-          // this.search();
+          this.getUserInfo(true);
+        })
+        .catch(() => {
+          this.disabledBtn = false;
+        });
+    },
+    getSecName(id) {
+      try {
+        return this.allType3List.find((e) => e.periodStatusId == id).typeName;
+      } catch (error) {
+        return "";
+      }
+    },
+    uploadText(msg) {
+      this.formData.cheating_reason = msg;
+    },
+    checkBack() {
+      if (!this.checkList.length) {
+        this.$message.warning("请勾选数据");
+        return;
+      }
+      this.popback = true;
+    },
+    // 打回审核状态
+    uploadForm() {
+      this.disabledBtn = true;
+      let data = {
+        gradeId: Number(this.setData.id),
+        userId: Number(this.setData.userId),
+        goodsId: Number(this.setData.goodsId),
+        ids: this.checkList,
+      };
+      this.$api
+        .editGradeUsereditrollbackPeriod(data)
+        .then((res) => {
+          this.checkList = []; //勾选列表
+          this.isIndeterminate = false; //待审半选
+          this.checkAll = false; //全选状态
+          this.getUserInfo(true);
+          this.$message.success("已打回待审核状态");
+          this.popback = false;
+        })
+        .catch(() => {
+          this.disabledBtn = false;
+        });
+    },
+    // 确认审核结果
+    approvedOKFunc() {
+      this.disabledBtn = true;
+      let data = {
+        gradeId: Number(this.setData.id),
+        userId: Number(this.setData.userId),
+        goodsId: Number(this.setData.goodsId),
+      };
+      this.$api
+        .editGradeUsereditrollconfirmPeriod(data)
+        .then((res) => {
+          this.getUserInfo(true);
+          this.$message.success("审核通过");
+          this.approvedOK = false;
         })
         .catch(() => {
           this.disabledBtn = false;
@@ -379,14 +405,24 @@ export default {
   },
   created() {
     this.keys = {
-      0: "ModulTable",
-      1: "ChapterTable",
-      2: "LessonTable",
-      4: "ChapterTable",
+      1: "ModulTable",
+      2: "ChapterTable",
+      3: "LessonTable",
+      5: "ChapterTable",
     };
-    this.tablesData.map(this.getAllId);
   },
-  components: { ModulTable, LessonTable, ChapterTable },
+  components: { ModulTable, LessonTable, ChapterTable, CheatDialog },
+  watch: {
+    tablesData: {
+      handler() {
+        for (const key in this.tablesData) {
+          this.getAllId(this.tablesData[key]);
+        }
+      },
+      immediate: true,
+      deep: true,
+    },
+  },
 };
 </script>
 

+ 31 - 32
src/views/education/classManageMent/classHoursReview/studyTimes.vue

@@ -188,10 +188,11 @@
     </div>
 
     <Study-tables
-      v-if="tablesData.length"
+      v-if="tablesData"
       :tablesData="tablesData"
       :userData="userData"
       :setData="setData"
+      :getUserInfo="getUserInfo"
     ></Study-tables>
 
     <div style="flex: 1; flex-shrink: 0; overflow: auto" v-if="!true">
@@ -1229,7 +1230,7 @@ export default {
       allArrays: [], //审核中-所有数据
       popback: false, //打回待审核弹窗
       approvedOK: false, //确认审核通过结果
-      tablesData: [],
+      tablesData: undefined,
     };
   },
   computed: {
@@ -1303,9 +1304,8 @@ export default {
         }
       });
   },
-  async mounted() {
-    await this.getUserInfo();
-    this.search();
+  mounted() {
+    this.getUserInfo(true);
   },
   methods: {
     loadingClose() {
@@ -1335,9 +1335,8 @@ export default {
       };
       this.$api
         .editGradeUsereditrollconfirmPeriod(data)
-        .then(async (res) => {
-          await this.getUserInfo();
-          this.search();
+        .then((res) => {
+          this.getUserInfo(true);
           this.$message.success("审核通过");
           this.approvedOK = false;
         })
@@ -1358,12 +1357,11 @@ export default {
       };
       this.$api
         .editGradeUsereditrollbackPeriod(data)
-        .then(async (res) => {
+        .then((res) => {
           this.checkList = []; //勾选列表
           this.isIndeterminate = false; //待审半选
           this.checkAll = false; //全选状态
-          await this.getUserInfo();
-          this.search();
+          this.getUserInfo(true);
           this.$message.success("已打回待审核状态");
           this.popback = false;
         })
@@ -1670,7 +1668,7 @@ export default {
       }
       this.$api
         .editGradeUsereditPeriodeAll(data)
-        .then(async (res) => {
+        .then((res) => {
           if (int === 1) {
             this.$message.success("状态全部通过修改成功");
             this.through = false;
@@ -1682,8 +1680,7 @@ export default {
           this.checkList = []; //勾选列表
           this.isIndeterminate = false; //待审半选
           this.checkAll = false; //全选状态
-          await this.getUserInfo();
-          this.search();
+          this.getUserInfo(true);
         })
         .catch(() => {
           this.disabledBtn = false;
@@ -1785,24 +1782,27 @@ export default {
       });
     },
     //获取用户信息
-    getUserInfo() {
-      return new Promise((resolve, reject) => {
-        this.$api
-          .inquireGradegradelistUserlistPeriod({
-            gradeId: this.setData.id,
-            userId: this.setData.userId,
-            goodsId: this.setData.goodsId,
-          })
-          .then((res) => {
-            this.userData = res.rows[0];
-            resolve();
-          });
-      });
+    getUserInfo(isS = false) {
+      this.$api
+        .inquireGradegradelistUserlistPeriod({
+          gradeId: this.setData.id,
+          userId: this.setData.userId,
+          goodsId: this.setData.goodsId,
+        })
+        .then((res) => {
+          this.userData = res.rows[0];
+          isS && this.search();
+        });
     },
     changeData(data) {
-      let arr = [];
-      data.forEach((e) => (arr[e.type - 1] || (arr[e.type - 1] = [])).push(e));
-      this.tablesData = arr;
+      let obj = {};
+      data.forEach((e) => (obj[e.type] || (obj[e.type] = [])).push(e));
+      if (obj["2"]) {
+        obj["5"] = obj["2"];
+        delete obj["2"];
+      }
+      console.log(data,obj,123123)
+      return obj;
     },
     //获取学时审核数据
     search() {
@@ -1819,7 +1819,7 @@ export default {
           /**
            * 将模块 章 节进行分类 tab1/tab2/tab3
            */
-          this.changeData(res.rows);
+          this.tablesData = this.changeData(res.rows);
           let tab1 = [];
           let tab2 = [];
           let tab3 = [];
@@ -1893,7 +1893,6 @@ export default {
             }
           });
           this.getAllList = getAllList1.concat(getAllList2.concat(getAllList3));
-          console.log(this.getAllList, "addd");
           this.allArrays = allArrays;
           this.listData.tableData1 = tab1;
           this.listData.tableData2 = tab2;