|
@@ -0,0 +1,249 @@
|
|
|
|
+<template>
|
|
|
|
+ <div id="liveLearningRecord">
|
|
|
|
+ <div style="margin-bottom:10px;">
|
|
|
|
+ <el-button size="small" :type="activeId === 1 ? 'primary' : ''" @click="changePage(1)">题库商品</el-button>
|
|
|
|
+ <el-button size="small" :type="activeId === 2 ? 'primary' : ''" @click="changePage(2)">赠送题卷</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <search-box-new ref="searchBox" :formData="formData" :formList="formList" @search="search" @init="init">
|
|
|
|
+ </search-box-new>
|
|
|
|
+ <table-list :tableSets="tableSet" :tableData="tableData" :navText="navText" :loading="loading">
|
|
|
|
+ <template slot="btn" slot-scope="props">
|
|
|
|
+ <el-button type="text" @click="doList(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 * as baseUrls from "@/utils/request.js";
|
|
|
|
+import searchBoxNew from "@/components/searchBoxNew";
|
|
|
|
+import tableList from "@/components/tableList";
|
|
|
|
+import pagination from "@/components/pagination";
|
|
|
|
+export default {
|
|
|
|
+ components: { searchBoxNew, tableList, pagination },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ loading: false, //当前表单加载是否加载动画
|
|
|
|
+ navText: {
|
|
|
|
+ title: "学员学习记录",
|
|
|
|
+ index: 0,
|
|
|
|
+ ch: "条",
|
|
|
|
+ num: false,
|
|
|
|
+ border: true,
|
|
|
|
+ choice: true,
|
|
|
|
+ addHide: true,
|
|
|
|
+ backFatherBtn: {
|
|
|
|
+ status: false,
|
|
|
|
+ title: "未定义",
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ //搜索
|
|
|
|
+ formList: [
|
|
|
|
+ {
|
|
|
|
+ prop: "educationTypeId",
|
|
|
|
+ placeholder: "教育类型",
|
|
|
|
+ scope: "educationType",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ prop: "businessId",
|
|
|
|
+ placeholder: "业务层次",
|
|
|
|
+ scope: "businessLevel",
|
|
|
|
+ edu: "educationTypeId",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ prop: "majorId",
|
|
|
|
+ placeholder: "专业",
|
|
|
|
+ scope: "Professional",
|
|
|
|
+ edu: "educationTypeId",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ prop: "searchKey",
|
|
|
|
+ placeholder: "请输入商品名称/商品编码",
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ formData: {
|
|
|
|
+ status: "0,1",
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ goodsType: 6,
|
|
|
|
+ getOrderNum: 1,
|
|
|
|
+ },
|
|
|
|
+ // 表单
|
|
|
|
+ tableSet: [
|
|
|
|
+ {
|
|
|
|
+ label: "学员姓名",
|
|
|
|
+ prop: "realName",
|
|
|
|
+ hidden: true,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "学员身份证",
|
|
|
|
+ prop: "idCard",
|
|
|
|
+ hidden: true,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "商品名称",
|
|
|
|
+ prop: "goodsName",
|
|
|
|
+ hidden: true,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "做题进度",
|
|
|
|
+ prop1: "doExamNum",
|
|
|
|
+ prop2: "totalExamNum",
|
|
|
|
+ hidden: true,
|
|
|
|
+ scope: "computerDoNum",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "学员做题时间(分)",
|
|
|
|
+ prop: "idCard",
|
|
|
|
+ hidden: true,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "学员做题状态",
|
|
|
|
+ prop: "goodsName",
|
|
|
|
+ hidden: true,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "学员做题总数",
|
|
|
|
+ prop: "realName",
|
|
|
|
+ hidden: true,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "学员做对题数",
|
|
|
|
+ prop: "idCard",
|
|
|
|
+ hidden: true,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "学员做错题数",
|
|
|
|
+ prop: "goodsName",
|
|
|
|
+ hidden: true,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "学员做对题数",
|
|
|
|
+ prop: "idCard",
|
|
|
|
+ hidden: true,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "学员未做题数",
|
|
|
|
+ prop: "goodsName",
|
|
|
|
+ hidden: true,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "题目正确率",
|
|
|
|
+ prop: "goodsName",
|
|
|
|
+ hidden: true,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ tableData: [], //表单数据
|
|
|
|
+ total: 0, //一共多少条
|
|
|
|
+ activeId: 1
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ this.search();
|
|
|
|
+ },
|
|
|
|
+ activated() {
|
|
|
|
+ this.search();
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ changePage(int) {
|
|
|
|
+ this.activeId = int
|
|
|
|
+ },
|
|
|
|
+ moreActive() {
|
|
|
|
+ let arr = JSON.parse(JSON.stringify(this.formData));
|
|
|
|
+ delete arr.pageSize;
|
|
|
|
+ delete arr.pageNum;
|
|
|
|
+ this.$api.inquiregoodslistBankexport_list(arr).then((res) => {
|
|
|
|
+ if (res.msg) {
|
|
|
|
+ let url = baseUrls.baseURL + "common/download?fileName=" + res.msg;
|
|
|
|
+ let link = document.createElement("a");
|
|
|
|
+ let fileName = "导出直播数据" + ".xlsx";
|
|
|
|
+ document.body.appendChild(link);
|
|
|
|
+ link.href = url;
|
|
|
|
+ link.dowmload = fileName;
|
|
|
|
+ link.click();
|
|
|
|
+ link.remove();
|
|
|
|
+ this.$message.success("导出成功");
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error("导出失败");
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ doList(row) {
|
|
|
|
+ const jump = () => {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: "studentStyleList",
|
|
|
|
+ query: {
|
|
|
|
+ id: row.goodsId,
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ };
|
|
|
|
+ const statusPage = this.$store.state.tagsView.visitedViews.some(
|
|
|
|
+ (item) => {
|
|
|
|
+ return item.name == "StudentStyleList";
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ if (statusPage) {
|
|
|
|
+ this.$store
|
|
|
|
+ .dispatch("tagsView/delCachedView", {
|
|
|
|
+ name: "StudentStyleList",
|
|
|
|
+ })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ jump();
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ jump();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ search(int) {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ if (int === 1) {
|
|
|
|
+ this.formData.pageNum = 1;
|
|
|
|
+ }
|
|
|
|
+ if (int === 2) {
|
|
|
|
+ this.formData = {
|
|
|
|
+ status: "0,1",
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ goodsType: 6,
|
|
|
|
+ getOrderNum: 1,
|
|
|
|
+ };
|
|
|
|
+ }
|
|
|
|
+ var data = JSON.parse(JSON.stringify(this.formData));
|
|
|
|
+ if (this.formData.validityStartTime) {
|
|
|
|
+ data.validityStartTime = data.validityStartTime / 1000;
|
|
|
|
+ }
|
|
|
|
+ if (this.formData.validityEndTime) {
|
|
|
|
+ data.validityEndTime = data.validityEndTime / 1000;
|
|
|
|
+ }
|
|
|
|
+ this.$api
|
|
|
|
+ .inquireGoods(data)
|
|
|
|
+ .then((res) => {
|
|
|
|
+ this.tableData = res.rows;
|
|
|
|
+ this.total = res.total;
|
|
|
|
+ this.navText.index = res.total;
|
|
|
|
+ })
|
|
|
|
+ .finally(() => {
|
|
|
|
+ this.loading = false;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ init() {
|
|
|
|
+ this.search(2);
|
|
|
|
+ },
|
|
|
|
+ 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>
|
|
|
|
+
|
|
|
|
+</style>
|