heyang 10 місяців тому
батько
коміт
aece21bd3b

+ 15 - 13
package.json

@@ -1,15 +1,17 @@
 {
-    "id": "song-data-picker",
-    "name": "基于DataPicker(uni-data-picker)的带有搜索功能的选择器",
-    "version": "0.1.3",
-    "description": "在uni官方的DataPicker(uni-data-picker)基础上添加搜索功能",
-    "keywords": [
-        "picker",
-        "级联",
-        "省市区",
-        "地址",
-        "搜索"
-    ],
-	"dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch --minimize",
-    "dependencies": {}
+  "id": "song-data-picker",
+  "name": "基于DataPicker(uni-data-picker)的带有搜索功能的选择器",
+  "version": "0.1.3",
+  "description": "在uni官方的DataPicker(uni-data-picker)基础上添加搜索功能",
+  "keywords": [
+    "picker",
+    "级联",
+    "省市区",
+    "地址",
+    "搜索"
+  ],
+  "dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch --minimize",
+  "dependencies": {
+    "echarts": "^5.5.0"
+  }
 }

+ 21 - 8
pages.json

@@ -1,5 +1,14 @@
 {
 	"pages": [
+		/* {
+			"path": "pages/views/dataBoard/dataBoard",
+			"style": {
+				"navigationBarTitleText": "",
+				"navigationBarTextStyle": "white", //导航文字颜色
+				"navigationStyle":"custom"  //关闭原生导航
+			}
+		}, */
+
 		{
 			"path": "pages/views/login/login",//登录
 			"style": {
@@ -31,14 +40,6 @@
 				"navigationBarTitleText": "消息"
 			}
 		},
-		{
-			"path": "pages/views/mine/mine",//我的
-			"style": {
-				"navigationBarTitleText": "我的",
-				"navigationBarTextStyle": "white", //导航文字颜色
-				"navigationBarBackgroundColor": "#0183FA" //导航背景色
-			}
-		},
 		{
 			"path": "pages/views/information/informationInfo",//消息
 			"style": {
@@ -177,6 +178,18 @@
 					"style": {
 						"navigationBarTitleText": "进出详情"
 					}
+				},
+				{
+					"path": "views/signature/signature",
+					"style": {
+						"navigationBarTitleText": "电子签名"
+					}
+				},
+				{
+					"path": "views/signature/signatureImg",
+					"style": {
+						"navigationBarTitleText": "电子签名"
+					}
 				}
 			]
 		},

+ 1 - 1
pages/component/navbar.vue

@@ -63,7 +63,7 @@
 		position: fixed;
 		top: 0;
 		left: 0;
-		background: #0183FA;
+		//background: #0183FA;
 		/* background: linear-gradient(-35deg, #613A19 0%, #6F4E2B 100%); */
 	}
  

BIN
pages/images/dataBoard/dataBoard-icon1.png


+ 297 - 0
pages/views/dataBoard/dataBoard.vue

@@ -0,0 +1,297 @@
+<!-- 数据看板-首页 -->
+<template>
+	<view class="dataBoard">
+		<nav-bar :title="title" style="position: absolute; z-index: 1000;"></nav-bar>
+		<view class="header">
+			<img class="header-bg" src="@/pages/images/dataBoard/dataBoard-icon1.png">
+			<view class="header-t">
+				<img class="header-t-l" src="@/pages/images/icon_aqbj.png">
+				<view class="header-t-r">管理面板</view>
+			</view>
+			<view class="header-b">
+				<view class="header-b-li">
+					<view class="header-b-li-t color-A">999</view>
+					<view class="header-b-li-b">今日访问人数</view>
+				</view>
+				<view class="line"></view>
+				<view class="header-b-li">
+					<view class="header-b-li-t color-B">165</view>
+					<view class="header-b-li-b">今日实验人数</view>
+				</view>
+				<view class="line"></view>
+				<view class="header-b-li">
+					<view class="header-b-li-t color-C">39</view>
+					<view class="header-b-li-b">今日值日人数</view>
+				</view>
+				<view class="line"></view>
+				<view class="header-b-li">
+					<view class="header-b-li-t color-D">562</view>
+					<view class="header-b-li-b">今日检查次数</view>
+				</view>
+			</view>
+		</view>
+		<scroll-view scroll-x @scrolltolower="scrollGet">
+			<view class="tabTitle_tow">
+				<view class="tabTitle_tow_li" @tap="tabClickTow(item,index)" :key="index"
+					v-for="(item,index) in tabTextTow">
+					<view :class="{on:curTabTow==index}" class="tabTitle_tow_text">{{item}}</view>
+					<view :class="{on:curTabTow==index}" class="tabTitle_tow_across"></view>
+				</view>
+			</view>
+		</scroll-view>
+		<lab-page></lab-page>
+	</view>
+	
+</template>
+
+
+<script>
+	import {
+		navBar
+	} from '@/pages/component/navbar.vue'
+	import {labPage} from '@/pages/views/dataBoard/labPage.vue'
+	import {
+		config
+	} from '@/api/request/config.js'
+	import {
+
+	} from '@/pages_basics/api/index.js'
+	export default {
+		name: "dataBoard",
+		components: {
+			navBar,
+			labPage
+		},
+		data() {
+			return {
+				navHeight: uni.getStorageSync('navHeight'),
+				title: '实验室安全智能监测与控制系统',
+				baseUrl: config.base_url,
+
+				// 查询参数
+				queryParams: {
+					page: 1,
+					pageSize: 10,
+				},
+				dataList: [],
+				total: 0,
+				tabTextTow: ['实验室','危险源','危化品','安全隐患','预警处置','设备管控','大仪预约','笼位预约','资源预约'],
+				curTabTow: 0,
+			}
+		},
+		created() {
+
+		},
+		beforeMount() {
+
+		},
+		mounted() {},
+		methods: {
+			//滚动加载事件
+			scrollGet() {
+				if (this.total / this.queryParams.pageSize <= this.queryParams.page) {
+					this.$set(this, 'getDataType', true);
+				} else {
+					this.queryParams.page += 1;
+					this.$nextTick(() => {
+						this.getList();
+					})
+				}
+			},
+			//顶部tab点击
+			tabClickTow(item, index) {
+				this.curTabTow = index;
+			},
+
+			async getList() {
+				let self = this;
+				let obj = JSON.parse(JSON.stringify(this.queryParams));
+				const {
+					data
+				} = await laboratoryAppletPassOutList(obj);
+				if (data.code == 200) {
+					let list = [];
+					if (this.queryParams.page != 1) {
+						list = JSON.parse(JSON.stringify(this.dataList));
+					}
+					data.data.records.forEach((item) => {
+						let num = 0;
+						list.forEach((minItem) => {
+							if (item.showInTime == minItem.showInTime) {
+								num++
+								minItem.list.push(item)
+							}
+						})
+						if (num == 0) {
+							list.push({
+								showInTime: item.showInTime,
+								list: [item]
+							})
+						}
+					})
+					this.$set(this, 'dataList', list);
+					this.$set(this, 'total', data.data.total);
+					if (data.data.total / this.queryParams.pageSize <= this.queryParams.page) {
+						this.$set(this, 'getDataType', true);
+					}
+				}
+			},
+		},
+	}
+</script>
+
+
+<style lang="stylus" scoped>
+	.dataBoard {
+		height: 100%;
+		width: 100%;
+		background: #363744;
+
+		.header {
+			width: 750rpx;
+			height: 476rpx;
+			position: relative;
+
+			.header-bg {
+				width: 750rpx;
+				height: 476rpx;
+				position: absolute;
+				left: 0;
+				top: 0;
+				z-index: 100;
+			}
+
+			.header-t {
+				width: 100%;
+				height: 50rpx;
+				position: absolute;
+				left: 0;
+				top: 154rpx;
+				z-index: 200;
+
+				.header-t-l {
+					width: 300rpx;
+					height: 50rpx;
+					position: absolute;
+					left: 30rpx;
+					top: 0;
+				}
+
+				.header-t-r {
+					position: absolute;
+					right: 0;
+					top: 0;
+					font-weight: 400;
+					font-size: 28rpx;
+					color: #FFFFFF;
+					line-height: 50rpx;
+					text-align: left;
+					width: 160rpx;
+					height: 50rpx;
+					background: rgba(54, 55, 68, 0.6);
+					padding-left: 24rpx;
+					border-radius: 24rpx 0 0 24rpx;
+				}
+			}
+
+			.header-b {
+				position: absolute;
+				left: 30rpx;
+				top: 302rpx;
+				z-index: 200;
+				width: 689rpx;
+				height: 150rpx;
+				background: rgba(62, 65, 79, 0.4);
+				border-radius: 20rpx 20rpx 20rpx 20rpx;
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+
+				.header-b-li {
+					flex: 1;
+					text-align: center;
+
+					.header-b-li-t {
+						font-weight: 400;
+						font-size: 36rpx;
+						line-height: 50rpx;
+						margin-top: 32rpx;
+						margin-bottom: 9rpx;
+					}
+
+					.header-b-li-b {
+						font-weight: 400;
+						font-size: 24rpx;
+						color: #FFFFFF;
+						line-height: 34rpx;
+					}
+				}
+
+				.line {
+					width: 2rpx;
+					height: 30rpx;
+					background: #D8D8D8;
+				}
+
+				.color-A {
+					color: #0183FA;
+				}
+
+				.color-B {
+					color: #2EA805;
+				}
+
+				.color-C {
+					color: #00FFE5;
+				}
+
+				.color-D {
+					color: #FF8C00;
+				}
+			}
+		}
+		.tabTitle_tow {
+			height: 80rpx;
+			white-space: nowrap;
+			display: inline-flex;
+			background: #3E414F;
+			.tabTitle_tow_li {
+				position: relative;
+				width: 152rpx;
+				height: 80rpx;
+				text-align center;
+				padding-top: 18rpx;
+				box-sizing: border-box;
+		
+				.tabTitle_tow_text {
+					display: inline-block;
+					font-size: 32rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #FFFFFF;
+					line-height: 46rpx;
+					position: relative;
+		
+					&.on {
+						color: #0183FA;
+					}
+				}
+		
+				.tabTitle_tow_across {
+					width: 50rpx;
+					height: 4rpx;
+					background: #0183FA;
+					border-radius: 2rpx;
+					margin-left: 33%;
+					margin-top: 16rpx;
+					display none;
+		
+					&.on {
+						display block;
+					}
+				}
+		
+			}
+		}
+	}
+</style>

+ 45 - 0
pages/views/dataBoard/labPage.vue

@@ -0,0 +1,45 @@
+<!-- 数据看板-首页 -->
+<template>
+	<view class="dataBoard">
+		
+	</view>
+</template>
+
+<script>
+	import {
+		config
+	} from '@/api/request/config.js'
+	import {
+
+	} from '@/pages_basics/api/index.js'
+	export default {
+		name: "dataBoard",
+		components: {
+		
+		},
+		data() {
+			return {
+			
+			}
+		},
+		created() {
+
+		},
+		beforeMount() {
+
+		},
+		mounted() {},
+		methods: {
+			
+		},
+	}
+</script>
+
+<style lang="stylus" scoped>
+	.dataBoard {
+		height: 100%;
+		width: 100%;
+		background: #363744;
+	}
+</style>
+

+ 26 - 0
pages_basics/api/index.js

@@ -79,4 +79,30 @@ export const laboratoryAppletAddPhotoInspect = (data) => {
 		method: 'POST',
 		data: { ...data }
 	})
+};
+
+
+//查询用户电子签名
+export const querySignature  = (data) => {
+    return apiResquest({
+        url: `/system/user/querySignature`,
+        method: 'POST',
+        data: {...data}
+    })
+};
+//小程序电子签名抠图生成图片
+export const querygenSign  = (data) => {
+    return apiResquest({
+        url: `/system/user/genSign`,
+        method: 'POST',
+        data: {...data}
+    })
+};
+//小程序用户修改签名
+export const updateSignature  = (data) => {
+    return apiResquest({
+        url: `/system/user/updateSignature`,
+        method: 'POST',
+        data: {...data}
+    })
 };

BIN
pages_basics/images/icon_sczl_sc.png


+ 292 - 0
pages_basics/views/signature/signature.vue

@@ -0,0 +1,292 @@
+<!-- 电子签名 -->
+<template>
+	<view id="signature">
+		<view class="signature_li">
+			<view class="signature_li_t">示例:</view>
+			<view class="signature_li_b">
+				<img src="@/pages_basics/images/img_dzqm_sl.png">
+			</view>
+		</view>
+		<view class="tip">请上传白字黑子正楷签名</view>
+		<view class="signature_li">
+			<view class="signature_li_t">上传签名:</view>
+			<view class="signature_li_b">
+				<view class="signature_li_b_c" @click="selectImage"><span v-if="!signatureData">点击上传签名</span></view>
+				<img class=".signature_li_img2" :src="signatureData">
+			</view>
+			<view class="clear_signature" @tap="signatureDele()">
+				<img class="clear_signature_img" src="@/pages_basics/images/icon_sczl_sc.png" />
+				<text>清除</text>
+			</view>
+			<view class="upload_tip">请严格按照示例上传正楷签名并置于框内</view>
+		</view>
+		<view class="signature_li">
+			<view class="signature_li_t" style="margin-top: 20rpx;">已上传的签名:</view>
+			<image class="signature_li_img" :src="alreadyImg"></image>
+
+		</view>
+		<view class="save_btn" @click="saveFun()">保存</view>
+	</view>
+
+</template>
+
+<script>
+	import {
+		config
+	} from '@/api/request/config.js'
+	import {
+		updateSignature
+	} from '@/pages_basics/api/index.js'
+	export default {
+
+		data() {
+			return {
+				baseUrl: config.base_url,
+				signatureData: '',
+				alreadyImg: '',
+
+			}
+		},
+		onLoad(option) {
+			//首次进入获取上个页面传过来的签名
+			this.alreadyImg = this.baseUrl + option.item;
+			console.log(this.alreadyImg)
+		},
+		onShow() {
+			//用户点击上传签名
+			if (uni.getStorageSync('signatureData')) {
+				this.signatureData = uni.getStorageSync('signatureData');
+				uni.removeStorageSync('signatureData');
+			}
+		},
+		methods: {
+			//清除签名
+			async signatureDele() {
+				let _this = this;
+				this.signatureData = '';
+				this.alreadyImg = '';
+			},
+			//保存按钮
+			async saveFun() {
+				let _this = this;
+
+				if (!this.signatureData) {
+
+					uni.showToast({
+						title: '请先选择签名上传并保存查看',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+					return
+				}
+				var arr = this.signatureData.split(',')
+				let obj = {
+					signature: arr[1]
+				}
+				const {
+					data
+				} = await updateSignature(obj);
+				if (data.code == 200) {
+					uni.showToast({
+						title: '上传成功',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+					setTimeout(function() {
+						uni.navigateBack()
+					}, 2000);
+					// uni.switchTab({
+					//      url: '/pages/mine'
+					//  });
+
+				}
+
+			},
+			// 头像上传
+			selectImage() {
+				let self = this;
+				wx.chooseImage({
+					count: 1,
+					sizeType: ["original", "compressed"],
+					sourceType: ["album", "camera"],
+					success: function(res) {
+						console.log("res1", res)
+						let tempFilePaths = res.tempFilePaths[0];
+						self.uploadImg(tempFilePaths);
+					}
+				});
+			},
+			async uploadImg(tempFilePaths) {
+				var self = this;
+				uni.showLoading({
+					title: '上传中',
+					mask: true
+				});
+				uni.uploadFile({
+					url: config.base_url + '/system/file/upload', //仅为示例,非真实的接口地址
+					header: {
+						'Authorization': uni.getStorageSync('token')
+					},
+					filePath: tempFilePaths,
+					name: 'file',
+					formData: {
+						'user': 'test'
+					},
+					success: (uploadFileRes) => {
+						let res = JSON.parse(uploadFileRes.data);
+						if (res.code == 200) {
+							uni.navigateTo({
+								url: '/pages_basics/views/signature/signatureImg?src=' + config
+									.base_url + res.data.url, //电子签名-图片处理
+							});
+						} else {
+							uni.showToast({
+								title: res.msg,
+								icon: "none",
+								mask: true,
+								duration: 2000
+							});
+						}
+					},
+					fail: err => {},
+					complete: () => {
+						uni.hideLoading()
+					}
+				});
+			},
+		},
+	}
+</script>
+
+<style lang="stylus" scoped>
+	#signature {
+		width: 710rpx;
+		height: auto;
+		background: #FFFFFF;
+		border-radius: 20rpx;
+		margin: 20rpx 20rpx 0;
+		padding: 28rpx 20rpx 94rpx;
+		box-sizing: border-box;
+
+		.tip {
+			width: 100%;
+			font-size: 24rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+			line-height: 24rpx;
+			margin: 24rpx 0 42rpx 0;
+			text-align: center;
+		}
+
+		.signature_li {
+			.signature_li_t {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #333333;
+				line-height: 28rpx;
+
+			}
+
+			.signature_li_b {
+				position: relative;
+				margin-top: 28rpx;
+				width: 668rpx;
+				height: 250rpx;
+				background: #FFFFFF;
+				border: 1px solid #E0E0E0;
+				border-radius: 10rpx;
+				text-align: center;
+
+				>img {
+					display: inline-block;
+					width: 192rpx;
+					height: 60rpx;
+					margin-top: 90rpx;
+				}
+
+				.signature_li_b_c {
+					font-size: 26rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #0183FA;
+					line-height: 250rpx;
+					cursor: pointer;
+					position: relative;
+					z-index: 200;
+				}
+
+				.signature_li_img2 {
+					position: absolute;
+					left: 0;
+					top: 0;
+					z-index: 100;
+					width: 668rpx;
+					height: 250rpx;
+					margin: 0;
+				}
+
+			}
+
+			.signature_li_img {
+				margin-top: 28rpx;
+				width: 668rpx;
+				height: 250rpx;
+				background: #FFFFFF;
+				border: 1px solid #E0E0E0;
+				border-radius: 10rpx;
+				text-align: center;
+			}
+
+			.upload_tip {
+				width: 100%;
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 24rpx;
+				margin: 24rpx 0 42rpx 0;
+				text-align: center;
+			}
+
+			.clear_signature {
+				height: 30rpx;
+				margin: 20rpx 0;
+				display: flex;
+				justify-content: flex-end;
+
+				.clear_signature_img {
+					width: 30rpx;
+					height: 30rpx;
+					margin-right: 10rpx;
+				}
+
+				>text {
+					font-size: 26rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #A2A2A2;
+					line-height: 30rpx;
+				}
+			}
+		}
+
+		/* 保存按钮*/
+		.save_btn {
+			width: 650rpx;
+			height: 100rpx;
+			background: #0183FA;
+			border-radius: 20px;
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #FFFFFF;
+			line-height: 100rpx;
+			text-align: center;
+			margin-top: 44rpx;
+		}
+	}
+</style>

+ 140 - 0
pages_basics/views/signature/signatureImg.vue

@@ -0,0 +1,140 @@
+<!-- 电子签名图片 -->
+<template>
+	<view class="avatar-page">
+		<view style="height:100%;width:100%;" v-if="src&&src!='null'">
+			<image-cropper
+				id="image-cropper"
+				:zoom="1"
+				:angle="0"
+				:src="src"
+				cutWidth='688rpx'
+				cutHeight='250rpx'
+				canvasBackground="red"
+				@cropped="cropped"
+				@afterDraw="afterDraw"
+				@beforeDraw="beforeDraw"/>
+		</view>
+		<view class="left-button" @click="backButton">取消</view>
+		<view class="right-button" @click="upImg">确定</view>
+	</view>
+</template>
+
+<script>
+    import { config } from '@/api/request/config.js'
+    import { querygenSign} from '@/pages_basics/api/index.js'
+	import ImageCropper from '@/pages_basics/component/cropper.vue'
+	export default {
+		components: {
+			ImageCropper
+		},
+		data() {
+			return {
+				src:"",
+				srcData:"",
+				signatureData:'',
+			}
+		},
+		onLoad(option){
+			this.src = option.src;
+		},
+		onShow(){
+
+		},
+		methods:{
+			/************************************************修改头像************************************************/
+
+			beforeDraw(context, transform) {
+				context.setFillStyle('yellow')
+				transform.zoom = 2
+			},
+			afterDraw(ctx, info) {
+				ctx.fillText('', 20, 20)
+			},
+			async cropped(imagePath, imageInfo) {
+				this.srcData = imagePath;
+				//小程序电子签名抠图生成图片
+				uni.uploadFile({
+				    url: config.base_url+'/system/user/genSign', //仅为示例,非真实的接口地址
+				    header:{'Authorization':uni.getStorageSync('token')},
+				    filePath: imagePath,
+				    name: 'file',
+				    formData: {
+				        'user': 'test'
+				    },
+				    success: (response) => {
+						let data=JSON.parse(response.data)
+						if(data.code == 200){
+							let text = data.data.replace(/[\r\n]/g,"");
+							this.signatureData = 'data:image/png;base64,'+ text;
+
+						} else {
+							uni.showToast({
+								title: response.msg,
+								icon:"none",
+								mask:true,
+								duration: 2000
+							});
+						}
+
+				    },
+				    fail: err => {},
+				    complete: () => {
+				        uni.hideLoading()
+				    }
+				});
+
+			},
+
+			/************************************************************************************************/
+			upImg(){
+				let self = this;
+			    uni.setStorageSync('signatureData',this.signatureData)
+				setTimeout(function(){
+				    uni.navigateBack();
+				},200);
+
+
+			},
+			backButton(){
+				uni.navigateBack();
+			},
+
+
+		}
+	}
+</script>
+
+<style lang="stylus" scoped>
+	.avatar-page{
+		height:100%;
+		width:100%
+		.left-button{
+			background #E0E0E0;
+			color:#333;
+			text-align center;
+			font-size:26rpx;
+			width:140rpx;
+			height:60rpx;
+			line-height:60rpx;
+			position fixed;
+			left:40rpx;
+			bottom:40rpx;
+			z-index:100;
+			border-radius:10rpx;
+		}
+		.right-button{
+			background #007AFF;
+			color:#fff;
+			text-align center;
+			font-size:26rpx;
+			width:140rpx;
+			height:60rpx;
+			line-height:60rpx;
+			position fixed;
+			right:40rpx;
+			bottom:40rpx;
+			z-index:100;
+			border-radius:10rpx;
+		}
+	}
+</style>

+ 26 - 24
pages_safetyExamine/views/examineManage/examineAdd.vue

@@ -265,20 +265,22 @@
 			//通过微信扫一扫进入
 			if (option.q) {
 				console.log('外部扫一扫')
+
 				let text = decodeURIComponent(option.q)
-				let codeId = "";
-				let newList = text.split("?")[1].split("&")
-				let list = newList[0].split("=")[1].split("-")
-				codeId = list[0];
+				let list = text.split("?")[1].split("&");
+				let codeData = {};
+				list.forEach((item) => {
+					codeData[item.split("=")[0]] = item.split("=")[1];
+				})
 				uni.showToast({
-					title: codeId,
+					title: codeData.subId,
 					icon: "none",
 					mask: true,
 					duration: 2000
 				});
-				this.form.subIds = codeId
-				this.getCheckPlanBySubId(codeId)
-				this.getByIdLaboratoryList();
+				this.form.subIds = codeData.subId
+				this.getCheckPlanBySubId(codeData.subId)
+				this.getByIdLaboratoryList(codeData.code);
 			}
 			if (option.id) {
 				console.log('开始/编辑')
@@ -297,7 +299,7 @@
 				console.log('内部扫一扫')
 				this.form.subIds = option.subId
 				this.getCheckPlanBySubId(option.subId)
-				this.getByIdLaboratoryList();
+				this.getByIdLaboratoryList(option.infoId);
 			}
 
 		},
@@ -739,22 +741,22 @@
 					this.popupType = false;
 				}
 			},
-			//扫一扫进入通过id查询实验室列表
-			async getByIdLaboratoryList() {
+			//扫一扫进入通过id查询实验室
+			async getByIdLaboratoryList(infoId) {
 				let self = this;
 				const {
 					data
-				} = await subjectFindSubjectInfo({
-					subIds: this.form.subIds
+				} = await laboratoryAppletGetSubDetailInfo({
+					infoId: infoId
 				});
 				if (data.code == 200) {
 					if (data.data) {
-						self.form.subjectName = data.data.subjectName;
+						self.form.subjectName = data.data.subName;
 						self.form.deptId = data.data.deptId;
-						self.form.collegeName = data.data.collegeName;
+						self.form.collegeName = data.data.deptName;
 						self.form.buildId = data.data.buildId;
 						self.form.buildName = data.data.buildName;
-						self.form.roomNumber = data.data.roomNumber;
+						self.form.roomNumber = data.data.roomNum;
 					}
 				}
 			},
@@ -862,15 +864,15 @@
 					infoId: infoId
 				});
 				if (data.code == 200) {
-				
-					this.$set(this.form, "subIds",  data.data.subId)
-					this.$set(this.form, "subjectName",  data.data.subName)
-					this.$set(this.form, "deptId",  data.data.deptId)
+
+					this.$set(this.form, "subIds", data.data.subId)
+					this.$set(this.form, "subjectName", data.data.subName)
+					this.$set(this.form, "deptId", data.data.deptId)
 					this.$set(this.form, "deptName", data.data.deptName)
 					this.$set(this.form, "collegeName", data.data.deptName)
-					this.$set(this.form, "buildId",  data.data.buildId)
-					this.$set(this.form, "buildName",  data.data.buildName)
-					this.$set(this.form, "roomNumber",  data.data.roomNum)
+					this.$set(this.form, "buildId", data.data.buildId)
+					this.$set(this.form, "buildName", data.data.buildName)
+					this.$set(this.form, "roomNumber", data.data.roomNum)
 					this.$set(this.form, 'title', '');
 					this.$set(this.form, 'id', '');
 					this.$set(this.form, 'checkType', 2);
@@ -890,7 +892,7 @@
 						hazardDescribe: '', //隐患描述
 						uploadDtoList: [], //隐患照片
 					}]);
-					this.getCheckPlanBySubId( data.data.subId)
+					this.getCheckPlanBySubId(data.data.subId)
 				}
 			},
 			//附件查看

+ 7 - 7
pages_safetyExamine/views/safetyExamineWorkbench.vue

@@ -254,7 +254,7 @@
 		checkHazardAppList,
 		checkClapList,
 		getCheckPlanBySubId
-		
+
 	} from '@/pages_safetyExamine/api/index.js'
 	export default {
 		name: "rectifyList",
@@ -376,7 +376,7 @@
 
 		},
 		mounted() {
-	
+
 			if (uni.getStorageSync('gentleIdentifier')[0]) {
 				this.pageType = uni.getStorageSync('gentleIdentifier')[0].pageType
 			}
@@ -386,7 +386,7 @@
 			this.collegeGentle = uni.getStorageSync('gentleIdentifierData').collegeGentle
 			//获取当前日期
 			this.currentDate = this.getNowFormatDate()
-			
+
 			this.dataStatistics(this.pageType);
 			this.checkClapListAllNum(); //随手拍待整改总数
 			if (this.pageType == 1) { //管理员
@@ -459,7 +459,7 @@
 				this.curTab=0;
 				this.curTabTow=0;
 				this.curTabThree=0;
-				
+
 				if (this.pageType == 1) { //管理员
 					this.getList();
 					this.checkPlanListAllNum(); //管理员-未开始
@@ -622,7 +622,7 @@
 							}else{
 								uni.setStorageSync('saoCodeId', codeData.subId);
 								if (self.pageType == 1 || self.pageType == 2) { //管理员和检查者
-									self.getCheckPlanBySubId(codeData.subId)
+									self.getCheckPlanBySubId(codeData.subId,codeData.code)
 								} else if (self.pageType == 3) { //整改者
 									let obj = {
 										page: 1,
@@ -644,7 +644,7 @@
 				});
 			},
 			//根据实验室id查询该实验室有关计划
-			async getCheckPlanBySubId(subId) {
+			async getCheckPlanBySubId(subId,infoId) {
 				let _this = this;
 				let id = subId;
 				const {
@@ -655,7 +655,7 @@
 				if (data.code == 200) {
 					if (data.data) {
 						uni.navigateTo({
-							url: '/pages_safetyExamine/views/examineManage/examineAdd?subId=' + id
+							url: '/pages_safetyExamine/views/examineManage/examineAdd?subId=' + id+'&infoId='+infoId
 						});
 					} else {
 						uni.redirectTo({