caichengyu 1 week geleden
bovenliggende
commit
9ba83041bd

+ 25 - 0
src/apis/course.js

@@ -470,6 +470,7 @@ export default {
 		  method: 'get'
 		})
 	  },
+	  //技术员
 	techniciancheck(data) {
 		return request({
 			url: '/order/technician/check',
@@ -477,4 +478,28 @@ export default {
 			data: data
 		})
 	},
+	//助理工程师
+	assistantcheck(data) {
+		return request({
+			url: '/order/assistant/check',
+			method: 'post',
+			data: data
+		})
+	},
+	//中级工程师
+	engineerintermediatecheck(data) {
+		return request({
+			url: '/order/engineer/intermediate/check',
+			method: 'post',
+			data: data
+		})
+	},
+	//高级工程师
+	engineeradvancedcheck(data) {
+		return request({
+			url: '/order/engineer/advanced/check',
+			method: 'post',
+			data: data
+		})
+	},
 }

+ 8 - 0
src/components/dataReview/index.vue

@@ -49,6 +49,7 @@
                 <el-select
                   v-model="infoForm[item.fieldKey]"
                   :placeholder="`请选择${item.fieldName}`"
+                  :disabled="item.fieldKey == 'apply_post'"
                   clearable
                 >
                   <el-option
@@ -520,6 +521,13 @@ export default {
             this.$store.state.userInfo.eduLevel
           );
         }
+        if (!this.infoForm["apply_post"] && this.activeData.majorName) {
+          this.$set(
+            this.infoForm,
+            "apply_post",
+            this.activeData.majorName
+          );
+        }
         if (
           !this.infoForm["recent_photos"] &&
           this.$store.state.userInfo.oneInchPhotos

File diff suppressed because it is too large
+ 1535 - 11
src/components/technician/index.vue


+ 2 - 0
src/pages/course-detail/components/coreContent.vue

@@ -162,6 +162,7 @@ export default {
       if (this.goodsData.firstChoiceStatus) {
         this.$refs.preference.openBoxs(this.goodsData);
       } else {
+        console.log('asd',this.goodsData)
         this.$refs.dataReview.init({
           goodsId: this.goodsData.goodsId,
           orderGoodsId: this.goodsData.orderGoodsId,
@@ -171,6 +172,7 @@ export default {
           projectName: this.goodsData.projectName,
           businessName: this.goodsData.businessName,
           categoryName: this.goodsData.categoryName,
+          majorName: this.goodsData.categoryName,
         });
       }
     },

+ 183 - 1
src/pages/home2/top.vue

@@ -137,11 +137,16 @@
       </div>
     </div>
     <login ref="login"></login>
+      <RebuildModal
+      ref="rebuildModal"
+      @rebuildSubmit="rebuildSubmit($event)"
+    ></RebuildModal>
   </div>
 </template>
 
 <script>
 import login from "@/components/login";
+import RebuildModal from "@/components/rebuildModal";
 import { swiper, swiperSlide } from "vue-awesome-swiper";
 import "swiper/swiper-bundle.css";
 import { mapGetters } from "vuex";
@@ -149,7 +154,7 @@ export default {
   components: {
     swiper,
     swiperSlide,
-    login
+    login,RebuildModal
   },
   data() {
     return {
@@ -245,6 +250,7 @@ export default {
           courseId: this.recordList.courseId
         });
       } else if (this.recordList.goodsType == 1) {
+         this.canJump(this.recordList).then(res => {
         this.$router.push({
           path: `/my-course-detail/${this.recordList.goodsId}`,
           query: {
@@ -252,8 +258,184 @@ export default {
             orderGoodsId: this.recordList.orderGoodsId,
           }
         });
+        })
       }
     },
+    canJump(item) {
+      return new Promise(resolve => {
+        this.$request
+          .orderInfo({
+            orderGoodsId: item.orderGoodsId
+          })
+          .then(async res => {
+            let items = res.data;
+            let currentTime = this.$tools.timest();
+            if (items.interfaceAccountId > 0) {
+              //学习账号已开通
+
+              if (items.learnStatus == 1) {
+                //跳转第三方h5
+
+                const confirmText = [
+                  "您的学习账号已经开通,请按照步骤操作,进行学习。",
+                  "1.点击【跳转学习网址】按钮",
+                  "2.打开学习网址后,选择【个人用户】进行登录",
+                  "(1)账号:您个人的身份证号码",
+                  "(2)密码:身份证号码,再加111111"
+                ];
+                const newDatas = [];
+                const h = this.$createElement;
+                for (const i in confirmText) {
+                  newDatas.push(h("p", null, confirmText[i]));
+                }
+                this.$confirm(h("div", null, newDatas), "温馨提示", {
+                  confirmButtonText: "跳转学习网址",
+                  cancelButtonText: "关闭",
+                  closeOnClickModal: false,
+                  closeOnPressEscape: false,
+                  distinguishCancelAndClose: false,
+                  showClose: false
+                })
+                  .then(_ => {
+                    window.open("http://admin.zhujianpeixun.com/", "_blank");
+                  })
+                  .catch(_ => {});
+
+                return;
+              } else {
+                this.$message({
+                  type: "warning",
+                  message:
+                    "您的学习账号未开通,请稍后再尝试,有疑问,请联系020-87085982!"
+                });
+                return;
+              }
+            }
+            // //内部系统
+            // if (items.interfacePushId > 0 && items.officialStatus != 1) {
+            //   this.$message({
+            //     type: "warning",
+            //     message:
+            //       "机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!",
+            //   });
+            //   return;
+            // }
+            if (items.goodsType !== 6) {
+              if (
+                this.sysTime <= items.serviceStartTime ||
+                this.sysTime >= items.serviceEndTime
+              ) {
+                this.$message({
+                  type: "warning",
+                  message: "不在学习服务期,不能进入学习"
+                });
+                return;
+              }
+
+              if (
+                (items.classStartTime &&
+                  this.sysTime <= items.classStartTime) ||
+                (items.classEndTime && this.sysTime >= items.classEndTime)
+              ) {
+                this.$message({
+                  type: "warning",
+                  message: "不在班级有效期,不能进入学习"
+                });
+                return;
+              }
+
+              if (items.learningStatus == 2) {
+                this.$message({
+                  type: "warning",
+                  message: "开放学习时间待定,不能进入学习"
+                });
+                return;
+              }
+
+              if (items.classStatus == 0) {
+                this.$message({
+                  type: "warning",
+                  message: "尚未开班,不能进入学习"
+                });
+                return;
+              }
+              if (
+                items.learningStatus == 3 &&
+                this.sysTime < items.learningTimeStart
+              ) {
+                this.$message({
+                  type: "warning",
+                  message: "不在开放学习时间,不能进入学习"
+                });
+                return;
+              }
+
+              let rebuildStatus = await this.courseGoodsRebuildStatus(
+                items.goodsId,
+                items.gradeId
+              );
+
+              if (rebuildStatus == 0) {
+                this.$refs.rebuildModal.showModal(items);
+                return;
+              }
+            }
+
+            // if (item.educationName == "继续教育") {
+            this.$request
+              .lockLockStatus({
+                action: "jxjy"
+              })
+              .then(res => {
+                //有其他端在操作,不能学习
+                this.$message({
+                  type: "warning",
+                  message: res.msg
+                });
+              })
+              .catch(err => {
+                //可以学习
+                this.$request
+                  .courseCourseList({
+                    pageNum: 1,
+                    pageSize: 1,
+                    goodsId: items.goodsId,
+                    gradeId: items.gradeId
+                  })
+                  .then(res => {
+                    if (res.rows.length) {
+                      resolve(res);
+                    } else {
+                      this.$message({
+                        type: "warning",
+                        message: "课程内暂无可以学习的科目"
+                      });
+                    }
+                  });
+              });
+
+            // } else {
+            //   this.$request
+            //     .courseCourseList({
+            //       pageNum: 1,
+            //       pageSize: 1,
+            //       goodsId: items.goodsId,
+            //       gradeId: items.gradeId,
+            //     })
+            //     .then((res) => {
+            //       if (res.rows.length) {
+            //         resolve(res);
+            //       } else {
+            //         this.$message({
+            //           type: "warning",
+            //           message: "课程内暂无可以学习的科目",
+            //         });
+            //       }
+            //     });
+            // }
+          });
+      });
+    },
     goCourse(item) {
       // if (item.topicId) {
       //   this.$router.push({

+ 23 - 5
src/pages/person-center/my-course/index.vue

@@ -77,17 +77,17 @@
               <div class="text">
                 <div class="title" style="margin-bottom: 14px">
                   {{ item.goodsName }}
-                  <div class="note">
+                  <div class="note" v-if="item.educationName!='技工办证'">
                     {{ item.courseNum }}课程
                     {{ item.secAllNum + item.examNum }}节
                     {{ item.classHours }}学时
                   </div>
-                  <div class="note" v-if="item.orderYear">
+                  <div class="note" v-if="item.orderYear &&item.educationName!='技工办证'">
                     {{ item.orderYear }}年
                   </div>
                 </div>
 
-                <div class="state" style="margin-bottom: 14px">
+                <div class="state" style="margin-bottom: 14px" v-if="item.educationName!='技工办证'">
                   <template v-if="item.periodStatus == -1">
                     学习状态:
                     <div class="note" v-if="!item.studyStatus">未学习</div>
@@ -339,7 +339,7 @@
                     </template>
                   </template>
                 </div>
-                <div class="progress" style="margin-bottom: 14px">
+                <div class="progress" style="margin-bottom: 14px" v-if="item.educationName!='技工办证'">
                   学习进度:
                   <span class="class_btn">{{ progressText(item) }}</span>
                   <span
@@ -436,7 +436,7 @@
                   >
                 </div>
               </div>
-              <div class="btns-wrap">
+              <div class="btns-wrap" v-if="item.educationName!='技工办证'">
                 <div class="btns">
                   <el-button
                     :type="
@@ -554,6 +554,16 @@
                   >
                 </div>
               </div>
+              <div class="btns-wrap" v-else>
+                <div class="btns">
+                  <el-button
+                    type="primary"
+                    class="btn btn--normal"
+                    @click="showjigong(item)"
+                    >申报资料
+                  </el-button>
+                   </div>
+              </div>
             </div>
 
             <div
@@ -844,6 +854,7 @@
       </span></el-dialog
     >
     <dataReview ref="dataReview" @callbackDataReview="courseGoodsList()" />
+      <technician ref="technician" ></technician>
   </div>
 </template>
 
@@ -855,6 +866,7 @@ import RebuildModal from "@/components/rebuildModal";
 import ExercisesModal from "@/components/exercisesModal";
 import dataReview from "@/components/dataReview";
 import AppointTest from "./components/AppointTest.vue";
+import technician from "@/components/technician/index.vue";
 import * as baseUrls from "@/axios.js";
 export default {
   name: "MyCourse",
@@ -864,6 +876,7 @@ export default {
     ExercisesModal,
     dataReview,
     AppointTest,
+     technician,
   },
   data() {
     return {
@@ -1043,6 +1056,11 @@ export default {
         path: "/payment",
       });
     },
+    showjigong(item){
+      var jsondata=JSON.parse(item.dataStr);
+      this.$refs.technician.openBoxs(jsondata.majorName,jsondata.goodsId,jsondata);
+     this.$refs.dataReview.init(item.dataStr, true); 
+    },
     //学员资料
     dataReview(item) {
       this.$refs.dataReview.init(item, true);

Some files were not shown because too many files changed in this diff