Browse Source

Merge branch 'master' of http://192.168.1.43:3000/v3/v3-lab-xcx

dedsudiyu 10 months ago
parent
commit
ac5b01804c

+ 1 - 1
api/request/config.js

@@ -7,7 +7,7 @@ const config = {
 	//base_url: 'http://192.168.1.17:8080',//小飞
 	//base_url: 'http://192.168.1.17:8080',//小飞
 	//base_url: 'http://192.168.1.43/api',//小飞
 	//base_url: 'http://192.168.1.43/api',//小飞
 	// base_url: 'http://192.168.1.20:8080',//志伟
 	// base_url: 'http://192.168.1.20:8080',//志伟
-	 // base_url: 'http://192.168.1.39:8080',//高升
+	//  base_url: 'http://192.168.1.39:8080',//高升
 	// base_url: 'http://192.168.1.29:8080',//何成
 	// base_url: 'http://192.168.1.29:8080',//何成
 	// base_url: 'https://demo.zjznai.com/xzgd/',
 	// base_url: 'https://demo.zjznai.com/xzgd/',
 	// base_url: 'https://lab.zjznai.com/labNhSystem/',//43服务器高升测试
 	// base_url: 'https://lab.zjznai.com/labNhSystem/',//43服务器高升测试

+ 7 - 0
pages.json

@@ -1,6 +1,7 @@
 {
 {
 	"pages": [
 	"pages": [
 		
 		
+		    
 		{
 		{
 			"path": "pages/views/login/login",//登录
 			"path": "pages/views/login/login",//登录
 			"style": {
 			"style": {
@@ -346,6 +347,12 @@
 			"root": "pages_student",  //分包根路径
 			"root": "pages_student",  //分包根路径
 			"name": "student", //分包名字可写可不写
 			"name": "student", //分包名字可写可不写
 			"pages": [
 			"pages": [
+				{
+					"path": "views/meCertificate",
+					"style": {
+						"navigationBarTitleText": "我的证书"
+					}
+				},
 				/* 积分管理 */
 				/* 积分管理 */
 				{
 				{
 					"path": "views/integralManage/codeSuccess",//扫码成功
 					"path": "views/integralManage/codeSuccess",//扫码成功

+ 6 - 1
pages/views/home/studentWorkbench.vue

@@ -14,7 +14,7 @@
       <img class="right-img" @click="goNull" src="@/pages/images/img_bg_jfmx.png">
       <img class="right-img" @click="goNull" src="@/pages/images/img_bg_jfmx.png">
     </view>
     </view>
     <view class="bottom-max-box">
     <view class="bottom-max-box">
-      <view class="bottom-title">
+      <view class="bottom-title" @click="meCertificateClick()">
         <img src="@/pages/images/icon_sy_wdzs.png">
         <img src="@/pages/images/icon_sy_wdzs.png">
         <view>我的证书</view>
         <view>我的证书</view>
       </view>
       </view>
@@ -141,6 +141,11 @@ export default {
       let DD = (newDate.getDate() < 10 ? '0' + (newDate.getDate()) : newDate.getDate());
       let DD = (newDate.getDate() < 10 ? '0' + (newDate.getDate()) : newDate.getDate());
       return YY + MM + DD;
       return YY + MM + DD;
     },
     },
+	meCertificateClick(){
+		uni.navigateTo({
+		  url: '/pages_student/views/meCertificate',
+		});
+	},
     //页面跳转
     //页面跳转
     goPage(type){
     goPage(type){
       if(type == 'meViolation'){//我的违规
       if(type == 'meViolation'){//我的违规

+ 1 - 1
pages/views/login/login.vue

@@ -52,7 +52,7 @@
 			return {
 			return {
 				identityStatus: 1,
 				identityStatus: 1,
 				// username:"dedsudiyu",//学生
 				// username:"dedsudiyu",//学生
-				username: "sudiyu",//教职工
+				username: "dedsudiyu",//教职工
 				password: "zd123456",
 				password: "zd123456",
 				checkedType: false,
 				checkedType: false,
 				loginBanner: uni.getStorageSync('loginBanner'),
 				loginBanner: uni.getStorageSync('loginBanner'),

+ 1 - 1
pages_safetyExamine/views/dangerManage/dangerDetail.vue

@@ -806,7 +806,7 @@
 				} = await checkHazardAdd(obj);
 				} = await checkHazardAdd(obj);
 				if (data.code == 200) {
 				if (data.code == 200) {
 					uni.redirectTo({
 					uni.redirectTo({
-						url: '/pages_safetyExamine/dangerManage/dangerList?pageType=' + this.checkType
+						url: '/pages_safetyExamine/views/dangerManage/dangerList?pageType=' + this.checkType
 					});
 					});
 					uni.showToast({
 					uni.showToast({
 						title: '提交成功',
 						title: '提交成功',

+ 1 - 1
pages_safetyExamine/views/dangerManage/dangerList.vue

@@ -237,7 +237,7 @@
 
 
 				} else if (doType == 'detail') { //详情
 				} else if (doType == 'detail') { //详情
 					uni.redirectTo({
 					uni.redirectTo({
-						url: '/pages_safetyExamine/dangerManage/dangerDetail?item=' + encodeURIComponent(JSON
+						url: '/pages_safetyExamine/views/dangerManage/dangerDetail?item=' + encodeURIComponent(JSON
 							.stringify(row))
 							.stringify(row))
 					})
 					})
 				}
 				}

+ 2 - 2
pages_safetyExamine/views/snapshotManage/snapshotDetail.vue

@@ -111,7 +111,7 @@
 				baseUrl: config.base_url,
 				baseUrl: config.base_url,
 				id: '',
 				id: '',
 				rectifyStatus: '', //整改状态,0是待整改,1是已整改,2是暂无法整改
 				rectifyStatus: '', //整改状态,0是待整改,1是已整改,2是暂无法整改
-				pageType: 0,
+				pageType: 1,
 				form: {
 				form: {
 					id: '',
 					id: '',
 					rectifyStatus: 1, //0待整改 1已整改 2暂无法整改
 					rectifyStatus: 1, //0待整改 1已整改 2暂无法整改
@@ -291,7 +291,7 @@
 						duration: 2000
 						duration: 2000
 					});
 					});
 					uni.redirectTo({
 					uni.redirectTo({
-						url: '/pages_safetyExamine/snapshotManage/snapshotList?pageType=' + this.pageType
+						url: '/pages_safetyExamine/views/snapshotManage/snapshotList?pageType=' + this.pageType
 					});
 					});
 
 
 				}
 				}

+ 5 - 4
pages_safetyExamine/views/snapshotManage/snapshotList.vue

@@ -58,7 +58,7 @@
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
-				pageType: 0,
+				pageType: 1,
 				//列表请求参数
 				//列表请求参数
 				getData: {
 				getData: {
 					pageNum: 1,
 					pageNum: 1,
@@ -104,6 +104,7 @@
 			}
 			}
 		},
 		},
 		onLoad(option) {
 		onLoad(option) {
+			console.log(option.pageType)
 			if (option.form) {
 			if (option.form) {
 				this.form = JSON.parse(decodeURIComponent(option.form));
 				this.form = JSON.parse(decodeURIComponent(option.form));
 				console.log(this.form)
 				console.log(this.form)
@@ -123,11 +124,11 @@
 
 
 		},
 		},
 		onShow() {
 		onShow() {
-
-		},
-		mounted() {
 			this.dataList = [];
 			this.dataList = [];
 			this.getList()
 			this.getList()
+		},
+		mounted() {
+
 		},
 		},
 		methods: {
 		methods: {
 			//顶部tab点击
 			//顶部tab点击

+ 8 - 1
pages_student/api/index.js

@@ -1,5 +1,12 @@
 import { apiResquest,apiResquestForm,apiResquestJsonList,apiResquestFormVideo,apiResquestTimer } from '@/api/request/request.js'
 import { apiResquest,apiResquestForm,apiResquestJsonList,apiResquestFormVideo,apiResquestTimer } from '@/api/request/request.js'
-
+//查询我的证书
+export const examExamQueryMyCert  = (data) => {
+    return apiResquest({
+         url:'/exam/exam/queryMyCert',
+        method: 'POST',
+        data: data,
+    })
+};
 //查询申请记录列表
 //查询申请记录列表
 export const laboratoryAppletListApply  = (data) => {
 export const laboratoryAppletListApply  = (data) => {
     return apiResquest({
     return apiResquest({

+ 161 - 0
pages_student/views/meCertificate.vue

@@ -0,0 +1,161 @@
+<!-- 实验室列表 -->
+<template>
+	<view id="meCertificate">
+
+		<scroll-view scroll-y @scrolltolower="scrollGet" class="for-max-box">
+			<img class="null-img" v-if="!dataList[0]" src="@/pages_manage/images/null-data-1.png">
+			<view class="bottom-for-box" v-for="(item,index) in dataList" :key="index">
+				<view class="bottom-top-box">{{item.certTitle}}</view>
+				<view class="bottom-bottom-box">
+					<view class="bottom-right-box">{{item.createTime}}获得</view>
+					<view class="bottom-right-box">到期时间:{{item.expirationTime}}</view>
+				</view>
+			</view>
+			<view class="get-data-null-p" v-if="getDataType">- 没有更多数据 -</view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	import $mqtt from '@/utils/mqtt.min.js';
+	import {
+		config
+	} from '@/api/request/config.js'
+	
+	import {
+		examExamQueryMyCert
+	} from '@/pages_student/api/index.js'
+	export default {
+		data() {
+			return {
+				total: 0,
+				dataList: [],
+				getDataType: false,
+				
+				// 查询参数
+				queryParams: {
+					page: 1,
+					pageSize: 10,
+				},
+			}
+		},
+		onLoad() {
+			
+			this.getList()
+		},
+		onShow() {},
+		methods: {
+			
+			//滚动加载事件
+			scrollGet() {
+				let self = this;
+				if (self.total / self.queryParams.pageSize <= self.queryParams.page) {
+					this.$set(this, 'getDataType', true);
+				} else {
+					this.queryParams.page += 1;
+					this.$nextTick(() => {
+						this.getList();
+					})
+				}
+			},
+			//获取实验室列表
+			async getList() {
+				let self = this;
+				let obj = JSON.parse(JSON.stringify(this.queryParams));
+				
+				const {
+					data
+				} = await examExamQueryMyCert(obj);
+				if (data.code == 200) {
+					if (self.queryParams.page == 1) {
+						this.dataList = data.data.records;
+						this.total = data.data.total;
+						if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
+							this.$set(this, 'getDataType', true);
+						}
+					} else {
+						this.dataList = [...this.dataList, ...data.data.records]
+						this.total = data.data.total;
+						if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
+							this.$set(this, 'getDataType', true);
+						}
+					}
+				}
+			},
+			
+		},
+	}
+</script>
+
+<style lang="stylus" scoped>
+	#meCertificate {
+		height: 100%;
+		display flex;
+		flex-direction column;
+
+		.for-max-box {
+			flex: 1;
+
+			overflow-y scroll;
+
+			.null-img {
+				display block;
+				width: 276rpx;
+				height: 321rpx;
+				position absolute;
+				top: 200rpx;
+				left: 274rpx;
+			}
+
+			.for-box:nth-child(1) {
+				border-top: none;
+			}
+
+			.bottom-for-box {
+				height: 154rpx;
+				margin: 0 20rpx;
+				border-top: 1rpx solid #E0E0E0;
+			
+				overflow hidden;
+			
+				.bottom-top-box {
+					font-size: 28rpx;
+					line-height: 28rpx;
+					color: #333;
+					display: block;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+					margin: 36rpx 0 30rpx;
+				}
+			
+				.bottom-bottom-box {
+					display flex;
+			
+					view {
+						flex: 1;
+						line-height: 48rpx;
+						font-size: 28rpx;
+						color: #999999;
+						display: block;
+						overflow: hidden;
+						text-overflow: ellipsis;
+						white-space: nowrap;
+					}
+			
+					view:nth-child(2) {
+						text-align right
+					}
+			
+				}
+			}
+
+			.get-data-null-p {
+				text-align: center;
+				line-height: 40rpx;
+				padding-bottom: 40px;
+				color: #999;
+			}
+		}
+	}
+</style>