Selaa lähdekoodia

七大员继教处理

Tang 2 vuotta sitten
vanhempi
commit
690ff3ca50

+ 8 - 0
src/apis/bank.js

@@ -353,4 +353,12 @@ export default {
       method: 'get'
     })
   },
+  coursespecialquestionlist(data) {
+    return request({
+      url: "/course/special/question/list",
+      method: 'get',
+      params: data
+    })
+  },
+
 }

+ 13 - 0
src/apis/course.js

@@ -28,6 +28,19 @@ export default {
 			params: data
 		})
 	},
+	/**
+	 * 
+	 * @param {*} data 
+	 * @returns 
+	 * 继教七大员公共课程同步
+	 */
+	syncSevenPublicClass(data) {
+		return request({
+			url: '/study/record/syncSevenPublicClass',
+			method: 'get',
+			params: data
+		})
+	},
 
 	/**
 	 * 

+ 14 - 6
src/apis/profileTp.js

@@ -56,7 +56,7 @@ export default {
 		})
 	},
 
-  //获取填写盖章审核详细信息
+	//获取填写盖章审核详细信息
 	getbaseprofileStampgetInfo(data) {
 		return request({
 			url: '/base/profileStamp/getInfo',
@@ -65,7 +65,7 @@ export default {
 		})
 	},
 
-  
+
 	//导出盖章word
 	addWordbaseprofileStamp(data) {
 		return request({
@@ -75,7 +75,7 @@ export default {
 		})
 	},
 
-  //修改填写盖章审核
+	//修改填写盖章审核
 	editbaseprofileStamp(data) {
 		return request({
 			url: '/base/profileStamp/edit',
@@ -84,7 +84,7 @@ export default {
 		})
 	},
 
-  //新增填写盖章审核
+	//新增填写盖章审核
 	addbaseprofileStamp(data) {
 		return request({
 			url: '/base/profileStamp',
@@ -93,12 +93,20 @@ export default {
 		})
 	},
 
-  baseProfileStampV2AddWord(data) {
+	baseProfileStampV2AddWord(data) {
 		return request({
 			url: '/base/profileStamp/V2/addWord',
 			method: 'post',
 			data: data
 		})
-	}
+	},
+	//更新七大员承诺书
+	baseprofiletpcommitmentupload(data) {
+		return request({
+			url: '/base/profile/tp/commitment/upload',
+			method: 'post',
+			data: data
+		})
+	},
 
 }

+ 2 - 2
src/axios.js

@@ -1,8 +1,8 @@
 import axios from 'axios'
 import store from './store'
 import { Notification } from 'element-ui'
-export const BASE_URL = process.env.BASE_URL    //测试-外网
-// export const BASE_URL = "http://192.168.1.7:5055"    //测试-外网
+// export const BASE_URL = process.env.BASE_URL    //测试-外网
+export const BASE_URL = "http://192.168.1.7:5055"    //测试-外网
 export const tenantId = process.env.TENANT_ID
 import tools from './common/tools'
 import router from './router'

+ 95 - 34
src/components/buyCourseModal/index.vue

@@ -60,6 +60,29 @@
             placeholder="请选择报考地区"
           ></el-cascader>
         </div>
+        <div
+          class="selection"
+          v-if="goodsDetail.sevenYear && goodsDetail.goodsType == 1"
+        >
+          <el-form
+            :model="ruleForm"
+            status-icon
+            :rules="rules"
+            ref="ruleForm"
+            label-width="180px"
+            class="demo-ruleForm"
+          >
+            <el-form-item label="七大员继教可选年份:" prop="checkList">
+              <el-checkbox-group v-model="ruleForm.checkList">
+                <el-checkbox
+                  v-for="(item, index) in sevenYear"
+                  :key="index"
+                  :label="item"
+                ></el-checkbox>
+              </el-checkbox-group>
+            </el-form-item>
+          </el-form>
+        </div>
       </div>
 
       <div slot="footer" class="dialog-footer">
@@ -86,10 +109,23 @@ export default {
       gradeId: "",
       examineList: [],
       examArea: [],
+      sevenYear: [],
+      ruleForm: {
+        checkList: []
+      },
       educationId: "",
       props: {
         lazy: true,
         lazyLoad: this.lazyLoad
+      },
+      rules: {
+        checkList: [
+          {
+            required: true,
+            message: "请选择七大员继教年份",
+            trigger: "change"
+          }
+        ]
       }
     };
   },
@@ -98,6 +134,7 @@ export default {
     showModal(item) {
       this.gradeId = "";
       this.gradeList = [];
+      this.ruleForm.checkList = [];
       this.selectClassModal = true;
       this.goodsDetail = item;
       if (this.goodsDetail.specialGoods) {
@@ -109,6 +146,9 @@ export default {
       ) {
         this.selectClick(this.goodsDetail, "exam", true);
       }
+      if (this.goodsDetail.sevenYear) {
+        this.sevenYear = item.sevenYear.split(",") || [];
+      }
     },
     selectClick(goodsDetail, type, status) {
       if (type == "class") {
@@ -138,8 +178,8 @@ export default {
                   this.gradeList.unshift(item);
                 }
               }
-              if(status){
-                this.gradeId = this.gradeList[0].gradeId
+              if (status) {
+                this.gradeId = this.gradeList[0].gradeId;
               }
             });
         }
@@ -151,13 +191,26 @@ export default {
           .getExamineList({ projectId: goodsDetail.projectId })
           .then(res => {
             this.examineList = res.rows;
-            if(status){
-                this.educationId = this.examineList[0].educationId
-              }
+            if (status) {
+              this.educationId = this.examineList[0].educationId;
+            }
           });
       }
     },
-    pay() {
+    validateFunc() {
+      return new Promise((resolve, reject) => {
+        this.$refs["ruleForm"].validate(valid => {
+          if (valid) {
+            resolve(true);
+          } else {
+            resolve(false);
+            console.log("error submit!!");
+            return false;
+          }
+        });
+      });
+    },
+    async pay() {
       if (this.goodsDetail.specialGoods == 1) {
         if (!this.gradeId && this.gradeId !== 0) {
           this.$message({
@@ -188,36 +241,44 @@ export default {
           return false;
         }
       }
-
-      let selectGoodsList = JSON.parse(JSON.stringify([this.goodsDetail]));
-      selectGoodsList.forEach(item => {
-        if (item.goodsType == 1) {
-          if (item.specialGoods == 1) {
-            let goodsInputData = {
-              type: "class",
-              gradeId: this.gradeId,
-              gradeJson: JSON.stringify(
-                this.gradeList.find(grade => grade.gradeId == this.gradeId)
-              )
-            };
-            item.goodsInputData = goodsInputData;
-          }
-          if (item.templateType == "apply") {
-            let goodsInputData = {
-              type: "apply",
-              applyAreasJson: JSON.stringify(this.applyAreas),
-              examDateJson: JSON.stringify(
-                this.examineList.find(
-                  exam => exam.educationId == this.educationId
-                )
+      if (this.goodsDetail.sevenYear && this.goodsDetail.goodsType == 1) {
+        const A = await this.validateFunc();
+        if (!A) {
+          return;
+        }
+      }
+      let selectGoodsList = Object.assign({}, this.goodsDetail);
+      if (selectGoodsList.goodsType == 1) {
+        if (selectGoodsList.specialGoods == 1) {
+          let goodsInputData = {
+            type: "class",
+            gradeId: this.gradeId,
+            gradeJson: JSON.stringify(
+              this.gradeList.find(grade => grade.gradeId == this.gradeId)
+            )
+          };
+          selectGoodsList.goodsInputData = goodsInputData;
+        }
+        if (selectGoodsList.templateType == "apply") {
+          let goodsInputData = {
+            type: "apply",
+            applyAreasJson: JSON.stringify(this.applyAreas),
+            examDateJson: JSON.stringify(
+              this.examineList.find(
+                exam => exam.educationId == this.educationId
               )
-            };
-            item.goodsInputData = goodsInputData;
-          }
+            )
+          };
+          selectGoodsList.goodsInputData = goodsInputData;
         }
-      });
-
-      localStorage.setItem("checkGoodsList", JSON.stringify(selectGoodsList));
+      }
+      var mas = [selectGoodsList];
+      if (this.goodsDetail.sevenYear && this.goodsDetail.goodsType == 1) {
+        mas = this.ruleForm.checkList.map(i => {
+          return { ...selectGoodsList, sevenYear: i };
+        });
+      }
+      localStorage.setItem("checkGoodsList", JSON.stringify(mas));
 
       this.$router.push({
         path: "/payment"

+ 130 - 104
src/components/dataReview/index.vue

@@ -3,41 +3,26 @@
     <el-dialog
       title="资料填写"
       :visible.sync="isShow"
-      width="920px"
+      width="1000px"
       :close-on-click-modal="false"
       :close-on-press-escape="false"
       :show-close="false"
     >
       <div class="info__content">
         <el-row :gutter="20">
-          <el-form :model="infoForm" ref="infoForm" :rules="rules">
+          <el-form
+            :model="infoForm"
+            ref="infoForm"
+            :rules="rules"
+            :disabled="STATUS"
+          >
             <el-col
               v-for="(item, index) in listData"
               :span="item.fieldKey == 'commitment_electr_signature' ? 24 : 12"
               :key="index"
             >
               <el-form-item
-                v-if="item.fieldKey == 'apply_post'"
-                :label="item.fieldName"
-                label-width="120px"
-                :prop="item.fieldKey"
-              >
-                <el-select
-                  v-model="infoForm[item.fieldKey]"
-                  :placeholder="`请选择${item.fieldName}`"
-                  clearable
-                >
-                  <el-option
-                    v-for="(items, indexs) in apply_post_options"
-                    :key="indexs"
-                    :label="items"
-                    :value="items"
-                  >
-                  </el-option>
-                </el-select>
-              </el-form-item>
-              <el-form-item
-                v-else-if="item.inputType == 1"
+                v-if="item.inputType == 1"
                 :label="item.fieldName"
                 label-width="120px"
                 :prop="item.fieldKey"
@@ -76,48 +61,52 @@
                 </el-select>
               </el-form-item>
               <template v-else-if="item.inputType == 3 || item.inputType == 4">
-                <el-form-item
+                <div
+                  class="cns_sq"
                   v-if="item.fieldKey == 'commitment_electr_signature'"
-                  label=""
-                  label-width="0px"
-                  :prop="item.fieldKey"
                 >
-                  <div class="cns_sq">
-                    <div class="left">
-                      <h3>承诺书</h3>
-                      <p>
-                        本人自愿做出如下承诺:本人己仔细阅读《广东省住房和城乡建设厅关于推进住房和城乡建设领域施工现场专业人员职业培训工作的通知》
-                        全部内容并知晓和理解,本人的学历证书、身份证、工作年限、相片等所有资料完全真实、符合报名条件、资格审查要求和相关规定,本人在报名、审查、培训、测试等有关的事项中会严格道守相关规定和要求,如有虛假或与实际规定不符等情况造成的一切后果由本人承担。
-                      </p>
-                      <p style="text-align: end;">特此承诺!</p>
-                    </div>
-                    <div class="right">
-                      <h3>
-                        签名板:<span>(请在下方签名区进行签名)</span
-                        ><el-button type="text" @click="retDraw"
-                          >清空</el-button
+                  <div class="left">
+                    <h3>承诺书</h3>
+                    <p>
+                      本人自愿做出如下承诺:本人己仔细阅读《广东省住房和城乡建设厅关于推进住房和城乡建设领域施工现场专业人员职业培训工作的通知》
+                      全部内容并知晓和理解,本人的学历证书、身份证、工作年限、相片等所有资料完全真实、符合报名条件、资格审查要求和相关规定,本人在报名、审查、培训、测试等有关的事项中会严格道守相关规定和要求,如有虛假或与实际规定不符等情况造成的一切后果由本人承担。
+                    </p>
+                    <p style="text-align: end;">特此承诺!</p>
+                  </div>
+                  <div class="right">
+                    <h3>
+                      <span>
+                        签名板:<span class="texts"
+                          >(请在下方签名区进行签名)</span
                         >
-                      </h3>
-                      <div>
-                        <vue-esign
-                          v-if="!infoForm[item.fieldKey]"
-                          ref="esign"
-                          :isCrop="false"
-                          :lineWidth="5"
-                          :lineColor="'#333'"
-                          :bgColor="'#fff'"
-                          :height="480"
-                          :isClearBgColor="false"
-                        />
-                        <img
-                          v-else
-                          style="width: 100%; height: 100%"
-                          :src="$tools.splitImgHost(infoForm[item.fieldKey])"
-                        />
-                      </div>
-                    </div>
+                      </span>
+                      <span class="btn_text" @click="retDraw" v-if="!STATUS"
+                        >清空</span
+                      >
+                    </h3>
+                    <el-form-item
+                      label=""
+                      label-width="0px"
+                      :prop="item.fieldKey"
+                    >
+                      <vue-esign
+                        v-if="!infoForm[item.fieldKey]"
+                        ref="esign"
+                        :isCrop="false"
+                        :lineWidth="5"
+                        :lineColor="'#333'"
+                        :bgColor="'#fff'"
+                        :height="480"
+                        :isClearBgColor="false"
+                      />
+                      <img
+                        v-else
+                        style="width: 100%; height: 100%"
+                        :src="$tools.splitImgHost(infoForm[item.fieldKey])"
+                      />
+                    </el-form-item>
                   </div>
-                </el-form-item>
+                </div>
                 <el-form-item
                   v-else
                   :label="item.fieldName"
@@ -136,9 +125,12 @@
                         $tools.splitImgHost(infoForm[item.fieldKey])
                       ]"
                     >
-                    </el-image>
-                    <el-button type="text" @click="infoForm[item.fieldKey] = ''"
-                      >删除</el-button
+                    </el-image
+                    ><span
+                      v-if="item.fieldKey == 'commitment_seal' || !STATUS"
+                      class="btn_text"
+                      @click="infoForm[item.fieldKey] = ''"
+                      >删除</span
                     >
                   </div>
                   <label v-else style="display: inline-block;">
@@ -151,11 +143,11 @@
                       @change="uploadImg($event, item.fieldKey)"
                     />
                   </label>
-                  <el-button
-                    type="text"
-                    @click="downloadStamp"
+                  <span
                     v-if="item.fieldKey == 'commitment_seal'"
-                    >下载模板</el-button
+                    class="btn_text"
+                    @click="downloadStamp"
+                    >下载模板</span
                   >
                   <span style="vertical-align: bottom;color: #a4a4a4;" v-else>{{
                     item.fieldKey == "recent_photos"
@@ -210,25 +202,12 @@ export default {
       uploading: false,
       isShow: false,
       activeData: {},
-      apply_post_options: [
-        "土建施工员",
-        "装饰装修施工员",
-        "设备安装施工员",
-        "市政工程施工员",
-        "土建质量员",
-        "装饰装修质量员",
-        "设备安装质量员",
-        "市政工程质量员",
-        "材料员",
-        "机械员",
-        "劳务员",
-        "资料员",
-        "标准员"
-      ]
+      STATUS: false //区分个人中心入口操作
     };
   },
   methods: {
-    async init(item) {
+    async init(item, status = false) {
+      this.STATUS = status;
       this.activeData = item;
       //获取初始数据
       await this.getInitData();
@@ -239,11 +218,12 @@ export default {
       this.backFillData();
     },
     getInitData() {
-      return new Promise((resolve,reject) => {
+      return new Promise((resolve, reject) => {
         let commitDictAry = {
           sex: "sys_user_sex",
           education: "edu_level",
-          working_years: "working_years"
+          working_years: "working_years",
+          apply_post: "apply_post"
         };
         this.$request.getbaseprofiletpId(this.activeData.goodsId).then(res => {
           if (!res.data) {
@@ -268,12 +248,7 @@ export default {
                     ? "选择"
                     : "上传"
                 }${i.fieldName}`,
-                trigger:
-                  i.fieldKey == "apply_post"
-                    ? "change"
-                    : i.inputType == 1
-                    ? "blur"
-                    : "change"
+                trigger: i.inputType == 1 ? "blur" : "change"
               }
             ];
             if (i.fieldKey == "unit_tel") {
@@ -375,6 +350,12 @@ export default {
                   //停止执行-退出页面
                   this.$router.back(-1);
                 });
+            } else if (this.STATUS) {
+              this.historyData = Object.assign(
+                { id: res.data.id },
+                JSON.parse(res.data.keyValue)
+              ); //历史数据
+              resolve();
             } else {
               this.isShow = false;
               //不需要填写
@@ -386,12 +367,12 @@ export default {
     },
     //回填数据
     backFillData() {
-      if (this.historyData) {
+      if (this.historyData.id) {
         for (let i in this.historyData) {
           this.$set(this.infoForm, i, this.historyData[i].value);
         }
         this.$nextTick(() => {
-          this.$refs["infoForm"].validate();
+          this.$refs["infoForm"].clearValidate();
         });
       }
       if (!this.infoForm["name"]) {
@@ -572,7 +553,10 @@ export default {
     //将canvas签名生产oss地址
     subCanvas() {
       return new Promise((resolve, reject) => {
-        if (!this.infoForm["commitment_electr_signature"]) {
+        const STATUS = this.listData.findIndex(
+          i => i.fieldKey == "commitment_electr_signature"
+        );
+        if (!this.infoForm["commitment_electr_signature"] && STATUS !== -1) {
           this.$refs.esign[0]
             .generate() // 使用生成器调用把签字的图片转换成为base64图片格式
             .then(async res => {
@@ -590,8 +574,9 @@ export default {
               console.log(err, "err");
               resolve();
             });
+        } else {
+          resolve();
         }
-        resolve();
       });
     },
     //canvas转file
@@ -641,7 +626,11 @@ export default {
       });
     },
     close() {
-      this.$router.back(-1);
+      if (this.STATUS) {
+        this.isShow = false;
+      } else {
+        this.$router.back(-1);
+      }
     },
     returnData() {
       let map = new Map();
@@ -659,16 +648,44 @@ export default {
       });
       return JSON.stringify(Object.fromEntries(map));
     },
-    submitForm() {
+    async submitForm() {
+      //签名需在表单验证前执行完毕 否则会导致表单验证不通过
+      await this.subCanvas();
       this.$refs["infoForm"].validate(async valid => {
         if (valid) {
+          //独立操作上传承诺书
+          if (this.STATUS) {
+            this.uploading = true;
+            if (this.infoForm["commitment_seal"]) {
+              this.$request
+                .baseprofiletpcommitmentupload({
+                  id: this.historyData.id,
+                  imageUrl: this.infoForm["commitment_seal"]
+                })
+                .then(res => {
+                  this.$message.success("提交成功");
+                  this.isShow = false;
+                  this.$emit("callbackDataReview");
+                })
+                .catch(err => {
+                  this.$message.error(err.msg);
+                })
+                .finally(() => {
+                  this.uploading = false;
+                });
+            } else {
+              this.$message.error("请上传承诺书盖章");
+              this.uploading = false;
+            }
+            return;
+          }
+          //end
           try {
             this.uploading = true;
             await this.idCardDataComparison();
             await this.IdCardCompareFace();
-            await this.subCanvas();
             let obj = this.returnData();
-            if (this.historyData) {
+            if (this.historyData.id) {
               let data = {
                 id: this.historyData.id,
                 goodsId: this.activeData.goodsId,
@@ -752,6 +769,7 @@ export default {
   background-color: rgb(247, 248, 250);
   border-radius: 8px;
   height: 330px;
+  margin-bottom: 22px;
   .left {
     flex: 1;
     padding: 10px 20px;
@@ -763,13 +781,21 @@ export default {
     flex: 1;
     padding: 10px 20px;
     h3 {
-      span {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      margin-bottom: 16px;
+      .texts {
         color: #a4a4a4;
       }
-      .el-button {
-        float: right;
-      }
     }
   }
 }
+.btn_text {
+  color: #409eff;
+  cursor: pointer;
+  user-select: none;
+  font-weight: 400;
+  margin-left: 8px;
+}
 </style>

+ 27 - 29
src/components/goodsItem/index.vue

@@ -62,17 +62,17 @@ export default {
   name: "courseItem",
   components: {
     BuyCourseModal,
-    IndexSkuDialog,
+    IndexSkuDialog
   },
   computed: {
-    ...mapGetters(["userInfo"]),
+    ...mapGetters(["userInfo"])
   },
   props: ["item"],
   data() {
     return {
       selectClassModal: false,
       skuModal: false,
-      isCarOrBuy: 1, // 1加入购物车 2立即购买
+      isCarOrBuy: 1 // 1加入购物车 2立即购买
     };
   },
   mounted() {},
@@ -83,26 +83,26 @@ export default {
      */
     goodsDetail(item) {
       console.log(item, "items");
-      this.getGoodsDetail(item.goodsId).then((res) => {
+      this.getGoodsDetail(item.goodsId).then(res => {
         if (res.goodsType === 1) {
           this.$router.push({
-            path: "/course-detail/" + res.goodsId,
+            path: "/course-detail/" + res.goodsId
           });
         }
         if (res.goodsType === 2) {
           this.$router.push({
-            path: "/bank-detail/" + res.goodsId,
+            path: "/bank-detail/" + res.goodsId
           });
         }
 
         if (res.goodsType === 6) {
           this.$router.push({
-            path: "/live-detail/" + res.goodsId,
+            path: "/live-detail/" + res.goodsId
           });
         }
         if (res.goodsType === 8) {
           this.$router.push({
-            path: "/handout-detail/" + res.goodsId,
+            path: "/handout-detail/" + res.goodsId
           });
         }
       });
@@ -112,7 +112,7 @@ export default {
       if (!this.$tools.isLogin()) {
         this.setCurrentRouter(this.$route);
         this.$router.push({
-          path: "/login",
+          path: "/login"
         });
         return;
       }
@@ -133,18 +133,16 @@ export default {
       this.goPayment(goodList);
     },
     toPayment(goodsId) {
-      this.getGoodsDetail(goodsId).then((res) => {
-        console.log(res,'res')
-        if (res.templateType) {
-          if (res.goodsType === 1) {
-            this.$refs.selectClassModal.showModal(res);
-          }
-          if (res.goodsType === 2 || res.goodsType === 6 || res.goodsType === 8) {
-            this.goPayment(res);
-          }
+      this.getGoodsDetail(goodsId).then(res => {
+        console.log(res, "res");
+        if ((res.goodsType === 1 && res.templateType) || res.sevenYear) {
+          this.$refs.selectClassModal.showModal(res);
         } else {
           this.goPayment(res);
         }
+        if (res.goodsType === 2 || res.goodsType === 6 || res.goodsType === 8) {
+          this.goPayment(res);
+        }
       });
     },
     goPayment(data) {
@@ -154,7 +152,7 @@ export default {
       let selectGoodsList = JSON.parse(JSON.stringify(data));
       localStorage.setItem("checkGoodsList", JSON.stringify(selectGoodsList));
       this.$router.push({
-        path: "/payment",
+        path: "/payment"
       });
     },
     /**
@@ -175,28 +173,28 @@ export default {
       }
       this.$request
         .addCart({ goodsIds })
-        .then((res) => {
+        .then(res => {
           if (res) {
             this.getCartCount();
             this.$message({
               message: "加入购物车成功",
-              type: "success",
+              type: "success"
             });
           }
         })
-        .catch((err) => {
+        .catch(err => {
           if (err.code == 500) {
             this.$message({
               message: err.msg,
-              type: "warning",
+              type: "warning"
             });
           }
         });
     },
 
     getGoodsDetail(goodsId) {
-      return new Promise((resolve) => {
-        this.$request.commonGoodsDetail(goodsId).then((res) => {
+      return new Promise(resolve => {
+        this.$request.commonGoodsDetail(goodsId).then(res => {
           resolve(res.data);
         });
       });
@@ -205,9 +203,9 @@ export default {
       this.$axios({
         url: `/app/common/spec/${this.item.specTemplateId}`,
         method: "get",
-        noToken: true,
+        noToken: true
       })
-        .then((res) => {
+        .then(res => {
           if (res.data) {
             this.skuModal = true;
           } else {
@@ -219,8 +217,8 @@ export default {
           }
         })
         .catch(() => {});
-    },
-  },
+    }
+  }
 };
 </script>
 

+ 1 - 0
src/pages/bank-list/index.vue

@@ -109,6 +109,7 @@
             <div class="course-list__body">
               <LoadingBox v-if="loading"></LoadingBox>
               <ul v-else class="list clearfix">
+                <el-empty v-if="goodsList.length == 0" description="暂无数据"></el-empty>
                 <li
                   class="course-item"
                   v-for="(item, index) in goodsList"

+ 100 - 41
src/pages/cart/index.vue

@@ -70,7 +70,7 @@
                       class="selection"
                       v-if="
                         scope.row.templateType == 'class' &&
-                        scope.row.goodsType == 1
+                          scope.row.goodsType == 1
                       "
                     >
                       <el-select
@@ -89,12 +89,27 @@
                         </el-option>
                       </el-select>
                     </div>
+                    <div
+                      class="selection dis_flex"
+                      v-if="scope.row.sevenYear && scope.row.goodsType == 1"
+                    >
+                      <span>七大员继教可选年份:</span>
+                      <el-checkbox-group v-model="scope.row.checkList">
+                        <el-checkbox
+                          v-for="(item, index) in computedSevenYear(
+                            scope.row.sevenYear
+                          )"
+                          :key="index"
+                          :label="item"
+                        ></el-checkbox>
+                      </el-checkbox-group>
+                    </div>
 
                     <div
                       class="selection"
                       v-if="
                         scope.row.templateType == 'apply' &&
-                        scope.row.goodsType == 1
+                          scope.row.goodsType == 1
                       "
                     >
                       <el-select
@@ -122,7 +137,15 @@
                         placeholder="请选择报考地区"
                       ></el-cascader>
                     </div>
-                    <Class-time-tip v-if="scope.row.gradeId" :classInfo="GradeListFindItem(scope.row.gradeList,scope.row.gradeId)"></Class-time-tip>
+                    <Class-time-tip
+                      v-if="scope.row.gradeId"
+                      :classInfo="
+                        GradeListFindItem(
+                          scope.row.gradeList,
+                          scope.row.gradeId
+                        )
+                      "
+                    ></Class-time-tip>
                   </div>
                 </div>
               </template>
@@ -194,7 +217,7 @@ export default {
     Footer,
     Header,
     ToolBar,
-    ClassTimeTip,
+    ClassTimeTip
   },
   data() {
     return {
@@ -205,14 +228,22 @@ export default {
       provinceList: [],
       props: {
         lazy: true,
-        lazyLoad: this.lazyLoad,
-      },
+        lazyLoad: this.lazyLoad
+      }
     };
   },
   mounted() {
     this.getProvinceList();
     this.cartList();
   },
+  computed: {
+    computedSevenYear: function() {
+      return function(item) {
+        var ary = (item && item.split(",")) || [];
+        return ary;
+      };
+    }
+  },
   methods: {
     ...mapMutations(["getCartCount"]),
     areaChange(row, index) {
@@ -223,7 +254,7 @@ export default {
         areaName: node.parent.label,
         areaId: node.parent.value,
         cityId: node.value,
-        cityName: node.label,
+        cityName: node.label
       };
     },
     lazyLoad(node, resolve) {
@@ -239,18 +270,18 @@ export default {
         //   resolve(nodes);
         // });
       } else if (level == 1) {
-        this.$request.getCityList({ parentId: node.value }).then((res) => {
-          const nodes = res.rows.map((item) => ({
+        this.$request.getCityList({ parentId: node.value }).then(res => {
+          const nodes = res.rows.map(item => ({
             value: item.areaId,
             label: `${item.areaName}`,
-            leaf: level >= 1,
+            leaf: level >= 1
           }));
           resolve(nodes);
         });
       }
     },
     GradeListFindItem(gradeList, gradeId) {
-      return gradeList.find((e) => e.gradeId == gradeId);
+      return gradeList.find(e => e.gradeId == gradeId);
     },
     /**
      * 点击select获取对应列表
@@ -260,12 +291,12 @@ export default {
         //选择班级
         console.log(row);
         if (!row.gradeList.length) {
-          this.$request.goodsGradeList({ goodsId: row.goodsId }).then((res) => {
+          this.$request.goodsGradeList({ goodsId: row.goodsId }).then(res => {
             row.gradeList = res.rows;
             if (row.gradeList.length == 0) {
               let item = {
                 className: "系统分班",
-                gradeId: 0,
+                gradeId: 0
               };
 
               row.gradeList.push(item);
@@ -276,22 +307,20 @@ export default {
         //选择考试地点
       } else if (type == "exam") {
         //选择考期
-        this.$request
-          .getExamineList({ projectId: row.projectId })
-          .then((res) => {
-            row.examineList = res.rows;
-          });
+        this.$request.getExamineList({ projectId: row.projectId }).then(res => {
+          row.examineList = res.rows;
+        });
       }
     },
     /**
      * 获取所有省份
      */
     getProvinceList() {
-      this.$request.getProvinceList().then((res) => {
-        this.provinceList = res.rows.map((item) => ({
+      this.$request.getProvinceList().then(res => {
+        this.provinceList = res.rows.map(item => ({
           value: item.areaId,
           label: `${item.areaName}`,
-          leaf: false,
+          leaf: false
         }));
       });
     },
@@ -313,20 +342,21 @@ export default {
      * 获取购物车列表
      */
     cartList() {
-      this.$request.cartList().then((res) => {
-        res.rows.forEach((item) => {
+      this.$request.cartList().then(res => {
+        res.rows.forEach(item => {
           item.area = [];
           item.gradeId = "";
           item.gradeList = [];
           item.examDate = "";
           item.examineList = [];
+          item.checkList = [];
         });
         this.goodsList = res.rows;
       });
     },
     toggleSelection(rows) {
       if (rows) {
-        rows.forEach((row) => {
+        rows.forEach(row => {
           this.$refs.multipleTable.toggleRowSelection(row);
         });
       } else {
@@ -339,7 +369,7 @@ export default {
       if (
         this.multipleSelection.length > 0 &&
         this.multipleSelection.length ==
-          this.goodsList.filter((item) => item.goodsStatus != 0).length
+          this.goodsList.filter(item => item.goodsStatus != 0).length
       ) {
         this.checked = true;
       } else {
@@ -356,7 +386,7 @@ export default {
     caculate() {
       this.total = 0;
 
-      this.multipleSelection.forEach((item) => {
+      this.multipleSelection.forEach(item => {
         this.total += item.standPrice;
       });
     },
@@ -364,7 +394,7 @@ export default {
       if (this.$refs.multipleTable.selection.length == 0) {
         this.$message({
           message: "请选择商品",
-          type: "warning",
+          type: "warning"
         });
 
         return;
@@ -377,7 +407,16 @@ export default {
           if (!item.gradeId && item.gradeId !== 0) {
             this.$message({
               message: "请选择班级",
-              type: "warning",
+              type: "warning"
+            });
+            return;
+          }
+        }
+        if (item.sevenYear && item.goodsType == 1) {
+          if (item.checkList.length == 0) {
+            this.$message({
+              message: "请选择七大员继教年份",
+              type: "warning"
             });
             return;
           }
@@ -395,7 +434,7 @@ export default {
           if (!item.educationId) {
             this.$message({
               message: "请选择考期",
-              type: "warning",
+              type: "warning"
             });
             return false;
           }
@@ -405,15 +444,16 @@ export default {
       let selectGoodsList = JSON.parse(
         JSON.stringify(this.$refs.multipleTable.selection)
       );
-      selectGoodsList.forEach((item) => {
+      let arrayBox = [];
+      selectGoodsList.forEach(item => {
         if (item.goodsType == 1) {
           if (item.templateType == "class") {
             let goodsInputData = {
               type: "class",
               gradeId: item.gradeId,
               gradeJson: JSON.stringify(
-                item.gradeList.find((grade) => grade.gradeId == item.gradeId)
-              ),
+                item.gradeList.find(grade => grade.gradeId == item.gradeId)
+              )
             };
             item.goodsInputData = goodsInputData;
           }
@@ -423,39 +463,58 @@ export default {
               applyAreasJson: JSON.stringify(item.applyAreas),
               examDateJson: JSON.stringify(
                 item.examineList.find(
-                  (exam) => exam.educationId == item.educationId
+                  exam => exam.educationId == item.educationId
                 )
-              ),
+              )
             };
             item.goodsInputData = goodsInputData;
           }
         }
+        if (
+          item.goodsType == 1 &&
+          item.sevenYear &&
+          item.checkList.length > 0
+        ) {
+          let A = item.checkList.map(i => {
+            return { ...item, sevenYear: i };
+          });
+          arrayBox.push(...A);
+        } else {
+          arrayBox.push(item);
+        }
       });
 
-      localStorage.setItem("checkGoodsList", JSON.stringify(selectGoodsList));
+      localStorage.setItem("checkGoodsList", JSON.stringify(arrayBox));
 
       this.$router.push({
         name: "支付",
-        path: "/payment",
+        path: "/payment"
       });
     },
     del(row) {
       this.$confirm("确认删除商品?")
-        .then((_) => {
-          this.$request.cartDelete(row.id).then((res) => {
+        .then(_ => {
+          this.$request.cartDelete(row.id).then(res => {
             this.$message.con;
             this.cartList();
             this.getCartCount();
           });
         })
-        .catch((_) => {});
-    },
-  },
+        .catch(_ => {});
+    }
+  }
 };
 </script>
 
 <!-- Add "scoped" attribute to limit CSS to this component only -->
 <style scoped lang="scss">
+.dis_flex {
+  display: flex;
+  align-items: center;
+  span {
+    height: 30px;
+  }
+}
 .cart {
   .section {
     &__header {

+ 2 - 1
src/pages/course-detail/components/HandOut.vue

@@ -323,7 +323,6 @@ export default {
     //点击预览加载
     loadSeePdf(item) {
       this.readerResult = null;
-      console.log(item, "item");
       if (Object.keys(item).length == 0) {
         this.$message.error("当前选择文件不存在");
         return;
@@ -384,6 +383,8 @@ export default {
   }
 }
 .lecture-notesjy {
+  display: flex;
+  flex-direction: column;
   height: 416px;
   .header {
     display: flex;

+ 121 - 94
src/pages/course-detail/index.vue

@@ -314,10 +314,7 @@
         >
       </span>
     </el-dialog>
-    <dataReview
-    ref="dataReview"
-      @callbackDataReview="callbackDataReview"
-    />
+    <dataReview ref="dataReview" @callbackDataReview="callbackDataReview" />
     <div id="printTable"></div>
     <!-- <ToolBar></ToolBar> -->
     <Footer></Footer>
@@ -486,7 +483,7 @@ export default {
       failToRegister: false, //报名是否不通过
       openPhotoStatus: 0,
       readerResult: null,
-      handoutList: [],
+      handoutList: []
     };
   },
   watch: {
@@ -592,7 +589,7 @@ export default {
       goodsId: this.goodsId,
       orderGoodsId: this.orderGoodsId,
       gradeId: this.gradeId,
-      goodsName:this.goodsData.goodsName
+      goodsName: this.goodsData.goodsName
     });
     // this.getbaseprofiletplists().then(async res => {
     //   await this.courseCourseList();
@@ -632,11 +629,31 @@ export default {
     async callbackDataReview() {
       if (this.gradeId > 0) {
         //提交完资料返回判断是否已开班
-        this.getGradeInfo();
+        await this.getGradeInfo();
+        //继教七大员公共课程同步
+        if (this.gradeDetail.sevenYear) {
+          await this.sevenCommonCourse();
+        }
       }
       await this.courseCourseList();
       this.getRebuildCourse();
     },
+    async sevenCommonCourse() {
+      return new Promise(resolve => {
+        this.$request
+          .syncSevenPublicClass({ orderGoodsId: this.orderGoodsId })
+          .then(res => {
+            if (res.code == 200) {
+              resolve();
+            } else {
+              reject();
+            }
+          })
+          .catch(() => {
+            reject();
+          });
+      });
+    },
     /**
      *
      获取用户讲义列表
@@ -907,99 +924,112 @@ export default {
     },
 
     getGradeInfo() {
-      let self = this;
-      this.$request.goodsGradeInfo(this.gradeId).then(res => {
-        if (res.code == 200) {
-          self.gradeDetail = res.data;
-          if (self.needProfileModal) {
-            return;
-          }
-          /**
-           * 补充条件 Start
-           */
-          console.log(
-            "补充条件:",
-            res.data.interfaceAccountId,
-            res.data.learnStatus
-          );
-          if (res.data.interfaceAccountId > 0 && res.data.learnStatus > 0) {
-            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]));
+      return new Promise((resolve, reject) => {
+        let self = this;
+        this.$request.goodsGradeInfo(this.gradeId).then(res => {
+          if (res.code == 200) {
+            self.gradeDetail = res.data;
+            if (self.needProfileModal) {
+              return reject();
             }
-            this.$confirm(h("div", null, newDatas), "温馨提示", {
-              beforeClose: (type, y, done) => {
-                if (type == "confirm") {
-                  window.open("http://admin.zhujianpeixun.com/", "_blank");
-                } else if (type == "cancel") {
-                  this.$router.back(-1);
-                }
-              },
-              confirmButtonText: "跳转学习网址",
-              cancelButtonText: "关闭",
-              closeOnClickModal: false,
-              closeOnPressEscape: false,
-              distinguishCancelAndClose: false,
-              showClose: false
-            });
-            return;
-          }
-          /**
-           * 补充条件   End
-           */
-          if (self.gradeDetail.learningStatus == 2) {
-            this.$confirm(
-              `当前课程正在申请中,正式开班后方可进行学习,请耐心等候!`,
-              "提示",
-              {
-                confirmButtonText: "确定",
-                closeOnClickModal: false,
-                closeOnPressEscape: false,
-                showCancelButton: false,
-                distinguishCancelAndClose: false,
-                showClose: false
+            /**
+             * 补充条件 Start
+             */
+            console.log(
+              "补充条件:",
+              res.data.interfaceAccountId,
+              res.data.learnStatus
+            );
+            if (res.data.interfaceAccountId > 0 && res.data.learnStatus > 0) {
+              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]));
               }
-            )
-              .then(_ => {
-                this.$router.back(-1);
-              })
-              .catch(_ => {});
-          }
-          if (
-            self.gradeDetail.learningStatus == 3 &&
-            Number(self.gradeDetail.learningTimeStart) >
-              Number(new Date() / 1000)
-          ) {
-            this.$confirm(
-              `当前课程正在申请中,正式开班后方可进行学习,请耐心等候!`,
-              "提示",
-              {
-                confirmButtonText: "返回",
+              this.$confirm(h("div", null, newDatas), "温馨提示", {
+                beforeClose: (type, y, done) => {
+                  if (type == "confirm") {
+                    window.open("http://admin.zhujianpeixun.com/", "_blank");
+                  } else if (type == "cancel") {
+                    this.$router.back(-1);
+                  }
+                },
+                confirmButtonText: "跳转学习网址",
+                cancelButtonText: "关闭",
                 closeOnClickModal: false,
                 closeOnPressEscape: false,
-                showCancelButton: false,
                 distinguishCancelAndClose: false,
                 showClose: false
-              }
-            )
-              .then(_ => {
-                this.$router.back(-1);
-              })
-              .catch(_ => {});
+              });
+              return;
+            }
+            /**
+             * 补充条件   End
+             */
+            if (self.gradeDetail.learningStatus == 2) {
+              this.$confirm(
+                `当前课程正在申请中,正式开班后方可进行学习,请耐心等候!`,
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  closeOnClickModal: false,
+                  closeOnPressEscape: false,
+                  showCancelButton: false,
+                  distinguishCancelAndClose: false,
+                  showClose: false
+                }
+              )
+                .then(_ => {
+                  this.$router.back(-1);
+                })
+                .catch(_ => {});
+            }
+            if (
+              self.gradeDetail.learningStatus == 3 &&
+              Number(self.gradeDetail.learningTimeStart) >
+                Number(new Date() / 1000)
+            ) {
+              this.$confirm(
+                `当前课程正在申请中,正式开班后方可进行学习,请耐心等候!`,
+                "提示",
+                {
+                  confirmButtonText: "返回",
+                  closeOnClickModal: false,
+                  closeOnPressEscape: false,
+                  showCancelButton: false,
+                  distinguishCancelAndClose: false,
+                  showClose: false
+                }
+              )
+                .then(_ => {
+                  this.$router.back(-1);
+                })
+                .catch(_ => {});
+            }
+            if (
+              (res.data.interfaceAccountId > 0 && res.data.learnStatus > 0) ||
+              self.gradeDetail.learningStatus == 2 ||
+              (self.gradeDetail.learningStatus == 3 &&
+                Number(self.gradeDetail.learningTimeStart) >
+                  Number(new Date() / 1000))
+            ) {
+              reject();
+            } else {
+              resolve();
+            }
           }
-        }
+        });
+        this.$store.state.allowLoading = true;
       });
-      this.$store.state.allowLoading = true;
     },
-    
+
     uploadFile(options, int) {
       var self = this;
       return new Promise((resolve, reject) => {
@@ -3530,8 +3560,6 @@ export default {
   }
 }
 
-
-
 /deep/ textarea {
   background: #65696d;
   color: #c7c7c7;
@@ -3542,5 +3570,4 @@ export default {
   color: #999;
   background: transparent;
 }
-
 </style>

+ 1 - 0
src/pages/course-list/index.vue

@@ -109,6 +109,7 @@
             <div class="course-list__body">
               <LoadingBox v-if="loading"></LoadingBox>
               <ul v-else class="list clearfix">
+                <el-empty v-if="goodsList.length == 0" description="暂无数据"></el-empty>
                 <li
                   class="course-item"
                   v-for="(item, index) in goodsList"

+ 2 - 0
src/pages/handout-detail/components/HandOut.vue

@@ -291,6 +291,8 @@ export default {
 }
 .lecture-notesjy {
   max-height: 416px;
+  // display: flex;
+  // flex-direction: column;
   .header {
     display: flex;
     align-items: center;

+ 1 - 0
src/pages/handout-list/index.vue

@@ -109,6 +109,7 @@
             <div class="course-list__body">
               <LoadingBox v-if="loading"></LoadingBox>
               <ul v-else class="list clearfix">
+                <el-empty v-if="goodsList.length == 0" description="暂无数据"></el-empty>
                 <li
                   class="course-item"
                   v-for="(item, index) in goodsList"

+ 1 - 0
src/pages/live-list/index.vue

@@ -109,6 +109,7 @@
             <div class="course-list__body">
               <LoadingBox v-if="loading"></LoadingBox>
               <ul v-else class="list clearfix">
+                <el-empty v-if="goodsList.length == 0" description="暂无数据"></el-empty>
                 <li
                   class="course-item"
                   v-for="(item, index) in goodsList"

+ 112 - 0
src/pages/outsideChain/index.vue

@@ -0,0 +1,112 @@
+<template>
+  <div id="outsideChain">
+    <Header></Header>
+    <div class="content">
+      <div class="hearder_top">
+        <h2 class="h2Title">儿童体质调理技术</h2>
+        <audio autoplay="autoplay" controls ref="audio">
+          <source src="" type="audio/wav" />
+          <source src="" type="audio/mp3" />
+          您的浏览器不支持该音频格式。
+        </audio>
+        <el-pagination
+          size="mini"
+          @current-change="handleCurrentChange"
+          :current-page.sync="pageNum"
+          :page-size="1"
+          layout="total, prev, pager, next,jumper"
+          :total="pageTotalNum"
+        >
+        </el-pagination>
+      </div>
+      <!-- <h2 class="h2Title">{{ goodsData.goodsName }}</h2> -->
+      <el-main class="left">
+        <img :src="array[pageNum - 1].imgUrl" alt="" />
+      </el-main>
+    </div>
+    <Footer></Footer>
+  </div>
+</template>
+
+<script>
+import Footer from "@/components/footer/index";
+import Header from "@/components/header/index";
+import pdf from "vue-pdf";
+export default {
+  components: {
+    pdf,
+    Footer,
+    Header
+  },
+  data() {
+    return {
+      array: [],
+      goodsData: {},
+      pageNum: 0,
+      pageTotalNum: 0 //总页数
+    };
+  },
+  created() {
+    this.$request.goodsDetail(this.$route.query.goodsId).then(res => {
+      this.goodsData = res.data;
+    });
+    this.getInit();
+  },
+  methods: {
+    getInit() {
+      for (let i = 0; i < 150; i++) {
+        this.array.push({
+          imgUrl: `https://file.xyyxt.net/web/static/file/book/${i}.png`,
+          audio: `https://file.xyyxt.net/web/static/file/book/${i}.mp3`,
+          txt: `https://file.xyyxt.net/web/static/file/book/${i}.txt`
+        });
+      }
+      this.pageNum = 1;
+      this.pageTotalNum = 150;
+      setTimeout(() => {
+        this.playBack();
+      }, 300);
+    },
+    handleCurrentChange(val) {
+      this.pageNum = val;
+      this.playBack();
+    },
+    //播放音频
+    playBack() {
+      console.log(this.array[this.pageNum - 1].audio);
+      let music = new Audio();
+      // 这里获取播放路径
+      music = this.array[this.pageNum - 1].audio;
+      this.$refs.audio.src = music;
+      const { audio } = this.$refs;
+      audio.load();
+      audio.play();
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+  padding: 10px 0px;
+  width: 1272px;
+  margin: 0 auto;
+  & > .hearder_top {
+    display: flex;
+    align-items: center;
+    & > .h2Title {
+      font-size: 20px;
+    }
+    & > audio {
+      height: 32px;
+      margin: 0px 14px;
+    }
+  }
+  & > .left {
+    text-align: center;
+    & > img {
+      width: 900px;
+    }
+  }
+}
+</style>

+ 0 - 1
src/pages/payment/index.vue

@@ -216,7 +216,6 @@ export default {
           background: "rgba(0, 0, 0, 0)",
           target: document.querySelector(".section__body"),
         });
-
         if (this.orderSn) {
           //订单继续支付
           this.orderResumePCOrder();

+ 8 - 0
src/pages/person-center/index.vue

@@ -102,6 +102,14 @@
                 </router-link>
               </div>
             </div>
+            <div class="nav__section" v-if="false">
+              <div class="title">其他题库</div>
+              <div class="list">
+                <router-link to="/person-center/my-other-bank">
+                  <div class="item">开始做题</div>
+                </router-link>
+              </div>
+            </div>
             <div class="nav__section">
               <div class="title">我的讲义资料</div>
               <div class="list">

+ 57 - 13
src/pages/person-center/my-course/index.vue

@@ -378,10 +378,18 @@
                 <div class="btns">
                   <el-button
                     :type="
-                      computedStudyStatus(item, sysTime) ? 'info' : 'primary'
+                      item.externalLinkStatus == 1
+                        ? 'primary'
+                        : computedStudyStatus(item, sysTime)
+                        ? 'info'
+                        : 'primary'
                     "
                     class="btn btn--normal"
-                    @click="goCourseDetail(item)"
+                    @click="
+                      item.externalLinkStatus == 1
+                        ? jumpLink(item)
+                        : goCourseDetail(item)
+                    "
                     >进入学习
                   </el-button>
                   <!-- v-if="
@@ -410,11 +418,18 @@
                     >预约考试</el-button
                   >
                   <el-button
-                  v-if="false"
+                    v-if="item.openQuestion == 1"
+                    type="primary"
+                    class="btn"
+                    @click="buyAutoBank(item)"
+                    >购买题库</el-button
+                  >
+                  <el-button
+                    v-if="item.userProfile == 1"
                     type="primary"
                     class="btn"
                     @click="dataReview(item)"
-                    >资料审核</el-button
+                    >学员资料</el-button
                   >
 
                   <el-button
@@ -629,7 +644,7 @@
         <el-button type="primary" @click="appointmentYes()">确 定</el-button>
       </span></el-dialog
     >
-    <dataReview ref="dataReview" @callbackDataReview="callbackDataReview" />
+    <dataReview ref="dataReview" @callbackDataReview="courseGoodsList()" />
   </div>
 </template>
 
@@ -693,7 +708,7 @@ export default {
 
       total: 0,
       courseList: [],
-      loading: false,
+      loading: false
     };
   },
   computed: {
@@ -751,11 +766,40 @@ export default {
   },
   methods: {
     ...mapActions(["getUserInfo"]),
-    dataReview(item) {
-      this.$refs.dataReview.init(item)
+    //进入外链
+    jumpLink(item) {
+      if (item.externalLink == "/outsideChain") {
+        this.$router.push({
+          path:"/outsideChain",
+          query:{
+            goodsId:item.goodsId
+          } 
+        })
+        // window.open(item.externalLink + "?goodsId=" + item.goodsId, "_self");
+      } else {
+        window.open(item.externalLink, "_blank");
+      }
     },
-    callbackDataReview(){
-
+    //购买山东题库
+    buyAutoBank(item) {
+      this.$request.goodsDetail(item.questionGoodsId).then(res => {
+        res.data.relevanceId = item.orderGoodsId;
+        this.goPayment(res.data);
+      });
+    },
+    goPayment(data) {
+      if (!Array.isArray(data)) {
+        data = [data];
+      }
+      let selectGoodsList = JSON.parse(JSON.stringify(data));
+      localStorage.setItem("checkGoodsList", JSON.stringify(selectGoodsList));
+      this.$router.push({
+        path: "/payment"
+      });
+    },
+    //学员资料
+    dataReview(item) {
+      this.$refs.dataReview.init(item, true);
     },
     studyStatusFunc(e) {
       if (this.activeStudyStatus == e) {
@@ -932,9 +976,9 @@ export default {
             goodsId: item.goodsId
           })
           .then(res => {
-            res.data = res.data.filter(
-              e => e.sectionType != 2 && e.doType != 1
-            );
+            // res.data = res.data.filter(
+            //   e => e.sectionType != 2 && e.doType != 1
+            // );
             resolve(res.data);
           });
       });

+ 69 - 58
src/pages/person-center/my-invoice/add/index.vue

@@ -34,11 +34,11 @@
                 :key="item.orderGoodsId"
                 :label="
                   '商品名称:' +
-                  item.goodsName +
-                  ',订单编号:' +
-                  item.orderSn +
-                  ',价格:¥' +
-                  item.goodsPrice
+                    item.goodsName +
+                    ',订单编号:' +
+                    item.orderSn +
+                    ',价格:¥' +
+                    item.goodsPrice
                 "
                 :value="item.orderGoodsId"
               >
@@ -78,10 +78,14 @@
           <el-form-item label="邮箱号:" required prop="email">
             <el-input v-model="form.email"></el-input>
           </el-form-item>
-          <el-form-item label="发票备注:">
-            <el-input v-model="form.invoiceRemark" type="textarea" rows="4"></el-input>
+          <el-form-item label="发票备注:" prop="invoiceRemark">
+            <el-input
+              v-model="form.invoiceRemark"
+              type="textarea"
+              rows="4"
+            ></el-input>
           </el-form-item>
-          
+
           <template v-if="form.subject == 2">
             <el-form-item
               label="纳税登记号:"
@@ -159,7 +163,7 @@ export default {
         receivingAddress: "",
         receivingName: "",
         receivingTel: "",
-        orderGoodsIds: [],
+        orderGoodsIds: []
       },
       radio1: "",
       radio2: "",
@@ -171,12 +175,11 @@ export default {
             required: true,
             message: "请输入收件手机",
             // 可以单个或者同时写两个触发验证方式
-            trigger: ["change", "blur"],
+            trigger: ["change", "blur"]
           },
           {
             validator: (rule, value, callback) => {
-              var reg_tel =
-                /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
+              var reg_tel = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
               if (reg_tel.test(value)) {
                 return callback();
               } else {
@@ -184,39 +187,39 @@ export default {
               }
             },
             // 触发器可以同时用blur和change
-            trigger: ["change", "blur"],
-          },
+            trigger: ["change", "blur"]
+          }
         ],
         type: [
           {
             required: true,
             message: "请选择发票类型",
             // 可以单个或者同时写两个触发验证方式
-            trigger: ["change", "blur"],
-          },
+            trigger: ["change", "blur"]
+          }
         ],
         subject: [
           {
             required: true,
             message: "请选择申请主体",
             // 可以单个或者同时写两个触发验证方式
-            trigger: ["change", "blur"],
-          },
+            trigger: ["change", "blur"]
+          }
         ],
         invoiceTitle: [
           {
             required: true,
             message: "请输入发票抬头",
             // 可以单个或者同时写两个触发验证方式
-            trigger: ["change", "blur"],
-          },
+            trigger: ["change", "blur"]
+          }
         ],
         email: [
           {
             required: true,
             message: "请输入邮箱号",
             // 可以单个或者同时写两个触发验证方式
-            trigger: ["change", "blur"],
+            trigger: ["change", "blur"]
           },
           {
             validator: (rule, value, callback) => {
@@ -228,15 +231,15 @@ export default {
               }
             },
             // 触发器可以同时用blur和change
-            trigger: ["change", "blur"],
-          },
+            trigger: ["change", "blur"]
+          }
         ],
         taxRegistryNumber: [
           {
             required: true,
             message: "请输入纳税登记号",
             // 可以单个或者同时写两个触发验证方式
-            trigger: ["change", "blur"],
+            trigger: ["change", "blur"]
           },
           {
             validator: (rule, value, callback) => {
@@ -248,31 +251,39 @@ export default {
               }
             },
             // 触发器可以同时用blur和change
-            trigger: ["change", "blur"],
-          },
+            trigger: ["change", "blur"]
+          }
         ],
         companyAddress: [
           {
             required: true,
             message: "请输入单位地址",
             // 可以单个或者同时写两个触发验证方式
-            trigger: ["change", "blur"],
-          },
+            trigger: ["change", "blur"]
+          }
+        ],
+        invoiceRemark: [
+          {
+            required: false,
+            message: "请输入发票备注",
+            // 可以单个或者同时写两个触发验证方式
+            trigger: "blur"
+          }
         ],
         phone: [
           {
             required: true,
             message: "请输入电话号码",
             // 可以单个或者同时写两个触发验证方式
-            trigger: ["change", "blur"],
-          },
+            trigger: ["change", "blur"]
+          }
         ],
         bankName: [
           {
             required: true,
             message: "请输入开户银行",
             // 可以单个或者同时写两个触发验证方式
-            trigger: ["change", "blur"],
+            trigger: ["change", "blur"]
           },
           {
             validator: (rule, value, callback) => {
@@ -283,15 +294,15 @@ export default {
                 return callback(new Error("开户银行名称不正确"));
               }
             },
-            trigger: ["change", "blur"],
-          },
+            trigger: ["change", "blur"]
+          }
         ],
         bankAccount: [
           {
             required: true,
             message: "请输入银行账号",
             // 可以单个或者同时写两个触发验证方式
-            trigger: ["change", "blur"],
+            trigger: ["change", "blur"]
           },
           {
             validator: (rule, value, callback) => {
@@ -304,36 +315,36 @@ export default {
               }
             },
             // 触发器可以同时用blur和change
-            trigger: ["change", "blur"],
-          },
+            trigger: ["change", "blur"]
+          }
         ],
         receivingAddress: [
           {
             required: true,
             message: "请输入收件地址",
             // 可以单个或者同时写两个触发验证方式
-            trigger: ["change", "blur"],
-          },
+            trigger: ["change", "blur"]
+          }
         ],
         receivingName: [
           {
             required: true,
             message: "请输入收件人",
             // 可以单个或者同时写两个触发验证方式
-            trigger: ["change", "blur"],
-          },
+            trigger: ["change", "blur"]
+          }
         ],
         orderGoodsIds: [
           {
             required: true,
             message: "请选择订单",
             // 可以单个或者同时写两个触发验证方式
-            trigger: ["change", "blur"],
-          },
-        ],
+            trigger: ["change", "blur"]
+          }
+        ]
       },
 
-      loading: false,
+      loading: false
     };
   },
   mounted() {
@@ -349,8 +360,8 @@ export default {
     },
     changeSelect(e) {
       let total = 0;
-      this.form.orderGoodsIds.forEach((id) => {
-        let orderItem = this.orderList.find((item) => item.orderGoodsId == id);
+      this.form.orderGoodsIds.forEach(id => {
+        let orderItem = this.orderList.find(item => item.orderGoodsId == id);
         if (orderItem) {
           total += orderItem.goodsPrice;
         }
@@ -363,13 +374,13 @@ export default {
     },
 
     submit() {
-      this.$refs.form.validate((valid) => {
+      this.$refs.form.validate(valid => {
         if (valid) {
           if (this.total > 10000) {
             this.$message({
               type: "warning",
               message:
-                "您所选的订单总开票金额,大于10000元,超出单张发票的开票额度,请修改开票订单",
+                "您所选的订单总开票金额,大于10000元,超出单张发票的开票额度,请修改开票订单"
             });
             return;
           }
@@ -389,7 +400,7 @@ export default {
           }
           this.$request
             .orderInvoice(data)
-            .then((res) => {
+            .then(res => {
               // this.form = {
               //   type: "1",
               //   subject: "1",
@@ -411,7 +422,7 @@ export default {
               this.$nextTick(() => {
                 const confirmText = [
                   "您本次的发票申请已经提交成功!",
-                  "请稍后留意邮箱。",
+                  "请稍后留意邮箱。"
                 ];
                 const newDatas = [];
                 const h = this.$createElement;
@@ -424,22 +435,22 @@ export default {
                   showCancelButton: false,
                   closeOnPressEscape: false,
                   distinguishCancelAndClose: false,
-                  showClose: false,
+                  showClose: false
                 })
-                  .then((_) => {
+                  .then(_ => {
                     this.loading = false;
                     this.orderInvoiceCanInvoiceList();
                   })
-                  .catch((_) => {
+                  .catch(_ => {
                     console.log(_);
                   });
               });
             })
-            .catch((err) => {
+            .catch(err => {
               this.loading = false;
               this.$message({
                 type: "error",
-                message: err.msg,
+                message: err.msg
               });
             });
         }
@@ -450,11 +461,11 @@ export default {
      * 获取可开发票的订单
      */
     orderInvoiceCanInvoiceList() {
-      this.$request.orderInvoiceCanInvoiceList().then((res) => {
+      this.$request.orderInvoiceCanInvoiceList().then(res => {
         this.orderList = res.rows;
       });
-    },
-  },
+    }
+  }
 };
 </script>
 

+ 2 - 15
src/pages/person-center/my-message/index.vue

@@ -147,7 +147,7 @@
                     }}{{ item.chapterName ? "/" + item.chapterName : ""
                     }}{{ item.sectionName }}
                   </div>
-                  <div class="item__content" @click="jumpSection(item)">
+                  <div v-if="false" class="item__content" @click="jumpSection(item)">
                     {{
                       $tools.secondToTime(item.topicNum, false)
                     }}(点击可直接跳转)
@@ -164,7 +164,7 @@
                     }}{{ item.chapterName ? "/" + item.chapterName : ""
                     }}{{ item.examName }}
                   </div>
-                  <div class="item__content" @click="jumpExam(item)">
+                  <div v-if="false" class="item__content" @click="jumpExam(item)">
                     第{{ item.topicNum }}道题(点击可直接跳转)
                   </div>
                 </div>
@@ -418,19 +418,6 @@ export default {
           break;
         case 2:
         case 4:
-          console.log(item, "item");
-          item.orderGoodsId = this.orderGoodsId;
-          this.canJump(item).then(res => {
-            this.$router.push({
-              path: `/my-course-detail/${item.goodsId}`,
-              query: {
-                gradeId: item.gradeId,
-                orderGoodsId: item.orderGoodsId,
-                courseId: res.rows[0].courseId || ""
-              }
-            });
-          });
-          break;
         case 24:
           console.log(item, "item");
           item.orderGoodsId = this.orderGoodsId;

+ 84 - 0
src/pages/person-center/my-other-bank/index.vue

@@ -0,0 +1,84 @@
+<template>
+  <div id="my_other_bank">
+    <h2 class="title">我的题库</h2>
+    <ul>
+      <li v-for="(item, index) in list" :key="index" class="li_style">
+        <div class="left">
+          <h3>{{ item.goodsName }}</h3>
+          <p>所属类型:{{ item.businessName }}</p>
+          <p>总题数:{{ item.questionNum || 300 }}题</p>
+          <p>
+            有效期:{{
+              $tools.timestampToTime(item.serviceStartTime) +
+                " - " +
+                $tools.timestampToTime(item.serviceEndTime)
+            }}
+          </p>
+        </div>
+        <div class="right">
+          <el-button type="primary" size="small">开始做题</el-button>
+        </div>
+      </li>
+    </ul>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      formData: {
+        pageNum: 1,
+        pageSize: 5
+      },
+      list: [],
+      total: 0
+    };
+  },
+  created() {
+    this.getInit();
+  },
+  methods: {
+    getInit() {
+      this.$request.coursespecialquestionlist(this.formData).then(res => {
+        this.list = res.rows;
+      });
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+#my_other_bank {
+  padding: 14px 0px;
+  .title {
+    font-size: 20px;
+    margin-bottom: 10px;
+  }
+  .li_style {
+    padding: 14px 0px;
+    display: flex;
+    border-top: 1px solid #eee;
+    &:last-child {
+      border-bottom: 1px solid #eee;
+    }
+    & > .left {
+      flex: 1;
+      h3 {
+        font-size: 16px;
+      }
+      p {
+        margin-top: 10px;
+        color: #6f6e6e;
+      }
+    }
+    & > .right {
+      width: 150px;
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+    }
+  }
+}
+</style>

+ 17 - 0
src/router/index.js

@@ -25,6 +25,18 @@ const router = new Router({
       name: '刷新页',
       component: resolve => require(['@/pages/refresh'], resolve),
     },
+    {
+      path: '/outsideChain',
+      name: '外链',
+      component: resolve => require(['@/pages/outsideChain'], resolve),
+      meta: {
+        title: '-建造师造价师在线教育培训平台报名报考',
+        content: {
+          keywords: + '-一级建造师,二级建造师,造价工程师,一级消防工程师,BIM,在线教育,职业教育,报考条件,报名时间,建造师注册,建造工程师',
+          description: + '-职业教育一站式学习平台,专注一建,二建,造价工程师,一级消防工程师,BIM等工程师技能知识培训服务热线:020-87085982'
+        }
+      }
+    },
     {
       path: '/home',
       name: '首页',
@@ -550,6 +562,11 @@ const router = new Router({
             },
           ]
         },
+        {
+          path: 'my-other-bank',
+          component: resolve => require(['@/pages/person-center/my-other-bank/index'], resolve),
+          name: '其他题库',
+        },
         {
           path: 'free-bank',
           component: resolve => require(['@/pages/person-center/free-bank/index'], resolve),