|
@@ -0,0 +1,358 @@
|
|
|
+<template>
|
|
|
+ <div id="">
|
|
|
+ <search-box-new
|
|
|
+ ref="searchBox"
|
|
|
+ :formData="formData"
|
|
|
+ :formList="formList"
|
|
|
+ @search="search"
|
|
|
+ @init="search(2)"
|
|
|
+ />
|
|
|
+ <table-list
|
|
|
+ :tableSets="tableSet"
|
|
|
+ :tableData="tableData"
|
|
|
+ :navText="navText"
|
|
|
+ :loading="loading"
|
|
|
+ >
|
|
|
+ <template slot="btn" slot-scope="props">
|
|
|
+ <el-button type="text" @click="jumpPage(props.scope.row)"
|
|
|
+ >学习记录</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </table-list>
|
|
|
+ <pagination
|
|
|
+ :total="total"
|
|
|
+ :pageSize="formData.pageSize"
|
|
|
+ :currentPage="formData.pageNum"
|
|
|
+ @handleSizeChange="handleSizeChange"
|
|
|
+ @handleCurrentChange="handleCurrentChange"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import searchBoxNew from "@/components/searchBoxNew";
|
|
|
+import tableList from "@/components/tableList";
|
|
|
+import pagination from "@/components/pagination";
|
|
|
+export default {
|
|
|
+ name: "",
|
|
|
+ components: { searchBoxNew, tableList, pagination },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ size: "small",
|
|
|
+ loading: false, //当前表单加载是否加载动画
|
|
|
+ navText: {
|
|
|
+ title: "学习列表",
|
|
|
+ index: 0,
|
|
|
+ ch: "条",
|
|
|
+ num: false,
|
|
|
+ border: true,
|
|
|
+ choice: true,
|
|
|
+ tableHide:true,
|
|
|
+ addHide: true,
|
|
|
+ backFatherBtn: {
|
|
|
+ status: false,
|
|
|
+ title: "未定义",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ formList: [
|
|
|
+ {
|
|
|
+ placeholder: "学员姓名",
|
|
|
+ prop: "realname",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ placeholder: "身份证",
|
|
|
+ prop: "idCard",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ placeholder: "公司名称",
|
|
|
+ prop: "companyName",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ placeholder: "手机号码",
|
|
|
+ prop: "telphone",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ formData: {
|
|
|
+ realname: "",
|
|
|
+ idcard: "",
|
|
|
+ companyName: "",
|
|
|
+ telphone: "",
|
|
|
+ profileStatus: "",
|
|
|
+ periodStatus: "",
|
|
|
+ status: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ pageNum: 1,
|
|
|
+ },
|
|
|
+ // 表单
|
|
|
+ tableSet: [
|
|
|
+ {
|
|
|
+ label: "基本信息",
|
|
|
+ prop1: "realName",
|
|
|
+ prop2: "idCard",
|
|
|
+ prop3: "companyName",
|
|
|
+ hidden: true,
|
|
|
+ scope: "baseInfo",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "头像",
|
|
|
+ prop: "oneInchPhotos",
|
|
|
+ hidden: true,
|
|
|
+ scope: "img",
|
|
|
+ width: "120px",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "最新拍照",
|
|
|
+ prop: "idCardImg1",
|
|
|
+ hidden: true,
|
|
|
+ scope: "img",
|
|
|
+ width: "120px",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "学习班名称",
|
|
|
+ prop: "className",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "视频名称",
|
|
|
+ prop: "sectionName",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "在线时间",
|
|
|
+ prop: "recordEndTime",
|
|
|
+ hidden: true,
|
|
|
+ scope: "aTimeList",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "学习时间",
|
|
|
+ prop1: "recordStartTime",
|
|
|
+ prop2: "recordEndTime",
|
|
|
+ scope: "TimeLists",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "时长",
|
|
|
+ prop: "durationTime",
|
|
|
+ hidden: true,
|
|
|
+ scope: "convert",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "是否完成",
|
|
|
+ prop: "recordEndTime",
|
|
|
+ hidden: true,
|
|
|
+ scope: "recordEndTime",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ tableData: [], //表单数据
|
|
|
+ total: 0, //一共多少条
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.$api
|
|
|
+ .coursebusinessqueryFullId({
|
|
|
+ educationName: "考前培训",
|
|
|
+ projectName: "施工现场专业人员",
|
|
|
+ businessName: "七大员",
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.formData.educationId = res.data.educationId;
|
|
|
+ this.formData.projectId = res.data.projectId;
|
|
|
+ this.formData.businessId = res.data.businessId;
|
|
|
+ this.search();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ jumpPage(options) {
|
|
|
+ const jump = () => {
|
|
|
+ //班级详情
|
|
|
+ this.$router.push({
|
|
|
+ name: "HoursTimesRecord",
|
|
|
+ query: {
|
|
|
+ gradeId: options.gradeId,
|
|
|
+ userId: options.userId,
|
|
|
+ goodsId: options.goodsId,
|
|
|
+ goodsName: options.goodsName,
|
|
|
+ className: options.className,
|
|
|
+ classHours: options.classHours,
|
|
|
+ studyStartTime: options.studyStartTime,
|
|
|
+ studyEndTime: options.studyEndTime,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ };
|
|
|
+ const statusPage = this.$store.state.tagsView.visitedViews.some(
|
|
|
+ (item) => {
|
|
|
+ return item.name == "HoursTimesRecord";
|
|
|
+ }
|
|
|
+ );
|
|
|
+ if (statusPage) {
|
|
|
+ this.$store
|
|
|
+ .dispatch("tagsView/delCachedView", {
|
|
|
+ name: "HoursTimesRecord",
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ jump();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ jump();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ checkSession(row) {
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ const SESSION = sessionStorage.getItem("hoursAudit");
|
|
|
+ try {
|
|
|
+ if (SESSION) {
|
|
|
+ let parseSession = JSON.parse(SESSION);
|
|
|
+ const STATUS = parseSession.options.some((item) => {
|
|
|
+ return (
|
|
|
+ item.userId == row.userId &&
|
|
|
+ item.goodsId == row.goodsId &&
|
|
|
+ item.id == row.id
|
|
|
+ );
|
|
|
+ });
|
|
|
+ if (!STATUS) {
|
|
|
+ parseSession.options.push(row);
|
|
|
+ }
|
|
|
+ parseSession.activeData = `${row.userId}-${row.goodsId}-${row.id}`;
|
|
|
+ sessionStorage.setItem("hoursAudit", JSON.stringify(parseSession));
|
|
|
+ } else {
|
|
|
+ let data = {
|
|
|
+ activeData: `${row.userId}-${row.goodsId}-${row.id}`,
|
|
|
+ options: [row],
|
|
|
+ };
|
|
|
+ sessionStorage.setItem("hoursAudit", JSON.stringify(data));
|
|
|
+ }
|
|
|
+
|
|
|
+ resolve();
|
|
|
+ } catch (error) {
|
|
|
+ reject();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ search(int) {
|
|
|
+ this.loading = true;
|
|
|
+ if (int === 1) {
|
|
|
+ this.formData.pageNum = 1;
|
|
|
+ }
|
|
|
+ if (int === 2) {
|
|
|
+ this.formData.pageNum = 1;
|
|
|
+ this.formData.realname = "";
|
|
|
+ this.formData.idCard = "";
|
|
|
+ this.formData.companyName = "";
|
|
|
+ this.formData.telphone = "";
|
|
|
+ }
|
|
|
+ var data = JSON.parse(JSON.stringify(this.formData));
|
|
|
+ this.$api
|
|
|
+ .inquireGradegradelistUserVideoRecord(data)
|
|
|
+ .then((res) => {
|
|
|
+ this.tableData = res.rows;
|
|
|
+ this.total = res.total;
|
|
|
+ this.navText.index = res.total;
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleSizeChange(v) {
|
|
|
+ this.formData.pageSize = v;
|
|
|
+ this.formData.pageNum = 1;
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ handleCurrentChange(v) {
|
|
|
+ this.formData.pageNum = v;
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+/deep/.el-button {
|
|
|
+ border-radius: 8px;
|
|
|
+}
|
|
|
+/deep/.el-dialog {
|
|
|
+ border-radius: 8px;
|
|
|
+ .el-dialog__header {
|
|
|
+ padding: 0;
|
|
|
+ .hearders {
|
|
|
+ height: 40px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 0px 18px 0px 20px;
|
|
|
+ border-bottom: 1px solid #e2e2e2;
|
|
|
+ .leftTitle {
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #2f4378;
|
|
|
+ }
|
|
|
+ .rightBoxs {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ img {
|
|
|
+ width: 14px;
|
|
|
+ height: 14px;
|
|
|
+ margin-left: 13px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .el-dialog__footer {
|
|
|
+ padding: 0;
|
|
|
+ .dialog-footer {
|
|
|
+ padding: 0px 40px;
|
|
|
+ height: 70px;
|
|
|
+ border-top: 1px solid #e2e2e2;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-end;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.imgBox {
|
|
|
+ width: 100%;
|
|
|
+ // height: 210px;
|
|
|
+ border: 1px solid #e2e2e2;
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 8px 8px 3px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ .imgLabel {
|
|
|
+ flex: 1;
|
|
|
+ width: 100%;
|
|
|
+ border: 1px dotted #e2e2e2;
|
|
|
+ color: #999;
|
|
|
+ font-size: 14px;
|
|
|
+ cursor: pointer;
|
|
|
+ border-radius: 8px;
|
|
|
+ .msPhoto {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ max-width: 100%;
|
|
|
+ max-height: 270px;
|
|
|
+ img {
|
|
|
+ max-width: 100%;
|
|
|
+ max-height: 270px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .imgbbx {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ i {
|
|
|
+ font-weight: bold;
|
|
|
+ margin: 14px 0;
|
|
|
+ font-size: 24px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ p {
|
|
|
+ margin: 5px 0px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|