chenxiong 3 лет назад
Родитель
Сommit
5d49995642

+ 372 - 16
pages/course/index.vue

@@ -16,24 +16,297 @@
       </view>
     </u-navbar>
 		
-		<view class="no-course" v-if="false">
+		
+		
+		<view class="no-course" v-if="list.length == 0">
 			<image class="img" src="/static/no-course.png" mode="widthFix"></image>
 			<view class="title">暂无学习内容</view>
 			<view class="title">请先购买课程/题库</view>
 			<view class="btn" @click="goIndex">马上选课/选题</view>
 		</view>
 		
-		<view class="note-list">
-			<picker class='picker' :range="list" range-key="name" @change="change">
-				<view class="text">{{businessName || '请选择业务层次'}}</view>
+		<template v-else>
+			<view class="note-list">
+				<picker class='picker' :range="list" range-key="aliasName" @change="change">
+					<view class="text">{{businessName || '请选择业务层次'}}</view>
+					
+				</picker>
+				<u-icon name="arrow-down"></u-icon>
+			</view>
+			
+			<view class="course-list">
+				<template v-if="getSelectType() == 1">
+					<navigator
+					  hover-class="none"
+					  :url="'/pages2/wd/class?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''"
+					  class="menu_box"
+					>
+					  <view class="box_left">
+					    <image src="/static/icon/my_icon3.png" class="my_icon">
+							</image>
+							<view class="point" v-if="total2 > 0"></view>
+					    <view>我的网课</view>
+					  </view>
+					  <view class="box_right">
+					    <text>{{ total2 }}</text>
+					    个课程直播中
+					  </view>
+					</navigator>
+					
+					<navigator
+					  hover-class="none"
+					  :url="'/pages2/learn/my_learn?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''"
+					  class="menu_box"
+					>
+					  <view class="box_left">
+					    <image src="/static/icon/my_icon2.png" class="my_icon"></image>
+							<view class="point" v-if="userNums.periodSum > 0"></view>
+					    <view>我的学时</view>
+					  </view>
+					  <view class="box_right">
+					    累计
+					    <text>{{ userNums.periodSum }}</text>
+					    学时未通过
+					  </view>
+					</navigator>
+					
+					<navigator
+					  hover-class="none"
+					  :url="'/pages5/liveDetail/list?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''"
+					  class="menu_box"
+					>
+					  <view class="box_left">
+					    <image src="/static/icon/my_icon12.png" class="my_icon">
+							</image>
+							<view class="point" v-if="total2 > 0"></view>
+					    <view>我的直播课</view>
+					  </view>
+					  <view class="box_right">
+					    <text>{{ total2 }}</text>
+					    个课程直播中
+					  </view>
+					</navigator>
+					
+					<view
+					  hover-class="none"
+						@click="goBank()"
+					  class="menu_box"
+					>
+					  <view class="box_left">
+					    <image src="/static/icon/my_icon4.png" class="my_icon">
+							</image>
+					    <view>我的题库</view>
+					  </view>
+					  <view class="box_right">
+					    <text>{{ total2 }}</text>
+					    个课程直播中
+					  </view>
+					</view>
+				</template>
 				
-			</picker>
-			<u-icon name="arrow-down"></u-icon>
-		</view>
+				<template v-if="getSelectType() == 2">
+					<navigator
+					  hover-class="none"
+					  :url="'/pages2/wd/class?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''"
+					  class="menu_box"
+					>
+					  <view class="box_left">
+					    <image src="/static/icon/my_icon3.png" class="my_icon">
+							</image>
+							<view class="point" v-if="total2 > 0"></view>
+					    <view>我的网课</view>
+					  </view>
+					  <view class="box_right">
+					    <text>{{ total2 }}</text>
+					    个课程直播中
+					  </view>
+					</navigator>
+					
+					<navigator
+					  hover-class="none"
+					  :url="'/pages5/liveDetail/list?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''"
+					  class="menu_box"
+					>
+					  <view class="box_left">
+					    <image src="/static/icon/my_icon12.png" class="my_icon">
+							</image>
+							<view class="point" v-if="total2 > 0"></view>
+					    <view>我的直播课</view>
+					  </view>
+					  <view class="box_right">
+					    <text>{{ total2 }}</text>
+					    个课程直播中
+					  </view>
+					</navigator>
+					
+					<view
+					  hover-class="none"
+						@click="goBank()"
+					  class="menu_box"
+					>
+					  <view class="box_left">
+					    <image src="/static/icon/my_icon4.png" class="my_icon">
+							</image>
+					    <view>我的题库</view>
+					  </view>
+					  <view class="box_right">
+					    <text>{{ total2 }}</text>
+					    个课程直播中
+					  </view>
+					</view>
+					
+					<navigator hover-class="none" :url="'/pages5/exam/index?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''" class="menu_box">
+					  <view class="box_left">
+					    <image src="/static/icon/my_icon11.png" class="my_icon"></image>
+							<view class="point" v-if="total1 > 0"></view>
+					    <view>我的模考</view>
+					  </view>
+					  <view class="box_right">
+					    <text>{{ total1 }}</text>
+					    个模考预约
+					  </view>
+					</navigator>
+				</template>
+				
+				<template v-if="getSelectType() == 3">
+					<navigator
+					  hover-class="none"
+					  :url="'/pages2/wd/class?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''"
+					  class="menu_box"
+					>
+					  <view class="box_left">
+					    <image src="/static/icon/my_icon3.png" class="my_icon">
+							</image>
+							<view class="point" v-if="total2 > 0"></view>
+					    <view>我的网课</view>
+					  </view>
+					  <view class="box_right">
+					    <text>{{ total2 }}</text>
+					    个课程直播中
+					  </view>
+					</navigator>
+					
+					<navigator
+					  hover-class="none"
+					  :url="'/pages2/learn/my_learn?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''"
+					  class="menu_box"
+					>
+					  <view class="box_left">
+					    <image src="/static/icon/my_icon2.png" class="my_icon"></image>
+							<view class="point" v-if="userNums.periodSum > 0"></view>
+					    <view>我的学时</view>
+					  </view>
+					  <view class="box_right">
+					    累计
+					    <text>{{ userNums.periodSum }}</text>
+					    学时未通过
+					  </view>
+					</navigator>
+					
+					<navigator hover-class="none" :url="'/pages2/exam/index?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''" class="menu_box">
+					  <view class="box_left">
+					    <image src="/static/icon/my_icon10.png" class="my_icon"></image>
+							<view class="point" v-if="userNums.subscribeSum > 0"></view>
+					    <view>我的考试</view>
+					  </view>
+					  <view class="box_right">
+					    <text>{{ userNums.subscribeSum }}</text>
+					    考试预约
+					  </view>
+					</navigator>
+					
+					<navigator
+					  hover-class="none"
+					  :url="'/pages5/liveDetail/list?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''"
+					  class="menu_box"
+					>
+					  <view class="box_left">
+					    <image src="/static/icon/my_icon12.png" class="my_icon">
+							</image>
+							<view class="point" v-if="total2 > 0"></view>
+					    <view>我的直播课</view>
+					  </view>
+					  <view class="box_right">
+					    <text>{{ total2 }}</text>
+					    个课程直播中
+					  </view>
+					</navigator>
+					
+					<view
+					  hover-class="none"
+						@click="goBank()"
+					  class="menu_box"
+					>
+					  <view class="box_left">
+					    <image src="/static/icon/my_icon4.png" class="my_icon">
+							</image>
+					    <view>我的题库</view>
+					  </view>
+					  <view class="box_right">
+					    <text>{{ total2 }}</text>
+					    个课程直播中
+					  </view>
+					</view>
+				</template>
+				
+				<template v-if="getSelectType() == null">
+					<navigator
+					  hover-class="none"
+					  :url="'/pages2/wd/class?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''"
+					  class="menu_box"
+					>
+					  <view class="box_left">
+					    <image src="/static/icon/my_icon3.png" class="my_icon">
+							</image>
+							<view class="point" v-if="total2 > 0"></view>
+					    <view>我的网课</view>
+					  </view>
+					  <view class="box_right">
+					    <text>{{ total2 }}</text>
+					    个课程直播中
+					  </view>
+					</navigator>
+					
+					
+					<navigator
+					  hover-class="none"
+					  :url="'/pages5/liveDetail/list?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''"
+					  class="menu_box"
+					>
+					  <view class="box_left">
+					    <image src="/static/icon/my_icon12.png" class="my_icon">
+							</image>
+							<view class="point" v-if="total2 > 0"></view>
+					    <view>我的直播课</view>
+					  </view>
+					  <view class="box_right">
+					    <text>{{ total2 }}</text>
+					    个课程直播中
+					  </view>
+					</navigator>
+					
+					<view
+					  hover-class="none"
+						@click="goBank()"
+					  class="menu_box"
+					>
+					  <view class="box_left">
+					    <image src="/static/icon/my_icon4.png" class="my_icon">
+							</image>
+					    <view>我的题库</view>
+					  </view>
+					  <view class="box_right">
+					    <text>{{ total2 }}</text>
+					    个课程直播中
+					  </view>
+					</view>
+				</template>
+			</view>
+		</template>
 		
 		
-		<view class="course-list">
-			<navigator
+			
+			<!-- <navigator
 			  hover-class="none"
 			  url="/pages5/liveDetail/list"
 			  class="menu_box"
@@ -49,6 +322,21 @@
 			    个课程直播中
 			  </view>
 			</navigator>
+			<navigator
+			  hover-class="none"
+			  url="/pages5/liveDetail/list"
+			  class="menu_box"
+			>
+			  <view class="box_left">
+			    <image src="/static/icon/my_icon4.png" class="my_icon">
+					</image>
+			    <view>我的题库</view>
+			  </view>
+			  <view class="box_right">
+			    <text>{{ total2 }}</text>
+			    个课程直播中
+			  </view>
+			</navigator>
 			<navigator
 			  hover-class="none"
 			  url="/pages5/liveDetail/list"
@@ -102,8 +390,7 @@
 			    <text>{{ userNums.subscribeSum }}</text>
 			    考试预约
 			  </view>
-			</navigator>
-		</view>
+			</navigator> -->
 		
   </view>
 </template>
@@ -114,12 +401,15 @@ export default {
   components: {},
   data() {
     return {
-      list:[{name:'继续教育-建造师-二级',id:1},{name:'继续教育-建造师-一级',id:2}],
+      list:[],
 			businessId:'',
+			educationId:'',
+			projectId:'',
 			businessName:'',
 			userNums: {},
 			total1: 0,
 			total2: 0,
+			selectItem:null,
     };
   },
   onPullDownRefresh() {
@@ -134,15 +424,81 @@ export default {
 		}
 	},
   methods: {
+		goBank() {
+		  this.$api
+		    .lockLockStatus({
+		      action: "bank",
+		    })
+		    .then((res) => {
+		      if (res.data.code == 200) {
+		        //有其他端在操作,不能学习
+		        uni.showToast({
+		          icon: "none",
+		          title: res.data.msg,
+		          duration: 3000,
+		        });
+		      } else if (res.data.code == 500) {
+		        //可以学习
+		
+		        uni.navigateTo({
+		          url: '/pages2/wd/question_bank?projectId='+this.projectId+'&businessId='+this.businessId+'&educationId='+this.educationId+'',
+		        });
+		      }
+		    });
+		},
 		orderUserAllBusinessList() {
 			this.$api.orderUserAllBusinessList().then(res => {
-				console.log(res)
+				this.list = res.data.rows;
 			})
 		},
-		change(e) {
-			this.businessId = this.list[e.detail.value].id
-			this.businessName = this.list[e.detail.value].name
+		getSelectType() {
+			if(!this.selectItem) {
+				return null
+			}
+			
+			if(this.selectItem.educationName == '继续教育') {
+				if(this.selectItem.businessName == '一级') {
+					if(this.selectItem.projectName == '建造师') {
+						return 1;
+					} else {
+						return null;
+					}
+				} else if (this.selectItem.businessName == '二级') {
+					if(this.selectItem.projectName == '建造师' || this.selectItem.projectName == '造价工程师') {
+						return 1;
+					} else {
+						return null;
+					}
+				} else if (this.selectItem.businessName == '职称继续教育' && this.selectItem.projectName == '专业技术人员') {
+					return 1
+				} else {
+					return null;
+				}
+			}
+			
+			if(this.selectItem.educationName == '考前培训') {
+				if(this.selectItem.businessName == '二级' || this.selectItem.businessName == '一级') {
+					if(this.selectItem.projectName == '建造师') {
+						return 2;
+					} else {
+						return null;
+					}
+				} else if(this.selectItem.businessName == '七大员' && this.selectItem.projectName == '施工现场专业人员') {
+					return 3;
+				} else{
+					return null;
+				}
+				
+			}
 			
+			return null
+		},
+		change(e) {
+			this.selectItem = this.list[e.detail.value]
+			this.businessId = this.list[e.detail.value].businessId
+			this.projectId = this.list[e.detail.value].projectId
+			this.educationId = this.list[e.detail.value].educationId
+			this.businessName = this.list[e.detail.value].educationName +'-'+ this.list[e.detail.value].aliasName
 			this.isLogin = this.$method.isLogin();
 			if (this.isLogin) {
 			  this.$store.state.allowLoading = false;

+ 8 - 1
pages2/bank/free_question.vue

@@ -42,13 +42,20 @@
 				list:[],
 				param:{
 					pageNum: 1,
-					pageSize: 10
+					pageSize: 10,
+					businessId:'',
+					educationTypeId:'',
+					projectId:'',
 				},
 				total:0,
 				itemIndex:'',
 			}
 		},
 		onLoad(option) {
+			
+			this.param.businessId = option.businessId || ''
+			this.param.educationTypeId = option.educationId || ''
+			this.param.projectId = option.projectId || '';
 			this.bankQuestionListFreeGoodsList();
 		},
 		onShow(){

+ 6 - 0
pages2/bank/my_question.vue

@@ -62,12 +62,18 @@ export default {
       param: {
         pageNum: 1,
         pageSize: 10,
+				businessId:'',
+				educationTypeId:'',
+				projectId:'',
       },
       total: 0,
       itemIndex: "",
     };
   },
   onLoad(option) {
+		this.param.businessId = option.businessId || ''
+		this.param.educationTypeId = option.educationId || ''
+		this.param.projectId = option.projectId || '';
     this.listGoodsUserQuestion();
   },
   onShow() {

+ 7 - 1
pages2/bank/question_record.vue

@@ -77,7 +77,10 @@ export default {
 			goodsData: {},
 			param: {
 				pageNum: 1,
-				pageSize: 10
+				pageSize: 10,
+				businessId:'',
+				educationTypeId:'',
+				projectId:'',
 			},
 			isRepeat:false,
 			total: 0,
@@ -88,6 +91,9 @@ export default {
 		};
 	},
 	onLoad(option) {
+		this.param.businessId = option.businessId || ''
+		this.param.educationTypeId = option.educationId || ''
+		this.param.projectId = option.projectId || '';
 		this.listGoodsUserQuestion();
 		this.examaperList();
 		this.getExamRecordList();

+ 9 - 0
pages2/learn/my_learn.vue

@@ -240,6 +240,9 @@ export default {
         pageNum: 1,
         pageSize: 10,
         orderGoodsId: "",
+				businessId:'',
+				educationId:'',
+				projectId:'',
       },
       total: 0,
       itemIndex: "",
@@ -249,6 +252,9 @@ export default {
     };
   },
   onLoad(option) {
+		this.param.businessId = option.businessId || ''
+		this.param.educationId = option.educationId || ''
+		this.param.projectId = option.projectId || '';
     this.orderGoodsId = option.orderGoodsId || "";
     console.log(this.orderGoodsId);
     this.param.orderGoodsId = option.orderGoodsId || "";
@@ -429,6 +435,9 @@ export default {
         pageNum: 1,
         pageSize: 10,
         orderGoodsId: this.orderGoodsId,
+				businessId:this.param.businessId,
+				educationId:this.param.educationId,
+				projectId:this.param.projectId,
       };
       if (this.current == 0) {
         this.getcourseperiodlistGoods();

+ 14 - 1
pages2/subject/collect.vue

@@ -97,11 +97,18 @@ export default {
 			typeList:[],
 			goodsid:'',
 			orderGoodsId:'',
+			businessId:'',
+			educationTypeId:'',
+			projectId:'',
 			paperid:''
 		};
 	},
 	onPullDownRefresh() {},
 	onLoad(option) {
+		
+		this.businessId = option.businessId || ''
+		this.educationTypeId = option.educationId || ''
+		this.projectId = option.projectId || '';
 		this.orderGoodsId = option.orderGoodsId || '';
 		this.listGoodsUserQuestion();
 		this.examaperList();
@@ -149,7 +156,10 @@ export default {
 			this.$api.goodsCollectExamList({
 				paperId:this.paperid,
 				goodsId:this.goodsid,
-				orderGoodsId:this.orderGoodsId
+				orderGoodsId:this.orderGoodsId,
+				businessId:this.businessId,
+				educationTypeId:this.educationTypeId,
+				projectId:this.projectId
 			}).then(res => {
 				this.testList = res.data 
 				let total = 0;
@@ -163,6 +173,9 @@ export default {
 		collectQuestionTypeList() {
 			this.$api.collectQuestionTypeList({
 				paperId:this.paperid,
+				businessId:this.businessId,
+				educationTypeId:this.educationTypeId,
+				projectId:this.projectId,
 				orderGoodsId:this.orderGoodsId
 			}).then(res => {
 				this.typeList = res.data 

+ 15 - 0
pages2/subject/wrong.vue

@@ -95,6 +95,9 @@ export default {
 			goodsid:'',
 			paperid:'',
 			total:0,
+			businessId:'',
+			educationTypeId:'',
+			projectId:'',
 			orderGoodsId:'',
 			modalTop:0,
 		};
@@ -104,6 +107,10 @@ export default {
 		this.getData();
 	},
 	onLoad(option) {
+		
+		this.businessId = option.businessId || ''
+		this.educationTypeId = option.educationId || ''
+		this.projectId = option.projectId || '';
 		this.orderGoodsId = option.orderGoodsId || ''
 		this.listGoodsUserQuestion();
 		this.examaperList();
@@ -150,6 +157,10 @@ export default {
 			this.$api.wrongRecordList({
 				paperId:this.paperid,
 				goodsId:this.goodsid,
+				orderGoodsId:this.orderGoodsId,
+				businessId:this.businessId,
+				educationTypeId:this.educationTypeId,
+				projectId:this.projectId,
 				orderGoodsId:this.orderGoodsId
 			}).then(res => {
 				this.testList = res.data;
@@ -164,6 +175,10 @@ export default {
 		wrongRecordTypeList() {
 			this.$api.wrongRecordTypeList({
 				paperId:this.paperid,
+				orderGoodsId:this.orderGoodsId,
+				businessId:this.businessId,
+				educationTypeId:this.educationTypeId,
+				projectId:this.projectId,
 				orderGoodsId:this.orderGoodsId
 			}).then(res => {
 				this.typeList = res.data;

+ 11 - 0
pages2/wd/class.vue

@@ -558,15 +558,23 @@ export default {
       param: {
         pageNum: 1,
         pageSize: 10,
+				businessId:'',
+				educationTypeId:'',
+				projectId:'',
       },
       total: 0,
       sysTime: 0,
       itemIndex: "",
       selectItem: {},
+			
     };
   },
   onLoad(option) {
     // this.sysTime = +this.$method.timest();
+		
+		this.param.businessId = option.businessId || ''
+		this.param.educationTypeId = option.educationId || ''
+		this.param.projectId = option.projectId || '';
     this.courseGoodsList();
   },
   async onShow() {
@@ -605,6 +613,9 @@ export default {
         .courseGoodsList({
           pageNum: this.itemIndex + 1,
           pageSize: 1,
+					businessId:this.param.businessId,
+					educationTypeId:this.param.educationTypeId,
+					projectId:this.param.projectId
         })
         .then((res) => {
           if (res.data.code == 200) {

+ 11 - 5
pages2/wd/question_bank.vue

@@ -1,7 +1,7 @@
 <template>
   <view style="padding: 32rpx">
     <nav-bar title="我的题库通"></nav-bar>
-    <navigator hover-class="none" url="/pages2/bank/my_question">
+    <navigator hover-class="none" :url="'/pages2/bank/my_question?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''">
       <view class="my_question">
         <view class="flex">
           <view class="text">自购题卷<u-icon name="arrow-right"></u-icon></view>
@@ -9,7 +9,7 @@
         <image src="/pages2/static/questionBank.png" class="my_bg"></image>
       </view>
     </navigator>
-    <navigator hover-class="none" url="/pages2/bank/free_question">
+    <navigator hover-class="none" :url="'/pages2/bank/free_question?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''">
       <view class="my_question">
         <view class="flex">
           <view class="text">赠送题卷<u-icon name="arrow-right"></u-icon></view>
@@ -18,14 +18,14 @@
       </view>
     </navigator>
     <view class="bottom">
-      <navigator hover-class="none" url="/pages2/subject/collect">
+      <navigator hover-class="none" :url="'/pages2/subject/collect?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''">
         <view class="item collect">
           <view class="text">收藏集<u-icon name="arrow-right"></u-icon></view>
           <image class="img" src="/static/questionBank_collect.png"></image>
         </view>
       </navigator>
       <view class="item list">
-        <navigator hover-class="none" url="/pages2/bank/question_record">
+        <navigator hover-class="none" :url="'/pages2/bank/question_record?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''">
           <view class="list-in">
             <image class="img" src="/static/questionBank_record.png"></image>
             <view class="text">
@@ -34,7 +34,7 @@
           </view>
         </navigator>
 
-        <navigator hover-class="none" url="/pages2/subject/wrong">
+        <navigator hover-class="none" :url="'/pages2/subject/wrong?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''">
           <view class="list-in">
             <image class="img" src="/static/questionBank_wrong.png"></image>
             <view class="text">
@@ -54,9 +54,15 @@ export default {
     return {
       list: [1, 2, 3],
       timer: null,
+			businessId:'',
+			educationId:'',
+			projectId:'',
     };
   },
   onLoad(option) {
+		this.businessId = option.businessId || ''
+		this.educationId = option.educationId || ''
+		this.projectId = option.projectId || '';
     this.$api
       .lockLockAction({
         action: "bank",

+ 1 - 1
pages3/polyv/detail.vue

@@ -623,7 +623,7 @@ export default {
       moduleId: 0,
       reMenuList: [],
       answerList: [],
-      assignUserId: 0,
+      assignUserId: 0, 
       placeholder: "您可以在这里输入答疑内容",
       ctxValue: "",
       noteList: [],

+ 6 - 0
pages5/liveDetail/list.vue

@@ -42,6 +42,9 @@ export default {
 		return {
 			list:[],
 			param:{
+				businessId:'',
+				educationTypeId:'',
+				projectId:'',
 				pageNum:1,
 				pageSize:10
 			},
@@ -52,6 +55,9 @@ export default {
 	onUnload() {},
 	computed: { ...mapGetters(['userInfo']) },
 	onLoad(option) {
+		this.param.businessId = option.businessId || ''
+		this.param.educationTypeId = option.educationId || ''
+		this.param.projectId = option.projectId || '';
 		this.goodsListGoodsUserLive()
 		this.goodsLivingSectionList();
 	},