李天标 4 rokov pred
rodič
commit
02e4c252a1

+ 11 - 0
.hbuilderx/launch.json

@@ -0,0 +1,11 @@
+{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+  // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+    "version": "0.0",
+    "configurations": [{
+            "type": "uniCloud",
+            "default": {
+                "launchtype": "remote"
+            }
+        }
+    ]
+}

+ 9 - 0
cleanMachineUniApp.iml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 1 - 1
common/lang/zh.js

@@ -57,7 +57,7 @@ export default {
 	equipmentStatusList:{
 		door:'一键清洗',
 		open:'清洗',
-		opensuccess:'开门成功',
+		opensuccess:'清洗成功',
 		title:'机器状态',
 		red:'红色代表机器报警',
 		green:'绿色代表机器正常',

+ 4 - 2
configs/env.js

@@ -9,7 +9,8 @@ let configs = {
 if (process.env.NODE_ENV === 'development') {
 	// 测试环境
 	configs = Object.assign(configs, {
-		baseUrl: 'https://app.sunzee.com.cn:9443/cleanMachineServer',
+		baseUrl: 'https://clean.sunzee.com.cn/cleanMachineServer',
+		// baseUrl: 'https://app.sunzee.com.cn:9443/cleanMachineServer',
 		// baseUrl: 'http://127.0.0.1:8090',
 	});
 }
@@ -19,7 +20,8 @@ if (process.env.NODE_ENV === 'production') {
 	configs = Object.assign(configs, {
 		// baseUrl: 'https://app.sunzee.com.cn/cleanMachineServer',
 		// baseUrl: 'http://app.sunzee.com.cn:8090/cleanMachineServer',
-		baseUrl: 'https://app.sunzee.com.cn:9443/cleanMachineServer',
+		// baseUrl: 'https://app.sunzee.com.cn:9443/cleanMachineServer',
+		baseUrl: 'https://clean.sunzee.com.cn/cleanMachineServer',
 		// isProduction: true,
 	});
 }

+ 2 - 1
main.js

@@ -23,7 +23,8 @@ const i18n = new VueI18n({
 App.mpType = 'app'
 
 // Vue.prototype.serverurl="http://127.0.0.1:8090";
-Vue.prototype.serverurl="https://app.sunzee.com.cn:9443/cleanMachineServer";
+// Vue.prototype.serverurl="https://app.sunzee.com.cn:9443/cleanMachineServer";
+Vue.prototype.serverurl= 'https://clean.sunzee.com.cn/cleanMachineServer',
 Vue.prototype.$store = store;
 Vue.prototype._i18n = i18n;
 const app = new Vue({

+ 1 - 1
manifest.json

@@ -93,7 +93,7 @@
     "mp-weixin" : {
         "appid" : "wxfffa94218fe6667b",
         "setting" : {
-            "urlCheck" : true,
+            "urlCheck" : false,
             "es6" : true,
             "postcss" : true,
             "minified" : false

+ 2 - 2
pages/User/equipmentName.vue

@@ -6,7 +6,7 @@
 		<view v-for="(list,index) in listName" :key="index" class="body">
 			<view class="input-two">
 				<input :id=list.id type="text" class="input" @focus="setStyle()" @blur="setStyle2()" :value=list.name @input="getValue" />
-				<p id="p2" class="p2" :style="{display:showOrNo}">如:粤A张先生1</p>
+				<p id="p2" class="p2" :style="{display:showOrNo}">如:1楼男1</p>
 			</view>
 			<view class="button2">
 				<button type="primary" @click="updata1()" class="button">
@@ -244,7 +244,7 @@
 	.p2 {
 		color: #DD524D;
 		display: none;
-		width: 600upx;
+		width: 500upx;
 		height: 50upx;
 		border: 1px;
 	}

+ 138 - 0
packageA/pages/user/qiandao.vue

@@ -0,0 +1,138 @@
+<template>
+	<view class="body">
+		<view class="">
+			
+		</view>
+		<view class="bntton" >
+			<button type="primary" @click="look()" class="">
+				<p class="xiugai3">扫码签到</p>
+			</button>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		components: {
+
+		},
+		data() {
+			return {
+				level: 3,
+			};
+		},
+		onPullDownRefresh() {
+			
+		},
+		onShow() {
+			var globalUser = uni.getStorageSync("globalUser");
+			this.level = uni.getStorageSync("level");
+			var gid = globalUser.id;
+			if (gid != 1) {
+				this.gid = true;
+			}
+			var token = uni.getStorageSync("token");
+			if (token.length > 1) {
+				var name = uni.getStorageSync("name");
+				this.name = name;
+				var listName = uni.getStorageSync("listName");
+				this.listName = listName;
+			} else {
+				uni.reLaunch({
+					url: '../Login/Login',
+				});
+			}
+			var newparm = uni.getStorageSync("newparm");
+			if (newparm.toString().length > 1) {
+				if (newparm.avatarUrl.length > 1) {
+					
+				}
+			}
+	
+		},
+		onLoad() {
+	
+		},
+		methods: {
+			look() {
+				var that = this;
+				var serverUrl = that.serverurl;
+				uni.scanCode({
+					success(res) {
+						var code = res.result;
+						var newparm = uni.getStorageSync("newparm");
+						if (newparm.toString().length > 1) {
+							if (newparm.openId.length > 1) {
+								if(code!=null||code!=''){
+									// var that = this;
+									// var serverUrl = that.serverurl;
+									var token = uni.getStorageSync("token");
+									var openId = newparm.openId;
+									uni.request({
+										url: serverUrl + "/TSign/sign?code=" + code+"&openId="+openId,
+										method: "GET",
+										header: {
+											'token': token
+										},
+										success: (Result) => {
+											// console.log(Result);
+											var res = Result;
+											if (res.data.code == true) {
+												uni.showModal({
+													title: '提示',
+													content: "签到成功!",
+												});
+											} else {
+												uni.showModal({
+													title: '提示',
+													content: res.data.message,
+												});
+											}
+										}
+									});
+								}
+							}
+						}else{
+							uni.showModal({
+								title: '提示',
+								content: "微信登录才能打卡",
+							});
+						}
+						
+					}
+				});
+			},
+			
+			
+		}
+	}
+</script>
+
+<style>
+/* 	page{
+		background:#1F1635;
+		width: 750upx;
+		background-color: #000000;
+		overflow-x: hidden;
+	} */
+	.body{
+		background:#1F1635;
+		width: 750upx;
+		height: 1500upx;
+	}
+	.xiugai3 {
+		height: 80upx;
+		font-family: "PingFang-SC-Bold";
+		font-weight: bold;
+		margin: auto;
+		font-size: 40upx;
+		color: #363D44;
+	}
+	.bntton{
+		position: absolute;
+		bottom: 0;
+		left: 50%;
+		transform: translate(-50%, 0%);
+		padding-bottom: 40upx;
+	}
+</style>

+ 421 - 0
packageA/pages/user/sign.vue

@@ -0,0 +1,421 @@
+<template>
+	<view>
+
+		<uni-section title="纵向排列" type="line"></uni-section>
+		<view class="" style="padding-top: 5upx;padding-bottom: 10upx;">
+			<view class="" style="width: 60%;">
+				<view class="tr">
+					<view class="td-left">
+						员工:
+					</view>
+					<view class="td-right">
+						<!-- <select class="option" name="weixinName1" id="" v-model="weixinId1" @change='changeWeixin1'>
+							<option value="0">--全部--</option>
+							<option :value="weixin.id" v-for='weixin in weixinList' :key="weixin.id">{{ weixin.workName }} </option>
+						</select> -->
+						<picker class="option2" @change="changeWeixin" :value="index" :range="weixinList">
+							<view class="wenzi">{{weixinList[index]}}</view>
+						</picker>
+					</view>
+				</view>
+				<view class="tr">
+					<view class="td-left">
+						厕所:
+					</view>
+					<view class="td-right">
+						<picker class="option2" @change="changeEquipment" :value="index2" :range="equipmentList">
+							<view class="uni-input">{{equipmentList[index2]}}</view>
+						</picker>
+					</view>
+				</view>
+				<view class="tr">
+					<view class="td-left">
+						开始时间:
+					</view>
+					<view class="td-right">
+						<picker class="option2" mode="date" :value="date1" :start="startDate" :end="endDate" @change="bindDateChange1">
+							<view class="uni-input">{{date1}}</view>
+						</picker>
+					</view>
+				</view>
+				<view class="tr">
+					<view class="td-left">
+						结束时间:
+					</view>
+					<view class="td-right">
+						<picker class="option2" mode="date" :value="date2" :start="startDate" :end="endDate" @change="bindDateChange2">
+							<view class="uni-input">{{date2}}</view>
+						</picker>
+					</view>
+				</view>
+			</view>
+
+		</view>
+		<view class="example-body">
+			<uni-steps :options="list2" active-color="#007AFF" :active="active" direction="column" />
+		</view>
+		<!-- <view class="word-btn" hover-class="word-btn--hover" :hover-start-time="20" :hover-stay-time="70" @click="change"><text class="word-btn-white">改变状态</text></view> -->
+
+	</view>
+</template>
+
+<script>
+	import uniSteps from '../../resource/uni-steps/uni-steps.vue'
+	import uniSection from '../../resource/uni-section/uni-section.vue'
+	export default {
+		components: {
+			uniSection,
+			uniSteps
+		},
+		data() {
+			const currentDate = this.getDate({
+				format: true
+			})
+			return {
+				index: 0,
+				index2: 0,
+				date1: currentDate,
+				date2: currentDate,
+				weixins: [],
+				weixinList: [],
+				equipments: [],
+				equipmentList: [],
+				weixinId1: null,
+				equipmentId1: null,
+				active: 0,
+				list2: [],
+				level: 3
+			}
+		},
+		computed: {
+			startDate() {
+				return this.getDate('start');
+			},
+			endDate() {
+				return this.getDate('end');
+			}
+		},
+		onShow() {
+			this.globalUser = uni.getStorageSync("globalUser");
+			var token = uni.getStorageSync("token");
+			this.level = uni.getStorageSync("level");
+			if (token.length > 1) {
+				this.worker();
+				this.equipmentes();
+				if (token.length > 2) {
+					this.change();
+				}
+			} else {
+				uni.reLaunch({
+					url: '../Login/Login',
+				});
+			}
+		},
+		methods: {
+			change() {
+				var that = this;
+				var serverUrl = that.serverurl;
+				var token = uni.getStorageSync("token");
+				if (that.index == 0) {
+					var work = 0;
+				} else {
+					var weixins = that.weixins;
+					var index = that.index;
+					for (var j = 0; j < weixins.length; j++) {
+						if (j == index) {
+							var work = weixins[j].workName;
+						}
+					}
+				}
+				if (that.index2 == 0) {
+					var clientId = 0;
+				} else {
+					var clientId = that.equipments[that.index2].clientId;
+				}
+				var newparm = uni.getStorageSync("newparm");
+				var openId = newparm.openId;
+				var startDate = that.date1 + " 00:00:00";
+				var endDate = that.date2 + " 23:59:59";
+				var a = new Date(startDate);
+				var b = new Date(endDate);
+				if (a > b) {
+					var temp = startDate;
+					endDate = startDate;
+					startDate = temp;
+
+				}
+				uni.request({
+					url: serverUrl + "/TSign/getSignList",
+					method: "GET",
+					header: {
+						'token': token
+					},
+					data: {
+						"openId": openId,
+						"workName": work,
+						"clientId": clientId,
+						"startDate": startDate,
+						"endDate": endDate
+					},
+					success: (Result) => {
+						var res = Result;
+						if (res.data.code == true) {
+							this.list2 = res.data.data;
+						} else {
+							uni.showModal({
+								title: '提示',
+								content: res.data.message,
+							});
+							this.list2 = [];
+						}
+					}
+				});
+			},
+			equipmentes() {
+				var equipments = uni.getStorageSync("listName");
+				this.equipments = equipments;
+				var equipmentList = [];
+				if (this.level < 2) {
+					equipmentList.push("全部");
+				}
+				for (var i = 0; i < equipments.length; i++) {
+					equipmentList.push(equipments[i].name);
+				}
+				this.equipmentList = equipmentList;
+			},
+			changeWeixin: function(e) {
+				this.index = e.target.value;
+				this.change();
+			},
+			changeEquipment: function(e) {
+				this.index2 = e.target.value;
+				this.change();
+
+			},
+			worker() {
+				var newparm = uni.getStorageSync("newparm");
+				if (newparm.toString().length > 1) {
+					if (newparm.openId.length > 1) {
+						var that = this;
+						var serverUrl = that.serverurl;
+						var token = uni.getStorageSync("token");
+						var openId = newparm.openId;
+						uni.request({
+							url: serverUrl + "/TWeixin/getWeixinList?openId=" + openId,
+							method: "GET",
+							header: {
+								'token': token
+							},
+							success: (Result) => {
+								var res = Result;
+								if (res.data.code == true) {
+									var list = res.data.data;
+									this.weixins = list;
+									var weixinList = [];
+									if (this.level < 2) {
+										weixinList.push("全部");
+									}
+									for (var i = 0; i < list.length; i++) {
+										weixinList.push(list[i].workName);
+									}
+									this.weixinList = weixinList;
+								} else {
+									uni.showModal({
+										title: '提示',
+										content: res.data.message,
+									});
+								}
+							}
+						});
+					}
+				}
+			},
+			bindDateChange1: function(e) {
+				this.date1 = e.target.value;
+				this.change();
+			},
+			bindDateChange2: function(e) {
+				this.date2 = e.target.value;
+				this.change();
+			},
+			getDate(type) {
+				const date = new Date();
+				let year = date.getFullYear();
+				let month = date.getMonth() + 1;
+				let day = date.getDate();
+
+				if (type === 'start') {
+					year = year - 60;
+				} else if (type === 'end') {
+					year = year + 2;
+				}
+				month = month > 9 ? month : '0' + month;;
+				day = day > 9 ? day : '0' + day;
+				return `${year}-${month}-${day}`;
+			}
+		}
+	}
+</script>
+
+<style>
+	/* 头条小程序组件内不能引入字体 */
+	/* #ifdef MP-TOUTIAO */
+	@font-face {
+		font-family: uniicons;
+		font-weight: normal;
+		font-style: normal;
+		src: url('~@/static/uni.ttf') format('truetype');
+	}
+
+	/* #endif */
+
+	/* #ifndef APP-NVUE */
+	page {
+		display: flex;
+		flex-direction: column;
+		box-sizing: border-box;
+		background-color: #efeff4;
+		min-height: 100%;
+		height: auto;
+	}
+
+	view {
+		font-size: 28rpx;
+		line-height: inherit;
+	}
+
+	.example {
+		padding: 0 30rpx 30rpx;
+	}
+
+	.example-info {
+		padding: 30rpx;
+		color: #3b4144;
+		background: #ffffff;
+	}
+
+	.example-body {
+		flex-direction: row;
+		flex-wrap: wrap;
+		justify-content: center;
+		padding: 0;
+		font-size: 14rpx;
+		background-color: #ffffff;
+	}
+
+	/* #endif */
+	.example {
+		padding: 0 30rpx;
+	}
+
+	.example-info {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		padding: 30rpx;
+		color: #3b4144;
+		background-color: #ffffff;
+		font-size: 30rpx;
+	}
+
+	.example-info-text {
+		font-size: 28rpx;
+		line-height: 36rpx;
+	}
+
+
+	.example-body {
+		flex-direction: column;
+		padding: 30rpx;
+		background-color: #ffffff;
+	}
+
+	.word-btn-white {
+		font-size: 18px;
+		color: #FFFFFF;
+	}
+
+	.word-btn {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		align-items: center;
+		justify-content: center;
+		border-radius: 6px;
+		height: 48px;
+		margin: 15px;
+		background-color: #007AFF;
+	}
+
+	.word-btn--hover {
+		background-color: #4ca2ff;
+	}
+
+
+	.status-btn {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		align-items: center;
+		justify-content: center;
+		height: 92rpx;
+		margin: 30rpx;
+		background-color: #007AFF;
+	}
+
+	.example-body {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		padding: 15px;
+		flex-direction: row;
+	}
+
+	.tr {
+		padding-top: 20upx;
+		display: flex;
+		flex-direction: row;
+		justify-content: flex-start;
+		font-size: 26upx;
+		font-family: "PingFang-SC-Bold";
+	}
+
+	.td-left {
+		font-family: "PingFang-SC-Bold";
+		margin: auto;
+		font-size: 26upx;
+		width: 30%;
+		text-align: right;
+	}
+
+	.td-right {
+		font-family: "PingFang-SC-Bold";
+		/* font-weight: bold; */
+		margin: auto;
+		/* font-size: 26upx; */
+		width: 60%;
+		text-align: left;
+	}
+
+	.option {
+		height: 40upx;
+		border: 1px solid blue;
+	}
+
+	.option2 {
+		border: 1px solid blue;
+	}
+
+	.wenzi {
+		padding: 15rpx 25rpx;
+		line-height: 50rpx;
+		font-size: 28rpx;
+		background: #FFF;
+		-webkit-box-flex: 1;
+		-webkit-flex: 1;
+		flex: 1;
+
+	}
+</style>

+ 126 - 0
packageA/pages/user/worker.vue

@@ -0,0 +1,126 @@
+<template>
+	<view>
+		<form @submit="formSubmit" @reset="formReset">
+			<input type="hidden" style="width: 0;height: 0;display: none;" class="" name="id" :value=id />
+			<view class="tr">
+				<view class="td-left">
+					用户名称:
+				</view>
+				<view class="td-right">
+					<input type="text" class="input" name="workName" :value=workName />
+				</view>
+			</view>
+			<view class="bomtom" >
+				<button type="primary" formType="submit" >
+					<p class="p1">提交</p>
+				</button>
+			</view>
+		</form>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				id: null,
+				workName: null
+			}
+		},
+		onLoad: function(option) {
+			this.id = option.id;
+			this.workName = option.workName;
+			console.log(this.workName);
+		},
+		methods: {
+			formSubmit(event) {
+				var that = this;
+				var weixin = event.detail.value;
+				var serverUrl = that.serverurl;
+				var token = uni.getStorageSync("token");
+				var id = weixin.id;
+				var workName = weixin.workName;
+				if(workName==null||workName==''){
+					return ;
+				}
+				uni.request({
+					url: serverUrl + "/TWeixin/updateWeixin?id=" + id + "&workName=" + workName,
+					method: "POST",
+					header: {
+						'token': token
+					},
+					success: (Result) => {
+						var res = Result;
+						uni.showModal({
+							title: '提示',
+							content: res.data.message,
+						});
+					}
+				});
+			}
+		}
+	}
+</script>
+
+<style>
+	.tr {
+		padding-top: 15upx;
+		display: flex;
+		flex-direction: row;
+		justify-content: flex-start;
+		font-size: 26upx;
+		font-family: "PingFang-SC-Bold";
+	}
+
+	.td-left {
+		font-family: "PingFang-SC-Bold";
+		/* font-weight: bold; */
+		margin: auto;
+		font-size: 40upx;
+		width: 30%;
+		text-align: right;
+	}
+
+	.td-right {
+		font-family: "PingFang-SC-Bold";
+		/* font-weight: bold; */
+		margin: auto;
+		font-size: 40upx;
+		width: 65%;
+		text-align: left;
+	}
+
+	.button {
+		margin: auto;
+		width: 60%;
+		height: 100upx;
+	}
+
+	.input {
+		/* padding: 10upx 20upx 10upx 0upx; */
+		padding-left: 20upx;
+		padding-top: 10upx;
+		background-color: #FFFFFF;
+		width: 450upx;
+		height: 50upx;
+		box-shadow: 0upx 0upx 20upx #D3D3D3;
+		border-radius: 5upx;
+	}
+
+	.p1 {
+		height: 80upx;
+		font-family: "PingFang-SC-Bold";
+		font-weight: bold;
+		margin: auto;
+		font-size: 40upx;
+		color: #363D44;
+	}
+
+	.bomtom {
+		position: absolute;
+		bottom: 0;
+		left: 50%;
+		transform: translate(-50%, 0%);
+		padding-bottom: 40upx;
+	}
+</style>

+ 77 - 0
packageA/pages/user/workerList.vue

@@ -0,0 +1,77 @@
+<template>
+	<view>
+		<view class="titlelist" style="position: relative;" v-for="weixin in weixinList" :key="weixin.id">
+			<uni-list-item :title="weixin.workName" @click="tranByWorkName(weixin.id,weixin.workName)"></uni-list-item>
+		</view>
+	</view>
+</template>
+
+<script>
+	import uniListItem from '@/components/uni-list-item/uni-list-item.vue'
+	export default {
+		components: {
+			uniListItem,
+		},
+		data() {
+			return {
+				weixinList:[]
+			}
+		},
+		onShow() {
+			this.globalUser = uni.getStorageSync("globalUser");
+			var token = uni.getStorageSync("token");
+			this.level = uni.getStorageSync("level");
+			if (token.length > 1) {
+				this.worker();
+			} else {
+				uni.reLaunch({
+					url: '../Login/Login',
+				});
+			}
+		},
+		methods: {
+			worker(){
+				var newparm = uni.getStorageSync("newparm");
+				if (newparm.toString().length > 1) {
+					if (newparm.openId.length > 1) {
+						var that = this;
+						var serverUrl = that.serverurl;
+						var token = uni.getStorageSync("token");
+						var openId = newparm.openId;
+						uni.request({
+							url: serverUrl + "/TWeixin/getWeixinList?openId="+openId,
+							method: "GET",
+							header: {
+								'token': token
+							},
+							success: (Result) => {
+								var res = Result;
+								if (res.data.code == true) {
+									this.weixinList = res.data.data;
+								} else {
+									uni.showModal({
+										title: '提示',
+										content: res.data.message,
+									});
+								}
+							}
+						});
+					}
+				}
+			},
+			tranByWorkName(id,workName){
+				uni.navigateTo({
+				    url: './worker?id='+ id + "&workName= "+workName
+				});
+			}
+		}
+	}
+</script>
+
+<style>
+.titlelist {
+		color: #363D44;
+		font-size: 16upx;
+		font-family: "PingFang-SC-Medium";
+	}
+</style>

+ 96 - 0
packageA/resource/uni-icons/icons.js

@@ -0,0 +1,96 @@
+export default {
+	'contact': '\ue100',
+	'person': '\ue101',
+	'personadd': '\ue102',
+	'contact-filled': '\ue130',
+	'person-filled': '\ue131',
+	'personadd-filled': '\ue132',
+	'phone': '\ue200',
+	'email': '\ue201',
+	'chatbubble': '\ue202',
+	'chatboxes': '\ue203',
+	'phone-filled': '\ue230',
+	'email-filled': '\ue231',
+	'chatbubble-filled': '\ue232',
+	'chatboxes-filled': '\ue233',
+	'weibo': '\ue260',
+	'weixin': '\ue261',
+	'pengyouquan': '\ue262',
+	'chat': '\ue263',
+	'qq': '\ue264',
+	'videocam': '\ue300',
+	'camera': '\ue301',
+	'mic': '\ue302',
+	'location': '\ue303',
+	'mic-filled': '\ue332',
+	'speech': '\ue332',
+	'location-filled': '\ue333',
+	'micoff': '\ue360',
+	'image': '\ue363',
+	'map': '\ue364',
+	'compose': '\ue400',
+	'trash': '\ue401',
+	'upload': '\ue402',
+	'download': '\ue403',
+	'close': '\ue404',
+	'redo': '\ue405',
+	'undo': '\ue406',
+	'refresh': '\ue407',
+	'star': '\ue408',
+	'plus': '\ue409',
+	'minus': '\ue410',
+	'circle': '\ue411',
+	'checkbox': '\ue411',
+	'close-filled': '\ue434',
+	'clear': '\ue434',
+	'refresh-filled': '\ue437',
+	'star-filled': '\ue438',
+	'plus-filled': '\ue439',
+	'minus-filled': '\ue440',
+	'circle-filled': '\ue441',
+	'checkbox-filled': '\ue442',
+	'closeempty': '\ue460',
+	'refreshempty': '\ue461',
+	'reload': '\ue462',
+	'starhalf': '\ue463',
+	'spinner': '\ue464',
+	'spinner-cycle': '\ue465',
+	'search': '\ue466',
+	'plusempty': '\ue468',
+	'forward': '\ue470',
+	'back': '\ue471',
+	'left-nav': '\ue471',
+	'checkmarkempty': '\ue472',
+	'home': '\ue500',
+	'navigate': '\ue501',
+	'gear': '\ue502',
+	'paperplane': '\ue503',
+	'info': '\ue504',
+	'help': '\ue505',
+	'locked': '\ue506',
+	'more': '\ue507',
+	'flag': '\ue508',
+	'home-filled': '\ue530',
+	'gear-filled': '\ue532',
+	'info-filled': '\ue534',
+	'help-filled': '\ue535',
+	'more-filled': '\ue537',
+	'settings': '\ue560',
+	'list': '\ue562',
+	'bars': '\ue563',
+	'loop': '\ue565',
+	'paperclip': '\ue567',
+	'eye': '\ue568',
+	'arrowup': '\ue580',
+	'arrowdown': '\ue581',
+	'arrowleft': '\ue582',
+	'arrowright': '\ue583',
+	'arrowthinup': '\ue584',
+	'arrowthindown': '\ue585',
+	'arrowthinleft': '\ue586',
+	'arrowthinright': '\ue587',
+	'pulldown': '\ue588',
+	'closefill': '\ue589',
+	'sound': '\ue590',
+	'scan': '\ue612'
+}

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 57 - 0
packageA/resource/uni-icons/uni-icons.vue


+ 108 - 0
packageA/resource/uni-section/uni-section.vue

@@ -0,0 +1,108 @@
+<template>
+	<view class="uni-section">
+		<view v-if="type" class="uni-section__head">
+			<view :class="type" class="uni-section__head-tag" />
+		</view>
+		<view class="uni-section__content">
+			<text :class="{'distraction':!subTitle}" class="uni-section__content-title">{{ title }}</text>
+			<text v-if="subTitle" class="uni-section__content-sub">{{ subTitle }}</text>
+		</view>
+		<slot />
+	</view>
+</template>
+
+<script>
+	export default {
+		name: 'UniTitle',
+		props: {
+			type: {
+				type: String,
+				default: ''
+			},
+			title: {
+				type: String,
+				default: ''
+			},
+			subTitle: {
+				type: String,
+				default: ''
+			}
+		},
+		data() {
+			return {}
+		},
+		watch: {
+			title(newVal) {
+				if (uni.report && newVal !== '') {
+					uni.report('title', newVal)
+				}
+			}
+		},
+		methods: {
+			onClick() {
+				this.$emit('click')
+			}
+		}
+	}
+</script>
+<style lang="scss" scoped>
+	.uni-section {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		margin-top: 10px;
+		flex-direction: row;
+		align-items: center;
+		padding: 0 10px;
+		height: 50px;
+		background-color: $uni-bg-color-grey;
+		border-bottom-color: $uni-border-color;
+		border-bottom-style: solid;
+		border-bottom-width: 1px;
+		font-weight: normal;
+	}
+
+	.uni-section__head {
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		margin-right: 10px;
+	}
+
+	.line {
+		height: 15px;
+		background-color: $uni-text-color-disable;
+		border-radius: 5px;
+		width: 3px;
+	}
+
+	.circle {
+		width: 8px;
+		height: 8px;
+		border-top-right-radius: 50px;
+		border-top-left-radius: 50px;
+		border-bottom-left-radius: 50px;
+		border-bottom-right-radius: 50px;
+		background-color: $uni-text-color-disable;
+	}
+
+	.uni-section__content {
+		flex: 1;
+		color: $uni-text-color;
+	}
+
+	.uni-section__content-title {
+		font-size: $uni-font-size-base;
+		color: $uni-text-color;
+	}
+
+	.distraction {
+		flex-direction: row;
+		align-items: center;
+	}
+
+	.uni-section__content-sub {
+		font-size: $uni-font-size-sm;
+		color: $uni-text-color-grey;
+	}
+</style>

+ 243 - 0
packageA/resource/uni-steps/uni-steps.vue

@@ -0,0 +1,243 @@
+<template>
+	<view class="uni-steps">
+		<view :class="[direction==='column'?'uni-steps__column':'uni-steps__row']">
+			<view :class="[direction==='column'?'uni-steps__column-text-container':'uni-steps__row-text-container']">
+				<view v-for="(item,index) in options" :key="index" :class="[direction==='column'?'uni-steps__column-text':'uni-steps__row-text']">
+					<text :style="{color:index<=active?activeColor:deactiveColor}" :class="[direction==='column'?'uni-steps__column-title':'uni-steps__row-title']">{{item.title}}</text>
+					<text :style="{color:index<=active?activeColor:deactiveColor}" :class="[direction==='column'?'uni-steps__column-desc':'uni-steps__row-desc']">{{item.desc}}</text>
+				</view>
+			</view>
+			<view :class="[direction==='column'?'uni-steps__column-container':'uni-steps__row-container']">
+				<view :class="[direction==='column'?'uni-steps__column-line-item':'uni-steps__row-line-item']" v-for="(item,index) in options"
+				 :key="index">
+					<view :class="[direction==='column'?'uni-steps__column-line':'uni-steps__row-line',direction==='column'?'uni-steps__column-line--before':'uni-steps__row-line--before']"
+					 :style="{backgroundColor:index<=active&&index!==0?activeColor:index===0?'transparent':deactiveColor}"></view>
+					<view :class="[direction==='column'?'uni-steps__column-check':'uni-steps__row-check']" v-if="index === active">
+						<uni-icons :color="activeColor" type="checkbox-filled" size="14"></uni-icons>
+					</view>
+					<view :class="[direction==='column'?'uni-steps__column-circle':'uni-steps__row-circle']" v-else :style="{backgroundColor:index<active?activeColor:deactiveColor}"></view>
+					<view :class="[direction==='column'?'uni-steps__column-line':'uni-steps__row-line',direction==='column'?'uni-steps__column-line--after':'uni-steps__row-line--after']"
+					 :style="{backgroundColor:index<active&&index!==options.length-1?activeColor:index===options.length-1?'transparent':deactiveColor}"></view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import uniIcons from '../uni-icons/uni-icons.vue'
+	export default {
+		name: 'UniSteps',
+		components: {
+			uniIcons
+		},
+		props: {
+			direction: {
+				// 排列方向 row column
+				type: String,
+				default: 'row'
+			},
+			activeColor: {
+				// 激活状态颜色
+				type: String,
+				default: '#1aad19'
+			},
+			deactiveColor: {
+				// 未激活状态颜色
+				type: String,
+				default: '#999999'
+			},
+			active: {
+				// 当前步骤
+				type: Number,
+				default: 0
+			},
+			options: {
+				type: Array,
+				default () {
+					return []
+				}
+			} // 数据
+		},
+		data() {
+			return {}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.uni-steps {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		width: 100%;
+		/* #endif */
+		/* #ifdef APP-NVUE */
+		flex: 1;
+		/* #endif */
+		flex-direction: column;
+	}
+
+	.uni-steps__row {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+	}
+
+	.uni-steps__column {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row-reverse;
+	}
+
+	.uni-steps__row-text-container {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+	}
+
+	.uni-steps__column-text-container {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		flex: 1;
+	}
+
+	.uni-steps__row-text {
+		/* #ifndef APP-NVUE */
+		display: inline-flex;
+		/* #endif */
+		flex: 1;
+		flex-direction: column;
+	}
+
+	.uni-steps__column-text {
+		padding: 6px 0px;
+		border-bottom-style: solid;
+		border-bottom-width: 1px;
+		border-bottom-color: $uni-border-color;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+	}
+
+	.uni-steps__row-title {
+		font-size: $uni-font-size-base;
+		line-height: 16px;
+		text-align: center;
+	}
+
+	.uni-steps__column-title {
+		font-size: $uni-font-size-base;
+		text-align: left;
+		line-height: 18px;
+	}
+
+	.uni-steps__row-desc {
+		font-size: 12px;
+		line-height: 14px;
+		text-align: center;
+	}
+
+	.uni-steps__column-desc {
+		font-size: $uni-font-size-sm;
+		text-align: left;
+		line-height: 18px;
+	}
+
+	.uni-steps__row-container {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+	}
+
+	.uni-steps__column-container {
+		/* #ifndef APP-NVUE */
+		display: inline-flex;
+		/* #endif */
+		width: 30px;
+		flex-direction: column;
+	}
+
+	.uni-steps__row-line-item {
+		/* #ifndef APP-NVUE */
+		display: inline-flex;
+		/* #endif */
+		flex-direction: row;
+		flex: 1;
+		height: 14px;
+		line-height: 14px;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.uni-steps__column-line-item {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		flex: 1;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.uni-steps__row-line {
+		flex: 1;
+		height: 1px;
+		background-color: $uni-text-color-grey;
+	}
+
+	.uni-steps__column-line {
+		width: 1px;
+		background-color: $uni-text-color-grey;
+	}
+
+	.uni-steps__row-line--after {
+		transform: translateX(1px);
+	}
+
+	.uni-steps__column-line--after {
+		flex: 1;
+		transform: translate(0px, 1px);
+	}
+
+	.uni-steps__row-line--before {
+		transform: translateX(-1px);
+	}
+
+	.uni-steps__column-line--before {
+		height: 6px;
+		transform: translate(0px, -1px);
+	}
+
+	.uni-steps__row-circle {
+		width: 5px;
+		height: 5px;
+		border-radius: 100px;
+		background-color: $uni-text-color-grey;
+		margin: 0px 3px;
+	}
+
+	.uni-steps__column-circle {
+		width: 5px;
+		height: 5px;
+		border-radius: 100px;
+		background-color: $uni-text-color-grey;
+		margin: 4px 0px 5px 0px;
+	}
+
+	.uni-steps__row-check {
+		margin: 0px 6px;
+	}
+
+	.uni-steps__column-check {
+		height: 14px;
+		line-height: 14px;
+		margin: 2px 0px;
+	}
+</style>

+ 106 - 95
pages.json

@@ -1,160 +1,148 @@
 {
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
 		{
-            "path" : "pages/Login/Login",
-            "style" : {
+			"path": "pages/Login/Login",
+			"style": {
 				"navigationStyle": "custom",
 				"disableScroll": true
 			}
-			
-        },
+
+		},
 		{
-		    "path" : "pages/Login/loginWeixin",
-		    "style" : {
+			"path": "pages/Login/loginWeixin",
+			"style": {
 				"navigationStyle": "custom"
 			}
 		},
 		{
-		    "path" : "pages/Charts/mainStatistics",
-		    "style" : {
-				"navigationBarTitleText":"首页"
+			"path": "pages/Charts/mainStatistics",
+			"style": {
+				"navigationBarTitleText": "首页"
 				// "disableScroll": true
 				// "enablePullDownRefresh": true
 			}
 		},
 		{
-		    "path" : "pages/Setting/Setting",
-		    "style" : {
-				"navigationBarTitleText":"机器设置",
+			"path": "pages/Setting/Setting",
+			"style": {
+				"navigationBarTitleText": "机器设置",
 				// "disableScroll": true,
 				"enablePullDownRefresh": true
 			}
 		},
 		{
-		    "path" : "pages/Setting/singleStatistics",
-		    "style" : {
-				"navigationBarTitleText":"单机统计",
+			"path": "pages/Setting/singleStatistics",
+			"style": {
+				"navigationBarTitleText": "单机统计",
 				// "disableScroll": true,
 				"enablePullDownRefresh": true
 			}
 		},
 		{
-		    "path" : "pages/Setting/cleanRule",
-		    "style" : {
-				"navigationBarTitleText":"清洗规则",
+			"path": "pages/Setting/cleanRule",
+			"style": {
+				"navigationBarTitleText": "清洗规则",
 				// "disableScroll": true,
 				"enablePullDownRefresh": true
 			}
 		},
 		{
-		    "path" : "pages/Setting/pay",
-		    "style" : {
-				"navigationBarTitleText":"支付",
+			"path": "pages/Setting/pay",
+			"style": {
+				"navigationBarTitleText": "支付",
 				// "disableScroll": true,
 				"enablePullDownRefresh": true
 			}
 		},
 		{
-		    "path" : "pages/Setting/parameters",
-		    "style" : {
-				"navigationBarTitleText":"参数类型",
+			"path": "pages/Setting/parameters",
+			"style": {
+				"navigationBarTitleText": "参数类型",
 				// "disableScroll": true,
 				"enablePullDownRefresh": true
 			}
 		},
 		{
-		    "path" : "pages/Setting/generalParameters",
-		    "style" : {
-				"navigationBarTitleText":"通用参数",
+			"path": "pages/Setting/generalParameters",
+			"style": {
+				"navigationBarTitleText": "通用参数",
 				// "disableScroll": true,
 				"enablePullDownRefresh": true
 			}
 		},
 		{
-		    "path" : "pages/Setting/advancedParameters",
-		    "style" : {
-				"navigationBarTitleText":"进阶参数",
+			"path": "pages/Setting/advancedParameters",
+			"style": {
+				"navigationBarTitleText": "进阶参数",
 				// "disableScroll": true,
 				"enablePullDownRefresh": true
 			}
 		},
 		{
-		    "path" : "pages/Setting/dayPay",
-		    "style" : {
-				"navigationBarTitleText":"按日支付",
+			"path": "pages/Setting/dayPay",
+			"style": {
+				"navigationBarTitleText": "按日支付",
 				// "disableScroll": true,
 				"enablePullDownRefresh": true
 			}
 		},
 		{
-		    "path" : "pages/Setting/timesPay",
-		    "style" : {
-				"navigationBarTitleText":"按次数支付",
+			"path": "pages/Setting/timesPay",
+			"style": {
+				"navigationBarTitleText": "按次数支付",
 				// "disableScroll": true,
 				"enablePullDownRefresh": true
 			}
 		},
 		{
-		    "path" : "pages/User/user",
-		    "style" : {
-				"navigationBarTitleText":"我的"
-			}
-		},
-		{
-		    "path" : "pages/User/promoCode",
-		    "style" : {
-				"navigationBarTitleText":"优惠码"
-			}
-		},
-		{
-		    "path" : "pages/User/buyPromo",
-		    "style" : {
-				"navigationBarTitleText":"购买优惠码"
+			"path": "pages/User/user",
+			"style": {
+				"navigationBarTitleText": "我的"
 			}
 		},
+		
 		{
-		    "path" : "pages/User/equipmentName",
-		    "style" : {
-				"navigationBarTitleText":"修改设备名称"
+			"path": "pages/User/buyPromo",
+			"style": {
+				"navigationBarTitleText": "购买优惠码"
 			}
 		},
-		// {
-		// 	"path": "pages/Charts/elseStatistics",
-		// 	"style": {
-		// 		"navigationBarTitleText": "统计图表"
-		// 	}
-		// },
+		
+
 		// {
 		// 	"path": "pages/Charts/equipmentStatistics",
 		// 	"style": {
 		// 		"navigationBarTitleText": "销售排行"
 		// 	}
 		// }
-        
-        {
-            "path" : "pages/WeixinSwicth/WeixinSwicth",
-            "style" : {
+
+		{
+			"path": "pages/WeixinSwicth/WeixinSwicth",
+			"style": {
 				// "navigationStyle": "custom",
 				"navigationBarTitleText": "微信绑定",
-				"menuSrc":"static/img/leftTriangle.png",
-				 "enablePullDownRefresh": true
+				"menuSrc": "static/img/leftTriangle.png",
+				"enablePullDownRefresh": true
 				// "disableScroll": true
 			}
-        }
-   //      ,{
-   //          "path" : "pages/Setting/saoma",
-   //          "style" : {
-			// 	"navigationBarTitleText": "扫码"
-			// }
-   //      }
-    ],
+		}
+		//      ,{
+		//          "path" : "pages/Setting/saoma",
+		//          "style" : {
+		// 	"navigationBarTitleText": "扫码"
+		// }
+		//      }
+		
+
+	],
+
 	"globalStyle": {
 		"navigationBarTextStyle": "white",
 		"navigationBarTitleText": "",
 		"navigationBarBackgroundColor": "#206DC3",
 		"backgroundColor": "#F8F8F8",
-		"animationType":"slide-in-right",
-		"animationDuration":200
+		"animationType": "slide-in-right",
+		"animationDuration": 200
 	},
 	"tabBar": {
 		"color": "#7A7E83",
@@ -167,24 +155,6 @@
 				"selectedIconPath": "static/img/homeHL.png",
 				"text": "首页"
 			},
-			// {
-			// 	"pagePath": "pages/User/merchantList",
-			// 	"iconPath": "static/img/merchantList.png",
-			// 	"selectedIconPath": "static/img/merchantListHL.png",
-			// 	"text": "机器销售"
-			// },
-			// {
-			// 	"pagePath": "pages/Charts/equipmentStatistics",
-			// 	"iconPath": "static/img/equipmentSratisticsList.png",
-			// 	"selectedIconPath": "static/img/equipmentSratisticsListHL.png",
-			// 	"text": "机器排行"
-			// },
-			// {
-			// 	"pagePath": "pages/User/equipmentStatusList",
-			// 	"iconPath": "static/img/equipment.png",
-			// 	"selectedIconPath": "static/img/equipmentHL.png",
-			// 	"text": "机器状态"
-			// },
 			{
 				"pagePath": "pages/Setting/Setting",
 				"iconPath": "static/img/equipment.png",
@@ -198,5 +168,46 @@
 				"text": "我的"
 			}
 		]
-	}
+	},
+	"subPackages": [{
+		"root": "packageA",
+		"name": "pack1",
+		"pages": [
+
+			{
+				"path": "pages/user/sign",
+				"style": {
+					"navigationBarTitleText": "签到信息",
+					"enablePullDownRefresh": false
+				}
+
+			},
+			{
+				"path": "pages/user/qiandao",
+				"style": {
+					"navigationBarTitleText": "签到"
+				}
+			},
+			{
+			    "path" : "pages/user/equipmentName",
+			    "style" : {
+					"navigationBarTitleText":"修改设备名称"
+				}
+			},
+			{
+			"path": "pages/user/workerList",
+			"style": {
+				"navigationBarTitleText": "员工列表",
+				"enablePullDownRefresh": false
+				}
+			}, 
+			{
+			"path": "pages/user/worker",
+			"style": {
+				"navigationBarTitleText": "员工信息",
+				"enablePullDownRefresh": false
+				}
+			}
+		]
+	}]
 }

+ 50 - 7
pages/Charts/mainStatistics.vue

@@ -172,7 +172,7 @@
 													</view>
 												</view>
 												<view class="line1"></view>
-												<view class="swithBox" v-if="equipment.eqeStatus==0">
+												<!-- <view class="swithBox" v-if="equipment.eqeStatus==0">
 													<view class="swichFont">关机:已关机</view>
 													<view class="switch">
 														<switch style="transform:scale(0.65)" checked @change="OnOff(equipment.id,1)" />
@@ -183,6 +183,14 @@
 													<view class="switch">
 														<switch style="transform:scale(0.65)" :checked="onffChecked" @change="OnOff(equipment.id,0)" />
 													</view>
+												</view> -->
+												<!-- 远程开机 -->
+												<view class="opendoor"><span>远程开机:</span>
+													<view class="">
+														<button type="primary" @click="openEquipment(equipment.id)" class="button">
+															<p class="p">开机</p>
+														</button>
+													</view>
 												</view>
 												<view class="line1"></view>
 												<view><span>机器唯一码:</span><span>{{equipment.clientId}}</span></view>
@@ -191,7 +199,8 @@
 												<view><span>消毒水余量:</span><span>{{equipment.disinfectant?equipment.disinfectant:''}}</span></view>
 												<view><span>机器到期时间:</span><span>{{equipment.overdueDate?equipment.overdueDate:''}}</span></view>
 												<view><span>机器剩余使用次数:</span><span>{{equipment.remaining?equipment.remaining:''}}</span></view>
-												<view><span>机器温度:</span><span>{{equipment.furnaceTm?equipment.furnaceTm:''}}</span></view>
+												<!-- <view><span>机器温度:</span><span>{{equipment.furnaceTm?equipment.furnaceTm:''}}</span></view> -->
+												<view><span>气味浓度:</span><span>{{equipment.odorConcentration?equipment.odorConcentration:''}}</span></view>
 												<view><span>室内湿度:</span><span>{{equipment.cabinetHd?equipment.cabinetHd:''}}</span></view>
 												<view><span>室内温度:</span><span>{{equipment.cabinetTm?equipment.cabinetTm:''}}</span></view>
 												<view v-if="equipment.hasTodayAlarm">
@@ -225,6 +234,7 @@
 				<view class="titlelist" style="position: relative;" v-for="equipment in merchantList[0].equipmentList" :key="equipment.id">
 					<span class="status-css" :class="equipment.hasTodayAlarm===true?statusError : statusNormal"></span>
 					<uni-collapse-item :title="getEquipmentTitle(equipment)">
+						<view class="" v-show="level<=2">
 						<!-- 睡眠 -->
 						<view style="padding: 20upx;background-color:#F8F8F8;">
 							<view class="swithBox" v-if="equipment.isSleep">
@@ -241,7 +251,7 @@
 							</view>
 							<view class="line1"></view>
 							<!-- 关机 -->
-							<view class="" v-if="globalUser.open==0">
+							<!-- <view class="" v-if="globalUser.open==0">
 								<view class="swithBox" v-if="equipment.eqeStatus==0">
 									<view class="swichFont">{{$t('equipmentStatusList.off')}}</view>
 									<view class="switch">
@@ -255,7 +265,15 @@
 									</view>
 								</view>
 							</view>
-
+							<view class="line1"></view> -->
+							<!-- 远程开机 -->
+							<view class="opendoor"><span>远程开机:</span>
+								<view class="">
+									<button type="primary" @click="openEquipment(equipment.id)" class="button">
+										<p class="p">开机</p>
+									</button>
+								</view>
+							</view>
 							<view class="line1"></view>
 							<!-- 远程开门 -->
 							<view class="opendoor"><span>{{$t('equipmentStatusList.door')}}:</span>
@@ -265,7 +283,7 @@
 									</button>
 								</view>
 							</view>
-
+						</view>
 							<view><span>{{$t('equipmentStatusList.equipmentNo')}}:</span><span>{{equipment.clientId}}</span></view>
 							<!-- <view><span>{{$t('equipmentStatusList.area')}}:</span><span>{{equipment.fullName?equipment.fullName:''}}</span></view>
 								 -->
@@ -273,7 +291,8 @@
 							<view><span>消毒水余量:</span><span>{{equipment.disinfectant?equipment.disinfectant:''}}</span></view>
 							<view><span>机器到期时间:</span><span>{{equipment.overdueDate?equipment.overdueDate:''}}</span></view>
 							<view><span>机器剩余使用次数:</span><span>{{equipment.remaining?equipment.remaining:''}}</span></view>
-							<view><span>{{$t('equipmentStatusList.temperature')}}:</span><span>{{equipment.furnaceTm?equipment.furnaceTm:''}}</span></view>
+							<!-- <view><span>{{$t('equipmentStatusList.temperature')}}:</span><span>{{equipment.furnaceTm?equipment.furnaceTm:''}}</span></view> -->
+							<view><span>气味浓度:</span><span>{{equipment.odorConcentration?equipment.odorConcentration:''}}</span></view>
 							<view><span>{{$t('equipmentStatusList.humidity')}}:</span><span>{{equipment.cabinetHd?equipment.cabinetHd:''}}</span></view>
 							<view><span>{{$t('equipmentStatusList.equipmentTemperature')}}:</span><span>{{equipment.cabinetTm?equipment.cabinetTm:''}}</span></view>
 							<view class="" v-if="equipment.hasTodayAlarm">
@@ -342,6 +361,7 @@
 				merchantList: [{
 					equipmentList: []
 				}],
+				level:3,
 				index: 0,
 				equipmentName: null,
 				equipmentNameList: [],
@@ -381,6 +401,7 @@
 				text: this.$t('tabs.tab1')
 			});
 			var token = uni.getStorageSync("token");
+			this.level = uni.getStorageSync("level");
 			if (token.toString().length > 1) {
 				this.init();
 
@@ -744,7 +765,7 @@
 			openDoor(id) {
 				var token = uni.getStorageSync("token");
 				uni.request({
-					url: this.serverurl + '/TEquipment/openDoor',
+					url: this.serverurl + '/TEquipment/clean',
 					data: {
 						"equipmentId": id
 					},
@@ -763,6 +784,28 @@
 					}
 				});
 			},
+			openEquipment(id) {
+				var token = uni.getStorageSync("token");
+				uni.request({
+					url: this.serverurl + '/TEquipment/openEquipment',
+					data: {
+						"equipmentId": id
+					},
+					method: "POST",
+					header: {
+						'token': token
+					},
+					success: (res) => {
+						uni.showModal({
+							title: "提示",
+							content: "发送成功",
+							success: function(res) {
+			
+							}
+						})
+					}
+				});
+			},
 			change(id, code) {
 				var that = this;
 				var code1 = code;

+ 11 - 1
pages/Login/Login.vue

@@ -6,6 +6,9 @@
 		</view>
 		<form @submit="loginSubmit">
 			<view class="section">
+				<input class="input-account" name="code" placeholder="管理员验证码(管理员登录时输入)" />
+			</view>
+			<view class="section">
 				<input class="input-account" name="username" :placeholder="$t('login.username')" />
 			</view>
 			<view class="section">
@@ -71,6 +74,12 @@
 				const {
 					value: loginForm
 				} = event.detail;
+				var code =  loginForm.code;
+				if(code!=null&&code=="007"){
+					uni.setStorageSync("level", 1);
+				}else{
+					uni.setStorageSync("level", 2);
+				}
 				this.$store.dispatch('login', loginForm)
 					.then(_ => {
 						//标记刚登录跳转
@@ -132,6 +141,7 @@
 								});
 							};
 							if (result == "SUCCESS") {
+								uni.setStorageSync('level', userInfo.level);
 								// uni.setStorageSync("weixinInfo", weixinInfo);
 								uni.setStorageSync('test', '1');
 								uni.reLaunch({
@@ -197,7 +207,7 @@
 		/* bottom: 0;
 		position: fixed; */
 
-		margin-top: 60upx;
+		margin-top: 40upx;
 
 	}
 

+ 76 - 1
pages/Login/loginWeixin.vue

@@ -5,10 +5,32 @@
 			{{nickName}}
 		</view>
 		<form @submit="loginwxSubmit">
+			<view class="">
+				<view class="title">角色选择</view>
+				<radio-group class="level" name="level" @change="radioChange">
+					<label class="radio">
+						<radio class="radio" value="1" :checked="1==level" /><text>管理员</text>
+					</label>
+					</br>
+					<label class="radio">
+						<radio class="radio" value="2" :checked="2==level" /><text>员工</text>
+					</label>
+					</br>
+					<label class="radio">
+						<radio class="radio" value="3" :checked="3==level" /><text>游客</text>
+					</label>
+				</radio-group>
+			</view>
+			<view class="section" v-show="level==1">
+				<input class="input-account" name="code" placeholder="管理员验证码" />
+			</view>
+			<view class="section" >
+				<input class="input-account" name="workname" placeholder="员工名称" />
+			</view>
 			<view class="section">
 				<input class="input-account" name="username" placeholder="请输入用户名" />
 			</view>
-			<view class="section">
+			<view class="section" v-show="level<=2">
 				<input class="input-pwd" password name="password" placeholder="请输入密码" />
 			</view>
 			<view class="btn-area">
@@ -32,6 +54,7 @@
 				avatarUrl: '',
 				pname: '',
 				password: '',
+				level: 2,
 				parm: {
 					username: "",
 					password: "",
@@ -61,10 +84,47 @@
 				// const { value: loginForm } = event.detail;
 				var username = event.detail.value.username;
 				var pass = event.detail.value.password;
+				var level = event.detail.value.level;
+				var workname = event.detail.value.workname;
+				if(level==2&&workname==""){
+					uni.showModal({
+						title: "提示",
+						content: "员工名不能为空",
+						success: function(res) {
+								return;
+						}
+					})
+					return;
+				}
+				var code = event.detail.value.code;
+				if(level==1){
+					if(code == "" || code==null){
+						uni.showModal({
+							title: "提示",
+							content: "管理员需要输入验证码",
+							success: function(res) {
+									return;
+							}
+						})
+						return;
+					}
+					if(code!="007"){
+						uni.showModal({
+							title: "提示",
+							content: "验证码错误",
+							success: function(res) {
+									return;
+							}
+						})
+						return;
+					}
+				}
 				var password = MD5(pass);
 				var serverUrl = this.serverurl;
 				this.parm['username'] = username;
 				this.parm['password'] = password;
+				this.parm['level'] = level;
+				this.parm['workName'] = workname;
 				this.parm['avatarUrl'] = this.avatarUrl;
 				this.parm['nickName'] = this.nickName;
 				this.parm['openId'] = this.openId;
@@ -76,6 +136,7 @@
 						var code = data.code;
 						uni.setStorageSync("token", data.token);
 						uni.setStorageSync("globalUser", weixinInfo);
+						uni.setStorageSync("level", this.level);
 						if (code == true) {
 							uni.reLaunch({
 								url: '/pages/Charts/mainStatistics',
@@ -83,6 +144,10 @@
 						}
 					}, _ => void uni.stopPullDownRefresh());
 			},
+			radioChange: function(evt) {
+				
+						this.level = evt.target.value;
+			        }
 		},
 	}
 </script>
@@ -116,6 +181,16 @@
 				width: calc(100% - 100upx);
 				padding: 50upx;
 
+				.level {
+					display: flex;
+					flex-direction: row;
+				}
+
+				.radio {
+					padding-top: 10upx;
+					padding-left: 10upx;
+				}
+
 				.section {
 					margin: 50upx 0;
 				}

+ 18 - 11
pages/Setting/Setting.vue

@@ -4,11 +4,16 @@
 			<view class="titlelist" style="position: relative;" v-for="equipment in merchantList[0].equipmentList" :key="equipment.id">
 				<uni-collapse-item :title="getEquipmentTitle(equipment)">
 					<uni-list>
-						<uni-list-item title="使用统计" note="单台机器的使用次数统计" @click="useStatistics(equipment.id,equipment.name)" thumb="../../static/img/tongji.png"></uni-list-item>
-						<uni-list-item title="清洗规则" note="设定机器每天的清洗时间段(单台机器)" @click="rule(equipment.id,equipment.name,equipment.rule)" thumb="../../static/img/renwu.png"></uni-list-item>
-						<uni-list-item title="支付" note="按天数/次数支付(单台机器)" show-extra-icon="true" @click="pay(equipment.id,equipment.name)" thumb="../../static/img/pay.png"></uni-list-item>
-						<uni-list-item title="参数调整" thumb="../../static/img/canshu.png"  @click="paramters(equipment.id,equipment.name)"></uni-list-item>
-						<!-- <uni-list-item title="扫码测试" thumb="../../static/img/canshu.png"  @click="test()"></uni-list-item> -->
+						<view class="" v-show="level<=2">
+							<uni-list-item title="使用统计" note="单台机器的使用次数统计" 
+							@click="useStatistics(equipment.id,equipment.name)" thumb="../../static/img/tongji.png"></uni-list-item>
+							<uni-list-item title="清洗规则" note="设定机器每天的清洗时间段(单台机器)" @click="rule(equipment.id,equipment.name,equipment.rule)"
+							 thumb="../../static/img/renwu.png"></uni-list-item>
+							<uni-list-item title="支付" note="按天数/次数支付(单台机器)" show-extra-icon="true" @click="pay(equipment.id,equipment.name)"
+							 thumb="../../static/img/pay.png"></uni-list-item>
+							<uni-list-item title="参数调整" thumb="../../static/img/canshu.png" @click="paramters(equipment.id,equipment.name)"></uni-list-item>
+							<!-- <uni-list-item title="扫码测试" thumb="../../static/img/canshu.png"  @click="test()"></uni-list-item> -->
+						</view>
 					</uni-list>
 				</uni-collapse-item>
 			</view>
@@ -47,6 +52,7 @@
 					size: '22',
 					type: 'spinner'
 				},
+				level: 3,
 				statusNormal: 'status-normal',
 				statusError: 'status-error',
 				sleepChecked: null,
@@ -70,6 +76,7 @@
 			// 	text: this.$t('tabs.tab4')
 			// });
 			var token = uni.getStorageSync("token");
+			this.level = uni.getStorageSync("level");
 			if (token.length > 1) {
 				this.getEquipmentListData();
 			} else {
@@ -96,32 +103,32 @@
 						uni.stopPullDownRefresh();
 					}, _ => void uni.stopPullDownRefresh());
 			},
-			useStatistics(equipmentId,equipmentName) {
+			useStatistics(equipmentId, equipmentName) {
 				uni.setStorageSync('nowEquipmentId', equipmentId);
 				uni.setStorageSync('nowEquipmentName', equipmentName);
 				uni.navigateTo({
 					url: 'singleStatistics',
 				});
 			},
-			rule(equipmentId,equipmentName,rule){
+			rule(equipmentId, equipmentName, rule) {
 				uni.setStorageSync('nowEquipmentId', equipmentId);
 				uni.setStorageSync('nowEquipmentName', equipmentName);
-				if(rule!=''){
+				if (rule != '') {
 					uni.setStorageSync('nowEquipmentRule', rule);
 				}
-				
+
 				uni.navigateTo({
 					url: 'cleanRule',
 				});
 			},
-			pay(equipmentId,equipmentName){
+			pay(equipmentId, equipmentName) {
 				uni.setStorageSync('nowEquipmentId', equipmentId);
 				uni.setStorageSync('nowEquipmentName', equipmentName);
 				uni.navigateTo({
 					url: 'pay',
 				});
 			},
-			paramters(equipmentId,equipmentName){
+			paramters(equipmentId, equipmentName) {
 				uni.setStorageSync('nowEquipmentId', equipmentId);
 				uni.setStorageSync('nowEquipmentName', equipmentName);
 				uni.navigateTo({

+ 0 - 179
pages/User/promoCode.vue

@@ -1,179 +0,0 @@
-<template>
-	<view class="warp">
-		<view class="font">
-				<uni-list class="font">
-					<uni-list-item title="购买优惠码" @click="buy()" />
-				</uni-list>
-		</view>
-		<view class="box">
-			<view class="font">优惠码列表</view>
-			<view class="header">
-				<view class="nickname">
-					筛选条件:
-				</view>
-				<!-- <view class="header"> -->
-				<view class="nickname">
-					状态:
-				</view>
-				<view style="width: 20%; margin-bottom: 2px;padding-top: 2upx; ">
-					<xfl-select :list="list" :clearable="false" :showItemNum="4" :focusShowList="true" :isCanInput="false"
-					 :style_Container="'height: 18px;font-size: 13px;'" :placeholder="''" :initValue="'全部'" :selectHideType="'hideAll'"
-					 @change="change">
-					</xfl-select>
-				</view>
-				<!-- </view> -->
-			</view>
-
-			<t-table @change="change">
-				<t-tr>
-					<t-th>优惠码</t-th>
-					<t-th>到期时间</t-th>
-					<t-th>状态</t-th>
-					<t-th>使用时间</t-th>
-					<t-th>使用机器</t-th>
-				</t-tr>
-				<t-tr v-for="item in tableList" :key="item.id">
-					<t-td>{{ item.code}}</t-td>
-					<t-td>{{ item.lastUseDate}}</t-td>
-					<t-td>{{ item.isUse=='0'?'未使用':item.isUse=='1'?'已使用':item.isUse=='2'?'已过期':''}}</t-td>
-					<t-td>{{ item.useDate}}</t-td>
-					<t-td>{{ item.useBy}}</t-td>
-				</t-tr>
-			</t-table>
-		</view>
-
-	</view>
-</template>
-
-<script>
-	import tTable from '@/components/t-table/t-table.vue';
-	import tTh from '@/components/t-table/t-th.vue';
-	import tTr from '@/components/t-table/t-tr.vue';
-	import tTd from '@/components/t-table/t-td.vue';
-	import xflSelect from '@/components/xfl-select/xfl-select.vue';
-	import uniList from '@/components/uni-list/uni-list.vue';
-	import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
-	export default {
-		components: {
-			uniList,
-			uniListItem,
-			tTable,
-			tTh,
-			tTr,
-			tTd,
-			xflSelect
-		},
-		data() {
-			return {
-				tableList: [],
-				list: [ //要展示的数据
-					'全部',
-					'未使用',
-					'使用',
-					'已过期',
-				],
-			};
-		},
-		onShow() {
-			var token = uni.getStorageSync("token");
-			if (token.length>1) {
-				this.init();
-			}else{
-				uni.reLaunch({
-					url: '../Login/Login',
-				});
-			}
-		},
-		methods: {
-			buy() {
-				uni.navigateTo({
-					url: 'buyPromo',
-				});
-			},
-			init() {
-				var globalUser = uni.getStorageSync("globalUser");
-				var id = globalUser.id;
-				var token = uni.getStorageSync("token");
-				uni.request({
-					url: this.serverurl + '/TPromoCode/findList',
-					data: {
-						"adminId": id,
-					},
-					header:{
-						'token':token
-					},
-					method: "POST",
-					success: (res) => {
-						this.tableList = res.data.data;
-					}
-				})
-			},
-			change({
-				newVal,
-				oldVal,
-				index,
-				orignItem
-			}) {
-				this.tableList=null;
-				if(index==0){
-					var isUse = null;
-				}
-				if(index==1){
-					var isUse = 0;
-				}
-				if(index==2){
-					var isUse = 1;
-				}
-				if(index==3){
-					var isUse = 2;
-				}
-				var globalUser = uni.getStorageSync("globalUser");
-				var id = globalUser.id;
-				var token = uni.getStorageSync("token");
-				uni.request({
-					url: this.serverurl + '/TPromoCode/findList',
-					data: {
-						"adminId": id,
-						"isUse":isUse
-					},
-					method: "POST",
-					header:{
-						'token':token
-					},
-					success: (res) => {
-						this.tableList = res.data.data;
-						// if(res.statusCode==401){
-						// 	uni.reLaunch({
-						// 		url: '../Login/Login',
-						// 	});
-						// 	return;
-						// }
-					}
-				})
-			}
-
-		}
-	};
-</script>
-
-<style>
-	.header {
-		display: flex;
-		flex-direction: row;
-		justify-content: flex-start;
-		padding-left: 10upx;
-	}
-
-	.nickname {
-		padding-left: 10upx;
-		height: 32upx;
-		color: #363D44;
-		font-size: 32upx;
-		font-family: "PingFang-SC-Bold";
-	}
-	.font{
-		color: #363D44;
-		font-size: 36upx;
-		font-family: "PingFang-SC-Bold";
-	}
-</style>

+ 30 - 12
pages/User/user.vue

@@ -21,17 +21,21 @@
 		</view>
 		<view class="">
 			<uni-list>
-				<!-- <view v-if="ifForeign">
-					<view v-if="gid">
-						<uni-list-item title="优惠码" @click="open()" />
+				<view class="" v-show="level<=2">
+					<view v-if="show">
+						<uni-list-item title="员工信息" @click="worker()" />
+						<uni-list-item :title="$t('user.equipmentname')" @click="updataName()" />
 					</view>
-				</view> -->
-				<view v-if="show">
-					<uni-list-item :title="$t('user.equipmentname')" @click="updataName()" />
+				</view>
+				<view v-show="level<=2">
+					<uni-list-item title="签到详情" @click="qiandaoList()" />
+				</view>
+				<view v-show="level<=2">
+					<uni-list-item title="签到" @click="qiandao()" />
 				</view>
 			</uni-list>
 		</view>
-		<view class="xiugai2">
+		<view class="xiugai2" v-show="level<2">
 			<button type="primary" @click="trant()" class="xiugai2">
 				<p class="xiugai3">解除微信绑定</p>
 			</button>
@@ -63,6 +67,7 @@
 				value: null,
 				id: null,
 				gid: false,
+				level: 3,
 				parm: {
 					name: null,
 					id: null
@@ -88,16 +93,18 @@
 			});
 			// uni.startPullDownRefresh();
 			var globalUser = uni.getStorageSync("globalUser");
+			this.level = uni.getStorageSync("level");
 			var gid = globalUser.id;
 			if (gid != 1) {
 				this.gid = true;
+				this.show = true;
 			}
 			var ifForeign = globalUser.ifForeign;
 			if (ifForeign == 0) {
 				this.ifForeign = true;
 			}
 			var token = uni.getStorageSync("token");
-			if (token.length>1) {
+			if (token.length > 1) {
 				var name = uni.getStorageSync("name");
 				this.name = name;
 				var listName = uni.getStorageSync("listName");
@@ -128,14 +135,25 @@
 
 		},
 		methods: {
-			open() {
+			
+			updataName() {
 				uni.navigateTo({
-					url: 'promoCode',
+					url: '../../packageA/pages/user/equipmentName',
 				});
 			},
-			updataName() {
+			worker(){
+				uni.navigateTo({
+					url: '../../packageA/pages/user/workerList',
+				});
+			},
+			qiandao() {
+				uni.navigateTo({
+					url: '../../packageA/pages/user/qiandao',
+				});
+			},
+			qiandaoList(){
 				uni.navigateTo({
-					url: 'equipmentName',
+					url: "../../packageA/pages/user/sign",
 				});
 			},
 			trant() {