程志平 %!s(int64=3) %!d(string=hai) anos
pai
achega
ab89888828

+ 5 - 5
src/App.vue

@@ -39,7 +39,7 @@
 					if (this.$route.path != '/login') {
 						this.currentTime();
 					}
-				}, 3000)
+				}, 1000)
 			})
 
 			window.addEventListener('click', () => {
@@ -50,7 +50,7 @@
 					if (this.$route.path != '/login') {
 						this.currentTime();
 					}
-				}, 3000)
+				}, 1000)
 			})
 
 			window.addEventListener('scroll', () => {
@@ -61,7 +61,7 @@
 					if (this.$route.path != '/login') {
 						this.currentTime();
 					}
-				}, 3000)
+				}, 1000)
 			}, true)
 
 			window.addEventListener('mousemove', () => {
@@ -72,7 +72,7 @@
 					if (this.$route.path != '/login') {
 						this.currentTime();
 					}
-				}, 3000)
+				}, 1000)
 			}, true)
 			// 超时退出 end
 		},
@@ -85,7 +85,7 @@
 						this.$message({
 							message: '登录超时,将返回登录页',
 							type: 'error',
-							duration: 1500
+							duration: 2000
 						})
 						setTimeout(() => {
 							this.$store.dispatch('user/logout')

+ 14 - 14
src/views/consumptionRecord/index.vue

@@ -37,8 +37,8 @@
 								</el-select>
 							</el-form-item> -->
 						</el-form>
-						<el-table :data="tableData" height="510" style="width: 100%" :cell-style="cell_style" v-loading="loading"
-							:header-cell-style="header_cell_style">
+						<el-table :data="tableData" height="510" style="width: 100%" :cell-style="cell_style"
+							v-loading="loading" :header-cell-style="header_cell_style">
 							<el-table-column label="序号" align="center" width="90">
 								<template slot-scope="scope">
 									<span>{{(pagination.currentPage - 1) * pagination.pageSize + scope.$index + 1}}</span>
@@ -225,18 +225,18 @@
 				}
 				if (param == 'search') {
 					data.page = 1
-					if (this.formInline.user !== '') {
-						data.name_card = this.formInline.user
-					}
-					if (this.formInline.startTime !== '') {
-						data.start_time = this.formInline.startTime
-					}
-					if (this.formInline.endTime !== '') {
-						data.end_time = this.formInline.endTime
-					}
-					if (this.formInline.state !== '') {
-						data.state = this.formInline.state
-					}
+				}
+				if (this.formInline.user !== '') {
+					data.name_card = this.formInline.user
+				}
+				if (this.formInline.startTime !== '') {
+					data.start_time = this.formInline.startTime
+				}
+				if (this.formInline.endTime !== '') {
+					data.end_time = this.formInline.endTime
+				}
+				if (this.formInline.state !== '') {
+					data.state = this.formInline.state
 				}
 				// console.log(data);
 				getTableData(data).then((res) => {

+ 1 - 1
src/views/feilvSet/index.vue

@@ -67,7 +67,7 @@
 			:close-on-click-modal="false" :close-on-press-escape="false" @close="dialog_close('modifyForm')">
 			<el-form :model="form" ref="modifyForm" :rules="modifyRules">
 				<el-form-item label="型号:" :label-width="formLabelWidth" :required="true" prop="air_config_modify">
-					<el-input v-model="form.air_config_modify" autocomplete="off" maxlength="3" ref="modifyFeilv_focus">
+					<el-input v-model="form.air_config_modify" autocomplete="off" readonly="" maxlength="3" ref="modifyFeilv_focus">
 						<template slot="append">匹</template>
 					</el-input>
 				</el-form-item>

+ 22 - 21
src/views/rechargeRecord/index.vue

@@ -30,15 +30,15 @@
 								</el-date-picker>
 							</el-form-item>
 							<el-form-item label="">
-								<el-select v-model="formInline.state" placeholder="支付状态" @change="search_state_change"
-									clearable>
-									<el-option label="支付成功" value="1"></el-option>
-									<el-option label="支付失败" value="0"></el-option>
+								<el-select v-model="formInline.state" placeholder="支付状态" @change="search_state_change">
+									<el-option label="已支付已到账" value="2"></el-option>
+									<el-option label="已支付未到账" value="1"></el-option>
+									<el-option label="支付" value="0"></el-option>
 								</el-select>
 							</el-form-item>
 						</el-form>
-						<el-table :data="tableData" height="510" style="width: 100%" :cell-style="cell_style" v-loading="loading"
-							:header-cell-style="header_cell_style">
+						<el-table :data="tableData" height="510" style="width: 100%" :cell-style="cell_style"
+							v-loading="loading" :header-cell-style="header_cell_style">
 							<el-table-column label="序号" align="center" width="100">
 								<template slot-scope="scope">
 									<span>{{(pagination.currentPage - 1) * pagination.pageSize + scope.$index + 1}}</span>
@@ -71,8 +71,9 @@
 							</el-table-column>
 							<el-table-column label="支付状态" align="center" width="150">
 								<template slot-scope="scope">
-									<span v-if="scope.row.state == 1" class="txt-cell-green">支付成功</span>
-									<span v-else class="txt-cell-red">支付失败</span>
+									<span v-if="scope.row.state == 0" class="txt-cell-red">未支付</span>
+									<span v-else-if="scope.row.state == 1" class="txt-cell-red">已支付未到账</span>
+									<span v-else class="txt-cell-green">已支付已到账</span>
 								</template>
 							</el-table-column>
 							<el-table-column label="交易流水号" align="center">
@@ -131,7 +132,7 @@
 					user: '',
 					startTime: '',
 					endTime: '',
-					state: ''
+					state: '2'
 				},
 				tableData: [],
 				// 分页参数
@@ -228,18 +229,18 @@
 				}
 				if (param == 'search') {
 					data.page = 1
-					if (this.formInline.user !== '') {
-						data.name_card = this.formInline.user
-					}
-					if (this.formInline.startTime !== '') {
-						data.start_time = this.formInline.startTime
-					}
-					if (this.formInline.endTime !== '') {
-						data.end_time = this.formInline.endTime
-					}
-					if (this.formInline.state !== '') {
-						data.state = this.formInline.state
-					}
+				}
+				if (this.formInline.user !== '') {
+					data.name_card = this.formInline.user
+				}
+				if (this.formInline.startTime !== '') {
+					data.start_time = this.formInline.startTime
+				}
+				if (this.formInline.endTime !== '') {
+					data.end_time = this.formInline.endTime
+				}
+				if (this.formInline.state !== '') {
+					data.state = this.formInline.state
 				}
 				// console.log(data);
 				getTableData(data).then((res) => {

+ 37 - 27
src/views/serveAC/index.vue

@@ -426,8 +426,8 @@
 					<div>{{form_add_louceng.building}}</div>
 				</el-form-item>
 				<el-form-item label="楼层:" :label-width="formLabelWidth" prop="floor" :required="true">
-					<el-input v-model="form_add_louceng.floor" autocomplete="off" placeholder="请输入楼层名称"
-						ref="ref_louceng" maxlength="3"></el-input>
+					<el-input v-model="form_add_louceng.floor" autocomplete="off" placeholder="请输入楼层"
+						ref="ref_louceng" maxlength="1" @keydown.enter.native="dialog_add_louceng_click"></el-input>
 				</el-form-item>
 			</el-form>
 			<div slot="footer" class="dialog-footer">
@@ -461,8 +461,8 @@
 					<div>{{form_add_room.floor}}</div>
 				</el-form-item>
 				<el-form-item label="房间:" :label-width="formLabelWidth" :required="true" prop="room">
-					<el-input v-model="form_add_room.room" autocomplete="off" placeholder="请输入房间名称" ref="ref_room"
-						maxlength="4"></el-input>
+					<el-input v-model="form_add_room.room" autocomplete="off" placeholder="请输入房间名称" ref="ref_add_room"
+						maxlength="10" @keydown.enter.native="dialog_add_room_click"></el-input>
 				</el-form-item>
 			</el-form>
 			<div slot="footer" class="dialog-footer">
@@ -523,8 +523,8 @@
 					<div>{{form_modify_room.floor}}</div>
 				</el-form-item>
 				<el-form-item label="房间:" :label-width="formLabelWidth" :required="true" prop="room">
-					<el-input v-model="form_modify_room.room" autocomplete="off" placeholder="请输入房间名称" ref="ref_room"
-						maxlength="4"></el-input>
+					<el-input v-model="form_modify_room.room" autocomplete="off" placeholder="请输入房间号" ref="ref_modi_room"
+						maxlength="4" @keydown.enter.native="dialog_modify_room_click(show_modify_room)"></el-input>
 				</el-form-item>
 			</el-form>
 			<div slot="footer" class="dialog-footer">
@@ -594,12 +594,12 @@
 			}
 			var checklouceng = (rule, value, callback) => {
 				if (!value) {
-					return callback(new Error('请输入楼层名称'));
+					return callback(new Error('请输入数字楼层号'));
 				}
 				setTimeout(() => {
-					var reg = /^[1-9][0-9]?[楼]{1,3}$/
+					var reg = /^[1-9]{1}$/
 					if (!reg.test(value)) {
-						callback(new Error('1到2位数字+楼,不能0打头,如:1楼 或 99楼'));
+						callback(new Error('楼层只能输入 1 到 9 的数字'));
 					} else {
 						callback();
 					}
@@ -607,17 +607,17 @@
 			}
 			var checkroom = (rule, value, callback) => {
 				if (!value) {
-					return callback(new Error('请输入房间名称'));
+					return callback(new Error('请输入房间'));
 				}
 
 				setTimeout(() => {
-					var regH = /[^\d]/g;
+					var regH = /[\d]$/g;
 					var floor = this.currentData.floor.replace(regH, '');
-					var reg = /^[1-9]+[0-9]{2,3}$/
+					var reg = /[1-9]{1}[0-9]{2,3}$/
 					if (value.indexOf(floor)) {
-						callback(new Error('必须以楼层号开头!'));
+						callback(new Error('房间号数字部分,必须以楼层号开头!'));
 					} else if (!reg.test(value)) {
-						callback(new Error('为3-4个数字,非0开头!栋号不需要添加!'));
+						callback(new Error('房间号数字部分,为3-4个数字,非0开头!栋号不需要添加!'));
 					} else {
 						callback();
 					}
@@ -1069,20 +1069,21 @@
 						for (var i = 0; i < tmp.length; i++) {
 							if (tmp[i].label == data[0] && typeof tmp[i].children !== 'undefined' && tmp[i]
 								.children.length > 0) {
+
 								let tmp1 = tmp[i].children
 								for (var j = 0; j < tmp1.length; j++) {
 									if (tmp1[j].label == data[1] && typeof tmp1[j].children !==
-										'undefined' &&
-										tmp1[j]
-										.children.length > 0) {
+										'undefined' && tmp1[j].children.length > 0) {
+
 										let tmp2 = tmp1[j].children
 										for (var k = 0; k < tmp2.length; k++) {
 											if (tmp2[k].label == data[2] && typeof tmp2[k].rooms !==
-												'undefined' &&
-												tmp2[k].rooms.length > 0) {
+												'undefined' && tmp2[k].rooms.length > 0) {
+
 												let tmp3 = tmp2[k].rooms
 												for (var p = 0; p < tmp3.length; p++) {
 													if (tmp3[p] == room) {
+
 														this.navData[i].children[j].children[k].rooms
 															.splice(p, 1)
 													}
@@ -1116,15 +1117,16 @@
 						this.$message.error('返回数据格式问题,code未获取到!');
 						return;
 					}
+					// console.log(res.data);
 					// 校区
 					let school = JSON.parse(res.data);
 					// console.log('school', school);
-					if (typeof school !== 'undefined' && school !== '') {
+					if (school.length > 0) {
 						this.navData = []
 						let tmpSchool = []
 						for (var i = 0; i < school.length; i++) {
 							let nData = []
-							let builds = school[i]["builds"]
+							let builds = school[i].builds
 							for (var j = 0; j < builds.length; j++) {
 								let tmpBuilds = {}
 								let tmpFloors = []
@@ -1140,7 +1142,9 @@
 									tmpFloors.push(floor);
 								}
 								// 楼层排序
-								tmpFloors.sort((a, b) => a.label.localeCompare(b.label))
+								tmpFloors.sort((a, b) => {
+									return (a.label - b.label)
+								})
 								tmpBuilds.id = builds[j].id
 								tmpBuilds.label = builds[j].building
 								tmpBuilds.isShow = true
@@ -1622,9 +1626,9 @@
 
 				setTimeout(() => {
 					this.$nextTick(() => {
-						this.$refs.ref_room.focus()
+						this.$refs.ref_add_room.focus()
 					})
-				}, 100)
+				}, 500)
 			},
 			/**
 			 * 添加楼层
@@ -1644,7 +1648,7 @@
 					this.$nextTick(() => {
 						this.$refs.ref_louceng.focus()
 					})
-				}, 100)
+				}, 500)
 			},
 			/**
 			 * 告警状态: 异常
@@ -1672,7 +1676,7 @@
 					this.$nextTick(() => {
 						this.$refs.ref_loudong.focus()
 					})
-				}, 100)
+				}, 500)
 			},
 			/**
 			 * 添加楼栋对话框
@@ -1878,7 +1882,7 @@
 					this.$nextTick(() => {
 						this.$refs.ref_cao.focus()
 					})
-				}, 100)
+				}, 500)
 			},
 			/**
 			 * 操作编辑修改房间
@@ -1892,6 +1896,12 @@
 				this.form_modify_room.room = room.split('-')[1]
 				this.show_modify_room = room
 				this.dialog_modify_room = true
+				
+				setTimeout(()=>{
+					this.$nextTick(()=>{
+						this.$refs.ref_modi_room.focus()
+					})
+				}, 500)
 			},
 			/**
 			 * 操作删除房间

+ 3 - 3
src/views/systemSet/index.vue

@@ -21,7 +21,7 @@
 							</el-form-item>
 							<el-form-item prop="start_tiao">
 								<span>账户余额少于</span>
-								<el-input v-model="formData.start_tiao" maxlength="2" placeholder="请输入金额"></el-input>
+								<el-input v-model="formData.start_tiao" maxlength="4" placeholder="请输入金额"></el-input>
 								<span>元,不能开启空调</span>
 							</el-form-item>
 							<div style="white-space: nowrap;">
@@ -95,7 +95,7 @@
 					return callback(new Error('给操作员发信息,不能都为0!'));
 				}
 				setTimeout(() => {
-					var reg = /^[1-9]\d*|0$/
+					var reg = /^[+]{0,1}(\d+)$/
 					if (!reg.test(value)) {
 						callback(new Error('请输入整数或0'));
 					} else if (value < 0 || value > 10) {
@@ -120,7 +120,7 @@
 					return callback(new Error('不能为空'));
 				}
 				setTimeout(() => {
-					var reg = /^[1-9]\d*|0$/
+					var reg = /^[+]{0,1}(\d+)$/
 					if (!reg.test(value)) {
 						callback(new Error('请输入整数或0'));
 					} else if (value < 4 || value > 10) {

+ 6 - 6
src/views/userMgr/index.vue

@@ -510,12 +510,12 @@
 				}
 				if (param == 'search') {
 					data.page = 1
-					if (this.formInline.user !== '') {
-						data.name_card = this.formInline.user
-					}
-					if (this.formInline.category !== '') {
-						data.classfy = this.formInline.category
-					}
+				}
+				if (this.formInline.user !== '') {
+					data.name_card = this.formInline.user
+				}
+				if (this.formInline.category !== '') {
+					data.classfy = this.formInline.category
 				}
 				// 开始发送请求,获取配置数据
 				getUserList(data).then((res) => {