Selaa lähdekoodia

二建二造修复漏洞,试卷题目导入旧系统题目

Tang 2 vuotta sitten
vanhempi
commit
8768b966ed

+ 8 - 0
src/newApi/paperquestion.js

@@ -71,4 +71,12 @@ export default {
             data
         })
     },
+    //导入题目模板EXCEL(旧系统)
+    importDataBackFromOldList(data) {
+        return request({
+            url: '/bank/question/importDataBackFromOldList',
+            method: 'post',
+            data
+        })
+    },
 }

+ 11 - 0
src/views/resource/bankManagement/testPaperManagement/BatchImportPop.vue

@@ -8,6 +8,15 @@
     :isShowTip="false"
     @success="ExcelSuccess"
   ></batch-import-dialoga>
+  <batch-import-dialoga
+    v-else-if="type == 3"
+    :dialogVisible.sync="dialogVisible"
+    temUrl="/oss/images/file/20230316/1678948767057.xls"
+    apiKey="importDataBackFromOldList"
+    :isCheck="false"
+    :isShowTip="false"
+    @success="ExcelSuccess"
+  ></batch-import-dialoga>
   <batch-import-dialoga
     v-else
     :dialogVisible.sync="dialogVisible"
@@ -23,6 +32,7 @@
 </template>
 
 <script>
+import * as baseUrls from "@/utils/request.js";
 import batchImportDialoga from "@/components/Comon/batchImportDialog.vue";
 export default {
   data() {
@@ -84,6 +94,7 @@ export default {
       this.$emit("backData", list);
     },
     ExcelSuccess(data) {
+      console.log(data,"data")
       if (data.fullStatus == "全部成功") {
         this.backDataX(data.questionList);
         this.$message.success("全部导入成功");

+ 13 - 2
src/views/resource/bankManagement/testPaperManagement/addPaper/topicAddPaper/index.vue

@@ -20,7 +20,13 @@
             placeholder="请输入题目内容"
             v-model="keyValue"
             style="margin-right: 10px"
-          ></el-input>
+          ></el-input
+          ><el-button
+            size="medium"
+            @click="$refs.batchPop.openBoxs(tableData, businObj, 3)"
+            type="success"
+            >(旧系统)Excel批量导入</el-button
+          >
           <el-button
             size="medium"
             @click="$refs.batchPop.openBoxs(tableData, businObj, 2)"
@@ -145,7 +151,12 @@
                 v-else
               ></el-input> </el-form-item
           ></el-form>
-          <questionBank :dingFormInfo="listNums" :nums="1" ref="child" :disableTypeStatus="disableTypeStatus"/>
+          <questionBank
+            :dingFormInfo="listNums"
+            :nums="1"
+            ref="child"
+            :disableTypeStatus="disableTypeStatus"
+          />
         </div>
         <span slot="footer" class="dialog-footer">
           <el-button @click="closeBefore">关 闭</el-button>

+ 6 - 1
src/views/resource/bankManagement/testPaperManagement/editPaper/topicEditPaper/index.vue

@@ -15,7 +15,12 @@
             placeholder="请输入题目内容"
             v-model="keyValue"
             style="margin-right: 10px"
-          ></el-input>
+          ></el-input><el-button
+            size="medium"
+            @click="$refs.batchPop.openBoxs(tableData, businObj, 3)"
+            type="success"
+            >(旧系统)Excel批量导入</el-button
+          >
           <el-button
             size="medium"
             @click="$refs.batchPop.openBoxs(tableData, businObj, 2)"

+ 121 - 102
src/views/secondJian/learningList/index.vue

@@ -54,11 +54,6 @@ export default {
       },
       // 表单
       tableSet: [
-        {
-          label: "学员编码",
-          prop: "studentCode",
-          hidden: false,
-        },
         {
           label: "学员姓名",
           prop: "realName",
@@ -70,75 +65,90 @@ export default {
           hidden: true,
         },
         {
-          label: "绑定手机号码",
-          prop: "telPhone",
-          hidden: false,
-        },
-        {
-          label: "所购商品",
-          prop: "goodsName",
+          label: "一寸头像照",
+          prop: "oneInchPhotos",
           hidden: true,
+          scope: "img",
+          width: "120px",
         },
         {
-          label: "所在班级",
-          prop: "className",
+          label: "最近人脸照",
+          prop: "idCardImg1",
           hidden: true,
+          scope: "img",
+          width: "120px",
         },
         {
-          label: "班级有效期",
-          prop1: "classStartTime",
-          prop2: "classEndTime",
-          hidden: false,
-          scope: "TimeLists",
+          label: "商品名称",
+          prop: "goodsName",
+          hidden: true,
         },
         {
           label: "学时",
           prop: "classHours",
-          hidden: false,
-        },
-        {
-          label: "视频学习进度(节)",
-          prop1: "stuAllNum",
-          prop2: "secAllNum",
-          hidden: false,
-          scope: "computer",
-        },
-        {
-          label: "做题进度(章卷)",
-          prop1: "recordNum",
-          prop2: "examNum",
-          hidden: false,
-          scope: "computer",
-        },
-        {
-          label: "学习开始时间",
-          prop: "startTime",
           hidden: true,
-          scope: "aTimeList",
         },
         {
-          label: "学习结束时间",
-          prop: "endTime",
+          label: "所在班级",
+          prop: "className",
           hidden: true,
-          scope: "aTimeList",
         },
+        // {
+        //   label: "学习服务期",
+        //   prop1: "serviceStartTime",
+        //   prop2: "serviceEndTime",
+        //   hidden: true,
+        //   Diszing: true,
+        //   scope: "TimeLists",
+        // },
+        // {
+        //   label: "班级有效期",
+        //   prop1: "classStartTime",
+        //   prop2: "classEndTime",
+        //   scope: "TimeLists",
+        //   Diszing: false,
+        //   hidden: false,
+        // },
         {
-          label: "学习服务期",
-          prop1: "serviceStartTime",
-          prop2: "serviceEndTime",
-          hidden: false,
-          Diszing: true,
+          label: "学习时间",
+          prop1: "startTime",
+          prop2: "endTime",
           scope: "TimeLists",
+          hidden: false,
         },
+        // {
+        //   label: "学习状态",
+        //   prop: "periodStatus",
+        //   hidden: true,
+        //   scope: "isOptions",
+        //   options: [
+        //     {
+        //       label: "已完成",
+        //       value: 0,
+        //     },
+        //     {
+        //       label: "已完成",
+        //       value: 1,
+        //     },
+        //     {
+        //       label: "已完成",
+        //       value: 2,
+        //     },
+        //     {
+        //       label: "未完成",
+        //       value: -1,
+        //     },
+        //   ],
+        // },
         {
-          label: "填写资料审核状态",
-          prop: "profileStatus",
+          label: "学时审核状态",
+          prop: "periodStatus",
           hidden: true,
           scope: "isOptions",
           options: [
             {
-              label: "审核通过",
-              value: 1,
+              label: "不可审核",
+              value: -1,
             },
             {
               label: "待审核",
@@ -146,29 +156,38 @@ export default {
             },
             {
               label: "审核不通过",
+              value: 0,
+            },
+            {
+              label: "审核通过",
+              value: 1,
+            },
+            {
+              label: "审核中",
               value: 3,
             },
           ],
         },
-        {
-          label: "学时审批状态",
-          prop: "periodStatus",
-          hidden: true,
-          scope: "statusPeriod",
-        },
-        {
-          label: "审核通过时间",
-          prop: "periodTime",
-          hidden: true,
-          scope: "aTimeList",
-        },
-        {
-          label: "待重修(视频节和题卷)",
-          prop: "waitRebuildNum",
-          prop1: "rebuildNum",
-          hidden: false,
-          scope: "againStudent",
-        },
+        // {
+        //   label: "学时官方推送状态",
+        //   prop: "periodPlush",
+        //   hidden: true,
+        //   scope: "isOptions",
+        //   options: [
+        //     {
+        //       label: "否",
+        //       value: null,
+        //     },
+        //     {
+        //       label: "否",
+        //       value: 0,
+        //     },
+        //     {
+        //       label: "是",
+        //       value: 1,
+        //     },
+        //   ],
+        // },
       ],
       tableData: [], //表单数据
       total: 0, //一共多少条
@@ -189,39 +208,39 @@ export default {
       });
   },
   methods: {
-    jumpPage(v) {
-      this.$api
-        .inquireGradegradelockPeriodStatus({
-          gradeId: v.gradeId,
-          userId: v.userId,
-          goodsId: v.goodsId,
-        })
-        .then((res) => {
-          if (res.msg) {
-            this.$message.warning(res.msg + "正在操作");
-            return;
-          } else {
-            let data = {
-              userId: v.userId,
-              realName: v.realName,
-              id: v.gradeId,
-              className: v.className,
-              goodsId: v.goodsId,
-              goodsName: v.goodsName,
-              keyId: `${v.userId}-${v.goodsId}-${v.gradeId}`,
-            };
-            this.checkSession(data)
-              .then(() => {
-                //学员详情
-                this.$router.push({
-                  name: "ClassHoursReviews",
-                });
-              })
-              .catch(() => {
-                this.$message.error("存在异常,请联系开发人员");
-              });
-          }
+    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) => {

+ 121 - 102
src/views/secondZao/learningList/index.vue

@@ -54,11 +54,6 @@ export default {
       },
       // 表单
       tableSet: [
-        {
-          label: "学员编码",
-          prop: "studentCode",
-          hidden: false,
-        },
         {
           label: "学员姓名",
           prop: "realName",
@@ -70,75 +65,90 @@ export default {
           hidden: true,
         },
         {
-          label: "绑定手机号码",
-          prop: "telPhone",
-          hidden: false,
-        },
-        {
-          label: "所购商品",
-          prop: "goodsName",
+          label: "一寸头像照",
+          prop: "oneInchPhotos",
           hidden: true,
+          scope: "img",
+          width: "120px",
         },
         {
-          label: "所在班级",
-          prop: "className",
+          label: "最近人脸照",
+          prop: "idCardImg1",
           hidden: true,
+          scope: "img",
+          width: "120px",
         },
         {
-          label: "班级有效期",
-          prop1: "classStartTime",
-          prop2: "classEndTime",
-          hidden: false,
-          scope: "TimeLists",
+          label: "商品名称",
+          prop: "goodsName",
+          hidden: true,
         },
         {
           label: "学时",
           prop: "classHours",
-          hidden: false,
-        },
-        {
-          label: "视频学习进度(节)",
-          prop1: "stuAllNum",
-          prop2: "secAllNum",
-          hidden: false,
-          scope: "computer",
-        },
-        {
-          label: "做题进度(章卷)",
-          prop1: "recordNum",
-          prop2: "examNum",
-          hidden: false,
-          scope: "computer",
-        },
-        {
-          label: "学习开始时间",
-          prop: "startTime",
           hidden: true,
-          scope: "aTimeList",
         },
         {
-          label: "学习结束时间",
-          prop: "endTime",
+          label: "所在班级",
+          prop: "className",
           hidden: true,
-          scope: "aTimeList",
         },
+        // {
+        //   label: "学习服务期",
+        //   prop1: "serviceStartTime",
+        //   prop2: "serviceEndTime",
+        //   hidden: true,
+        //   Diszing: true,
+        //   scope: "TimeLists",
+        // },
+        // {
+        //   label: "班级有效期",
+        //   prop1: "classStartTime",
+        //   prop2: "classEndTime",
+        //   scope: "TimeLists",
+        //   Diszing: false,
+        //   hidden: false,
+        // },
         {
-          label: "学习服务期",
-          prop1: "serviceStartTime",
-          prop2: "serviceEndTime",
-          hidden: false,
-          Diszing: true,
+          label: "学习时间",
+          prop1: "startTime",
+          prop2: "endTime",
           scope: "TimeLists",
+          hidden: false,
         },
+        // {
+        //   label: "学习状态",
+        //   prop: "periodStatus",
+        //   hidden: true,
+        //   scope: "isOptions",
+        //   options: [
+        //     {
+        //       label: "已完成",
+        //       value: 0,
+        //     },
+        //     {
+        //       label: "已完成",
+        //       value: 1,
+        //     },
+        //     {
+        //       label: "已完成",
+        //       value: 2,
+        //     },
+        //     {
+        //       label: "未完成",
+        //       value: -1,
+        //     },
+        //   ],
+        // },
         {
-          label: "填写资料审核状态",
-          prop: "profileStatus",
+          label: "学时审核状态",
+          prop: "periodStatus",
           hidden: true,
           scope: "isOptions",
           options: [
             {
-              label: "审核通过",
-              value: 1,
+              label: "不可审核",
+              value: -1,
             },
             {
               label: "待审核",
@@ -146,29 +156,38 @@ export default {
             },
             {
               label: "审核不通过",
+              value: 0,
+            },
+            {
+              label: "审核通过",
+              value: 1,
+            },
+            {
+              label: "审核中",
               value: 3,
             },
           ],
         },
-        {
-          label: "学时审批状态",
-          prop: "periodStatus",
-          hidden: true,
-          scope: "statusPeriod",
-        },
-        {
-          label: "审核通过时间",
-          prop: "periodTime",
-          hidden: true,
-          scope: "aTimeList",
-        },
-        {
-          label: "待重修(视频节和题卷)",
-          prop: "waitRebuildNum",
-          prop1: "rebuildNum",
-          hidden: false,
-          scope: "againStudent",
-        },
+        // {
+        //   label: "学时官方推送状态",
+        //   prop: "periodPlush",
+        //   hidden: true,
+        //   scope: "isOptions",
+        //   options: [
+        //     {
+        //       label: "否",
+        //       value: null,
+        //     },
+        //     {
+        //       label: "否",
+        //       value: 0,
+        //     },
+        //     {
+        //       label: "是",
+        //       value: 1,
+        //     },
+        //   ],
+        // },
       ],
       tableData: [], //表单数据
       total: 0, //一共多少条
@@ -189,39 +208,39 @@ export default {
       });
   },
   methods: {
-    jumpPage(v) {
-      this.$api
-        .inquireGradegradelockPeriodStatus({
-          gradeId: v.gradeId,
-          userId: v.userId,
-          goodsId: v.goodsId,
-        })
-        .then((res) => {
-          if (res.msg) {
-            this.$message.warning(res.msg + "正在操作");
-            return;
-          } else {
-            let data = {
-              userId: v.userId,
-              realName: v.realName,
-              id: v.gradeId,
-              className: v.className,
-              goodsId: v.goodsId,
-              goodsName: v.goodsName,
-              keyId: `${v.userId}-${v.goodsId}-${v.gradeId}`,
-            };
-            this.checkSession(data)
-              .then(() => {
-                //学员详情
-                this.$router.push({
-                  name: "ClassHoursReviews",
-                });
-              })
-              .catch(() => {
-                this.$message.error("存在异常,请联系开发人员");
-              });
-          }
+    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) => {