|
@@ -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>
|
|
|
|