|
@@ -1,10 +1,192 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <component
|
|
|
- :is="key"
|
|
|
- v-for="key in Object.keys(tablesData)"
|
|
|
- :key="key"
|
|
|
- ></component>
|
|
|
+ <div class="studyRecordTable">
|
|
|
+ <div class="studyStyle">
|
|
|
+ <div class="a_style">
|
|
|
+ <i></i>
|
|
|
+ <span>视频审核进度</span>
|
|
|
+ <div class="flex_style_study">
|
|
|
+ <div class="num_style" style="color: #0047d0">
|
|
|
+ 待审:{{ userData.pending }}节
|
|
|
+ </div>
|
|
|
+ <div class="num_style" style="color: #e53935">
|
|
|
+ 作弊:{{ userData.cheat }}节
|
|
|
+ </div>
|
|
|
+ <div class="num_style" style="color: #43a047">
|
|
|
+ 通过:{{ userData.pass }}节
|
|
|
+ </div>
|
|
|
+ <div style="clear: both"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="a_style">
|
|
|
+ <i></i>
|
|
|
+ <span>做题审核进度</span>
|
|
|
+ <div class="flex_style_study">
|
|
|
+ <div class="num_style" style="color: #0047d0">
|
|
|
+ 待审:{{ userData.examPending }}节
|
|
|
+ </div>
|
|
|
+ <div class="num_style" style="color: #e53935">
|
|
|
+ 作弊:{{ userData.examCheat }}节
|
|
|
+ </div>
|
|
|
+ <div class="num_style" style="color: #43a047">
|
|
|
+ 通过:{{ userData.examPass }}节
|
|
|
+ </div>
|
|
|
+ <div style="clear: both"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="a_style" style="width: 280px">
|
|
|
+ <i></i>
|
|
|
+ <span>学时审批状态</span>
|
|
|
+ <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
|
|
|
+ ? "审核中"
|
|
|
+ : "未知状态,请联系管理员"
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ <div style="clear: both"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="s_sd">
|
|
|
+ <span v-if="userData.periodStatus !== 3">
|
|
|
+ <el-checkbox
|
|
|
+ v-if="userData.periodStatus === 2"
|
|
|
+ :disabled="!allIds.length"
|
|
|
+ :indeterminate="isIndeterminate"
|
|
|
+ v-model="checkAll"
|
|
|
+ @change="handleCheckAllChange"
|
|
|
+ >待审全选</el-checkbox
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ style="margin-left: 10px"
|
|
|
+ size="mini"
|
|
|
+ type="success"
|
|
|
+ v-if="userData.periodStatus === 2"
|
|
|
+ @click="getChangeStatus(1)"
|
|
|
+ >勾选通过</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="danger"
|
|
|
+ v-if="userData.periodStatus === 2"
|
|
|
+ @click="getChangeStatus(2)"
|
|
|
+ >勾选作弊</el-button
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+ <span v-else>
|
|
|
+ <el-button style="margin-left: 10px" size="mini" @click="checkBack"
|
|
|
+ >勾选数据,打回待审核状态</el-button
|
|
|
+ >
|
|
|
+ <el-button size="mini" type="warning" @click="approvedOK = true"
|
|
|
+ >确认审核通过结果</el-button
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="tablesBoxs">
|
|
|
+ <el-checkbox-group
|
|
|
+ v-model="checkList"
|
|
|
+ @change="handleCheckedCitiesChange"
|
|
|
+ >
|
|
|
+ <component
|
|
|
+ :is="keys[index]"
|
|
|
+ v-for="(item, index) in tablesData"
|
|
|
+ :key="index"
|
|
|
+ :tabledata="item"
|
|
|
+ ></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"
|
|
|
+ >
|
|
|
+ <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>
|
|
|
+ </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"
|
|
|
+ >
|
|
|
+ <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>
|
|
|
+ <div>
|
|
|
+ 确定所勾选的内容,审核结果为【通过】?<br />
|
|
|
+ 确认后,初审不可再修改,请检查清楚再操作!
|
|
|
+ </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>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -15,18 +197,256 @@ import LessonTable from "./LessonTable.vue";
|
|
|
export default {
|
|
|
props: {
|
|
|
tablesData: {
|
|
|
+ type: Array,
|
|
|
+ default: () => {
|
|
|
+ return [];
|
|
|
+ },
|
|
|
+ },
|
|
|
+ userData: {
|
|
|
type: Object,
|
|
|
default: () => {
|
|
|
return {};
|
|
|
},
|
|
|
},
|
|
|
+ setData: {
|
|
|
+ type: Object,
|
|
|
+ default: () => {
|
|
|
+ return {};
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ provide() {
|
|
|
+ return {
|
|
|
+ userData: this.userData,
|
|
|
+ };
|
|
|
},
|
|
|
data() {
|
|
|
- return {};
|
|
|
+ return {
|
|
|
+ checkList: [],
|
|
|
+ allIds: [],
|
|
|
+ checkAll: false,
|
|
|
+ isIndeterminate: false,
|
|
|
+ vidBoxHours: false,
|
|
|
+ through: false,
|
|
|
+ formData: {
|
|
|
+ cheating_reason: "",
|
|
|
+ },
|
|
|
+ statusPop: "", //1单个2批量
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ handleCheckedCitiesChange(value) {
|
|
|
+ let checkedCount = value.length;
|
|
|
+ if (checkedCount) {
|
|
|
+ this.checkAll = checkedCount === this.allIds.length;
|
|
|
+ } else {
|
|
|
+ this.checkAll = false;
|
|
|
+ }
|
|
|
+ this.isIndeterminate =
|
|
|
+ checkedCount > 0 && checkedCount < this.allIds.length;
|
|
|
+ },
|
|
|
+ handleCheckAllChange(val) {
|
|
|
+ this.checkList = val ? this.allIds : [];
|
|
|
+ this.isIndeterminate = false;
|
|
|
+ },
|
|
|
+ getAllId(data) {
|
|
|
+ if (!data || !data.length) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ data.forEach((ele) => {
|
|
|
+ if (ele.type == 3 || ele.type == 4) {
|
|
|
+ ele.status === 2 && this.allIds.push(ele.periodStatusId);
|
|
|
+ } else {
|
|
|
+ this.getAllId(
|
|
|
+ ele.type == 1 ? ele.classPeriods : ele.classPeriodSectionList
|
|
|
+ );
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getChangeStatus(int) {
|
|
|
+ if (!this.checkList.length) {
|
|
|
+ this.$message.warning("请勾选需要操作的待审核数据");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var data = {
|
|
|
+ gradeId: Number(this.setData.id),
|
|
|
+ userId: Number(this.setData.userId),
|
|
|
+ goodsId: Number(this.setData.goodsId),
|
|
|
+ };
|
|
|
+ if (int === 1) {
|
|
|
+ data.status = 1;
|
|
|
+ this.through = true;
|
|
|
+ }
|
|
|
+ if (int === 2) {
|
|
|
+ data.status = 0;
|
|
|
+ this.statusPop = 2;
|
|
|
+ this.formData.cheating_reason = "";
|
|
|
+ this.vidBoxHours = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ 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 = {
|
|
|
+ gradeId: Number(this.setData.id),
|
|
|
+ userId: Number(this.setData.userId),
|
|
|
+ goodsId: Number(this.setData.goodsId),
|
|
|
+ ids: this.checkList,
|
|
|
+ };
|
|
|
+ if (int === 1) {
|
|
|
+ data.status = 1;
|
|
|
+ }
|
|
|
+ if (int === 2) {
|
|
|
+ data.auditReason = msg;
|
|
|
+ data.status = 0;
|
|
|
+ }
|
|
|
+ this.$api
|
|
|
+ .editGradeUsereditPeriodeAll(data)
|
|
|
+ .then(async (res) => {
|
|
|
+ if (int === 1) {
|
|
|
+ this.$message.success("状态全部通过修改成功");
|
|
|
+ this.through = false;
|
|
|
+ }
|
|
|
+ if (int === 2) {
|
|
|
+ this.$message.success("状态全部作弊修改成功");
|
|
|
+ this.vidBoxHours = false;
|
|
|
+ }
|
|
|
+ this.checkList = [];
|
|
|
+ this.isIndeterminate = false;
|
|
|
+ this.checkAll = false;
|
|
|
+ // await this.getUserInfo();
|
|
|
+ // this.search();
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.disabledBtn = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.keys = {
|
|
|
+ 0: "ModulTable",
|
|
|
+ 1: "ChapterTable",
|
|
|
+ 2: "LessonTable",
|
|
|
+ 4: "ChapterTable",
|
|
|
+ };
|
|
|
+ this.tablesData.map(this.getAllId);
|
|
|
},
|
|
|
components: { ModulTable, LessonTable, ChapterTable },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.studyRecordTable {
|
|
|
+ height: 100%;
|
|
|
+ .studyStyle {
|
|
|
+ margin: 16px 0px 0px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ & > .a_style {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin: 0px 16px 16px 0px;
|
|
|
+ padding: 11px 16px;
|
|
|
+ box-shadow: 0px 0px 8px 0px rgba(217, 217, 217, 0.8);
|
|
|
+ border-radius: 4px;
|
|
|
+ height: 40px;
|
|
|
+ width: 440px;
|
|
|
+ user-select: none;
|
|
|
+ i {
|
|
|
+ width: 2px;
|
|
|
+ height: 18px;
|
|
|
+ display: inline-block;
|
|
|
+ background-color: #0047d0;
|
|
|
+ margin-right: 8px;
|
|
|
+ }
|
|
|
+ span {
|
|
|
+ color: #666;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ .flex_style_study {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+ .num_style {
|
|
|
+ float: right;
|
|
|
+ font-size: 14px;
|
|
|
+ margin-left: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .s_sd {
|
|
|
+ flex: 1;
|
|
|
+ justify-content: flex-end;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ flex-shrink: 0;
|
|
|
+ margin: 0px 16px 16px 0px;
|
|
|
+ .dis_colu {
|
|
|
+ height: 55px;
|
|
|
+ margin-right: 14px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-around;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .tablesBoxs {
|
|
|
+ height: calc(100% - 360px);
|
|
|
+ overflow-x: auto;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|