dedsudiyu 12 часов назад
Родитель
Сommit
1855a90182

+ 13 - 0
pages.json

@@ -1180,6 +1180,19 @@
 					}
 				}
 			]
+		},
+		{
+			/* 设备使用 */
+			"root": "pages_equipmentUtilization", //分包根路径
+			"name": "equipmentUtilization", //分包名字可写可不写
+			"pages": [
+				{
+					"path": "views/equipmentInformation/index",
+					"style": {
+						"navigationBarTitleText": "设备使用系统"
+					}
+				}
+			]
 		}
 
 	],

+ 17 - 0
pages_equipmentUtilization/api/index.js

@@ -0,0 +1,17 @@
+import { apiResquest,apiResquestForm,apiResquestJsonList,apiResquestFormVideo,apiResquestTimer } from '@/api/request/request.js'
+
+export const demo1 = (data) => {
+	return apiResquest({
+		url: `/system/dept/dropList`,
+		method: 'POST',
+		data: { ...data }
+	})
+};
+
+export const demo2 = (data) => {
+	return apiResquest({
+		url: `/laboratory/applet/getSubDetailInfo`,
+		method: 'GET',
+		data: data,
+	})
+};

+ 77 - 0
pages_equipmentUtilization/views/equipmentInformation/index.vue

@@ -0,0 +1,77 @@
+<template>
+	<view id="equipmentInformation">
+		<view class="top-table-button-box">
+			<view :class="checkType == 1?'checkButton':''" @click="checkButton(1)">设备信息</view>
+			<view :class="checkType == 2?'checkButton':''" @click="checkButton(2)">使用记录</view>
+		</view>
+		<view class="bottom-flex">
+			<infoPage v-if="checkType == 1"></infoPage>
+			<listPage v-if="checkType == 2"></listPage>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		demo1,
+	} from '@/pages_equipmentUtilization/api/index.js'
+	import {
+		infoPage
+	} from './infoPage.vue'
+	import {
+		listPage
+	} from './listPage.vue'
+	export default {
+		components: {
+			infoPage,
+			listPage
+		},
+		data() {
+			return {
+				checkType:1,
+			}
+		},
+		onLoad(option) {
+		},
+		onShow() {
+			
+		},
+		mounted() {
+		},
+		methods: {
+			checkButton(type){
+				if(this.checkType != type){
+					this.$set(this,'checkType',type);
+				}
+			},
+		},
+	}
+</script>
+
+<style lang="stylus" scoped>
+	#equipmentInformation {
+		height: 100%;
+		flex:1;
+		display:flex;
+		overflow: hidden;
+		flex-direction:column;
+		.top-table-button-box{
+			display: flex;
+			border-bottom: 1rpx solid #0183FA;
+			background-color: #fff;
+			view{
+				font-weigth:700;
+				flex: 1;
+				text-align: center;
+				line-height:80rpx;
+			}
+			.checkButton{
+				color:#0183FA;
+			}
+		}
+		.bottom-flex{
+			flex: 1;
+			overflow: hidden;
+		}
+	}
+</style>

+ 331 - 0
pages_equipmentUtilization/views/equipmentInformation/infoPage.vue

@@ -0,0 +1,331 @@
+<template>
+	<view class="equipmentInformationInfoPage">
+		<view class="info-max-box">
+			<img class="left-img" src="">
+			<view class="right-box">
+				<view>设备分类:</view>
+				<view>设备名称:</view>
+				<view>设备编号:</view>
+				<view>设备状态:</view>
+			</view>
+		</view>
+		<view class="text-max-box">
+			<img src="">
+			<view>类型</view>
+			<view>类型</view>
+		</view>
+		<view class="text-max-box">
+			<img src="">
+			<view>品牌</view>
+			<view>品牌</view>
+		</view>
+		<view class="text-max-box">
+			<img src="">
+			<view>设备原值(元)</view>
+			<view>500,000</view>
+		</view>
+		<view class="text-title-box">参数用途</view>
+		<view class="text-max-box">
+			<img src="">
+			<view>设备用途</view>
+			<view class="colorA" @click="lookText(1)">查看</view>
+		</view>
+		<view class="text-max-box">
+			<img src="">
+			<view>技术参数</view>
+			<view class="colorA" @click="lookText(2)">查看</view>
+		</view>
+		<view class="text-max-box">
+			<img src="">
+			<view>备注</view>
+			<view class="colorA" @click="lookText(3)">查看</view>
+		</view>
+		<view class="text-title-box">设备归属</view>
+		<view class="text-max-box">
+			<img src="">
+			<view>设备管理员</view>
+			<view>设备管理员</view>
+		</view>
+		<view class="text-max-box">
+			<img src="">
+			<view>管理部门</view>
+			<view>管理部门</view>
+		</view>
+		<view class="text-max-box">
+			<img src="">
+			<view>存放位置</view>
+			<view>存放位置</view>
+		</view>
+		<view class="text-title-box">厂家产地</view>
+		<view class="text-max-box">
+			<img src="">
+			<view>单位</view>
+			<view>单位</view>
+		</view>
+		<view class="text-max-box">
+			<img src="">
+			<view>生产厂家</view>
+			<view>生产厂家</view>
+		</view>
+		<view class="text-max-box">
+			<img src="">
+			<view>产地</view>
+			<view>产地</view>
+		</view>
+		<view class="bottom-button" @click="onShade()">登记使用信息</view>
+		<view class="shade-max-big-box" v-if="shadeType == 1||shadeType == 2||shadeType == 3||shadeType == 4">
+			<view class="shade-top-flex" @click="offShade()"></view>
+			<view class="shade-big-box">
+				<view class="shade-title-box" v-if="shadeType == 1||shadeType == 2||shadeType == 3">登记使用信息</view>
+				<view class="shade-title-box" v-if="shadeType == 4">{{shadeDataD.data1}}</view>
+				<view class="shade-box" v-if="shadeType == 1">
+					<view class="shade-text-box">
+						<view>使用人</view>
+						<view>{{shadeDataA.data1}}</view>
+					</view>
+					<view class="shade-text-box">
+						<view>使用类型</view>
+						<view>{{shadeDataA.data2}}</view>
+					</view>
+					<view class="shade-text-box">
+						<view>开机时间</view>
+						<view>{{shadeDataA.data3}}</view>
+					</view>
+					<view class="shade-text-box">
+						<view>关机时间</view>
+						<view>
+							<uni-datetime-picker v-model="single">{{shadeDataA.data4}}</uni-datetime-picker>
+						</view>
+					</view>
+					
+					<view class="shade-text-box">
+						<view>使用总时长</view>
+						<view>{{shadeDataA.data5}}</view>
+					</view>
+					<view class="shade-button">确定</view>
+				</view>
+				<view class="shade-box" v-if="shadeType == 2">
+					<view class="shade-text-box">
+						<view>使用人</view>
+						<view>{{shadeDataB.data1}}</view>
+					</view>
+					<view class="shade-text-box">
+						<view>使用类型</view>
+						<view>{{shadeDataB.data2}}</view>
+					</view>
+					<view class="shade-text-box">
+						<view>开机时间</view>
+						<view>{{shadeDataB.data3}}</view>
+					</view>
+					<view class="shade-text-box">
+						<view>关机时间</view>
+						<view>{{shadeDataB.data4}}</view>
+					</view>
+					<view class="shade-text-box">
+						<view>使用总时长</view>
+						<view>{{shadeDataB.data5}}</view>
+					</view>
+					<view class="shade-button">确定</view>
+				</view>
+				<view class="shade-box-c" v-if="shadeType == 3">
+					<view class="shade-text-title">当前设备已被【{{shadeDataC.data1}}】登记使用,</view>
+					<view class="shade-text-title">开机时间:{{shadeDataC.data2}}</view>
+					<view class="shade-text-title">如有疑问请联系:{{shadeDataC.data3}}</view>
+				</view>
+				<view class="shade-box" v-if="shadeType == 4">
+					<view class="text-box">
+						{{shadeDataD.data2}}
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		demo1,
+	} from '@/pages_equipmentUtilization/api/index.js'
+	export default {
+		data() {
+			return {
+				shadeType:1,
+				shadeDataA:{
+					data1:'张工',
+					data2:'自用',
+					data3:'2026-01-25 15:30',
+					data4:'2026-01-25 15:30',
+					data5:'3天2小时15分',
+				},
+				shadeDataB:{
+					data1:'张工',
+					data2:'自用',
+					data3:'2026-01-25 15:30',
+					data4:'2026-01-25 15:30',
+					data5:'3天2小时15分',
+				},
+				shadeDataC:{
+					data1:'张工',
+					data2:'2026-01-25 15:30',
+					data3:'010-88888888',
+				},
+				shadeDataD:{
+					data1:'张工',
+					data2:'2026-01-25 15:30',
+				},
+			}
+		},
+		onLoad(option) {
+			
+		},
+		onShow() {
+			
+		},
+		mounted() {
+		},
+		methods: {
+			lookText(type){
+				if(type == 1){
+					this.$set(this,'shadeDataD',{
+						data1:'设备用途',
+						data2:'设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途',
+					});
+				}else if(type == 2){
+					this.$set(this,'shadeDataD',{
+						data1:'技术参数',
+						data2:'技术参数技术参数技术参数技术参数技术参数技术参数技术参数技术参数技术参数技术参数技术参数技术参数技术参数技术参数技术参数技术参数',
+					});
+				}else if(type == 3){
+					this.$set(this,'shadeDataD',{
+						data1:'备注',
+						data2:'备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注',
+					});
+				}
+				this.$set(this,'shadeType',4);
+			},
+			onShade(){
+				//判断 登记时1 退订2 已占用3
+				this.$set(this,'shadeType',3);
+			},
+			offShade(){
+				this.$set(this,'shadeType',0);
+			},
+		},
+	}
+</script>
+
+<style lang="stylus" scoped>
+	.equipmentInformationInfoPage {
+		height: 100%;
+		flex:1;
+		display:flex;
+		flex-direction:column;
+		background-color: #fff;
+		overflow: scroll;
+		.info-max-box{
+			display: flex;
+			.left-img{
+				width:200rpx;
+				height:200rpx;
+				display: inline-block;
+			}
+			.right-box{
+				flex:1;
+			}
+		}
+		.text-max-box{
+			display: flex;
+			border-bottom: 1rpx solid #f2f2f2;
+			line-height:80rpx;
+			padding: 0 40rpx;
+			img{
+				width:40rpx;
+				height:40rpx;
+				display: inline-block;
+			}
+			view:nth-child(2){
+				flex:1;
+			}
+			view:nth-child(3){
+				
+			}
+			.colorA{
+				color:#0183FA;
+			}
+		}
+		.text-title-box{
+			line-height:80rpx;
+			background-color: #f2f2f2;
+			padding: 0 30rpx;
+		}
+		.bottom-button{
+			width:300rpx;
+			line-height:80rpx;
+			text-align: center;
+			margin:60rpx auto;
+			color:#fff;
+			background-color: #0183FA;
+			border-radius:6rpx;
+		}
+		.shade-max-big-box{
+			position: absolute;
+			top:0;
+			left:0;
+			width:100%;
+			height:100%;
+			background-color: rgba(0,0,0,0.3)
+			display: flex;
+			flex-direction: column;
+			.shade-top-flex{
+				flex:1;
+			}
+			.shade-big-box{
+				background-color: #fff;
+				.shade-title-box{
+					font-weight:900;
+					padding-right:20rpx;
+					width:300rpx;
+					border-bottom-right-radius: 40rpx
+					background-color: #0183FA;
+					color:#fff;
+					text-align: center;
+					line-height:60rpx;
+				}
+				.shade-box{
+					padding:20rpx 0 100rpx;
+					.shade-text-box{
+						display: flex;
+						border-bottom:1rpx solid #f2f2f2;
+						line-height:80rpx;
+						padding:0 30rpx;
+						view:nth-child(1){
+							flex:1;
+						}
+						view:nth-child(1){
+							flex:3;
+						}
+					}
+					.shade-button{
+						width:300rpx;
+						line-height:80rpx;
+						text-align: center;
+						background-color: #0183FA;
+						border-radius:8rpx;
+						color:#fff;
+						margin:40rpx auto 0;
+					}
+					.text-box{
+						padding:60rpx 40rpx 200rpx;
+					}
+				}
+				.shade-box-c{
+					padding:120rpx 0 200rpx;
+					.shade-text-title{
+						text-align-last: center;
+						line-height: 60rpx;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 39 - 0
pages_equipmentUtilization/views/equipmentInformation/listPage.vue

@@ -0,0 +1,39 @@
+<template>
+	<view id="equipmentInformationListPage">
+		2
+	</view>
+</template>
+
+<script>
+	import {
+		demo1,
+	} from '@/pages_equipmentUtilization/api/index.js'
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		onLoad(option) {
+			
+		},
+		onShow() {
+			
+		},
+		mounted() {
+		},
+		methods: {
+			
+		},
+	}
+</script>
+
+<style lang="stylus" scoped>
+	#equipmentInformationListPage {
+		height: 100%;
+		flex:1;
+		display:flex;
+		flex-direction:column;
+		overflow-y: scroll;
+	}
+</style>