Browse Source

重构前版本

Tang 3 years ago
parent
commit
b1ccec8929
25 changed files with 1707 additions and 332 deletions
  1. 3 1
      src/api/api.js
  2. 72 39
      src/components/tableList.vue
  3. 16 0
      src/newApi/applicationData.js
  4. 44 0
      src/newApi/appuser.js
  5. 55 0
      src/newApi/systemExam.js
  6. 1 1
      src/utils/request.js
  7. 12 3
      src/views/Marketing/goods/commodityManageMent/edit/courseContent/index.vue
  8. 3 5
      src/views/Marketing/goods/commodityManageMent/edit/courseContent/share.vue
  9. 18 1
      src/views/education/examManagement/applicationData/asPlanned.vue
  10. 4 1
      src/views/education/examManagement/applicationData/cancelAppointMent/index.vue
  11. 4 1
      src/views/education/examManagement/applicationData/examRegistration/index.vue
  12. 4 1
      src/views/education/examManagement/applicationData/formerAccount/index.vue
  13. 206 0
      src/views/education/examManagement/examArrangement/applicableProducts/downMaterial.vue
  14. 157 22
      src/views/education/examManagement/examArrangement/index.vue
  15. 37 2
      src/views/education/examManagement/examConfiguration/examPlace/index.vue
  16. 527 0
      src/views/education/marketingCampaignManageMent/marketingActivitiesList/index.vue
  17. 139 0
      src/views/education/marketingCampaignManageMent/marketingActivitiesList/userBoxs.vue
  18. 75 35
      src/views/education/mockTestManagement/mockExamArrangement/addMockExam/index.vue
  19. 107 82
      src/views/education/mockTestManagement/mockExamArrangement/addMockExam/infoPage.vue
  20. 90 41
      src/views/education/mockTestManagement/mockExamArrangement/editMockExam/index.vue
  21. 102 69
      src/views/education/mockTestManagement/mockExamArrangement/editMockExam/infoPage.vue
  22. 2 0
      src/views/education/studentManageMent/studentList/index.vue
  23. 8 7
      src/views/education/studentManageMent/studentXQ/accesslog.vue
  24. 11 10
      src/views/education/studentManageMent/studentXQ/studylog.vue
  25. 10 11
      src/views/resource/videoManagement/courseManagement/chapterContent/index.vue

+ 3 - 1
src/api/api.js

@@ -100,6 +100,7 @@ import homeApi from '../newApi/homeApi'//控制台学员数据
 import studyAccountStatus from '../newApi/studyAccountStatus'//学习账号标记
 import mock from '../newApi/mock'//模考管理
 import mockSub from '../newApi/mockSub'//预约模考管理
+import systemExam from '../newApi/systemExam'//模考活动列表
 
 
 
@@ -179,7 +180,8 @@ export default {
     ...homeApi,
     ...studyAccountStatus,
     ...mock,
-    ...mockSub
+    ...mockSub,
+    ...systemExam,
 
     // ...login,
     // ...profession,

+ 72 - 39
src/components/tableList.vue

@@ -669,9 +669,31 @@
             }}
           </span>
           <div v-else-if="item.scope === 'changAdress'">
-            <div>{{ scope.row[item.prop1] }}</div>
+            <div>地点:{{ scope.row[item.prop1] }}</div>
             <div>
-              {{ $methodsTools.onlyForma(scope.row[item.prop2], false) }}
+              时间:{{ $methodsTools.onlyForma(scope.row[item.prop2], false) }}
+              <span
+                >{{ scope.row[item.prop3] }}-{{ scope.row[item.prop4] }}</span
+              >
+            </div>
+            <div>准考证号:{{ scope.row[item.prop5] }}</div>
+            <div>座位号:{{ scope.row[item.prop6] }}</div>
+            <div>
+              同步到考场状态:{{
+                scope.row[item.prop7] === 0
+                  ? "未同步"
+                  : scope.row[item.prop7] === 1
+                  ? "成功"
+                  : scope.row[item.prop7] === 2
+                  ? "失败"
+                  : ""
+              }} <el-button v-if="scope.row[item.prop7] === 2" type="text">原因</el-button>
+            </div>
+          </div>
+          <div v-else-if="item.scope === 'changAdressKP'">
+            <div>地点:{{ scope.row[item.prop1] }}</div>
+            <div>
+              时间:{{ $methodsTools.onlyForma(scope.row[item.prop2], false) }}
               <span
                 >{{ scope.row[item.prop3] }}-{{ scope.row[item.prop4] }}</span
               >
@@ -907,7 +929,7 @@
           <span v-else-if="item.scope === 'aTimeList'">{{
             scope.row[item.prop] === null
               ? "--"
-              : $methodsTools.onlyForma(scope.row[item.prop])
+              : $methodsTools.onlyForma(scope.row[item.prop], !item.isDiszing)
           }}</span>
           <div v-else-if="item.scope === 'inputs'">
             <el-input-number
@@ -985,15 +1007,15 @@
               (实收¥{{ scope.row[item.prop2] }})</span
             >
           </div>
-          <ul style="margin:0;" v-else-if="item.scope === 'chance'">
-            <li>总共:{{scope.row[item.prop1]}}</li>
-            <li>消耗:{{scope.row[item.prop2]}}</li>
-            <li>剩余:{{scope.row[item.prop1]-scope.row[item.prop2]}}</li>
+          <ul style="margin: 0" v-else-if="item.scope === 'chance'">
+            <li>总共:{{ scope.row[item.prop1] }}</li>
+            <li>消耗:{{ scope.row[item.prop2] }}</li>
+            <li>剩余:{{ scope.row[item.prop1] - scope.row[item.prop2] }}</li>
           </ul>
-          <ul style="margin:0;" v-else-if="item.scope === 'studyCount'">
-            <li>总共:{{scope.row[item.prop1]+scope.row[item.prop2]}}</li>
-            <li>消耗:{{scope.row[item.prop1]}}</li>
-            <li>剩余:{{scope.row[item.prop2]}}</li>
+          <ul style="margin: 0" v-else-if="item.scope === 'studyCount'">
+            <li>总共:{{ scope.row[item.prop1] + scope.row[item.prop2] }}</li>
+            <li>消耗:{{ scope.row[item.prop1] }}</li>
+            <li>剩余:{{ scope.row[item.prop2] }}</li>
           </ul>
           <span
             v-else-if="item.scope === 'statusPeriod'"
@@ -1436,25 +1458,29 @@
                 :style="
                   scope.row[item.prop] == 5 ? 'color:rgb(132, 0, 255);' : ''
                 "
-                >
-                <el-popover
-                :key="indext"
-                trigger="hover"
-                v-if="itemt.popover === true"
-              >
-                <span>订单编号(业务系统):{{scope.row[item.oldOrder]}}</span>
-                <el-button type="text" slot="reference">{{itemt.label}}</el-button>
-              </el-popover>
-                <span v-else>{{ itemt.label }}
-                <el-button
-                  type="text"
-                  v-if="itemt.click"
-                  @click="backFunc(scope.row)"
-                  >查看</el-button
-                ></span>
-                </div
               >
-              
+                <el-popover
+                  :key="indext"
+                  trigger="hover"
+                  v-if="itemt.popover === true"
+                >
+                  <span
+                    >订单编号(业务系统):{{ scope.row[item.oldOrder] }}</span
+                  >
+                  <el-button type="text" slot="reference">{{
+                    itemt.label
+                  }}</el-button>
+                </el-popover>
+                <span v-else
+                  >{{ itemt.label }}
+                  <el-button
+                    type="text"
+                    v-if="itemt.click"
+                    @click="backFunc(scope.row)"
+                    >查看</el-button
+                  ></span
+                >
+              </div>
             </template>
           </div>
           <div v-else-if="item.scope === 'orderGoodsStatus'">
@@ -1819,7 +1845,14 @@
 import bankMsg from "./bankMsg";
 export default {
   components: { bankMsg },
-  props: ["tableSets", "tableData", "navText", "rowKey", "loading" ,"studentTable"],
+  props: [
+    "tableSets",
+    "tableData",
+    "navText",
+    "rowKey",
+    "loading",
+    "studentTable",
+  ],
   data: function () {
     return {
       diaviosOpen: false,
@@ -1903,11 +1936,11 @@ export default {
     },
   },
   created() {
-    if(this.studentTable){
-      let data = sessionStorage.getItem('studentTableList')
-      if(data && data !==''){
-        this.tableSet = JSON.parse(data)
-      } 
+    if (this.studentTable) {
+      let data = sessionStorage.getItem("studentTableList");
+      if (data && data !== "") {
+        this.tableSet = JSON.parse(data);
+      }
     }
     this.inittableSet = JSON.stringify(this.tableSet);
     this.initTR();
@@ -2440,7 +2473,7 @@ export default {
     },
     //自定义列全选按钮触发
     handleCheckAllChange(val) {
-      console.log(val,'val');
+      console.log(val, "val");
       this.checkedCities = val ? this.cities : [];
       this.isIndeterminate = false;
       if (val) {
@@ -2477,9 +2510,9 @@ export default {
       this.tableSet = [];
       this.$nextTick(() => {
         this.tableSet = copyTable;
-        if(this.studentTable){
-          sessionStorage.setItem('studentTableList',JSON.stringify(copyTable))
-        }     
+        if (this.studentTable) {
+          sessionStorage.setItem("studentTableList", JSON.stringify(copyTable));
+        }
       });
     },
     //自定义列重置

+ 16 - 0
src/newApi/applicationData.js

@@ -145,5 +145,21 @@ export default {
             data
         })
     },
+    //导出学员信息表
+    inquiresystemsubscribelistUserExport(data) {
+        return request({
+            url: '/system/subscribe/listUserExport',
+            method: 'get',
+            params: data
+        })
+    },
+    //导出学员签到表
+    inquiresystemsubscribelistSignExport(data) {
+        return request({
+            url: '/system/subscribe/listSignExport',
+            method: 'get',
+            params: data
+        })
+    },
     
 }

+ 44 - 0
src/newApi/appuser.js

@@ -79,4 +79,48 @@ export default {
             params: data
         })
     },
+    //同步智慧考场
+    appcommonsyncExamSite(data) {
+        return request({
+            url: '/app/common/syncExamSite',
+            method: 'get',
+            params: data,
+            headers: {
+              isToken: false
+            },
+        })
+    },
+    //同步考生考试状态信息
+    appcommonwisdomSyncExamStatus(data) {
+        return request({
+            url: '/app/common/wisdomSyncExamStatus',
+            method: 'get',
+            params: data,
+            headers: {
+              isToken: false
+            },
+        })
+    },
+    //同步考试视频信息
+    appcommonwisdomSyncExamVideo(data) {
+        return request({
+            url: '/app/common/wisdomSyncExamVideo',
+            method: 'get',
+            params: data,
+            headers: {
+              isToken: false
+            },
+        })
+    },
+    //批量同步考试计划用户
+    appcommonwsyncApplyUserInfo(data) {
+        return request({
+            url: '/app/common/syncApplyUserInfo',
+            method: 'get',
+            params: data,
+            headers: {
+              isToken: false
+            },
+        })
+    },
 }

+ 55 - 0
src/newApi/systemExam.js

@@ -0,0 +1,55 @@
+import request from '@/utils/request' //引入axios请求及拦截器
+export default {
+    //新增新增活动
+    addSystemexamactivity(data) {
+        return request({
+            url: '/system/exam/activity/add',
+            method: 'post',
+            data
+        })
+    },
+    //修改活动
+    editSystemexamactivity(data) {
+        return request({
+            url: '/system/exam/activity/update',
+            method: 'post',
+            data
+        })
+    },
+    //获取活动列表
+    inquireSystemexamactivitylist(data) {
+        return request({
+            url: '/system/exam/activity/list',
+            method: 'get',
+            params: data
+        })
+    },
+    //获取活动信息
+    inquireSystemexamactivitydetail(data) {
+        return request({
+            url: '/system/exam/activity/detail/' + data,
+            method: 'get',
+        })
+    },
+    //获取活动用户列表
+    inquireSystemexamactivityuserlist(data) {
+        return request({
+            url: '/system/exam/activity/user/list/' + data,
+            method: 'get',
+        })
+    },
+    //导出活动用户
+    exportsystemexamactivity(data) {
+        return request({
+            url: '/system/exam/activity/export/' + data,
+            method: 'get',
+        })
+    },
+    //获取活动报名二维码
+    exportsystemexamactivitycode(data) {
+        return request({
+            url: '/system/exam/activity/apply/code/' + data,
+            method: 'get',
+        })
+    },
+}

+ 1 - 1
src/utils/request.js

@@ -8,7 +8,7 @@ import methods from '@/utils/methodsTool';
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 // 创建axios实例
 export const baseURL = process.env.VUE_APP_BASE_API
-// export const baseURL = 'http://192.168.1.7:5030/'
+// export const baseURL = 'http://192.168.1.24:5030/'
 export const BASE_IMG_URL = process.env.VUE_APP_IMG_API
 const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分

+ 12 - 3
src/views/Marketing/goods/commodityManageMent/edit/courseContent/index.vue

@@ -260,23 +260,32 @@ export default {
      * 打开分享窗口
      */
     openShare(rows) {
-      let goodsId = this.$route.query.id
-      this.$refs.share.openBox(rows,goodsId);
+      let goodsId = this.$route.query.id;
+      this.$refs.share.openBox(rows, goodsId);
       // this.$api.coursesectionwatchper().then((res) => {});
     },
     /**
      * 异步加载table数据
      */
     load(tree, treeNode, resolve) {
+      console.log(tree, "tree");
       if (tree.type === 0) {
         this.$api
           .inquireCoursemenuListS({ courseId: tree.courseId })
           .then((res) => {
             res.rows.forEach((item) => {
+              if (item.type === 1) {
+                item.moduleId = item.menuId;
+                item.keyId = `${tree.courseId}-${item.menuId}`;
+              }
               if (item.type === 2) {
                 item.chapterId = item.menuId;
+                item.keyId = `${tree.courseId}-0-${item.menuId}`;
+              }
+              if (item.type === 3) {
+                item.sectionId = item.menuId;
+                item.keyId = `${tree.courseId}-0-0-${item.menuId}`;
               }
-              item.keyId = `${tree.courseId}-${item.menuId}`;
               item.children = [];
               item.courseId = tree.courseId;
               item.hasChildren = item.type === 3 ? false : true;

+ 3 - 5
src/views/Marketing/goods/commodityManageMent/edit/courseContent/share.vue

@@ -19,7 +19,7 @@
       </div>
       <el-form label-width="180px" :model="formLabelAlign">
         <el-form-item label="观看权限:">
-          <el-radio-group v-model="formLabelAlign.watchPer">
+          <el-radio-group v-model="formLabelAlign.watchPer" @change="submitTable">
             <el-radio :label="1">已开通课程的学员</el-radio>
             <el-radio :label="2">所有学员</el-radio>
           </el-radio-group>
@@ -48,8 +48,8 @@
         </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="submitTable">保 存</el-button>
+        <el-button @click="dialogVisible = false">关 闭</el-button>
+        <!-- <el-button type="primary" @click="submitTable">保 存</el-button> -->
       </span>
     </el-dialog>
   </div>
@@ -155,7 +155,6 @@ export default {
      * 保存分享
      */
     submitTable() {
-      this.dialogVisible = false;
       let data;
       if (this.formLabelAlign.id) {
         data = this.formLabelAlign;
@@ -172,7 +171,6 @@ export default {
       }
       this.$api.coursesectionaddwatchper(data).then((res) => {
         this.$message.success("保存成功");
-        this.dialogVisible = false;
       });
     },
   },

+ 18 - 1
src/views/education/examManagement/applicationData/asPlanned.vue

@@ -386,6 +386,16 @@ export default {
           placeholder: "前培标题",
           scope: "beforeList",
         },
+        {
+          prop: "syncStatus",
+          placeholder: "同步状态",
+          scope: "select",
+          options: [
+            { label: "未同步", value: 0 },
+            { label: "成功", value: 1 },
+            { label: "失败", value: 2 },
+          ],
+        },
         {
           prop: "studentType",
           placeholder: "学员报名类型",
@@ -562,6 +572,9 @@ export default {
           prop2: "applySiteExamTime",
           prop3: "applySiteStartTime",
           prop4: "applySiteEndTime",
+          prop5: "examineeCode",
+          prop6: "seatNumber",
+          prop7: "syncStatus",
           hidden: true,
           scope: "changAdress",
         },
@@ -577,7 +590,7 @@ export default {
           prop3: "applySiteStartTrainTime",
           prop4: "applySiteEndTrainTime",
           hidden: true,
-          scope: "changAdress",
+          scope: "changAdressKP",
         },
         {
           label: "前培次数消耗",
@@ -630,6 +643,10 @@ export default {
     if (this.$route.query.type == 2) {
       this.formData.beforeId = Number(this.$route.query.id);
     }
+    if (this.$route.params.type == 3) {
+      this.formData.applyId = Number(this.$route.params.id);
+      this.formData.syncStatus = 2
+    }
     this.search();
     this.getQP();
   },

+ 4 - 1
src/views/education/examManagement/applicationData/cancelAppointMent/index.vue

@@ -319,6 +319,9 @@ export default {
           prop2: "applySiteExamTime",
           prop3: "applySiteStartTime",
           prop4: "applySiteEndTime",
+          prop5: "examineeCode",
+          prop6: "seatNumber",
+          prop7: "syncStatus",
           hidden: true,
           scope: "changAdress",
         },
@@ -334,7 +337,7 @@ export default {
           prop3: "applySiteStartTrainTime",
           prop4: "applySiteEndTrainTime",
           hidden: true,
-          scope: "changAdress",
+          scope: "changAdressKP",
         },
         {
           label: "前培次数消耗",

+ 4 - 1
src/views/education/examManagement/applicationData/examRegistration/index.vue

@@ -365,6 +365,9 @@ export default {
           prop2: "applySiteExamTime",
           prop3: "applySiteStartTime",
           prop4: "applySiteEndTime",
+          prop5: "examineeCode",
+          prop6: "seatNumber",
+          prop7: "syncStatus",
           hidden: true,
           scope: "changAdress",
         },
@@ -380,7 +383,7 @@ export default {
           prop3: "applySiteStartTrainTime",
           prop4: "applySiteEndTrainTime",
           hidden: true,
-          scope: "changAdress",
+          scope: "changAdressKP",
         },
         {
           label: "前培次数消耗",

+ 4 - 1
src/views/education/examManagement/applicationData/formerAccount/index.vue

@@ -339,6 +339,9 @@ export default {
           prop2: "applySiteExamTime",
           prop3: "applySiteStartTime",
           prop4: "applySiteEndTime",
+          prop5: "examineeCode",
+          prop6: "seatNumber",
+          prop7: "syncStatus",
           hidden: true,
           scope: "changAdress",
         },
@@ -354,7 +357,7 @@ export default {
           prop3: "applySiteStartTrainTime",
           prop4: "applySiteEndTrainTime",
           hidden: true,
-          scope: "changAdress",
+          scope: "changAdressKP",
         },
         {
           label: "前培次数消耗",

+ 206 - 0
src/views/education/examManagement/examArrangement/applicableProducts/downMaterial.vue

@@ -0,0 +1,206 @@
+<template>
+  <div id="downMaterial">
+    <el-dialog
+      :visible.sync="dialogVisible"
+      width="610px"
+      :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="dialogVisible = false"
+          />
+        </div>
+      </div>
+      <div>
+        <p>
+          考试地点:<el-select
+            v-model="listData.siteId"
+            placeholder="请选择考试地点"
+            @change="getOptionsTime"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.siteId"
+              :label="item.siteAddress"
+              :value="item.siteId"
+            >
+            </el-option>
+          </el-select>
+        </p>
+        <p v-if="listData.siteId && optionsTime.length > 0">
+          考试日期:<el-select
+            v-model="listData.applySiteExamTime"
+            placeholder="请选择考试日期"
+            @change="getOptionsChildrenTime"
+          >
+            <el-option
+              v-for="item in optionsTime"
+              :key="item.examTime"
+              :label="$methodsTools.onlyForma(item.examTime, false)"
+              :value="item.examTime"
+            >
+            </el-option>
+          </el-select>
+          <el-select
+            style="margin-left: 14px"
+            v-if="
+              listData.siteId &&
+              optionsTime.length > 0 &&
+              optionsTimeChildren.length > 0
+            "
+            v-model="listData.index"
+            placeholder="请选择考试时间段"
+            @change="getSizeTime"
+          >
+            <el-option
+              v-for="(item, index) in optionsTimeChildren"
+              :key="index"
+              :label="item.startTime + ' - ' + item.endTime"
+              :value="item.index"
+            >
+            </el-option>
+          </el-select>
+        </p>
+        <p>
+          学员信息表 <el-button type="text" @click="userDowm">下载</el-button>
+        </p>
+        <p>疫情防控承诺书 <el-button type="text">下载</el-button></p>
+        <p>
+          学员签到表 <el-button type="text" @click="userSign">下载</el-button>
+        </p>
+        <p>考场视频 <el-button type="text">下载</el-button></p>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import * as baseUrls from "@/utils/request.js";
+export default {
+  data() {
+    return {
+      dialogVisible: false,
+      listData: {
+        applyId: "",
+        siteId: "",
+        applySiteExamTime: "",
+        applySiteStartTime: "",
+        applySiteEndTime: "",
+        index: "",
+      },
+      options: [],
+      optionsTime: [],
+      optionsTimeChildren: [],
+    };
+  },
+  methods: {
+    //地点
+    getOptionsTime(v) {
+      this.listData.applySiteExamTime = "";
+      this.listData.applySiteStartTime = "";
+      this.listData.applySiteEndTime = "";
+      this.listData.index = "";
+      for (let i = 0; i < this.options.length; i++) {
+        if ((this.options[i].applyId = v)) {
+          this.optionsTime = this.options[i].examApplySiteTime;
+          break;
+        }
+      }
+    },
+    //日期
+    getOptionsChildrenTime(v) {
+      this.listData.applySiteStartTime = "";
+      this.listData.applySiteEndTime = "";
+      this.listData.index = "";
+      for (let i = 0; i < this.optionsTime.length; i++) {
+        if ((this.optionsTime[i].applySiteExamTime = v)) {
+          let time = JSON.parse(this.optionsTime[i].siteTime);
+          for (let j = 0; j < time.length; j++) {
+            time[j].index = j + 1;
+          }
+          this.optionsTimeChildren = time;
+          break;
+        }
+      }
+    },
+    //时间段
+    getSizeTime(v) {
+      for (let i = 0; i < this.optionsTimeChildren.length; i++) {
+        if (this.optionsTimeChildren[i].index === v) {
+          this.listData.applySiteStartTime =
+            this.optionsTimeChildren[i].startTime;
+          this.listData.applySiteEndTime = this.optionsTimeChildren[i].endTime;
+          break;
+        }
+      }
+    },
+    //学员信息表
+    userDowm() {
+      var data = JSON.parse(JSON.stringify(this.listData));
+      delete data.index;
+      this.$api.inquiresystemsubscribelistUserExport(data).then((res) => {
+        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();
+      });
+    },
+    //学员签到表
+    userSign() {
+      var data = JSON.parse(JSON.stringify(this.listData));
+      delete data.index;
+      this.$api.inquiresystemsubscribelistSignExport(data).then((res) => {
+        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();
+      });
+    },
+    openBox(row) {
+      this.listData= {
+        applyId: row.applyId,
+        siteId: "",
+        applySiteExamTime: "",
+        applySiteStartTime: "",
+        applySiteEndTime: "",
+        index: "",
+      }
+      this.getAddress();
+      this.dialogVisible = true;
+    },
+    getAddress() {
+      this.$api
+        .inquirepayservesiteInfo({
+          addressStatus: 1,
+          applyId: this.listData.applyId,
+        })
+        .then((res) => {
+          res.rows.forEach((item) => {
+            item.examApplySiteTime.forEach((items) => {
+              // items.examTime = this.$methodsTools.time10to13(items.examTime, 2);
+              items.examApplySiteTimeTwo = JSON.parse(items.siteTime);
+            });
+          });
+          this.options = res.rows;
+          console.log(res.rows, "res.rows");
+        });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 157 - 22
src/views/education/examManagement/examArrangement/index.vue

@@ -14,9 +14,7 @@
         >
       </template>
       <template slot="btn" slot-scope="props">
-        <el-button
-          type="text"
-          @click="beforeFunc(props.scope.row)"
+        <el-button type="text" @click="beforeFunc(props.scope.row)"
           >前培设置</el-button
         >
         <el-button
@@ -44,6 +42,10 @@
           >适用商品</el-button
         >
         <el-button type="text" @click="watchs(props.scope.row)">预览</el-button>
+        <el-button type="text" @click="downMaterial(props.scope.row)">下载资料</el-button>
+        <el-button type="text" @click="syncExam(props.scope.row)"
+          >同步信息到考场</el-button
+        >
         <el-button
           type="text"
           @click="del(props.scope.row, 1)"
@@ -84,7 +86,7 @@
       <div>
         <el-form
           label-position="right"
-          label-width="150px"
+          label-width="180px"
           :model="listData"
           :rules="rules"
           ref="listData"
@@ -168,6 +170,12 @@
               </el-form-item>
             </el-col>
           </el-form-item>
+          <el-form-item label="线上签署疫情防控承诺书" prop="reportStatus">
+            <el-radio-group v-model="listData.reportStatus">
+              <el-radio :label="1">是</el-radio>
+              <el-radio :label="0">否</el-radio>
+            </el-radio-group>
+          </el-form-item>
         </el-form>
       </div>
       <span slot="footer" class="dialog-footer">
@@ -207,13 +215,25 @@
         </div>
       </div>
       <div>
-        <el-button type="text" @click="openExamPlace">{{
-          intStatus === 1
-            ? "添加考试地点"
-            : intStatus === 2
-            ? "添加考前培训地点"
-            : "未知"
-        }}</el-button>
+        <div>
+          <span>考试地点来源:</span
+          ><el-radio-group v-model="radioAddress" @change="clearPlaceData">
+            <el-radio :label="2">智慧考场</el-radio>
+            <el-radio :label="1">云学堂</el-radio>
+          </el-radio-group>
+        </div>
+        <el-button
+          type="text"
+          @click="openExamPlace"
+          :disabled="radioAddress > 0 ? false : true"
+          >{{
+            intStatus === 1
+              ? "添加考试地点"
+              : intStatus === 2
+              ? "添加考前培训地点"
+              : "未知"
+          }}</el-button
+        >
         <div
           v-for="(item, index) in examPlaces"
           :key="index"
@@ -550,9 +570,13 @@
                 >适用商品</el-button
               >
               <el-form-item label="商品类型:">
-                <span v-for="(item, index) in $methodsTools.getGoodsType()" :key="index">{{
-                  item.value === infoData.goodsType ? item.label : ""
-                }}</span>
+                <span
+                  v-for="(item, index) in $methodsTools.getGoodsType()"
+                  :key="index"
+                  >{{
+                    item.value === infoData.goodsType ? item.label : ""
+                  }}</span
+                >
               </el-form-item>
               <el-form-item label="业务层级:">
                 <span
@@ -580,8 +604,37 @@
         <el-button @click="dialoginfoWatch = false">取 消</el-button>
       </span>
     </el-dialog>
+    <el-dialog
+      :visible.sync="dialogExamSync"
+      width="460px"
+      :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="dialogExamSync = false"
+          />
+        </div>
+      </div>
+      <div>
+        <p>总共:{{ syncData.total }}个学员</p>
+        <p>成功:{{ syncData.success }}个学员</p>
+        <p>
+          失败:{{ syncData.fail }}个学员
+          <el-button type="text" @click="watchSyncPeople">查看</el-button>
+        </p>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogExamSync = false">取 消</el-button>
+      </span>
+    </el-dialog>
     <before-page ref="beforePage" />
     <applicable-products ref="applicableProducts" />
+    <downMaterial ref="downMaterial" />
   </div>
 </template>
 
@@ -590,12 +643,27 @@ import searchBox from "@/components/searchBox";
 import tableList from "@/components/tableList";
 import pagination from "@/components/pagination";
 import applicableProducts from "./applicableProducts/index.vue";
-import beforePage from './applicableProducts/beforePage.vue';
+import beforePage from "./applicableProducts/beforePage.vue";
+import downMaterial from "./applicableProducts/downMaterial.vue";
 export default {
   name: "ExamArrangement",
-  components: { searchBox, tableList, pagination, applicableProducts, beforePage },
+  components: {
+    searchBox,
+    tableList,
+    pagination,
+    applicableProducts,
+    beforePage,
+    downMaterial,
+  },
   data() {
     return {
+      dialogExamSync: false, //同步信息到考场
+      syncData: {
+        total: 0,
+        success: 0,
+        fail: 0,
+      }, //同步信息到考场
+      radioAddress: "", //考试地点来源
       disabledBtn: false,
       total2: 0,
       pageSize2: 10,
@@ -658,6 +726,7 @@ export default {
       //   弹窗数据
       listData: {
         applyStatus: [],
+        reportStatus:1,
       },
       statusPop: -1,
       dialogVisible: false,
@@ -697,6 +766,13 @@ export default {
             trigger: "change",
           },
         ],
+        reportStatus: [
+          {
+            required: true,
+            message: "请选择线上签署疫情防控承诺书",
+            trigger: "change",
+          },
+        ],
       },
       dialogExamBoxs: false, //考点
       dialogExamPlace: false, //考试地点列表
@@ -755,18 +831,63 @@ export default {
   },
   mounted() {
     this.search();
-    this.getExamPlace();
   },
   activated() {
     this.search();
-    this.getExamPlace();
   },
   methods: {
+    //下载资料
+    downMaterial(row){
+      this.$refs.downMaterial.openBox(row)
+    },
+    //同步信息到考场
+    syncExam(row) {
+      this.$api
+        .appcommonwsyncApplyUserInfo({ applyId: row.applyId })
+        .then((res) => {
+          if (res.data && res.data.total) {
+            res.data.applyId = row.applyId;
+            this.syncData = res.data;
+            this.dialogExamSync = true;
+          } else {
+            this.$message.error("没有学员推送");
+          }
+        });
+    },
+    //查看失败学员-跳转
+    watchSyncPeople() {
+      const jump = () => {
+        this.dialogExamSync = false;
+        this.$router.push({
+          name: "ApplicationData",
+          params: {
+            id: this.syncData.applyId,
+            type: 3,
+          },
+        });
+      };
+      const statusPage = this.$store.state.tagsView.visitedViews.some(
+        (item) => {
+          return item.name == "ApplicationData";
+        }
+      );
+      if (statusPage) {
+        this.$store
+          .dispatch("tagsView/delCachedView", {
+            name: "ApplicationData",
+          })
+          .then((res) => {
+            jump();
+          });
+      } else {
+        jump();
+      }
+    },
     /**
      * 前培设置
      */
-    beforeFunc(row){
-      this.$refs.beforePage.openBox(row)
+    beforeFunc(row) {
+      this.$refs.beforePage.openBox(row);
     },
     setExamAdress() {
       this.$router.push({
@@ -930,8 +1051,15 @@ export default {
       this.examPlaces = this.examPlaces.concat(array);
       this.dialogExamPlace = false;
     },
+    /**
+     * 清空考场信息
+     */
+    clearPlaceData() {
+      this.examPlaces = [];
+    },
     getExamPlace() {
       var data = {
+        fromPlat: this.radioAddress,
         status: 1,
         pageSize: this.pageSize2,
         pageNum: this.currentPage2,
@@ -946,6 +1074,7 @@ export default {
       this.examPlaces.forEach((item) => {
         this.activeListExamPlace.push(item.siteId);
       });
+      this.getExamPlace();
       this.dialogExamPlace = true;
       this.$nextTick(function () {
         this.activeLists = [];
@@ -965,6 +1094,11 @@ export default {
               items.examApplySiteTimeTwo = JSON.parse(items.siteTime);
             });
           });
+          if (res.rows.length) {
+            this.radioAddress = res.rows[0].fromPlat;
+          } else {
+            this.radioAddress = 2;
+          }
           this.examPlaces = res.rows;
           this.dialogExamBoxs = true;
         });
@@ -1149,6 +1283,7 @@ export default {
         this.statusPop = 1;
         this.listData = {
           applyStatus: [],
+          reportStatus:1,
           applyUrl: "oss/images/avatar/20211013/1634097664410_1397766697",
         };
         this.$nextTick(() => {
@@ -1160,8 +1295,8 @@ export default {
         this.$api.obtainsystemapply(v.applyId).then((res) => {
           if (res.data.applyStatus) {
             res.data.applyStatus = res.data.applyStatus.split(",").map(Number);
-          }else{
-            res.data.applyStatus = []
+          } else {
+            res.data.applyStatus = [];
           }
           if (res.data.applyStartTime) {
             res.data.applyStartTime = this.$methodsTools.time10to13(

+ 37 - 2
src/views/education/examManagement/examConfiguration/examPlace/index.vue

@@ -8,11 +8,24 @@
       :loading="loading"
       @editInfo="editInfo"
     >
+      <template slot="customize">
+        <el-button size="medium" type="warning" @click="Synchronize"
+          >同步智慧考场</el-button
+        >
+      </template>
       <template slot="btn" slot-scope="props">
-        <el-button type="text" @click="addClick(props.scope.row, 0)"
+        <el-button
+          type="text"
+          @click="addClick(props.scope.row, 0)"
+          v-if="props.scope.row.fromPlat === 1"
           >修改</el-button
         >
-        <el-button type="text" @click="del(props.scope.row)">删除</el-button>
+        <el-button
+          type="text"
+          @click="del(props.scope.row)"
+          v-if="props.scope.row.fromPlat === 1"
+          >删除</el-button
+        >
       </template>
     </table-list>
     <pagination
@@ -124,6 +137,22 @@ export default {
           prop: "code",
           hidden: true,
         },
+        {
+          label: "来源",
+          prop: "fromPlat",
+          hidden: true,
+          scope: "isOptions",
+          options: [
+            {
+              label: "云学堂",
+              value: 1,
+            },
+            {
+              label: "智慧考场",
+              value: 2,
+            },
+          ],
+        },
         {
           label: "考试地点",
           prop: "siteAddress",
@@ -199,6 +228,12 @@ export default {
     this.search();
   },
   methods: {
+    Synchronize() {
+      this.$api.appcommonsyncExamSite().then((res) => {
+        this.$message.success("同步成功");
+        this.search()
+      });
+    },
     loadingClose() {
       this.disabledBtn = false;
     },

+ 527 - 0
src/views/education/marketingCampaignManageMent/marketingActivitiesList/index.vue

@@ -0,0 +1,527 @@
+<template>
+  <div id="marketingActivitiesList">
+    <search-box-new
+      ref="searchBox"
+      :formData="formData"
+      :formList="formList"
+      @search="search"
+      @init="init"
+    />
+    <table-list
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      :loading="loading"
+    >
+      <template slot="customize">
+        <el-button size="medium" type="success" @click="allClick"
+          >新增活动</el-button
+        >
+      </template>
+      <template slot="btn" slot-scope="props">
+        <el-button type="text" @click="reply(props.scope.row)">修改</el-button>
+        <el-button type="text" @click="del(props.scope.row)">删除</el-button>
+        <el-button type="text" @click="openCode(props.scope.row)"
+          >二维码</el-button
+        >
+        <el-button type="text" @click="userBoxsOpen(props.scope.row)"
+          >报名情况</el-button
+        >
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="formData.pageSize"
+      :currentPage="formData.pageNum"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+    <el-dialog
+      :visible.sync="dialogVisible"
+      width="610px"
+      :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="closeBZ" />
+        </div>
+      </div>
+      <div>
+        <el-form
+          label-position="right"
+          label-width="150px"
+          :model="listData"
+          :rules="rules"
+          ref="listData"
+        >
+          <el-form-item label="活动名称" prop="name">
+            <el-input v-model="listData.name"></el-input>
+          </el-form-item>
+          <el-form-item label="活动科目(多个科目使用逗号','隔开)" prop="majors">
+            <el-input v-model="listData.majors"></el-input>
+          </el-form-item>
+          <el-form-item label="活动开始时间" prop="startTime"
+            ><el-date-picker
+              type="datetime"
+              placeholder="开始日期"
+              @change="changeEndTime(1)"
+              v-model="listData.startTime"
+              style="width: 100%"
+              value-format="timestamp"
+            ></el-date-picker>
+          </el-form-item>
+          <el-form-item label="活动结束时间" prop="endTime">
+            <el-date-picker
+              type="datetime"
+              placeholder="开始日期"
+              @change="changeEndTime(2)"
+              v-model="listData.endTime"
+              style="width: 100%"
+              value-format="timestamp"
+            ></el-date-picker>
+          </el-form-item>
+        </el-form>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="closeBZ">取 消</el-button>
+        <el-button @click="submitForm('listData')">确 定</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog
+      :visible.sync="dialogVisibleCode"
+      width="610px"
+      :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="dialogVisibleCode = false"
+          />
+        </div>
+      </div>
+      <div style="text-align: center">
+        <img style="max-width: 420px" :src="baseImgCode" alt="" />
+        <div style="margin-top: 16px">
+          <el-button size="small" type="success" @click="downCode"
+            >下载二维码</el-button
+          >
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisibleCode = false">取 消</el-button>
+      </span>
+    </el-dialog>
+    <userBoxs ref="userBoxs" />
+  </div>
+</template>
+
+<script>
+import searchBoxNew from "@/components/searchBoxNew";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
+import userBoxs from "./userBoxs.vue";
+export default {
+  name: "MarketingActivitiesList",
+  components: { searchBoxNew, tableList, pagination, userBoxs },
+  data() {
+    return {
+      baseImgCode: "",
+      dialogVisibleCode: false,
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "营销活动",
+        index: 0,
+        ch: "条",
+        num: false,
+        border: true,
+        choice: true,
+        addHide: true,
+        changeWidth: "240px",
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      //搜索
+      formList: [
+        {
+          prop: "name",
+          placeholder: "请输入活动名称",
+        },
+      ],
+      formData: {
+        pageSize: 10,
+        pageNum: 1,
+        status: 1,
+      },
+      // 表单
+      tableSet: [
+        {
+          label: "活动名称",
+          prop: "name",
+          hidden: true,
+        },
+        {
+          label: "科目",
+          prop: "majors",
+          hidden: true,
+        },
+        {
+          label: "活动开始时间",
+          prop: "startTime",
+          hidden: true,
+          scope: "aTimeList",
+        },
+        {
+          label: "活动结束时间",
+          prop: "endTime",
+          hidden: true,
+          scope: "aTimeList",
+        },
+        {
+          label: "创建人",
+          prop: "creatorName",
+          hidden: true,
+        },
+        {
+          label: "创建时间",
+          prop: "createTime",
+          hidden: true,
+          scope: "aTimeList",
+        },
+      ],
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+      listData: {
+        name: "",
+        majors: "",
+        startTime: "",
+        endTime: "",
+      },
+      rules: {
+        name: [{ required: true, message: "请输入活动名称", trigger: "blur" }],
+        majors: [{ required: true, message: "请输入科目", trigger: "blur" }],
+        startTime: [
+          {
+            type: "date",
+            required: true,
+            message: "请选择活动开始时间",
+            trigger: "change",
+          },
+        ],
+        endTime: [
+          {
+            type: "date",
+            required: true,
+            message: "请选择活动结束时间",
+            trigger: "change",
+          },
+        ],
+      },
+      listPop: 1, //1新增2修改
+      dialogVisible: false,
+    };
+  },
+  mounted() {
+    this.search();
+  },
+  methods: {
+    //将base64转换为blob
+    dataURLtoBlob(dataurl) {
+      if (!dataurl) {
+        this.$message.error("下载失败");
+        return;
+      }
+      var arr = dataurl.split(","),
+        mime = arr[0].match(/:(.*?);/)[1],
+        bstr = atob(arr[1]),
+        n = bstr.length,
+        u8arr = new Uint8Array(n);
+      while (n--) {
+        u8arr[n] = bstr.charCodeAt(n);
+      }
+      return new Blob([u8arr], { type: mime });
+    },
+    //下载方法
+    downloadFile(url, name = "下载图") {
+      var a = document.createElement("a");
+      a.setAttribute("href", url);
+      a.setAttribute("download", name);
+      a.setAttribute("target", "_blank");
+      let clickEvent = document.createEvent("MouseEvents");
+      clickEvent.initEvent("click", true, true);
+      a.dispatchEvent(clickEvent);
+    },
+    //下载二维码
+    downCode() {
+      var base64 = this.baseImgCode;
+      var name = "营销活动小程序二维码";
+      var myBlob = this.dataURLtoBlob(base64);
+      var myUrl = URL.createObjectURL(myBlob);
+      this.downloadFile(myUrl, name);
+    },
+    //打开二维码
+    openCode(row) {
+      this.$api.exportsystemexamactivitycode(row.activityId).then((res) => {
+        console.log(res);
+        this.baseImgCode = res.data;
+        this.dialogVisibleCode = true;
+      });
+    },
+    userBoxsOpen(row) {
+      this.$refs.userBoxs.openBox(row);
+    },
+    changeEndTime(int) {
+      if (this.listData.startTime === this.listData.endTime) {
+        this.$message.warning("开始时间与结束时间不允许相同");
+        if (int === 1) {
+          this.listData.startTime = "";
+        }
+        if (int === 2) {
+          this.listData.endTime = "";
+        }
+        return;
+      }
+      if (
+        int === 1 &&
+        this.listData.endTime &&
+        this.listData.startTime > this.listData.endTime
+      ) {
+        this.$message.warning(
+          "当前选择的开始时间大于结束时间,请重新选择开始时间!"
+        );
+        this.listData.startTime = "";
+        return;
+      }
+      if (
+        int === 2 &&
+        this.listData.startTime &&
+        this.listData.endTime < this.listData.startTime
+      ) {
+        this.$message.warning(
+          "当前选择的结束时间小于开始时间,请重新选择结束时间!"
+        );
+        this.listData.endTime = "";
+        return;
+      }
+    },
+    search(int) {
+      this.loading = true;
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      if (int === 2) {
+        this.formData = {
+          pageSize: 10,
+          pageNum: 1,
+          status: 1,
+        };
+      }
+      var data = JSON.parse(JSON.stringify(this.formData));
+      this.$api
+        .inquireSystemexamactivitylist(data)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+          this.navText.index = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    init() {
+      this.search(2);
+    },
+    del(v) {
+      this.$alert(
+        "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
+        "提示",
+        {
+          dangerouslyUseHTMLString: true,
+        }
+      )
+        .then(() => {
+          var data = {
+            activityId: v.activityId,
+            status: -1,
+          };
+          this.$api.editSystemexamactivity(data).then((res) => {
+            this.$message.success("删除成功");
+            this.search();
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.search();
+    },
+    reply(item) {
+      this.listPop = 2;
+      this.listData = JSON.parse(JSON.stringify(item));
+      this.listData.startTime = this.listData.startTime * 1000;
+      this.listData.endTime = this.listData.endTime * 1000;
+      this.dialogVisible = true;
+      this.$nextTick(() => {
+        this.$refs["listData"].clearValidate();
+      });
+    },
+    allClick() {
+      this.listPop = 1;
+      this.listData = {
+        name: "",
+        majors: "",
+        startTime: "",
+        endTime: "",
+      };
+      this.dialogVisible = true;
+      this.$nextTick(() => {
+        this.$refs["listData"].clearValidate();
+      });
+    },
+    closeBZ() {
+      this.dialogVisible = false;
+    },
+    /**
+     * 提交-表单验证
+     */
+    submitForm(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.submit();
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    submit() {
+      var data = JSON.parse(JSON.stringify(this.listData));
+      data.startTime = data.startTime / 1000;
+      data.endTime = data.endTime / 1000;
+      if (this.listPop === 1) {
+        this.$api.addSystemexamactivity(data).then((res) => {
+          this.$message.success("新增成功");
+          this.search();
+          this.dialogVisible = false;
+        });
+      }
+      if (this.listPop === 2) {
+        this.$api.editSystemexamactivity(data).then((res) => {
+          this.$message.success("修改成功");
+          this.search();
+          this.dialogVisible = false;
+        });
+      }
+    },
+  },
+};
+</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>

+ 139 - 0
src/views/education/marketingCampaignManageMent/marketingActivitiesList/userBoxs.vue

@@ -0,0 +1,139 @@
+<template>
+  <div id="userBoxs">
+    <el-dialog
+      :visible.sync="dialogVisible"
+      width="910px"
+      :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="close" />
+        </div>
+      </div>
+      <div>
+        <div>
+          <el-button type="success" size="small" @click="exportUserList"
+            >导出数据</el-button
+          >
+        </div>
+        <el-table
+          v-loading="loading"
+          border
+          :data="tableData"
+          style="width: 100%; margin-top: 16px"
+          ref="tableList"
+          max-height="800px"
+          ><el-table-column type="index" width="55" label="序号" align="center">
+          </el-table-column>
+          <el-table-column
+            align="center"
+            v-for="(item, index) in tableSet"
+            :key="index"
+            :prop="item.prop"
+            :label="item.label"
+            :width="item.width"
+          >
+            <template slot-scope="scope">
+              <span v-if="item.scope === 'sex'">
+                {{
+                  scope.row[item.prop] === 1
+                    ? "男"
+                    : scope.row[item.prop] === 2
+                    ? "女"
+                    : ""
+                }}
+              </span>
+              <span v-else>{{ scope.row[item.prop] }}</span>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="close">取 消</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import * as baseUrls from "@/utils/request.js";
+export default {
+  data() {
+    return {
+      loading: false,
+      dialogVisible: false,
+      activityId: null, //考试ID
+      tableData: [],
+      tableSet: [
+        {
+          label: "用户名称",
+          prop: "userName",
+        },
+        {
+          label: "用户性别",
+          prop: "userSex",
+          scope: "sex",
+          width: "100px",
+        },
+        {
+          label: "企业名称",
+          prop: "companyName",
+        },
+        {
+          label: "用户身份证号码",
+          prop: "userIdCard",
+        },
+        {
+          label: "用户手机号码",
+          prop: "userPhone",
+        },
+        {
+          label: "报考科目",
+          prop: "userMajors",
+        },
+      ],
+      total: 0,
+    };
+  },
+  methods: {
+    openBox(row) {
+      this.activityId = row.activityId;
+      this.search();
+      this.dialogVisible = true;
+    },
+    search() {
+      this.loading = true;
+      this.$api
+        .inquireSystemexamactivityuserlist(this.activityId)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    exportUserList() {
+      this.$api.exportsystemexamactivity(this.activityId).then((res) => {
+        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();
+      });
+    },
+    close() {
+      this.dialogVisible = false;
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 75 - 35
src/views/education/mockTestManagement/mockExamArrangement/addMockExam/index.vue

@@ -51,6 +51,21 @@
           placeholder="请输入模考简介"
         ></el-input>
       </el-form-item>
+      <el-form-item label="是否活动模考" prop="mockActivity">
+        <el-radio-group
+          v-model="listData.mockActivity"
+          :disabled="
+            $refs.infoPage
+              ? $refs.infoPage.infoData.length > 0
+                ? true
+                : false
+              : false
+          "
+        >
+          <el-radio :label="1">是</el-radio>
+          <el-radio :label="0">否</el-radio>
+        </el-radio-group>
+      </el-form-item>
       <el-form-item label="业务层级" prop="educationTypeId">
         <el-select
           v-model="listData.educationTypeId"
@@ -108,7 +123,10 @@
           :newsubjectOption="newsubjectOption"
         />
       </el-form-item>
-      <el-form-item label="预约时间" prop="timeArray">
+      <el-form-item
+        :label="listData.mockActivity === 0 ? '预约时间' : '活动时间'"
+        prop="timeArray"
+      >
         <el-date-picker
           v-model="listData.timeArray"
           type="datetimerange"
@@ -165,6 +183,7 @@ export default {
       listData: {
         applyUrl: "oss/images/avatar/20211013/1634097664410_1397766697",
         status: 1,
+        mockActivity: 0,
       },
       rules: {
         applyName: [
@@ -179,7 +198,7 @@ export default {
         timeArray: [
           {
             required: true,
-            message: "请选择预约时间",
+            message: "请选择时间",
             trigger: ["blur", "change"],
           },
         ],
@@ -256,17 +275,24 @@ export default {
             try {
               this.$refs.infoPage.infoData.forEach((item) => {
                 item.mockMajorSubjectList.forEach((items) => {
-                  const checkSubjectTime = items.mockMajorSubjectTimeList.every(
-                    (time) => {
-                      return time.examTime && time.startTime && time.endTime;
+                  if (this.listData.mockActivity === 0) {
+                    const checkSubjectTime =
+                      items.mockMajorSubjectTimeList.every((time) => {
+                        return time.examTime && time.startTime && time.endTime;
+                      });
+                    if (checkSubjectTime) {
+                      if (!items.examId) {
+                        throw new Error("请检查关联试卷是否关联");
+                      }
+                    } else {
+                      throw new Error("请检查考试日期是否填写");
                     }
-                  );
-                  if (checkSubjectTime) {
-                    if (!items.examId) {
+                  } else if (this.listData.mockActivity === 1) {
+                    if (!items.duration) {
+                      throw new Error("请检查考试时长是否正确");
+                    } else if (!items.examId) {
                       throw new Error("请检查关联试卷是否关联");
                     }
-                  } else {
-                    throw new Error("请检查考试日期是否填写");
                   }
                 });
               });
@@ -290,24 +316,26 @@ export default {
           data.mockMajorList = JSON.parse(
             JSON.stringify(this.$refs.infoPage.infoData)
           );
-          var array = [];
-          data.mockMajorList.forEach((item) => {
-            item.mockMajorSubjectList.forEach((items) => {
-              items.mockMajorSubjectTimeList.forEach((itemTime) => {
-                itemTime.examTime = parseInt(itemTime.examTime / 1000);
-                array.push(
-                  new Date(
-                    this.$methodsTools.onlyForma(itemTime.examTime, false) +
-                      " " +
-                      itemTime.startTime
-                  ).getTime()
-                );
+          if (this.listData.mockActivity === 0) {
+            var array = [];
+            data.mockMajorList.forEach((item) => {
+              item.mockMajorSubjectList.forEach((items) => {
+                items.mockMajorSubjectTimeList.forEach((itemTime) => {
+                  itemTime.examTime = parseInt(itemTime.examTime / 1000);
+                  array.push(
+                    new Date(
+                      this.$methodsTools.onlyForma(itemTime.examTime, false) +
+                        " " +
+                        itemTime.startTime
+                    ).getTime()
+                  );
+                });
               });
             });
-          });
-          array.sort((a, b) => {
-            return a - b;
-          });
+            array.sort((a, b) => {
+              return a - b;
+            });
+          }
           // if (data.timeArray[1] >= array[0]) {
           //   this.$message.error("预约时间需要不得超过考试时间,请重新设置");
           //   this.disabledBtn = false;
@@ -319,15 +347,27 @@ export default {
               break;
             }
           }
-          data.applyStartTime = this.$methodsTools.time10to13(
-            data.timeArray[0],
-            1
-          );
-          data.applyEndTime = this.$methodsTools.time10to13(
-            data.timeArray[1],
-            1
-          );
-          delete data.timeArray;
+          if (data.mockActivity === 0) {
+            data.applyStartTime = this.$methodsTools.time10to13(
+              data.timeArray[0],
+              1
+            );
+            data.applyEndTime = this.$methodsTools.time10to13(
+              data.timeArray[1],
+              1
+            );
+            delete data.timeArray;
+          } else if (data.mockActivity === 1) {
+            data.activityStartTime = this.$methodsTools.time10to13(
+              data.timeArray[0],
+              1
+            );
+            data.activityEndTime = this.$methodsTools.time10to13(
+              data.timeArray[1],
+              1
+            );
+            delete data.timeArray;
+          }
           this.$api
             .appmockapply(data)
             .then((res) => {

+ 107 - 82
src/views/education/mockTestManagement/mockExamArrangement/addMockExam/infoPage.vue

@@ -58,6 +58,7 @@
               >{{ getsubjectName(items.subjectId) }}
             </span>
             <el-button
+              v-if="listData.mockActivity === 0"
               type="text"
               style="margin-left: 10px"
               @click="addTime(index, indexs)"
@@ -70,64 +71,74 @@
               >删除</el-button
             >
             <div style="padding-left: 20px">
-              <div
-                v-for="(
-                  timeItem, indexItem
-                ) in items.mockMajorSubjectTimeList"
-                :key="indexItem"
-                style="padding-bottom: 6px"
-              >
-                <el-date-picker
-                  style="max-width: 180px"
-                  size="small"
-                  v-model="timeItem.examTime"
-                  type="date"
-                  format="yyyy 年 MM 月 dd 日"
-                  value-format="timestamp"
-                  placeholder="考试日期"
-                >
-                </el-date-picker>
-                <el-time-picker
-                  style="max-width: 140px; margin-left: 10px"
-                  size="small"
-                  format="HH:mm:ss"
-                  placeholder="开始时间"
-                  v-model="timeItem.startTime"
-                  value-format="HH:mm:ss"
-                  :picker-options="{
-                    selectableRange: `00:00:00-${
-                      timeItem.endTime ? timeItem.endTime : '23:59:59'
-                    }`,
-                  }"
-                >
-                </el-time-picker>
-                <span> - </span>
-                <el-time-picker
-                  style="max-width: 140px"
-                  size="small"
-                  format="HH:mm:ss"
-                  placeholder="结束时间"
-                  v-model="timeItem.endTime"
-                  value-format="HH:mm:ss"
-                  :picker-options="{
-                    selectableRange: `${
-                      timeItem.startTime ? timeItem.startTime : '00:00:00'
-                    }-23:59:59`,
-                  }"
+              <template v-if="listData.mockActivity === 0">
+                <div
+                  v-for="(
+                    timeItem, indexItem
+                  ) in items.mockMajorSubjectTimeList"
+                  :key="indexItem"
+                  style="padding-bottom: 6px"
                 >
-                </el-time-picker>
-                <el-button
-                  v-if="items.mockMajorSubjectTimeList.length > 1"
-                  size="mini"
-                  style="margin-left: 6px"
-                  type="danger"
-                  icon="el-icon-delete"
-                  circle
-                  @click="
-                    items.mockMajorSubjectTimeList.splice(indexItem, 1)
-                  "
-                ></el-button>
-              </div>
+                  <el-date-picker
+                    style="max-width: 180px"
+                    size="small"
+                    v-model="timeItem.examTime"
+                    type="date"
+                    format="yyyy 年 MM 月 dd 日"
+                    value-format="timestamp"
+                    placeholder="考试日期"
+                  >
+                  </el-date-picker>
+                  <el-time-picker
+                    style="max-width: 140px; margin-left: 10px"
+                    size="small"
+                    format="HH:mm:ss"
+                    placeholder="开始时间"
+                    v-model="timeItem.startTime"
+                    value-format="HH:mm:ss"
+                    :picker-options="{
+                      selectableRange: `00:00:00-${
+                        timeItem.endTime ? timeItem.endTime : '23:59:59'
+                      }`,
+                    }"
+                  >
+                  </el-time-picker>
+                  <span> - </span>
+                  <el-time-picker
+                    style="max-width: 140px"
+                    size="small"
+                    format="HH:mm:ss"
+                    placeholder="结束时间"
+                    v-model="timeItem.endTime"
+                    value-format="HH:mm:ss"
+                    :picker-options="{
+                      selectableRange: `${
+                        timeItem.startTime ? timeItem.startTime : '00:00:00'
+                      }-23:59:59`,
+                    }"
+                  >
+                  </el-time-picker>
+                  <el-button
+                    v-if="items.mockMajorSubjectTimeList.length > 1"
+                    size="mini"
+                    style="margin-left: 6px"
+                    type="danger"
+                    icon="el-icon-delete"
+                    circle
+                    @click="items.mockMajorSubjectTimeList.splice(indexItem, 1)"
+                  ></el-button>
+                </div>
+              </template>
+              <template v-if="listData.mockActivity === 1">
+                考试时长(分钟):<el-input-number
+                  :controls="false"
+                  :precision="0"
+                  v-model="items.duration"
+                  controls-position="right"
+                  :min="1"
+                  :size="size"
+                ></el-input-number>
+              </template>
               <div style="margin-bottom: 10px">
                 <el-button
                   type="primary"
@@ -162,9 +173,7 @@
               </div>
               <ul class="goodslist_style">
                 <li
-                  v-for="(
-                    ititem, itindex
-                  ) in items.mockMajorSubjectGoodsList"
+                  v-for="(ititem, itindex) in items.mockMajorSubjectGoodsList"
                   :key="itindex"
                 >
                   {{ ititem.goodsCode }}-{{ ititem.goodsName }}-<span
@@ -173,9 +182,7 @@
                   ><i
                     class="deleteStyle"
                     style="margin-left: 10px"
-                    @click="
-                      items.mockMajorSubjectGoodsList.splice(itindex, 1)
-                    "
+                    @click="items.mockMajorSubjectGoodsList.splice(itindex, 1)"
                     >删除</i
                   >
                 </li>
@@ -228,9 +235,7 @@ export default {
             i < this.infoData[index].mockMajorSubjectList.length;
             i++
           ) {
-            if (
-              this.infoData[index].mockMajorSubjectList[i].subjectId === id
-            ) {
+            if (this.infoData[index].mockMajorSubjectList[i].subjectId === id) {
               status = true;
               break;
             }
@@ -287,23 +292,45 @@ export default {
      */
     handleSubjedt(item, index) {
       if (this.infoData[index].mockMajorSubjectList) {
-        this.infoData[index].mockMajorSubjectList.push({
-          subjectId: item.id,
-          mockMajorSubjectTimeList: [
-            { examTime: "", startTime: "", endTime: "" },
-          ],
-          mockMajorSubjectGoodsList: [],
-        });
-      } else {
-        this.$set(this.infoData[index], "mockMajorSubjectList", [
-          {
+        var ary = {};
+        if (this.listData.mockActivity === 0) {
+          ary = {
             subjectId: item.id,
             mockMajorSubjectTimeList: [
               { examTime: "", startTime: "", endTime: "" },
             ],
             mockMajorSubjectGoodsList: [],
-          },
-        ]);
+          };
+        }
+        if (this.listData.mockActivity === 1) {
+          ary = {
+            subjectId: item.id,
+            duration: "",
+            mockMajorSubjectGoodsList: [],
+          };
+        }
+        this.infoData[index].mockMajorSubjectList.push(ary);
+      } else {
+        if (this.listData.mockActivity === 0) {
+          this.$set(this.infoData[index], "mockMajorSubjectList", [
+            {
+              subjectId: item.id,
+              mockMajorSubjectTimeList: [
+                { examTime: "", startTime: "", endTime: "" },
+              ],
+              mockMajorSubjectGoodsList: [],
+            },
+          ]);
+        }
+        if (this.listData.mockActivity === 1) {
+          this.$set(this.infoData[index], "mockMajorSubjectList", [
+            {
+              subjectId: item.id,
+              duration: "",
+              mockMajorSubjectGoodsList: [],
+            },
+          ]);
+        }
       }
     },
     /**
@@ -380,8 +407,7 @@ export default {
         educationTypeId: this.listData.educationTypeId,
         businessId: this.listData.businessId,
         examId: this.infoData[index].mockMajorSubjectList[indexs].examId,
-        examName:
-          this.infoData[index].mockMajorSubjectList[indexs].examName,
+        examName: this.infoData[index].mockMajorSubjectList[indexs].examName,
       });
     },
     /**
@@ -406,8 +432,7 @@ export default {
       this.$refs.activeSection.openBoxGoods(index, indexs, {
         educationTypeId: this.listData.educationTypeId,
         businessId: this.listData.businessId,
-        sectionId:
-          this.infoData[index].mockMajorSubjectList[indexs].sectionId,
+        sectionId: this.infoData[index].mockMajorSubjectList[indexs].sectionId,
         sectionName:
           this.infoData[index].mockMajorSubjectList[indexs].sectionName,
       });

+ 90 - 41
src/views/education/mockTestManagement/mockExamArrangement/editMockExam/index.vue

@@ -51,6 +51,21 @@
           placeholder="请输入模考简介"
         ></el-input>
       </el-form-item>
+      <el-form-item label="是否活动模考" prop="mockActivity">
+        <el-radio-group
+          v-model="listData.mockActivity"
+          :disabled="
+            $refs.infoPage
+              ? $refs.infoPage.infoData.length > 0
+                ? true
+                : false
+              : false
+          "
+        >
+          <el-radio :label="1">是</el-radio>
+          <el-radio :label="0">否</el-radio>
+        </el-radio-group>
+      </el-form-item>
       <el-form-item label="业务层级" prop="educationTypeId">
         <el-select
           v-model="listData.educationTypeId"
@@ -108,7 +123,10 @@
           :newsubjectOption="newsubjectOption"
         />
       </el-form-item>
-      <el-form-item label="预约时间" prop="timeArray">
+      <el-form-item
+        :label="listData.mockActivity === 0 ? '预约时间' : '活动时间'"
+        prop="timeArray"
+      >
         <el-date-picker
           v-model="listData.timeArray"
           type="datetimerange"
@@ -165,6 +183,7 @@ export default {
       listData: {
         applyUrl: "oss/images/avatar/20211013/1634097664410_1397766697",
         status: 1,
+        mockActivity: 0,
       },
       rules: {
         applyName: [
@@ -179,7 +198,7 @@ export default {
         timeArray: [
           {
             required: true,
-            message: "请选择预约时间",
+            message: "请选择时间",
             trigger: ["blur", "change"],
           },
         ],
@@ -248,12 +267,21 @@ export default {
         });
         delete res.data.mockMajorList;
         //预约时间处理逻辑
-        res.data.timeArray = [
-          this.$methodsTools.time10to13(res.data.applyStartTime, 0),
-          this.$methodsTools.time10to13(res.data.applyEndTime, 0),
-        ];
-        delete res.data.applyStartTime;
-        delete res.data.applyEndTime;
+        if (res.data.mockActivity === 0) {
+          res.data.timeArray = [
+            this.$methodsTools.time10to13(res.data.applyStartTime, 0),
+            this.$methodsTools.time10to13(res.data.applyEndTime, 0),
+          ];
+          delete res.data.applyStartTime;
+          delete res.data.applyEndTime;
+        } else if (res.data.mockActivity === 1) {
+          res.data.timeArray = [
+            this.$methodsTools.time10to13(res.data.activityStartTime, 0),
+            this.$methodsTools.time10to13(res.data.activityEndTime, 0),
+          ];
+          delete res.data.activityStartTime;
+          delete res.data.activityEndTime;
+        }
         this.listData = res.data;
         this.$nextTick(() => {
           //模考专业
@@ -294,17 +322,24 @@ export default {
             try {
               this.$refs.infoPage.infoData.forEach((item) => {
                 item.mockMajorSubjectList.forEach((items) => {
-                  const checkSubjectTime = items.mockMajorSubjectTimeList.every(
-                    (time) => {
-                      return time.examTime && time.startTime && time.endTime;
+                  if (this.listData.mockActivity === 0) {
+                    const checkSubjectTime =
+                      items.mockMajorSubjectTimeList.every((time) => {
+                        return time.examTime && time.startTime && time.endTime;
+                      });
+                    if (checkSubjectTime) {
+                      if (!items.examId) {
+                        throw new Error("请检查关联试卷是否关联");
+                      }
+                    } else {
+                      throw new Error("请检查考试日期是否填写");
                     }
-                  );
-                  if (checkSubjectTime) {
-                    if (!items.examId) {
+                  } else if (this.listData.mockActivity === 1) {
+                    if (!items.duration) {
+                      throw new Error("请检查考试时长是否正确");
+                    } else if (!items.examId) {
                       throw new Error("请检查关联试卷是否关联");
                     }
-                  } else {
-                    throw new Error("请检查考试日期是否填写");
                   }
                 });
               });
@@ -328,24 +363,26 @@ export default {
           data.mockMajorList = JSON.parse(
             JSON.stringify(this.$refs.infoPage.infoData)
           );
-          var array = [];
-          data.mockMajorList.forEach((item) => {
-            item.mockMajorSubjectList.forEach((items) => {
-              items.mockMajorSubjectTimeList.forEach((itemTime) => {
-                itemTime.examTime = parseInt(itemTime.examTime / 1000);
-                array.push(
-                  new Date(
-                    this.$methodsTools.onlyForma(itemTime.examTime, false) +
-                      " " +
-                      itemTime.startTime
-                  ).getTime()
-                );
+          if (this.listData.mockActivity === 0) {
+            var array = [];
+            data.mockMajorList.forEach((item) => {
+              item.mockMajorSubjectList.forEach((items) => {
+                items.mockMajorSubjectTimeList.forEach((itemTime) => {
+                  itemTime.examTime = parseInt(itemTime.examTime / 1000);
+                  array.push(
+                    new Date(
+                      this.$methodsTools.onlyForma(itemTime.examTime, false) +
+                        " " +
+                        itemTime.startTime
+                    ).getTime()
+                  );
+                });
               });
             });
-          });
-          array.sort((a, b) => {
-            return a - b;
-          });
+            array.sort((a, b) => {
+              return a - b;
+            });
+          }
           // if (data.timeArray[1] >= array[0]) {
           //   this.$message.error("预约时间需要不得超过考试时间,请重新设置");
           //   this.disabledBtn = false;
@@ -357,15 +394,27 @@ export default {
               break;
             }
           }
-          data.applyStartTime = this.$methodsTools.time10to13(
-            data.timeArray[0],
-            1
-          );
-          data.applyEndTime = this.$methodsTools.time10to13(
-            data.timeArray[1],
-            1
-          );
-          delete data.timeArray;
+          if (data.mockActivity === 0) {
+            data.applyStartTime = this.$methodsTools.time10to13(
+              data.timeArray[0],
+              1
+            );
+            data.applyEndTime = this.$methodsTools.time10to13(
+              data.timeArray[1],
+              1
+            );
+            delete data.timeArray;
+          } else if (data.mockActivity === 1) {
+            data.activityStartTime = this.$methodsTools.time10to13(
+              data.timeArray[0],
+              1
+            );
+            data.activityEndTime = this.$methodsTools.time10to13(
+              data.timeArray[1],
+              1
+            );
+            delete data.timeArray;
+          }
           this.$api
             .editmockapply(data)
             .then((res) => {

+ 102 - 69
src/views/education/mockTestManagement/mockExamArrangement/editMockExam/infoPage.vue

@@ -58,6 +58,7 @@
               >{{ getsubjectName(items.subjectId) }}
             </span>
             <el-button
+              v-if="listData.mockActivity === 0"
               type="text"
               style="margin-left: 10px"
               @click="addTime(index, indexs)"
@@ -70,64 +71,74 @@
               >删除</el-button
             >
             <div style="padding-left: 20px">
-              <div
-                v-for="(
-                  timeItem, indexItem
-                ) in items.mockMajorSubjectTimeList"
-                :key="indexItem"
-                style="padding-bottom: 6px"
-              >
-                <el-date-picker
-                  style="max-width: 180px"
-                  size="small"
-                  v-model="timeItem.examTime"
-                  type="date"
-                  format="yyyy 年 MM 月 dd 日"
-                  value-format="timestamp"
-                  placeholder="考试日期"
-                >
-                </el-date-picker>
-                <el-time-picker
-                  style="max-width: 140px; margin-left: 10px"
-                  size="small"
-                  format="HH:mm:ss"
-                  placeholder="开始时间"
-                  v-model="timeItem.startTime"
-                  value-format="HH:mm:ss"
-                  :picker-options="{
-                    selectableRange: `00:00:00-${
-                      timeItem.endTime ? timeItem.endTime : '23:59:59'
-                    }`,
-                  }"
-                >
-                </el-time-picker>
-                <span> - </span>
-                <el-time-picker
-                  style="max-width: 140px"
-                  size="small"
-                  format="HH:mm:ss"
-                  placeholder="结束时间"
-                  v-model="timeItem.endTime"
-                  value-format="HH:mm:ss"
-                  :picker-options="{
-                    selectableRange: `${
-                      timeItem.startTime ? timeItem.startTime : '00:00:00'
-                    }-23:59:59`,
-                  }"
+              <template v-if="listData.mockActivity === 0">
+                <div
+                  v-for="(
+                    timeItem, indexItem
+                  ) in items.mockMajorSubjectTimeList"
+                  :key="indexItem"
+                  style="padding-bottom: 6px"
                 >
-                </el-time-picker>
-                <el-button
-                  v-if="items.mockMajorSubjectTimeList.length > 1"
-                  size="mini"
-                  style="margin-left: 6px"
-                  type="danger"
-                  icon="el-icon-delete"
-                  circle
-                  @click="
-                    items.mockMajorSubjectTimeList.splice(indexItem, 1)
-                  "
-                ></el-button>
-              </div>
+                  <el-date-picker
+                    style="max-width: 180px"
+                    size="small"
+                    v-model="timeItem.examTime"
+                    type="date"
+                    format="yyyy 年 MM 月 dd 日"
+                    value-format="timestamp"
+                    placeholder="考试日期"
+                  >
+                  </el-date-picker>
+                  <el-time-picker
+                    style="max-width: 140px; margin-left: 10px"
+                    size="small"
+                    format="HH:mm:ss"
+                    placeholder="开始时间"
+                    v-model="timeItem.startTime"
+                    value-format="HH:mm:ss"
+                    :picker-options="{
+                      selectableRange: `00:00:00-${
+                        timeItem.endTime ? timeItem.endTime : '23:59:59'
+                      }`,
+                    }"
+                  >
+                  </el-time-picker>
+                  <span> - </span>
+                  <el-time-picker
+                    style="max-width: 140px"
+                    size="small"
+                    format="HH:mm:ss"
+                    placeholder="结束时间"
+                    v-model="timeItem.endTime"
+                    value-format="HH:mm:ss"
+                    :picker-options="{
+                      selectableRange: `${
+                        timeItem.startTime ? timeItem.startTime : '00:00:00'
+                      }-23:59:59`,
+                    }"
+                  >
+                  </el-time-picker>
+                  <el-button
+                    v-if="items.mockMajorSubjectTimeList.length > 1"
+                    size="mini"
+                    style="margin-left: 6px"
+                    type="danger"
+                    icon="el-icon-delete"
+                    circle
+                    @click="items.mockMajorSubjectTimeList.splice(indexItem, 1)"
+                  ></el-button>
+                </div>
+              </template>
+              <template v-if="listData.mockActivity === 1">
+                考试时长(分钟):<el-input-number
+                  :controls="false"
+                  :precision="0"
+                  v-model="items.duration"
+                  controls-position="right"
+                  :min="1"
+                  :size="size"
+                ></el-input-number>
+              </template>
               <div style="margin-bottom: 10px">
                 <el-button
                   type="primary"
@@ -294,23 +305,45 @@ export default {
      */
     handleSubjedt(item, index) {
       if (this.infoData[index].mockMajorSubjectList) {
-        this.infoData[index].mockMajorSubjectList.push({
-          subjectId: item.id,
-          mockMajorSubjectTimeList: [
-            { examTime: "", startTime: "", endTime: "" },
-          ],
-          mockMajorSubjectGoodsList: [],
-        });
-      } else {
-        this.$set(this.infoData[index], "mockMajorSubjectList", [
-          {
+        var ary = {};
+        if (this.listData.mockActivity === 0) {
+          ary = {
             subjectId: item.id,
             mockMajorSubjectTimeList: [
               { examTime: "", startTime: "", endTime: "" },
             ],
             mockMajorSubjectGoodsList: [],
-          },
-        ]);
+          };
+        }
+        if (this.listData.mockActivity === 1) {
+          ary = {
+            subjectId: item.id,
+            duration: "",
+            mockMajorSubjectGoodsList: [],
+          };
+        }
+        this.infoData[index].mockMajorSubjectList.push(ary);
+      } else {
+        if (this.listData.mockActivity === 0) {
+          this.$set(this.infoData[index], "mockMajorSubjectList", [
+            {
+              subjectId: item.id,
+              mockMajorSubjectTimeList: [
+                { examTime: "", startTime: "", endTime: "" },
+              ],
+              mockMajorSubjectGoodsList: [],
+            },
+          ]);
+        }
+        if (this.listData.mockActivity === 1) {
+          this.$set(this.infoData[index], "mockMajorSubjectList", [
+            {
+              subjectId: item.id,
+              duration: "",
+              mockMajorSubjectGoodsList: [],
+            },
+          ]);
+        }
       }
     },
     /**

+ 2 - 0
src/views/education/studentManageMent/studentList/index.vue

@@ -281,6 +281,7 @@ export default {
           prop: "lastVisitTime",
           hidden: true,
           scope: "aTimeList",
+          isDiszing:true
         },
         {
           label: "最近学习终端",
@@ -303,6 +304,7 @@ export default {
           prop: "lastStudyTime",
           hidden: true,
           scope: "aTimeList",
+          isDiszing:true
         },
         {
           label: "所在公司",

+ 8 - 7
src/views/education/studentManageMent/studentXQ/accesslog.vue

@@ -8,8 +8,9 @@
         :inline="true"
       >
         <el-form-item label="">
-          <el-select v-model="value" placeholder="请选择" :size="size">
-            <el-option label="访问终端" :value="1"> </el-option>
+          <el-select v-model="formData.fromPlat" clearable placeholder="请选择访问终端" :size="size">
+            <el-option label="小程序端" :value="1"> </el-option>
+            <el-option label="PC端" :value="2"> </el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="">
@@ -99,7 +100,6 @@ export default {
   components: { pagination },
   data() {
     return {
-      value: 1,
       size: "small",
       tableData: [],
       tableList: [
@@ -128,10 +128,11 @@ export default {
   },
   methods: {
     clearFunc() {
-      this.formData.startTime = "";
-      this.formData.endTime = "";
-      this.formData.pageSize = 10;
-      this.formData.pageNum = 1;
+      this.formData = {
+        userId: this.$route.query.id,
+        pageSize: 10,
+        pageNum: 1,
+      };
       this.search();
     },
     search() {

+ 11 - 10
src/views/education/studentManageMent/studentXQ/studylog.vue

@@ -8,8 +8,9 @@
         :inline="true"
       >
         <el-form-item label="">
-          <el-select v-model="value" placeholder="请选择" :size="size">
-            <el-option label="学习终端" :value="1"> </el-option>
+          <el-select v-model="formData.fromPlat" clearable placeholder="请选择学习终端" :size="size">
+            <el-option label="小程序端" :value="1"> </el-option>
+            <el-option label="PC端" :value="2"> </el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="">
@@ -72,13 +73,13 @@
                 }}
               </span>
               <span v-else-if="item.scope === 'goodsType'">
-                <template v-for="(itemt, indext) in $methodsTools.getGoodsType">
+                <span v-for="(itemt, indext) in $methodsTools.getGoodsType()"
+                    :key="indext">
                   <span
-                    :key="indext"
                     v-if="itemt.value === scope.row[item.prop]"
                     >{{ itemt.label }}</span
                   >
-                </template>
+                </span>
               </span>
               <span v-else-if="item.scope === 'time'">{{
                 $methodsTools.onlyForma(scope.row[item.prop])
@@ -108,7 +109,6 @@ export default {
   components: { pagination },
   data() {
     return {
-      value: 1,
       size: "small",
       tableData: [],
       tableList: [
@@ -146,10 +146,11 @@ export default {
   },
   methods: {
     clearFunc() {
-      this.formData.startTime = "";
-      this.formData.endTime = "";
-      this.formData.pageSize = 10;
-      this.formData.pageNum = 1;
+      this.formData = {
+        userId: this.$route.query.id,
+        pageSize: 10,
+        pageNum: 1,
+      };
       this.search();
     },
     search() {

+ 10 - 11
src/views/resource/videoManagement/courseManagement/chapterContent/index.vue

@@ -139,8 +139,7 @@
         ref="multipleTable"
         :data="boxtableData"
         border
-        @select-all="selectAll"
-        @select="select"
+        @selection-change="selectionChange"
         :row-key="getRowKeys"
         :header-cell-style="{
           'background-color': '#eee',
@@ -192,7 +191,7 @@
       />
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button type="primary" @click="submitForm" :disabled="activeLists.length === 0">确 定</el-button>
       </span>
     </el-dialog>
     <el-dialog
@@ -292,7 +291,6 @@
           @init="init6"
         />
         <el-table
-          ref="multipleTable"
           :data="tableDataExam"
           border
           :header-cell-style="{
@@ -844,6 +842,7 @@ export default {
       this.centerDialogVisible = false;
       this.dialogVisible = true;
       this.$nextTick(function () {
+        self.activeLists = []
         self.$refs.multipleTable.clearSelection();
       });
     },
@@ -1034,9 +1033,9 @@ export default {
     },
     checkboxT(row, index) {
       var array = [];
-      this.tableDataInfos.map((item) => {
+      array = this.tableDataInfos.map((item) => {
         if (item.type === this.radio) {
-          array.push(item.CodeId);
+          return item.CodeId
         }
       });
       if (
@@ -1218,11 +1217,11 @@ export default {
     init6() {
       this.getSJ(2);
     },
-    selectAll(value) {
-      this.activeLists = value;
-    },
-    select(value) {
-      this.activeLists = value;
+    /**
+     * 多选框变化触发
+     */
+    selectionChange(arr) {
+      this.activeLists = arr;
     },
     backPage() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {