Tang 4 лет назад
Родитель
Сommit
599808eb37
100 измененных файлов с 14251 добавлено и 3603 удалено
  1. 4 0
      src/api/api.js
  2. 1 2
      src/components/searchBoxNew.vue
  3. 65 12
      src/components/tableList.vue
  4. 2 0
      src/main.js
  5. 39 4
      src/newApi/certificate.js
  6. 24 0
      src/newApi/goods.js
  7. 24 0
      src/newApi/homeApi.js
  8. 35 0
      src/newApi/mock.js
  9. 34 0
      src/newApi/mockSub.js
  10. 41 0
      src/newApi/order.js
  11. 10 0
      src/newApi/studentList.js
  12. 8 0
      src/store/getters.js
  13. 7 0
      src/store/modules/dict.js
  14. 2 2
      src/store/modules/tagsView.js
  15. 2 0
      src/utils/eventBus.js
  16. 70 8
      src/utils/methodsTool.js
  17. 302 0
      src/views/Marketing/goods/commodityManageMent/add/bankContent/bankCheck.vue
  18. 228 0
      src/views/Marketing/goods/commodityManageMent/add/bankContent/index.vue
  19. 171 0
      src/views/Marketing/goods/commodityManageMent/add/configureContentParameters.vue
  20. 58 9
      src/views/Marketing/goods/commodityManageMent/add/courseContent/courseCheck.vue
  21. 0 0
      src/views/Marketing/goods/commodityManageMent/add/courseContent/everyDayStudyNum.vue
  22. 30 11
      src/views/Marketing/goods/commodityManageMent/add/courseContent/handoutView.vue
  23. 15 2
      src/views/Marketing/goods/commodityManageMent/add/courseContent/index.vue
  24. 0 0
      src/views/Marketing/goods/commodityManageMent/add/courseContent/playPhoto.vue
  25. 116 1473
      src/views/Marketing/goods/commodityManageMent/add/index.vue
  26. 84 0
      src/views/Marketing/goods/commodityManageMent/add/introduction.vue
  27. 112 0
      src/views/Marketing/goods/commodityManageMent/add/issueAcertificate.vue
  28. 69 0
      src/views/Marketing/goods/commodityManageMent/add/makeUpExam/index.vue
  29. 212 0
      src/views/Marketing/goods/commodityManageMent/add/makeUpExam/makeCheck.vue
  30. 358 0
      src/views/Marketing/goods/commodityManageMent/add/pricePeriod.vue
  31. 106 30
      src/views/Marketing/goods/commodityManageMent/add/productInformation.vue
  32. 302 0
      src/views/Marketing/goods/commodityManageMent/edit/bankContent/bankCheck.vue
  33. 256 0
      src/views/Marketing/goods/commodityManageMent/edit/bankContent/index.vue
  34. 166 0
      src/views/Marketing/goods/commodityManageMent/edit/configureContentParameters.vue
  35. 227 0
      src/views/Marketing/goods/commodityManageMent/edit/courseContent/courseCheck.vue
  36. 68 0
      src/views/Marketing/goods/commodityManageMent/edit/courseContent/everyDayStudyNum.vue
  37. 366 0
      src/views/Marketing/goods/commodityManageMent/edit/courseContent/handoutView.vue
  38. 296 0
      src/views/Marketing/goods/commodityManageMent/edit/courseContent/index.vue
  39. 210 0
      src/views/Marketing/goods/commodityManageMent/edit/courseContent/playPhoto.vue
  40. 135 1479
      src/views/Marketing/goods/commodityManageMent/edit/index.vue
  41. 84 0
      src/views/Marketing/goods/commodityManageMent/edit/introduction.vue
  42. 124 0
      src/views/Marketing/goods/commodityManageMent/edit/issueAcertificate.vue
  43. 73 0
      src/views/Marketing/goods/commodityManageMent/edit/makeUpExam/index.vue
  44. 221 0
      src/views/Marketing/goods/commodityManageMent/edit/makeUpExam/makeCheck.vue
  45. 9 5
      src/views/Marketing/goods/commodityManageMent/edit/pricePeriod.vue
  46. 397 0
      src/views/Marketing/goods/commodityManageMent/edit/productInformation.vue
  47. 13 11
      src/views/Marketing/goods/commodityManageMent/index.vue
  48. 0 244
      src/views/Marketing/goods/commodityManageMent/newAdd/index.vue
  49. 1 1
      src/views/Marketing/goods/commodityManageMent/poppleSet.vue
  50. 270 0
      src/views/Marketing/goods/commodityManageMent/poppleSetTKCOPY.vue
  51. 238 0
      src/views/Marketing/goods/fieldTemplate/index.vue
  52. 177 0
      src/views/Marketing/goods/fieldTemplate/temPlatePop.vue
  53. 32 2
      src/views/Marketing/order/offlineOrder/index.vue
  54. 182 0
      src/views/Marketing/order/offlineOrder/orderChargeInfo/goodsDocument/closeStatusPop.vue
  55. 54 1
      src/views/Marketing/order/offlineOrder/orderChargeInfo/goodsDocument/goodsInfos.vue
  56. 4 0
      src/views/Marketing/order/orderList/details/goodsManage.vue
  57. 32 2
      src/views/Marketing/order/orderList/index.vue
  58. 16 0
      src/views/Marketing/order/schoolHoursConflictOrder/index.vue
  59. 45 6
      src/views/education/certificateManagement/certificateModel/index.vue
  60. 96 18
      src/views/education/classManageMent/classList/index.vue
  61. 10 0
      src/views/education/classManageMent/learningAccoutTags/index.vue
  62. 58 55
      src/views/education/classManageMent/learningHoursRecordList/hoursTimesRecord.vue
  63. 34 2
      src/views/education/classManageMent/listOfhoursToBeReviewed/index.vue
  64. 18 6
      src/views/education/classManageMent/studentInfoChange/index.vue
  65. 25 2
      src/views/education/classManageMent/studentPushData/index.vue
  66. 20 1
      src/views/education/dataReview/dataConfig/index.vue
  67. 17 2
      src/views/education/examManagement/applicationData/asPlanned.vue
  68. 8 5
      src/views/education/examManagement/examArrangement/applicableProducts/checkStudent.vue
  69. 17 9
      src/views/education/examManagement/examArrangement/applicableProducts/index.vue
  70. 3 26
      src/views/education/examManagement/examArrangement/index.vue
  71. 32 24
      src/views/education/examManagement/qianpeiArrange/assExamPlan.vue
  72. 2 45
      src/views/education/examManagement/qianpeiArrange/index.vue
  73. 236 0
      src/views/education/liveLearningManagement/liveLearningRecord/index.vue
  74. 211 0
      src/views/education/liveLearningManagement/liveLearningRecord/studentStyleList/index.vue
  75. 205 0
      src/views/education/liveLearningManagement/liveLearningRecord/studentStyleList/watchLiveData/index.vue
  76. 212 0
      src/views/education/liveLearningManagement/liveLearningRecord/studentStyleList/watchLiveData/infoBox.vue
  77. 343 0
      src/views/education/mockTestManagement/mockExamArrangement/activeExam.vue
  78. 401 0
      src/views/education/mockTestManagement/mockExamArrangement/activeGoodsPop.vue
  79. 387 0
      src/views/education/mockTestManagement/mockExamArrangement/activeSection.vue
  80. 438 0
      src/views/education/mockTestManagement/mockExamArrangement/addMockExam/index.vue
  81. 482 0
      src/views/education/mockTestManagement/mockExamArrangement/addMockExam/infoPage.vue
  82. 468 0
      src/views/education/mockTestManagement/mockExamArrangement/editMockExam/index.vue
  83. 489 0
      src/views/education/mockTestManagement/mockExamArrangement/editMockExam/infoPage.vue
  84. 279 0
      src/views/education/mockTestManagement/mockExamArrangement/index.vue
  85. 305 0
      src/views/education/mockTestManagement/mockTestData/index.vue
  86. 520 0
      src/views/education/mockTestManagement/mockTestData/recordQusetion/index.vue
  87. 199 0
      src/views/education/questionBankLearning/questionRecordPage/bankGoods.vue
  88. 217 0
      src/views/education/questionBankLearning/questionRecordPage/giftPaper.vue
  89. 46 0
      src/views/education/questionBankLearning/questionRecordPage/index.vue
  90. 186 0
      src/views/education/questionBankLearning/questionRecordPage/listOfQuestions/index.vue
  91. 528 0
      src/views/education/questionBankLearning/questionRecordPage/listOfQuestions/studentData/index.vue
  92. 47 25
      src/views/education/studentManageMent/studentList/index.vue
  93. 1 1
      src/views/education/studentManageMent/studentXQ/BankQuestionPassRecord.vue
  94. 6 1
      src/views/education/studentManageMent/studentXQ/index.vue
  95. 443 0
      src/views/education/studentManageMent/studentXQ/liveList.vue
  96. 597 73
      src/views/index.vue
  97. 4 0
      src/views/resource/baseManageInfos/index.vue
  98. 430 0
      src/views/resource/baseManageInfos/resource/certificateName/index.vue
  99. 2 2
      src/views/resource/videoManagement/courseManagement/basicInfoAdd/index.vue
  100. 2 2
      src/views/resource/videoManagement/courseManagement/basicInfoEdit/index.vue

+ 4 - 0
src/api/api.js

@@ -98,6 +98,8 @@ import refund from '../newApi/refund'//退费管理
 import activityRecommend from '../newApi/activityRecommend'//商品推荐管理
 import homeApi from '../newApi/homeApi'//控制台学员数据
 import studyAccountStatus from '../newApi/studyAccountStatus'//学习账号标记
+import mock from '../newApi/mock'//模考管理
+import mockSub from '../newApi/mockSub'//预约模考管理
 
 
 
@@ -176,6 +178,8 @@ export default {
     ...activityRecommend,
     ...homeApi,
     ...studyAccountStatus,
+    ...mock,
+    ...mockSub
 
     // ...login,
     // ...profession,

+ 1 - 2
src/components/searchBoxNew.vue

@@ -6,7 +6,7 @@
         <el-button
           :type="formData.goodsType === item.value ? 'primary' : ''"
           :size="size"
-          v-for="(item, index) in lists"
+          v-for="(item, index) in $methodsTools.getGoodsType(false)"
           :key="index"
           @click="topSearch(item.value)"
           >{{ item.label }}</el-button
@@ -718,7 +718,6 @@ export default {
                     -1 &&
                   this.formData["businessId"]
                 ) {
-
                   return items;
                 }
                 if (

+ 65 - 12
src/components/tableList.vue

@@ -230,11 +230,13 @@
           <span
             v-else-if="
               item.scope === 'treeWatch' &&
-              (scope.row['goodsType'] === 1 || scope.row['goodsType'] === 2)
+              (scope.row['goodsType'] === 1 ||
+                scope.row['goodsType'] === 2 ||
+                scope.row['goodsType'] === 6)
             "
             style="color: blue"
             @click="
-              scope.row['goodsType'] === 1
+              scope.row['goodsType'] === 1 || scope.row['goodsType'] === 6
                 ? diavios(scope.row['goodsId'])
                 : diaviosTK(scope.row['goodsId'])
             "
@@ -609,6 +611,14 @@
               <el-button slot="reference" size="mini">查看</el-button>
             </el-popover>
           </span>
+          <div v-else-if="item.scope === 'subTime'">
+            <span style="margin-right: 6px">{{
+              $methodsTools.onlyForma(scope.row[item.prop1], false)
+            }}</span>
+            <span>{{ scope.row[item.prop2] }}</span>
+            <span> - </span>
+            <span>{{ scope.row[item.prop3] }}</span>
+          </div>
           <div v-else-if="item.scope === 'video'">
             <i
               v-if="scope.row[item.prop][item.prop1] !== null"
@@ -982,7 +992,11 @@
                 : ""
             }}
           </span>
-          <div v-else-if="item.scope === 'openBox'" class="open_style" @click="openBoxData(scope.row)">
+          <div
+            v-else-if="item.scope === 'openBox'"
+            class="open_style"
+            @click="openBoxData(scope.row)"
+          >
             {{ scope.row[item.prop] }}
           </div>
           <div v-else-if="item.scope === 'changeCLS'">
@@ -1085,7 +1099,16 @@
                   ).toFixed(2) + "%"
             }}
           </span>
-
+          <div v-else-if="item.scope === 'computerDoNum'">
+            {{
+              scope.row[item.prop1] == 0 && scope.row[item.prop2] == 0
+                ? "0%"
+                : (
+                    (scope.row[item.prop1] / scope.row[item.prop2]) *
+                    100
+                  ).toFixed(2) + "%"
+            }}
+          </div>
           <div v-else-if="item.scope === 'payGoodsList'">
             <span
               style="margin-right: 6px"
@@ -1096,12 +1119,30 @@
               }})</span
             >
             <span
+              style="margin-right: 6px"
               class="goodsListStyle"
               @click="openGoodsListBoxs(scope.row, 2)"
               >题库({{
                 scope.row[item.prop2] ? scope.row[item.prop2] : 0
               }})</span
             >
+            <span
+              class="goodsListStyle"
+              @click="openGoodsListBoxs(scope.row, 6)"
+              >直播({{
+                scope.row[item.prop3] ? scope.row[item.prop3] : 0
+              }})</span
+            >
+          </div>
+          <div v-else-if="item.scope === 'analysiss'">
+            {{ scope.row[item.prop].toString() }}
+          </div>
+          <div
+            v-else-if="item.scope === 'reserveFunc'"
+            class="editInfoSty"
+            @click="openBoxData(scope.row)"
+          >
+            {{ scope.row[item.prop1] }}/{{ scope.row[item.prop2] }}
           </div>
           <span v-else-if="item.scope === 'statusOrder'">{{
             scope.row[item.prop] === -2
@@ -1292,12 +1333,16 @@
             }}
           </span>
           <div v-else-if="item.scope === 'morePeople'">
-            <span
-              v-for="(itm, idm) in scope.row[item.prop].split(',').map(Number)"
-              :key="idm"
-            >
-              {{ itm === 1 ? "非补考学员" : itm === 2 ? "补考学员" : "" }}
-            </span>
+            <template v-if="scope.row[item.prop]">
+              <span
+                v-for="(itm, idm) in scope.row[item.prop]
+                  .split(',')
+                  .map(Number)"
+                :key="idm"
+              >
+                {{ itm === 1 ? "非补考学员" : itm === 2 ? "补考学员" : "" }}
+              </span>
+            </template>
           </div>
           <span
             v-else-if="item.scope === 'jumpPageLabelProfess'"
@@ -1677,11 +1722,19 @@
           </div>
           <div
             class="zdyBtnstyle"
+            style="margin-right: 20px"
             :class="goodsActiveIndex === 2 ? 'goodsActiveStyle' : ''"
             @click="getGoodsAboutList(2)"
           >
             题库商品
           </div>
+          <div
+            class="zdyBtnstyle"
+            :class="goodsActiveIndex === 6 ? 'goodsActiveStyle' : ''"
+            @click="getGoodsAboutList(6)"
+          >
+            直播商品
+          </div>
         </div>
         <ul class="overBoxs" v-if="goodsList.length">
           <li v-for="(item, index) in goodsList" :key="index" class="liSYTS">
@@ -2242,8 +2295,8 @@ export default {
         }
       }
     },
-    openBoxData(row){
-      this.$emit("openBoxFun",row)
+    openBoxData(row) {
+      this.$emit("openBoxFun", row);
     },
     diaviosTK(ids) {
       this.$api.inquireGoodsbanklist({ goodsId: ids }).then((res) => {

+ 2 - 0
src/main.js

@@ -38,6 +38,7 @@ import VueMeta from 'vue-meta'
 // 字典数据组件
 import DictData from '@/components/DictData'
 import methodsTools from '@/utils/methodsTool'
+import bus from '@/utils/eventBus'
 // 全局方法挂载
 
 Vue.prototype.$store = store
@@ -52,6 +53,7 @@ Vue.prototype.handleTree = handleTree
 Vue.prototype.$api = api
 Vue.prototype.$upload = upload
 Vue.prototype.$methodsTools = methodsTools
+Vue.prototype.$bus = bus
 // 全局组件挂载
 Vue.component('DictTag', DictTag)
 Vue.component('Pagination', Pagination)

+ 39 - 4
src/newApi/certificate.js

@@ -1,6 +1,6 @@
 import request from '@/utils/request' //引入axios请求及拦截器
 export default {
-    //新增证书
+    //新增证书类型
     appBaseCertificate(data) {
         return request({
             url: '/base/certificate',
@@ -8,7 +8,7 @@ export default {
             data
         })
     },
-    //修改证书
+    //修改证书类型
     editBaseCertificate(data) {
         return request({
             url: '/base/certificate/edit',
@@ -16,7 +16,7 @@ export default {
             data
         })
     },
-    //查询证书列表
+    //查询证书类型列表
     inquireBaseCertificate(data) {
         return request({
             url: '/base/certificate/list',
@@ -24,7 +24,7 @@ export default {
             params: data
         })
     },
-    //获取证书详细信息
+    //获取证书类型详细信息
     obtainBaseCertificate(data) {
         return request({
             url: `/base/certificate/` + data,
@@ -74,4 +74,39 @@ export default {
             params: data
         })
     },
+    /**
+     *  
+     * @remarks 证书名称 
+     */
+    //新增证书名称
+    appBaseCertificatecommon(data) {
+        return request({
+            url: '/base/certificate/common',
+            method: 'post',
+            data
+        })
+    },
+    //修改证书名称
+    editBaseCertificatecommon(data) {
+        return request({
+            url: '/base/certificate/common/edit',
+            method: 'post',
+            data
+        })
+    },
+    //查询证书名称列表
+    inquireBaseCertificatecommon(data) {
+        return request({
+            url: '/base/certificate/common/list',
+            method: 'get',
+            params: data
+        })
+    },
+    //获取证书名称详细信息
+    obtainBaseCertificatecommon(data) {
+        return request({
+            url: `/base/certificate/common/` + data,
+            method: 'get',
+        })
+    },
 }

+ 24 - 0
src/newApi/goods.js

@@ -103,4 +103,28 @@ export default {
             params: data
         })
     },
+    //查询免费题库商品列表
+    inquiregoodslistFreeGoodsList(data) {
+        return request({
+            url: '/goods/listFreeGoodsList',
+            method: 'get',
+            params: data
+        })
+    },
+    //查询用户题库商品列表
+    inquiregoodslistBankGoodsList(data) {
+        return request({
+            url: '/goods/listBankGoodsList',
+            method: 'get',
+            params: data
+        })
+    },
+    //导出直播商品列表
+    inquiregoodslistBankexport_list(data) {
+        return request({
+            url: '/goods/export_list',
+            method: 'get',
+            params: data
+        })
+    },
 }

+ 24 - 0
src/newApi/homeApi.js

@@ -32,4 +32,28 @@ export default {
             params: data
         })
     },
+    //控制台考试数据
+    baseconsoletestData(data) {
+        return request({
+            url: '/base/console/testData',
+            method: 'get',
+            params: data
+        })
+    },
+    //控制台模考数据
+    baseconsolemockData(data) {
+        return request({
+            url: '/base/console/mockData',
+            method: 'get',
+            params: data
+        })
+    },
+    //控制台填写资料审核数据
+    baseconsoleprofileData(data) {
+        return request({
+            url: '/base/console/profileData',
+            method: 'get',
+            params: data
+        })
+    },
 }

+ 35 - 0
src/newApi/mock.js

@@ -0,0 +1,35 @@
+import request from '@/utils/request' //引入axios请求及拦截器
+export default {
+    //新增模考安排
+    appmockapply(data) {
+        return request({
+            url: '/mock/apply',
+            method: 'post',
+            data
+        })
+    },
+    //修改模考安排
+    editmockapply(data) {
+        return request({
+            url: '/mock/apply/edit',
+            method: 'post',
+            data
+        })
+    },
+    //查询模考安排列表
+    inquiremockapplylistApply(data) {
+        return request({
+            url: '/mock/apply/listApply',
+            method: 'get',
+            params: data
+        })
+    },
+    //查询模考安排列表
+    inquiremockapplylistApplydata(data) {
+        return request({
+            url: '/mock/apply/' + data,
+            method: 'get',
+        })
+    },
+    
+}

+ 34 - 0
src/newApi/mockSub.js

@@ -0,0 +1,34 @@
+import request from '@/utils/request' //引入axios请求及拦截器
+export default {
+    //查询用户预约模考列表
+    inquireusersubscribelistSubscribe(data) {
+        return request({
+            url: '/user/subscribe/listSubscribe',
+            method: 'get',
+            params: data
+        })
+    },
+    //修改用户模考做题历史
+    editmockrecord(data) {
+        return request({
+            url: '/mock/record/edit',
+            method: 'post',
+            data
+        })
+    },
+    //查询用户模考做题历史列表
+    inquiremockrecordlist(data) {
+        return request({
+            url: '/mock/record/list',
+            method: 'get',
+            params: data
+        })
+    },
+    //获取用户模考做题历史详细信息
+    inquiremockrecordId(data) {
+        return request({
+            url: '/mock/record/' + data,
+            method: 'get',
+        })
+    },
+}

+ 41 - 0
src/newApi/order.js

@@ -71,4 +71,45 @@ export default {
             params: data
         })
     },
+    
+    //关闭订单商品
+    closeOrderGoodsordergoods(data) {
+        return request({
+            url: '/order/goods/closeOrderGoods',
+            method: 'post',
+            data
+        })
+    },
+    //查询购买直播商品的用户列表
+    inquireOrderGoodsBuyLiveGoodsList(data) {
+        return request({
+            url: '/order/goods/listLiveGoodsList',
+            method: 'get',
+            params: data
+        })
+    },
+    //直播商品的用户学习列表
+    inquireOrderGoodsBuyuserSectionLiveList(data) {
+        return request({
+            url: '/order/goods/userSectionLiveList',
+            method: 'get',
+            params: data
+        })
+    },
+    //保利威用户学习时间日志
+    inquireOrderGoodsBuyuserSectionLiveLog(data) {
+        return request({
+            url: '/order/goods/userSectionLiveLog',
+            method: 'get',
+            params: data
+        })
+    },
+    //导出购买直播商品的学员学习记录
+    inquireOrderGoodsexport_listLiveGoodsList(data) {
+        return request({
+            url: '/order/goods/export_listLiveGoodsList',
+            method: 'get',
+            params: data
+        })
+    },
 }

+ 10 - 0
src/newApi/studentList.js

@@ -80,4 +80,14 @@ export default {
             params: data
         })
     },
+    // 查询学员直播商品学习记录
+    inquireuserlistLive(data) {
+        return request({
+            url: '/grade/student/listLive',
+            method: 'get',
+            params: data
+        })
+    },
+    
+
 }

+ 8 - 0
src/store/getters.js

@@ -101,6 +101,14 @@ const getters = {
     }
     return state.dict.certificate
   },
+  certificateName(state) {
+    if (!state.dict.certificateName) {
+      api.inquireBaseCertificatecommon({ status: 1 }).then(res => {
+        state.dict.certificateName = res.rows
+      })
+    }
+    return state.dict.certificateName
+  },
   certificateTp(state) {
     if (!state.dict.certificateTp) {
       api.inquireBaseCertificatetp({ status: 1 }).then(res => {

+ 7 - 0
src/store/modules/dict.js

@@ -10,6 +10,7 @@ const state = {
   Professional: null,//专业
   courseExamine: null,//考期
   certificate: null,//证书类型
+  certificateName: null,//证书名称
   certificateTp: null,//证书模板
   labelList: null,//标签
   payList: null,//支付通道
@@ -87,6 +88,12 @@ const mutations = {
       state.certificate = res.rows
     })
   },
+  //更新证书名称
+  CERTIFICATENAME(state) {
+    api.inquireBaseCertificatecommon({ status: 1 }).then(res => {
+      state.certificateName = res.rows
+    })
+  },
   //更新证书模板
   CERTIFICATETP(state) {
     api.inquireBaseCertificatetp({ status: 1 }).then(res => {

+ 2 - 2
src/store/modules/tagsView.js

@@ -2,7 +2,7 @@ import { MessageBox } from 'element-ui';
 const state = {
   visitedViews: [],
   cachedViews: [],
-  alertPage: ["CommodityManageMentAdd", "CommodityManageMentEdit", "FestivalAdd", "FestivalEdit", "ChapterAdd", "ChapterEdit", "ModuleManagementAdd", "ModuleManagementEdit", "BasicInfoEdit", "BasicInfoAdd", "ChapterContent", "EditCourse", "OrderDetail", "OrderPrice", "AddOrder", "EditPaper", "AddPaper", "TopicAddPaper", "ChapterVolumeManagementEdit", "ChapterVolumeManagementAdd", "VolumeManagementAdd", "VolumeManagementEdit", "HandoutListEdit", "HandoutListAdd", "StudentXQ", "AddClass", "ManageClass", "NotificationInfo", "NotificationListAdd", "NotificationEdit", "BulkImportPlan", "MatchInfoData", "BatchRecord", "OrderChargeInfo", "RefundDocument", "BillingBillCharges"],
+  alertPage: ["CommodityManageMentAdd", "CommodityManageMentEdit", "FestivalAdd", "FestivalEdit", "ChapterAdd", "ChapterEdit", "ModuleManagementAdd", "ModuleManagementEdit", "BasicInfoEdit", "BasicInfoAdd", "ChapterContent", "EditCourse", "OrderDetail", "OrderPrice", "AddOrder", "EditPaper", "AddPaper", "TopicAddPaper", "ChapterVolumeManagementEdit", "ChapterVolumeManagementAdd", "VolumeManagementAdd", "VolumeManagementEdit", "HandoutListEdit", "HandoutListAdd", "StudentXQ", "AddClass", "ManageClass", "NotificationInfo", "NotificationListAdd", "NotificationEdit", "BulkImportPlan", "MatchInfoData", "BatchRecord", "OrderChargeInfo", "RefundDocument", "BillingBillCharges", "AddMockExam", "EditMockExam","RecordQusetion"],
 }
 
 const mutations = {
@@ -180,7 +180,7 @@ const actions = {
           dangerouslyUseHTMLString: true,
           confirmButtonText: '确认关闭',
           cancelButtonText: '暂不关闭',
-          iconClass:"el-icon-warning",
+          iconClass: "el-icon-warning",
           showCancelButton: true,
         }).then(res => {
           func()

+ 2 - 0
src/utils/eventBus.js

@@ -0,0 +1,2 @@
+import Vue from "vue"
+export default new Vue

Разница между файлами не показана из-за своего большого размера
+ 70 - 8
src/utils/methodsTool.js


+ 302 - 0
src/views/Marketing/goods/commodityManageMent/add/bankContent/bankCheck.vue

@@ -0,0 +1,302 @@
+<template>
+  <div id="bankCheck">
+    <el-dialog
+      @opened="prepareEnd"
+      :visible.sync="dialogVisibleTableBoxs"
+      width="1100px"
+      :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="dialogVisibleTableBoxs = false"
+          />
+        </div>
+      </div>
+      <div style="margin-bottom: 10px">
+        <!-- 题卷类型 -->
+        <el-select
+          style="margin-left: 10px"
+          v-model="formData['examType']"
+          placeholder="请选择题卷类型"
+          :size="size"
+          @change="getInfos(1)"
+        >
+          <el-option
+            v-for="(items, indexs) in examTypeList"
+            :key="indexs"
+            :label="items.label"
+            :value="items.value"
+          ></el-option>
+        </el-select>
+        <!-- 搜索框 -->
+        <el-input
+          style="width: 230px; margin: 0px 10px"
+          :size="size"
+          v-model="formData['key']"
+          placeholder="标题前缀/标题编码/标题名称"
+        ></el-input>
+        <el-button :size="size" type="primary" @click="getInfos(1)"
+          >查询</el-button
+        >
+        <el-button :size="size" @click="getInfos(0)">重置</el-button>
+      </div>
+      <el-table
+        ref="multipleTable"
+        :data="tableData"
+        border
+        @selection-change="selectCheck"
+        :row-key="getRowKeys"
+        :header-cell-style="{
+          'background-color': '#eee',
+          padding: '8px',
+          color: '#333',
+        }"
+        max-height="600px"
+      >
+        <el-table-column
+          align="center"
+          type="selection"
+          width="55"
+          header-align="center"
+          :selectable="checkbox"
+          :reserve-selection="true"
+        >
+        </el-table-column>
+        <template v-for="(item, index) in tableSet">
+          <el-table-column
+            v-if="item.scope !== 'inputs'"
+            :width="item.width"
+            :key="index"
+            :label="item.label"
+            align="center"
+            :show-overflow-tooltip="true"
+            header-align="center"
+          >
+            <template slot-scope="scope">
+              <span v-if="item.scope === 'Status'">
+                {{
+                  scope.row[item.prop] === 1
+                    ? "发布"
+                    : scope.row[item.prop] === 0
+                    ? "未发布"
+                    : "未知"
+                }}
+              </span>
+              <span v-else-if="item.scope === 'businessType'">
+                {{ scope.row[item.prop1] }}-{{ scope.row[item.prop2] }}
+              </span>
+              <span v-else-if="item.scope === 'type'">
+                {{
+                  scope.row[item.prop] === 1
+                    ? "模块卷"
+                    : scope.row[item.prop] === 2
+                    ? "章卷"
+                    : scope.row[item.prop] === 3
+                    ? "试卷"
+                    : "未知"
+                }}
+              </span>
+              <span v-else>{{ scope.row[item.prop] }}</span></template
+            >
+          </el-table-column></template
+        >
+      </el-table>
+      <pagination
+        :total="total"
+        :pageSize="formData.pageSize"
+        :currentPage="formData.pageNum"
+        @handleSizeChange="handleSizeChange"
+        @handleCurrentChange="handleCurrentChange"
+      />
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisibleTableBoxs = false">取 消</el-button>
+        <el-button
+          type="primary"
+          :disabled="activeLists.length === 0"
+          @click="submitTab"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import pagination from "@/components/pagination";
+export default {
+  components: { pagination },
+  data() {
+    return {
+      size: "small",
+      dialogVisibleTableBoxs: false,
+      tableData: [],
+      examTypeList: [
+        {
+          label: "模块卷",
+          value: 1,
+        },
+        {
+          label: "章卷",
+          value: 2,
+        },
+        {
+          label: "试卷",
+          value: 3,
+        },
+      ],
+      tableSet: [
+        { label: "题卷编码", prop: "code", width: "120" },
+        { label: "题卷前缀", prop: "prefixName", width: "120" },
+        { label: "题卷名称", prop: "name", width: "300" },
+        { label: "科目", prop: "subjectName", width: "160" },
+        {
+          label: "业务层次",
+          prop1: "projectName",
+          prop2: "businessName",
+          width: "300",
+          scope: "businessType",
+        },
+        { label: "教育类型", prop: "educationName", width: "160" },
+        { label: "题库类型", prop: "type", scope: "type", width: "120" },
+        {
+          label: "发布状态",
+          prop: "publishStatus",
+          scope: "Status",
+          width: "120",
+        },
+      ],
+      formData: {},
+      activeLists: [],
+      disCheckList: [],
+      sujectTypeList: [],
+      total: 0,
+    };
+  },
+  methods: {
+    /**
+     * 初始
+     */
+    openBox(obj, array) {
+      this.disCheckList = array;
+      this.formData = JSON.parse(JSON.stringify(obj));
+      //获取业务层次-科目
+      this.getsubjectInit();
+      //获取业务层次-课程
+      this.getInfos();
+      this.dialogVisibleTableBoxs = true;
+      this.$nextTick(() => {
+        this.$refs.multipleTable.clearSelection();
+      });
+    },
+    /**
+     * 搜索数据
+     */
+    getInfos(int) {
+      //重置0
+      if (int === 0) {
+        this.formData.pageSize = 10;
+        this.formData.pageNum = 1;
+        delete this.formData.subjectId;
+        delete this.formData.key;
+      }
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      switch (this.formData.examType) {
+        case 1:
+          this.$api.inquireBankModule(this.formData).then((res) => {
+            for (let k = 0; k < res.rows.length; k++) {
+              res.rows[k].ids = 1 + "-" + res.rows[k].moduleExamId;
+              res.rows[k].type = 1;
+              res.rows[k].name = res.rows[k].moduleName;
+            }
+            this.tableData = res.rows;
+            this.total = res.total;
+          });
+          break;
+        case 2:
+          this.$api.inquirebankchapterList(this.formData).then((res) => {
+            for (let k = 0; k < res.rows.length; k++) {
+              res.rows[k].ids = 2 + "-" + res.rows[k].chapterExamId;
+              res.rows[k].type = 2;
+              res.rows[k].name = res.rows[k].name;
+            }
+            this.tableData = res.rows;
+            this.total = res.total;
+          });
+          break;
+        case 3:
+          this.$api.inquirebankexamList(this.formData).then((res) => {
+            for (let k = 0; k < res.rows.length; k++) {
+              res.rows[k].ids = 3 + "-" + res.rows[k].examId;
+              res.rows[k].type = 3;
+              res.rows[k].name = res.rows[k].examName;
+            }
+            this.tableData = res.rows;
+            this.total = res.total;
+          });
+          break;
+        default:
+          break;
+      }
+    },
+    /**
+     * 获取业务层次-科目
+     */
+    getsubjectInit() {
+      this.$api
+        .inquireCourseSubject({
+          status: 1,
+          businessId: this.formData.businessId,
+        })
+        .then((res) => {
+          this.sujectTypeList = res.rows;
+        });
+    },
+    /**
+     * 开启动画结束执行
+     */
+    prepareEnd() {
+      this.activeLists = []; //初始清空勾选数据
+    },
+    /**
+     * 提交回调数据
+     */
+    submitTab() {
+      this.$message.success("添加成功");
+      this.dialogVisibleTableBoxs = false;
+      this.$emit("backData", this.activeLists);
+    },
+    selectCheck(value) {
+      this.activeLists = value;
+    },
+    checkbox(row, index) {
+      if (this.disCheckList.indexOf(row.ids) !== -1) {
+        return false;
+      } else {
+        return true;
+      }
+    },
+    getRowKeys(row) {
+      return row.ids;
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.getInfos();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.getInfos();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 228 - 0
src/views/Marketing/goods/commodityManageMent/add/bankContent/index.vue

@@ -0,0 +1,228 @@
+<template>
+  <div id="bankContent">
+    <div style="margin-bottom: 20px">
+      <el-button @click="addCourse" size="small">添加</el-button>
+      <el-button
+        @click="openAudition"
+        type="success"
+        size="small"
+        v-if="tableData.length > 0"
+        >试做设置</el-button
+      >
+    </div>
+    <el-table
+      :data="tableData"
+      border
+      :header-cell-style="{
+        'background-color': '#eee',
+        padding: '8px',
+        color: '#333',
+      }"
+      :default-sort="{ prop: 'sort', order: 'ascending' }"
+    >
+      <el-table-column
+        v-for="(item, index) in tableSet"
+        :width="item.width"
+        :key="index"
+        :label="item.label"
+        align="center"
+        :show-overflow-tooltip="true"
+        header-align="center"
+        :sortable="item.prop === 'sort'"
+        sort-by="sort"
+        :prop="item.prop"
+      >
+        <template slot-scope="scope">
+          <span v-if="item.scope === 'types'">{{
+            scope.row[item.prop] === 1
+              ? "录播"
+              : scope.row[item.prop] === 2
+              ? "直播"
+              : scope.row[item.prop] === 3
+              ? "回放"
+              : "未知"
+          }}</span>
+          <span v-else-if="item.scope === 'businessType'">
+            {{ scope.row[item.prop1] }}-{{ scope.row[item.prop2] }}
+          </span>
+          <span v-else-if="item.scope === 'type'">
+            {{
+              scope.row[item.prop] === 1
+                ? "模块卷"
+                : scope.row[item.prop] === 2
+                ? "章卷"
+                : scope.row[item.prop] === 3
+                ? "试卷"
+                : "未知"
+            }}
+          </span>
+          <span v-else-if="item.scope === 'busin'">
+            {{ scope.row[item.prop1] + " - " + scope.row[item.prop2] }}
+          </span>
+          <span v-else-if="item.scope === 'Status'">
+            {{
+              scope.row[item.prop] === 1
+                ? "发布"
+                : scope.row[item.prop] === 0
+                ? "未发布"
+                : "未知"
+            }}
+          </span>
+          <div v-else-if="item.scope === 'inputs'">
+            <el-input-number
+              style="width: 50px"
+              size="small"
+              :controls="false"
+              v-model="scope.row[item.prop]"
+              controls-position="right"
+              :min="0"
+            ></el-input-number>
+          </div>
+          <span v-else>{{ scope.row[item.prop] }}</span></template
+        >
+      </el-table-column>
+      <el-table-column label="操作" align="center" fixed="right" width="100px">
+        <template slot-scope="scope">
+          <el-button type="text" @click="delBank(scope.row)">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <bank-check ref="bankCheck" @backData="backBankData" />
+    <popple-set-tk
+      :key="Math.random()"
+      ref="poppleSetTk"
+      :tableData="tableData"
+      :examConfigList="examConfigList"
+      @uploadArrays="uploadArrays"
+    />
+  </div>
+</template>
+
+<script>
+import poppleSetTk from "../../poppleSetTKCOPY.vue";
+import bankCheck from "./bankCheck.vue";
+export default {
+  components: { poppleSetTk, bankCheck },
+  props: ["listData"],
+  data() {
+    return {
+      tableData: [],
+      examConfigList: [],
+      tableSet: [
+        { label: "排序", prop: "sort", scope: "inputs", width: "100" },
+        { label: "题卷编码", prop: "code", width: "150" },
+        { label: "题卷名称", prop: "name" },
+        { label: "科目", prop: "subjectName", width: "130" },
+        { label: "题库类型", prop: "type", scope: "type", width: "120" }
+      ],
+    };
+  },
+  mounted(){
+    this.$bus.$on("sendBybusBank", () => {
+      this.tableData = [];
+      this.examConfigList = [];
+    });
+  },
+  methods: {
+    /**
+     * 点击试做函数
+     */
+    openAudition() {
+      console.log(this.examConfigList, "examConfigList");
+      this.$refs.poppleSetTk.dialogVisible = true;
+    },
+    /**
+     * 试做回调数据
+     */
+    uploadArrays(arrays) {
+      this.examConfigList = arrays;
+    },
+    /**
+     * 点击添加函数
+     */
+    addCourse() {
+      //搜索条件
+      var data = {
+        businessId: this.listData.businessId,
+        pageNum: 1,
+        pageSize: 10,
+        status: 1,
+        examType: 1,
+      };
+      //已选题卷
+      var aList = this.tableData.map((item) => {
+        return item.ids;
+      });
+      //打开选择课程组件
+      this.$refs.bankCheck.openBox(data, aList);
+    },
+    /**
+     * 选择题库回调数据
+     */
+    backBankData(array) {
+      let copyData = JSON.parse(JSON.stringify(array));
+      if (this.tableData.length) {
+        let maxIndex = 0;
+        this.tableData.forEach((item) => {
+          if (item.sort > maxIndex) {
+            maxIndex = item.sort;
+          }
+        });
+        copyData.forEach((item, index) => {
+          item.sort = maxIndex + index + 1;
+        });
+      } else {
+        copyData.forEach((item, index) => {
+          item.sort = index + 1;
+        });
+      }
+      this.tableData = this.tableData.concat(copyData);
+    },
+    /**
+     * 删除题卷
+     */
+    delBank(item) {
+      let splitItem = item.ids.split("-").map(Number);
+      const FINDINDEX = this.tableData.findIndex((items) => {
+        return items.ids === item.ids;
+      });
+      this.tableData.splice(FINDINDEX, 1);
+      //结构特殊-后期考虑优化
+      this.examConfigList = this.examConfigList.filter((items) => {
+        let arr = items.TypeId.split("-").map(Number);
+        if (splitItem[0] === 1) {
+          if (arr.length === 4) {
+            if (arr[1] !== splitItem[1]) {
+              return items;
+            }
+          } else {
+            return items;
+          }
+        }
+        if (splitItem[0] === 2) {
+          if (arr.length === 3) {
+            if (arr[1] !== splitItem[1]) {
+              return items;
+            }
+          } else {
+            return items;
+          }
+        }
+        if (splitItem[0] === 3) {
+          if (arr.length === 2) {
+            if (arr[1] !== splitItem[1]) {
+              return items;
+            }
+          } else {
+            return items;
+          }
+        }
+      });
+      this.$message.success("删除成功");
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 171 - 0
src/views/Marketing/goods/commodityManageMent/add/configureContentParameters.vue

@@ -0,0 +1,171 @@
+<template>
+  <div id="configureContentParameters">
+    <el-form-item
+      v-if="
+        listData.goodsType === 1
+          ? rules['studyCount'][0].status
+          : listData.goodsType === 3 || listData.goodsType === 4
+          ? true
+          : false
+      "
+      :label="listData.goodsType === 3 ? '补考次数' : '学习次数'"
+      prop="studyCount"
+      style="margin-top: 10px"
+    >
+      <el-input
+        :style="`max-width:${inputWidth}px;`"
+        v-model="listData.studyCount"
+      ></el-input>
+    </el-form-item>
+    <template v-if="listData.goodsType === 1">
+      <el-form-item
+        v-if="rules['examNumber'][0].status"
+        label="考试次数"
+        style="margin-top: 12px"
+        prop="examNumber"
+      >
+        <el-input
+          :style="`max-width:${inputWidth}px;`"
+          v-model="listData.examNumber"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="前培(刷题)机会"
+        style="margin-top: 12px"
+        prop="doNumber"
+        v-if="rules['doNumber'][0].status"
+      >
+        <el-input
+          :style="`max-width:${inputWidth}px;`"
+          v-model="listData.doNumber"
+        ></el-input>
+      </el-form-item>
+    </template>
+    <el-form-item
+      v-if="
+        listData.goodsType === 1 && rules['serviceTimeType'][0].status
+          ? true
+          : listData.goodsType === 2 || listData.goodsType === 6
+          ? true
+          : false
+      "
+      class="positions"
+      label="学习服务期"
+      style="margin-top: 12px"
+      prop="serviceTimeType"
+    >
+      <el-select
+        v-model="listData.serviceTimeType"
+        placeholder="请选择学习服务期类型"
+        @change="initServiceFun"
+      >
+        <el-option
+          v-for="(item, index) in styleType"
+          :key="index"
+          :label="item.label"
+          :value="item.value"
+        >
+        </el-option>
+      </el-select>
+      <el-form-item
+        class="inline_block"
+        v-if="
+          listData.serviceTimeType === 1 ||
+          listData.serviceTimeType === 2 ||
+          listData.serviceTimeType === 3
+        "
+        label-width="140px"
+        label="购买那刻开始计算"
+        prop="serviceTimeNum"
+      >
+        <el-input
+          class="timeInputSty"
+          v-model="listData.serviceTimeNum"
+        ></el-input>
+        <span style="margin-left: 6px">{{
+          listData.serviceTimeType === 1
+            ? "年"
+            : listData.serviceTimeType === 2
+            ? "月"
+            : listData.serviceTimeType === 3
+            ? "天"
+            : ""
+        }}</span>
+      </el-form-item>
+      <el-form-item
+        class="inline_block"
+        v-if="listData.serviceTimeType === 4"
+        label-width="10px"
+        prop="studyTimeArrays"
+      >
+        <el-date-picker
+          v-model="listData.studyTimeArrays"
+          type="datetimerange"
+          value-format="timestamp"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          @change="changeDataTimeStudy(listData.studyTimeArrays)"
+        >
+        </el-date-picker>
+      </el-form-item>
+    </el-form-item>
+  </div>
+</template>
+
+<script>
+export default {
+  props: ["listData", "rules"],
+  data() {
+    return {
+      inputWidth: 217,
+      styleType: [
+        {
+          label: "按年限",
+          value: 1,
+        },
+        {
+          label: "按月限",
+          value: 2,
+        },
+        {
+          label: "按天限",
+          value: 3,
+        },
+        {
+          label: "按具体时间区间",
+          value: 4,
+        },
+      ],
+    };
+  },
+  methods: {
+    /**
+     * 重置学习服务期时间值
+     */
+    initServiceFun() {
+      this.$set(this.listData, "serviceTimeNum", "");
+      this.$set(this.listData, "studyTimeArrays", []);
+      this.$bus.$emit("initTimeVal");
+    },
+    changeDataTimeStudy(arr) {
+      if (arr && arr[0] === arr[1]) {
+        this.$message.warning("开始时间与结束时间不允许相同");
+        this.$set(this.listData, "studyTimeArrays", []);
+      }
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.timeInputSty {
+  width: 90px;
+}
+/deep/.el-input__inner {
+  text-align: center;
+}
+.inline_block {
+  display: inline-block;
+}
+</style>

+ 58 - 9
src/views/Marketing/goods/commodityManageMent/newAdd/courseContent/courseCheck.vue → src/views/Marketing/goods/commodityManageMent/add/courseContent/courseCheck.vue

@@ -3,7 +3,7 @@
     <el-dialog
       @opened="prepareEnd"
       :visible.sync="dialogVisibleTableBoxs"
-      width="900px"
+      width="1100px"
       :show-close="false"
       :close-on-click-modal="false"
     >
@@ -17,12 +17,38 @@
           />
         </div>
       </div>
+      <div style="margin-bottom: 10px">
+        <!-- 专业 -->
+        <el-select
+          v-model="formData['majorId']"
+          placeholder="请选择专业"
+          :size="size"
+          clearable
+        >
+          <el-option
+            v-for="(items, indexs) in ProfessionalList"
+            :key="indexs"
+            :label="items.categoryName"
+            :value="items.id"
+          ></el-option>
+        </el-select>
+        <!-- 搜索框 -->
+        <el-input
+          style="width: 230px; margin: 0px 10px"
+          :size="size"
+          v-model="formData['key']"
+          placeholder="课程标题/课程编码/标题前缀"
+        ></el-input>
+        <el-button :size="size" type="primary" @click="getInfos(1)"
+          >查询</el-button
+        >
+        <el-button :size="size" @click="getInfos(0)">重置</el-button>
+      </div>
       <el-table
         ref="multipleTable"
         :data="tableData"
         border
-        @select-all="selectAll"
-        @select="select"
+        @selection-change="selectCheck"
         :row-key="getRowKeys"
         :header-cell-style="{
           'background-color': '#eee',
@@ -90,6 +116,7 @@ export default {
   components: { pagination },
   data() {
     return {
+      size: "small",
       dialogVisibleTableBoxs: false,
       tableData: [],
       tableSet: [
@@ -106,6 +133,7 @@ export default {
       formData: {},
       activeLists: [],
       disCheckList: [],
+      ProfessionalList: [],
       total: 0,
     };
   },
@@ -113,10 +141,13 @@ export default {
     /**
      * 初始
      */
-    openBox(obj, array) {
+    openBox(obj, array, eduId) {
       this.disCheckList = array;
       this.formData = JSON.parse(JSON.stringify(obj));
+      //获取业务层次-课程
       this.getInfos();
+      //获取业务层次-专业
+      this.getmajInit();
       this.dialogVisibleTableBoxs = true;
       this.$nextTick(() => {
         this.$refs.multipleTable.clearSelection();
@@ -125,12 +156,33 @@ export default {
     /**
      * 搜索数据
      */
-    getInfos() {
+    getInfos(int) {
+      //重置0
+      if (int === 0) {
+        this.formData.pageSize = 10;
+        this.formData.pageNum = 1;
+        delete this.formData.majorId;
+        delete this.formData.subjectId;
+        delete this.formData.key;
+      }
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
       this.$api.inquireCourseListS(this.formData).then((res) => {
         this.tableData = res.rows;
         this.total = res.total;
       });
     },
+    /**
+     * 获取业务层次-专业
+     */
+    getmajInit() {
+      this.$api
+        .inquireCourseMajor({ status: 1, businessId: this.formData.businessId })
+        .then((res) => {
+          this.ProfessionalList = res.rows;
+        });
+    },
     /**
      * 开启动画结束执行
      */
@@ -145,10 +197,7 @@ export default {
       this.dialogVisibleTableBoxs = false;
       this.$emit("backData", this.activeLists);
     },
-    selectAll(value) {
-      this.activeLists = value;
-    },
-    select(value) {
+    selectCheck(value) {
       this.activeLists = value;
     },
     checkboxT(row, index) {

+ 0 - 0
src/views/Marketing/goods/commodityManageMent/newAdd/courseContent/everyDayStudyNum.vue → src/views/Marketing/goods/commodityManageMent/add/courseContent/everyDayStudyNum.vue


+ 30 - 11
src/views/Marketing/goods/commodityManageMent/newAdd/courseContent/handoutView.vue → src/views/Marketing/goods/commodityManageMent/add/courseContent/handoutView.vue

@@ -34,7 +34,7 @@
     <!-- 关联讲义列表 -->
     <el-dialog
       :visible.sync="jYactiveBoxs"
-      width="980px"
+      width="1080px"
       append-to-body
       :show-close="false"
       :close-on-click-modal="false"
@@ -49,6 +49,19 @@
           />
         </div>
       </div>
+      <div style="margin-bottom: 10px">
+        <!-- 搜索框 -->
+        <el-input
+          style="width: 230px;margin-right:10px;"
+          :size="size"
+          v-model="formData['key']"
+          placeholder="请输入讲义标题/讲义编码"
+        ></el-input>
+        <el-button :size="size" type="primary" @click="getJyData(1)"
+          >查询</el-button
+        >
+        <el-button :size="size" @click="getJyData(0)">重置</el-button>
+      </div>
       <el-table
         ref="multipleTable"
         :data="tableData"
@@ -157,6 +170,7 @@ export default {
   components: { pagination },
   data() {
     return {
+      size:"small",
       aboutJYBox: false,
       handoutsName: "", //讲义名称
       handoutsIdTable: "",
@@ -185,7 +199,7 @@ export default {
      */
     openBox(id) {
       if (id && !this.handoutsName) {
-        this.$api.obtainCourseHandouts(this.listData.handoutsId).then((res) => {
+        this.$api.obtainCourseHandouts(id).then((res) => {
           this.handoutsName = res.data.handoutsName;
         });
       }
@@ -207,14 +221,7 @@ export default {
     openJYActiveBox() {
       this.templateRadio = this.handoutsIdTable;
       this.templateName = this.handoutsName;
-      this.formData = {
-        businessId: this.$parent.listData.businessId,
-        status: 1,
-        pageSize: 10,
-        pageNum: 1,
-        key: "",
-      };
-      this.getJyData();
+      this.getJyData(0);
       this.jYactiveBoxs = true;
     },
     /**
@@ -235,7 +242,19 @@ export default {
     /**
      * 搜索
      */
-    getJyData() {
+    getJyData(int) {
+      if (int === 0) {
+        this.formData = {
+          businessId: this.$parent.listData.businessId,
+          status: 1,
+          pageSize: 10,
+          pageNum: 1,
+          key: "",
+        };
+      }
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
       this.$api.inquireCourseHandoutsList(this.formData).then((res) => {
         this.total = res.total;
         this.tableData = res.rows;

+ 15 - 2
src/views/Marketing/goods/commodityManageMent/newAdd/courseContent/index.vue → src/views/Marketing/goods/commodityManageMent/add/courseContent/index.vue

@@ -2,7 +2,11 @@
   <div id="courseContent">
     <div style="margin-bottom: 20px">
       <el-button @click="addCourse" size="small">添加</el-button>
-      <el-button @click="openAudition" type="success" size="small"
+      <el-button
+        @click="openAudition"
+        type="success"
+        size="small"
+        v-if="tableData.length > 0"
         >试听设置</el-button
       >
       <el-button type="primary" @click="openPlayPhotoSet" size="small"
@@ -136,14 +140,22 @@ export default {
       auditionList: [], //试听数据
     };
   },
+  mounted() {
+    this.$bus.$on("sendBybus", () => {
+      this.tableData = [];
+      this.auditionList = [];
+    });
+  },
   methods: {
     /**
      * 点击添加函数
      */
     addCourse() {
+      console.log(this.listData.subjectIds)
       //搜索条件
       var data = {
         businessId: this.listData.businessId,
+        subjectIds:this.listData.subjectIds.toString(),
         status: 1,
         pageSize: 10,
         pageNum: 1,
@@ -154,7 +166,7 @@ export default {
         return item.courseId;
       });
       //打开选择课程组件
-      this.$refs.courseCheck.openBox(data, aList);
+      this.$refs.courseCheck.openBox(data, aList,this.listData.educationTypeId);
     },
     /**
      * 选择课程回调数据
@@ -241,6 +253,7 @@ export default {
         this.$message.warning("请选择业务层次");
         return;
       }
+      console.log(this.listData);
       this.$refs.handoutView.openBox(this.listData.handoutsId);
     },
     /**

+ 0 - 0
src/views/Marketing/goods/commodityManageMent/newAdd/courseContent/playPhoto.vue → src/views/Marketing/goods/commodityManageMent/add/courseContent/playPhoto.vue


Разница между файлами не показана из-за своего большого размера
+ 116 - 1473
src/views/Marketing/goods/commodityManageMent/add/index.vue


+ 84 - 0
src/views/Marketing/goods/commodityManageMent/add/introduction.vue

@@ -0,0 +1,84 @@
+<template>
+  <div id="introduction">
+    <el-form-item label="商品简介" :label-width="labelWidth" prop="introduce">
+      <el-input
+        type="textarea"
+        v-model="listData.introduce"
+        placeholder="请输入商品简介"
+      ></el-input>
+    </el-form-item>
+    <el-form-item
+      label="适合对象"
+      :label-width="labelWidth"
+      prop="suitableObject"
+    >
+      <el-input
+        type="textarea"
+        v-model="listData.suitableObject"
+        placeholder="请输入适合对象"
+      ></el-input>
+    </el-form-item>
+    <el-form-item label="学员须知" :label-width="labelWidth" prop="buyNote">
+      <el-input
+        type="textarea"
+        v-model="listData.buyNote"
+        placeholder="请输入学员须知"
+      ></el-input>
+    </el-form-item>
+    <div class="courseStyle">
+      商品详情<span style="color: #999; margin-left: 6px">支持图文</span>
+    </div>
+    <div style="text-align: center; margin-bottom: 10px">
+      <el-button
+        size="mini"
+        :type="active === 1 ? 'success' : ''"
+        @click="active = 1"
+        >PC端</el-button
+      >
+      <el-button
+        size="mini"
+        :type="active === 2 ? 'success' : ''"
+        @click="active = 2"
+        >手机端</el-button
+      >
+    </div>
+    <editor
+      v-show="active === 1"
+      v-model="listData.pcDetailHtml"
+      :min-height="300"
+      :max-height="500"
+      :uploadStatus="2"
+    />
+    <editor
+      v-show="active === 2"
+      v-model="listData.mobileDetailHtml"
+      :min-height="300"
+      :max-height="500"
+      :uploadStatus="2"
+    />
+  </div>
+</template>
+
+<script>
+import Editor from "@/components/Editor";
+export default {
+  components: { Editor },
+  props: ["listData"],
+  data() {
+    return {
+      labelWidth: "90px",
+      active: 1,
+    };
+  },
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+.courseStyle {
+  margin-top: 20px;
+  margin-bottom: 10px;
+  font-size: 14px;
+  border-bottom: 2px solid rgb(179, 204, 255);
+}
+</style>

+ 112 - 0
src/views/Marketing/goods/commodityManageMent/add/issueAcertificate.vue

@@ -0,0 +1,112 @@
+<template>
+  <div id="issueAcertificate">
+    <div class="dis_play_sty">
+      <el-form-item label="请选择" prop="certificateTypeId">
+        <el-select
+          v-model="listData.certificateTypeId"
+          placeholder="请选择证书类型"
+        >
+          <el-option
+            v-for="(item, index) in certificate"
+            :key="index"
+            :label="item.certificateName"
+            :value="item.id"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item
+        v-if="certificateList.length"
+        label=" "
+        label-width="10px"
+        prop="certificateId"
+      >
+        <el-select
+          v-model="listData.certificateId"
+          placeholder="请选择证书名称"
+        >
+          <el-option
+            v-for="(item, index) in certificateList"
+            :key="index"
+            :label="item.certificateName"
+            :value="item.id"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item
+        v-if="certificateTpList.length"
+        label=" "
+        label-width="10px"
+        prop="certificateTpId"
+      >
+        <el-select
+          v-model="listData.certificateTpId"
+          placeholder="请选择证书模板"
+        >
+          <el-option
+            v-for="(item, index) in certificateTpList"
+            :key="index"
+            :label="item.title"
+            :value="item.tpId"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
+    </div>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+export default {
+  props: ["listData"],
+  data() {
+    return {
+      certificateList: [],
+      certificateTpList: [],
+    };
+  },
+  watch: {
+    "listData.certificateTypeId"(val) {
+      this.$set(this.listData, "certificateId", "");
+      if (val) {
+        this.$api
+          .inquireBaseCertificatecommon({ status: 1, certificateTypeId: val })
+          .then((res) => {
+            this.certificateList = res.rows;
+          });
+      } else {
+        this.certificateList = [];
+      }
+    },
+    "listData.certificateId"(val) {
+      this.$set(this.listData, "certificateTpId", "");
+      if (val) {
+        this.$api
+          .inquireBaseCertificatetp({ status: 1, certificateId: val })
+          .then((res) => {
+            this.certificateTpList = res.rows;
+          });
+      } else {
+        this.certificateTpList = [];
+      }
+    },
+  },
+  computed: { ...mapGetters(["certificate"]) },
+  mounted() {
+    this.$api.inquireBaseCertificatetp({ status: 1 }).then((res) => {
+      this.certificateOption = res.rows;
+    });
+  },
+  methods: {
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.dis_play_sty {
+  display: flex;
+  align-items: center;
+}
+</style>

+ 69 - 0
src/views/Marketing/goods/commodityManageMent/add/makeUpExam/index.vue

@@ -0,0 +1,69 @@
+<template>
+  <div id="makeUpExam">
+    <el-form-item label="关联商品" prop="makeGoodsId">
+      <div>
+        <el-button @click="goToActiveGoods">选择商品</el-button>
+        <span v-if="listData.makeGoodsId" style="margin-left: 12px"
+          >{{ listData.makeGoodsCode }} - {{ listData.makeGoodsName }}</span
+        >
+        <el-button
+          style="margin-left: 12px"
+          v-if="listData.makeGoodsId"
+          type="text"
+          @click="clearGoods"
+          >删除</el-button
+        >
+      </div>
+    </el-form-item>
+    <make-check ref="makeCheck" @backData="backMakeData" />
+  </div>
+</template>
+
+<script>
+import makeCheck from "./makeCheck.vue";
+export default {
+  components: { makeCheck },
+  props: ["listData"],
+  data() {
+    return {};
+  },
+  methods: {
+    goToActiveGoods() {
+      //搜索条件
+      var data = {
+        businessId: this.listData.businessId,
+        status: 1,
+        pageSize: 10,
+        pageNum: 1,
+        filtration:
+          this.listData.goodsType === 3
+            ? 2
+            : this.listData.goodsType === 4
+            ? 1
+            : "",
+      };
+      //打开选择补考/前培组件
+      this.$refs.makeCheck.openBox(data, {
+        makeGoodsId: this.listData.makeGoodsId,
+        makeGoodsName: this.listData.makeGoodsName,
+        makeGoodsCode: this.listData.makeGoodsCode,
+      });
+    },
+    backMakeData(activeObj) {
+      this.$set(this.listData, "makeGoodsId", activeObj.makeGoodsId);
+      this.$set(this.listData, "makeGoodsName", activeObj.makeGoodsName);
+      this.$set(this.listData, "makeGoodsCode", activeObj.makeGoodsCode);
+      this.$bus.$emit("validateMakeId");
+    },
+    clearGoods() {
+      this.$set(this.listData, "makeGoodsId", "");
+      this.$set(this.listData, "makeGoodsName", "");
+      this.$set(this.listData, "makeGoodsCode", "");
+      this.$bus.$emit("validateMakeId");
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 212 - 0
src/views/Marketing/goods/commodityManageMent/add/makeUpExam/makeCheck.vue

@@ -0,0 +1,212 @@
+<template>
+  <div id="makeCheck">
+    <el-dialog
+      :visible.sync="dialogVisibleTableBoxs"
+      width="1100px"
+      :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="dialogVisibleTableBoxs = false"
+          />
+        </div>
+      </div>
+      <div style="margin-bottom: 10px">
+        <!-- 搜索框 -->
+        <el-input
+          style="width: 230px; margin: 0px 10px"
+          :size="size"
+          v-model="formData['searchKey']"
+          placeholder="请输入商品编码/商品名称"
+        ></el-input>
+        <el-button :size="size" type="primary" @click="getInfos(1)"
+          >查询</el-button
+        >
+        <el-button :size="size" @click="getInfos(0)">重置</el-button>
+      </div>
+      <el-table
+        ref="multipleTable"
+        :data="tableData"
+        border
+        :header-cell-style="{
+          'background-color': '#eee',
+          padding: '8px',
+          color: '#333',
+        }"
+      >
+        <el-table-column label="" width="45" align="center">
+          <template scope="scope">
+            <el-radio
+              :disabled="scope.row.selectStatus === 0"
+              :label="scope.row.goodsId"
+              v-model="activeObj.makeGoodsId"
+              @change.native="getGoodsId(scope.row)"
+              >{{ "" }}</el-radio
+            >
+          </template>
+        </el-table-column>
+        <el-table-column
+          v-for="(item, index) in tableSet"
+          :width="item.width"
+          :key="index"
+          :label="item.label"
+          align="center"
+          :show-overflow-tooltip="true"
+          header-align="center"
+        >
+          <template slot-scope="scope">
+            <span v-if="item.scope === 'status'">{{
+              scope.row[item.prop] === 1 ? "上架" : "未上架"
+            }}</span>
+            <span v-else-if="item.scope === 'status1'">{{
+              scope.row[item.prop] === 1 ? "有效" : "无效"
+            }}</span>
+            <span v-else-if="item.scope === 'times'">
+              {{ $methodsTools.onlyForma(scope.row[item.prop1]) }} -
+              {{ $methodsTools.onlyForma(scope.row[item.prop2]) }}
+            </span>
+            <span v-else>{{ scope.row[item.prop] }}</span></template
+          >
+        </el-table-column>
+      </el-table>
+      <pagination
+        :total="total"
+        :pageSize="formData.pageSize"
+        :currentPage="formData.pageNum"
+        @handleSizeChange="handleSizeChange"
+        @handleCurrentChange="handleCurrentChange"
+      />
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisibleTableBoxs = false">取 消</el-button>
+        <el-button
+          type="primary"
+          :disabled="!activeObj.makeGoodsId"
+          @click="submitTab"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import pagination from "@/components/pagination";
+export default {
+  components: { pagination },
+  data() {
+    return {
+      size: "small",
+      dialogVisibleTableBoxs: false,
+      tableData: [],
+      tableSet: [
+        {
+          label: "商品编码",
+          prop: "code",
+          width: "140px",
+        },
+        {
+          label: "商品名称",
+          prop: "goodsName",
+          width: "260px",
+        },
+        {
+          label: "标准价格(¥)",
+          prop: "standPrice",
+          width: "140px",
+        },
+        {
+          label: "商品状态",
+          prop: "status",
+          scope: "status1",
+          width: "110px",
+        },
+        {
+          label: "商品有效期",
+          prop1: "validityStartTime",
+          prop2: "validityEndTime",
+          scope: "times",
+          width: "310px",
+        },
+        {
+          label: "商品可售状态",
+          prop: "goodsStatus",
+          scope: "status",
+          width: "130px",
+        },
+      ],
+      formData: {},
+      total: 0,
+      activeObj: {
+        makeGoodsId: "",
+        makeGoodsName: "",
+        makeGoodsCode: "",
+      },
+    };
+  },
+  methods: {
+    /**
+     * 选中补考/前培商品
+     */
+    getGoodsId(row) {
+      this.activeObj = {
+        makeGoodsId: row.goodsId,
+        makeGoodsName: row.goodsName,
+        makeGoodsCode: row.code,
+      };
+    },
+    /**
+     * 初始
+     */
+    openBox(obj, active) {
+      this.activeObj = JSON.parse(JSON.stringify(active));
+      this.formData = JSON.parse(JSON.stringify(obj));
+      //获取业务层次-课程
+      this.getInfos();
+      this.dialogVisibleTableBoxs = true;
+    },
+    /**
+     * 搜索数据
+     */
+    getInfos(int) {
+      //重置0
+      if (int === 0) {
+        this.formData.pageSize = 10;
+        this.formData.pageNum = 1;
+        delete this.formData.searchKey;
+      }
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      this.$api.inquireGoodslistGoods(this.formData).then((res) => {
+        this.tableData = res.rows;
+        this.total = res.total;
+      });
+    },
+    /**
+     * 提交回调数据
+     */
+    submitTab() {
+      this.$message.success("添加成功");
+      this.dialogVisibleTableBoxs = false;
+      this.$emit("backData", this.activeObj);
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.getInfos();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.getInfos();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 358 - 0
src/views/Marketing/goods/commodityManageMent/add/pricePeriod.vue

@@ -0,0 +1,358 @@
+<template>
+  <div id="pricePeriod">
+    <el-row :gutter="20">
+      <el-col :span="12">
+        <el-form-item label="商品标准价格" prop="standPrice">
+          <el-input
+            :style="`max-width:${inputWidth}px;`"
+            v-model="listData.standPrice"
+            ><template slot="prepend">¥</template></el-input
+          >
+        </el-form-item>
+        <el-form-item label="商品最低价格" prop="lowestPrice">
+          <el-input
+            :style="`max-width:${inputWidth}px;`"
+            v-model="listData.lowestPrice"
+            ><template slot="prepend">¥</template></el-input
+          >
+        </el-form-item>
+        <el-form-item label="状态" prop="status">
+          <el-radio-group v-model="listData.status">
+            <el-radio :label="1">有效</el-radio>
+            <el-radio :label="0">无效</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="商品有效期" prop="timeArrays">
+          <el-date-picker
+            v-model="listData.timeArrays"
+            type="datetimerange"
+            value-format="timestamp"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            @change="changeDataTime(listData.timeArrays)"
+          >
+          </el-date-picker>
+          <el-tooltip class="item" effect="dark" placement="right">
+            <div slot="content">
+              商品有效期:商品可以进行售卖的有效时间范围<br />
+              1.非时间范围,不可以上架进行售卖;<br />
+              2.到了结束日期,不需要人为操作,系统自动下架商品
+            </div>
+            <i
+              style="margin-left: 10px; font-size: 20px; color: #e6a23c"
+              class="el-icon-warning"
+            ></i>
+          </el-tooltip>
+        </el-form-item>
+      </el-col>
+      <el-col :span="12">
+        <el-form-item label=" " prop="standPriceJson" label-width="0px">
+          <h5 style="margin: 0px">
+            商品标准价格明细表:
+            <el-button type="text" @click="addPriceInfo">添加</el-button>
+          </h5>
+          <el-table
+            :data="listData.standPriceJson"
+            show-summary
+            :summary-method="totalPrice"
+            border
+            :header-cell-style="{
+              'background-color': '#eee',
+              padding: '8px',
+              color: '#333',
+            }"
+          >
+            <el-table-column
+              type="index"
+              label="序号"
+              width="80"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              v-for="(item, index) in tableSet"
+              :width="item.width"
+              :key="index"
+              :label="item.label"
+              align="center"
+              :show-overflow-tooltip="true"
+              header-align="center"
+              :prop="item.prop"
+            >
+              <template slot-scope="scope">
+                <span
+                  v-if="item.scope === 'editInfo'"
+                  @click="editPriceInfo(scope.row)"
+                  class="clickSpan"
+                  >{{ scope.row[item.prop] }}</span
+                >
+                <span v-else-if="item.scope === 'leftCh'"
+                  >{{ item.ch }}{{ scope.row[item.prop] }}</span
+                >
+                <span v-else>{{ scope.row[item.prop] }}</span></template
+              >
+            </el-table-column>
+            <el-table-column
+              label="操作"
+              align="center"
+              fixed="right"
+              width="100px"
+            >
+              <template slot-scope="scope">
+                <el-button type="text" @click="delPriceInfo(scope.row)"
+                  >删除</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-form-item>
+      </el-col>
+    </el-row>
+    <!-- 费用类型 -->
+    <el-dialog
+      @open="openFunc"
+      :visible.sync="dialogVisible"
+      width="500px"
+      :show-close="false"
+      :close-on-click-modal="false"
+      destroy-on-close
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">{{ popupStatus === 1 ? "添加" : "编辑" }}</div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Close@2x.png"
+            alt=""
+            @click="dialogVisible = false"
+          />
+        </div>
+      </div>
+      <el-form
+        label-position="right"
+        label-width="110px"
+        :model="priceDetails"
+        :rules="rulesItem"
+        ref="priceDetails"
+      >
+        <el-form-item
+          v-for="(items, indexs) in priceDetailsList"
+          :key="indexs"
+          :label="items.label"
+          :prop="items.prop"
+        >
+          <el-select
+            v-if="items.scope === 'select'"
+            v-model="priceDetails[items.prop]"
+            placeholder="请选择费用类型"
+          >
+            <el-option
+              v-for="(item, index) in paycost"
+              :key="index"
+              :label="item.costName"
+              :value="item.costId"
+            >
+            </el-option>
+          </el-select>
+          <el-input v-else v-model="priceDetails[items.prop]"></el-input>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitForm('priceDetails')"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+export default {
+  props: ["listData"],
+  data() {
+    return {
+      inputWidth: 217,
+      tableSet: [
+        {
+          label: "费用类型",
+          prop: "priceTypeName",
+          prop1: "priceTypeId",
+          scope: "editInfo",
+        },
+        {
+          label: "费用金额(元)",
+          prop: "price",
+          scope: "leftCh",
+          ch: "¥",
+        },
+      ],
+      // 弹窗字段
+      priceDetailsList: [
+        {
+          label: "费用类型",
+          prop: "priceTypeId",
+          scope: "select",
+          options: [],
+        },
+        {
+          label: "费用金额",
+          prop: "price",
+        },
+      ],
+      priceInfoIndex: null, //当前编辑价格明细内容位置
+      popupStatus: null,
+      dialogVisible: false,
+      priceDetails: {},
+      rulesItem: {
+        priceTypeId: [
+          {
+            required: true,
+            message: "请选择费用类型",
+            trigger: ["blur", "change"],
+          },
+        ],
+        price: [
+          { required: true, message: "请输入费用金额", trigger: "blur" },
+          {
+            validator(rule, value, callback) {
+              var reg = /(^[1-9]\d*(\.\d{1,2})?$)|(^0(\.\d{1,2})?$)/;
+              if (reg.test(value)) {
+                callback();
+              } else {
+                callback(new Error("请输入不超过两位小数点的价格数值"));
+              }
+            },
+            trigger: "blur",
+          },
+        ],
+      }, //表单验证
+    };
+  },
+  computed: { ...mapGetters(["paysupply", "educationType", "paycost"]) },
+  methods: {
+    changeDataTime() {
+      if (
+        this.listData.studyTimeArrays &&
+        this.listData.studyTimeArrays.length
+      ) {
+        this.$bus.$emit("againValidate");
+      }
+    },
+    openFunc() {
+      if (this.$refs.priceDetails) {
+        this.$nextTick(() => {
+          this.$refs.priceDetails.clearValidate();
+        });
+      }
+    },
+    /**
+     * 新增价格明细条
+     */
+    addPriceInfo() {
+      this.priceDetails = {};
+      this.popupStatus = 1;
+      this.dialogVisible = true;
+    },
+    /**
+     * 修改价格明细条
+     */
+    editPriceInfo(row) {
+      this.priceInfoIndex = this.listData.standPriceJson.indexOf(row);
+      this.priceDetails = JSON.parse(JSON.stringify(row));
+      this.popupStatus = 2;
+      this.dialogVisible = true;
+    },
+    /**
+     * 删除价格明细条
+     */
+    delPriceInfo(row) {
+      this.listData.standPriceJson.splice(
+        this.listData.standPriceJson.indexOf(row),
+        1
+      );
+      this.$bus.$emit("checkStandPriceJson");
+    },
+    /**
+     * 价格明细表-总价计算
+     */
+    totalPrice(param) {
+      const { columns, data } = param;
+      const sums = [];
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = "总价";
+          return;
+        }
+        const values = data.map((item) => Number(item[column.property]));
+        if (!values.every((value) => isNaN(value))) {
+          sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr);
+            if (!isNaN(value)) {
+              return prev + curr;
+            } else {
+              return prev;
+            }
+          }, 0);
+          sums[index] = "¥" + sums[index];
+        } else {
+          sums[index] = "";
+        }
+      });
+
+      return sums;
+    },
+    /**
+     * 价格明细表-表单验证
+     */
+    submitForm(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.rulesTable();
+        } else {
+          return false;
+        }
+      });
+    },
+    /**
+     * 价格明细表-提交API
+     */
+    rulesTable() {
+      if (this.popupStatus === 2) {
+        this.$set(
+          this.listData.standPriceJson,
+          this.priceInfoIndex,
+          this.priceDetails
+        );
+      } else {
+        if (this.listData.standPriceJson) {
+          const repeatCheck = this.listData.standPriceJson.some((item) => {
+            return item.priceTypeId === this.priceDetails.priceTypeId;
+          });
+          if (repeatCheck) {
+            this.$message.warning("已存在相同费用类型,禁止重复");
+            return;
+          }
+        } else {
+          this.$set(this.listData, "standPriceJson", []);
+        }
+        for (let i = 0; i < this.paycost.length; i++) {
+          if (
+            this.paycost[i].costId === Number(this.priceDetails.priceTypeId)
+          ) {
+            this.priceDetails.priceTypeName = this.paycost[i].costName;
+            break;
+          }
+        }
+        this.listData.standPriceJson.push(this.priceDetails);
+        this.$bus.$emit("checkStandPriceJson");
+      }
+      this.dialogVisible = false;
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 106 - 30
src/views/Marketing/goods/commodityManageMent/newAdd/productInformation.vue → src/views/Marketing/goods/commodityManageMent/add/productInformation.vue

@@ -11,7 +11,7 @@
           >
           </el-date-picker>
         </el-form-item>
-        <el-form-item label="供应方(服务)" prop="supplyId">
+        <el-form-item label="供应方(服务)" prop="supplyId" :key="13">
           <el-select
             v-model="listData.supplyId"
             placeholder="请选择供应方(服务)"
@@ -69,11 +69,7 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item
-          label="院校"
-          prop="schoolId"
-          v-if="listData.businessId && tireStatus.includes(3)"
-        >
+        <el-form-item label="院校" prop="schoolId" v-if="listData.businessId" :key="14">
           <el-select v-model="listData.schoolId" placeholder="请选择院校">
             <el-option
               v-for="(item, index) in newSchoolOption"
@@ -84,11 +80,7 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item
-          label="专业"
-          prop="majorId"
-          v-if="listData.businessId && tireStatus.includes(4)"
-        >
+        <el-form-item label="专业" prop="majorId" v-if="listData.businessId" :key="15">
           <el-select v-model="listData.majorId" placeholder="请选择专业">
             <el-option
               v-for="(item, index) in newMajorOption"
@@ -99,6 +91,22 @@
             </el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="科目" prop="subjectIds" v-if="listData.businessId">
+          <el-select
+            v-model="listData.subjectIds"
+            placeholder="请选择科目"
+            multiple
+            collapse-tags
+          >
+            <el-option
+              v-for="(item, index) in newSubjectOption"
+              :key="index"
+              :label="item.subjectName"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="商品名称" prop="goodsName">
           <el-input
             :style="`max-width: ${inputWidth}px`"
@@ -106,16 +114,20 @@
           ></el-input>
         </el-form-item>
         <el-form-item
+          :key="listData.goodsType ? listData.goodsType : 10"
           label="学时"
-          :prop="listData.goodsType === 1 ? 'classHours' : ''"
+          prop="classHours"
         >
-          <el-input
+          <el-input-number
+            :controls="false"
             :style="`max-width: ${inputWidth}px`"
             v-model="listData.classHours"
-          ></el-input> </el-form-item
+            :precision="2"
+            :min="0"
+          ></el-input-number> </el-form-item
       ></el-col>
       <el-col :span="12">
-        <el-form-item label="商品封面">
+        <el-form-item label="商品封面" prop="coverUrl">
           <div class="goodsImage_Style">
             <div class="imageStyBox" v-if="!listData.coverUrl">
               <label for="uplose">
@@ -179,11 +191,15 @@ export default {
           label: "前培",
           value: 4,
         },
+        {
+          label: "直播",
+          value: 6,
+        },
       ], //商品类型
       newCourTypeOptions: [], //业务层次
       newSchoolOption: [], //院校
       newMajorOption: [], //专业
-      tireStatus: "",
+      newSubjectOption: [], //科目
       inputWidth: 217,
     };
   },
@@ -194,7 +210,6 @@ export default {
     "listData.educationTypeId"(val) {
       this.$set(this.listData, "businessId", "");
       if (val) {
-        this.getTireStatus(val);
         this.getBusinessList(val);
       }
     },
@@ -204,17 +219,79 @@ export default {
     "listData.businessId"(val) {
       this.$set(this.listData, "schoolId", "");
       this.$set(this.listData, "majorId", "");
+      this.$set(this.listData, "subjectIds", "");
+      this.$set(this.listData, "handoutsId", "");
+      this.$bus.$emit("sendBybus");
+      this.$bus.$emit("sendBybusBank");
       if (val) {
         this.getInitBabelList(val);
+        //触发动态验证
+        if (this.listData.goodsType === 1) {
+          this.$bus.$emit("getCheckRequired", val);
+        } else {
+          this.$bus.$emit("getCheckQuitRequired", val);
+        }
       }
     },
+    /**
+     * 科目变化
+     */
+    "listData.subjectIds"(val) {
+      this.$bus.$emit("sendBybus");
+      this.$bus.$emit("sendBybusBank");
+    },
   },
   computed: { ...mapGetters(["paysupply", "educationType"]) },
   methods: {
     /**
      * 商品类型切换
      */
-    changeTypes(val) {},
+    changeTypes(val) {
+      this.$set(this.listData, "examNumber", "0"); //考试次数
+      this.$set(this.listData, "doNumber", "0"); //刷题次数
+      this.$set(this.listData, "studyCount", "1"); //学习次数
+      this.$set(this.listData, "handoutsId", ""); //讲义ID
+      this.$set(this.listData, "serviceTimeType", ""); //学习服务期类型
+      this.$set(this.listData, "serviceTimeNum", ""); //学习服务期年月日
+      this.$set(this.listData, "studyTimeArrays", []); //学习服务期具体时间
+      this.$set(this.listData, "makeGoodsId", ""); //补考/前培参数
+      this.$set(this.listData, "makeGoodsName", ""); //补考/前培参数
+      this.$set(this.listData, "makeGoodsCode", ""); //补考/前培参数
+      this.$set(this.listData, "certificateTypeId", ""); //证书类型
+      this.$set(this.listData, "certificateId", ""); //证书名称
+      this.$set(this.listData, "certificateTpId", ""); //证书模板
+      this.$set(this.listData, "timeArrays", [
+        new Date().getTime(),
+        new Date().getTime() + 365 * 1 * 24 * 3600 * 1000,
+      ]); //商品有效期
+      if (this.listData.goodsType == 2) {
+        this.$set(
+          this.listData,
+          "coverUrl",
+          "oss/images/file/20220518/1652864709142.png"
+        );
+      } else {
+        this.$set(
+          this.listData,
+          "coverUrl",
+          "oss/images/avatar/20211013/1634097664410_1397766697"
+        );
+      } //封面
+      if (val === 1 || val === 6) {
+        this.$bus.$emit("sendBybus");
+      }
+      if (val === 2) {
+        this.$bus.$emit("sendBybusBank");
+      }
+      if (this.listData.businessId) {
+        if (val === 1) {
+          this.$bus.$emit("getCheckRequired", this.listData.businessId);
+        } else {
+          this.$bus.$emit("getCheckQuitRequired", this.listData.businessId);
+        }
+      }
+      this.$bus.$emit("clearValidateFuncAdd");
+    },
     /**
      * 根据条件获取业务层次列表
      */
@@ -245,17 +322,14 @@ export default {
         .then((res) => {
           this.newMajorOption = res.rows;
         });
-    },
-    /**
-     * 获取该教育类型是否包含院校和专业
-     */
-    getTireStatus(val) {
-      for (let i = 0; i < this.educationType.length; i++) {
-        if (this.educationType[i].id === val) {
-          this.tireStatus = this.educationType[i].tireStatus;
-          break;
-        }
-      }
+      /**
+       * 科目
+       */
+      this.$api
+        .inquireCourseSubject({ status: 1, businessId: val })
+        .then((res) => {
+          this.newSubjectOption = res.rows;
+        });
     },
     /**
      * 上传商品封面
@@ -279,7 +353,8 @@ export default {
         return;
       }
       this.$upload.upload(file, 2).then((res) => {
-        self.listData.coverUrl = res;
+        self.$set(self.listData, "coverUrl", res);
+        self.$bus.$emit("validateCoverUrl");
       });
     },
     /**
@@ -287,6 +362,7 @@ export default {
      */
     clearImgs() {
       this.$set(this.listData, "coverUrl", "");
+      this.$bus.$emit("validateCoverUrl");
     },
   },
 };

+ 302 - 0
src/views/Marketing/goods/commodityManageMent/edit/bankContent/bankCheck.vue

@@ -0,0 +1,302 @@
+<template>
+  <div id="bankCheck">
+    <el-dialog
+      @opened="prepareEnd"
+      :visible.sync="dialogVisibleTableBoxs"
+      width="1100px"
+      :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="dialogVisibleTableBoxs = false"
+          />
+        </div>
+      </div>
+      <div style="margin-bottom: 10px">
+        <!-- 题卷类型 -->
+        <el-select
+          style="margin-left: 10px"
+          v-model="formData['examType']"
+          placeholder="请选择题卷类型"
+          :size="size"
+          @change="getInfos(1)"
+        >
+          <el-option
+            v-for="(items, indexs) in examTypeList"
+            :key="indexs"
+            :label="items.label"
+            :value="items.value"
+          ></el-option>
+        </el-select>
+        <!-- 搜索框 -->
+        <el-input
+          style="width: 230px; margin: 0px 10px"
+          :size="size"
+          v-model="formData['key']"
+          placeholder="标题前缀/标题编码/标题名称"
+        ></el-input>
+        <el-button :size="size" type="primary" @click="getInfos(1)"
+          >查询</el-button
+        >
+        <el-button :size="size" @click="getInfos(0)">重置</el-button>
+      </div>
+      <el-table
+        ref="multipleTable"
+        :data="tableData"
+        border
+        @selection-change="selectCheck"
+        :row-key="getRowKeys"
+        :header-cell-style="{
+          'background-color': '#eee',
+          padding: '8px',
+          color: '#333',
+        }"
+        max-height="600px"
+      >
+        <el-table-column
+          align="center"
+          type="selection"
+          width="55"
+          header-align="center"
+          :selectable="checkbox"
+          :reserve-selection="true"
+        >
+        </el-table-column>
+        <template v-for="(item, index) in tableSet">
+          <el-table-column
+            v-if="item.scope !== 'inputs'"
+            :width="item.width"
+            :key="index"
+            :label="item.label"
+            align="center"
+            :show-overflow-tooltip="true"
+            header-align="center"
+          >
+            <template slot-scope="scope">
+              <span v-if="item.scope === 'Status'">
+                {{
+                  scope.row[item.prop] === 1
+                    ? "发布"
+                    : scope.row[item.prop] === 0
+                    ? "未发布"
+                    : "未知"
+                }}
+              </span>
+              <span v-else-if="item.scope === 'businessType'">
+                {{ scope.row[item.prop1] }}-{{ scope.row[item.prop2] }}
+              </span>
+              <span v-else-if="item.scope === 'type'">
+                {{
+                  scope.row[item.prop] === 1
+                    ? "模块卷"
+                    : scope.row[item.prop] === 2
+                    ? "章卷"
+                    : scope.row[item.prop] === 3
+                    ? "试卷"
+                    : "未知"
+                }}
+              </span>
+              <span v-else>{{ scope.row[item.prop] }}</span></template
+            >
+          </el-table-column></template
+        >
+      </el-table>
+      <pagination
+        :total="total"
+        :pageSize="formData.pageSize"
+        :currentPage="formData.pageNum"
+        @handleSizeChange="handleSizeChange"
+        @handleCurrentChange="handleCurrentChange"
+      />
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisibleTableBoxs = false">取 消</el-button>
+        <el-button
+          type="primary"
+          :disabled="activeLists.length === 0"
+          @click="submitTab"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import pagination from "@/components/pagination";
+export default {
+  components: { pagination },
+  data() {
+    return {
+      size: "small",
+      dialogVisibleTableBoxs: false,
+      tableData: [],
+      examTypeList: [
+        {
+          label: "模块卷",
+          value: 1,
+        },
+        {
+          label: "章卷",
+          value: 2,
+        },
+        {
+          label: "试卷",
+          value: 3,
+        },
+      ],
+      tableSet: [
+        { label: "题卷编码", prop: "code", width: "120" },
+        { label: "题卷前缀", prop: "prefixName", width: "120" },
+        { label: "题卷名称", prop: "name", width: "300" },
+        { label: "科目", prop: "subjectName", width: "160" },
+        {
+          label: "业务层次",
+          prop1: "projectName",
+          prop2: "businessName",
+          width: "300",
+          scope: "businessType",
+        },
+        { label: "教育类型", prop: "educationName", width: "160" },
+        { label: "题库类型", prop: "type", scope: "type", width: "120" },
+        {
+          label: "发布状态",
+          prop: "publishStatus",
+          scope: "Status",
+          width: "120",
+        },
+      ],
+      formData: {},
+      activeLists: [],
+      disCheckList: [],
+      sujectTypeList: [],
+      total: 0,
+    };
+  },
+  methods: {
+    /**
+     * 初始
+     */
+    openBox(obj, array) {
+      this.disCheckList = array;
+      this.formData = JSON.parse(JSON.stringify(obj));
+      //获取业务层次-科目
+      this.getsubjectInit();
+      //获取业务层次-课程
+      this.getInfos();
+      this.dialogVisibleTableBoxs = true;
+      this.$nextTick(() => {
+        this.$refs.multipleTable.clearSelection();
+      });
+    },
+    /**
+     * 搜索数据
+     */
+    getInfos(int) {
+      //重置0
+      if (int === 0) {
+        this.formData.pageSize = 10;
+        this.formData.pageNum = 1;
+        delete this.formData.subjectId;
+        delete this.formData.key;
+      }
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      switch (this.formData.examType) {
+        case 1:
+          this.$api.inquireBankModule(this.formData).then((res) => {
+            for (let k = 0; k < res.rows.length; k++) {
+              res.rows[k].ids = 1 + "-" + res.rows[k].moduleExamId;
+              res.rows[k].type = 1;
+              res.rows[k].name = res.rows[k].moduleName;
+            }
+            this.tableData = res.rows;
+            this.total = res.total;
+          });
+          break;
+        case 2:
+          this.$api.inquirebankchapterList(this.formData).then((res) => {
+            for (let k = 0; k < res.rows.length; k++) {
+              res.rows[k].ids = 2 + "-" + res.rows[k].chapterExamId;
+              res.rows[k].type = 2;
+              res.rows[k].name = res.rows[k].name;
+            }
+            this.tableData = res.rows;
+            this.total = res.total;
+          });
+          break;
+        case 3:
+          this.$api.inquirebankexamList(this.formData).then((res) => {
+            for (let k = 0; k < res.rows.length; k++) {
+              res.rows[k].ids = 3 + "-" + res.rows[k].examId;
+              res.rows[k].type = 3;
+              res.rows[k].name = res.rows[k].examName;
+            }
+            this.tableData = res.rows;
+            this.total = res.total;
+          });
+          break;
+        default:
+          break;
+      }
+    },
+    /**
+     * 获取业务层次-科目
+     */
+    getsubjectInit() {
+      this.$api
+        .inquireCourseSubject({
+          status: 1,
+          businessId: this.formData.businessId,
+        })
+        .then((res) => {
+          this.sujectTypeList = res.rows;
+        });
+    },
+    /**
+     * 开启动画结束执行
+     */
+    prepareEnd() {
+      this.activeLists = []; //初始清空勾选数据
+    },
+    /**
+     * 提交回调数据
+     */
+    submitTab() {
+      this.$message.success("添加成功");
+      this.dialogVisibleTableBoxs = false;
+      this.$emit("backData", this.activeLists);
+    },
+    selectCheck(value) {
+      this.activeLists = value;
+    },
+    checkbox(row, index) {
+      if (this.disCheckList.indexOf(row.ids) !== -1) {
+        return false;
+      } else {
+        return true;
+      }
+    },
+    getRowKeys(row) {
+      return row.ids;
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.getInfos();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.getInfos();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 256 - 0
src/views/Marketing/goods/commodityManageMent/edit/bankContent/index.vue

@@ -0,0 +1,256 @@
+<template>
+  <div id="bankContent">
+    <div style="margin-bottom: 20px">
+      <el-button @click="addCourse" size="small">添加</el-button>
+      <el-button
+        @click="openAudition"
+        type="success"
+        size="small"
+        v-if="tableData.length > 0"
+        >试做设置</el-button
+      >
+    </div>
+    <el-table
+      :data="tableData"
+      border
+      :header-cell-style="{
+        'background-color': '#eee',
+        padding: '8px',
+        color: '#333',
+      }"
+      :default-sort="{ prop: 'sort', order: 'ascending' }"
+    >
+      <el-table-column
+        v-for="(item, index) in tableSet"
+        :width="item.width"
+        :key="index"
+        :label="item.label"
+        align="center"
+        :show-overflow-tooltip="true"
+        header-align="center"
+        :sortable="item.prop === 'sort'"
+        sort-by="sort"
+        :prop="item.prop"
+      >
+        <template slot-scope="scope">
+          <span v-if="item.scope === 'types'">{{
+            scope.row[item.prop] === 1
+              ? "录播"
+              : scope.row[item.prop] === 2
+              ? "直播"
+              : scope.row[item.prop] === 3
+              ? "回放"
+              : "未知"
+          }}</span>
+          <span v-else-if="item.scope === 'businessType'">
+            {{ scope.row[item.prop1] }}-{{ scope.row[item.prop2] }}
+          </span>
+          <span v-else-if="item.scope === 'type'">
+            {{
+              scope.row[item.prop] === 1
+                ? "模块卷"
+                : scope.row[item.prop] === 2
+                ? "章卷"
+                : scope.row[item.prop] === 3
+                ? "试卷"
+                : "未知"
+            }}
+          </span>
+          <span v-else-if="item.scope === 'busin'">
+            {{ scope.row[item.prop1] + " - " + scope.row[item.prop2] }}
+          </span>
+          <span v-else-if="item.scope === 'Status'">
+            {{
+              scope.row[item.prop] === 1
+                ? "发布"
+                : scope.row[item.prop] === 0
+                ? "未发布"
+                : "未知"
+            }}
+          </span>
+          <div v-else-if="item.scope === 'inputs'">
+            <el-input-number
+              style="width: 50px"
+              size="small"
+              :controls="false"
+              v-model="scope.row[item.prop]"
+              controls-position="right"
+              :min="0"
+            ></el-input-number>
+          </div>
+          <span v-else>{{ scope.row[item.prop] }}</span></template
+        >
+      </el-table-column>
+      <el-table-column label="操作" align="center" fixed="right" width="100px">
+        <template slot-scope="scope">
+          <el-button type="text" @click="delBank(scope.row)">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <bank-check ref="bankCheck" @backData="backBankData" />
+    <popple-set-tk
+      :key="Math.random()"
+      ref="poppleSetTk"
+      :tableData="tableData"
+      :examConfigList="examConfigList"
+      @uploadArrays="uploadArrays"
+    />
+  </div>
+</template>
+
+<script>
+import poppleSetTk from "../../poppleSetTKCOPY.vue";
+import bankCheck from "./bankCheck.vue";
+export default {
+  components: { poppleSetTk, bankCheck },
+  props: ["listData"],
+  data() {
+    return {
+      tableData: [],
+      examConfigList: [],
+      tableSet: [
+        { label: "排序", prop: "sort", scope: "inputs", width: "100" },
+        { label: "题卷编码", prop: "code", width: "150" },
+        { label: "题卷名称", prop: "name" },
+        { label: "科目", prop: "subjectName", width: "130" },
+        { label: "题库类型", prop: "type", scope: "type", width: "120" },
+      ],
+    };
+  },
+  mounted() {
+    this.$bus.$on("sendBybusBank", () => {
+      this.tableData = [];
+      this.examConfigList = [];
+    });
+  },
+  methods: {
+    /**
+     * 获取初始题库列表
+     */
+    getBybusBanktableData(id) {
+      this.$api.inquireGoodsbanklist({ goodsId: id }).then((res) => {
+        res.data.map((item) => {
+          if (item.type === 1) {
+            item.moduleExamId = item.majorId;
+            item.ids = item.type + "-" + item.majorId;
+          }
+          if (item.type === 2) {
+            item.chapterExamId = item.majorId;
+            item.ids = item.type + "-" + item.majorId;
+          }
+          if (item.type === 3) {
+            item.examId = item.majorId;
+            item.ids = item.type + "-" + item.majorId;
+          }
+        });
+        this.tableData = res.data;
+      });
+    },
+    /**
+     * 获取初始题库试做列表
+     */
+    getBybusBankexam(examList) {
+      this.examConfigList = examList;
+    },
+    /**
+     * 点击试做函数
+     */
+    openAudition() {
+      console.log(this.examConfigList, "examConfigList");
+      this.$refs.poppleSetTk.dialogVisible = true;
+    },
+    /**
+     * 试做回调数据
+     */
+    uploadArrays(arrays) {
+      this.examConfigList = arrays;
+    },
+    /**
+     * 点击添加函数
+     */
+    addCourse() {
+      //搜索条件
+      var data = {
+        businessId: this.listData.businessId,
+        pageNum: 1,
+        pageSize: 10,
+        status: 1,
+        examType: 1,
+      };
+      //已选题卷
+      var aList = this.tableData.map((item) => {
+        return item.ids;
+      });
+      //打开选择课程组件
+      this.$refs.bankCheck.openBox(data, aList);
+    },
+    /**
+     * 选择题库回调数据
+     */
+    backBankData(array) {
+      let copyData = JSON.parse(JSON.stringify(array));
+      if (this.tableData.length) {
+        let maxIndex = 0;
+        this.tableData.forEach((item) => {
+          if (item.sort > maxIndex) {
+            maxIndex = item.sort;
+          }
+        });
+        copyData.forEach((item, index) => {
+          item.sort = maxIndex + index + 1;
+        });
+      } else {
+        copyData.forEach((item, index) => {
+          item.sort = index + 1;
+        });
+      }
+      this.tableData = this.tableData.concat(copyData);
+    },
+    /**
+     * 删除题卷
+     */
+    delBank(item) {
+      let splitItem = item.ids.split("-").map(Number);
+      const FINDINDEX = this.tableData.findIndex((items) => {
+        return items.ids === item.ids;
+      });
+      this.tableData.splice(FINDINDEX, 1);
+      //结构特殊-后期考虑优化
+      this.examConfigList = this.examConfigList.filter((items) => {
+        let arr = items.TypeId.split("-").map(Number);
+        if (splitItem[0] === 1) {
+          if (arr.length === 4) {
+            if (arr[1] !== splitItem[1]) {
+              return items;
+            }
+          } else {
+            return items;
+          }
+        }
+        if (splitItem[0] === 2) {
+          if (arr.length === 3) {
+            if (arr[1] !== splitItem[1]) {
+              return items;
+            }
+          } else {
+            return items;
+          }
+        }
+        if (splitItem[0] === 3) {
+          if (arr.length === 2) {
+            if (arr[1] !== splitItem[1]) {
+              return items;
+            }
+          } else {
+            return items;
+          }
+        }
+      });
+      this.$message.success("删除成功");
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 166 - 0
src/views/Marketing/goods/commodityManageMent/edit/configureContentParameters.vue

@@ -0,0 +1,166 @@
+<template>
+  <div id="configureContentParameters">
+    <el-form-item
+      v-if="
+        listData.goodsType === 1
+          ? rules['studyCount'][0].status
+          : listData.goodsType === 3 || listData.goodsType === 4
+          ? true
+          : false
+      "
+      :label="listData.goodsType === 3 ? '补考次数' : '学习次数'"
+      prop="studyCount"
+      style="margin-top: 10px"
+    >
+      <el-input
+        :style="`max-width:${inputWidth}px;`"
+        v-model="listData.studyCount"
+      ></el-input>
+    </el-form-item>
+    <template v-if="listData.goodsType === 1">
+      <el-form-item v-if="rules['examNumber'][0].status" label="考试次数" style="margin-top: 12px" prop="examNumber">
+        <el-input
+          :style="`max-width:${inputWidth}px;`"
+          v-model="listData.examNumber"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="前培(刷题)机会"
+        style="margin-top: 12px"
+        prop="doNumber"
+        v-if="rules['doNumber'][0].status"
+      >
+        <el-input
+          :style="`max-width:${inputWidth}px;`"
+          v-model="listData.doNumber"
+        ></el-input>
+      </el-form-item>
+    </template>
+    <el-form-item
+      v-if="
+        listData.goodsType === 1 && rules['serviceTimeType'][0].status
+          ? true
+          : listData.goodsType === 2 || listData.goodsType === 6
+          ? true
+          : false
+      "
+      class="positions"
+      label="学习服务期"
+      style="margin-top: 12px"
+      prop="serviceTimeType"
+    >
+      <el-select
+        v-model="listData.serviceTimeType"
+        placeholder="请选择学习服务期类型"
+        @change="initServiceFun"
+      >
+        <el-option
+          v-for="(item, index) in styleType"
+          :key="index"
+          :label="item.label"
+          :value="item.value"
+        >
+        </el-option>
+      </el-select>
+      <el-form-item
+        class="inline_block"
+        v-if="
+          listData.serviceTimeType === 1 ||
+          listData.serviceTimeType === 2 ||
+          listData.serviceTimeType === 3
+        "
+        label-width="140px"
+        label="购买那刻开始计算"
+        prop="serviceTimeNum"
+      >
+        <el-input
+          class="timeInputSty"
+          v-model="listData.serviceTimeNum"
+        ></el-input>
+        <span style="margin-left: 6px">{{
+          listData.serviceTimeType === 1
+            ? "年"
+            : listData.serviceTimeType === 2
+            ? "月"
+            : listData.serviceTimeType === 3
+            ? "天"
+            : ""
+        }}</span>
+      </el-form-item>
+      <el-form-item
+        class="inline_block"
+        v-if="listData.serviceTimeType === 4"
+        label-width="10px"
+        prop="studyTimeArrays"
+      >
+        <el-date-picker
+          v-model="listData.studyTimeArrays"
+          type="datetimerange"
+          value-format="timestamp"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          @change="changeDataTimeStudy(listData.studyTimeArrays)"
+        >
+        </el-date-picker>
+      </el-form-item>
+    </el-form-item>
+  </div>
+</template>
+
+<script>
+export default {
+  props: ["listData","rules"],
+  data() {
+    return {
+      inputWidth: 217,
+      styleType: [
+        {
+          label: "按年限",
+          value: 1,
+        },
+        {
+          label: "按月限",
+          value: 2,
+        },
+        {
+          label: "按天限",
+          value: 3,
+        },
+        {
+          label: "按具体时间区间",
+          value: 4,
+        },
+      ],
+    };
+  },
+  methods: {
+    /**
+     * 重置学习服务期时间值
+     */
+    initServiceFun() {
+      this.$set(this.listData, "serviceTimeNum", "");
+      this.$set(this.listData, "studyTimeArrays", []);
+      this.$bus.$emit("initTimeVal")
+    },
+    changeDataTimeStudy(arr) {
+      if (arr && arr[0] === arr[1]) {
+        this.$message.warning("开始时间与结束时间不允许相同");
+        this.$set(this.listData, "studyTimeArrays", []);
+      }
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.timeInputSty {
+  width: 90px;
+}
+/deep/.el-input__inner {
+  text-align: center;
+}
+.inline_block {
+  display: inline-block;
+}
+</style>

+ 227 - 0
src/views/Marketing/goods/commodityManageMent/edit/courseContent/courseCheck.vue

@@ -0,0 +1,227 @@
+<template>
+  <div id="courseCheck">
+    <el-dialog
+      @opened="prepareEnd"
+      :visible.sync="dialogVisibleTableBoxs"
+      width="1100px"
+      :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="dialogVisibleTableBoxs = false"
+          />
+        </div>
+      </div>
+      <div style="margin-bottom: 10px">
+        <!-- 专业 -->
+        <el-select
+          v-model="formData['majorId']"
+          placeholder="请选择专业"
+          :size="size"
+          clearable
+        >
+          <el-option
+            v-for="(items, indexs) in ProfessionalList"
+            :key="indexs"
+            :label="items.categoryName"
+            :value="items.id"
+          ></el-option>
+        </el-select>
+        <!-- 搜索框 -->
+        <el-input
+          style="width: 230px; margin: 0px 10px"
+          :size="size"
+          v-model="formData['key']"
+          placeholder="课程标题/课程编码/标题前缀"
+        ></el-input>
+        <el-button :size="size" type="primary" @click="getInfos(1)"
+          >查询</el-button
+        >
+        <el-button :size="size" @click="getInfos(0)">重置</el-button>
+      </div>
+      <el-table
+        ref="multipleTable"
+        :data="tableData"
+        border
+        @selection-change="selectCheck"
+        :row-key="getRowKeys"
+        :header-cell-style="{
+          'background-color': '#eee',
+          padding: '8px',
+          color: '#333',
+        }"
+      >
+        <el-table-column
+          align="center"
+          type="selection"
+          width="55"
+          header-align="center"
+          :selectable="checkboxT"
+          :reserve-selection="true"
+        >
+        </el-table-column>
+        <template v-for="(item, index) in tableSet">
+          <el-table-column
+            v-if="item.scope !== 'inputs'"
+            :width="item.width"
+            :key="index"
+            :label="item.label"
+            align="center"
+            :show-overflow-tooltip="true"
+            header-align="center"
+          >
+            <template slot-scope="scope">
+              <span v-if="item.scope === 'Status'">
+                {{
+                  scope.row[item.prop] === 1
+                    ? "发布"
+                    : scope.row[item.prop] === 0
+                    ? "未发布"
+                    : "未知"
+                }}
+              </span>
+              <span v-else>{{ scope.row[item.prop] }}</span></template
+            >
+          </el-table-column></template
+        >
+      </el-table>
+      <pagination
+        :total="total"
+        :pageSize="formData.pageSize"
+        :currentPage="formData.pageNum"
+        @handleSizeChange="handleSizeChange"
+        @handleCurrentChange="handleCurrentChange"
+      />
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisibleTableBoxs = false">取 消</el-button>
+        <el-button
+          type="primary"
+          :disabled="activeLists.length === 0"
+          @click="submitTab"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import pagination from "@/components/pagination";
+export default {
+  components: { pagination },
+  data() {
+    return {
+      size: "small",
+      dialogVisibleTableBoxs: false,
+      tableData: [],
+      tableSet: [
+        { label: "课程编码", prop: "code", width: "140px" },
+        { label: "名称前缀", prop: "prefixName", width: "160px" },
+        { label: "课程标题", prop: "courseName" },
+        {
+          label: "发布状态",
+          prop: "publishStatus",
+          scope: "Status",
+          width: "120px",
+        },
+      ],
+      formData: {},
+      activeLists: [],
+      disCheckList: [],
+      ProfessionalList: [],
+      total: 0,
+    };
+  },
+  methods: {
+    /**
+     * 初始
+     */
+    openBox(obj, array, eduId) {
+      this.disCheckList = array;
+      this.formData = JSON.parse(JSON.stringify(obj));
+      //获取业务层次-课程
+      this.getInfos();
+      //获取业务层次-专业
+      this.getmajInit();
+      this.dialogVisibleTableBoxs = true;
+      this.$nextTick(() => {
+        this.$refs.multipleTable.clearSelection();
+      });
+    },
+    /**
+     * 搜索数据
+     */
+    getInfos(int) {
+      //重置0
+      if (int === 0) {
+        this.formData.pageSize = 10;
+        this.formData.pageNum = 1;
+        delete this.formData.majorId;
+        delete this.formData.subjectId;
+        delete this.formData.key;
+      }
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      this.$api.inquireCourseListS(this.formData).then((res) => {
+        this.tableData = res.rows;
+        this.total = res.total;
+      });
+    },
+    /**
+     * 获取业务层次-专业
+     */
+    getmajInit() {
+      this.$api
+        .inquireCourseMajor({ status: 1, businessId: this.formData.businessId })
+        .then((res) => {
+          this.ProfessionalList = res.rows;
+        });
+    },
+    /**
+     * 开启动画结束执行
+     */
+    prepareEnd() {
+      this.activeLists = []; //初始清空勾选数据
+    },
+    /**
+     * 提交回调数据
+     */
+    submitTab() {
+      this.$message.success("添加成功");
+      this.dialogVisibleTableBoxs = false;
+      this.$emit("backData", this.activeLists);
+    },
+    selectCheck(value) {
+      this.activeLists = value;
+    },
+    checkboxT(row, index) {
+      if (this.disCheckList.indexOf(row.courseId) !== -1) {
+        return false;
+      } else {
+        return true;
+      }
+    },
+    getRowKeys(row) {
+      return row.courseId;
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.getInfos();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.getInfos();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 68 - 0
src/views/Marketing/goods/commodityManageMent/edit/courseContent/everyDayStudyNum.vue

@@ -0,0 +1,68 @@
+<template>
+  <div id="everyDayStudyNum">
+    <!-- 每天节学习数量 -->
+    <el-dialog
+      :visible.sync="everyDaySetBox"
+      width="300px"
+      :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="everyDaySetBox = false"
+          />
+        </div>
+      </div>
+      每天最多学习<el-input
+        style="width: 60px; margin: 0px 10px"
+        size="mini"
+        v-model="everyDaystyleNum"
+      />节视频
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="everyDaySetBox = false">取 消</el-button>
+        <el-button type="primary" @click="submitEveryDayStyleNumData"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      everyDaySetBox: false,
+      everyDaystyleNum: "",
+    };
+  },
+  methods: {
+    openBox(num) {
+      this.everyDaystyleNum = num;
+      this.everyDaySetBox = true
+    },
+    submitEveryDayStyleNumData() {
+      if (this.everyDaystyleNum) {
+        var ty = /^([1-9][0-9]*){1,3}$/;
+        if (ty.test(this.everyDaystyleNum)) {
+          this.$emit("backData", this.everyDaystyleNum);
+          this.everyDaySetBox = false;
+        } else {
+          this.$message.warning("请输入非零正整数");
+          return;
+        }
+      } else {
+        this.$emit("backData", "");
+        this.everyDaySetBox = false;
+      }
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 366 - 0
src/views/Marketing/goods/commodityManageMent/edit/courseContent/handoutView.vue

@@ -0,0 +1,366 @@
+<template>
+  <div id="handoutView">
+    <!-- 选择讲义 -->
+    <el-dialog
+      :visible.sync="aboutJYBox"
+      width="400px"
+      :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="aboutJYBox = false"
+          />
+        </div>
+      </div>
+      <el-button @click="openJYActiveBox">选择讲义</el-button>
+      <div v-if="handoutsIdTable">
+        {{ handoutsName }}
+        <i
+          class="el-icon-error"
+          style="color: #f56c6c"
+          @click="delHandouts"
+        ></i>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="aboutJYBox = false">取 消</el-button>
+        <el-button type="primary" @click="submitJYs">确 定</el-button>
+      </span>
+    </el-dialog>
+    <!-- 关联讲义列表 -->
+    <el-dialog
+      :visible.sync="jYactiveBoxs"
+      width="1080px"
+      append-to-body
+      :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="jYactiveBoxs = false"
+          />
+        </div>
+      </div>
+      <div style="margin-bottom: 10px">
+        <!-- 搜索框 -->
+        <el-input
+          style="width: 230px;margin-right:10px;"
+          :size="size"
+          v-model="formData['key']"
+          placeholder="请输入讲义标题/讲义编码"
+        ></el-input>
+        <el-button :size="size" type="primary" @click="getJyData(1)"
+          >查询</el-button
+        >
+        <el-button :size="size" @click="getJyData(0)">重置</el-button>
+      </div>
+      <el-table
+        ref="multipleTable"
+        :data="tableData"
+        border
+        :header-cell-style="{
+          'background-color': '#eee',
+          padding: '8px',
+          color: '#333',
+        }"
+      >
+        <el-table-column label="" width="45" align="center">
+          <template scope="scope">
+            <el-radio
+              :label="scope.row.handoutsId"
+              v-model="templateRadio"
+              @change.native="getTemplateRow(scope.$index, scope.row)"
+              >{{ "" }}</el-radio
+            >
+          </template>
+        </el-table-column>
+        <template v-for="(item, index) in tableSet">
+          <el-table-column
+            v-if="item.scope !== 'inputs'"
+            :width="item.width"
+            :key="index"
+            :label="item.label"
+            align="center"
+            :show-overflow-tooltip="true"
+            header-align="center"
+          >
+            <template slot-scope="scope">
+              <span v-if="item.scope === 'Status'">
+                {{
+                  scope.row[item.prop] === 1
+                    ? "发布"
+                    : scope.row[item.prop] === 0
+                    ? "未发布"
+                    : "未知"
+                }}
+              </span>
+              <ul v-else-if="item.scope === 'eduType'" class="ulAuto">
+                <template v-for="(itm, inds) in scope.row[item.prop]">
+                  <li :key="inds" v-if="inds === 0">
+                    {{
+                      itm.educationName +
+                      "-" +
+                      itm.projectName +
+                      "-" +
+                      itm.businessName
+                    }}
+                  </li>
+                </template>
+                <el-popover
+                  :key="Math.random()"
+                  placement="right"
+                  trigger="click"
+                >
+                  <ul>
+                    <li v-for="(itm, inds) in scope.row[item.prop]" :key="inds">
+                      {{ inds + 1 }}、
+                      {{
+                        itm.educationName +
+                        "-" +
+                        itm.projectName +
+                        "-" +
+                        itm.businessName
+                      }}
+                    </li>
+                  </ul>
+                  <el-button
+                    slot="reference"
+                    style="margin-left: 6px"
+                    type="text"
+                    v-if="scope.row[item.prop].length > 1"
+                    size="mini"
+                    >更多</el-button
+                  >
+                </el-popover>
+              </ul>
+              <span v-else-if="item.scope === 'canDownload'">{{
+                scope.row[item.prop] === 1 ? "是" : "否"
+              }}</span>
+              <span v-else>{{ scope.row[item.prop] }}</span></template
+            >
+          </el-table-column></template
+        >
+      </el-table>
+      <pagination
+        :total="total"
+        :pageSize="formData.pageSize"
+        :currentPage="formData.pageNum"
+        @handleSizeChange="handleSizeChange"
+        @handleCurrentChange="handleCurrentChange"
+      />
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="jYactiveBoxs = false">取 消</el-button>
+        <el-button type="primary" @click="submitBox">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import pagination from "@/components/pagination";
+export default {
+  components: { pagination },
+  data() {
+    return {
+      size:"small",
+      aboutJYBox: false,
+      handoutsName: "", //讲义名称
+      handoutsIdTable: "",
+      templateRadio: "", //临时选中ID
+      templateName: "", //临时选中Name
+      jYactiveBoxs: false,
+      total: 0,
+      tableSet: [
+        { label: "讲义编码", prop: "encoder", width: "150px" },
+        { label: "讲义标题", prop: "handoutsName" },
+        {
+          label: "是否可下载",
+          prop: "canDownload",
+          scope: "canDownload",
+          width: "140px",
+        },
+        { label: "发布状态", prop: "status", scope: "Status", width: "140px" },
+      ],
+      tableData: [],
+      formData: {},
+    };
+  },
+  methods: {
+    /**
+     * 初始化
+     */
+    openBox(id) {
+      if (id && !this.handoutsName) {
+        this.$api.obtainCourseHandouts(id).then((res) => {
+          this.handoutsName = res.data.handoutsName;
+        });
+      }
+      this.handoutsIdTable = id;
+      this.aboutJYBox = true;
+    },
+    /**
+     * 删除讲义
+     */
+    delHandouts() {
+      this.handoutsIdTable = "";
+      this.handoutsName = "";
+    },
+    //确定讲义ID
+    submitJYs() {
+      this.$emit("backData", this.handoutsIdTable);
+      this.aboutJYBox = false;
+    },
+    openJYActiveBox() {
+      this.templateRadio = this.handoutsIdTable;
+      this.templateName = this.handoutsName;
+      this.getJyData(0);
+      this.jYactiveBoxs = true;
+    },
+    /**
+     * 确定选中
+     */
+    submitBox() {
+      this.handoutsIdTable = this.templateRadio;
+      this.handoutsName = this.templateName;
+      this.jYactiveBoxs = false;
+    },
+    /**
+     * 临时选中
+     */
+    getTemplateRow(index, row) {
+      this.templateRadio = row.handoutsId;
+      this.templateName = row.handoutsName;
+    },
+    /**
+     * 搜索
+     */
+    getJyData(int) {
+      if (int === 0) {
+        this.formData = {
+          businessId: this.$parent.listData.businessId,
+          status: 1,
+          pageSize: 10,
+          pageNum: 1,
+          key: "",
+        };
+      }
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      this.$api.inquireCourseHandoutsList(this.formData).then((res) => {
+        this.total = res.total;
+        this.tableData = res.rows;
+      });
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.getJyData();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.getJyData();
+    },
+  },
+};
+</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>

+ 296 - 0
src/views/Marketing/goods/commodityManageMent/edit/courseContent/index.vue

@@ -0,0 +1,296 @@
+<template>
+  <div id="courseContent">
+    <div style="margin-bottom: 20px">
+      <el-button @click="addCourse" size="small" v-if="!submitStatusInfo"
+        >添加</el-button
+      >
+      <el-button
+        @click="openAudition"
+        type="success"
+        size="small"
+        v-if="tableData.length > 0"
+        >试听设置</el-button
+      >
+      <el-button type="primary" @click="openPlayPhotoSet" size="small"
+        >播放和拍照设置</el-button
+      >
+      <el-button type="primary" @click="openStyleNumSet" size="small"
+        >每天学习限制</el-button
+      >
+      <el-button type="primary" @click="openHandoutSet" size="small"
+        >关联讲义</el-button
+      >
+    </div>
+    <el-table
+      :data="tableData"
+      border
+      :header-cell-style="{
+        'background-color': '#eee',
+        padding: '8px',
+        color: '#333',
+      }"
+      :default-sort="{ prop: 'sort', order: 'ascending' }"
+    >
+      <el-table-column
+        v-for="(item, index) in tableSetVideo"
+        :width="item.width"
+        :key="index"
+        :label="item.label"
+        align="center"
+        :show-overflow-tooltip="true"
+        header-align="center"
+        :sortable="item.prop === 'sort'"
+        sort-by="sort"
+        :prop="item.prop"
+      >
+        <template slot-scope="scope">
+          <span v-if="item.scope === 'types'">{{
+            scope.row[item.prop] === 1
+              ? "录播"
+              : scope.row[item.prop] === 2
+              ? "直播"
+              : scope.row[item.prop] === 3
+              ? "回放"
+              : "未知"
+          }}</span>
+          <span v-else-if="item.scope === 'busin'">
+            {{ scope.row[item.prop1] + " - " + scope.row[item.prop2] }}
+          </span>
+          <span v-else-if="item.scope === 'Status'">
+            {{
+              scope.row[item.prop] === 1
+                ? "发布"
+                : scope.row[item.prop] === 0
+                ? "未发布"
+                : "未知"
+            }}
+          </span>
+          <div v-else-if="item.scope === 'inputs'">
+            <el-input-number
+              style="width: 50px"
+              size="small"
+              :controls="false"
+              v-model="scope.row[item.prop]"
+              controls-position="right"
+              :min="0"
+            ></el-input-number>
+          </div>
+          <span v-else>{{ scope.row[item.prop] }}</span></template
+        >
+      </el-table-column>
+      <el-table-column
+        label="操作"
+        align="center"
+        fixed="right"
+        width="100px"
+        v-if="!submitStatusInfo"
+      >
+        <template slot-scope="scope">
+          <el-button type="text" @click="delCourse(scope.row)">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <popple-set
+      :key="Math.random()"
+      ref="poppleSet"
+      :tableData="tableData"
+      :auditionList="auditionList"
+      @uploadArrays="uploadArrays"
+    />
+    <course-check ref="courseCheck" @backData="backVideoData" />
+    <play-photo ref="playPhoto" @backData="backPlayPhotoData" />
+    <every-day-study-num ref="everyDayStudyNum" @backData="backEveryDaySet" />
+    <handout-view ref="handoutView" @backData="backHandoutView" />
+  </div>
+</template>
+
+<script>
+import poppleSet from "../../poppleSet.vue";
+import courseCheck from "./courseCheck.vue";
+import playPhoto from "./playPhoto.vue";
+import everyDayStudyNum from "./everyDayStudyNum.vue";
+import handoutView from "./handoutView.vue";
+
+export default {
+  components: {
+    poppleSet,
+    courseCheck,
+    playPhoto,
+    everyDayStudyNum,
+    handoutView,
+  },
+  props: ["listData", "submitStatusInfo"],
+  data() {
+    return {
+      tableSetVideo: [
+        { label: "排序", prop: "sort", scope: "inputs", width: "100" },
+        { label: "课程编码", prop: "code", width: "140" },
+        { label: "课程名称", prop: "courseName", width: "190" },
+        { label: "科目", prop: "subjectName", width: "150" },
+        { label: "专业", prop: "categoryName" },
+        { label: "院校", prop: "schoolName", width: "150" },
+        {
+          label: "业务层次",
+          prop1: "projectName",
+          prop2: "businessName",
+          scope: "busin",
+          width: "350px",
+        },
+        { label: "教育类型", prop: "educationName", width: "160" },
+        {
+          label: "发布状态",
+          prop: "publishStatus",
+          scope: "Status",
+          width: "120",
+        },
+      ],
+      tableData: [],
+      auditionList: [], //试听数据
+    };
+  },
+  mounted() {
+    this.$bus.$on("sendBybus", () => {
+      this.tableData = [];
+      this.auditionList = [];
+    });
+  },
+  methods: {
+    /**
+     * 获取初始课程列表
+     */
+    getBybusCoursetableData(id) {
+      this.$api.obtainCourseSgoodsId(id).then((res) => {
+        this.tableData = res.rows;
+      });
+    },
+    /**
+     * 获取初始课程试听列表
+     */
+    getBybusCourseAudition(audition) {
+      this.auditionList = audition;
+      console.log(audition);
+    },
+    /**
+     * 点击添加函数
+     */
+    addCourse() {
+      //搜索条件
+      var data = {
+        businessId: this.listData.businessId,
+        subjectIds: this.listData.subjectIds.toString(),
+        status: 1,
+        pageSize: 10,
+        pageNum: 1,
+        publishStatus: 1,
+      };
+      //已选课程
+      var aList = this.tableData.map((item) => {
+        return item.courseId;
+      });
+      //打开选择课程组件
+      this.$refs.courseCheck.openBox(
+        data,
+        aList,
+        this.listData.educationTypeId
+      );
+    },
+    /**
+     * 选择课程回调数据
+     */
+    backVideoData(array) {
+      let copyData = JSON.parse(JSON.stringify(array));
+      if (this.tableData.length) {
+        let maxIndex = 0;
+        this.tableData.forEach((item) => {
+          if (item.sort > maxIndex) {
+            maxIndex = item.sort;
+          }
+        });
+        copyData.forEach((item, index) => {
+          item.sort = maxIndex + index + 1;
+        });
+      } else {
+        copyData.forEach((item, index) => {
+          item.sort = index + 1;
+        });
+      }
+      this.tableData = this.tableData.concat(copyData);
+    },
+    /**
+     * 删除课程
+     */
+    delCourse(item) {
+      const FINDINDEX = this.tableData.findIndex((items) => {
+        return items.courseId === item.courseId;
+      });
+      this.tableData.splice(FINDINDEX, 1);
+      this.auditionList = this.auditionList.filter((items) => {
+        return items.courseId !== item.courseId;
+      });
+      this.$message.success("删除成功");
+    },
+    /**
+     * 点击试听函数
+     */
+    openAudition() {
+      this.$refs.poppleSet.dialogVisible = true;
+    },
+    /**
+     * 试听回调数据
+     */
+    uploadArrays(arrays) {
+      this.auditionList = arrays;
+    },
+    /**
+     * 点击播放和拍照设置函数
+     */
+    openPlayPhotoSet() {
+      this.$refs.playPhoto.openBox(this.listData);
+    },
+    /**
+     * 播放和拍照设置回调数据
+     */
+    backPlayPhotoData(obj) {
+      this.$set(this.listData, "playConfig", obj.playConfig);
+      this.$set(this.listData, "photographConfig", obj.photographConfig);
+      this.$set(
+        this.listData,
+        "goodsPhotographExamConfig",
+        obj.goodsPhotographExamConfig
+      );
+    },
+    /**
+     * 点击学习限制函数
+     */
+    openStyleNumSet() {
+      this.$refs.everyDayStudyNum.openBox(this.listData.sectionMaxNum);
+    },
+    /**
+     * 学习限制回调数据
+     */
+    backEveryDaySet(num) {
+      this.$set(this.listData, "sectionMaxNum", num);
+    },
+    /**
+     * 点击选择讲义函数
+     */
+    openHandoutSet() {
+      if (!this.listData.businessId) {
+        this.$message.warning("请选择业务层次");
+        return;
+      }
+      console.log(this.listData);
+      this.$refs.handoutView.openBox(this.listData.handoutsId);
+    },
+    /**
+     * 讲义回调数据
+     */
+    backHandoutView(id) {
+      this.$set(this.listData, "handoutsId", id);
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 210 - 0
src/views/Marketing/goods/commodityManageMent/edit/courseContent/playPhoto.vue

@@ -0,0 +1,210 @@
+<template>
+  <div id="playPhoto">
+    <!-- 播放和拍照设置 -->
+    <el-dialog
+      :visible.sync="dialogPhoto"
+      width="980px"
+      :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="dialogPhoto = false"
+          />
+        </div>
+      </div>
+      <div class="dis_f">
+        <div>
+          <h4>视频播放</h4>
+          <div>
+            <span class="w_zq">自动播放</span
+            ><el-radio-group v-model="photoVideoList.playConfig.autoPlay">
+              <el-radio :label="1">开启</el-radio>
+              <el-radio :label="0">禁止</el-radio>
+            </el-radio-group>
+          </div>
+          <div>
+            <span class="w_zq">进度条拖拉</span
+            ><el-radio-group v-model="photoVideoList.playConfig.drag">
+              <el-radio :label="1">开启</el-radio>
+              <el-radio :label="0">禁止</el-radio>
+            </el-radio-group>
+          </div>
+          <div>
+            <span class="w_zq">快进慢进</span
+            ><el-radio-group v-model="photoVideoList.playConfig.speed">
+              <el-radio :label="1">开启</el-radio>
+              <el-radio :label="0">禁止</el-radio>
+            </el-radio-group>
+          </div>
+        </div>
+        <div style="width: 1px; background-color: #666; margin: 0px 14px"></div>
+        <div>
+          <h4>课程节-点播拍照</h4>
+          <div>
+            <el-radio-group
+              v-model="photoVideoList.photographConfig.photograph"
+            >
+              <el-radio :label="1">是</el-radio>
+              <el-radio
+                :label="0"
+                @change="photoVideoList.photographConfig.photoNum = ''"
+                >否</el-radio
+              >
+            </el-radio-group>
+          </div>
+          <div
+            v-if="photoVideoList.photographConfig.photograph === 1"
+            style="margin-top: 14px"
+          >
+            拍照数量:
+            <el-radio-group v-model="photoVideoList.photographConfig.photoNum">
+              <el-radio :label="1">1张</el-radio>
+              <el-radio :label="3">3张</el-radio>
+            </el-radio-group>
+          </div>
+        </div>
+        <div style="width: 1px; background-color: #666; margin: 0px 14px"></div>
+        <div>
+          <h4>课程节-直播拍照</h4>
+          <div>
+            <el-radio-group
+              v-model="photoVideoList.photographConfig.livephotograph"
+            >
+              <el-radio :label="1">是</el-radio>
+              <el-radio :label="0">否</el-radio>
+            </el-radio-group>
+          </div>
+          <div
+            v-if="photoVideoList.photographConfig.livephotograph === 1"
+            style="margin-top: 14px"
+          >
+            学习开始,就拍照,只拍1张照片
+          </div>
+        </div>
+        <div style="width: 1px; background-color: #000; margin: 0px 14px"></div>
+        <div>
+          <h4>课程章节-章测试卷-拍照</h4>
+          <div>
+            <el-radio-group
+              v-model="photoVideoList.goodsPhotographExamConfig.photograph"
+            >
+              <el-radio :label="1">是</el-radio>
+              <el-radio :label="0">否</el-radio>
+            </el-radio-group>
+          </div>
+          <div
+            v-if="photoVideoList.goodsPhotographExamConfig.photograph === 1"
+            style="margin-top: 14px"
+          >
+            学习开始,就拍照,只拍1张照片
+          </div>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogPhoto = false">取消</el-button>
+        <el-button type="primary" @click="submitPhoto">确定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      dialogPhoto: false,
+      photoVideoList: {
+        playConfig: {
+          autoPlay: 0,
+          drag: 0,
+          speed: 0,
+        },
+        photographConfig: {
+          photograph: 0,
+          photoNum: "",
+          livephotograph: 0,
+        },
+        goodsPhotographExamConfig: {
+          photograph: 0,
+        },
+      }, //播放和拍照设置---暂存
+    };
+  },
+  methods: {
+    /**
+     * 初始进入
+     */
+    openBox(obj) {
+      if (obj.playConfig) {
+        this.photoVideoList.playConfig = JSON.parse(
+          JSON.stringify(obj.playConfig)
+        );
+      } else {
+        this.photoVideoList.playConfig = {
+          autoPlay: 0,
+          drag: 0,
+          speed: 0,
+        };
+      }
+      if (obj.photographConfig) {
+        this.photoVideoList.photographConfig = JSON.parse(
+          JSON.stringify(obj.photographConfig)
+        );
+      } else {
+        this.photoVideoList.photographConfig = {
+          photograph: 0,
+          photoNum: "",
+          livephotograph: 0,
+        };
+      }
+      if (obj.goodsPhotographExamConfig) {
+        this.photoVideoList.goodsPhotographExamConfig = JSON.parse(
+          JSON.stringify(obj.goodsPhotographExamConfig)
+        );
+      } else {
+        this.photoVideoList.goodsPhotographExamConfig = {
+          photograph: 0,
+        };
+      }
+      this.dialogPhoto = true;
+    },
+    //提交播放和拍照设置
+    submitPhoto() {
+      if (
+        this.photoVideoList.photographConfig.photograph === 1 &&
+        !this.photoVideoList.photographConfig.photoNum
+      ) {
+        this.$message.warning("请输入拍照数量");
+        return;
+      }
+      let obj = {
+        playConfig: this.photoVideoList.playConfig,
+        photographConfig: this.photoVideoList.photographConfig,
+        goodsPhotographExamConfig:
+          this.photoVideoList.goodsPhotographExamConfig,
+      };
+      this.dialogPhoto = false;
+      this.$emit("backData", obj);
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.dis_f {
+  display: flex;
+  justify-content: space-around;
+  & h4 {
+    margin: 10px 0px;
+  }
+}
+.w_zq {
+  display: inline-block;
+  width: 88px;
+}
+</style>

Разница между файлами не показана из-за своего большого размера
+ 135 - 1479
src/views/Marketing/goods/commodityManageMent/edit/index.vue


+ 84 - 0
src/views/Marketing/goods/commodityManageMent/edit/introduction.vue

@@ -0,0 +1,84 @@
+<template>
+  <div id="introduction">
+    <el-form-item label="商品简介" :label-width="labelWidth" prop="introduce">
+      <el-input
+        type="textarea"
+        v-model="listData.introduce"
+        placeholder="请输入商品简介"
+      ></el-input>
+    </el-form-item>
+    <el-form-item
+      label="适合对象"
+      :label-width="labelWidth"
+      prop="suitableObject"
+    >
+      <el-input
+        type="textarea"
+        v-model="listData.suitableObject"
+        placeholder="请输入适合对象"
+      ></el-input>
+    </el-form-item>
+    <el-form-item label="学员须知" :label-width="labelWidth" prop="buyNote">
+      <el-input
+        type="textarea"
+        v-model="listData.buyNote"
+        placeholder="请输入学员须知"
+      ></el-input>
+    </el-form-item>
+    <div class="courseStyle">
+      商品详情<span style="color: #999; margin-left: 6px">支持图文</span>
+    </div>
+    <div style="text-align: center; margin-bottom: 10px">
+      <el-button
+        size="mini"
+        :type="active === 1 ? 'success' : ''"
+        @click="active = 1"
+        >PC端</el-button
+      >
+      <el-button
+        size="mini"
+        :type="active === 2 ? 'success' : ''"
+        @click="active = 2"
+        >手机端</el-button
+      >
+    </div>
+    <editor
+      v-show="active === 1"
+      v-model="listData.pcDetailHtml"
+      :min-height="300"
+      :max-height="500"
+      :uploadStatus="2"
+    />
+    <editor
+      v-show="active === 2"
+      v-model="listData.mobileDetailHtml"
+      :min-height="300"
+      :max-height="500"
+      :uploadStatus="2"
+    />
+  </div>
+</template>
+
+<script>
+import Editor from "@/components/Editor";
+export default {
+  components: { Editor },
+  props: ["listData"],
+  data() {
+    return {
+      labelWidth: "90px",
+      active: 1,
+    };
+  },
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+.courseStyle {
+  margin-top: 20px;
+  margin-bottom: 10px;
+  font-size: 14px;
+  border-bottom: 2px solid rgb(179, 204, 255);
+}
+</style>

+ 124 - 0
src/views/Marketing/goods/commodityManageMent/edit/issueAcertificate.vue

@@ -0,0 +1,124 @@
+<template>
+  <div id="issueAcertificate">
+    <div class="dis_play_sty">
+      <el-form-item label="请选择" prop="certificateTypeId">
+        <el-select
+          v-model="listData.certificateTypeId"
+          placeholder="请选择证书类型"
+          @change="editStatus = true"
+        >
+          <el-option
+            v-for="(item, index) in certificate"
+            :key="index"
+            :label="item.certificateName"
+            :value="item.id"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item
+        v-if="certificateList.length"
+        label=" "
+        label-width="10px"
+        prop="certificateId"
+      >
+        <el-select
+          v-model="listData.certificateId"
+          placeholder="请选择证书名称"
+          @change="editStatus = true"
+        >
+          <el-option
+            v-for="(item, index) in certificateList"
+            :key="index"
+            :label="item.certificateName"
+            :value="item.id"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item
+        v-if="certificateTpList.length"
+        label=" "
+        label-width="10px"
+        prop="certificateTpId"
+      >
+        <el-select
+          v-model="listData.certificateTpId"
+          placeholder="请选择证书模板"
+        >
+          <el-option
+            v-for="(item, index) in certificateTpList"
+            :key="index"
+            :label="item.title"
+            :value="item.tpId"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
+    </div>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+export default {
+  props: ["listData"],
+  data() {
+    return {
+      certificateList: [],
+      certificateTpList: [],
+      editStatus: false, //避免第一次进来初始化数据丢失
+    };
+  },
+  watch: {
+    "listData.certificateTypeId": {
+      handler(val, oldVal) {
+        if (this.editStatus) {
+          this.$set(this.listData, "certificateId", "");
+        }
+        if (val) {
+          this.$api
+            .inquireBaseCertificatecommon({ status: 1, certificateTypeId: val })
+            .then((res) => {
+              this.certificateList = res.rows;
+            });
+        } else {
+          this.certificateList = [];
+        }
+      },
+      immediate: true,
+    },
+    "listData.certificateId": {
+      handler(val, oldVal) {
+        if (this.editStatus) {
+          this.$set(this.listData, "certificateTpId", "");
+        }
+        if (val) {
+          this.$api
+            .inquireBaseCertificatetp({ status: 1, certificateId: val })
+            .then((res) => {
+              this.certificateTpList = res.rows;
+            });
+        } else {
+          this.certificateTpList = [];
+        }
+      },
+      immediate: true,
+    },
+  },
+  computed: { ...mapGetters(["certificate"]) },
+  mounted() {
+    this.$api.inquireBaseCertificatetp({ status: 1 }).then((res) => {
+      this.certificateOption = res.rows;
+    });
+  },
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+.dis_play_sty {
+  display: flex;
+  align-items: center;
+}
+</style>

+ 73 - 0
src/views/Marketing/goods/commodityManageMent/edit/makeUpExam/index.vue

@@ -0,0 +1,73 @@
+<template>
+  <div id="makeUpExam">
+    <el-form-item label="关联商品" prop="makeGoodsId">
+      <div>
+        <el-button @click="goToActiveGoods">选择商品</el-button>
+        <span v-if="listData.makeGoodsId" style="margin-left: 12px"
+          >{{ listData.makeGoodsCode }} - {{ listData.makeGoodsName }}</span
+        >
+        <el-button
+          style="margin-left: 12px"
+          v-if="listData.makeGoodsId"
+          type="text"
+          @click="clearGoods"
+          >删除</el-button
+        >
+      </div>
+    </el-form-item>
+    <make-check ref="makeCheck" @backData="backMakeData" />
+  </div>
+</template>
+
+<script>
+import makeCheck from "./makeCheck.vue";
+export default {
+  components: { makeCheck },
+  props: ["listData"],
+  data() {
+    return {};
+  },
+  methods: {
+    goToActiveGoods() {
+      //搜索条件
+      var data = {
+        businessId: this.listData.businessId,
+        status: 1,
+        pageSize: 10,
+        pageNum: 1,
+        filtration:
+          this.listData.goodsType === 3
+            ? 2
+            : this.listData.goodsType === 4
+            ? 1
+            : "",
+      };
+      //打开选择补考/前培组件
+      this.$refs.makeCheck.openBox(
+        data,
+        {
+          makeGoodsId: this.listData.makeGoodsId,
+          makeGoodsName: this.listData.makeGoodsName,
+          makeGoodsCode: this.listData.makeGoodsCode,
+        },
+        this.listData.copyMakeGoodsId
+      );
+    },
+    backMakeData(activeObj) {
+      this.$set(this.listData, "makeGoodsId", activeObj.makeGoodsId);
+      this.$set(this.listData, "makeGoodsName", activeObj.makeGoodsName);
+      this.$set(this.listData, "makeGoodsCode", activeObj.makeGoodsCode);
+      this.$bus.$emit("validateMakeId");
+    },
+    clearGoods() {
+      this.$set(this.listData, "makeGoodsId", "");
+      this.$set(this.listData, "makeGoodsName", "");
+      this.$set(this.listData, "makeGoodsCode", "");
+      this.$bus.$emit("validateMakeId");
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 221 - 0
src/views/Marketing/goods/commodityManageMent/edit/makeUpExam/makeCheck.vue

@@ -0,0 +1,221 @@
+<template>
+  <div id="makeCheck">
+    <el-dialog
+      :visible.sync="dialogVisibleTableBoxs"
+      width="1100px"
+      :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="dialogVisibleTableBoxs = false"
+          />
+        </div>
+      </div>
+      <div style="margin-bottom: 10px">
+        <!-- 搜索框 -->
+        <el-input
+          style="width: 230px; margin: 0px 10px"
+          :size="size"
+          v-model="formData['searchKey']"
+          placeholder="请输入商品编码/商品名称"
+        ></el-input>
+        <el-button :size="size" type="primary" @click="getInfos(1)"
+          >查询</el-button
+        >
+        <el-button :size="size" @click="getInfos(0)">重置</el-button>
+      </div>
+      <el-table
+        ref="multipleTable"
+        :data="tableData"
+        border
+        :header-cell-style="{
+          'background-color': '#eee',
+          padding: '8px',
+          color: '#333',
+        }"
+      >
+        <el-table-column label="" width="45" align="center">
+          <template scope="scope">
+            <el-radio
+              :disabled="scope.row.selectStatus === 0"
+              :label="scope.row.goodsId"
+              v-model="activeObj.makeGoodsId"
+              @change.native="getGoodsId(scope.row)"
+              >{{ "" }}</el-radio
+            >
+          </template>
+        </el-table-column>
+        <el-table-column
+          v-for="(item, index) in tableSet"
+          :width="item.width"
+          :key="index"
+          :label="item.label"
+          align="center"
+          :show-overflow-tooltip="true"
+          header-align="center"
+        >
+          <template slot-scope="scope">
+            <span v-if="item.scope === 'status'">{{
+              scope.row[item.prop] === 1 ? "上架" : "未上架"
+            }}</span>
+            <span v-else-if="item.scope === 'status1'">{{
+              scope.row[item.prop] === 1 ? "有效" : "无效"
+            }}</span>
+            <span v-else-if="item.scope === 'times'">
+              {{ $methodsTools.onlyForma(scope.row[item.prop1]) }} -
+              {{ $methodsTools.onlyForma(scope.row[item.prop2]) }}
+            </span>
+            <span v-else>{{ scope.row[item.prop] }}</span></template
+          >
+        </el-table-column>
+      </el-table>
+      <pagination
+        :total="total"
+        :pageSize="formData.pageSize"
+        :currentPage="formData.pageNum"
+        @handleSizeChange="handleSizeChange"
+        @handleCurrentChange="handleCurrentChange"
+      />
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisibleTableBoxs = false">取 消</el-button>
+        <el-button
+          type="primary"
+          :disabled="!activeObj.makeGoodsId"
+          @click="submitTab"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import pagination from "@/components/pagination";
+export default {
+  components: { pagination },
+  data() {
+    return {
+      size: "small",
+      dialogVisibleTableBoxs: false,
+      tableData: [],
+      tableSet: [
+        {
+          label: "商品编码",
+          prop: "code",
+          width: "140px",
+        },
+        {
+          label: "商品名称",
+          prop: "goodsName",
+          width: "260px",
+        },
+        {
+          label: "标准价格(¥)",
+          prop: "standPrice",
+          width: "140px",
+        },
+        {
+          label: "商品状态",
+          prop: "status",
+          scope: "status1",
+          width: "110px",
+        },
+        {
+          label: "商品有效期",
+          prop1: "validityStartTime",
+          prop2: "validityEndTime",
+          scope: "times",
+          width: "310px",
+        },
+        {
+          label: "商品可售状态",
+          prop: "goodsStatus",
+          scope: "status",
+          width: "130px",
+        },
+      ],
+      formData: {},
+      total: 0,
+      activeObj: {
+        makeGoodsId: "",
+        makeGoodsName: "",
+        makeGoodsCode: "",
+      },
+      initId: "", //解决无法选中初始ID问题
+    };
+  },
+  methods: {
+    /**
+     * 选中补考/前培商品
+     */
+    getGoodsId(row) {
+      this.activeObj = {
+        makeGoodsId: row.goodsId,
+        makeGoodsName: row.goodsName,
+        makeGoodsCode: row.code,
+      };
+    },
+    /**
+     * 初始
+     */
+    openBox(obj, active, initId) {
+      this.initId = initId;
+      this.activeObj = JSON.parse(JSON.stringify(active));
+      this.formData = JSON.parse(JSON.stringify(obj));
+      //获取业务层次-课程
+      this.getInfos();
+      this.dialogVisibleTableBoxs = true;
+    },
+    /**
+     * 搜索数据
+     */
+    getInfos(int) {
+      //重置0
+      if (int === 0) {
+        this.formData.pageSize = 10;
+        this.formData.pageNum = 1;
+        delete this.formData.searchKey;
+      }
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      this.$api.inquireGoodslistGoods(this.formData).then((res) => {
+        if (this.initId) {
+          for (let i = 0; i < res.rows.length; i++) {
+            if (res.rows[i].goodsId === this.initId) {
+              res.rows[i].selectStatus = 1;
+            }
+          }
+        }
+        this.tableData = res.rows;
+        this.total = res.total;
+      });
+    },
+    /**
+     * 提交回调数据
+     */
+    submitTab() {
+      this.$message.success("添加成功");
+      this.dialogVisibleTableBoxs = false;
+      this.$emit("backData", this.activeObj);
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.getInfos();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.getInfos();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 9 - 5
src/views/Marketing/goods/commodityManageMent/newAdd/pricePeriod.vue → src/views/Marketing/goods/commodityManageMent/edit/pricePeriod.vue

@@ -6,7 +6,6 @@
           <el-input
             :style="`max-width:${inputWidth}px;`"
             v-model="listData.standPrice"
-            @change="judgestandPrice"
             ><template slot="prepend">¥</template></el-input
           >
         </el-form-item>
@@ -14,7 +13,6 @@
           <el-input
             :style="`max-width:${inputWidth}px;`"
             v-model="listData.lowestPrice"
-            @change="judgelowestPrice"
             ><template slot="prepend">¥</template></el-input
           >
         </el-form-item>
@@ -49,6 +47,7 @@
         </el-form-item>
       </el-col>
       <el-col :span="12">
+        <el-form-item label=" " prop="standPriceJson" label-width="0px">
         <h5 style="margin: 0px">
           商品标准价格明细表:
           <el-button type="text" @click="addPriceInfo">添加</el-button>
@@ -102,6 +101,7 @@
             </template>
           </el-table-column>
         </el-table>
+        </el-form-item>
       </el-col>
     </el-row>
     <!-- 费用类型 -->
@@ -227,9 +227,11 @@ export default {
   },
   computed: { ...mapGetters(["paysupply", "educationType", "paycost"]) },
   methods: {
-    judgestandPrice() {},
-    judgelowestPrice() {},
-    changeDataTime() {},
+    changeDataTime() {
+      if(this.listData.studyTimeArrays && this.listData.studyTimeArrays.length){
+        this.$bus.$emit("againValidate")
+      }
+    },
     openFunc() {
       if (this.$refs.priceDetails) {
         this.$nextTick(() => {
@@ -262,6 +264,7 @@ export default {
         this.listData.standPriceJson.indexOf(row),
         1
       );
+      this.$bus.$emit("checkStandPriceJson");
     },
     /**
      * 价格明细表-总价计算
@@ -335,6 +338,7 @@ export default {
           }
         }
         this.listData.standPriceJson.push(this.priceDetails);
+        this.$bus.$emit("checkStandPriceJson");
       }
       this.dialogVisible = false;
     },

+ 397 - 0
src/views/Marketing/goods/commodityManageMent/edit/productInformation.vue

@@ -0,0 +1,397 @@
+<template>
+  <div id="productInformation">
+    <el-row :gutter="20">
+      <el-col :span="12">
+        <el-form-item label="年份" prop="year">
+          <el-date-picker
+            v-model="listData.year"
+            type="year"
+            value-format="yyyy"
+            placeholder="请选择年份"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="供应方(服务)" prop="supplyId" :key="13">
+          <el-select
+            v-model="listData.supplyId"
+            placeholder="请选择供应方(服务)"
+          >
+            <el-option
+              v-for="(item, index) in paysupply"
+              :key="index"
+              :label="`${item.supplyName}(${item.serveName})`"
+              :value="item.supplyId"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="商品类型" prop="goodsType">
+          <el-select
+            v-model="listData.goodsType"
+            placeholder="请选择商品类型"
+            @change="changeTypes"
+            disabled
+          >
+            <el-option
+              v-for="(item, index) in goodsTypeOptions"
+              :key="index"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="教育类型" prop="educationTypeId">
+          <el-select
+            v-model="listData.educationTypeId"
+            placeholder="请选择教育类型"
+            disabled
+          >
+            <el-option
+              v-for="(item, index) in educationType"
+              :key="index"
+              :label="item.educationName"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item
+          label="业务层次"
+          prop="businessId"
+          v-if="listData.educationTypeId"
+        >
+          <el-select
+            v-model="listData.businessId"
+            disabled
+            placeholder="请选择业务层次"
+          >
+            <el-option
+              v-for="(item, index) in newCourTypeOptions"
+              :key="index"
+              :label="item.projectName + '-' + item.businessName"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="院校" prop="schoolId" v-if="listData.businessId" :key="14">
+          <el-select v-model="listData.schoolId" placeholder="请选择院校">
+            <el-option
+              v-for="(item, index) in newSchoolOption"
+              :key="index"
+              :label="item.schoolName"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="专业" prop="majorId" v-if="listData.businessId" :key="15">
+          <el-select v-model="listData.majorId" placeholder="请选择专业">
+            <el-option
+              v-for="(item, index) in newMajorOption"
+              :key="index"
+              :label="item.categoryName"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="科目" prop="subjectIds" v-if="listData.businessId">
+          <el-select
+            v-model="listData.subjectIds"
+            placeholder="请选择科目"
+            multiple
+            collapse-tags
+            :disabled="submitStatusInfo"
+            @change="clearList"
+          >
+            <el-option
+              v-for="(item, index) in newSubjectOption"
+              :key="index"
+              :label="item.subjectName"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="商品名称" prop="goodsName">
+          <el-input
+            :style="`max-width: ${inputWidth}px`"
+            v-model="listData.goodsName"
+          ></el-input>
+        </el-form-item>
+        <el-form-item
+          :key="listData.goodsType ? listData.goodsType : 10"
+          label="学时"
+          prop="classHours"
+        >
+         <el-input-number
+            :controls="false"
+            :style="`max-width: ${inputWidth}px`"
+            v-model="listData.classHours"
+            :precision="2"
+            :min="0"
+          ></el-input-number> </el-form-item
+      ></el-col>
+      <el-col :span="12">
+        <el-form-item label="商品封面" prop="coverUrl">
+          <div class="goodsImage_Style">
+            <div class="imageStyBox" v-if="!listData.coverUrl">
+              <label for="uplose">
+                <i class="el-icon-circle-plus-outline iconStsz"></i
+              ></label>
+              <input
+                ref="file"
+                type="file"
+                style="display: none"
+                id="uplose"
+                @change="getImgFile"
+              />
+            </div>
+            <el-image
+              v-else
+              class="imageStyBoxShow"
+              :src="$methodsTools.splitImgHost(listData.coverUrl)"
+              :preview-src-list="[
+                $methodsTools.splitImgHost(listData.coverUrl),
+              ]"
+            >
+            </el-image>
+            <div class="labelMsg">
+              注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型
+            </div>
+          </div>
+          <el-button
+            v-if="listData.coverUrl"
+            type="danger"
+            size="mini"
+            class="margin-top: 20px;"
+            @click="clearImgs"
+            >删除</el-button
+          >
+        </el-form-item>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+export default {
+  props: ["listData", "submitStatusInfo"],
+  data() {
+    return {
+      goodsTypeOptions: [
+        {
+          label: "视频",
+          value: 1,
+        },
+        {
+          label: "题库",
+          value: 2,
+        },
+        {
+          label: "补考",
+          value: 3,
+        },
+        {
+          label: "前培",
+          value: 4,
+        },
+        {
+          label: "直播",
+          value: 6,
+        },
+      ], //商品类型
+      newCourTypeOptions: [], //业务层次
+      newSchoolOption: [], //院校
+      newMajorOption: [], //专业
+      newSubjectOption: [], //科目
+      inputWidth: 217,
+    };
+  },
+  watch: {
+    /**
+     * 教育类型切换
+     */
+    "listData.educationTypeId"(val) {
+      // this.$set(this.listData, "businessId", "");
+      if (val) {
+        this.getBusinessList(val);
+      }
+    },
+    /**
+     * 业务层次切换
+     */
+    "listData.businessId"(val) {
+      // this.$set(this.listData, "schoolId", "");
+      // this.$set(this.listData, "majorId", "");
+      // this.$set(this.listData, "handoutsId", "");
+      // this.$bus.$emit("sendBybus");
+      // this.$bus.$emit("sendBybusBank");
+      if (val) {
+        // this.$bus.$emit("clearValidateFunc");
+        this.getInitBabelList(val);
+         if (this.listData.goodsType === 1) {
+          this.$bus.$emit("getCheckRequired", val);
+        } else {
+          this.$bus.$emit("getCheckQuitRequired", val);
+        }
+      }
+    },
+  },
+  computed: { ...mapGetters(["paysupply", "educationType"]) },
+  methods: {
+    /**
+     *科目切换清楚列表
+     */
+    clearList() {
+      this.$bus.$emit("sendBybus");
+      this.$bus.$emit("sendBybusBank");
+    },
+    /**
+     * 商品类型切换
+     */
+    changeTypes(val) {
+      // this.$set(this.listData, "examNumber", 0); //考试次数
+      // this.$set(this.listData, "doNumber", 0); //刷题次数
+      // this.$set(this.listData, "studyCount", 1); //学习次数
+      // this.$set(this.listData, "handoutsId", ""); //讲义ID
+      // this.$set(this.listData, "serviceTimeType", ""); //学习服务期类型
+      // this.$set(this.listData, "serviceTimeNum", ""); //学习服务期年月日
+      // this.$set(this.listData, "studyTimeArrays", []); //学习服务期具体时间
+      // this.$set(this.listData, "makeGoodsId", ""); //补考/前培参数
+      // this.$set(this.listData, "makeGoodsName", ""); //补考/前培参数
+      // this.$set(this.listData, "makeGoodsCode", ""); //补考/前培参数
+      // this.$set(this.listData, "timeArrays", [
+      //   new Date().getTime(),
+      //   new Date().getTime() + 365 * 1 * 24 * 3600 * 1000,
+      // ]); //商品有效期
+      // if (this.listData.goodsType == 2) {
+      //   this.$set(
+      //     this.listData,
+      //     "coverUrl",
+      //     "oss/images/file/20220518/1652864709142.png"
+      //   );
+      // } else {
+      //   this.$set(
+      //     this.listData,
+      //     "coverUrl",
+      //     "oss/images/avatar/20211013/1634097664410_1397766697"
+      //   );
+      // } //封面
+      // if (val === 1) {
+      //   this.$bus.$emit("sendBybus");
+      // }
+      // if (val === 2) {
+      //   this.$bus.$emit("sendBybusBank");
+      // }
+      // this.$bus.$emit("clearValidateFunc");
+    },
+    /**
+     * 根据条件获取业务层次列表
+     */
+    getBusinessList(val) {
+      this.$api
+        .inquirebusinessList({ status: 1, educationId: val })
+        .then((res) => {
+          this.newCourTypeOptions = res.rows;
+        });
+    },
+    /**
+     * 根据条件获取院校、专业列表
+     */
+    getInitBabelList(val) {
+      /**
+       * 院校
+       */
+      this.$api
+        .inquireUserSchool({ status: 1, businessId: val })
+        .then((res) => {
+          this.newSchoolOption = res.rows;
+        });
+      /**
+       * 专业
+       */
+      this.$api
+        .inquireCourseMajor({ status: 1, businessId: val })
+        .then((res) => {
+          this.newMajorOption = res.rows;
+        });
+      /**
+       * 科目
+       */
+      this.$api
+        .inquireCourseSubject({ status: 1, businessId: val })
+        .then((res) => {
+          this.newSubjectOption = res.rows;
+        });
+    },
+    /**
+     * 上传商品封面
+     */
+    getImgFile(e) {
+      var self = this;
+      var file = e.target.files[0];
+      if (file === undefined) {
+        self.$set(self.listData, "coverUrl", "");
+        return;
+      }
+      var type = e.target.value.toLowerCase().split(".").splice(-1);
+      let typeList = ["jpg", "png", "jpeg", "gif"];
+      if (!typeList.includes(type[0])) {
+        self.$message.error("上传格式需为:.jpg/.png/.jpeg/gif");
+        e.target.value = "";
+        return;
+      }
+      if (file.size > 0.3 * 1024 * 1024) {
+        self.$message.error("图片不得大于300kb");
+        return;
+      }
+      this.$upload.upload(file, 2).then((res) => {
+        self.$set(self.listData, "coverUrl", res);
+        self.$bus.$emit("validateCoverUrl");
+      });
+    },
+    /**
+     * 删除商品封面
+     */
+    clearImgs() {
+      this.$set(this.listData, "coverUrl", "");
+      this.$bus.$emit("validateCoverUrl");
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.goodsImage_Style {
+  display: flex;
+}
+.imageStyBox {
+  width: 300px;
+  height: 150px;
+  border: 2px dashed #999;
+  border-radius: 28px;
+  line-height: 150px;
+  text-align: center;
+  flex-shrink: 0;
+  margin-right: 10px;
+}
+.imageStyBoxShow {
+  width: 300px;
+  height: 150px;
+  flex-shrink: 0;
+  margin-right: 10px;
+}
+.iconStsz {
+  font-size: 40px;
+  color: #67c23a;
+  cursor: pointer;
+}
+.labelMsg {
+  color: #999;
+  font-size: 13px;
+}
+</style>

+ 13 - 11
src/views/Marketing/goods/commodityManageMent/index.vue

@@ -16,11 +16,6 @@
       :loading="loading"
       @editInfo="editInfo"
     >
-      <template slot="customize">
-        <el-button type="primary" @click="refactor"
-          >重构商品(开发中)</el-button
-        >
-      </template>
       <template slot="btn" slot-scope="props">
         <el-button type="text" @click="addClick(props.scope.row, 0)"
           >修改</el-button
@@ -59,6 +54,7 @@ export default {
         border: true,
         choice: true,
         addHide: false,
+        changeWidth:"180px",
         backFatherBtn: {
           status: false,
           title: "未定义",
@@ -90,6 +86,12 @@ export default {
           scope: "Professional",
           edu: "educationTypeId",
         },
+        {
+          prop: "subjectId",
+          placeholder: "科目",
+          scope: "sujectType",
+          edu: "educationTypeId",
+        },
         {
           prop: "status",
           placeholder: "商品状态",
@@ -178,13 +180,18 @@ export default {
         {
           label: "专业",
           prop: "categoryName",
-          hidden: false,
+          hidden: true,
         },
         {
           label: "院校",
           prop: "schoolName",
           hidden: false,
         },
+        {
+          label:"科目",
+          prop:"subjectNames",
+          hidden:true
+        },
         {
           label: "业务层次",
           prop1: "projectName",
@@ -272,11 +279,6 @@ export default {
     this.search();
   },
   methods: {
-    refactor() {
-      this.$router.push({
-        path: "commodityManageMentNewAdd",
-      });
-    },
     editInfo(v) {
       this.addClick(v, 0);
     },

+ 0 - 244
src/views/Marketing/goods/commodityManageMent/newAdd/index.vue

@@ -1,244 +0,0 @@
-<template>
-  <div id="newAdd">
-    <el-form
-      label-position="right"
-      label-width="120px"
-      :model="listData"
-      :rules="rules"
-      ref="listData"
-    >
-      <h5>商品信息</h5>
-      <div class="boxBorderStyle">
-        <h5 class="segmentationStyle">基本信息</h5>
-        <product-information ref="productInformation" :listData="listData" />
-        <h5 class="segmentationStyle">商品价格和有效期</h5>
-        <price-period ref="pricePeriod" :listData="listData" />
-        <h5 class="segmentationStyle">课程内容</h5>
-        <course-content ref="courseContent" :listData="listData" />
-      </div>
-      <el-button @click="submitForm('listData')">提交</el-button>
-    </el-form>
-  </div>
-</template>
-
-<script>
-import productInformation from "./productInformation.vue";
-import pricePeriod from "./pricePeriod.vue";
-import courseContent from "./courseContent/index.vue";
-export default {
-  components: {
-    productInformation,
-    pricePeriod,
-    courseContent,
-  },
-  data() {
-    var validatorstandPrice = (rule, value, callback) => {
-      var reg = /(^[1-9]\d*(\.\d{1,2})?$)|(^0(\.\d{1,2})?$)/;
-      if (!reg.test(value)) {
-        return callback(new Error("请输入不超过两位小数点的价格数值"));
-      } else {
-        this.$refs["listData"].validateField("lowestPrice");
-        callback();
-      }
-    };
-    var validatorlowestPrice = (rule, value, callback) => {
-      console.log(this.listData);
-      var reg = /(^[1-9]\d*(\.\d{1,2})?$)|(^0(\.\d{1,2})?$)/;
-      if (!reg.test(value)) {
-        return callback(new Error("请输入不超过两位小数点的价格数值"));
-      } else if (
-        this.listData.standPrice &&
-        parseFloat(value) > parseFloat(this.listData.standPrice)
-      ) {
-        return callback(new Error("价格不得高于商品标准价格"));
-      } else {
-        callback();
-      }
-    };
-    return {
-      listData: {
-        coverUrl: "oss/images/avatar/20211013/1634097664410_1397766697",
-      },
-      rules: {
-        goodsType: [
-          {
-            required: true,
-            message: "请选择商品类型",
-            trigger: ["blur", "change"],
-          },
-        ],
-        goodsName: [
-          {
-            required: true,
-            message: "请输入商品名称",
-            trigger: "change",
-          },
-        ],
-        educationTypeId: [
-          {
-            required: true,
-            message: "请选择教育类型",
-            trigger: ["blur", "change"],
-          },
-        ],
-        businessId: [
-          {
-            required: true,
-            message: "请选择业务层次",
-            trigger: ["blur", "change"],
-          },
-        ],
-        subjectId: [
-          {
-            required: true,
-            message: "请选择科目",
-            trigger: ["blur", "change"],
-          },
-        ],
-        classHours: [
-          { required: true, message: "请输入学时", trigger: "blur" },
-        ],
-        timeArrays: [
-          {
-            required: true,
-            message: "请选择有效期",
-            trigger: ["blur", "change"],
-          },
-        ],
-        status: [
-          {
-            required: true,
-            message: "请选择状态",
-            trigger: ["blur", "change"],
-          },
-        ],
-        standPrice: [
-          { required: true, message: "请输入标准价格", trigger: "blur" },
-          { validator: validatorstandPrice, trigger: "blur" },
-        ],
-        lowestPrice: [
-          { required: true, message: "请输入最低价格", trigger: "blur" },
-          { validator: validatorlowestPrice, trigger: "blur" },
-        ],
-      },
-    };
-  },
-  methods: {
-    submitForm(formName) {
-      this.$refs[formName].validate((valid) => {
-        if (valid) {
-          alert("submit!");
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.boxBorderStyle {
-  margin: 10px 0px;
-  border: 1px solid #a4a4a4;
-  border-top: 2px solid rgb(179, 204, 255);
-  padding: 20px 40px;
-}
-.segmentationStyle {
-  border-bottom: 1px dashed #a4a4a4;
-  color: #a4a4a4;
-  padding: 4px 0px;
-  margin-bottom: 20px;
-}
-
-/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>

+ 1 - 1
src/views/Marketing/goods/commodityManageMent/poppleSet.vue

@@ -34,7 +34,7 @@
       >
         <span class="custom-tree-node" slot-scope="{ node }">
           <span>{{ node.label }}</span>
-          <span v-if="node.checked"
+          <span v-if="node.checked && node.data.sectionType !== 2"
             >试听前
             <el-time-picker
               style="width: 140px"

+ 270 - 0
src/views/Marketing/goods/commodityManageMent/poppleSetTKCOPY.vue

@@ -0,0 +1,270 @@
+<template>
+  <div id="poppleSetTKCOPY">
+    <el-dialog
+      :visible.sync="dialogVisible"
+      width="60%"
+      @open="openExpand"
+      :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 style="text-align: end">
+        <el-button type="text" @click="inits">重置</el-button>
+      </div>
+      <el-tree
+        ref="trees"
+        :data="datas"
+        :props="layoutTreeProps"
+        :load="loadNode"
+        lazy
+        :default-checked-keys="audition"
+        :show-checkbox="true"
+        :check-strictly="true"
+        @check-change="getCheckedKeys"
+        node-key="TypeId"
+      >
+        <span class="custom-tree-node" slot-scope="{ node }">
+          <span>{{ node.label }}</span>
+          <span v-if="node.checked"
+            >试做前
+            <el-input-number
+              v-model="node.data.num"
+              controls-position="right"
+              :min="0"
+              :precision="0"
+              :controls="false"
+              size="mini"
+              style="width: 80px"
+              :max="node.data.questionNum"
+              @blur="changeNum(node.data)"
+            ></el-input-number
+            >道题</span
+          >
+        </span>
+      </el-tree>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitTable">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  props: ["tableData", "examConfigList"],
+  data() {
+    return {
+      copyData: [],
+      datas: [],
+      audition: [],
+      examConfigListCope: [],
+      dialogVisible: false,
+      layoutTreeProps: {
+        label(data, node) {
+          return data.name || data.menuName;
+        },
+        isLeaf(data, node) {
+          return !data.hasChildren;
+        },
+      },
+    };
+  },
+  methods: {
+    changeNum(v) {
+      if (v.num === 0) {
+        this.$message.warning("当前试卷总题数为0");
+      }
+    },
+    inits() {
+      this.datas = JSON.parse(JSON.stringify(this.copyData));
+    },
+    openExpand() {
+      if (this.examConfigList) {
+        this.examConfigListCope = JSON.parse(
+          JSON.stringify(this.examConfigList)
+        );
+        var arrays = this.examConfigList.map((item) => {
+          return item.TypeId
+        });
+        this.$nextTick(() => {
+          this.audition = arrays;
+        });
+      }
+      this.$nextTick(() => {
+        this.inits();
+      });
+    },
+    getCheckedKeys(item, node) {
+      if (item.TypeId.split("-")[0] != "3") {
+        return;
+      }
+      if (node && this.audition.indexOf(item.TypeId) == -1) {
+        this.audition.push(item.TypeId);
+      }
+      if (!node && this.audition.indexOf(item.TypeId) !== -1) {
+        this.audition.splice(this.audition.indexOf(item.TypeId), 1);
+      }
+      if (node) {
+        var sta = this.examConfigListCope.some((items) => {
+          return items.TypeId == item.TypeId;
+        });
+        if (!sta) {
+          this.examConfigListCope.push({
+            TypeId: item.TypeId,
+            num: item.num,
+            chapterExamId: item.chapterExamId || undefined,
+            moduleExamId: item.moduleExamId || undefined,
+            examId: item.examId,
+          });
+        }
+      } else {
+        this.examConfigListCope.map((items, indexs) => {
+          if (items.TypeId == item.TypeId) {
+            this.examConfigListCope.splice(indexs, 1);
+          }
+        });
+      }
+    },
+    submitTable() {
+      if (!this.examConfigListCope.length) {
+        this.$message.warning("请勾选至少一张试卷的试做内容");
+        return;
+      }
+      var arrays = this.$refs.trees.getCheckedNodes();
+      for (let i = 0; i < arrays.length; i++) {
+        for (let j = 0; j < this.examConfigListCope.length; j++) {
+          if (arrays[i].TypeId === this.examConfigListCope[j].TypeId) {
+            this.examConfigListCope[j].num = arrays[i].num;
+          }
+          if (this.examConfigListCope[j].num === 0) {
+            this.$message.warning("不允许设置试做数为0,请重新输入");
+            return;
+          }
+        }
+      }
+      // var list = this.$refs.trees.getCheckedNodes();
+      // this.examConfigListCope.map((item) => {
+      //   if (!item.num) {
+      //     list.map((items) => {
+      //       if (items.TypeId == item.TypeId) {
+      //         item.num = items.num;
+      //       }
+      //     });
+      //   }
+      // });
+      this.$emit("uploadArrays", this.examConfigListCope);
+      this.dialogVisible = false;
+    },
+    loadNode(node, resolve) {
+      var self = this;
+      if (node.level === 0) {
+        this.tableData.map((item) => {
+          if (item.type === 1) {
+            item.TypeId = item.type + "-" + item.moduleExamId;
+          }
+          if (item.type === 2) {
+            item.TypeId = item.type + "-" + item.chapterExamId;
+          }
+          if (item.type === 3) {
+            item.TypeId = item.type + "-" + item.examId;
+            item.num = item.questionNum;
+            if (self.examConfigList) {
+              self.examConfigList.map((items) => {
+                if (items.TypeId === item.TypeId) {
+                  item.num = items.num;
+                }
+              });
+            }
+          }
+          if (item.type === 3) {
+            item.disabled = false;
+            item.hasChildren = false;
+          } else {
+            item.disabled = true;
+            item.hasChildren = true;
+          }
+        });
+        this.copyData = JSON.parse(JSON.stringify(this.tableData));
+        return resolve(this.tableData);
+      } else {
+        if (node.data.type === 1) {
+          this.$api
+            .inquireBankchapterModule({ moduleExamId: node.data.moduleExamId })
+            .then((res) => {
+              res.data.map((item) => {
+                item.TypeId =
+                  "2" + "-" + node.data.moduleExamId + "-" + item.chapterExamId;
+                item.moduleExamId = node.data.moduleExamId;
+                item.hasChildren = true;
+                item.disabled = true;
+                item.type = 2;
+              });
+              return resolve(res.data);
+            });
+        } else if (node.data.type === 2) {
+          this.$api
+            .inquirebankchapterexamList({
+              chapterExamId: node.data.chapterExamId,
+            })
+            .then((res) => {
+              res.data.map((item) => {
+                if (node.data.moduleExamId) {
+                  item.TypeId =
+                    "3" +
+                    "-" +
+                    node.data.moduleExamId +
+                    "-" +
+                    node.data.chapterExamId +
+                    "-" +
+                    item.examId;
+                } else {
+                  item.TypeId =
+                    "3" + "-" + node.data.chapterExamId + "-" + item.examId;
+                }
+                item.name = item.examName;
+                item.num = item.questionNum;
+                item.moduleExamId = node.data.moduleExamId;
+                item.chapterExamId = node.data.chapterExamId;
+                if (self.examConfigList) {
+                  self.examConfigList.map((items) => {
+                    if (items.TypeId === item.TypeId) {
+                      item.num = items.num;
+                    }
+                  });
+                }
+                item.hasChildren = false;
+              });
+              return resolve(res.data);
+            });
+        } else if (node.data.type === 3) {
+          return resolve([]);
+        }
+      }
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+/deep/.el-tree-node__content {
+  height: 35px;
+}
+.custom-tree-node {
+  flex: 1;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  font-size: 14px;
+  padding-right: 8px;
+}
+</style>

+ 238 - 0
src/views/Marketing/goods/fieldTemplate/index.vue

@@ -0,0 +1,238 @@
+<template>
+  <div id="fieldTemplate">
+    <table-list
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      :loading="loading"
+    >
+      <template slot="customize">
+        <el-select
+          v-model="formData['educationId']"
+          placeholder="请选择教育类型"
+          size="medium"
+          @change="search(1, $event)"
+        >
+          <el-option
+            v-for="(items, indexs) in educationType"
+            :key="indexs"
+            :label="items.educationName"
+            :value="items.id"
+          ></el-option>
+        </el-select>
+      </template>
+      <template slot="btn" slot-scope="props">
+        <el-button type="text" @click="getInter(props.scope.row)"
+          >配置</el-button
+        >
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="formData.pageSize"
+      :currentPage="formData.pageNum"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+    <tem-plate-pop ref="temPlatePop" @backData="backData" />
+  </div>
+</template>
+
+<script>
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
+import temPlatePop from "./temPlatePop.vue";
+import { mapGetters } from "vuex";
+export default {
+  name: "LearningAccoutTags",
+  components: { tableList, pagination, temPlatePop },
+  data() {
+    return {
+      disabledBtn: false,
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "字段模板",
+        index: 0,
+        ch: "条",
+        num: true,
+        choice: true,
+        addHide: true,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      // 表单
+      tableSet: [
+        {
+          label: "业务层次",
+          prop1: "projectName",
+          prop2: "businessName",
+          scope: "InfoMore",
+          hidden: true,
+        },
+      ],
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+      formData: {
+        educationId: "",
+        pageSize: 10, //每页多少条数据
+        pageNum: 1, //当前页码
+        status: 1,
+      },
+      // 弹窗字段
+    };
+  },
+  watch: {
+    educationType(val) {
+      if (val.length > 0) {
+        this.formData.educationId = val[0].id;
+        this.search();
+      }
+    },
+  },
+  computed: { ...mapGetters(["educationType"]) },
+  mounted() {
+    if (
+      !this.formData.educationId &&
+      this.educationType &&
+      this.educationType.length
+    ) {
+      this.formData.educationId = this.educationType[0].id;
+    }
+    if (this.formData.educationId) {
+      this.search();
+    }
+  },
+  methods: {
+    backData(data) {
+      this.search()
+    },
+    getInter(row) {
+      this.$refs.temPlatePop.openBox(row.id);
+    },
+    search(int, v) {
+      this.loading = true;
+      if (int === 1) {
+        this.formData.pageNum = 1;
+        this.formData.educationId = v;
+      }
+      this.$api
+        .inquirebusinessList(this.formData)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+          this.navText.index = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.search();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+/deep/.el-button {
+  border-radius: 8px;
+}
+/deep/.el-dialog {
+  border-radius: 8px;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+.imgBox {
+  width: 100%;
+  // height: 210px;
+  border: 1px solid #e2e2e2;
+  border-radius: 8px;
+  padding: 8px 8px 3px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  .imgLabel {
+    flex: 1;
+    width: 100%;
+    border: 1px dotted #e2e2e2;
+    color: #999;
+    font-size: 14px;
+    cursor: pointer;
+    border-radius: 8px;
+    .msPhoto {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      max-width: 100%;
+      max-height: 270px;
+      img {
+        max-width: 100%;
+        max-height: 270px;
+      }
+    }
+    .imgbbx {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      width: 100%;
+      height: 100%;
+      i {
+        font-weight: bold;
+        margin: 14px 0;
+        font-size: 24px;
+      }
+    }
+  }
+  p {
+    margin: 5px 0px;
+  }
+}
+.numInputs {
+  width: 150px;
+}
+</style>
+

+ 177 - 0
src/views/Marketing/goods/fieldTemplate/temPlatePop.vue

@@ -0,0 +1,177 @@
+<template>
+  <div id="temPlatePop">
+    <el-dialog
+      :visible.sync="diaBox"
+      width="900px"
+      :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="diaBox = false"
+          />
+        </div>
+      </div>
+      <el-row :gutter="10" style="margin-bottom: 14px">
+        <el-col :span="8">商品信息:</el-col>
+        <el-col
+          :span="8"
+          style="color: transparent !important; user-select: none"
+          >2</el-col
+        >
+        <el-col :span="8">商品包装介绍:</el-col>
+      </el-row>
+      <div class="boxStyle">
+        <div class="colStyle">
+          <div v-for="(item, index) in arr1" :key="index">
+            <el-checkbox
+              style="margin-right: 6px"
+              v-model="item.status"
+              :disabled="item.disabled == 1"
+              :true-label="1"
+              :false-label="0"
+              ><span
+                style="color: transparent !important; user-select: none"
+              ></span
+            ></el-checkbox>
+            <span>{{ item.fieldName }}</span>
+            <el-checkbox
+              style="float: right"
+              v-model="item.require"
+              :true-label="1"
+              :false-label="0"
+              >必填</el-checkbox
+            >
+          </div>
+        </div>
+        <div class="colStyle">
+          <div v-for="(item, index) in arr2" :key="index">
+            <el-checkbox
+              style="margin-right: 6px"
+              v-model="item.status"
+              :disabled="item.disabled == 1"
+              :true-label="1"
+              :false-label="0"
+              ><span
+                style="color: transparent !important; user-select: none"
+              ></span
+            ></el-checkbox>
+            <span>{{ item.fieldName }}</span>
+            <el-checkbox
+              style="float: right"
+              v-model="item.require"
+              :true-label="1"
+              :false-label="0"
+              >必填</el-checkbox
+            >
+          </div>
+        </div>
+        <div class="colStyle">
+          <div v-for="(item, index) in arr3" :key="index">
+            <el-checkbox
+              style="margin-right: 6px"
+              v-model="item.status"
+              :disabled="item.disabled == 1"
+              :true-label="1"
+              :false-label="0"
+              ><span
+                style="color: transparent !important; user-select: none"
+              ></span
+            ></el-checkbox>
+            <span>{{ item.fieldName }}</span>
+            <el-checkbox
+              style="float: right"
+              v-model="item.require"
+              :true-label="1"
+              :false-label="0"
+              >必填</el-checkbox
+            >
+          </div>
+        </div>
+      </div>
+
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="diaBox = false">取 消</el-button>
+        <el-button type="primary" @click="submitEveryDayStyleNumData"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      diaBox: false,
+      everyDaystyleNum: "",
+      arr1: [],
+      arr2: [],
+      arr3: [],
+      id: "",
+    };
+  },
+  methods: {
+    openBox(id) {
+      this.id = id;
+      this.arr1 = [];
+      this.arr2 = [];
+      this.arr3 = [];
+      this.$api.obtainbusiness(id).then((res) => {
+        let arr = JSON.parse(res.data.goodsFieldJson);
+        for (let i = 0; i < arr.length; i++) {
+          if (i <= 10) {
+            this.arr1.push(arr[i]);
+          } else if (i > 10 && i <= 21) {
+            this.arr2.push(arr[i]);
+          } else {
+            this.arr3.push(arr[i]);
+          }
+        }
+        this.diaBox = true;
+      });
+    },
+    submitEveryDayStyleNumData() {
+      let json = [...this.arr1, ...this.arr2, ...this.arr3];
+      this.$api
+        .editCourseBusiness({
+          goodsFieldJson: JSON.stringify(json),
+          id: this.id,
+        })
+        .then((res) => {
+          this.$emit("backData", "");
+          this.$message.success("修改成功");
+          this.diaBox = false;
+        });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.boxStyle {
+  display: flex;
+  justify-content: space-between;
+}
+.colStyle {
+  flex: 1;
+  flex-shrink: 0;
+  background-color: #eee;
+  padding: 10px 20px;
+  margin-right: 10px;
+  & > :last-of-type {
+    margin-right: 0px;
+  }
+  > div {
+    margin-bottom: 6px;
+    > span {
+      user-select: none;
+    }
+  }
+}
+</style>

+ 32 - 2
src/views/Marketing/order/offlineOrder/index.vue

@@ -172,6 +172,36 @@ export default {
     };
   },
   mounted() {
+    if (
+      this.$route.params.educationId &&
+      this.$route.params.businessId &&
+      this.$route.params.goodsType
+    ) {
+      this.$set(
+        this.formData,
+        "educationTypeId",
+        this.$route.params.educationId
+      );
+      this.$set(this.formData, "businessId", this.$route.params.businessId);
+      this.$set(this.formData, "goodsType", this.$route.params.goodsType);
+      this.$refs.searchBox.changeEducationType(
+        this.$route.params.educationId,
+        true
+      );
+      this.$refs.searchBox.changeBusinessLevel(this.$route.params.businessId);
+    }
+    if (this.$route.params.timeType >= 0) {
+      this.$set(
+        this.formData,
+        "startTime",
+        this.$methodsTools.timestampConvert(this.$route.params.timeType)[0]
+      );
+      this.$set(
+        this.formData,
+        "endTime",
+        this.$methodsTools.timestampConvert(this.$route.params.timeType)[1]
+      );
+    }
     this.search();
   },
   activated() {
@@ -225,10 +255,10 @@ export default {
       }
       var data = JSON.parse(JSON.stringify(this.formData));
       if (this.formData.startTime) {
-        data.startTime = data.startTime / 1000;
+        data.startTime = parseInt(data.startTime / 1000);
       }
       if (this.formData.endTime) {
-        data.endTime = data.endTime / 1000;
+        data.endTime = parseInt(data.endTime / 1000);
       }
       this.$api
         .inquireorderinputList(data)

+ 182 - 0
src/views/Marketing/order/offlineOrder/orderChargeInfo/goodsDocument/closeStatusPop.vue

@@ -0,0 +1,182 @@
+<template>
+  <div id="closeStatusPop">
+    <el-dialog
+      :close-on-press-escape="false"
+      :visible.sync="dialog"
+      width="780px"
+      :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 class="fontSty">
+          特别说明: <br />1.订单关闭后,作废处理,不可以再次启用。<br />
+          2.订单关闭后,学员在个人中心,“我的订单/我的网课/我的题库通”中,不再显示该商品订单相关的内容。<br />
+          3.视频类型商品:<br />
+          (1)关闭订单后,该学员订单不再占用所在的所有班级名额,释放名额;<br />
+          (2)关闭订单后,该学员订单所在的所有班级,不会将该学员从班级移除,依旧保留该学员产生的学习学时数据;<br />
+          (3)关闭订单后,学员可再次购买,但是不能再进入【第(2)点中提及的有保留学习学时数据的班级】<br />
+          4.题库类型商品: <br />(1)关闭订单后,产生的做题数据保留<br />
+          (2)关闭订单后,不作为【重复购买】的约束条件,学员可再次购买。<br />
+          5.补考/前培商品:<br />
+          (1)关闭订单后,补考次数/前培次数,同步清除。
+        </div>
+        <p>
+          当您仔细阅读上面的说明后,依旧坚持关闭该商品订单,所产生的后果,由操作者承担。<br />
+          再次提醒,请慎重操作。
+        </p>
+        <p>关闭原因</p>
+        <el-input
+          type="textarea"
+          v-model="reason"
+          :rows="4"
+          placeholder="请输入关闭原因"
+        ></el-input>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="close">再想一想</el-button>
+        <el-button @click="submit" type="primary">确认,关闭订单</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      dialog: false,
+      reason: "",
+    };
+  },
+  methods: {
+    openBoxs() {
+      this.reason = "";
+      this.dialog = true;
+    },
+    close() {
+      this.dialog = false;
+      this.$emit("backData", 0);
+    },
+    submit() {
+      this.$emit("backData", this.reason);
+      this.dialog = false;
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.fontSty {
+  color: red;
+  line-height: 30px;
+  background-color: #eee;
+  padding: 6px;
+}
+/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__body {
+    padding: 20px;
+  }
+  .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;
+    }
+  }
+}
+
+.swq {
+  text-align: center;
+  border-bottom: 1px solid #eee;
+}
+.dowmStys {
+  color: blue;
+  cursor: pointer;
+}
+.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>

+ 54 - 1
src/views/Marketing/order/offlineOrder/orderChargeInfo/goodsDocument/goodsInfos.vue

@@ -212,6 +212,22 @@
           <el-radio :label="2">已退款</el-radio>
         </el-radio-group>
       </el-form-item>
+      <el-form-item
+        label="关闭订单"
+        v-if="listData.orderGoodsStatus === 1 && listData.refundStatus === 0"
+      >
+        <el-radio-group
+          v-model="listData.status"
+          :disabled="copyStatus === 0"
+          @change="changeStauts"
+        >
+          <el-radio :label="0">是</el-radio>
+          <el-radio :label="1">否</el-radio>
+        </el-radio-group>
+      </el-form-item>
+      <el-form-item label="关闭原因" v-if="listData.closeReason">
+        <span>{{ listData.closeReason }}</span>
+      </el-form-item>
       <el-form-item label="订单备注" prop="remark">
         <el-input
           type="textarea"
@@ -223,13 +239,16 @@
         <el-button size="mini" type="primary" @click="submit">保存</el-button>
       </div>
     </el-form>
+    <close-status-pop ref="closeStatusPop" @backData="backData" />
   </div>
 </template>
 
 
 <script>
 import { mapGetters } from "vuex";
+import closeStatusPop from "./closeStatusPop.vue";
 export default {
+  components: { closeStatusPop },
   props: ["goodsId", "orderSn"],
   data() {
     return {
@@ -383,6 +402,7 @@ export default {
           prop: "createBy",
         },
       ],
+      copyStatus: "", //拷贝订单状态
     };
   },
   computed: { ...mapGetters(["paysource", "payvisit"]) },
@@ -395,11 +415,43 @@ export default {
     this.search();
   },
   methods: {
-    submit() {
+    /**
+     * 关闭订单触发弹窗
+     */
+    changeStauts(int) {
+      if (int === 1) {
+        this.$set(this.listData, "closeReason", null);
+      } else {
+        this.$refs.closeStatusPop.openBoxs();
+      }
+    },
+    backData(int) {
+      if (int === 0) {
+        this.listData.status = 1;
+      } else {
+        this.$set(this.listData, "closeReason", int);
+      }
+    },
+    async submit() {
+      if (this.copyStatus === 1 && this.listData.status === 0) {
+        await this.editOrderStatus();
+      }
       var data = JSON.parse(JSON.stringify(this.listData));
       data.goodsInputData = JSON.parse(data.goodsInputData);
+      delete data.status;
+      delete data.closeReason;
       this.$api.editordergoods(data).then((res) => {
         this.$message.success("保存成功");
+        this.search();
+      });
+    },
+    editOrderStatus() {
+      return new Promise((resolve, reject) => {
+        var data = JSON.parse(JSON.stringify(this.listData));
+        data.goodsInputData = JSON.parse(data.goodsInputData);
+        this.$api.closeOrderGoodsordergoods(data).then((res) => {
+          resolve();
+        });
       });
     },
     backPage() {
@@ -432,6 +484,7 @@ export default {
             this.$methodsTools.time10to13(res.data.serviceStartTime, 2),
             this.$methodsTools.time10to13(res.data.serviceEndTime, 2),
           ];
+          this.copyStatus = res.data.status;
           this.listData = res.data;
           this.$refs["listData"].resetFields();
         });

+ 4 - 0
src/views/Marketing/order/orderList/details/goodsManage.vue

@@ -256,6 +256,10 @@ export default {
           label: "组合",
           value: 5,
         },
+        {
+          label: "直播",
+          value: 6,
+        },
       ],
       payType: [
         {

+ 32 - 2
src/views/Marketing/order/orderList/index.vue

@@ -365,6 +365,36 @@ export default {
     };
   },
   mounted() {
+    if (
+      this.$route.params.educationId &&
+      this.$route.params.businessId &&
+      this.$route.params.goodsType
+    ) {
+      this.$set(
+        this.formData,
+        "educationTypeId",
+        this.$route.params.educationId
+      );
+      this.$set(this.formData, "businessId", this.$route.params.businessId);
+      this.$set(this.formData, "goodsType", this.$route.params.goodsType);
+      this.$refs.searchBox.changeEducationType(
+        this.$route.params.educationId,
+        true
+      );
+      this.$refs.searchBox.changeBusinessLevel(this.$route.params.businessId);
+    }
+    if (this.$route.params.timeType >= 0) {
+      this.$set(
+        this.formData,
+        "startTime",
+        this.$methodsTools.timestampConvert(this.$route.params.timeType)[0]
+      );
+      this.$set(
+        this.formData,
+        "endTime",
+        this.$methodsTools.timestampConvert(this.$route.params.timeType)[1]
+      );
+    }
     this.search();
   },
   activated() {
@@ -435,10 +465,10 @@ export default {
       }
       let data = JSON.parse(JSON.stringify(this.formData));
       if (this.formData.startTime) {
-        data.startTime = data.startTime / 1000;
+        data.startTime = parseInt(data.startTime / 1000);
       }
       if (this.formData.endTime) {
-        data.endTime = data.endTime / 1000;
+        data.endTime = parseInt(data.endTime / 1000);
       }
       data.orderFroms = data.orderFroms || "2,3,4";
       this.$api

+ 16 - 0
src/views/Marketing/order/schoolHoursConflictOrder/index.vue

@@ -270,6 +270,22 @@ export default {
     };
   },
   mounted() {
+    if (
+      this.$route.params.educationId &&
+      this.$route.params.businessId
+    ) {
+      this.$set(
+        this.formData,
+        "educationTypeId",
+        this.$route.params.educationId
+      );
+      this.$set(this.formData, "businessId", this.$route.params.businessId);
+      this.$refs.searchBox.changeEducationType(
+        this.$route.params.educationId,
+        true
+      );
+      this.$refs.searchBox.changeBusinessLevel(this.$route.params.businessId);
+    }
     this.search();
   },
   activated() {

+ 45 - 6
src/views/education/certificateManagement/certificateModel/index.vue

@@ -68,6 +68,7 @@
               v-else-if="items.scope === 'select'"
               v-model="listData[items.prop]"
               placeholder="请选择关联证书类型"
+              @change="listData.certificateId = ''"
             >
               <el-option
                 v-for="(item, index) in certificate"
@@ -77,6 +78,20 @@
               >
               </el-option>
             </el-select>
+            <el-select
+              clearable
+              v-else-if="items.scope === 'selectName'"
+              v-model="listData[items.prop]"
+              placeholder="请选择关联证书名称"
+            >
+              <el-option
+                v-for="(item, index) in certificateName"
+                :key="index"
+                :label="item.certificateName"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
             <el-input
               :disabled="statusPop === 2"
               v-else-if="items.scope === 'textarea'"
@@ -145,7 +160,7 @@ export default {
           label: "证书模板键值",
           prop: "keyValue",
           hidden: true,
-          width:"150"
+          width: "150",
         },
         {
           label: "说明",
@@ -153,17 +168,18 @@ export default {
           hidden: true,
         },
         {
-          label: "关联证书类型",
-          prop: "certificateName",
+          label: "关联证书",
+          prop1: "certificateTypeName",
+          prop2: "certificateName",
           hidden: true,
-          width:"130"
+          scope:"InfoMore",
         },
         {
           label: "状态",
           prop: "status",
           hidden: true,
           scope: "status",
-          width:"130"
+          width: "130",
         },
       ],
       tableData: [], //表单数据
@@ -173,10 +189,15 @@ export default {
       // 弹窗字段
       listitem: [
         {
-          label: "关联证书类型",
+          label: "证书类型",
           prop: "typeId",
           scope: "select",
         },
+        {
+          label: "证书名称",
+          prop: "certificateId",
+          scope: "selectName",
+        },
         {
           label: "证书模板名称",
           prop: "title",
@@ -208,10 +229,17 @@ export default {
       ],
       //   弹窗数据
       listData: {},
+      certificateName: [],
       statusPop: -1,
       dialogVisible: false,
       //表单验证
       rules: {
+        typeId: [
+          { required: true, message: "请选择证书模板", trigger: "change" },
+        ],
+        certificateId: [
+          { required: true, message: "请选择证书名称", trigger: "change" },
+        ],
         title: [
           { required: true, message: "请输入证书模板名称", trigger: "blur" },
         ],
@@ -223,6 +251,17 @@ export default {
     };
   },
   computed: { ...mapGetters(["certificate"]) },
+  watch: {
+    "listData.typeId"(val) {
+      if (val) {
+        this.$api
+          .inquireBaseCertificatecommon({ certificateTypeId: val })
+          .then((res) => {
+            this.certificateName = res.rows;
+          });
+      }
+    },
+  },
   mounted() {
     this.search();
   },

+ 96 - 18
src/views/education/classManageMent/classList/index.vue

@@ -6,7 +6,6 @@
       :formList="formList"
       @search="search"
       @init="init"
-      :classStatus="classStatus"
     />
     <table-list
       :tableSets="tableSet"
@@ -59,7 +58,6 @@ export default {
           title: "未定义",
         },
       },
-      classStatus: true,
       //搜索
       formList: [
         {
@@ -85,6 +83,21 @@ export default {
           scope: "Professional",
           edu: "educationTypeId",
         },
+        {
+          prop: "subjectId",
+          placeholder: "科目",
+          scope: "sujectType",
+          edu: "educationTypeId",
+        },
+        {
+          prop: "classStatus",
+          placeholder: "开班状态",
+          scope: "select",
+          options: [
+            { label: "已开班", value: 1 },
+            { label: "预报名(未开班)", value: 0 },
+          ],
+        },
         {
           prop: "status",
           placeholder: "班级状态",
@@ -146,6 +159,11 @@ export default {
           hidden: true,
           scope: "objType",
         },
+        {
+          label: "科目",
+          prop: "subjectNames",
+          hidden: true,
+        },
         {
           label: "班级编码",
           prop: "gradeCode",
@@ -209,23 +227,42 @@ export default {
       total: 0, //一共多少条
     };
   },
-  mounted() {
-    if (this.$route.params) {
-      this.$set(
-        this.formData,
-        "educationTypeId",
-        this.$route.params.educationId
-      );
-      this.$set(this.formData, "businessId", this.$route.params.businessId);
-      if(this.$route.params.hasInterface >= 0){
+  async mounted() {
+    if (Object.keys(this.$route.params).length) {
+      if (this.$route.params.educationId) {
+        this.$set(
+          this.formData,
+          "educationTypeId",
+          this.$route.params.educationId
+        );
+        this.$refs.searchBox.changeEducationType(
+          this.$route.params.educationId,
+          true
+        );
+      }
+      if (this.$route.params.businessId) {
+        this.$set(this.formData, "businessId", this.$route.params.businessId);
+        this.$refs.searchBox.changeBusinessLevel(this.$route.params.businessId);
+      }
+      if (this.$route.params.classStatus >= 0) {
+        this.$set(this.formData, "classStatus", this.$route.params.classStatus);
+      }
+      if (this.$route.params.hasInterface >= 0) {
         this.formData.hasInterface = this.$route.params.hasInterface;
       }
-      this.$refs.searchBox.changeEducationType(
-        this.formData.educationTypeId,
-        true
+    } else {
+      await this.moRenBus();
+    }
+    if (this.$route.params.timeType >= 0) {
+      this.$set(
+        this.formData,
+        "classStartTime",
+        this.$methodsTools.timestampConvert(this.$route.params.timeType)[0]
       );
-      this.$refs.searchBox.changeBusinessLevel(
-        this.formData.businessId
+      this.$set(
+        this.formData,
+        "classEndTime",
+        this.$methodsTools.timestampConvert(this.$route.params.timeType)[1]
       );
     }
     this.search();
@@ -234,6 +271,47 @@ export default {
     this.search();
   },
   methods: {
+    /**
+     * 默认选择继教二建业务层次
+     */
+    moRenBus() {
+      return new Promise((resolve, reject) => {
+        this.$api.inquireCourseEducationType({ status: 1 }).then((res) => {
+          console.log(res);
+          for (let i = 0; i < res.rows.length; i++) {
+            if (res.rows[i].educationName === "继续教育") {
+              this.$api
+                .inquirebusinessList({ status: 1, educationId: res.rows[i].id })
+                .then((result) => {
+                  for (let j = 0; j < result.rows.length; j++) {
+                    if (
+                      result.rows[j].projectName === "建造师" &&
+                      result.rows[j].businessName === "二级"
+                    ) {
+                      this.$set(
+                        this.formData,
+                        "educationTypeId",
+                        res.rows[i].id
+                      );
+                      this.$refs.searchBox.changeEducationType(
+                        res.rows[i].id,
+                        true
+                      );
+                      this.$set(this.formData, "businessId", result.rows[j].id);
+                      this.$refs.searchBox.changeBusinessLevel(
+                        result.rows[j].id
+                      );
+                      resolve();
+                      break;
+                    }
+                  }
+                });
+              break;
+            }
+          }
+        });
+      });
+    },
     editInfo(v) {
       this.addClick(v, 2);
     },
@@ -255,10 +333,10 @@ export default {
       }
       var data = JSON.parse(JSON.stringify(this.formData));
       if (this.formData.classStartTime) {
-        data.classStartTime = data.classStartTime / 1000;
+        data.classStartTime = parseInt(data.classStartTime / 1000);
       }
       if (this.formData.classEndTime) {
-        data.classEndTime = data.classEndTime / 1000;
+        data.classEndTime = parseInt(data.classEndTime / 1000);
       }
       this.$api
         .inquireGradegradeList(data)

+ 10 - 0
src/views/education/classManageMent/learningAccoutTags/index.vue

@@ -151,12 +151,21 @@ export default {
   },
   computed: { ...mapGetters(["educationType"]) },
   mounted() {
+    if (this.$route.params.educationId) {
+      this.$set(
+        this.formData,
+        "educationTypeId",
+        this.$route.params.educationId
+      );
+    }
     if (
       !this.formData.educationTypeId &&
       this.educationType &&
       this.educationType.length
     ) {
       this.formData.educationTypeId = this.educationType[0].id;
+    }
+    if (this.formData.educationTypeId) {
       this.search();
     }
   },
@@ -172,6 +181,7 @@ export default {
           },
         });
       };
+      console.log(type)
       const statusPage = this.$store.state.tagsView.visitedViews.some(
         (item) => {
           return item.name == "ClassList";

+ 58 - 55
src/views/education/classManageMent/learningHoursRecordList/hoursTimesRecord.vue

@@ -39,61 +39,57 @@
         <li>绑定手机号码:{{ userData.telPhone }}</li>
       </ul>
       <div class="photoSty1">
-          <img
-            style="width: 100%; height: 100%"
-            v-if="!userData.oneInchPhotos"
-            src="@/assets/404_images/wuyuxaog.png"
-            alt=""
-          />
-          <el-image
-            v-else
-            style="width: 100%; height: 100%"
-            :src="$methodsTools.splitImgHost(userData.oneInchPhotos)"
-            :preview-src-list="[
-              $methodsTools.splitImgHost(userData.oneInchPhotos),
-            ]"
-          >
-          </el-image>
-          <div class="pos_bottom">一寸头像图</div>
-        </div>
-        <div class="photoSty2">
-          <img
-            style="width: 100%; height: 100%"
-            v-if="!userData.idCardImg1"
-            src="@/assets/404_images/wuyuxaog.png"
-            alt=""
-          />
-          <el-image
-            v-else
-            style="width: 100%; height: 100%"
-            :src="$methodsTools.splitImgHost(userData.idCardImg1)"
-            :preview-src-list="[
-              $methodsTools.splitImgHost(userData.idCardImg1),
-            ]"
-          >
-          </el-image>
-          <div class="pos_bottom">身份证头像照</div>
-        </div>
-        <div class="photoSty2" style="margin-right: 0px">
-          <img
-            style="width: 100%; height: 100%"
-            v-if="!userData.idCardImg2"
-            src="@/assets/404_images/wuyuxaog.png"
-            alt=""
-          />
-          <el-image
-            v-else
-            style="width: 100%; height: 100%"
-            :src="$methodsTools.splitImgHost(userData.idCardImg2)"
-            :preview-src-list="[
-              $methodsTools.splitImgHost(userData.idCardImg2),
-            ]"
-          >
-          </el-image>
-          <div class="pos_bottom">身份证国徽照</div>
-        </div>
+        <img
+          style="width: 100%; height: 100%"
+          v-if="!userData.oneInchPhotos"
+          src="@/assets/404_images/wuyuxaog.png"
+          alt=""
+        />
+        <el-image
+          v-else
+          style="width: 100%; height: 100%"
+          :src="$methodsTools.splitImgHost(userData.oneInchPhotos)"
+          :preview-src-list="[
+            $methodsTools.splitImgHost(userData.oneInchPhotos),
+          ]"
+        >
+        </el-image>
+        <div class="pos_bottom">一寸头像图</div>
+      </div>
+      <div class="photoSty2">
+        <img
+          style="width: 100%; height: 100%"
+          v-if="!userData.idCardImg1"
+          src="@/assets/404_images/wuyuxaog.png"
+          alt=""
+        />
+        <el-image
+          v-else
+          style="width: 100%; height: 100%"
+          :src="$methodsTools.splitImgHost(userData.idCardImg1)"
+          :preview-src-list="[$methodsTools.splitImgHost(userData.idCardImg1)]"
+        >
+        </el-image>
+        <div class="pos_bottom">身份证头像照</div>
+      </div>
+      <div class="photoSty2" style="margin-right: 0px">
+        <img
+          style="width: 100%; height: 100%"
+          v-if="!userData.idCardImg2"
+          src="@/assets/404_images/wuyuxaog.png"
+          alt=""
+        />
+        <el-image
+          v-else
+          style="width: 100%; height: 100%"
+          :src="$methodsTools.splitImgHost(userData.idCardImg2)"
+          :preview-src-list="[$methodsTools.splitImgHost(userData.idCardImg2)]"
+        >
+        </el-image>
+        <div class="pos_bottom">身份证国徽照</div>
+      </div>
     </div>
-    <div style="margin-top: 12px; overflow: auto;height:100%;">
+    <div style="margin-top: 12px; overflow: auto; height: 100%">
       <el-table
         v-loading="loading"
         ref="multipleTable"
@@ -124,6 +120,10 @@
                   : "未知"
               }}
             </span>
+            <div v-else-if="item.scope === 'moreTime'">
+              {{ $methodsTools.onlyForma(scope.row[item.prop1]) }} -
+              {{ $methodsTools.onlyForma(scope.row[item.prop2]) }}
+            </div>
             <span v-else-if="item.scope === 'durationTime'">
               {{ $methodsTools.secondToDate(scope.row[item.prop], false) }}
             </span>
@@ -188,7 +188,10 @@ export default {
         },
         {
           label: "学习/做题时间",
-          prop: "studyTimeTxt",
+          prop1: "studyStartTime",
+          prop2: "studyEndTime",
+          scope: "moreTime",
+          width: "310px",
         },
         {
           label: "学习/做题时长",

+ 34 - 2
src/views/education/classManageMent/listOfhoursToBeReviewed/index.vue

@@ -291,6 +291,38 @@ export default {
     };
   },
   mounted() {
+    if (
+      this.$route.params.educationId &&
+      this.$route.params.businessId &&
+      this.$route.params.type
+    ) {
+      this.$set(
+        this.formData,
+        "educationTypeId",
+        this.$route.params.educationId
+      );
+      this.$set(this.formData, "businessId", this.$route.params.businessId);
+      this.$set(this.formData, "periodStatus", this.$route.params.type);
+      this.$refs.searchBox.changeEducationType(
+        this.$route.params.educationId,
+        true
+      );
+      this.$refs.searchBox.changeBusinessLevel(this.$route.params.businessId);
+    }
+    console.log(this.$methodsTools.timestampConvert(this.$route.params.timeType)[0])
+    console.log(this.$methodsTools.timestampConvert(this.$route.params.timeType)[1])
+    if (this.$route.params.timeType >= 0) {
+      this.$set(
+        this.formData,
+        "classStartTime",
+        this.$methodsTools.timestampConvert(this.$route.params.timeType)[0]
+      );
+      this.$set(
+        this.formData,
+        "classEndTime",
+        this.$methodsTools.timestampConvert(this.$route.params.timeType)[1]
+      );
+    }
     this.search();
     this.getInitList();
     this.getInitUnderList();
@@ -422,10 +454,10 @@ export default {
       }
       var data = JSON.parse(JSON.stringify(this.formData));
       if (this.formData.classStartTime) {
-        data.classStartTime = data.classStartTime / 1000;
+        data.classStartTime = parseInt(data.classStartTime / 1000)
       }
       if (this.formData.classEndTime) {
-        data.classEndTime = data.classEndTime / 1000;
+        data.classEndTime = parseInt(data.classEndTime / 1000)
       }
       this.$api
         .inquireGradegradelistUserPeriods(data)

+ 18 - 6
src/views/education/classManageMent/studentInfoChange/index.vue

@@ -15,7 +15,7 @@
       </el-select>
       <el-select
         v-if="formData.educationId"
-        style="margin-left:10px;"
+        style="margin-left: 10px"
         v-model="formData['businessId']"
         placeholder="请选择业务层次"
         size="medium"
@@ -88,13 +88,13 @@ export default {
       tableSet: [
         {
           label: "学员姓名",
-          prop: "realname",
+          prop: "nowRealname",
           hidden: true,
         },
         {
           label: "修改内容",
           prop1: "telphone",
-          prop2: "nowRealname",
+          prop2: "realname",
           prop3: "idCard",
           scope: "modifyContent",
           hidden: true,
@@ -132,7 +132,11 @@ export default {
   watch: {
     educationType(val) {
       if (val.length > 0) {
-        this.formData.educationId = val[0].id;
+        if (this.$route.params.educationId) {
+          this.formData.educationId = this.$route.params.educationId || "";
+        } else {
+          this.formData.educationId = val[0].id;
+        }
       }
     },
     "formData.educationId"(val) {
@@ -147,7 +151,11 @@ export default {
       this.educationType &&
       this.educationType.length
     ) {
-      this.formData.educationId = this.educationType[0].id;
+      if (this.$route.params.educationId) {
+        this.formData.educationId = this.$route.params.educationId || "";
+      } else {
+        this.formData.educationId = this.educationType[0].id;
+      }
     }
   },
   methods: {
@@ -158,7 +166,11 @@ export default {
           this.businessList = res.rows;
           if (this.firstComeIn) {
             this.firstComeIn = false;
-            this.formData.businessId = res.rows[0].id;
+            if (this.$route.params.businessId) {
+              this.formData.businessId = this.$route.params.businessId;
+            } else {
+              this.formData.businessId = res.rows[0].id;
+            }
             this.search();
           }
         });

+ 25 - 2
src/views/education/classManageMent/studentPushData/index.vue

@@ -183,7 +183,15 @@ export default {
   watch: {
     educationType(val) {
       if (val.length > 0) {
-        this.formData.educationId = val[0].id;
+        if (this.$route.params.educationId) {
+          this.$set(
+            this.formData,
+            "educationId",
+            this.$route.params.educationId
+          );
+        } else {
+          this.formData.educationId = val[0].id;
+        }
       }
     },
     "formData.educationId"(val) {
@@ -193,6 +201,13 @@ export default {
   },
   computed: { ...mapGetters(["educationType"]) },
   mounted() {
+    if (this.$route.params.educationId) {
+      this.$set(
+        this.formData,
+        "educationId",
+        this.$route.params.educationId
+      );
+    }
     if (
       !this.formData.educationId &&
       this.educationType &&
@@ -209,7 +224,15 @@ export default {
           this.businessList = res.rows;
           if (this.firstComeIn) {
             this.firstComeIn = false;
-            this.formData.businessId = res.rows[0].id;
+            if (this.$route.params.businessId) {
+              this.$set(
+                this.formData,
+                "businessId",
+                this.$route.params.businessId
+              );
+            } else {
+              this.formData.businessId = res.rows[0].id;
+            }
             this.search();
           }
         });

+ 20 - 1
src/views/education/dataReview/dataConfig/index.vue

@@ -553,6 +553,24 @@ export default {
     };
   },
   mounted() {
+    if (
+      this.$route.params.educationId &&
+      this.$route.params.businessId &&
+      this.$route.params.type
+    ) {
+      this.$set(
+        this.formData,
+        "educationTypeId",
+        this.$route.params.educationId
+      );
+      this.$set(this.formData, "businessId", this.$route.params.businessId);
+      this.$set(this.formData, "status", this.$route.params.type);
+      this.$refs.searchBox.changeEducationType(
+        this.$route.params.educationId,
+        true
+      );
+      this.$refs.searchBox.changeBusinessLevel(this.$route.params.businessId);
+    }
     this.search();
   },
   activated() {
@@ -656,7 +674,8 @@ export default {
         int === "recent_photos" ||
         int === "idcard_face_photo" ||
         int === "idcard_national_photo" ||
-        int === "commitment_electr_signature"
+        int === "commitment_electr_signature" ||
+        int === "commitment_seal"
       ) {
         return true;
       }

+ 17 - 2
src/views/education/examManagement/applicationData/asPlanned.vue

@@ -597,6 +597,19 @@ export default {
     };
   },
   mounted() {
+    // if (this.$route.params.educationId && this.$route.params.businessId) {
+    //   this.$set(
+    //     this.formData,
+    //     "educationTypeId",
+    //     this.$route.params.educationId
+    //   );
+    //   this.$set(this.formData, "businessId", this.$route.params.businessId);
+    //   this.$refs.searchBox.changeEducationType(
+    //     this.$route.params.educationId,
+    //     true
+    //   );
+    //   this.$refs.searchBox.changeBusinessLevel(this.$route.params.businessId);
+    // }
     if (this.$route.query.type == 1) {
       this.formData.applyId = Number(this.$route.query.id);
     }
@@ -612,8 +625,10 @@ export default {
   },
   methods: {
     getDowm() {
-      let url = baseUrls.BASE_IMG_URL + "/oss/images/file/20211228.xls" +
-        `?time=${this.$methodsTools.getNewTime()}`;;
+      let url =
+        baseUrls.BASE_IMG_URL +
+        "/oss/images/file/20211228.xls" +
+        `?time=${this.$methodsTools.getNewTime()}`;
       let link = document.createElement("a");
       let fileName = "导入模板" + ".xlsx";
       document.body.appendChild(link);

+ 8 - 5
src/views/education/examManagement/examArrangement/applicableProducts/checkStudent.vue

@@ -181,6 +181,7 @@ export default {
         idCards: "",
         getOrderNum: 0,
       },
+      getData: {},
     };
   },
   methods: {
@@ -251,13 +252,14 @@ export default {
           e.target.value = "";
         });
     },
-    openBox() {
+    openBox(getData) {
       this.dialogVisible = true;
+      this.getData = JSON.parse(JSON.stringify(getData));
       this.getInitData(2);
       this.$nextTick(() => {
-        this.disCheckList = this.$parent.listDataGoods.userId.map(item => {
-          return item.userId
-        })
+        this.disCheckList = this.$parent.listDataGoods.userId.map((item) => {
+          return item.userId;
+        });
         this.$refs.elTable.clearSelection();
       });
     },
@@ -272,6 +274,7 @@ export default {
         };
       }
       var data = JSON.parse(JSON.stringify(this.formData));
+      data.businessId = this.getData.businessId;
       if (this.formData.idCards) {
         data.idCards = this.formData.idCards.split("\n");
       }
@@ -300,7 +303,7 @@ export default {
       this.getInitData(2);
     },
     submit() {
-      this.$emit("backStudentList",this.selectArr)
+      this.$emit("backStudentList", this.selectArr);
       this.selectArr = [];
       this.close();
     },

+ 17 - 9
src/views/education/examManagement/examArrangement/applicableProducts/index.vue

@@ -32,7 +32,7 @@
               disabled
             >
               <el-option
-                v-for="item in options"
+                v-for="item in $methodsTools.getGoodsType()"
                 :key="item.value"
                 :label="item.label"
                 :value="item.value"
@@ -47,7 +47,11 @@
                   v-model="listDataGoods.educationTypeId"
                   placeholder="选择教育类型"
                   @change="listDataGoods.businessId = ''"
-                  :disabled="statusPop === 0"
+                  :disabled="
+                    statusPop === 0 ||
+                    listDataGoods.goodsId.length > 0 ||
+                    listDataGoods.userId.length > 0
+                  "
                 >
                   <el-option
                     v-for="item in educationType"
@@ -67,7 +71,11 @@
               >
                 <el-select
                   v-model="listDataGoods.businessId"
-                  :disabled="statusPop === 0"
+                  :disabled="
+                    statusPop === 0 ||
+                    listDataGoods.goodsId.length > 0 ||
+                    listDataGoods.userId.length > 0
+                  "
                   placeholder="选择业务层次"
                 >
                   <el-option
@@ -80,7 +88,7 @@
                 </el-select> </el-form-item
             ></el-col>
             <el-col :span="12" v-if="listDataGoods.businessId"
-              ><el-form-item label="适用商品">
+              ><el-form-item label="适用商品" prop="goodsId">
                 <el-button size="small" type="info" @click="checkgoods"
                   >选择商品</el-button
                 >
@@ -322,10 +330,10 @@ export default {
           break;
         }
       }
-      if(this.listDataGoods.userId.length){
-        data.userId = this.listDataGoods.userId.map(item => {
-          return item.userId
-        })
+      if (this.listDataGoods.userId.length) {
+        data.userId = this.listDataGoods.userId.map((item) => {
+          return item.userId;
+        });
       }
       this.$api.systemapplyaddGoods(data).then((res) => {
         this.$message.success("适用商品设置成功");
@@ -345,7 +353,7 @@ export default {
       this.$set(this.listDataGoods, "userId", IDS);
     },
     checkStudent() {
-      this.$refs.checkStudent.openBox();
+      this.$refs.checkStudent.openBox(this.listDataGoods);
     },
   },
 };

+ 3 - 26
src/views/education/examManagement/examArrangement/index.vue

@@ -546,7 +546,7 @@
                 >适用商品</el-button
               >
               <el-form-item label="商品类型:">
-                <span v-for="(item, index) in options" :key="index">{{
+                <span v-for="(item, index) in $methodsTools.getGoodsType()" :key="index">{{
                   item.value === infoData.goodsType ? item.label : ""
                 }}</span>
               </el-form-item>
@@ -635,31 +635,6 @@ export default {
           scope: "TimeLists",
           Diszing: false,
         },
-        {
-          label: "使用状态",
-          prop: "status",
-          hidden: true,
-          width: "120px",
-          scope: "isOptions",
-          options: [
-            {
-              label: "进行中",
-              value: 1,
-            },
-            {
-              label: "未启用",
-              value: 0,
-            },
-            {
-              label: "删除",
-              value: -1,
-            },
-            {
-              label: "已过期",
-              value: 2,
-            },
-          ],
-        },
         {
           label: "预约/取消(人次)",
           prop: "people",
@@ -1173,6 +1148,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 = []
           }
           if (res.data.applyStartTime) {
             res.data.applyStartTime = this.$methodsTools.time10to13(

+ 32 - 24
src/views/education/examManagement/qianpeiArrange/assExamPlan.vue

@@ -59,14 +59,17 @@
           >
             <template slot-scope="scope">
               <div v-if="item.scope === 'morePeople'">
-                <span
-                  v-for="(itm, idm) in scope.row[item.prop]
-                    .split(',')
-                    .map(Number)"
-                  :key="idm"
-                >
-                  {{ itm === 1 ? "非补考学员" : itm === 2 ? "补考学员" : "" }}
-                </span>
+                <template v-if="scope.row[item.prop]">
+                  <span
+                    v-for="(itm, idm) in scope.row[item.prop]
+                      .split(',')
+                      .map(Number)"
+                    :key="idm"
+                  >
+                    {{ itm === 1 ? "非补考学员" : itm === 2 ? "补考学员" : "" }}
+                  </span>
+                </template>
+                <span v-else></span>
               </div>
               <span v-else-if="item.scope === 'TimeLists'"
                 >{{
@@ -157,13 +160,11 @@ export default {
       this.selectArr = [];
       this.dialogVisible = true;
       this.$nextTick(() => {
-        this.$api
-          .inquireexamapplyList({ beforeId: this.beforeId })
-          .then((res) => {
-            this.disActiveList = res.rows.map((item) => {
-              return item.applyId;
-            });
+        this.$api.inquireexamapplyList({ beforeId: -1 }).then((res) => {
+          this.disActiveList = res.rows.map((item) => {
+            return item.applyId;
           });
+        });
         this.$refs.elTable.clearSelection();
       });
     },
@@ -199,17 +200,24 @@ export default {
         return item.applyId;
       });
       this.$api
-        .addexamapply({
-          beforeId: this.beforeId,
-          applyIds: lists.concat(this.disActiveList),
-        })
+        .inquireexamapplyList({ beforeId: this.beforeId })
         .then((res) => {
-          this.$message.success("关联成功");
-          this.$emit("backData");
-          this.dialogVisible = false;
-        })
-        .finally(() => {
-          this.disabledBtn = false;
+          var ary = res.rows.map((item) => {
+            return item.applyId;
+          });
+          this.$api
+            .addexamapply({
+              beforeId: this.beforeId,
+              applyIds: lists.concat(ary),
+            })
+            .then((res) => {
+              this.$message.success("关联成功");
+              this.$emit("backData");
+              this.dialogVisible = false;
+            })
+            .finally(() => {
+              this.disabledBtn = false;
+            });
         });
     },
     /**

+ 2 - 45
src/views/education/examManagement/qianpeiArrange/index.vue

@@ -173,7 +173,7 @@
               disabled
             >
               <el-option
-                v-for="item in options"
+                v-for="item in $methodsTools.getGoodsType()"
                 :key="item.value"
                 :label="item.label"
                 :value="item.value"
@@ -300,7 +300,7 @@
             >适用商品</el-button
           >
           <el-form-item label="商品类型:">
-            <span v-for="(item, index) in options" :key="index">{{
+            <span v-for="(item, index) in $methodsTools.getGoodsType()" :key="index">{{
               item.value === infoData.goodsType ? item.label : ""
             }}</span>
           </el-form-item>
@@ -384,31 +384,6 @@ export default {
           scope: "TimeLists",
           Diszing: false,
         },
-        {
-          label: "使用状态",
-          prop: "status",
-          hidden: true,
-          width: "130px",
-          scope: "isOptions",
-          options: [
-            {
-              label: "进行中",
-              value: 1,
-            },
-            {
-              label: "未启用",
-              value: 0,
-            },
-            {
-              label: "删除",
-              value: -1,
-            },
-            {
-              label: "已过期",
-              value: 2,
-            },
-          ],
-        },
         {
           label: "关联考试计划",
           prop: "applyNum",
@@ -475,24 +450,6 @@ export default {
         ],
       },
       dialogVisiblenew: false,
-      options: [
-        {
-          label: "视频",
-          value: 1,
-        },
-        {
-          label: "题库",
-          value: 2,
-        },
-        {
-          label: "补考",
-          value: 3,
-        },
-        {
-          label: "前培",
-          value: 4,
-        },
-      ],
       //表单验证
       rulesnew: {
         goodsType: [

+ 236 - 0
src/views/education/liveLearningManagement/liveLearningRecord/index.vue

@@ -0,0 +1,236 @@
+<template>
+  <div id="liveLearningRecord">
+    <search-box-new
+      ref="searchBox"
+      :formData="formData"
+      :formList="formList"
+      @search="search"
+      @init="init"
+      ><template slot="customize">
+        <el-button size="small" type="success" @click="moreActive"
+          >批量导出</el-button
+        >
+      </template></search-box-new
+    >
+    <table-list
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      :loading="loading"
+    >
+      <template slot="btn" slot-scope="props">
+        <el-button type="text" @click="doList(props.scope.row)"
+          >学员学习列表</el-button
+        >
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="formData.pageSize"
+      :currentPage="formData.pageNum"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+  </div>
+</template>
+
+<script>
+import * as baseUrls from "@/utils/request.js";
+import searchBoxNew from "@/components/searchBoxNew";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
+export default {
+  components: { searchBoxNew, tableList, pagination },
+  data() {
+    return {
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "直播学习记录",
+        index: 0,
+        ch: "条",
+        num: false,
+        border: true,
+        choice: true,
+        addHide: true,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      //搜索
+      formList: [
+        {
+          prop: "educationTypeId",
+          placeholder: "教育类型",
+          scope: "educationType",
+        },
+        {
+          prop: "businessId",
+          placeholder: "业务层次",
+          scope: "businessLevel",
+          edu: "educationTypeId",
+        },
+        {
+          prop: "majorId",
+          placeholder: "专业",
+          scope: "Professional",
+          edu: "educationTypeId",
+        },
+
+        {
+          prop1: "validityStartTime",
+          prop2: "validityEndTime",
+          placeholder1: "商品有效期开始时间",
+          placeholder2: "商品有效期结束时间",
+          scope: "moreDataPicker",
+        },
+        {
+          prop: "searchKey",
+          placeholder: "请输入商品名称/商品编码",
+        },
+      ],
+      formData: {
+        status: "0,1",
+        pageSize: 10,
+        pageNum: 1,
+        goodsType: 6,
+        getOrderNum: 1,
+      },
+      // 表单
+      tableSet: [
+        {
+          label: "商品编码",
+          prop: "code",
+          hidden: true,
+        },
+        {
+          label: "商品名称",
+          prop: "goodsName",
+          hidden: true,
+        },
+        {
+          label: "业务层级",
+          prop1: "educationName",
+          prop2: "projectName",
+          prop3: "businessName",
+          hidden: true,
+          scope: "eduTypes",
+        },
+        {
+          label: "学时",
+          prop: "classHours",
+          hidden: true,
+        },
+        {
+          label: "订单数量",
+          prop: "goodsLiveNum",
+          hidden: true,
+        },
+      ],
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+    };
+  },
+  mounted() {
+    this.search();
+  },
+  activated() {
+    this.search();
+  },
+  methods: {
+    moreActive() {
+      let arr = JSON.parse(JSON.stringify(this.formData));
+      delete arr.pageSize;
+      delete arr.pageNum;
+      this.$api.inquiregoodslistBankexport_list(arr).then((res) => {
+        if (res.msg) {
+          let url = baseUrls.baseURL + "common/download?fileName=" + res.msg;
+          let link = document.createElement("a");
+          let fileName = "导出直播数据" + ".xlsx";
+          document.body.appendChild(link);
+          link.href = url;
+          link.dowmload = fileName;
+          link.click();
+          link.remove();
+          this.$message.success("导出成功");
+        } else {
+          this.$message.error("导出失败");
+        }
+      });
+    },
+    doList(row) {
+      const jump = () => {
+        this.$router.push({
+          path: "studentStyleList",
+          query: {
+            id: row.goodsId,
+          },
+        });
+      };
+      const statusPage = this.$store.state.tagsView.visitedViews.some(
+        (item) => {
+          return item.name == "StudentStyleList";
+        }
+      );
+      if (statusPage) {
+        this.$store
+          .dispatch("tagsView/delCachedView", {
+            name: "StudentStyleList",
+          })
+          .then((res) => {
+            jump();
+          });
+      } else {
+        jump();
+      }
+    },
+    search(int) {
+      this.loading = true;
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      if (int === 2) {
+        this.formData = {
+          status: "0,1",
+          pageSize: 10,
+          pageNum: 1,
+          goodsType: 6,
+          getOrderNum: 1,
+        };
+      }
+      var data = JSON.parse(JSON.stringify(this.formData));
+      if (this.formData.validityStartTime) {
+        data.validityStartTime = data.validityStartTime / 1000;
+      }
+      if (this.formData.validityEndTime) {
+        data.validityEndTime = data.validityEndTime / 1000;
+      }
+      this.$api
+        .inquireGoods(data)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+          this.navText.index = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    init() {
+      this.search(2);
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.search();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 211 - 0
src/views/education/liveLearningManagement/liveLearningRecord/studentStyleList/index.vue

@@ -0,0 +1,211 @@
+<template>
+  <div id="liveLearningRecord">
+    <search-box-new
+      ref="searchBox"
+      :formData="formData"
+      :formList="formList"
+      @search="search"
+      @init="init"
+      ><template slot="customize">
+        <el-button size="small" type="success" @click="moreActive"
+          >批量导出</el-button
+        >
+      </template></search-box-new
+    >
+    <table-list
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      :loading="loading"
+    >
+      <template slot="btn" slot-scope="props">
+        <el-button type="text" @click="doList(props.scope.row)"
+          >学员观看直播数据</el-button
+        >
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="formData.pageSize"
+      :currentPage="formData.pageNum"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+  </div>
+</template>
+
+<script>
+import * as baseUrls from "@/utils/request.js";
+import searchBoxNew from "@/components/searchBoxNew";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
+export default {
+  components: { searchBoxNew, tableList, pagination },
+  data() {
+    return {
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "学员学习列表",
+        index: 0,
+        ch: "条",
+        num: false,
+        border: true,
+        choice: true,
+        addHide: true,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      //搜索
+      formList: [
+        {
+          prop: "searchKey",
+          placeholder: "请输入学员姓名/学员身份证",
+        },
+      ],
+      formData: {
+        pageSize: 10,
+        pageNum: 1,
+      },
+      // 表单
+      tableSet: [
+        {
+          label: "学员姓名",
+          prop: "realname",
+          hidden: true,
+        },
+        {
+          label: "学员身份证",
+          prop: "idCard",
+          hidden: true,
+        },
+        {
+          label: "直播累计时长",
+          prop: "liveTime",
+          hidden: true,
+          scope: "convert",
+        },
+        {
+          label: "观看直播累计时长",
+          prop: "seeTime",
+          hidden: true,
+          scope: "convert",
+        },
+        {
+          label: "课程总直播次数",
+          prop: "totalLiveNum",
+          hidden: true,
+        },
+        {
+          label: "课程已直播次数",
+          prop: "overLiveNum",
+          hidden: true,
+        },
+        {
+          label: "已参加直播次数",
+          prop: "joinLiveNum",
+          hidden: true,
+        },
+      ],
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+      id: "",
+    };
+  },
+  mounted() {
+    this.id = this.$route.query.id;
+    this.search();
+  },
+  activated() {
+    this.search();
+  },
+  methods: {
+    moreActive() {
+      let arr = JSON.parse(JSON.stringify(this.formData));
+      arr.goodsId = this.id;
+      this.$api.inquireOrderGoodsexport_listLiveGoodsList(arr).then((res) => {
+        if (res.msg) {
+          let url = baseUrls.baseURL + "common/download?fileName=" + res.msg;
+          let link = document.createElement("a");
+          let fileName = "导出直播数据" + ".xlsx";
+          document.body.appendChild(link);
+          link.href = url;
+          link.dowmload = fileName;
+          link.click();
+          link.remove();
+          this.$message.success("导出成功");
+        } else {
+          this.$message.error("导出失败");
+        }
+      });
+    },
+    doList(row) {
+      const jump = () => {
+        this.$router.push({
+          path: "watchLiveData",
+          query: {
+            orderGoodsId: row.orderGoodsId,
+            realname: row.realname,
+          },
+        });
+      };
+      const statusPage = this.$store.state.tagsView.visitedViews.some(
+        (item) => {
+          return item.name == "WatchLiveData";
+        }
+      );
+      if (statusPage) {
+        this.$store
+          .dispatch("tagsView/delCachedView", {
+            name: "WatchLiveData",
+          })
+          .then((res) => {
+            jump();
+          });
+      } else {
+        jump();
+      }
+    },
+    search(int) {
+      this.loading = true;
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      if (int === 2) {
+        this.formData = {
+          pageSize: 10,
+          pageNum: 1,
+        };
+      }
+      var data = JSON.parse(JSON.stringify(this.formData));
+      data.goodsId = this.id;
+      this.$api
+        .inquireOrderGoodsBuyLiveGoodsList(data)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+          this.navText.index = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    init() {
+      this.search(2);
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.search();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 205 - 0
src/views/education/liveLearningManagement/liveLearningRecord/studentStyleList/watchLiveData/index.vue

@@ -0,0 +1,205 @@
+<template>
+  <div id="watchLiveData">
+    <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="btn" slot-scope="props">
+        <el-button type="text" @click="doList(props.scope.row)" :disabled="props.scope.row.sectionType !== 2"
+          >详情</el-button
+        >
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="formData.pageSize"
+      :currentPage="formData.pageNum"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+    <infoBox ref="infoBox" />
+  </div>
+</template>
+
+<script>
+import searchBoxNew from "@/components/searchBoxNew";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
+import infoBox from "./infoBox.vue";
+export default {
+  components: { searchBoxNew, tableList, pagination, infoBox },
+  data() {
+    return {
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: `${this.$route.query.realname}-观看直播数据`,
+        index: 0,
+        ch: "条",
+        num: false,
+        border: true,
+        choice: true,
+        addHide: true,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      //搜索
+      formList: [
+        {
+          prop: "moduleName",
+          placeholder: "模块标题",
+        },
+        {
+          prop: "chapterName",
+          placeholder: "章标题",
+        },
+        {
+          prop: "sectionName",
+          placeholder: "节标题",
+        },
+      ],
+      formData: {
+        pageSize: 10,
+        pageNum: 1,
+      },
+      // 表单
+      tableSet: [
+        {
+          label: "学员姓名",
+          prop: "realname",
+          hidden: true,
+        },
+        {
+          label: "学员身份证",
+          prop: "idCard",
+          hidden: true,
+        },
+        {
+          label: "模块标题",
+          prop: "moduleName",
+          hidden: true,
+        },
+        {
+          label: "章标题",
+          prop: "chapterName",
+          hidden: true,
+        },
+        {
+          label: "节标题",
+          prop: "sectionName",
+          hidden: true,
+        },
+        {
+          label: "节时长",
+          prop: "durationTime",
+          hidden: true,
+          scope: "convert",
+        },
+        {
+          label: "观看时长",
+          prop: "studyDuration",
+          hidden: true,
+          scope: "convert",
+        },
+        {
+          label: "进入时间",
+          prop: "firstStartTime",
+          hidden: true,
+          scope: "aTimeList",
+        },
+        {
+          label: "观看类型",
+          prop: "sectionType",
+          hidden: true,
+          scope: "isOptions",
+          options: [
+            {
+              label: "录播",
+              value: 1,
+            },
+            {
+              label: "直播",
+              value: 2,
+            },
+            {
+              label: "回放",
+              value: 3,
+            },
+          ],
+        },
+      ],
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+      orderGoodsId: "",
+    };
+  },
+  mounted() {
+    this.orderGoodsId = this.$route.query.orderGoodsId;
+    this.search();
+  },
+  activated() {
+    this.search();
+  },
+  methods: {
+    /**
+     * 查看详情
+     */
+    doList(row) {
+      this.$refs.infoBox.openBox({
+        orderGoodsId: this.orderGoodsId,
+        sectionId:row.sectionId,
+        userId:row.userId
+      });
+    },
+    search(int) {
+      this.loading = true;
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      if (int === 2) {
+        this.formData = {
+          pageSize: 10,
+          pageNum: 1,
+        };
+      }
+      var data = JSON.parse(JSON.stringify(this.formData));
+      data.orderGoodsId = this.orderGoodsId;
+      this.$api
+        .inquireOrderGoodsBuyuserSectionLiveList(data)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+          this.navText.index = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    init() {
+      this.search(2);
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.search();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 212 - 0
src/views/education/liveLearningManagement/liveLearningRecord/studentStyleList/watchLiveData/infoBox.vue

@@ -0,0 +1,212 @@
+<template>
+  <div id="infoBox">
+    <el-dialog
+      :visible.sync="dialogVisibleTableBoxs"
+      width="1100px"
+      :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="dialogVisibleTableBoxs = false"
+          />
+        </div>
+      </div>
+      <el-table
+        ref="multipleTable"
+        :data="tableData"
+        border
+        :header-cell-style="{
+          'background-color': '#eee',
+          padding: '8px',
+          color: '#333',
+        }"
+        max-height="600"
+      >
+        <el-table-column
+          label="序号"
+          type="index"
+          width="80"
+          align="center"
+          header-align="center"
+        >
+        </el-table-column>
+        <template v-for="(item, index) in tableSet">
+          <el-table-column
+            v-if="item.scope !== 'inputs'"
+            :width="item.width"
+            :key="index"
+            :label="item.label"
+            align="center"
+            :show-overflow-tooltip="true"
+            header-align="center"
+          >
+            <template slot-scope="scope">
+              <span v-if="item.scope === 'livedTime'">
+                {{
+                  $methodsTools.onlyForma(
+                    new Date(scope.row[item.prop1]).getTime() / 1000 +
+                      scope.row[item.prop2]
+                  )
+                }}
+              </span>
+              <span v-else-if="item.scope === 'Date'">
+                {{
+                  $methodsTools.onlyForma(
+                    new Date(scope.row[item.prop]).getTime() / 1000
+                  )
+                }}
+              </span>
+              <span v-else-if="item.scope === 'time'">
+                {{ $methodsTools.secondToDate(scope.row[item.prop], false) }}
+              </span>
+              <span v-else>{{ scope.row[item.prop] }}</span></template
+            >
+          </el-table-column></template
+        >
+      </el-table>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisibleTableBoxs = false">取 消</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      size: "small",
+      dialogVisibleTableBoxs: false,
+      tableData: [],
+      tableSet: [
+        { label: "进入时间", prop: "createdTime", scope: "Date" },
+        {
+          label: "离开时间",
+          prop1: "createdTime",
+          prop2: "playDuration",
+          scope: "livedTime",
+        },
+        { label: "观看时长", prop: "playDuration", scope: "time" },
+      ],
+      formData: {},
+    };
+  },
+  methods: {
+    /**
+     * 初始
+     */
+    openBox(obj) {
+      this.formData = JSON.parse(JSON.stringify(obj));
+      this.getInfos();
+      this.dialogVisibleTableBoxs = true;
+    },
+    /**
+     * 搜索数据
+     */
+    getInfos(int) {
+      this.$api
+        .inquireOrderGoodsBuyuserSectionLiveLog(this.formData)
+        .then((res) => {
+          this.tableData = res.data;
+        });
+    },
+  },
+};
+</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>

+ 343 - 0
src/views/education/mockTestManagement/mockExamArrangement/activeExam.vue

@@ -0,0 +1,343 @@
+<template>
+  <div id="activeExam">
+    <el-dialog
+      destroy-on-close
+      :visible.sync="dialogGoods"
+      width="1100px"
+      :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="dialogGoods = false"
+          />
+        </div>
+      </div>
+      <div>
+        <div class="dis_sty">
+          <el-select
+            style="margin-left: 10px"
+            v-model="formData['subjectId']"
+            placeholder="请选择科目"
+            :size="size"
+          >
+            <el-option
+              v-for="(items, indexs) in subjectList"
+              :key="indexs"
+              :label="items.subjectName"
+              :value="items.id"
+            ></el-option>
+          </el-select>
+          <el-input
+            style="margin-left: 10px; width: 240px"
+            :size="size"
+            v-model="formData['key']"
+            placeholder="请输入试卷名称或试卷编码"
+          ></el-input>
+          <el-button
+            style="margin-left: 10px"
+            :size="size"
+            type="primary"
+            @click="getGoods(1)"
+            >查询</el-button
+          >
+          <el-button :size="size" @click="init">重置</el-button>
+        </div>
+        <el-table
+          v-loading="loading"
+          ref="multipleTable"
+          :data="tableData"
+          border
+          :header-cell-style="{
+            'background-color': '#eee',
+            padding: '8px',
+            color: '#333',
+          }"
+        >
+          <el-table-column label="" width="45" align="center">
+            <template scope="scope">
+              <el-radio
+                :label="scope.row.examId"
+                v-model="examActiveObj.examId"
+                @change.native="getExam(scope.row)"
+                >{{ "" }}</el-radio
+              >
+            </template>
+          </el-table-column>
+          <el-table-column
+            v-for="(item, index) in tableSet"
+            :width="item.width"
+            :key="index"
+            :label="item.label"
+            align="center"
+            :show-overflow-tooltip="true"
+            header-align="center"
+          >
+            <template slot-scope="scope">
+              <span v-if="item.scope === 'publishStatus'">{{
+                scope.row[item.prop] === 1 ? "已发布" : "未发布"
+              }}</span>
+              <span v-else-if="item.scope === 'eduTypes'">
+                {{
+                  scope.row[item.prop1] +
+                  "-" +
+                  scope.row[item.prop2] +
+                  "-" +
+                  scope.row[item.prop3]
+                }}
+              </span>
+              <span v-else>{{ scope.row[item.prop] }}</span></template
+            >
+          </el-table-column>
+        </el-table>
+        <pagination
+          :total="total"
+          :pageSize="formData.pageSize"
+          :currentPage="formData.pageNum"
+          @handleSizeChange="handleSizeChange"
+          @handleCurrentChange="handleCurrentChange"
+        />
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogGoods = false">取 消</el-button>
+        <el-button type="primary" @click="submitnewGoods">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import pagination from "@/components/pagination";
+export default {
+  components: { pagination },
+  data() {
+    return {
+      size: "small",
+      dialogGoods: false,
+      getData: {},
+      subjectList: [],
+      formData: {
+        pageSize: 10,
+        pageNum: 1,
+        publishStatus: 1,
+      },
+      total: 0,
+      tableData: [],
+      tableSet: [
+        {
+          label: "试卷编码",
+          prop: "code",
+          hidden: false,
+        },
+        {
+          label: "名称前缀",
+          prop: "prefixName",
+          hidden: false,
+        },
+        {
+          label: "试卷名称",
+          prop: "examName",
+          hidden: true,
+        },
+        {
+          label: "科目",
+          prop: "subjectName",
+          hidden: true,
+        },
+        {
+          label: "业务层级",
+          prop1: "educationName",
+          prop2: "projectName",
+          prop3: "businessName",
+          hidden: false,
+          scope: "eduTypes",
+        },
+        {
+          label: "发布状态",
+          prop: "publishStatus",
+          hidden: true,
+          scope: "fabStatus",
+        },
+      ],
+      examActiveObj: {},
+      index: null, //对应专业索引
+      indexs: null, //对应科目索引
+      loading: false,
+    };
+  },
+  methods: {
+    openBoxGoods(index, indexs,obj) {
+      this.getData = JSON.parse(JSON.stringify(obj))
+      this.$set(this.examActiveObj, "examId", obj.examId);
+      this.$set(this.examActiveObj, "examName", obj.examName);
+      this.index = index;
+      this.indexs = indexs;
+      this.getSujects();
+      this.init();
+      this.dialogGoods = true;
+    },
+    getSujects() {
+      this.$api
+        .inquireCourseSubject({
+          status: 1,
+          businessId: this.getData.businessId,
+        })
+        .then((res) => {
+          this.subjectList = res.rows;
+        });
+    },
+    getGoods(int) {
+      this.loading = true;
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      this.$api
+        .inquirebankexamList(this.formData)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+          console.log(this.examActiveObj)
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    init() {
+      this.formData = {
+        businessId: this.getData.businessId,
+        pageSize: 10,
+        pageNum: 1,
+        subjectId: "",
+        key: "",
+        publishStatus: 1,
+        status: 1,
+        // paperName: "模考配的试卷",
+      };
+      this.getGoods();
+    },
+    submitnewGoods() {
+      this.dialogGoods = false;
+      this.$emit("backData", this.index, this.indexs, this.examActiveObj);
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.getGoods();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.getGoods();
+    },
+    getExam(row) {
+      this.$set(this.examActiveObj, "examId", row.examId);
+      this.$set(this.examActiveObj, "examName", row.examName);
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.dis_sty {
+  display: flex;
+  align-items: center;
+  margin-bottom: 10px;
+}
+.ul_style {
+  margin-top: 20px;
+  max-height: 500px;
+  overflow: auto;
+}
+/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>

+ 401 - 0
src/views/education/mockTestManagement/mockExamArrangement/activeGoodsPop.vue

@@ -0,0 +1,401 @@
+<template>
+  <div id="activeGoodsPop">
+    <el-dialog
+      destroy-on-close
+      :visible.sync="dialogGoods"
+      width="1100px"
+      :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="dialogGoods = false"
+          />
+        </div>
+      </div>
+      <div>
+        <div class="dis_sty">
+          <el-select
+            v-model="formData['goodsType']"
+            placeholder="请选择商品类型"
+            :size="size"
+            @change="formData.subjectId = ''"
+          >
+            <el-option
+              v-for="(items, indexs) in $methodsTools.getGoodsType()"
+              :key="indexs"
+              :label="items.label"
+              :value="items.value"
+            ></el-option>
+          </el-select>
+          <el-select
+            v-if="formData.goodsType"
+            style="margin-left: 10px"
+            v-model="formData['subjectId']"
+            placeholder="请选择科目"
+            :size="size"
+          >
+            <el-option
+              v-for="(items, indexs) in subjectList"
+              :key="indexs"
+              :label="items.subjectName"
+              :value="items.id"
+            ></el-option>
+          </el-select>
+          <el-input
+            style="margin-left: 10px; width: 240px"
+            :size="size"
+            v-model="formData['goodsName']"
+            placeholder="请输入商品名称"
+          ></el-input>
+          <el-input
+            style="margin-left: 10px; width: 240px"
+            :size="size"
+            v-model="formData['standPrice']"
+            placeholder="请输入价格"
+          ></el-input>
+          <el-button
+            style="margin-left: 10px"
+            :size="size"
+            type="primary"
+            @click="getGoods(1)"
+            >查询</el-button
+          >
+          <el-button :size="size" @click="init">重置</el-button>
+        </div>
+        <el-table
+          ref="multipleTable"
+          :data="tableData"
+          border
+          @selection-change="selectCheck"
+          row-key="goodsId"
+          :header-cell-style="{
+            'background-color': '#eee',
+            padding: '8px',
+            color: '#333',
+          }"
+        >
+          <el-table-column
+            align="center"
+            type="selection"
+            width="55"
+            header-align="center"
+            :selectable="checkboxT"
+            :reserve-selection="true"
+          ></el-table-column>
+          <el-table-column
+            v-for="(item, index) in tableSet"
+            :width="item.width"
+            :key="index"
+            :label="item.label"
+            align="center"
+            :show-overflow-tooltip="true"
+            header-align="center"
+          >
+            <template slot-scope="scope">
+              <span v-if="item.scope === 'status'">{{
+                scope.row[item.prop] === 1 ? "上架" : "未上架"
+              }}</span>
+              <span v-else-if="item.scope === 'goodsType'">
+                {{ computedType(scope.row[item.prop]) }}
+              </span>
+              <span v-else-if="item.scope === 'status1'">{{
+                scope.row[item.prop] === 1 ? "有效" : "无效"
+              }}</span>
+              <span v-else-if="item.scope === 'times'">
+                {{ $methodsTools.onlyForma(scope.row[item.prop1]) }} -
+                {{ $methodsTools.onlyForma(scope.row[item.prop2]) }}
+              </span>
+              <span v-else>{{ scope.row[item.prop] }}</span></template
+            >
+          </el-table-column>
+        </el-table>
+        <pagination
+          :total="total"
+          :pageSize="formData.pageSize"
+          :currentPage="formData.pageNum"
+          @handleSizeChange="handleSizeChange"
+          @handleCurrentChange="handleCurrentChange"
+        />
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogGoods = false">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="submitnewGoods"
+          :disabled="goodsActiveList.length === 0"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import pagination from "@/components/pagination";
+export default {
+  components: { pagination },
+  data() {
+    return {
+      size: "small",
+      dialogGoods: false,
+      getData: {
+        goodsIds: [],
+      },
+      subjectList: [],
+      formData: {
+        pageSize: 10,
+        pageNum: 1,
+        status: 1,
+      },
+      total: 0,
+      tableData: [],
+      tableSet: [
+        {
+          label: "商品编码",
+          prop: "code",
+          width: "140px",
+        },
+        {
+          label: "商品类型",
+          prop: "goodsType",
+          width: "140px",
+          scope: "goodsType",
+        },
+        {
+          label: "商品名称",
+          prop: "goodsName",
+          width: "260px",
+        },
+        {
+          label: "标准价格(¥)",
+          prop: "standPrice",
+          width: "140px",
+        },
+        {
+          label: "商品状态",
+          prop: "status",
+          scope: "status1",
+          width: "110px",
+        },
+        {
+          label: "商品有效期",
+          prop1: "validityStartTime",
+          prop2: "validityEndTime",
+          scope: "times",
+          width: "310px",
+        },
+        {
+          label: "商品可售状态",
+          prop: "goodsStatus",
+          scope: "status",
+          width: "130px",
+        },
+      ],
+      goodsActiveList: [],
+      index: null, //对应专业索引
+      indexs: null, //对应科目索引
+    };
+  },
+  computed: {
+    computedType: function () {
+      return function (typeId) {
+        var str = "";
+        switch (typeId) {
+          case 1:
+            str = "视频";
+            break;
+          case 2:
+            str = "题库";
+            break;
+          case 3:
+            str = "补考";
+            break;
+          case 4:
+            str = "前培";
+            break;
+          case 6:
+            str = "直播";
+            break
+          default:
+            break;
+        }
+        return str;
+      };
+    },
+  },
+  methods: {
+    openBoxGoods(index, indexs, getData) {
+      this.goodsActiveList = [];
+      this.index = index;
+      this.indexs = indexs;
+      this.getData = JSON.parse(JSON.stringify(getData));
+      console.log(this.getData, "this.getData");
+      this.getSujects();
+      this.init();
+      this.dialogGoods = true;
+    },
+    getSujects() {
+      this.$api
+        .inquireCourseSubject({
+          status: 1,
+          businessId: this.getData.businessId,
+        })
+        .then((res) => {
+          this.subjectList = res.rows;
+        });
+    },
+    getGoods(int) {
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      this.$api.inquireGoods(this.formData).then((res) => {
+        this.tableData = res.rows;
+        this.total = res.total;
+      });
+    },
+    init() {
+      this.formData = {
+        businessId: this.getData.businessId,
+        pageSize: 10,
+        pageNum: 1,
+        subjectId: "",
+        goodsName: "",
+        standPrice: "",
+        status: 1,
+        goodsType: "",
+      };
+      this.getGoods();
+    },
+    submitnewGoods() {
+      this.dialogGoods = false;
+      this.$emit("backData", this.index, this.indexs, this.goodsActiveList);
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.getGoods();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.getGoods();
+    },
+    selectCheck(value) {
+      this.goodsActiveList = value;
+    },
+    checkboxT(row, index) {
+      if (this.getData.goodsIds.includes(row.goodsId)) {
+        return false;
+      } else {
+        return true;
+      }
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.dis_sty {
+  display: flex;
+  align-items: center;
+  margin-bottom: 10px;
+}
+.ul_style {
+  margin-top: 20px;
+  max-height: 500px;
+  overflow: auto;
+}
+/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>

+ 387 - 0
src/views/education/mockTestManagement/mockExamArrangement/activeSection.vue

@@ -0,0 +1,387 @@
+<template>
+  <div id="activeSection">
+    <el-dialog
+      destroy-on-close
+      :visible.sync="dialogGoods"
+      width="1100px"
+      :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="dialogGoods = false"
+          />
+        </div>
+      </div>
+      <div>
+        <div class="dis_sty">
+          <el-select
+            style="margin-left: 10px"
+            v-model="formData['subjectId']"
+            placeholder="请选择科目"
+            :size="size"
+          >
+            <el-option
+              v-for="(items, indexs) in subjectList"
+              :key="indexs"
+              :label="items.subjectName"
+              :value="items.id"
+            ></el-option>
+          </el-select>
+          <el-select
+            style="margin-left: 10px"
+            v-model="formData['sectionType']"
+            placeholder="请选择节类型"
+            :size="size"
+          >
+            <el-option
+              v-for="(items, indexs) in sectionTypeList"
+              :key="indexs"
+              :label="items.label"
+              :value="items.value"
+            ></el-option>
+          </el-select>
+          <el-input
+            style="margin-left: 10px; width: 240px"
+            :size="size"
+            v-model="formData['prefixName']"
+            placeholder="请输入标题前缀"
+          ></el-input>
+          <el-input
+            style="margin-left: 10px; width: 240px"
+            :size="size"
+            v-model="formData['name']"
+            placeholder="请输入节标题"
+          ></el-input>
+          <el-button
+            style="margin-left: 10px"
+            :size="size"
+            type="primary"
+            @click="getGoods(1)"
+            >查询</el-button
+          >
+          <el-button :size="size" @click="init">重置</el-button>
+        </div>
+        <el-table
+          v-loading="loading"
+          ref="multipleTable"
+          :data="tableData"
+          border
+          :header-cell-style="{
+            'background-color': '#eee',
+            padding: '8px',
+            color: '#333',
+          }"
+        >
+          <el-table-column label="" width="45" align="center">
+            <template scope="scope">
+              <el-radio
+                :label="scope.row.sectionId"
+                v-model="sectionActiveObj.sectionId"
+                @change.native="getSection(scope.row)"
+                >{{ "" }}</el-radio
+              >
+            </template>
+          </el-table-column>
+          <el-table-column
+            v-for="(item, index) in tableSet"
+            :width="item.width"
+            :key="index"
+            :label="item.label"
+            align="center"
+            :show-overflow-tooltip="true"
+            header-align="center"
+          >
+            <template slot-scope="scope">
+              <span v-if="item.scope === 'publishStatus'">{{
+                scope.row[item.prop] === 1 ? "已发布" : "未发布"
+              }}</span>
+
+              <span v-else-if="item.scope === 'computedType'">{{
+                computedType(scope.row[item.prop])
+              }}</span>
+              <span v-else>{{ scope.row[item.prop] }}</span></template
+            >
+          </el-table-column>
+        </el-table>
+        <pagination
+          :total="total"
+          :pageSize="formData.pageSize"
+          :currentPage="formData.pageNum"
+          @handleSizeChange="handleSizeChange"
+          @handleCurrentChange="handleCurrentChange"
+        />
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogGoods = false">取 消</el-button>
+        <el-button type="primary" @click="submitnewGoods">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import pagination from "@/components/pagination";
+export default {
+  components: { pagination },
+  data() {
+    return {
+      size: "small",
+      dialogGoods: false,
+      getData: {},
+      subjectList: [],
+      formData: {
+        pageSize: 10,
+        pageNum: 1,
+        publishStatus: 1,
+      },
+      total: 0,
+      tableData: [],
+      sectionTypeList: [
+        {
+          label: "录播",
+          value: 1,
+        },
+        {
+          label: "直播",
+          value: 2,
+        },
+        {
+          label: "回放",
+          value: 3,
+        },
+      ],
+      // 表单
+      tableSet: [
+        {
+          label: "节编码",
+          prop: "code",
+          hidden: false,
+        },
+        {
+          label: "标题前缀",
+          prop: "prefixName",
+          hidden: false,
+        },
+        {
+          label: "节标题",
+          prop: "name",
+          hidden: true,
+        },
+        {
+          label: "节类型",
+          prop: "sectionType",
+          hidden: true,
+          scope: "computedType",
+        },
+        {
+          label: "发布状态",
+          prop: "publishStatus",
+          scope: "publishStatus",
+          hidden: true,
+        },
+      ],
+      sectionActiveObj: {},
+      index: null, //对应专业索引
+      indexs: null, //对应科目索引
+      loading: false,
+    };
+  },
+  computed: {
+    computedType: function () {
+      return function (typeId) {
+        var str = "";
+        switch (typeId) {
+          case 1:
+            str = "录播";
+            break;
+          case 2:
+            str = "直播";
+            break;
+          case 3:
+            str = "回放";
+            break;
+          default:
+            break;
+        }
+        return str;
+      };
+    },
+  },
+  methods: {
+    openBoxGoods(index, indexs, obj) {
+      this.getData = JSON.parse(JSON.stringify(obj));
+      this.$set(this.sectionActiveObj, "sectionId", obj.sectionId);
+      this.$set(this.sectionActiveObj, "sectionName", obj.sectionName);
+      this.index = index;
+      this.indexs = indexs;
+      this.getSujects();
+      this.init();
+      this.dialogGoods = true;
+    },
+    getSujects() {
+      this.$api
+        .inquireCourseSubject({
+          status: 1,
+          businessId: this.getData.businessId,
+        })
+        .then((res) => {
+          this.subjectList = res.rows;
+        });
+    },
+    getGoods(int) {
+      this.loading = true;
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      this.$api
+        .inquireCourseSection(this.formData)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    init() {
+      this.formData = {
+        businessId: this.getData.businessId,
+        pageSize: 10,
+        pageNum: 1,
+        subjectId: "",
+        prefixName: "",
+        name: "",
+        sectionType: "",
+        publishStatus: 1,
+        status: 1,
+        // paperName: "模考配的试卷",
+      };
+      this.getGoods();
+    },
+    submitnewGoods() {
+      this.dialogGoods = false;
+      this.$emit("backData", this.index, this.indexs, this.sectionActiveObj);
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.getGoods();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.getGoods();
+    },
+    getSection(row) {
+      this.$set(this.sectionActiveObj, "sectionId", row.sectionId);
+      this.$set(this.sectionActiveObj, "sectionName", row.name);
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.dis_sty {
+  display: flex;
+  align-items: center;
+  margin-bottom: 10px;
+}
+.ul_style {
+  margin-top: 20px;
+  max-height: 500px;
+  overflow: auto;
+}
+/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>

+ 438 - 0
src/views/education/mockTestManagement/mockExamArrangement/addMockExam/index.vue

@@ -0,0 +1,438 @@
+<template>
+  <div id="addMockExam">
+    <el-form
+      label-position="right"
+      label-width="150px"
+      :model="listData"
+      :rules="rules"
+      ref="listData"
+    >
+      <el-form-item label="模考封面" prop="applyUrl">
+        <div class="dis_fs">
+          <el-image
+            class="imgBoxs"
+            :src="$methodsTools.splitImgHost(listData.applyUrl)"
+            :preview-src-list="[$methodsTools.splitImgHost(listData.applyUrl)]"
+          ></el-image>
+          <label class="btns"
+            >修改封面
+            <input
+              ref="file"
+              type="file"
+              style="display: none"
+              @change="editImg"
+            />
+          </label>
+        </div>
+        <div
+          style="
+            font-size: 12px;
+            color: #999;
+            line-height: 20px;
+            margin-top: 10px;
+          "
+        >
+          注:请上传小于300kb,尺寸为1920*930的像素图片,支持gif、jpg、jpeg、png等类型
+        </div>
+      </el-form-item>
+      <el-form-item label="模考标题" prop="applyName">
+        <el-input
+          placeholder="请输入模考标题"
+          :style="`max-width:${maxWidth}px;`"
+          v-model="listData.applyName"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="模考简介" prop="applyIntroduce">
+        <el-input
+          :style="`max-width:${maxWidth}px;`"
+          type="textarea"
+          :rows="4"
+          v-model="listData.applyIntroduce"
+          placeholder="请输入模考简介"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="业务层级" prop="educationTypeId">
+        <el-select
+          v-model="listData.educationTypeId"
+          placeholder="请选择教育类型"
+          :disabled="
+            $refs.infoPage
+              ? $refs.infoPage.infoData.length > 0
+                ? true
+                : false
+              : false
+          "
+        >
+          <el-option
+            v-for="(item, index) in educationType"
+            :key="index"
+            :label="item.educationName"
+            :value="item.id"
+          >
+          </el-option>
+        </el-select>
+        <el-form-item
+          v-if="listData.educationTypeId"
+          label=""
+          label-width="20"
+          prop="businessId"
+          class="dis_inblock"
+        >
+          <el-select
+            style="margin-left: 10px"
+            v-model="listData.businessId"
+            placeholder="请选择业务层次"
+            :disabled="
+              $refs.infoPage
+                ? $refs.infoPage.infoData.length > 0
+                  ? true
+                  : false
+                : false
+            "
+          >
+            <el-option
+              v-for="(item, index) in newCourTypeOptions"
+              :key="index"
+              :label="item.projectName + '-' + item.businessName"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-form-item>
+      <el-form-item label="模考专业" required>
+        <info-page
+          ref="infoPage"
+          :listData="listData"
+          :newMajorOption="newMajorOption"
+          :newsubjectOption="newsubjectOption"
+        />
+      </el-form-item>
+      <el-form-item label="预约时间" prop="timeArray">
+        <el-date-picker
+          v-model="listData.timeArray"
+          type="datetimerange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          value-format="timestamp"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="开考时间限制:" prop="timeLimit">
+        开考后
+        <el-input-number
+          size="small"
+          style="width: 120px"
+          :min="1"
+          :max="60"
+          :precision="0"
+          v-model="listData.timeLimit"
+          controls-position="right"
+        ></el-input-number>
+        分钟,不能参加考试
+      </el-form-item>
+      <el-form-item label="状态" prop="status">
+        <el-radio-group v-model="listData.status">
+          <el-radio :label="1">启用</el-radio>
+          <el-radio :label="0">关闭</el-radio>
+        </el-radio-group>
+      </el-form-item>
+    </el-form>
+    <div style="text-align: center; max-width: 500px">
+      <el-button size="small" @click="backPage">取消</el-button>
+      <el-button size="small" type="primary" @click="validateForm('listData')"
+        >确定</el-button
+      >
+    </div>
+  </div>
+</template>
+
+<script>
+import infoPage from "./infoPage.vue";
+import { mapGetters } from "vuex";
+export default {
+  name: "AddMockExam",
+  components: { infoPage },
+  data() {
+    return {
+      maxWidth: 360,
+      listData: {
+        applyUrl: "oss/images/avatar/20211013/1634097664410_1397766697",
+        status: 1,
+      },
+      rules: {
+        applyName: [
+          { required: true, message: "请填输入模考标题", trigger: "blur" },
+        ],
+        educationTypeId: [
+          { required: true, message: "请选择教育类型", trigger: "change" },
+        ],
+        businessId: [
+          { required: true, message: "请选择业务层次", trigger: "change" },
+        ],
+        timeArray: [
+          {
+            required: true,
+            message: "请选择预约时间",
+            trigger: ["blur", "change"],
+          },
+        ],
+        status: [
+          {
+            required: true,
+            message: "请选择状态",
+            trigger: "change",
+          },
+        ],
+      },
+      newCourTypeOptions: [], //业务层次
+      newMajorOption: [], //专业
+      newsubjectOption: [], //科目
+    };
+  },
+  watch: {
+    /**
+     * 教育类型切换
+     */
+    "listData.educationTypeId"(val) {
+      this.$set(this.listData, "businessId", "");
+      if (val) {
+        this.getBusinessList(val);
+      }
+    },
+    /**
+     * 业务层次切换
+     */
+    "listData.businessId"(val) {
+      if (val) {
+        this.getInitList(val);
+      }
+    },
+  },
+  computed: { ...mapGetters(["educationType"]) },
+  mounted() {
+    this.$bus.$on("validateBusinessId", () => {
+      this.$refs["listData"].validateField("educationTypeId");
+      this.$refs["listData"].validateField("businessId");
+    });
+  },
+  methods: {
+    /**
+     * 校验表单
+     */
+    validateForm(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.submitForm();
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    /**
+     * 规则检验
+     */
+    valCheckFunc() {
+      return new Promise((resolve, reject) => {
+        if (this.$refs.infoPage.infoData.length <= 0) {
+          this.$message.error("至少添加1个专业");
+          reject();
+        } else {
+          const checkSubjectNum = this.$refs.infoPage.infoData.every((item) => {
+            if (item.mockMajorSubjectList) {
+              return item.mockMajorSubjectList.length > 0;
+            } else {
+              return false;
+            }
+          });
+          if (checkSubjectNum) {
+            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 (checkSubjectTime) {
+                    if (!items.examId) {
+                      throw new Error("请检查关联试卷是否关联");
+                    }
+                  } else {
+                    throw new Error("请检查考试日期是否填写");
+                  }
+                });
+              });
+            } catch (error) {
+              this.$message.error(error);
+              reject();
+            }
+          } else {
+            this.$message.error("每个专业里至少添加1个科目");
+            reject();
+          }
+        }
+        resolve();
+      });
+    },
+    /**
+     * 提交表单
+     */
+    submitForm() {
+      this.valCheckFunc()
+        .then(() => {
+          let data = JSON.parse(JSON.stringify(this.listData));
+          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()
+                );
+              });
+            });
+          });
+          array.sort((a, b) => {
+            return a - b;
+          });
+          if (data.timeArray[1] >= array[0]) {
+            this.$message.error("预约时间需要不得超过考试时间,请重新设置");
+            return;
+          }
+          for (let i = 0; i < this.newCourTypeOptions.length; i++) {
+            if (data.businessId === this.newCourTypeOptions[i].id) {
+              data.projectId = this.newCourTypeOptions[i].projectId;
+              break;
+            }
+          }
+          data.applyStartTime = this.$methodsTools.time10to13(
+            data.timeArray[0],
+            1
+          );
+          data.applyEndTime = this.$methodsTools.time10to13(
+            data.timeArray[1],
+            1
+          );
+          delete data.timeArray;
+          this.$api.appmockapply(data).then((res) => {
+            this.$message.success("新增成功");
+            setTimeout(() => {
+              this.$store
+                .dispatch("tagsView/exitView", this.$route)
+                .then((res) => {
+                  this.$router.push({
+                    path: "mockExamArrangement",
+                  });
+                });
+            }, 300);
+          });
+        })
+        .catch((err) => {
+          console.log("提交失败");
+        });
+    },
+    //返回
+    backPage() {
+      this.$store.dispatch("tagsView/delView", this.$route).then((res) => {
+        this.$router.push({
+          path: "mockExamArrangement",
+        });
+      });
+    },
+    /**
+     * 根据条件获取业务层次列表
+     */
+    getBusinessList(val) {
+      this.$api
+        .inquirebusinessList({ status: 1, educationId: val })
+        .then((res) => {
+          this.newCourTypeOptions = res.rows;
+        });
+    },
+    /**
+     * 根据条件获取专业科目列表
+     */
+    getInitList(val) {
+      /**
+       * 专业
+       */
+      this.$api
+        .inquireCourseMajor({ status: 1, businessId: val })
+        .then((res) => {
+          this.newMajorOption = res.rows;
+        });
+      /**
+       * 科目
+       */
+      this.$api
+        .inquireCourseSubject({ status: 1, businessId: val })
+        .then((res) => {
+          this.newsubjectOption = res.rows;
+        });
+    },
+    /**
+     * 修改封面
+     */
+    editImg(e) {
+      var file = e.target.files[0];
+      if (file === undefined) {
+        return;
+      }
+      if (file.size > 0.3 * 1024 * 1024) {
+        this.$message.warning("图片不得大于300kb");
+        return;
+      }
+      var type = this.$refs.file.value.toLowerCase().split(".").splice(-1);
+      if (
+        type[0] != "jpg" &&
+        type[0] != "png" &&
+        type[0] != "jpeg" &&
+        type[0] != "gif"
+      ) {
+        this.$message.warning("上传格式需为:.jpg/.png/.jpeg/gif");
+        this.$refs.file.value = "";
+        return;
+      }
+      this.$upload.upload(file, 0).then((res) => {
+        this.listData.applyUrl = res;
+      });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.dis_fs {
+  display: flex;
+  align-items: center;
+  .imgBoxs {
+    width: 200px;
+    height: 130px;
+    border: 1px solid #999;
+    margin-right: 6px;
+  }
+  .btns {
+    align-self: end;
+    border: 1px solid #999;
+    font-size: 12px;
+    height: 28px;
+    line-height: 28px;
+    padding: 0px 10px;
+    border-radius: 4px;
+    cursor: pointer;
+  }
+}
+.dis_inblock {
+  display: inline-block;
+}
+</style>

+ 482 - 0
src/views/education/mockTestManagement/mockExamArrangement/addMockExam/infoPage.vue

@@ -0,0 +1,482 @@
+<template>
+  <div id="infoPage">
+    <el-dropdown trigger="click" ref="dropdown" @command="handleCommand">
+      <el-button type="text" @click="addMajed">
+        添加专业<i class="el-icon-arrow-down el-icon--right"></i>
+      </el-button>
+      <el-dropdown-menu slot="dropdown">
+        <el-dropdown-item v-if="!newMajorOption.length" disabled
+          >暂无专业</el-dropdown-item
+        >
+        <el-dropdown-item
+          v-for="(item, index) in newMajorOption"
+          :key="index"
+          :command="item"
+          :disabled="computedDisabled(item.id)"
+          >{{ item.categoryName }}</el-dropdown-item
+        >
+      </el-dropdown-menu>
+    </el-dropdown>
+    <ul class="majStyle" v-for="(item, index) in infoData" :key="index">
+      <li>
+        <span style="font-weight: bold">{{ getMajName(item.majorId) }}</span
+        >:
+        <el-dropdown
+          trigger="click"
+          ref="dropdownSubject"
+          @command="handleSubjedt($event, index)"
+        >
+          <el-button type="text">
+            添加科目<i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item v-if="!newsubjectOption.length" disabled
+              >暂无科目</el-dropdown-item
+            >
+            <el-dropdown-item
+              v-for="(items, indexs) in newsubjectOption"
+              :key="indexs"
+              :command="items"
+              :disabled="computedSubjedtDisabled(items.id, index)"
+              >{{ items.subjectName }}</el-dropdown-item
+            >
+          </el-dropdown-menu>
+        </el-dropdown>
+        <el-button
+          type="text"
+          style="float: right"
+          @click="infoData.splice(index, 1)"
+          >删除</el-button
+        >
+        <ul
+          class="subjectStyle"
+          v-for="(items, indexs) in item.mockMajorSubjectList"
+          :key="indexs"
+        >
+          <li class="subjectList_sty">
+            <span style="font-weight: bold"
+              >{{ getsubjectName(items.subjectId) }}
+            </span>
+            <el-button
+              type="text"
+              style="margin-left: 10px"
+              @click="addTime(index, indexs)"
+              >添加日期</el-button
+            >
+            <el-button
+              type="text"
+              style="float: right"
+              @click="item.mockMajorSubjectList.splice(indexs, 1)"
+              >删除</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`,
+                  }"
+                >
+                </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>
+              <div style="margin-bottom: 10px">
+                <el-button
+                  type="primary"
+                  :size="size"
+                  @click="activeExam(index, indexs)"
+                  >关联试卷</el-button
+                >
+                <span style="margin: 0px 10px">{{ items.examName }}</span>
+              </div>
+              <div style="margin-bottom: 10px">
+                <el-button
+                  type="primary"
+                  :size="size"
+                  @click="activeSection(index, indexs)"
+                  >关联讲解</el-button
+                >
+                <span style="margin: 0px 10px">{{ items.sectionName }}</span>
+                <i
+                  class="deleteStyle"
+                  @click="clearSection(index, indexs)"
+                  v-if="items.sectionName && items.sectionId"
+                  >删除</i
+                >
+              </div>
+              <div style="margin-bottom: 10px">
+                指定开放学员,有购买一下商品:<el-button
+                  type="info"
+                  :size="size"
+                  @click="activeGoods(index, indexs)"
+                  >选择商品</el-button
+                >
+              </div>
+              <ul class="goodslist_style">
+                <li
+                  v-for="(
+                    ititem, itindex
+                  ) in items.mockMajorSubjectGoodsList"
+                  :key="itindex"
+                >
+                  {{ ititem.goodsCode }}-{{ ititem.goodsName }}-<span
+                    style="color: red"
+                    >¥{{ ititem.price }}</span
+                  ><i
+                    class="deleteStyle"
+                    style="margin-left: 10px"
+                    @click="
+                      items.mockMajorSubjectGoodsList.splice(itindex, 1)
+                    "
+                    >删除</i
+                  >
+                </li>
+              </ul>
+            </div>
+          </li>
+        </ul>
+      </li>
+    </ul>
+    <active-goods-pop ref="activeGoodsPop" @backData="backData" />
+    <active-exam ref="activeExam" @backData="backDataExam" />
+    <active-section ref="activeSection" @backData="backDataSection" />
+  </div>
+</template>
+
+<script>
+import activeGoodsPop from "../activeGoodsPop.vue";
+import activeExam from "../activeExam.vue";
+import activeSection from "../activeSection.vue";
+export default {
+  components: { activeGoodsPop, activeExam, activeSection },
+  props: ["listData", "newMajorOption", "newsubjectOption"],
+  data() {
+    return {
+      infoData: [],
+      size: "mini",
+    };
+  },
+  computed: {
+    //检查专业是否可选
+    computedDisabled: function () {
+      return function (id) {
+        let status = false;
+        for (let i = 0; i < this.infoData.length; i++) {
+          if (this.infoData[i].majorId === id) {
+            status = true;
+            break;
+          }
+        }
+        return status;
+      };
+    },
+    //检查科目是否可选
+    computedSubjedtDisabled: function () {
+      return function (id, index) {
+        let status = false;
+        if (this.infoData[index].mockMajorSubjectList) {
+          for (
+            let i = 0;
+            i < this.infoData[index].mockMajorSubjectList.length;
+            i++
+          ) {
+            if (
+              this.infoData[index].mockMajorSubjectList[i].subjectId === id
+            ) {
+              status = true;
+              break;
+            }
+          }
+        }
+        return status;
+      };
+    },
+    //查询专业名称
+    getMajName: function () {
+      return function (id) {
+        let str = "";
+        for (let i = 0; i < this.newMajorOption.length; i++) {
+          if (this.newMajorOption[i].id === id) {
+            str = this.newMajorOption[i].categoryName;
+            break;
+          }
+        }
+        return str;
+      };
+    },
+    //查询科目名称
+    getsubjectName: function () {
+      return function (id) {
+        let str = "";
+        for (let i = 0; i < this.newsubjectOption.length; i++) {
+          if (this.newsubjectOption[i].id === id) {
+            str = this.newsubjectOption[i].subjectName;
+            break;
+          }
+        }
+        return str;
+      };
+    },
+  },
+  methods: {
+    /**
+     * 校验是否允许添加专业
+     */
+    addMajed() {
+      this.$bus.$emit("validateBusinessId");
+      if (!this.listData.businessId) return;
+    },
+    /**
+     * 添加专业
+     */
+    handleCommand(item) {
+      this.infoData.push({
+        majorId: item.id,
+      });
+    },
+    /**
+     * 添加科目
+     */
+    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", [
+          {
+            subjectId: item.id,
+            mockMajorSubjectTimeList: [
+              { examTime: "", startTime: "", endTime: "" },
+            ],
+            mockMajorSubjectGoodsList: [],
+          },
+        ]);
+      }
+    },
+    /**
+     * 添加时间
+     */
+    addTime(index, indexs) {
+      if (
+        this.infoData[index].mockMajorSubjectList[indexs]
+          .mockMajorSubjectTimeList
+      ) {
+        this.infoData[index].mockMajorSubjectList[
+          indexs
+        ].mockMajorSubjectTimeList.push({
+          examTime: "",
+          startTime: "",
+          endTime: "",
+        });
+      } else {
+        this.$set(
+          this.infoData[index].mockMajorSubjectList[indexs],
+          "mockMajorSubjectTimeList",
+          [
+            {
+              examTime: "",
+              startTime: "",
+              endTime: "",
+            },
+          ]
+        );
+      }
+    },
+    /**
+     * 选择商品index专业索引indexs科目索引
+     */
+    activeGoods(index, indexs) {
+      let goodsIds = this.infoData[index].mockMajorSubjectList[
+        indexs
+      ].mockMajorSubjectGoodsList.map((item) => {
+        return item.goodsId;
+      });
+      this.$refs.activeGoodsPop.openBoxGoods(index, indexs, {
+        educationTypeId: this.listData.educationTypeId,
+        businessId: this.listData.businessId,
+        goodsIds: goodsIds,
+      });
+    },
+    /**
+     * 选择商品-返回数据index专业索引indexs科目索引array选中商品
+     */
+    backData(index, indexs, array) {
+      let arr = array.map((item) => {
+        return {
+          goodsId: item.goodsId,
+          goodsName: item.goodsName,
+          goodsCode: item.code,
+          price: item.standPrice,
+        };
+      });
+      let newConcatArr =
+        this.infoData[index].mockMajorSubjectList[
+          indexs
+        ].mockMajorSubjectGoodsList.concat(arr);
+      this.$set(
+        this.infoData[index].mockMajorSubjectList[indexs],
+        "mockMajorSubjectGoodsList",
+        newConcatArr
+      );
+    },
+    /**
+     * 选择试卷index专业索引indexs科目索引
+     */
+    activeExam(index, indexs) {
+      this.$refs.activeExam.openBoxGoods(index, indexs, {
+        educationTypeId: this.listData.educationTypeId,
+        businessId: this.listData.businessId,
+        examId: this.infoData[index].mockMajorSubjectList[indexs].examId,
+        examName:
+          this.infoData[index].mockMajorSubjectList[indexs].examName,
+      });
+    },
+    /**
+     * 选择试卷-返回数据index专业索引indexs科目索引obj选中试卷
+     */
+    backDataExam(index, indexs, obj) {
+      this.$set(
+        this.infoData[index].mockMajorSubjectList[indexs],
+        "examId",
+        obj.examId
+      );
+      this.$set(
+        this.infoData[index].mockMajorSubjectList[indexs],
+        "examName",
+        obj.examName
+      );
+    },
+    /**
+     * 选择节index专业索引indexs科目索引
+     */
+    activeSection(index, indexs) {
+      this.$refs.activeSection.openBoxGoods(index, indexs, {
+        educationTypeId: this.listData.educationTypeId,
+        businessId: this.listData.businessId,
+        sectionId:
+          this.infoData[index].mockMajorSubjectList[indexs].sectionId,
+        sectionName:
+          this.infoData[index].mockMajorSubjectList[indexs].sectionName,
+      });
+    },
+    /**
+     * 选择节-返回数据index专业索引indexs科目索引obj选中节
+     */
+    backDataSection(index, indexs, obj) {
+      this.$set(
+        this.infoData[index].mockMajorSubjectList[indexs],
+        "sectionId",
+        obj.sectionId
+      );
+      this.$set(
+        this.infoData[index].mockMajorSubjectList[indexs],
+        "sectionName",
+        obj.sectionName
+      );
+    },
+    /**
+     * 删除节
+     */
+    clearSection(index, indexs) {
+      this.$set(
+        this.infoData[index].mockMajorSubjectList[indexs],
+        "sectionId",
+        ""
+      );
+      this.$set(
+        this.infoData[index].mockMajorSubjectList[indexs],
+        "sectionName",
+        ""
+      );
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.majStyle {
+  background-color: #eee;
+  padding: 10px 16px;
+  max-width: 610px;
+}
+.subjectStyle {
+  background-color: rgb(215, 215, 215);
+  padding: 0px 8px;
+  margin-left: 16px;
+  max-width: 100%;
+  .subjectList_sty {
+    margin-bottom: 14px;
+    padding-bottom: 10px;
+  }
+}
+.deleteStyle {
+  color: rgb(106, 121, 6);
+  user-select: none;
+  cursor: pointer;
+  font-style: normal;
+}
+.goodslist_style {
+  max-height: 150px;
+  overflow: auto;
+  background-color: rgb(159, 213, 236);
+  font-size: 12px;
+  padding: 0px 10px;
+  & > li {
+    height: 26px;
+    line-height: 26px;
+  }
+}
+</style>

+ 468 - 0
src/views/education/mockTestManagement/mockExamArrangement/editMockExam/index.vue

@@ -0,0 +1,468 @@
+<template>
+  <div id="editMockExam">
+    <el-form
+      label-position="right"
+      label-width="150px"
+      :model="listData"
+      :rules="rules"
+      ref="listData"
+    >
+      <el-form-item label="模考封面" prop="applyUrl">
+        <div class="dis_fs">
+          <el-image
+            class="imgBoxs"
+            :src="$methodsTools.splitImgHost(listData.applyUrl)"
+            :preview-src-list="[$methodsTools.splitImgHost(listData.applyUrl)]"
+          ></el-image>
+          <label class="btns"
+            >修改封面
+            <input
+              ref="file"
+              type="file"
+              style="display: none"
+              @change="editImg"
+            />
+          </label>
+        </div>
+        <div
+          style="
+            font-size: 12px;
+            color: #999;
+            line-height: 20px;
+            margin-top: 10px;
+          "
+        >
+          注:请上传小于300kb,尺寸为1920*930的像素图片,支持gif、jpg、jpeg、png等类型
+        </div>
+      </el-form-item>
+      <el-form-item label="模考标题" prop="applyName">
+        <el-input
+          placeholder="请输入模考标题"
+          :style="`max-width:${maxWidth}px;`"
+          v-model="listData.applyName"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="模考简介" prop="applyIntroduce">
+        <el-input
+          :style="`max-width:${maxWidth}px;`"
+          type="textarea"
+          :rows="4"
+          v-model="listData.applyIntroduce"
+          placeholder="请输入模考简介"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="业务层级" prop="educationTypeId">
+        <el-select
+          v-model="listData.educationTypeId"
+          placeholder="请选择教育类型"
+          :disabled="
+            $refs.infoPage
+              ? $refs.infoPage.infoData.length > 0
+                ? true
+                : false
+              : false
+          "
+        >
+          <el-option
+            v-for="(item, index) in educationType"
+            :key="index"
+            :label="item.educationName"
+            :value="item.id"
+          >
+          </el-option>
+        </el-select>
+        <el-form-item
+          v-if="listData.educationTypeId"
+          label=""
+          label-width="20"
+          prop="businessId"
+          class="dis_inblock"
+        >
+          <el-select
+            style="margin-left: 10px"
+            v-model="listData.businessId"
+            placeholder="请选择业务层次"
+            :disabled="
+              $refs.infoPage
+                ? $refs.infoPage.infoData.length > 0
+                  ? true
+                  : false
+                : false
+            "
+          >
+            <el-option
+              v-for="(item, index) in newCourTypeOptions"
+              :key="index"
+              :label="item.projectName + '-' + item.businessName"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-form-item>
+      <el-form-item label="模考专业" required>
+        <info-page
+          ref="infoPage"
+          :listData="listData"
+          :newMajorOption="newMajorOption"
+          :newsubjectOption="newsubjectOption"
+        />
+      </el-form-item>
+      <el-form-item label="预约时间" prop="timeArray">
+        <el-date-picker
+          v-model="listData.timeArray"
+          type="datetimerange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          value-format="timestamp"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="开考时间限制:" prop="timeLimit">
+        开考后
+        <el-input-number
+          size="small"
+          style="width: 120px"
+          :min="1"
+          :max="60"
+          :precision="0"
+          v-model="listData.timeLimit"
+          controls-position="right"
+        ></el-input-number>
+        分钟,不能参加考试
+      </el-form-item>
+      <el-form-item label="状态" prop="status">
+        <el-radio-group v-model="listData.status">
+          <el-radio :label="1">启用</el-radio>
+          <el-radio :label="0">关闭</el-radio>
+        </el-radio-group>
+      </el-form-item>
+    </el-form>
+    <div style="text-align: center; max-width: 500px">
+      <el-button size="small" @click="backPage">取消</el-button>
+      <el-button size="small" type="primary" @click="validateForm('listData')"
+        >确定</el-button
+      >
+    </div>
+  </div>
+</template>
+
+<script>
+import infoPage from "./infoPage.vue";
+import { mapGetters } from "vuex";
+export default {
+  name: "AddMockExam",
+  components: { infoPage },
+  data() {
+    return {
+      maxWidth: 360,
+      listData: {
+        applyUrl: "oss/images/avatar/20211013/1634097664410_1397766697",
+        status: 1,
+      },
+      rules: {
+        applyName: [
+          { required: true, message: "请填输入模考标题", trigger: "blur" },
+        ],
+        educationTypeId: [
+          { required: true, message: "请选择教育类型", trigger: "change" },
+        ],
+        businessId: [
+          { required: true, message: "请选择业务层次", trigger: "change" },
+        ],
+        timeArray: [
+          {
+            required: true,
+            message: "请选择预约时间",
+            trigger: ["blur", "change"],
+          },
+        ],
+        status: [
+          {
+            required: true,
+            message: "请选择状态",
+            trigger: "change",
+          },
+        ],
+      },
+      newCourTypeOptions: [], //业务层次
+      newMajorOption: [], //专业
+      newsubjectOption: [], //科目
+    };
+  },
+  watch: {
+    /**
+     * 教育类型切换
+     */
+    "listData.educationTypeId"(val) {
+      // this.$set(this.listData, "businessId", "");
+      if (val) {
+        this.getBusinessList(val);
+      }
+    },
+    /**
+     * 业务层次切换
+     */
+    "listData.businessId"(val) {
+      if (val) {
+        this.getInitList(val);
+      }
+    },
+  },
+  computed: { ...mapGetters(["educationType"]) },
+  created() {
+    this.id = this.$route.query.id;
+  },
+  mounted() {
+    this.$bus.$on("validateBusinessId", () => {
+      this.$refs["listData"].validateField("educationTypeId");
+      this.$refs["listData"].validateField("businessId");
+    });
+    this.getInitData();
+  },
+  methods: {
+    //返回
+    backPage() {
+      this.$store.dispatch("tagsView/delView", this.$route).then((res) => {
+        this.$router.push({
+          path: "mockExamArrangement",
+        });
+      });
+    },
+    getInitData() {
+      this.$api.inquiremockapplylistApplydata(this.id).then((res) => {
+        //模考专业处理逻辑
+        let data = JSON.parse(JSON.stringify(res.data.mockMajorList));
+        data.forEach((item) => {
+          item.mockMajorSubjectList.forEach((items) => {
+            items.mockMajorSubjectTimeList.forEach((itemTime) => {
+              itemTime.examTime = parseInt(itemTime.examTime * 1000);
+            });
+          });
+        });
+        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;
+        this.listData = res.data;
+        this.$nextTick(() => {
+          //模考专业
+          this.$refs.infoPage.getBybusinfoPage(data);
+        });
+      });
+    },
+    /**
+     * 校验表单
+     */
+    validateForm(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.submitForm();
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    /**
+     * 规则检验
+     */
+    valCheckFunc() {
+      return new Promise((resolve, reject) => {
+        if (this.$refs.infoPage.infoData.length <= 0) {
+          this.$message.error("至少添加1个专业");
+          reject();
+        } else {
+          const checkSubjectNum = this.$refs.infoPage.infoData.every((item) => {
+            if (item.mockMajorSubjectList) {
+              return item.mockMajorSubjectList.length > 0;
+            } else {
+              return false;
+            }
+          });
+          if (checkSubjectNum) {
+            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 (checkSubjectTime) {
+                    if (!items.examId) {
+                      throw new Error("请检查关联试卷是否关联");
+                    }
+                  } else {
+                    throw new Error("请检查考试日期是否填写");
+                  }
+                });
+              });
+            } catch (error) {
+              this.$message.error(error);
+              reject();
+            }
+          } else {
+            this.$message.error("每个专业里至少添加1个科目");
+            reject();
+          }
+        }
+        resolve();
+      });
+    },
+    /**
+     * 提交表单
+     */
+    submitForm() {
+      this.valCheckFunc()
+        .then(() => {
+          let data = JSON.parse(JSON.stringify(this.listData));
+          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()
+                );
+              });
+            });
+          });
+          array.sort((a, b) => {
+            return a - b;
+          });
+          if(data.timeArray[1] >= array[0]){
+            this.$message.error("预约时间需要不得超过考试时间,请重新设置")
+            return
+          }
+          for (let i = 0; i < this.newCourTypeOptions.length; i++) {
+            if (data.businessId === this.newCourTypeOptions[i].id) {
+              data.projectId = this.newCourTypeOptions[i].projectId;
+              break;
+            }
+          }
+          data.applyStartTime = this.$methodsTools.time10to13(
+            data.timeArray[0],
+            1
+          );
+          data.applyEndTime = this.$methodsTools.time10to13(
+            data.timeArray[1],
+            1
+          );
+          delete data.timeArray;
+          this.$api.editmockapply(data).then((res) => {
+            this.$message.success("修改成功");
+            setTimeout(() => {
+              this.$store
+                .dispatch("tagsView/exitView", this.$route)
+                .then((res) => {
+                  this.$router.push({
+                    path: "mockExamArrangement",
+                  });
+                });
+            }, 300);
+          });
+        })
+        .catch((err) => {
+          console.log("提交失败");
+        });
+    },
+    /**
+     * 根据条件获取业务层次列表
+     */
+    getBusinessList(val) {
+      this.$api
+        .inquirebusinessList({ status: 1, educationId: val })
+        .then((res) => {
+          this.newCourTypeOptions = res.rows;
+        });
+    },
+    /**
+     * 根据条件获取专业科目列表
+     */
+    getInitList(val) {
+      /**
+       * 专业
+       */
+      this.$api
+        .inquireCourseMajor({ status: 1, businessId: val })
+        .then((res) => {
+          this.newMajorOption = res.rows;
+        });
+      /**
+       * 科目
+       */
+      this.$api
+        .inquireCourseSubject({ status: 1, businessId: val })
+        .then((res) => {
+          this.newsubjectOption = res.rows;
+        });
+    },
+    /**
+     * 修改封面
+     */
+    editImg(e) {
+      var file = e.target.files[0];
+      if (file === undefined) {
+        return;
+      }
+      if (file.size > 0.3 * 1024 * 1024) {
+        this.$message.warning("图片不得大于300kb");
+        return;
+      }
+      var type = this.$refs.file.value.toLowerCase().split(".").splice(-1);
+      if (
+        type[0] != "jpg" &&
+        type[0] != "png" &&
+        type[0] != "jpeg" &&
+        type[0] != "gif"
+      ) {
+        this.$message.warning("上传格式需为:.jpg/.png/.jpeg/gif");
+        this.$refs.file.value = "";
+        return;
+      }
+      this.$upload.upload(file, 0).then((res) => {
+        this.listData.applyUrl = res;
+      });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.dis_fs {
+  display: flex;
+  align-items: center;
+  .imgBoxs {
+    width: 200px;
+    height: 130px;
+    border: 1px solid #999;
+    margin-right: 6px;
+  }
+  .btns {
+    align-self: end;
+    border: 1px solid #999;
+    font-size: 12px;
+    height: 28px;
+    line-height: 28px;
+    padding: 0px 10px;
+    border-radius: 4px;
+    cursor: pointer;
+  }
+}
+.dis_inblock {
+  display: inline-block;
+}
+</style>

+ 489 - 0
src/views/education/mockTestManagement/mockExamArrangement/editMockExam/infoPage.vue

@@ -0,0 +1,489 @@
+<template>
+  <div id="infoPage">
+    <el-dropdown trigger="click" ref="dropdown" @command="handleCommand">
+      <el-button type="text" @click="addMajed">
+        添加专业<i class="el-icon-arrow-down el-icon--right"></i>
+      </el-button>
+      <el-dropdown-menu slot="dropdown">
+        <el-dropdown-item v-if="!newMajorOption.length" disabled
+          >暂无专业</el-dropdown-item
+        >
+        <el-dropdown-item
+          v-for="(item, index) in newMajorOption"
+          :key="index"
+          :command="item"
+          :disabled="computedDisabled(item.id)"
+          >{{ item.categoryName }}</el-dropdown-item
+        >
+      </el-dropdown-menu>
+    </el-dropdown>
+    <ul class="majStyle" v-for="(item, index) in infoData" :key="index">
+      <li>
+        <span style="font-weight: bold">{{ getMajName(item.majorId) }}</span
+        >:
+        <el-dropdown
+          trigger="click"
+          ref="dropdownSubject"
+          @command="handleSubjedt($event, index)"
+        >
+          <el-button type="text">
+            添加科目<i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item v-if="!newsubjectOption.length" disabled
+              >暂无科目</el-dropdown-item
+            >
+            <el-dropdown-item
+              v-for="(items, indexs) in newsubjectOption"
+              :key="indexs"
+              :command="items"
+              :disabled="computedSubjedtDisabled(items.id, index)"
+              >{{ items.subjectName }}</el-dropdown-item
+            >
+          </el-dropdown-menu>
+        </el-dropdown>
+        <el-button
+          type="text"
+          style="float: right"
+          @click="infoData.splice(index, 1)"
+          >删除</el-button
+        >
+        <ul
+          class="subjectStyle"
+          v-for="(items, indexs) in item.mockMajorSubjectList"
+          :key="indexs"
+        >
+          <li class="subjectList_sty">
+            <span style="font-weight: bold"
+              >{{ getsubjectName(items.subjectId) }}
+            </span>
+            <el-button
+              type="text"
+              style="margin-left: 10px"
+              @click="addTime(index, indexs)"
+              >添加日期</el-button
+            >
+            <el-button
+              type="text"
+              style="float: right"
+              @click="item.mockMajorSubjectList.splice(indexs, 1)"
+              >删除</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`,
+                  }"
+                >
+                </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>
+              <div style="margin-bottom: 10px">
+                <el-button
+                  type="primary"
+                  :size="size"
+                  @click="activeExam(index, indexs)"
+                  >关联试卷</el-button
+                >
+                <span style="margin: 0px 10px">{{ items.examName }}</span>
+              </div>
+              <div style="margin-bottom: 10px">
+                <el-button
+                  type="primary"
+                  :size="size"
+                  @click="activeSection(index, indexs)"
+                  >关联讲解</el-button
+                >
+                <span style="margin: 0px 10px">{{ items.sectionName }}</span>
+                <i
+                  class="deleteStyle"
+                  @click="clearSection(index, indexs)"
+                  v-if="items.sectionName && items.sectionId"
+                  >删除</i
+                >
+              </div>
+              <div style="margin-bottom: 10px">
+                指定开放学员,有购买一下商品:<el-button
+                  type="info"
+                  :size="size"
+                  @click="activeGoods(index, indexs)"
+                  >选择商品</el-button
+                >
+              </div>
+              <ul class="goodslist_style">
+                <li
+                  v-for="(
+                    ititem, itindex
+                  ) in items.mockMajorSubjectGoodsList"
+                  :key="itindex"
+                >
+                  {{ ititem.goodsCode }}-{{ ititem.goodsName }}-<span
+                    style="color: red"
+                    >¥{{ ititem.price }}</span
+                  ><i
+                    class="deleteStyle"
+                    style="margin-left: 10px"
+                    @click="
+                      items.mockMajorSubjectGoodsList.splice(itindex, 1)
+                    "
+                    >删除</i
+                  >
+                </li>
+              </ul>
+            </div>
+          </li>
+        </ul>
+      </li>
+    </ul>
+    <active-goods-pop ref="activeGoodsPop" @backData="backData" />
+    <active-exam ref="activeExam" @backData="backDataExam" />
+    <active-section ref="activeSection" @backData="backDataSection" />
+  </div>
+</template>
+
+<script>
+import activeGoodsPop from "../activeGoodsPop.vue";
+import activeExam from "../activeExam.vue";
+import activeSection from "../activeSection.vue";
+export default {
+  components: { activeGoodsPop, activeExam, activeSection },
+  props: ["listData", "newMajorOption", "newsubjectOption"],
+  data() {
+    return {
+      infoData: [],
+      size: "mini",
+    };
+  },
+  computed: {
+    //检查专业是否可选
+    computedDisabled: function () {
+      return function (id) {
+        let status = false;
+        for (let i = 0; i < this.infoData.length; i++) {
+          if (this.infoData[i].majorId === id) {
+            status = true;
+            break;
+          }
+        }
+        return status;
+      };
+    },
+    //检查科目是否可选
+    computedSubjedtDisabled: function () {
+      return function (id, index) {
+        let status = false;
+        if (this.infoData[index].mockMajorSubjectList) {
+          for (
+            let i = 0;
+            i < this.infoData[index].mockMajorSubjectList.length;
+            i++
+          ) {
+            if (
+              this.infoData[index].mockMajorSubjectList[i].subjectId === id
+            ) {
+              status = true;
+              break;
+            }
+          }
+        }
+        return status;
+      };
+    },
+    //查询专业名称
+    getMajName: function () {
+      return function (id) {
+        let str = "";
+        for (let i = 0; i < this.newMajorOption.length; i++) {
+          if (this.newMajorOption[i].id === id) {
+            str = this.newMajorOption[i].categoryName;
+            break;
+          }
+        }
+        return str;
+      };
+    },
+    //查询科目名称
+    getsubjectName: function () {
+      return function (id) {
+        let str = "";
+        for (let i = 0; i < this.newsubjectOption.length; i++) {
+          if (this.newsubjectOption[i].id === id) {
+            str = this.newsubjectOption[i].subjectName;
+            break;
+          }
+        }
+        return str;
+      };
+    },
+  },
+  methods: {
+    /**
+     * 获取初始模考专业列表
+     */
+    getBybusinfoPage(data) {
+      console.log(data)
+      this.infoData = data;
+    },
+    /**
+     * 校验是否允许添加专业
+     */
+    addMajed() {
+      this.$bus.$emit("validateBusinessId");
+      if (!this.listData.businessId) return;
+    },
+    /**
+     * 添加专业
+     */
+    handleCommand(item) {
+      this.infoData.push({
+        majorId: item.id,
+      });
+    },
+    /**
+     * 添加科目
+     */
+    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", [
+          {
+            subjectId: item.id,
+            mockMajorSubjectTimeList: [
+              { examTime: "", startTime: "", endTime: "" },
+            ],
+            mockMajorSubjectGoodsList: [],
+          },
+        ]);
+      }
+    },
+    /**
+     * 添加时间
+     */
+    addTime(index, indexs) {
+      if (
+        this.infoData[index].mockMajorSubjectList[indexs]
+          .mockMajorSubjectTimeList
+      ) {
+        this.infoData[index].mockMajorSubjectList[
+          indexs
+        ].mockMajorSubjectTimeList.push({
+          examTime: "",
+          startTime: "",
+          endTime: "",
+        });
+      } else {
+        this.$set(
+          this.infoData[index].mockMajorSubjectList[indexs],
+          "mockMajorSubjectTimeList",
+          [
+            {
+              examTime: "",
+              startTime: "",
+              endTime: "",
+            },
+          ]
+        );
+      }
+    },
+    /**
+     * 选择商品index专业索引indexs科目索引
+     */
+    activeGoods(index, indexs) {
+      let goodsIds = this.infoData[index].mockMajorSubjectList[
+        indexs
+      ].mockMajorSubjectGoodsList.map((item) => {
+        return item.goodsId;
+      });
+      this.$refs.activeGoodsPop.openBoxGoods(index, indexs, {
+        educationTypeId: this.listData.educationTypeId,
+        businessId: this.listData.businessId,
+        goodsIds: goodsIds,
+      });
+    },
+    /**
+     * 选择商品-返回数据index专业索引indexs科目索引array选中商品
+     */
+    backData(index, indexs, array) {
+      let arr = array.map((item) => {
+        return {
+          goodsId: item.goodsId,
+          goodsName: item.goodsName,
+          goodsCode: item.code,
+          price: item.standPrice,
+        };
+      });
+      let newConcatArr =
+        this.infoData[index].mockMajorSubjectList[
+          indexs
+        ].mockMajorSubjectGoodsList.concat(arr);
+      this.$set(
+        this.infoData[index].mockMajorSubjectList[indexs],
+        "mockMajorSubjectGoodsList",
+        newConcatArr
+      );
+    },
+    /**
+     * 选择试卷index专业索引indexs科目索引
+     */
+    activeExam(index, indexs) {
+      this.$refs.activeExam.openBoxGoods(index, indexs, {
+        educationTypeId: this.listData.educationTypeId,
+        businessId: this.listData.businessId,
+        examId: this.infoData[index].mockMajorSubjectList[indexs].examId,
+        examName:
+          this.infoData[index].mockMajorSubjectList[indexs].examName,
+      });
+    },
+    /**
+     * 选择试卷-返回数据index专业索引indexs科目索引obj选中试卷
+     */
+    backDataExam(index, indexs, obj) {
+      this.$set(
+        this.infoData[index].mockMajorSubjectList[indexs],
+        "examId",
+        obj.examId
+      );
+      this.$set(
+        this.infoData[index].mockMajorSubjectList[indexs],
+        "examName",
+        obj.examName
+      );
+    },
+    /**
+     * 选择节index专业索引indexs科目索引
+     */
+    activeSection(index, indexs) {
+      this.$refs.activeSection.openBoxGoods(index, indexs, {
+        educationTypeId: this.listData.educationTypeId,
+        businessId: this.listData.businessId,
+        sectionId:
+          this.infoData[index].mockMajorSubjectList[indexs].sectionId,
+        sectionName:
+          this.infoData[index].mockMajorSubjectList[indexs].sectionName,
+      });
+    },
+    /**
+     * 选择节-返回数据index专业索引indexs科目索引obj选中节
+     */
+    backDataSection(index, indexs, obj) {
+      this.$set(
+        this.infoData[index].mockMajorSubjectList[indexs],
+        "sectionId",
+        obj.sectionId
+      );
+      this.$set(
+        this.infoData[index].mockMajorSubjectList[indexs],
+        "sectionName",
+        obj.sectionName
+      );
+    },
+    /**
+     * 删除节
+     */
+    clearSection(index, indexs) {
+      this.$set(
+        this.infoData[index].mockMajorSubjectList[indexs],
+        "sectionId",
+        ""
+      );
+      this.$set(
+        this.infoData[index].mockMajorSubjectList[indexs],
+        "sectionName",
+        ""
+      );
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.majStyle {
+  background-color: #eee;
+  padding: 10px 16px;
+  max-width: 610px;
+}
+.subjectStyle {
+  background-color: rgb(215, 215, 215);
+  padding: 0px 8px;
+  margin-left: 16px;
+  max-width: 100%;
+  .subjectList_sty {
+    margin-bottom: 14px;
+    padding-bottom: 10px;
+  }
+}
+.deleteStyle {
+  color: rgb(106, 121, 6);
+  user-select: none;
+  cursor: pointer;
+  font-style: normal;
+}
+.goodslist_style {
+  max-height: 150px;
+  overflow: auto;
+  background-color: rgb(159, 213, 236);
+  font-size: 12px;
+  padding: 0px 10px;
+  & > li {
+    height: 26px;
+    line-height: 26px;
+  }
+}
+</style>

+ 279 - 0
src/views/education/mockTestManagement/mockExamArrangement/index.vue

@@ -0,0 +1,279 @@
+<template>
+  <div id="mockExamArrangement">
+    <search-box-new
+      ref="searchBox"
+      :formData="formData"
+      :formList="formList"
+      @search="search"
+      @init="init"
+    />
+    <table-list
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      :loading="loading"
+      @addClick="addClick"
+      @openBoxFun="openBoxFun"
+    >
+      <template slot="btn" slot-scope="props">
+        <el-button type="text" @click="edit(props.scope.row)">修改</el-button
+        ><el-button type="text" @click="del(props.scope.row)">删除</el-button>
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="formData.pageSize"
+      :currentPage="formData.pageNum"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+  </div>
+</template>
+
+<script>
+import searchBoxNew from "@/components/searchBoxNew";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
+export default {
+  name: "MockExamArrangement",
+  components: { searchBoxNew, tableList, pagination },
+  data() {
+    return {
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "模考安排",
+        index: 0,
+        ch: "条",
+        num: false,
+        border: true,
+        choice: true,
+        addHide: false,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      //搜索
+      formList: [
+        {
+          prop: "educationTypeId",
+          placeholder: "教育类型",
+          scope: "educationType",
+        },
+        {
+          prop: "businessId",
+          placeholder: "业务层次",
+          scope: "businessLevel",
+          edu: "educationTypeId",
+        },
+        {
+          prop: "majorId",
+          placeholder: "专业",
+          scope: "Professional",
+          edu: "educationTypeId",
+        },
+        {
+          prop: "status",
+          placeholder: "状态",
+          scope: "select",
+          noClear: false,
+          options: [
+            {
+              label: "全部",
+              value: "0,1",
+            },
+            {
+              label: "启用",
+              value: 1,
+            },
+            {
+              label: "关闭",
+              value: 0,
+            },
+          ],
+        },
+        {
+          prop: "searchKey",
+          placeholder: "请输入模考标题/模考编码",
+        },
+      ],
+      formData: {
+        // status: "0,1",
+        pageSize: 10,
+        pageNum: 1,
+      },
+      // 表单
+      tableSet: [
+        {
+          label: "模考编码",
+          prop: "code",
+          hidden: true,
+        },
+        {
+          label: "模考标题",
+          prop: "applyName",
+          hidden: true,
+        },
+        {
+          label: "业务层级",
+          prop1: "educationName",
+          prop2: "projectName",
+          prop3: "businessName",
+          hidden: true,
+          scope: "eduTypes",
+        },
+        // {
+        //   label: "模考专业",
+        //   prop: "majorNameList",
+        //   hidden: true,
+        //   scope: "analysiss",
+        // },
+        {
+          label: "状态",
+          prop: "status",
+          hidden: true,
+          scope: "isOptions",
+          options: [
+            {
+              label: "启用",
+              value: 1,
+            },
+            {
+              label: "关闭",
+              value: 0,
+            },
+          ],
+        },
+        {
+          label: "预约/取消",
+          prop1: "subscribeCancelNum",
+          prop2: "subscribeNum",
+          hidden: true,
+          scope: "reserveFunc",
+        },
+      ],
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+    };
+  },
+  mounted() {
+    this.search();
+  },
+  activated() {
+    this.search();
+  },
+  methods: {
+    /**
+     * 新增
+     */
+    addClick() {
+      this.$router.push({
+        path: "addMockExam",
+      });
+    },
+    /**
+     * 预约/取消点击触发
+     */
+    openBoxFun() {},
+    /**
+     * 修改
+     */
+    edit(row) {
+      const jump = () => {
+        this.$router.push({
+          path: "editMockExam",
+          query: {
+            id: row.applyId,
+          },
+        });
+      };
+      const statusPage = this.$store.state.tagsView.visitedViews.some(
+        (item) => {
+          return item.name == "EditMockExam";
+        }
+      );
+      if (statusPage) {
+        this.$store
+          .dispatch("tagsView/delCachedView", {
+            name: "EditMockExam",
+          })
+          .then((res) => {
+            jump();
+          });
+      } else {
+        jump();
+      }
+    },
+    /**
+     * 删除
+     */
+    del(row) {
+      this.$alert(
+        "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
+        "提示",
+        {
+          dangerouslyUseHTMLString: true,
+        }
+      )
+        .then(() => {
+          //   var data = {
+          //     goodsId: v.goodsId,
+          //     status: -1,
+          //   };
+          //   this.$api.editGoods(data).then((res) => {
+          //     this.$message.success("删除成功");
+          //     this.search();
+          //   });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+    /**
+     * 搜索
+     */
+    search(int) {
+      this.loading = true;
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      if (int === 2) {
+        this.formData = {
+          //   status: "0,1",
+          pageSize: 10,
+          pageNum: 1,
+        };
+      }
+      var data = JSON.parse(JSON.stringify(this.formData));
+      this.$api
+        .inquiremockapplylistApply(data)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+          this.navText.index = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    init() {
+      this.search(2);
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.search();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 305 - 0
src/views/education/mockTestManagement/mockTestData/index.vue

@@ -0,0 +1,305 @@
+<template>
+  <div id="mockTestData">
+    <search-box-new
+      ref="searchBox"
+      :formData="formData"
+      :formList="formList"
+      @search="search"
+      @init="init"
+    />
+    <table-list
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      :loading="loading"
+      @openBoxFun="openBoxFun"
+    >
+      <template slot="btn" slot-scope="props">
+        <el-button type="text" @click="record(props.scope.row)"
+          >模考做题记录</el-button
+        >
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="formData.pageSize"
+      :currentPage="formData.pageNum"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+  </div>
+</template>
+
+<script>
+import searchBoxNew from "@/components/searchBoxNew";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
+export default {
+  name: "MockTestData",
+  components: { searchBoxNew, tableList, pagination },
+  data() {
+    return {
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "模考数据",
+        index: 0,
+        ch: "条",
+        num: false,
+        border: true,
+        choice: true,
+        addHide: true,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      //搜索
+      formList: [
+        {
+          prop: "subscribeStatus",
+          placeholder: "预约状态",
+          scope: "select",
+          noClear: false,
+          options: [
+            {
+              label: "正常",
+              value: 1,
+            },
+            {
+              label: "取消",
+              value: 2,
+            },
+          ],
+        },
+        {
+          prop: "educationTypeId",
+          placeholder: "教育类型",
+          scope: "educationType",
+        },
+        {
+          prop: "businessId",
+          placeholder: "业务层次",
+          scope: "businessLevel",
+          edu: "educationTypeId",
+        },
+        {
+          prop: "majorId",
+          placeholder: "专业",
+          scope: "Professional",
+          edu: "educationTypeId",
+        },
+        {
+          prop: "subjectId",
+          placeholder: "科目",
+          scope: "subjectType",
+          edu: "educationTypeId",
+        },
+        {
+          prop: "firstSubjectiveScore",
+          placeholder: "主观题待评分",
+          scope: "select",
+          noClear: false,
+          options: [
+            {
+              label: "是",
+              value: 1,
+            },
+            {
+              label: "否",
+              value: 0,
+            },
+          ],
+        },
+        {
+          prop: "applyName",
+          placeholder: "请输入模考标题",
+        },
+        {
+          prop: "searchKey",
+          placeholder: "请输入学员姓名/学员身份证",
+        },
+      ],
+      formData: {
+        pageSize: 10,
+        pageNum: 1,
+      },
+      // 表单
+      tableSet: [
+        {
+          label: "预约状态",
+          prop: "subscribeStatus",
+          hidden: true,
+          scope: "isOptions",
+          options: [
+            {
+              label: "正常",
+              value: 1,
+            },
+            {
+              label: "取消",
+              value: 2,
+            },
+          ],
+        },
+        {
+          label: "模考标题",
+          prop: "applyName",
+          hidden: true,
+        },
+        {
+          label: "学员姓名",
+          prop: "realname",
+          hidden: true,
+        },
+        {
+          label: "学员身份证",
+          prop: "idCard",
+          hidden: true,
+        },
+        {
+          label: "预约专业",
+          prop: "categoryName",
+          hidden: true,
+        },
+        {
+          label: "预约科目",
+          prop: "subjectName",
+          hidden: true,
+        },
+        {
+          label: "模考时间",
+          prop1: "applySiteExamTime",
+          prop2: "applySiteStartTime",
+          prop3: "applySiteEndTime",
+          hidden: true,
+          scope: "subTime",
+        },
+        {
+          label: "试卷标题",
+          prop: "examName",
+          hidden: true,
+        },
+        {
+          label: "做题次数",
+          prop: "doNum",
+          hidden: true,
+        },
+        {
+          label: "第一次做题得分",
+          prop: "firstScore",
+          hidden: true,
+        },
+        {
+          label: "第一次主观题待评分",
+          prop: "firstSubjectiveScore",
+          hidden: true,
+        },
+        {
+          label: "第一次交卷时间",
+          prop: "firstHandTime",
+          hidden: true,
+          scope: "aTimeList",
+        },
+      ],
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+    };
+  },
+  mounted() {
+    if (this.$route.params.educationId && this.$route.params.businessId) {
+      this.$set(
+        this.formData,
+        "educationTypeId",
+        this.$route.params.educationId
+      );
+      this.$set(this.formData, "businessId", this.$route.params.businessId);
+      this.$refs.searchBox.changeEducationType(
+        this.$route.params.educationId,
+        true
+      );
+      this.$refs.searchBox.changeBusinessLevel(this.$route.params.businessId);
+    }
+    this.search();
+  },
+  activated() {
+    this.search();
+  },
+  methods: {
+    /**
+     * 预约/取消点击触发
+     */
+    openBoxFun() {},
+    /**
+     * 修改
+     */
+    record(row) {
+      const jump = () => {
+        this.$router.push({
+          path: "recordQusetion",
+          query: {
+            id: row.eachExamId,
+            userId: row.userId,
+          },
+        });
+      };
+      const statusPage = this.$store.state.tagsView.visitedViews.some(
+        (item) => {
+          return item.name == "RecordQusetion";
+        }
+      );
+      if (statusPage) {
+        this.$store
+          .dispatch("tagsView/delCachedView", {
+            name: "RecordQusetion",
+          })
+          .then((res) => {
+            jump();
+          });
+      } else {
+        jump();
+      }
+    },
+    /**
+     * 搜索
+     */
+    search(int) {
+      this.loading = true;
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      if (int === 2) {
+        this.formData = {
+          pageSize: 10,
+          pageNum: 1,
+        };
+      }
+      var data = JSON.parse(JSON.stringify(this.formData));
+      this.$api
+        .inquireusersubscribelistSubscribe(data)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+          this.navText.index = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    init() {
+      this.search(2);
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.search();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 520 - 0
src/views/education/mockTestManagement/mockTestData/recordQusetion/index.vue

@@ -0,0 +1,520 @@
+<template>
+  <div id="recordQusetion">
+    <p v-if="details.length === 0">暂无做题记录</p>
+    <el-row :gutter="20" class="el_rowStyle" v-else>
+      <el-col :span="5">
+        <div class="over_style">
+          <div
+            class="dis_style"
+            v-for="(items, indexs) in details"
+            :key="indexs"
+            @click="activeRecordId(items)"
+            :style="activeRecordIs === items.recordId ? 'color:#F56C6C;' : ''"
+          >
+            第{{ indexs + 1 }}次做题记录
+          </div>
+        </div>
+      </el-col>
+      <el-col :span="19" v-if="getInfoRecord.recordId" style="font-size: 14px">
+        <table style="width: 100%; border-collapse: collapse" border="1">
+          <tr>
+            <td>提交时间</td>
+            <td>做题用时(分)</td>
+            <td>做题状态</td>
+            <td>已答题数</td>
+            <td>得分(不含主观题)</td>
+            <td>得分(含主观题)</td>
+          </tr>
+          <tr>
+            <td>
+              {{ $methodsTools.onlyForma(getInfoRecord.updateTime) }}
+            </td>
+            <td>
+              {{ $methodsTools.secondToDate(getInfoRecord.doTime) }}
+            </td>
+            <td>{{ getInfoRecord.status === 1 ? "完成" : "未完成" }}</td>
+            <td>
+              {{
+                getInfoRecord.doQuestionNum + "/" + getInfoRecord.allQuestionNum
+              }}
+            </td>
+            <td>{{ getInfoRecord.performance }}</td>
+            <td>{{ getInfoRecord.performance + getInfoRecord.score }}</td>
+          </tr>
+        </table>
+        <div
+          class="showData"
+          style="padding: 0px 20px; max-height: 86%; overflow-y: auto"
+        >
+          <div
+            v-for="(item, index) in getInfoRecord.historyExamJson"
+            :key="index"
+            style="margin: 14px 0px; background-color: #eee; padding: 10px"
+          >
+            <div style="border-bottom: 1px dotted #666; padding: 4px 0px 10px">
+              <span style="margin-right: 14px">题目{{ index + 1 }}</span>
+              <span style="margin-right: 14px">{{
+                changeQuestType(item.type)
+              }}</span>
+              <span style="margin-right: 14px">分值:{{ item.score }}分</span>
+              <span style="margin-right: 14px; color: red"
+                >得分:{{ item.scoreResult }}分</span
+              >
+              <el-button
+                v-if="item.type === 4 || item.type === 5"
+                style="margin-right: 14px"
+                type="text"
+                @click="setMath(item, index)"
+                >评分</el-button
+              >
+            </div>
+            <div class="ddis_fs">
+              <div class="content">题目内容:</div>
+              <div style="flex: 1">
+                <div v-html="item.content"></div>
+                <div v-if="item.type === 4">
+                  <div
+                    style="margin: 20px; background-color: #fff; padding: 12px"
+                    v-for="(ite, ind) in item.jsonStr"
+                    :key="ind"
+                  >
+                    <div class="ddis_fs" v-if="item.ite !== 5">
+                      <div>题目类型:{{ changeQuestType(ite.type) }}</div>
+                    </div>
+                    <div class="ddis_fs">
+                      <div class="content">题目内容:</div>
+                      <div style="flex: 1">
+                        <div v-html="ite.content"></div>
+                        <ul>
+                          <li
+                            v-for="(items, indexs) in ite.optionsList"
+                            :key="indexs"
+                            style="margin-bottom: 10px"
+                          >
+                            {{ Gest(indexs + 1) }}:{{ items.content }}
+
+                            <el-image
+                              v-if="items.imgUrl"
+                              style="
+                                width: 40px;
+                                height: 40px;
+                                vertical-align: middle;
+                              "
+                              :src="$methodsTools.splitImgHost(items.imgUrl)"
+                              :preview-src-list="[
+                                $methodsTools.splitImgHost(items.imgUrl),
+                              ]"
+                            >
+                            </el-image>
+                          </li>
+                        </ul>
+                      </div>
+                    </div>
+                    <div class="ddis_fs" v-if="ite.type !== 5">
+                      <div class="content">正确答案:</div>
+                      <div style="flex: 1">
+                        <span v-if="ite.type === 3">
+                          {{ ite.answerQuestion == 1 ? "正确" : "错误" }}
+                        </span>
+                        <span v-else>
+                          {{ getDictChanges(ite.answerQuestion) }}
+                        </span>
+                      </div>
+                    </div>
+                    <div class="ddis_fs">
+                      <div class="content">答案解析:</div>
+                      <div style="flex: 1">
+                        <div v-html="imgExiz(ite.analysisContent)"></div>
+                      </div>
+                    </div>
+                    <div class="ddis_fs">
+                      <div class="content">填选答案:</div>
+                      <div style="flex: 1">
+                        <p
+                          style="margin: 0px"
+                          v-if="ite.type === 1 || ite.type === 2"
+                        >
+                          {{ getDictChanges(item.ques[ind]) }}
+                        </p>
+                        <p style="margin: 0px" v-if="ite.type === 3">
+                          {{ item.ques[ind] == 1 ? "正确" : "错误" }}
+                        </p>
+                        <div v-if="ite.type === 5">
+                          <p>{{ ite.ansText.text }}</p>
+                          <ul>
+                            <li
+                              v-for="(k, ds) in ite.ansText.imageList"
+                              :key="ds"
+                              style="
+                                width: 100px;
+                                height: 100px;
+                                float: left;
+                                margin: 0px 10px 10px 0px;
+                              "
+                            >
+                              <el-image
+                                v-if="k"
+                                style="width: 100%; height: 100%"
+                                :src="$methodsTools.splitImgHost(k)"
+                                :preview-src-list="[
+                                  $methodsTools.splitImgHost(k),
+                                ]"
+                              >
+                              </el-image>
+                            </li>
+                            <div style="clear: both"></div>
+                          </ul>
+                        </div>
+                      </div>
+                    </div>
+                  </div>
+                </div>
+                <ul v-else>
+                  <li
+                    v-for="(items, indexs) in item.jsonStr"
+                    :key="indexs"
+                    style="margin-bottom: 10px"
+                  >
+                    {{ Gest(indexs + 1) }}:{{ items.content }}
+
+                    <el-image
+                      v-if="items.imgUrl"
+                      style="width: 40px; height: 40px; vertical-align: middle"
+                      :src="$methodsTools.splitImgHost(items.imgUrl)"
+                      :preview-src-list="[
+                        $methodsTools.splitImgHost(items.imgUrl),
+                      ]"
+                    >
+                    </el-image>
+                  </li>
+                </ul>
+              </div>
+            </div>
+            <div class="ddis_fs" v-if="item.type !== 4 && item.type !== 5">
+              <div class="content">正确答案:</div>
+              <div style="flex: 1">
+                <span v-if="item.type === 3">
+                  {{ item.answerQuestion == 1 ? "正确" : "错误" }}
+                </span>
+                <span v-else>
+                  {{ getDictChanges(item.answerQuestion) }}
+                </span>
+              </div>
+            </div>
+            <div class="ddis_fs" v-if="item.type !== 4">
+              <div class="content">答案解析:</div>
+              <div style="flex: 1">
+                <div v-html="imgExiz(item.analysisContent)"></div>
+              </div>
+            </div>
+            <div class="ddis_fs" v-if="item.type !== 4">
+              <div class="content">填选答案:</div>
+              <div style="flex: 1">
+                <p
+                  style="margin: 0px"
+                  v-if="item.type === 1 || item.type === 2"
+                >
+                  {{ getDictChanges(item.ques) }}
+                </p>
+                <p style="margin: 0px" v-if="item.type === 3">
+                  {{ item.ques == 1 ? "正确" : "错误" }}
+                </p>
+                <div v-if="item.type === 5">
+                  <p>{{ item.ansText.text }}</p>
+                  <ul>
+                    <li
+                      v-for="(k, ds) in item.ansText.imageList"
+                      :key="ds"
+                      style="
+                        width: 100px;
+                        height: 100px;
+                        float: left;
+                        margin: 0px 10px 10px 0px;
+                      "
+                    >
+                      <el-image
+                        v-if="k"
+                        style="width: 100%; height: 100%"
+                        :src="$methodsTools.splitImgHost(k)"
+                        :preview-src-list="[$methodsTools.splitImgHost(k)]"
+                      >
+                      </el-image>
+                    </li>
+                    <div style="clear: both"></div>
+                  </ul>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+        <div style="height: 50px; text-align: center; line-height: 50px">
+          <el-button size="mini" type="success" @click="editForms"
+            >提交修改</el-button
+          >
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "RecordQusetion",
+  data() {
+    return {
+      activeName: null,
+      activeRecordIs: null,
+      userId: "",
+      orderGoodsId: "",
+      details: [],
+      getInfoRecord: [],
+    };
+  },
+  created() {
+    this.userId = this.$route.query.userId;
+    this.orderGoodsId = this.$route.query.orderGoodsId;
+  },
+  mounted() {
+    this.$api
+      .inquiremockrecordlist({
+        eachExamId: this.$route.query.id,
+        userId: this.$route.query.userId,
+      })
+      .then((res) => {
+        this.details = res.rows;
+        if (res.rows.length > 0) {
+          this.getRecodeInfo(res.rows[0].recordId);
+        }
+      });
+  },
+  computed: {
+    imgExiz: function () {
+      return function (vms) {
+        if (!vms) {
+          return vms;
+        } else {
+          var ast = vms.replace(/<img/gi, '<img style="max-width:100%;"');
+          return ast;
+        }
+      };
+    },
+  },
+  methods: {
+    /**
+     * 评分
+     */
+    setMath(item, index) {
+      this.$prompt(`题目最大分值为${item.score}分,请评分`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        inputPattern: /^\d+$/,
+        inputErrorMessage: "分值格式不正确",
+        beforeClose: (action, instance, done) => {
+          if (
+            action === "confirm" &&
+            Number(instance.inputValue) > item.score
+          ) {
+            this.$message.warning(`该题评分不得超过${item.score}分`);
+            return;
+          }
+          done();
+        },
+      })
+        .then(({ value }) => {
+          this.$message({
+            type: "success",
+            message: "评分: " + value,
+          });
+          this.$set(
+            this.getInfoRecord.historyExamJson[index],
+            "scoreResult",
+            value
+          );
+        })
+        .catch(() => {});
+    },
+    /**
+     * 点击试卷触发
+     */
+    ActiveName(val) {
+      if (!val) return;
+      const status = this.details.find((item) => {
+        return item.examId === val && item.recordList;
+      });
+      if (status) {
+        return;
+      }
+      this.$api
+        .inquireselectExamListrecord({
+          userId: this.userId,
+          examId: val,
+        })
+        .then((res) => {
+          for (let i = 0; i < this.details.length; i++) {
+            if (this.details[i].examId === val) {
+              this.$set(this.details[i], "recordList", res.rows);
+              break;
+            }
+          }
+        });
+    },
+    /**
+     * 点击记录触发
+     */
+    activeRecordId(row) {
+      if (this.activeRecordIs === row.recordId) return;
+      this.getRecodeInfo(row.recordId);
+    },
+    editForms() {
+      var data = JSON.parse(JSON.stringify(this.getInfoRecord));
+      data.score = 0;
+      for (let i = 0; i < data.historyExamJson.length; i++) {
+        if (
+          (data.historyExamJson[i].type === 4 ||
+            data.historyExamJson[i].type === 5) &&
+          data.historyExamJson[i].scoreResult
+        ) {
+          data.score += data.historyExamJson[i].scoreResult;
+        }
+      }
+      data.historyExamJson = JSON.stringify(data.historyExamJson);
+      this.$api.editmockrecord(data).then((res) => {
+        this.$message.success("修改成功");
+        this.getRecodeInfo(data.recordId);
+      });
+    },
+    getRecodeInfo(id) {
+      this.activeRecordIs = id;
+      this.$api.inquiremockrecordId(id).then((res) => {
+        res.data.historyExamJson = JSON.parse(res.data.historyExamJson);
+        if (!res.data.score) {
+          res.data.score = 0;
+        }
+        this.getInfoRecord = res.data;
+        if (document.getElementsByClassName("showData")[0]) {
+          document.getElementsByClassName("showData")[0].scrollTop = 0;
+        }
+      });
+    },
+    getDictChanges(dan) {
+      var arst = [];
+      var arrays;
+      if (dan instanceof Object) {
+        arrays = dan;
+      } else {
+        if (dan) {
+          arrays = dan.toString().split(",");
+        } else {
+          return "";
+        }
+      }
+      for (let i = 0; i < arrays.length; i++) {
+        arst.push(this.Gest(arrays[i]));
+      }
+      return arst.join(",");
+    },
+    /**
+     * 选项转换
+     */
+    Gest(ints) {
+      var int = parseInt(ints);
+      var ast = "";
+      switch (int) {
+        case 1:
+          ast = "A";
+          break;
+        case 2:
+          ast = "B";
+          break;
+        case 3:
+          ast = "C";
+          break;
+        case 4:
+          ast = "D";
+          break;
+        case 5:
+          ast = "E";
+          break;
+        case 6:
+          ast = "F";
+          break;
+        case 7:
+          ast = "G";
+          break;
+        case 8:
+          ast = "H";
+          break;
+        default:
+          ast = "X";
+          break;
+      }
+      return ast;
+    },
+    /**
+     * 题目类型
+     */
+    changeQuestType(int) {
+      var type = "";
+      switch (int) {
+        case 1:
+          type = "单选题";
+          break;
+        case 2:
+          type = "多选题";
+          break;
+        case 3:
+          type = "判断题";
+          break;
+        case 4:
+          type = "案例题";
+          break;
+        case 5:
+          type = "简答题";
+          break;
+
+        default:
+          type = "未知";
+          break;
+      }
+      return type;
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.el_rowStyle {
+  height: calc(100vh - 120px);
+  .el-col {
+    height: 100%;
+  }
+}
+.over_style {
+  max-height: 100%;
+  overflow: auto;
+}
+.dis_style {
+  user-select: none;
+  cursor: pointer;
+  height: 36px;
+  border: 1px solid #666;
+  border-top: none;
+  padding: 8px;
+  text-align: center;
+  &:first-child {
+    border-top: 1px solid #666;
+  }
+}
+.ddis_fs {
+  display: flex;
+  margin-bottom: 10px;
+}
+.content {
+  width: 70px;
+  flex-shrink: 0;
+}
+td {
+  padding: 6px;
+  text-align: center;
+}
+</style>

+ 199 - 0
src/views/education/questionBankLearning/questionRecordPage/bankGoods.vue

@@ -0,0 +1,199 @@
+<template>
+  <div id="bankGoods">
+    <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="btn" slot-scope="props">
+        <el-button type="text" @click="doList(props.scope.row)"
+          >学员做题列表</el-button
+        >
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="formData.pageSize"
+      :currentPage="formData.pageNum"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+  </div>
+</template>
+
+<script>
+import searchBoxNew from "@/components/searchBoxNew";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
+export default {
+  components: { searchBoxNew, tableList, pagination },
+  data() {
+    return {
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "题库商品做题记录",
+        index: 0,
+        ch: "条",
+        num: false,
+        border: true,
+        choice: true,
+        addHide: true,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      //搜索
+      formList: [
+        {
+          prop: "educationTypeId",
+          placeholder: "教育类型",
+          scope: "educationType",
+        },
+        {
+          prop: "businessId",
+          placeholder: "业务层次",
+          scope: "businessLevel",
+          edu: "educationTypeId",
+        },
+        {
+          prop: "majorId",
+          placeholder: "专业",
+          scope: "Professional",
+          edu: "educationTypeId",
+        },
+        {
+          prop: "searchKey",
+          placeholder: "请输入商品名称/商品编码",
+        },
+      ],
+      formData: {
+        status: "0,1",
+        pageSize: 10,
+        pageNum: 1,
+        goodsType: 2,
+      },
+      // 表单
+      tableSet: [
+        {
+          label: "商品编码",
+          prop: "code",
+          hidden: true,
+        },
+        {
+          label: "商品名称",
+          prop: "goodsName",
+          hidden: true,
+        },
+        {
+          label: "业务层级",
+          prop1: "educationName",
+          prop2: "projectName",
+          prop3: "businessName",
+          hidden: true,
+          scope: "eduTypes",
+        },
+        {
+          label: "学时",
+          prop: "classHours",
+          hidden: true,
+        },
+        {
+          label: "试卷数量",
+          prop: "totalExamNum",
+          hidden: true,
+        },
+        {
+          label: "订单数量",
+          prop: "orderNum",
+          hidden: true,
+        },
+      ],
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+    };
+  },
+  mounted() {
+    this.search();
+  },
+  activated() {
+    this.search();
+  },
+  methods: {
+    doList(row) {
+      const jump = () => {
+        this.$router.push({
+          path: "listOfQuestions",
+          query: {
+            id: row.goodsId,
+          },
+        });
+      };
+      const statusPage = this.$store.state.tagsView.visitedViews.some(
+        (item) => {
+          return item.name == "ListOfQuestions";
+        }
+      );
+      if (statusPage) {
+        this.$store
+          .dispatch("tagsView/delCachedView", {
+            name: "ListOfQuestions",
+          })
+          .then((res) => {
+            jump();
+          });
+      } else {
+        jump();
+      }
+    },
+    search(int) {
+      this.loading = true;
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      if (int === 2) {
+        this.formData = {
+          status: "0,1",
+          pageSize: 10,
+          pageNum: 1,
+          goodsType: 2,
+        };
+      }
+      var data = JSON.parse(JSON.stringify(this.formData));
+      this.$api
+        .inquireGoods(data)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+          this.navText.index = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    init() {
+      this.search(2);
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.search();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 217 - 0
src/views/education/questionBankLearning/questionRecordPage/giftPaper.vue

@@ -0,0 +1,217 @@
+<template>
+  <div id="giftPaper">
+    <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="btn" slot-scope="props">
+        <el-button type="text" @click="doList(props.scope.row)"
+          >学员做题数据</el-button
+        >
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="formData.pageSize"
+      :currentPage="formData.pageNum"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+  </div>
+</template>
+
+<script>
+import searchBoxNew from "@/components/searchBoxNew";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
+export default {
+  components: { searchBoxNew, tableList, pagination },
+  data() {
+    return {
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "赠送题卷做题记录",
+        index: 0,
+        ch: "条",
+        num: false,
+        border: true,
+        choice: true,
+        addHide: true,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      //搜索
+      formList: [
+        {
+          prop: "educationTypeId",
+          placeholder: "教育类型",
+          scope: "educationType",
+        },
+        {
+          prop: "businessId",
+          placeholder: "业务层次",
+          scope: "businessLevel",
+          edu: "educationTypeId",
+        },
+        {
+          prop: "majorId",
+          placeholder: "专业",
+          scope: "Professional",
+          edu: "educationTypeId",
+        },
+        {
+          prop: "searchKey",
+          placeholder: "请输入商品名称/商品编码/学员姓名/学员身份证",
+        },
+      ],
+      formData: {
+        pageSize: 10,
+        pageNum: 1,
+      },
+      // 表单
+      tableSet: [
+        {
+          label: "订单编码",
+          prop: "orderSn",
+          hidden: true,
+        },
+        {
+          label: "商品名称",
+          prop: "goodsName",
+          hidden: true,
+        },
+        {
+          label: "业务层级",
+          prop1: "educationName",
+          prop2: "projectName",
+          prop3: "businessName",
+          hidden: true,
+          scope: "eduTypes",
+        },
+        {
+          label: "学员姓名",
+          prop: "realName",
+          hidden: true,
+        },
+        {
+          label: "学员身份证",
+          prop: "idCard",
+          hidden: true,
+        },
+        {
+          label: "做题进度",
+          prop1: "doExamNum",
+          prop2: "totalExamNum",
+          hidden: true,
+          scope: "computerDoNum",
+        },
+        {
+          label: "做题开始时间",
+          prop: "doStartTime",
+          hidden: true,
+          scope: "aTimeList",
+        },
+        {
+          label: "做题结束时间",
+          prop: "doEndTime",
+          hidden: true,
+          scope: "aTimeList",
+        },
+        {
+          label: "学习服务期",
+          prop1: "serviceStartTime",
+          prop2: "serviceEndTime",
+          hidden: true,
+          scope: "TimeLists",
+        },
+      ],
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+    };
+  },
+  mounted() {
+    this.search();
+  },
+  activated() {
+    this.search();
+  },
+  methods: {
+    doList(row) {
+      const jump = () => {
+        this.$router.push({
+          path: "studentData",
+          query: {
+            userId: row.userId,
+            orderGoodsId: row.orderGoodsId,
+          },
+        });
+      };
+      const statusPage = this.$store.state.tagsView.visitedViews.some(
+        (item) => {
+          return item.name == "StudentData";
+        }
+      );
+      if (statusPage) {
+        this.$store
+          .dispatch("tagsView/delCachedView", {
+            name: "StudentData",
+          })
+          .then((res) => {
+            jump();
+          });
+      } else {
+        jump();
+      }
+    },
+    search(int) {
+      this.loading = true;
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      if (int === 2) {
+        this.formData = {
+          pageSize: 10,
+          pageNum: 1,
+        };
+      }
+      var data = JSON.parse(JSON.stringify(this.formData));
+      this.$api
+        .inquiregoodslistFreeGoodsList(data)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+          this.navText.index = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    init() {
+      this.search(2);
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.search();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 46 - 0
src/views/education/questionBankLearning/questionRecordPage/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <div id="questionRecordPage">
+    <div style="margin-bottom:10px;">
+      <el-button
+        :size="size"
+        :type="activeId === 1 ? 'primary' : ''"
+        @click="changePage(1)"
+        >题库商品</el-button
+      >
+      <el-button
+        :size="size"
+        :type="activeId === 2 ? 'primary' : ''"
+        @click="changePage(2)"
+        >赠送题卷</el-button
+      >
+    </div>
+    <bank-goods v-if="activeId === 1" ref="bankGoods" />
+    <gift-paper v-if="activeId === 2" ref="giftPaper" />
+  </div>
+</template>
+
+<script>
+import bankGoods from "./bankGoods.vue";
+import giftPaper from "./giftPaper.vue";
+export default {
+  name: "questionRecordPage",
+  components: {
+    bankGoods,
+    giftPaper,
+  },
+  data() {
+    return {
+      size: "small",
+      activeId: 1,
+    };
+  },
+  methods: {
+    changePage(int) {
+        this.activeId = int
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 186 - 0
src/views/education/questionBankLearning/questionRecordPage/listOfQuestions/index.vue

@@ -0,0 +1,186 @@
+<template>
+  <div id="listOfQuestions">
+    <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="btn" slot-scope="props">
+        <el-button type="text" @click="doList(props.scope.row)"
+          >学员做题数据</el-button
+        >
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="formData.pageSize"
+      :currentPage="formData.pageNum"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+  </div>
+</template>
+
+<script>
+import searchBoxNew from "@/components/searchBoxNew";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
+export default {
+  name: "ListOfQuestions",
+  components: { searchBoxNew, tableList, pagination },
+  data() {
+    return {
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "学员做题列表",
+        index: 0,
+        ch: "条",
+        num: false,
+        border: true,
+        choice: true,
+        addHide: true,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      //搜索
+      formList: [
+        {
+          prop: "searchKey",
+          placeholder: "请输入学员姓名/学员身份证",
+        },
+      ],
+      formData: {
+        pageSize: 10,
+        pageNum: 1,
+      },
+      // 表单
+      tableSet: [
+        {
+          label: "学员姓名",
+          prop: "realName",
+          hidden: true,
+        },
+        {
+          label: "学员身份证",
+          prop: "idCard",
+          hidden: true,
+        },
+        {
+          label: "做题进度",
+          prop1: "doExamNum",
+          prop2: "totalExamNum",
+          hidden: true,
+          scope: "computerDoNum",
+        },
+        {
+          label: "做题开始时间",
+          prop: "doStartTime",
+          hidden: true,
+          scope: "aTimeList",
+        },
+        {
+          label: "做题结束时间",
+          prop: "doEndTime",
+          hidden: true,
+          scope: "aTimeList",
+        },
+        {
+          label: "学习服务期",
+          prop1: "serviceStartTime",
+          prop2: "serviceEndTime",
+          hidden: true,
+          scope: "TimeLists",
+        },
+      ],
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+      goodsId: "",
+    };
+  },
+  mounted() {
+    this.goodsId = this.$route.query.id;
+    this.search();
+  },
+  activated() {
+    this.search();
+  },
+  methods: {
+    doList(row) {
+      const jump = () => {
+        this.$router.push({
+          path: "studentData",
+          query: {
+            userId: row.userId,
+            orderGoodsId: row.orderGoodsId,
+          },
+        });
+      };
+      const statusPage = this.$store.state.tagsView.visitedViews.some(
+        (item) => {
+          return item.name == "StudentData";
+        }
+      );
+      if (statusPage) {
+        this.$store
+          .dispatch("tagsView/delCachedView", {
+            name: "StudentData",
+          })
+          .then((res) => {
+            jump();
+          });
+      } else {
+        jump();
+      }
+    },
+    search(int) {
+      this.loading = true;
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      if (int === 2) {
+        this.formData = {
+          pageSize: 10,
+          pageNum: 1,
+        };
+      }
+      var data = JSON.parse(JSON.stringify(this.formData));
+      data.goodsId = this.goodsId;
+      this.$api
+        .inquiregoodslistBankGoodsList(data)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+          this.navText.index = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    init() {
+      this.search(2);
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.search();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 528 - 0
src/views/education/questionBankLearning/questionRecordPage/listOfQuestions/studentData/index.vue

@@ -0,0 +1,528 @@
+<template>
+  <div id="studentData">
+    <p v-if="details.length === 0">暂无试卷</p>
+    <el-row :gutter="20" class="el_rowStyle" v-else>
+      <el-col :span="5" style="overflow: auto">
+        <el-collapse v-model="activeName" accordion @change="ActiveName">
+          <el-collapse-item
+            v-for="(item, index) in details"
+            :key="index"
+            :title="item.examName"
+            :name="item.examId"
+          >
+            <div
+              class="dis_style"
+              v-for="(items, indexs) in item.recordList"
+              :key="indexs"
+              @click="activeRecordId(items)"
+              :style="activeRecordIs === items.recordId ? 'color:#F56C6C;' : ''"
+            >
+              第{{ item.recordList.length - indexs }}次做题记录
+            </div>
+          </el-collapse-item>
+        </el-collapse>
+      </el-col>
+      <el-col :span="19" v-if="getInfoRecord.recordId" style="font-size: 14px">
+        <table style="width: 100%; border-collapse: collapse" border="1">
+          <tr>
+            <td>提交时间</td>
+            <td>做题用时(分)</td>
+            <td>做题状态</td>
+            <td>已答题数</td>
+            <td>得分(不含主观题)</td>
+            <td>得分(含主观题)</td>
+          </tr>
+          <tr>
+            <td>
+              {{ $methodsTools.onlyForma(getInfoRecord.updateTime) }}
+            </td>
+            <td>
+              {{ $methodsTools.secondToDate(getInfoRecord.doTime) }}
+            </td>
+            <td>{{ getInfoRecord.status === 1 ? "完成" : "未完成" }}</td>
+            <td>
+              {{
+                getInfoRecord.doQuestionNum + "/" + getInfoRecord.allQuestionNum
+              }}
+            </td>
+            <td>{{ getInfoRecord.performance }}</td>
+            <td>{{ getInfoRecord.performance + getInfoRecord.score }}</td>
+          </tr>
+        </table>
+        <div
+          class="showData"
+          style="padding: 0px 20px; max-height: 86%; overflow-y: auto"
+        >
+          <div
+            v-for="(item, index) in getInfoRecord.historyExamJson"
+            :key="index"
+            style="margin: 14px 0px; background-color: #eee; padding: 10px"
+          >
+            <div style="border-bottom: 1px dotted #666; padding: 4px 0px 10px">
+              <span style="margin-right: 14px">题目{{ index + 1 }}</span>
+              <span style="margin-right: 14px">{{
+                changeQuestType(item.type)
+              }}</span>
+              <span style="margin-right: 14px">分值:{{ item.score }}分</span>
+              <span style="margin-right: 14px; color: red"
+                >得分:{{ item.scoreResult }}分</span
+              >
+              <el-button
+                v-if="item.type === 4 || item.type === 5"
+                style="margin-right: 14px"
+                type="text"
+                @click="setMath(item, index)"
+                >评分</el-button
+              >
+            </div>
+            <div class="ddis_fs">
+              <div class="content">题目内容:</div>
+              <div style="flex: 1">
+                <div v-html="item.content"></div>
+                <div v-if="item.type === 4">
+                  <div
+                    style="margin: 20px; background-color: #fff; padding: 12px"
+                    v-for="(ite, ind) in item.jsonStr"
+                    :key="ind"
+                  >
+                    <div class="ddis_fs" v-if="item.ite !== 5">
+                      <div>题目类型:{{ changeQuestType(ite.type) }}</div>
+                    </div>
+                    <div class="ddis_fs">
+                      <div class="content">题目内容:</div>
+                      <div style="flex: 1">
+                        <div v-html="ite.content"></div>
+                        <ul>
+                          <li
+                            v-for="(items, indexs) in ite.optionsList"
+                            :key="indexs"
+                            style="margin-bottom: 10px"
+                          >
+                            {{ Gest(indexs + 1) }}:{{ items.content }}
+
+                            <el-image
+                              v-if="items.imgUrl"
+                              style="
+                                width: 40px;
+                                height: 40px;
+                                vertical-align: middle;
+                              "
+                              :src="$methodsTools.splitImgHost(items.imgUrl)"
+                              :preview-src-list="[
+                                $methodsTools.splitImgHost(items.imgUrl),
+                              ]"
+                            >
+                            </el-image>
+                          </li>
+                        </ul>
+                      </div>
+                    </div>
+                    <div class="ddis_fs" v-if="ite.type !== 5">
+                      <div class="content">正确答案:</div>
+                      <div style="flex: 1">
+                        <span v-if="ite.type === 3">
+                          {{ ite.answerQuestion == 1 ? "正确" : "错误" }}
+                        </span>
+                        <span v-else>
+                          {{ getDictChanges(ite.answerQuestion) }}
+                        </span>
+                      </div>
+                    </div>
+                    <div class="ddis_fs">
+                      <div class="content">答案解析:</div>
+                      <div style="flex: 1">
+                        <div v-html="imgExiz(ite.analysisContent)"></div>
+                      </div>
+                    </div>
+                    <div class="ddis_fs">
+                      <div class="content">填选答案:</div>
+                      <div style="flex: 1">
+                        <p
+                          style="margin: 0px"
+                          v-if="ite.type === 1 || ite.type === 2"
+                        >
+                          {{ getDictChanges(item.ques[ind]) }}
+                        </p>
+                        <p style="margin: 0px" v-if="ite.type === 3">
+                          {{ item.ques[ind] == 1 ? "正确" : "错误" }}
+                        </p>
+                        <div v-if="ite.type === 5">
+                          <p>{{ ite.ansText.text }}</p>
+                          <ul>
+                            <li
+                              v-for="(k, ds) in ite.ansText.imageList"
+                              :key="ds"
+                              style="
+                                width: 100px;
+                                height: 100px;
+                                float: left;
+                                margin: 0px 10px 10px 0px;
+                              "
+                            >
+                              <el-image
+                                v-if="k"
+                                style="width: 100%; height: 100%"
+                                :src="$methodsTools.splitImgHost(k)"
+                                :preview-src-list="[
+                                  $methodsTools.splitImgHost(k),
+                                ]"
+                              >
+                              </el-image>
+                            </li>
+                            <div style="clear: both"></div>
+                          </ul>
+                        </div>
+                      </div>
+                    </div>
+                  </div>
+                </div>
+                <ul v-else>
+                  <li
+                    v-for="(items, indexs) in item.jsonStr"
+                    :key="indexs"
+                    style="margin-bottom: 10px"
+                  >
+                    {{ Gest(indexs + 1) }}:{{ items.content }}
+
+                    <el-image
+                      v-if="items.imgUrl"
+                      style="width: 40px; height: 40px; vertical-align: middle"
+                      :src="$methodsTools.splitImgHost(items.imgUrl)"
+                      :preview-src-list="[
+                        $methodsTools.splitImgHost(items.imgUrl),
+                      ]"
+                    >
+                    </el-image>
+                  </li>
+                </ul>
+              </div>
+            </div>
+            <div class="ddis_fs" v-if="item.type !== 4 && item.type !== 5">
+              <div class="content">正确答案:</div>
+              <div style="flex: 1">
+                <span v-if="item.type === 3">
+                  {{ item.answerQuestion == 1 ? "正确" : "错误" }}
+                </span>
+                <span v-else>
+                  {{ getDictChanges(item.answerQuestion) }}
+                </span>
+              </div>
+            </div>
+            <div class="ddis_fs">
+              <div class="content">答案解析:</div>
+              <div style="flex: 1">
+                <div v-html="imgExiz(item.analysisContent)"></div>
+              </div>
+            </div>
+            <div class="ddis_fs">
+              <div class="content">填选答案:</div>
+              <div style="flex: 1">
+                <p
+                  style="margin: 0px"
+                  v-if="item.type === 1 || item.type === 2"
+                >
+                  {{ getDictChanges(item.ques) }}
+                </p>
+                <p style="margin: 0px" v-if="item.type === 3">
+                  {{ item.ques == 1 ? "正确" : "错误" }}
+                </p>
+                <div v-if="item.type === 5">
+                  <p>{{ item.ansText.text }}</p>
+                  <ul>
+                    <li
+                      v-for="(k, ds) in item.ansText.imageList"
+                      :key="ds"
+                      style="
+                        width: 100px;
+                        height: 100px;
+                        float: left;
+                        margin: 0px 10px 10px 0px;
+                      "
+                    >
+                      <el-image
+                        v-if="k"
+                        style="width: 100%; height: 100%"
+                        :src="$methodsTools.splitImgHost(k)"
+                        :preview-src-list="[$methodsTools.splitImgHost(k)]"
+                      >
+                      </el-image>
+                    </li>
+                    <div style="clear: both"></div>
+                  </ul>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+        <div style="height: 50px; text-align: center; line-height: 50px">
+          <el-button size="mini" type="success" @click="editForms"
+            >提交修改</el-button
+          >
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      activeName: null,
+      activeRecordIs: null,
+      userId: "",
+      orderGoodsId: "",
+      details: [],
+      getInfoRecord: [],
+    };
+  },
+  created() {
+    this.userId = this.$route.query.userId;
+    this.orderGoodsId = this.$route.query.orderGoodsId;
+  },
+  mounted() {
+    this.$api
+      .inquireselectExamList({
+        userId: this.userId,
+        orderGoodsId: this.orderGoodsId,
+      })
+      .then((res) => {
+        this.details = res.data;
+      });
+  },
+  computed: {
+    imgExiz: function () {
+      return function (vms) {
+        if (!vms) {
+          return vms;
+        } else {
+          var ast = vms.replace(/<img/gi, '<img style="max-width:100%;"');
+          return ast;
+        }
+      };
+    },
+  },
+  methods: {
+    /**
+     * 评分
+     */
+    setMath(item, index) {
+      this.$prompt(`题目最大分值为${item.score}分,请评分`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        inputPattern: /^[0-9]*$/,
+        inputErrorMessage: "分值格式不正确",
+        beforeClose: (action, instance, done) => {
+          if (
+            action === "confirm" &&
+            Number(instance.inputValue) > item.score
+          ) {
+            this.$message.warning(`该题评分不得超过${item.score}分`);
+            return;
+          }
+          done();
+        },
+      })
+        .then(({ value }) => {
+          this.$message({
+            type: "success",
+            message: "评分: " + value,
+          });
+          this.$set(
+            this.getInfoRecord.historyExamJson[index],
+            "scoreResult",
+            value
+          );
+        })
+        .catch(() => {});
+    },
+    /**
+     * 点击试卷触发
+     */
+    ActiveName(val) {
+      if (!val) return;
+      const status = this.details.find((item) => {
+        return item.examId === val && item.recordList;
+      });
+      if (status) {
+        return;
+      }
+      this.$api
+        .inquireselectExamListrecord({
+          userId: this.userId,
+          examId: val,
+        })
+        .then((res) => {
+          for (let i = 0; i < this.details.length; i++) {
+            if (this.details[i].examId === val) {
+              this.$set(this.details[i], "recordList", res.rows);
+              break;
+            }
+          }
+        });
+    },
+    /**
+     * 点击记录触发
+     */
+    activeRecordId(row) {
+      if (this.activeRecordIs === row.recordId) return;
+      this.getRecodeInfo(row.recordId);
+    },
+    editForms() {
+      var data = JSON.parse(JSON.stringify(this.getInfoRecord));
+      data.score = 0;
+      for (let i = 0; i < data.historyExamJson.length; i++) {
+        if (
+          (data.historyExamJson[i].type === 4 ||
+            data.historyExamJson[i].type === 5) &&
+          data.historyExamJson[i].scoreResult
+        ) {
+          data.score += data.historyExamJson[i].scoreResult;
+        }
+      }
+      data.historyExamJson = JSON.stringify(data.historyExamJson);
+      this.$api.editrecordexam(data).then((res) => {
+        this.$message.success("修改成功");
+        this.getRecodeInfo(data.recordId);
+      });
+    },
+    getRecodeInfo(id) {
+      this.activeRecordIs = id;
+      this.$api.obtainrecordexam(id).then((res) => {
+        res.data.historyExamJson = JSON.parse(res.data.historyExamJson);
+        if (!res.data.score) {
+          res.data.score = 0;
+        }
+        this.getInfoRecord = res.data;
+        if (document.getElementsByClassName("showData")[0]) {
+          document.getElementsByClassName("showData")[0].scrollTop = 0;
+        }
+      });
+    },
+    getDictChanges(dan) {
+      var arst = [];
+      var arrays;
+      if (dan instanceof Object) {
+        arrays = dan;
+      } else {
+        if (dan) {
+          arrays = dan.toString().split(",");
+        } else {
+          return "";
+        }
+      }
+      for (let i = 0; i < arrays.length; i++) {
+        arst.push(this.Gest(arrays[i]));
+      }
+      return arst.join(",");
+    },
+    /**
+     * 选项转换
+     */
+    Gest(ints) {
+      var int = parseInt(ints);
+      var ast = "";
+      switch (int) {
+        case 1:
+          ast = "A";
+          break;
+        case 2:
+          ast = "B";
+          break;
+        case 3:
+          ast = "C";
+          break;
+        case 4:
+          ast = "D";
+          break;
+        case 5:
+          ast = "E";
+          break;
+        case 6:
+          ast = "F";
+          break;
+        case 7:
+          ast = "G";
+          break;
+        case 8:
+          ast = "H";
+          break;
+        default:
+          ast = "X";
+          break;
+      }
+      return ast;
+    },
+    /**
+     * 题目类型
+     */
+    changeQuestType(int) {
+      var type = "";
+      switch (int) {
+        case 1:
+          type = "单选题";
+          break;
+        case 2:
+          type = "多选题";
+          break;
+        case 3:
+          type = "判断题";
+          break;
+        case 4:
+          type = "案例题";
+          break;
+        case 5:
+          type = "简答题";
+          break;
+
+        default:
+          type = "未知";
+          break;
+      }
+      return type;
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.el_rowStyle {
+  height: calc(100vh - 120px);
+  .el-col {
+    height: 100%;
+  }
+}
+.dis_style {
+  user-select: none;
+  cursor: pointer;
+  height: 36px;
+  line-height: 35px;
+  border-bottom: 1px solid #eee;
+  margin-left: 20px;
+  &:first-of-type {
+    border-top: 1px solid #eee;
+  }
+  &:last-of-type {
+    border: none;
+  }
+}
+/deep/ .el-collapse {
+  border: 1px solid #e6ebf5;
+  padding-left: 10px;
+}
+/deep/ .el-collapse-item__content {
+  padding-bottom: 0px;
+}
+.ddis_fs {
+  display: flex;
+  margin-bottom: 10px;
+}
+.content {
+  width: 70px;
+  flex-shrink: 0;
+}
+td {
+  padding: 6px;
+  text-align: center;
+}
+</style>

+ 47 - 25
src/views/education/studentManageMent/studentList/index.vue

@@ -123,6 +123,7 @@ export default {
           label: "所购商品",
           prop1: "goodsCourseNum",
           prop2: "goodsBankNum",
+          prop3:"goodsLiveNum",
           hidden: true,
           scope: "payGoodsList",
         },
@@ -132,6 +133,7 @@ export default {
           hidden: true,
           scope: "classNums",
           sort: true,
+          width:"120px"
         },
       ],
       tableData: [], //表单数据
@@ -139,6 +141,19 @@ export default {
     };
   },
   mounted() {
+    if (this.$route.params.timeType >= 0) {
+      this.$set(
+        this.formData,
+        "startTime",
+        this.$methodsTools.timestampConvert(this.$route.params.timeType)[0]
+      );
+      this.$set(
+        this.formData,
+        "endTime",
+        this.$methodsTools.timestampConvert(this.$route.params.timeType)[1]
+      );
+    }
+    this.formData.businessId = this.$route.params.businessId || "";
     this.search();
   },
   activated() {
@@ -161,8 +176,15 @@ export default {
           getOrderNum: 1,
         };
       }
+      var data = JSON.parse(JSON.stringify(this.formData))
+      if (this.formData.startTime) {
+        data.startTime = parseInt(data.startTime / 1000);
+      }
+      if (this.formData.endTime) {
+        data.endTime = parseInt(data.endTime / 1000);
+      }
       this.$api
-        .inquiregradestudentlistStudent(this.formData)
+        .inquiregradestudentlistStudent(data)
         .then((res) => {
           this.tableData = res.rows;
           this.total = res.total;
@@ -209,31 +231,31 @@ export default {
         // });
       } else {
         if (int === 2) {
-        const jump = () => {
-          //学员详情
-          this.$router.push({
-            path: "studentXQ",
-            query: {
-              id: v.userId,
-            },
-          });
-        };
-        const statusPage = this.$store.state.tagsView.visitedViews.some(
-          (item) => {
-            return item.name == "StudentXQ";
-          }
-        );
-        if (statusPage) {
-          this.$store
-            .dispatch("tagsView/delCachedView", {
-              name: "StudentXQ",
-            })
-            .then((res) => {
-              jump();
+          const jump = () => {
+            //学员详情
+            this.$router.push({
+              path: "studentXQ",
+              query: {
+                id: v.userId,
+              },
             });
-        } else {
-          jump();
-        }
+          };
+          const statusPage = this.$store.state.tagsView.visitedViews.some(
+            (item) => {
+              return item.name == "StudentXQ";
+            }
+          );
+          if (statusPage) {
+            this.$store
+              .dispatch("tagsView/delCachedView", {
+                name: "StudentXQ",
+              })
+              .then((res) => {
+                jump();
+              });
+          } else {
+            jump();
+          }
         }
         if (int === 3) {
           // 选班

+ 1 - 1
src/views/education/studentManageMent/studentXQ/BankQuestionPassRecord.vue

@@ -820,7 +820,7 @@ export default {
       if (!row.loadDetails) {
         //根据loadDetails判定是否已经加载了数据
         this.$api
-          .inquireselectExamList({ userId: row.userId, goodsId: row.goodsId })
+          .inquireselectExamList({ userId: row.userId, orderGoodsId: row.orderGoodsId })
           .then((res) => {
             row.details = res.data;
             row.loadDetails = true; //加载成功之后更新标识

+ 6 - 1
src/views/education/studentManageMent/studentXQ/index.vue

@@ -13,6 +13,9 @@
       <el-tab-pane label="班级记录" name="classRecode"
         ><class-record
       /></el-tab-pane>
+      <el-tab-pane label="直播-学习记录" name="liveRecode"
+        ><live-list
+      /></el-tab-pane>
     </el-tabs>
   </div>
 </template>
@@ -22,13 +25,15 @@ import BankQuestionPassRecord from "./BankQuestionPassRecord.vue";
 import classRecord from "./classRecord.vue";
 import studentBaseManage from "./studentBaseManage.vue";
 import studyRecord from "./studyRecord.vue";
+import liveList from "./liveList.vue";
 export default {
-  name:"StudentXQ",
+  name: "StudentXQ",
   components: {
     BankQuestionPassRecord,
     classRecord,
     studentBaseManage,
     studyRecord,
+    liveList,
   },
   data() {
     return {

+ 443 - 0
src/views/education/studentManageMent/studentXQ/liveList.vue

@@ -0,0 +1,443 @@
+<template>
+  <div id="studyRecord">
+    <el-table
+      v-loading="loading"
+      height="700"
+      :data="tableData"
+      style="width: 100%"
+      :header-cell-style="{
+        'background-color': 'skyblue',
+        padding: '8px',
+        color: '#333',
+      }"
+    >
+      <el-table-column type="expand" width="40px">
+        <template slot-scope="scope">
+          <el-table
+            border
+            :data="scope.row.subjectStudyRecordVos"
+            style="width: 100%"
+            default-expand-all
+            :header-cell-style="{
+              'background-color': 'rgb(255,255,204)',
+              padding: '8px',
+              color: '#333',
+            }"
+          >
+            <el-table-column
+              v-for="(item, index) in tableSetChild"
+              :width="item.width"
+              :key="index"
+              :label="item.label"
+              align="center"
+            >
+              <template slot-scope="scope1">
+                <span v-if="item.scope === 'types'">
+                  {{
+                    scope1.row[item.prop] === 1
+                      ? "开课"
+                      : scope1.row[item.prop] === 0
+                      ? "未开课"
+                      : "未知"
+                  }}
+                </span>
+                <span v-else-if="item.scope === 'sectionType'">
+                  {{ getTypes(scope1.row[item.prop]) }}
+                </span>
+                <span v-else-if="item.scope === 'studentStatus'">
+                  已观看{{ scope1.row[item.prop1] }}节
+                  <span style="color: green">{{
+                    compons(scope1.row[item.prop1], scope1.row[item.prop2])
+                  }}</span>
+                </span>
+                <span v-else> {{ scope1.row[item.prop] }} </span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="操作"
+              align="center"
+              fixed="right"
+              width="100px"
+            >
+              <template slot-scope="scope1s">
+                <el-button
+                  type="text"
+                  @click="
+                    wantInfo(
+                      scope1s.row,
+                      scope1s.$index,
+                      scope.row.goodsId,
+                      scope.row.gradeId
+                    )
+                  "
+                  >查看</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </template>
+      </el-table-column>
+      <el-table-column
+        v-for="(item, index) in tableSet"
+        :width="item.width"
+        :key="index"
+        :label="item.label"
+        align="center"
+      >
+        <template slot-scope="scope">
+          <span v-if="item.scope === 'yewu'">
+            {{ scope.row[item.prop1] }}-{{ scope.row[item.prop2] }}-{{
+              scope.row[item.prop3]
+            }}
+          </span>
+          <span v-else-if="item.scope === 'time'">
+            {{ $methodsTools.onlyForma(scope.row[item.prop]) }}
+          </span>
+          <span v-else-if="item.scope === 'moreTime'">
+            {{ $methodsTools.onlyForma(scope.row[item.prop1]) }} -
+            {{ $methodsTools.onlyForma(scope.row[item.prop2]) }}
+          </span>
+          <span v-else>
+            {{ scope.row[item.prop] }}{{ item.ch ? item.ch : "" }}
+          </span>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-dialog
+      :visible.sync="dialogVisible"
+      width="1030px"
+      :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>
+        <el-table
+          border
+          height="550"
+          :data="RemardList"
+          style="width: 100%"
+          default-expand-all
+          :header-cell-style="{
+            'background-color': 'rgb(255,255,204)',
+            padding: '8px',
+            color: '#333',
+          }"
+        >
+          <el-table-column label="序号" align="center" type="index" width="70">
+          </el-table-column>
+          <el-table-column
+            v-for="(item, index) in studyListRemard"
+            :width="item.width"
+            :key="index"
+            :label="item.label"
+            align="center"
+          >
+            <template slot-scope="scope">
+              <span v-if="item.scope === 'studyTime'">
+                {{ $methodsTools.onlyForma(scope.row[item.prop1])
+                }}{{
+                  scope.row[item.prop1] && scope.row[item.prop2] ? "至" : ""
+                }}
+                {{ $methodsTools.onlyForma(scope.row[item.prop2]) }}
+              </span>
+              <span v-else-if="item.scope === 'timeCg'">{{
+                $methodsTools.secondToDate(scope.row[item.prop], false)
+              }}</span>
+              <span v-else-if="item.scope === 'status'">
+                {{
+                  scope.row[item.prop] === 1
+                    ? "完成"
+                    : scope.row[item.prop] === 0
+                    ? "学习中"
+                    : "未知"
+                }}
+              </span>
+              <span v-else-if="item.scope === 'computerTimes'">
+                {{
+                  computerTimesFunc(
+                    scope.row[item.prop1],
+                    scope.row[item.prop2]
+                  )
+                }}
+              </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>
+export default {
+  name: "studyRecord",
+  data() {
+    return {
+      dialogVisible: false,
+      tableDataChild: {},
+      tableSetChild: [
+        {
+          label: "课程名称",
+          prop: "courseName",
+          width: "160px",
+        },
+        {
+          label: "科目",
+          prop: "subjectName",
+        },
+        // {
+        //   label: "课程开课状态",
+        //   prop: "beginStatus",
+        //   width: "160px",
+        //   scope: "types",
+        // },
+        {
+          label: "模块",
+          prop: "moduleNum",
+        },
+        {
+          label: "章",
+          prop: "chapterNum",
+        },
+        {
+          label: "节",
+          prop: "sectionNum",
+        },
+        {
+          label: "节类型",
+          prop: "sectionType",
+          scope: "sectionType",
+        },
+        {
+          label: "学习状态",
+          prop1: "recordNum",
+          prop2: "sectionNum",
+          scope: "studentStatus",
+        },
+      ],
+      tableData: [],
+      tableSet: [
+        {
+          label: "商品编码",
+          prop: "code",
+          width: "160px",
+        },
+        {
+          label: "年份",
+          prop: "year",
+        },
+        {
+          label: "商品名称",
+          prop: "goodsName",
+          width: "140px",
+        },
+        {
+          label: "业务层级",
+          prop1: "educationName",
+          prop2: "projectName",
+          prop3: "businessName",
+          scope: "yewu",
+          width: "260px",
+        },
+        {
+          label: "学时",
+          prop: "classHours",
+        },
+        {
+          label: "视频学习进度(节)",
+          prop: "studyNum",
+          width: "140px",
+          ch: "%",
+        },
+        {
+          label: "学习开始时间",
+          prop: "startTime",
+          scope: "time",
+          width: "140px",
+        },
+        {
+          label: "学习结束时间",
+          prop: "endTime",
+          scope: "time",
+          width: "140px",
+        },
+        {
+          label: "学习服务期",
+          prop1: "serviceStartTime",
+          prop2: "serviceEndTime",
+          scope: "moreTime",
+          width: "140px",
+        },
+      ],
+      studyListRemard: [
+        {
+          label: "模块标题",
+          prop: "moduleName",
+          width: "100px",
+        },
+        {
+          label: "章标题",
+          prop: "chapterName",
+          width: "100px",
+        },
+        {
+          label: "节标题",
+          prop: "sectionName",
+        },
+        {
+          label: "节时长",
+          prop: "durationTime",
+          scope: "timeCg",
+        },
+        {
+          label: "学习时间",
+          prop1: "startTime",
+          prop2: "endTime",
+          scope: "studyTime",
+          width: "310px",
+        },
+        {
+          label: "学习时长",
+          prop1: "startTime",
+          prop2: "endTime",
+          width: "100px",
+          scope: "computerTimes",
+        }], //学习记录表格对应column
+      RemardList: [], //学习记录列表
+      loading: false,
+    };
+  },
+  computed: {
+    computerTimesFunc: function () {
+      return function (val1, val2) {
+        if (val1 && val2) {
+          var ast = this.$methodsTools.secondToDate(val2 - val1, false);
+          return ast;
+        } else {
+          return "00:00";
+        }
+      };
+    },
+  },
+  mounted() {
+    this.loading = true;
+    this.$api
+      .inquireuserlistLive({ userId: this.$route.query.id })
+      .then((res) => {
+        this.tableData = res.rows;
+      })
+      .finally(() => {
+        this.loading = false;
+      });
+  },
+  methods: {
+    compons(int1, int2) {
+      if (!int1 || !int2) {
+        return;
+      }
+      let result = (int1 / int2) * 100;
+      if (result == 0 || result == 100) {
+        return result + "%";
+      } else {
+        return result.toFixed(2) + "%";
+      }
+    },
+    //改变返回值
+    getTypes(arr) {
+      if (!arr) {
+        return "暂无";
+      }
+      let arrays = arr.split(",").map(Number);
+      let str = [];
+      for (let i = 0; i < arrays.length; i++) {
+        if (arrays[i] == 1) {
+          str.push("录播");
+        }
+        if (arrays[i] == 2) {
+          str.push("直播");
+        }
+        if (arrays[i] == 3) {
+          str.push("回放");
+        }
+      }
+      return str.toString();
+    },
+    //关闭窗口
+    close() {
+      this.dialogVisible = false;
+    },
+    //获取弹出窗内容
+    wantInfo(item, index, goodsId, gradeId) {
+      this.$api
+        .inquiregradestudentlistSection({
+          userId: this.$route.query.id,
+          courseId: item.courseId,
+          goodsId: goodsId,
+          gradeId: gradeId,
+        })
+        .then((res) => {
+          this.RemardList = res.rows;
+          this.dialogVisible = true;
+        });
+    },
+  },
+};
+</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;
+    }
+  }
+}
+.demo-table-expand {
+  font-size: 0;
+}
+</style>

+ 597 - 73
src/views/index.vue

@@ -42,7 +42,7 @@
           <p class="p2">{{ uploadAnimalData.allStudent.toFixed(0) }}</p>
           <div class="foot_numbox">
             <span class="span1">昨日新增人数</span>
-            <span class="span2">{{
+            <span class="span2" @click="jumpPage(1)">{{
               studentInfomModification.ytdStudent || 0
             }}</span>
           </div>
@@ -50,7 +50,8 @@
       </div>
       <div class="flex_boxs dy_sty2">
         <p>
-          <span>学员资料修改动态</span><span class="watch_all">查看全部</span>
+          <span>学员资料修改动态</span
+          ><span class="watch_all" @click="jumpPage(2)">查看全部</span>
         </p>
         <div class="style_box flex2">
           <div class="flex2_top_box">
@@ -108,13 +109,13 @@
               </div>
               <div class="aNumbox">
                 <span class="span1">视频商品</span>
-                <span class="span2">{{
+                <span class="span2" @click="jumpPage(3)">{{
                   orderconsoledData.allOnVideoNum || 0
                 }}</span>
               </div>
               <div class="aNumbox">
                 <span class="span1">题库商品</span>
-                <span class="span2">{{
+                <span class="span2" @click="jumpPage(4)">{{
                   orderconsoledData.allOnBankNum || 0
                 }}</span>
               </div>
@@ -125,13 +126,13 @@
               </div>
               <div class="aNumbox">
                 <span class="span1">视频商品</span>
-                <span class="span2">{{
+                <span class="span2" @click="jumpPage(5)">{{
                   orderconsoledData.allOffVideoNum || 0
                 }}</span>
               </div>
               <div class="aNumbox">
                 <span class="span1">题库商品</span>
-                <span class="span2">{{
+                <span class="span2" @click="jumpPage(6)">{{
                   orderconsoledData.allOffBankNum || 0
                 }}</span>
               </div>
@@ -151,13 +152,13 @@
               </div>
               <div class="aNumbox">
                 <span class="span1">视频商品</span>
-                <span class="span2">{{
+                <span class="span2" @click="jumpPage(3, 0)">{{
                   orderconsoledData.todOnVideoNum || 0
                 }}</span>
               </div>
               <div class="aNumbox">
                 <span class="span1">题库商品</span>
-                <span class="span2">{{
+                <span class="span2" @click="jumpPage(4, 0)">{{
                   orderconsoledData.todOnBankNum || 0
                 }}</span>
               </div>
@@ -168,13 +169,13 @@
               </div>
               <div class="aNumbox">
                 <span class="span1">视频商品</span>
-                <span class="span2">{{
+                <span class="span2" @click="jumpPage(5, 0)">{{
                   orderconsoledData.todOffVideoNum || 0
                 }}</span>
               </div>
               <div class="aNumbox">
                 <span class="span1">题库商品</span>
-                <span class="span2">{{
+                <span class="span2" @click="jumpPage(6, 0)">{{
                   orderconsoledData.todOffBankNum || 0
                 }}</span>
               </div>
@@ -194,13 +195,13 @@
               </div>
               <div class="aNumbox">
                 <span class="span1">视频商品</span>
-                <span class="span2">{{
+                <span class="span2" @click="jumpPage(3, 1)">{{
                   orderconsoledData.ytdOnVideoNum || 0
                 }}</span>
               </div>
               <div class="aNumbox">
                 <span class="span1">题库商品</span>
-                <span class="span2">{{
+                <span class="span2" @click="jumpPage(4, 1)">{{
                   orderconsoledData.ytdOnBankNum || 0
                 }}</span>
               </div>
@@ -211,13 +212,13 @@
               </div>
               <div class="aNumbox">
                 <span class="span1">视频商品</span>
-                <span class="span2">{{
+                <span class="span2" @click="jumpPage(5, 1)">{{
                   orderconsoledData.ytdOffVideoNum || 0
                 }}</span>
               </div>
               <div class="aNumbox">
                 <span class="span1">题库商品</span>
-                <span class="span2">{{
+                <span class="span2" @click="jumpPage(6, 1)">{{
                   orderconsoledData.ytdOffBankNum || 0
                 }}</span>
               </div>
@@ -226,7 +227,10 @@
         </div>
       </div>
       <div class="flex_boxs dy_sty3" style="margin-right: 0px !important">
-        <p><span>视频商品:订单学时冲突</span></p>
+        <p>
+          <span>视频商品:订单学时冲突</span
+          ><span class="watch_all" @click="jumpPage(7)">查看全部</span>
+        </p>
         <div class="style_box flex3">
           <div class="flex3_1">
             <div class="flex3_children" style="margin-right: 16px">
@@ -265,24 +269,26 @@
         <div class="style_box_tran">
           <div class="imgIBx imgUrl1 imgSize">
             <p class="p1">当前累计数量</p>
-            <p class="p2">{{ uploadAnimalData.allNumClass.toFixed(0) }}</p>
+            <p class="p2" @click="jumpPage(8, -1)">
+              {{ uploadAnimalData.allNumClass.toFixed(0) }}
+            </p>
           </div>
           <div class="li_s">
             <div class="li_s_child">
               <span class="li_s_child_left">今日新增</span
-              ><span class="li_s_child_right">{{
+              ><span class="li_s_child_right" @click="jumpPage(8, 0)">{{
                 classconsoleData.todOpenNum || 0
               }}</span>
             </div>
             <div class="li_s_child">
               <span class="li_s_child_left">昨日新增</span
-              ><span class="li_s_child_right">{{
+              ><span class="li_s_child_right" @click="jumpPage(8, 1)">{{
                 classconsoleData.todPreNum || 0
               }}</span>
             </div>
             <div class="li_s_child">
               <span class="li_s_child_left">近7日新增</span
-              ><span class="li_s_child_right">{{
+              ><span class="li_s_child_right" @click="jumpPage(8, 2)">{{
                 classconsoleData.sevNum || 0
               }}</span>
             </div>
@@ -294,24 +300,26 @@
         <div class="style_box_tran">
           <div class="imgIBx imgUrl2 imgSize">
             <p class="p1">已开班</p>
-            <p class="p2">{{ uploadAnimalData.allOpenNumClass.toFixed(0) }}</p>
+            <p class="p2" @click="jumpPage(9, -1)">
+              {{ uploadAnimalData.allOpenNumClass.toFixed(0) }}
+            </p>
           </div>
           <div class="li_s">
             <div class="li_s_child">
               <span class="li_s_child_left">今日新增</span
-              ><span class="li_s_child_right">{{
+              ><span class="li_s_child_right" @click="jumpPage(9, 0)">{{
                 classconsoleData.todOpenNum || 0
               }}</span>
             </div>
             <div class="li_s_child">
               <span class="li_s_child_left">昨日新增</span
-              ><span class="li_s_child_right">{{
+              ><span class="li_s_child_right" @click="jumpPage(9, 1)">{{
                 classconsoleData.ytdOpenNum || 0
               }}</span>
             </div>
             <div class="li_s_child">
               <span class="li_s_child_left">近7日新增</span
-              ><span class="li_s_child_right">{{
+              ><span class="li_s_child_right" @click="jumpPage(9, 2)">{{
                 classconsoleData.sevOpenNum || 0
               }}</span>
             </div>
@@ -323,24 +331,26 @@
         <div class="style_box_tran">
           <div class="imgIBx imgUrl3 imgSize">
             <p class="p1">预报名</p>
-            <p class="p2">{{ uploadAnimalData.allPreNumClass.toFixed(0) }}</p>
+            <p class="p2" @click="jumpPage(10, -1)">
+              {{ uploadAnimalData.allPreNumClass.toFixed(0) }}
+            </p>
           </div>
           <div class="li_s">
             <div class="li_s_child">
               <span class="li_s_child_left">今日新增</span
-              ><span class="li_s_child_right">{{
+              ><span class="li_s_child_right" @click="jumpPage(10, 0)">{{
                 classconsoleData.todPreNum || 0
               }}</span>
             </div>
             <div class="li_s_child">
               <span class="li_s_child_left">昨日新增</span
-              ><span class="li_s_child_right">{{
+              ><span class="li_s_child_right" @click="jumpPage(10, 1)">{{
                 classconsoleData.ytdPreNum || 0
               }}</span>
             </div>
             <div class="li_s_child">
               <span class="li_s_child_left">近7日新增</span
-              ><span class="li_s_child_right">{{
+              ><span class="li_s_child_right" @click="jumpPage(10, 2)">{{
                 classconsoleData.sevPreNum || 0
               }}</span>
             </div>
@@ -348,7 +358,10 @@
         </div>
       </div>
       <div class="flex_boxs dy_sty3" style="margin-right: 0px !important">
-        <p><span>学习账号标记</span><span class="watch_all">查看全部</span></p>
+        <p>
+          <span>学习账号标记</span
+          ><span class="watch_all" @click="jumpPage(11)">查看全部</span>
+        </p>
         <div class="style_box flex1">
           <div class="foot_box" style="margin-bottom: 16px">
             <div class="foot_box_list" style="margin-right: 16px; height: 64px">
@@ -410,15 +423,21 @@
         <p>填写资料审核</p>
         <div class="style_box flex1">
           <p class="p1">待审数量</p>
-          <p class="p3">83949</p>
+          <p class="p3" @click="jumpPage(15,null,2)">
+            {{ uploadAnimalData.pendingTrialNum.toFixed(0) }}
+          </p>
           <div class="foot_box">
             <div class="foot_box_list" style="margin-right: 16px">
               <div class="top_label">不通过数量</div>
-              <div class="nums">839</div>
+              <div class="nums" @click="jumpPage(15,null,3)">
+                {{ periodconsoleprofileData.unPassNum || 0 }}
+              </div>
             </div>
             <div class="foot_box_list">
               <div class="top_label">通过数量</div>
-              <div class="nums">839</div>
+              <div class="nums" @click="jumpPage(15,null,1)">
+                {{ periodconsoleprofileData.passNum || 0 }}
+              </div>
             </div>
           </div>
         </div>
@@ -428,24 +447,24 @@
         <div class="style_box_tran_yellow">
           <div class="imgIBx imgUrl4 imgSize">
             <p class="p1">待初审</p>
-            <p class="p2">{{ uploadAnimalData.waitAllNum.toFixed(0) }}</p>
+            <p class="p2" @click="jumpPage(16,null,2)">{{ uploadAnimalData.waitAllNum.toFixed(0) }}</p>
           </div>
           <div class="li_s">
             <div class="li_s_child">
               <span class="li_s_child_left">今日新增</span
-              ><span class="li_s_child_right">{{
+              ><span class="li_s_child_right" @click="jumpPage(16,1,2)">{{
                 periodconsoleData.waitTodNum || 0
               }}</span>
             </div>
             <div class="li_s_child">
               <span class="li_s_child_left">昨日新增</span
-              ><span class="li_s_child_right">{{
+              ><span class="li_s_child_right" @click="jumpPage(16,2,2)">{{
                 periodconsoleData.waitYtdNum || 0
               }}</span>
             </div>
             <div class="li_s_child">
               <span class="li_s_child_left">近7日新增</span
-              ><span class="li_s_child_right">{{
+              ><span class="li_s_child_right" @click="jumpPage(16,3,2)">{{
                 periodconsoleData.waitSevNum || 0
               }}</span>
             </div>
@@ -458,24 +477,24 @@
         <div class="style_box_tran_yellow">
           <div class="imgIBx imgUrl5 imgSize">
             <p class="p1">待复审</p>
-            <p class="p2">{{ uploadAnimalData.ingAllNum.toFixed(0) }}</p>
+            <p class="p2" @click="jumpPage(16,null,3)">{{ uploadAnimalData.ingAllNum.toFixed(0) }}</p>
           </div>
           <div class="li_s">
             <div class="li_s_child">
               <span class="li_s_child_left">今日新增</span
-              ><span class="li_s_child_right">{{
+              ><span class="li_s_child_right" @click="jumpPage(16,1,3)">{{
                 periodconsoleData.ingTodNum || 0
               }}</span>
             </div>
             <div class="li_s_child">
               <span class="li_s_child_left">昨日新增</span
-              ><span class="li_s_child_right">{{
+              ><span class="li_s_child_right" @click="jumpPage(16,2,3)">{{
                 periodconsoleData.ingYtdNum || 0
               }}</span>
             </div>
             <div class="li_s_child">
               <span class="li_s_child_left">近7日新增</span
-              ><span class="li_s_child_right">{{
+              ><span class="li_s_child_right" @click="jumpPage(16,3,3)">{{
                 periodconsoleData.ingSevNum || 0
               }}</span>
             </div>
@@ -483,7 +502,10 @@
         </div>
       </div>
       <div class="flex_boxs dy_sty4" style="margin-right: 0px !important">
-        <p><span>学员推送数据</span><span class="watch_all">查看全部</span></p>
+        <p>
+          <span>学员推送数据</span
+          ><span class="watch_all" @click="jumpPage(12)">查看全部</span>
+        </p>
         <div class="style_box flex1">
           <div class="foot_box" style="margin-bottom: 16px">
             <div class="foot_box_list" style="margin-right: 16px; height: 64px">
@@ -554,7 +576,10 @@
     </div>
     <div class="style_div" style="align-items: flex-start">
       <div class="flex_boxs dy_sty2" style="margin-right: 13px; height: auto">
-        <p><span>考试数据</span><span class="watch_all">查看全部</span></p>
+        <p>
+          <span>考试数据</span
+          ><span class="watch_all" @click="jumpPage(13)">查看全部</span>
+        </p>
         <div class="style_box changeTABLE">
           <el-table
             :data="tableData"
@@ -581,10 +606,13 @@
         </div>
       </div>
       <div class="flex_boxs dy_sty2" style="height: auto">
-        <p><span>模考数据</span><span class="watch_all">查看全部</span></p>
+        <p>
+          <span>模考数据</span
+          ><span class="watch_all" @click="jumpPage(14)">查看全部</span>
+        </p>
         <div class="style_box changeTABLE">
           <el-table
-            :data="tableData_MN"
+            :data="MKtableData"
             style="width: 99%"
             :header-cell-style="{
               'background-color': '#E6FFFB',
@@ -627,50 +655,30 @@ export default {
         },
         {
           label: "今日",
-          prop: "label",
+          prop: "TodNum",
         },
         {
           label: "昨日",
-          prop: "label",
+          prop: "YtdNum",
         },
         {
           label: "近7日",
-          prop: "label",
+          prop: "SevNum",
         },
         {
           label: "累计",
-          prop: "label",
-        },
-      ],
-      tableData: [
-        {
-          name: "考试预约",
-          label: "123",
-        },
-        {
-          name: "考试预约",
-          label: "123",
-        },
-        {
-          name: "考试预约",
-          label: "123",
-        },
-      ],
-      tableData_MN: [
-        {
-          name: "考试预约",
-          label: "123",
-        },
-        {
-          name: "考试预约",
-          label: "123",
+          prop: "Num",
         },
       ],
+      tableData: [],
+      MKtableData: [],
       num1: 0,
       studentInfomModification: {}, //学员资料修改动态
       orderconsoledData: {},
       classconsoleData: {},
       periodconsoleData: {},
+      periodconsoleprofileData: {}, //填写资料审核
+      testDataconsoleData: {}, //考试预约
       uploadAnimalData: {
         allStudent: 0, //当前累计人数
         allNum: 0,
@@ -685,6 +693,7 @@ export default {
         allPreNumClass: 0,
         waitAllNum: 0,
         ingAllNum: 0,
+        pendingTrialNum: 0,
       }, //需要动画滚动的数值
       user: {},
     };
@@ -768,6 +777,12 @@ export default {
         ingAllNum: val.ingAllNum,
       });
     },
+    periodconsoleprofileData(val) {
+      gsap.to(this.$data.uploadAnimalData, {
+        duration: 0.5,
+        pendingTrialNum: val.pendingTrialNum,
+      });
+    },
   },
   computed: {
     ...mapGetters(["educationType"]),
@@ -789,15 +804,352 @@ export default {
       this.user = res.data.user;
     });
   },
-  mounted(){
+  mounted() {
     /**
      * 防止监听未触发导致没有选中教育类型-业务层级
      */
-    if(!this.activeEduId && this.educationType && this.educationType.length){
+    if (!this.activeEduId && this.educationType && this.educationType.length) {
       this.activeEduId = this.educationType[0].id;
     }
   },
   methods: {
+    /**
+     * 跳转页面 1.学员列表数据 2.学员资料修改动态 3.线上订单视频 4.线上订单题库 5.线下订单视频 6.线下订单题库
+     */
+    jumpPage(int, timeType, type) {
+      if (int === 1) {
+        const jump = () => {
+          this.$router.push({
+            name: "StudentList",
+            params: {
+              businessId: this.activeBusId,
+              timeType: timeType,
+            },
+          });
+        };
+        const statusPage = this.$store.state.tagsView.visitedViews.some(
+          (item) => {
+            return item.name == "StudentList";
+          }
+        );
+        if (statusPage) {
+          this.$store
+            .dispatch("tagsView/delCachedView", {
+              name: "StudentList",
+            })
+            .then((res) => {
+              jump();
+            });
+        } else {
+          jump();
+        }
+      }
+      if (int === 2) {
+        const jump = () => {
+          this.$router.push({
+            name: "StudentInfoChange",
+            params: {
+              educationId: this.activeEduId,
+              businessId: this.activeBusId,
+            },
+          });
+        };
+        const statusPage = this.$store.state.tagsView.visitedViews.some(
+          (item) => {
+            return item.name == "StudentInfoChange";
+          }
+        );
+        if (statusPage) {
+          this.$store
+            .dispatch("tagsView/delCachedView", {
+              name: "StudentInfoChange",
+            })
+            .then((res) => {
+              jump();
+            });
+        } else {
+          jump();
+        }
+      }
+      if (int === 3 || int === 4) {
+        const jump = () => {
+          this.$router.push({
+            name: "OrderList",
+            params: {
+              goodsType: int === 3 ? 1 : 2,
+              educationId: this.activeEduId,
+              businessId: this.activeBusId,
+              timeType: timeType,
+            },
+          });
+        };
+        const statusPage = this.$store.state.tagsView.visitedViews.some(
+          (item) => {
+            return item.name == "OrderList";
+          }
+        );
+        if (statusPage) {
+          this.$store
+            .dispatch("tagsView/delCachedView", {
+              name: "OrderList",
+            })
+            .then((res) => {
+              jump();
+            });
+        } else {
+          jump();
+        }
+      }
+      if (int === 5 || int === 6) {
+        const jump = () => {
+          this.$router.push({
+            name: "OfflineOrder",
+            params: {
+              goodsType: int === 5 ? 1 : 2,
+              educationId: this.activeEduId,
+              businessId: this.activeBusId,
+              timeType: timeType,
+            },
+          });
+        };
+        const statusPage = this.$store.state.tagsView.visitedViews.some(
+          (item) => {
+            return item.name == "OfflineOrder";
+          }
+        );
+        if (statusPage) {
+          this.$store
+            .dispatch("tagsView/delCachedView", {
+              name: "OfflineOrder",
+            })
+            .then((res) => {
+              jump();
+            });
+        } else {
+          jump();
+        }
+      }
+      if (int === 7) {
+        const jump = () => {
+          this.$router.push({
+            name: "SchoolHoursConflictOrder",
+            params: {
+              educationId: this.activeEduId,
+              businessId: this.activeBusId,
+            },
+          });
+        };
+        const statusPage = this.$store.state.tagsView.visitedViews.some(
+          (item) => {
+            return item.name == "SchoolHoursConflictOrder";
+          }
+        );
+        if (statusPage) {
+          this.$store
+            .dispatch("tagsView/delCachedView", {
+              name: "SchoolHoursConflictOrder",
+            })
+            .then((res) => {
+              jump();
+            });
+        } else {
+          jump();
+        }
+      }
+      if (int === 8 || int === 9 || int === 10) {
+        const jump = () => {
+          this.$router.push({
+            name: "ClassList",
+            params: {
+              educationId: this.activeEduId,
+              businessId: this.activeBusId,
+              timeType: timeType,
+              classStatus: int === 9 ? 1 : int === 10 ? 0 : "",
+            },
+          });
+        };
+        const statusPage = this.$store.state.tagsView.visitedViews.some(
+          (item) => {
+            return item.name == "ClassList";
+          }
+        );
+        if (statusPage) {
+          this.$store
+            .dispatch("tagsView/delCachedView", {
+              name: "ClassList",
+            })
+            .then((res) => {
+              jump();
+            });
+        } else {
+          jump();
+        }
+      }
+      if (int === 11) {
+        const jump = () => {
+          this.$router.push({
+            name: "LearningAccoutTags",
+            params: {
+              educationId: this.activeEduId,
+            },
+          });
+        };
+        const statusPage = this.$store.state.tagsView.visitedViews.some(
+          (item) => {
+            return item.name == "LearningAccoutTags";
+          }
+        );
+        if (statusPage) {
+          this.$store
+            .dispatch("tagsView/delCachedView", {
+              name: "LearningAccoutTags",
+            })
+            .then((res) => {
+              jump();
+            });
+        } else {
+          jump();
+        }
+      }
+      if (int === 12) {
+        const jump = () => {
+          this.$router.push({
+            name: "StudentPushData",
+            params: {
+              educationId: this.activeEduId,
+              businessId: this.activeBusId,
+            },
+          });
+        };
+        const statusPage = this.$store.state.tagsView.visitedViews.some(
+          (item) => {
+            return item.name == "StudentPushData";
+          }
+        );
+        if (statusPage) {
+          this.$store
+            .dispatch("tagsView/delCachedView", {
+              name: "StudentPushData",
+            })
+            .then((res) => {
+              jump();
+            });
+        } else {
+          jump();
+        }
+      }
+      if (int === 13) {
+        const jump = () => {
+          this.$router.push({
+            name: "ApplicationData",
+            params: {
+              educationId: this.activeEduId,
+              businessId: this.activeBusId,
+            },
+          });
+        };
+        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();
+        }
+      }
+      if (int === 14) {
+        const jump = () => {
+          this.$router.push({
+            name: "MockTestData",
+            params: {
+              educationId: this.activeEduId,
+              businessId: this.activeBusId,
+            },
+          });
+        };
+        const statusPage = this.$store.state.tagsView.visitedViews.some(
+          (item) => {
+            return item.name == "MockTestData";
+          }
+        );
+        if (statusPage) {
+          this.$store
+            .dispatch("tagsView/delCachedView", {
+              name: "MockTestData",
+            })
+            .then((res) => {
+              jump();
+            });
+        } else {
+          jump();
+        }
+      }
+      if (int === 15) {
+        const jump = () => {
+          this.$router.push({
+            name: "DataConfig",
+            params: {
+              educationId: this.activeEduId,
+              businessId: this.activeBusId,
+              type: type,
+            },
+          });
+        };
+        const statusPage = this.$store.state.tagsView.visitedViews.some(
+          (item) => {
+            return item.name == "DataConfig";
+          }
+        );
+        if (statusPage) {
+          this.$store
+            .dispatch("tagsView/delCachedView", {
+              name: "DataConfig",
+            })
+            .then((res) => {
+              jump();
+            });
+        } else {
+          jump();
+        }
+      }
+      if (int === 16) {
+        const jump = () => {
+          this.$router.push({
+            name: "ListOfhoursToBeReviewed",
+            params: {
+              educationId: this.activeEduId,
+              businessId: this.activeBusId,
+              timeType: timeType,
+              type: type,
+            },
+          });
+        };
+        const statusPage = this.$store.state.tagsView.visitedViews.some(
+          (item) => {
+            return item.name == "ListOfhoursToBeReviewed";
+          }
+        );
+        if (statusPage) {
+          this.$store
+            .dispatch("tagsView/delCachedView", {
+              name: "ListOfhoursToBeReviewed",
+            })
+            .then((res) => {
+              jump();
+            });
+        } else {
+          jump();
+        }
+      }
+    },
     /**
      * 表格颜色
      */
@@ -823,6 +1175,168 @@ export default {
       this.$api.baseconsoleperiodData({ businessId: id }).then((res) => {
         this.periodconsoleData = res.data;
       });
+      this.$api.baseconsoletestData({ businessId: id }).then((res) => {
+        this.getInData(res);
+      });
+      this.$api.baseconsolemockData({ businessId: id }).then((res) => {
+        this.getMKData(res);
+      });
+      this.$api.baseconsoleprofileData({ businessId: id }).then((res) => {
+        this.periodconsoleprofileData = res.data;
+      });
+    },
+    /**
+     * 考试预约数据格式处理
+     */
+    getInData(res) {
+      let data = [
+        {
+          name: "考试预约",
+        },
+        {
+          name: "考试待登记",
+        },
+        {
+          name: "考试已登记",
+        },
+      ];
+      for (let k in res.data) {
+        switch (k) {
+          case "subTodNum":
+          case "subYtdNum":
+          case "subSevNum":
+          case "subscribeNum":
+            for (let i = 0; i < data.length; i++) {
+              if (data[i].name === "考试预约") {
+                if (k === "subTodNum") {
+                  data[i].TodNum = res.data[k];
+                }
+                if (k === "subYtdNum") {
+                  data[i].YtdNum = res.data[k];
+                }
+                if (k === "subSevNum") {
+                  data[i].SevNum = res.data[k];
+                }
+                if (k === "subscribeNum") {
+                  data[i].Num = res.data[k];
+                }
+                break;
+              }
+            }
+            break;
+          case "waitRegisterTodNum":
+          case "waitRegisterYtdNum":
+          case "waitRegisterSevNum":
+          case "waitRegisterNum":
+            for (let i = 0; i < data.length; i++) {
+              if (data[i].name === "考试待登记") {
+                if (k === "waitRegisterTodNum") {
+                  data[i].TodNum = res.data[k];
+                }
+                if (k === "waitRegisterYtdNum") {
+                  data[i].YtdNum = res.data[k];
+                }
+                if (k === "waitRegisterSevNum") {
+                  data[i].SevNum = res.data[k];
+                }
+                if (k === "waitRegisterNum") {
+                  data[i].Num = res.data[k];
+                }
+                break;
+              }
+            }
+            break;
+          case "registerTodNum":
+          case "registerYtdNum":
+          case "registerSevNum":
+          case "registerNum":
+            for (let i = 0; i < data.length; i++) {
+              if (data[i].name === "考试已登记") {
+                if (k === "registerTodNum") {
+                  data[i].TodNum = res.data[k];
+                }
+                if (k === "registerYtdNum") {
+                  data[i].YtdNum = res.data[k];
+                }
+                if (k === "registerSevNum") {
+                  data[i].SevNum = res.data[k];
+                }
+                if (k === "registerNum") {
+                  data[i].Num = res.data[k];
+                }
+                break;
+              }
+            }
+            break;
+          default:
+            break;
+        }
+      }
+      this.tableData = data;
+    },
+    /**
+     * 模考数据格式处理
+     */
+    getMKData(res) {
+      let data = [
+        {
+          name: "模考预约",
+        },
+        {
+          name: "主观题待评分",
+        },
+      ];
+      for (let k in res.data) {
+        switch (k) {
+          case "subTodNum":
+          case "subYtdNum":
+          case "subSevNum":
+          case "subscribeNum":
+            for (let i = 0; i < data.length; i++) {
+              if (data[i].name === "模考预约") {
+                if (k === "subTodNum") {
+                  data[i].TodNum = res.data[k];
+                }
+                if (k === "subYtdNum") {
+                  data[i].YtdNum = res.data[k];
+                }
+                if (k === "subSevNum") {
+                  data[i].SevNum = res.data[k];
+                }
+                if (k === "subscribeNum") {
+                  data[i].Num = res.data[k];
+                }
+                break;
+              }
+            }
+            break;
+          case "toScoreTodNum":
+          case "toScoreYtdNum":
+          case "toScoreSevNum":
+          case "toScoreNum":
+            for (let i = 0; i < data.length; i++) {
+              if (data[i].name === "主观题待评分") {
+                if (k === "toScoreTodNum") {
+                  data[i].TodNum = res.data[k];
+                }
+                if (k === "toScoreYtdNum") {
+                  data[i].YtdNum = res.data[k];
+                }
+                if (k === "toScoreSevNum") {
+                  data[i].SevNum = res.data[k];
+                }
+                if (k === "toScoreNum") {
+                  data[i].Num = res.data[k];
+                }
+                break;
+              }
+            }
+            break;
+          default:
+            break;
+        }
+      }
+      this.MKtableData = data;
     },
   },
 };
@@ -975,6 +1489,8 @@ export default {
         color: #666666;
       }
       .li_s_child_right {
+        cursor: pointer;
+        user-select: none;
         font-size: 24px;
         font-weight: 400;
         color: #13c2c2;
@@ -1049,6 +1565,8 @@ export default {
         color: #666666;
       }
       .li_s_child_right {
+        cursor: pointer;
+        user-select: none;
         font-size: 24px;
         font-weight: 400;
         color: #13c2c2;
@@ -1103,6 +1621,8 @@ export default {
     color: #0c5dfb;
     margin: 0px;
     flex: 1;
+    user-select: none;
+    cursor: pointer;
   }
   & > .foot_numbox {
     display: flex;
@@ -1118,6 +1638,8 @@ export default {
       font-weight: 400;
       text-decoration: underline;
       color: #0c5dfb;
+      cursor: pointer;
+      user-select: none;
     }
   }
   & > .foot_list_box {
@@ -1157,6 +1679,8 @@ export default {
           font-weight: 400;
           text-decoration: underline;
           color: #0c5dfb;
+          cursor: pointer;
+          user-select: none;
         }
         .span3 {
           font-size: 24px;

+ 4 - 0
src/views/resource/baseManageInfos/index.vue

@@ -73,6 +73,10 @@ export default {
           title: "报读地区",
           url: "enrollmentArea",
         },
+        {
+          title: "证书名称",
+          url: "certificateName",
+        },
         {
           title: "证书类型",
           url: "certificate",

+ 430 - 0
src/views/resource/baseManageInfos/resource/certificateName/index.vue

@@ -0,0 +1,430 @@
+<template>
+  <div id="certificateName">
+    <table-list
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      @addClick="addClick"
+      :loading="loading"
+      @editInfo="editInfo"
+    >
+      <template slot="btn" slot-scope="props">
+        <el-button type="text" @click="addClick(props.scope.row, 0)"
+          >修改</el-button
+        >
+        <el-button type="text" @click="del(props.scope.row)">删除</el-button>
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="pageSize"
+      :currentPage="currentPage"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+    <el-dialog
+      @closed="loadingClose"
+      :visible.sync="dialogVisible"
+      width="560px"
+      :show-close="false"
+      :close-on-click-modal="false"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">
+          {{ statusPop === 1 ? "添加" : statusPop === 0 ? "修改" : "详情" }}
+        </div>
+        <div class="rightBoxs">
+          <img src="@/assets/images/Close@2x.png" alt="" @click="close" />
+        </div>
+      </div>
+      <div>
+        <el-form
+          label-position="right"
+          label-width="110px"
+          :model="listData"
+          :rules="rules"
+          ref="listData"
+        >
+          <el-form-item
+            v-for="(items, indexs) in listitem"
+            :key="indexs"
+            :label="items.label"
+            :prop="items.prop"
+          >
+            <el-radio-group
+              v-if="items.scope === 'status'"
+              v-model="listData[items.prop]"
+            >
+              <el-radio
+                v-for="(item, index) in items.options"
+                :key="index"
+                :label="item.value"
+                :disabled="statusPop === 2"
+                >{{ item.label }}</el-radio
+              >
+            </el-radio-group>
+            <el-select
+            v-else-if="items.scope === 'select'"
+            v-model="listData[items.prop]"
+            :placeholder="items.placeholder"
+          >
+            <el-option
+              v-for="(item, index) in certificate"
+              :key="index"
+              :label="item.certificateName"
+              :value="item.id"
+            ></el-option>
+          </el-select>
+            <el-input
+              :disabled="statusPop === 2"
+              v-else-if="items.scope === 'textarea'"
+              type="textarea"
+              v-model="listData[items.prop]"
+            ></el-input>
+            <el-input
+              :disabled="statusPop === 2"
+              v-else
+              v-model="listData[items.prop]"
+            ></el-input>
+          </el-form-item>
+        </el-form>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="close">取 消</el-button>
+        <el-button
+          type="primary"
+          :loading="disabledBtn"
+          v-if="statusPop !== 2"
+          @click="submit('listData')"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {mapGetters} from "vuex"
+import searchBox from "@/components/searchBox";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
+export default {
+  name: "CertificateName",
+  components: { searchBox, tableList, pagination },
+  data() {
+    return {
+      disabledBtn: false,
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "证书名称",
+        index: 0,
+        ch: "条",
+        num: true,
+        choice: true,
+        addHide: false,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      // 表单
+      tableSet: [
+        {
+          label: "证书名称编码",
+          prop: "code",
+          hidden: true,
+        },
+        {
+          label: "证书名称",
+          prop: "certificateName",
+          hidden: true,
+          scope: "editInfo",
+        },
+        {
+          label: "证书类型",
+          prop: "certificateTypeName",
+          hidden: true,
+        },
+        {
+          label: "状态",
+          prop: "status",
+          hidden: true,
+          scope: "status",
+        },
+      ],
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+      pageSize: 10, //每页多少条数据
+      currentPage: 1, //当前页码
+      // 弹窗字段
+      listitem: [
+        {
+          label: "证书类型",
+          prop: "certificateTypeId",
+          scope:"select",
+          placeholder:"请选择证书类型"
+        },
+        {
+          label: "证书名称",
+          prop: "certificateName",
+          placeholder:"请输入证书名称"
+        },
+        {
+          label: "状态",
+          prop: "status",
+          scope: "status",
+          options: [
+            {
+              label: "启用",
+              value: 1,
+            },
+            {
+              label: "关闭",
+              value: 0,
+            },
+          ],
+        },
+        {
+          label: "备注",
+          prop: "remark",
+          scope: "textarea",
+        },
+      ],
+      //   弹窗数据
+      listData: {},
+      statusPop: -1,
+      dialogVisible: false,
+      //表单验证
+      rules: {
+        certificateTypeId: [
+          { required: true, message: "请选择证书类型", trigger: "change" },
+        ],
+        certificateName: [
+          { required: true, message: "请输入证书名称", trigger: "blur" },
+        ],
+        status: [{ required: true, message: "请选择状态", trigger: "change" }],
+      },
+    };
+  },
+  computed:{...mapGetters(["certificate"])},
+  mounted() {
+    this.search();
+  },
+  activated(){
+    this.search();
+  },
+  methods: {
+    editInfo(v) {
+      this.addClick(v, 0);
+    },
+    search(v) {
+      this.loading = true;
+      var data = {
+        status: "0,1",
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+      };
+      this.$api
+        .inquireBaseCertificatecommon(data)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+          this.navText.index = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    init() {
+      this.search();
+    },
+    del(v) {
+      this.$alert(
+        "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
+        "提示",
+        {
+          dangerouslyUseHTMLString: true,
+        }
+      )
+        .then(() => {
+          var data = {
+            id: v.id,
+            status: -1,
+          };
+          this.$api.editBaseCertificatecommon(data).then((res) => {
+            this.$message.success("删除成功");
+            this.$store.commit("CERTIFICATENAME");
+            this.search();
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+    addClick(v, int) {
+      if (v === undefined) {
+        this.statusPop = 1;
+        this.listData = {
+          status: 1,
+        };
+      } else {
+        this.statusPop = int;
+        this.listData = JSON.parse(JSON.stringify(v));
+      }
+      this.$nextTick(() => {
+        this.$refs.listData.clearValidate();
+      });
+      this.dialogVisible = true;
+    },
+    submit(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.rulesTableSumbit();
+        } else {
+          return false;
+        }
+      });
+    },
+    loadingClose() {
+      this.disabledBtn = false;
+    },
+    rulesTableSumbit() {
+      this.disabledBtn = true;
+      if (this.statusPop === 1) {
+        this.$api
+          .appBaseCertificatecommon(this.listData)
+          .then((res) => {
+            this.$message.success("新增成功");
+            this.dialogVisible = false;
+            this.$store.commit("CERTIFICATENAME");
+            this.search();
+          })
+          .catch(() => {
+            this.disabledBtn = false;
+          });
+      }
+      if (this.statusPop === 0) {
+        this.$api
+          .editBaseCertificatecommon(this.listData)
+          .then((res) => {
+            this.$message.success("修改成功");
+            this.dialogVisible = false;
+            this.$store.commit("CERTIFICATENAME");
+            this.search();
+          })
+          .catch(() => {
+            this.disabledBtn = false;
+          });
+      }
+    },
+    close() {
+      this.dialogVisible = false;
+    },
+    handleSizeChange(v) {
+      this.pageSize = v;
+      this.currentPage = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.currentPage = v;
+      this.search();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+/deep/.el-button {
+  border-radius: 8px;
+}
+/deep/.el-dialog {
+  border-radius: 8px;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+.imgBox {
+  width: 100%;
+  // height: 210px;
+  border: 1px solid #e2e2e2;
+  border-radius: 8px;
+  padding: 8px 8px 3px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  .imgLabel {
+    flex: 1;
+    width: 100%;
+    border: 1px dotted #e2e2e2;
+    color: #999;
+    font-size: 14px;
+    cursor: pointer;
+    border-radius: 8px;
+    .msPhoto {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      max-width: 100%;
+      max-height: 270px;
+      img {
+        max-width: 100%;
+        max-height: 270px;
+      }
+    }
+    .imgbbx {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      width: 100%;
+      height: 100%;
+      i {
+        font-weight: bold;
+        margin: 14px 0;
+        font-size: 24px;
+      }
+    }
+  }
+  p {
+    margin: 5px 0px;
+  }
+}
+</style>
+

+ 2 - 2
src/views/resource/videoManagement/courseManagement/basicInfoAdd/index.vue

@@ -57,7 +57,7 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item
+        <!-- <el-form-item
           label="专业"
           prop="majorId"
           v-if="listData.businessId && avtivesMajor()"
@@ -71,7 +71,7 @@
             >
             </el-option>
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item
           label="科目"
           prop="subjectId"

+ 2 - 2
src/views/resource/videoManagement/courseManagement/basicInfoEdit/index.vue

@@ -55,7 +55,7 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item
+        <!-- <el-form-item
           label="专业"
           prop="majorId"
           v-if="listData.businessId && avtivesMajor()"
@@ -69,7 +69,7 @@
             >
             </el-option>
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item
           label="科目"
           prop="subjectId"

Некоторые файлы не были показаны из-за большого количества измененных файлов