Selaa lähdekoodia

车位锁列表中新增升降板操作,要请求不同的网关添加otherApiUrl配置

gcz 2 vuotta sitten
vanhempi
commit
f8280654a4
4 muutettua tiedostoa jossa 91 lisäystä ja 55 poistoa
  1. 50 45
      common/apiurl.js
  2. 4 4
      common/config.js
  3. 2 2
      package.json
  4. 35 4
      pages/deviceList/deviceListType2/deviceListType2.vue

+ 50 - 45
common/apiurl.js

@@ -1,94 +1,99 @@
 const apiurl = {
 	//登录
-	loginUrl:'/auth/login',
+	loginUrl:'/inspection/auth/login',
 	//车主查询接口
-	getParkingRecordUrl:'/orderinfo/vehicleList',
+	getParkingRecordUrl:'/inspection/orderinfo/vehicleList',
 	//首页设备统计
-	getDeviceStatisUrl:'/roadspace/staticDevice',
+	getDeviceStatisUrl:'/inspection/roadspace/staticDevice',
 	//修改密码
-	updatePwdUrl:'/officerinfo/updatePwd',
+	updatePwdUrl:'/inspection/officerinfo/updatePwd',
 	//退出登录
-	getLoginOutUrl:'/auth/loginOut',
+	getLoginOutUrl:'/inspection/auth/loginOut',
 	//所有路段、停车场数据集接口
-	getRoadAllListUrl:'/roadspace/getRoadAllList',
+	getRoadAllListUrl:'/inspection/roadspace/getRoadAllList',
 	//问题上报接口
-	reportUrl:'/deviceexcptionprocess/addOtherExcption',
+	reportUrl:'/inspection/deviceexcptionprocess/addOtherExcption',
 	//其他问题上报历史记录列表
-	selectOtherExcptionList:'/deviceexcptionprocess/selectOtherExcptionList',
+	selectOtherExcptionList:'/inspection/deviceexcptionprocess/selectOtherExcptionList',
 	//查看上报问题详情
-	reportDetail:'/deviceexcptionprocess/getById',
+	reportDetail:'/inspection/deviceexcptionprocess/getById',
 	//应急处置列表
-	emergencyReportList:'/deviceexcptionprocess/selectHandleExcptionList',
+	emergencyReportList:'/inspection/deviceexcptionprocess/selectHandleExcptionList',
 	//问题上报接口
-	reportEmergency:'/deviceexcptionprocess/addHandleExcption',
+	reportEmergency:'/inspection/deviceexcptionprocess/addHandleExcption',
 	//收费员问题类型数据接口
-	payeeExceptionType:'/roadspace/type/payee_exception_type',
+	payeeExceptionType:'/inspection/roadspace/type/payee_exception_type',
 	//收费员问题列表
-	payeeReportList:'/payeeexcption',
+	payeeReportList:'/inspection/payeeexcption',
 	//收费员问题上报
-	payeeReport:'/payeeexcption',
+	payeeReport:'/inspection/payeeexcption',
 	//收费员问题详情
-	payeeReportDetail:'/payeeexcption/getById',
+	payeeReportDetail:'/inspection/payeeexcption/getById',
 	//设备异常处理设备数据接口
-	processDevice:'/roadspace/type/process_device',
+	processDevice:'/inspection/roadspace/type/process_device',
 	//地磁设备异常处理设备数据接口
-	processDeviceGeo:'/roadspace/type/process_device_geo',
+	processDeviceGeo:'/inspection/roadspace/type/process_device_geo',
 	//车位锁设备异常处理设备数据接口
-	processDeviceLock:'/roadspace/type/process_device_lock',
+	processDeviceLock:'/inspection/roadspace/type/process_device_lock',
 	//停车场设备异常处理设备数据接口
-	processDeviceRoom:'/roadspace/type/process_device_room',
+	processDeviceRoom:'/inspection/roadspace/type/process_device_room',
 	//设备异常损坏类型数据接口
-	damageType:'/roadspace/type/damage_type',
+	damageType:'/inspection/roadspace/type/damage_type',
 	//设备异常处理方式数据接口
-	processType:'/roadspace/type/process_type',
+	processType:'/inspection/roadspace/type/process_type',
 	//查询巡检员打卡路段信息
-	punchInfoUrl:'/officerpunch/punchInfo/',
+	punchInfoUrl:'/inspection/officerpunch/punchInfo/',
 	//巡检员打卡签到
-	punchInUrl:'/officerpunch/punchIn',
+	punchInUrl:'/inspection/officerpunch/punchIn',
 	//设备信息列表
-	getDeviceListUrl:'/roadspace/list',
+	getDeviceListUrl:'/inspection/roadspace/list',
 	//巡检员分配路段数据集接口
-	getRoadListUrl:'/roadspace/getRoadList',
+	getRoadListUrl:'/inspection/roadspace/getRoadList',
 	//地磁、车位锁设备信息
-	getSelectDeviceListUrl:'/roadspace/selectDeviceList',
+	getSelectDeviceListUrl:'/inspection/roadspace/selectDeviceList',
 	//设备低电量,低信号,故障分隔值数据接口
-	geoDeviceStatustUrl:'/roadspace/type/geo_device_status',
+	geoDeviceStatustUrl:'/inspection/roadspace/type/geo_device_status',
 	//车位锁低电量、故障数据接口
-	lockDeviceStatustUrl:'/roadspace/type/lock_device_status',
+	lockDeviceStatustUrl:'/inspection/roadspace/type/lock_device_status',
 	//地磁、车位锁设备详情
-	findRoadSpaceVoByIdUrl:'/roadspace/findDeviceById',
+	findRoadSpaceVoByIdUrl:'/inspection/roadspace/findDeviceById',
 	//地磁、车位锁设备详情
-	deviceLogUrl:'/roadspace/selectDeviceLog',
+	deviceLogUrl:'/inspection/roadspace/selectDeviceLog',
 	//设备异常上报
-	deviceexcptionprocessUrl:'/deviceexcptionprocess',
+	deviceexcptionprocessUrl:'/inspection/deviceexcptionprocess',
 	//异常记录详情
-	excptionById:'/deviceexcptionprocess/getExcptionById',
+	excptionById:'/inspection/deviceexcptionprocess/getExcptionById',
 	//心跳是否有车状态数据接口
-	placeStatusUrl:'/roadspace/type/place_status',
+	placeStatusUrl:'/inspection/roadspace/type/place_status',
 	//道闸设备列表
-	selectParkDeviceListUrl:'/roadspace/selectParkDeviceList',
+	selectParkDeviceListUrl:'/inspection/roadspace/selectParkDeviceList',
 	//查询停车场未出场的车辆信息
-	selectParkVehicleList:'/roadspace/selectParkVehicleList',
+	selectParkVehicleList:'/inspection/roadspace/selectParkVehicleList',
 	//查询停车场车位信息
-	selectParkNumUrl:'/roadspace/selectParkNum',
+	selectParkNumUrl:'/inspection/roadspace/selectParkNum',
 	//道闸设备详细信息
-	findParkDeviceByIdUrl:'/roadspace/findParkDeviceById',
+	findParkDeviceByIdUrl:'/inspection/roadspace/findParkDeviceById',
 	//道闸设备详细信息
-	controlDeviceUrl:'/roadspace/roadway/control',
+	controlDeviceUrl:'/inspection/roadspace/roadway/control',
 	//通知消息列表
-	inspecmsgUrl:'/inspecmsg',
+	inspecmsgUrl:'/inspection/inspecmsg',
 	//查看通知消息详情
-	inspecmsgDetailsUrl:'/inspecmsg/findById',
+	inspecmsgDetailsUrl:'/inspection/inspecmsg/findById',
 	//修改通知为已读
-	updateInspecMsgStatusUrl:'/inspecmsg/updateInspecMsgStatus',
+	updateInspecMsgStatusUrl:'/inspection/inspecmsg/updateInspecMsgStatus',
 	//查询未读通知数
-	getUnreadMsgTotalUrl:'/inspecmsg/selectNoRedNum',
+	getUnreadMsgTotalUrl:'/inspection/inspecmsg/selectNoRedNum',
 	//车位锁挡板状态数据接口
-	deviceLockStatusUrl:'/roadspace/type/device_lock_status',
+	deviceLockStatusUrl:'/inspection/roadspace/type/device_lock_status',
 	//收费员列表
-	payeeList:'/payeeexcption/selectPayeeInfo',
+	payeeList:'/inspection/payeeexcption/selectPayeeInfo',
+}
+const otherApiUrl = {
+	//车位锁列表升降板
+	lockControl:'/device/lock/control',
 }
 
 export {
-	apiurl
+	apiurl,
+	otherApiUrl
 }

+ 4 - 4
common/config.js

@@ -1,11 +1,11 @@
 const node_dev = process.env.H_NODE_ENV;
 //运行到浏览器用的
 // 64
-// let baseUrl='https://wx.hw.hongweisoft.com/parking/inspection';
-// let upFileUrl='https://wx.hw.hongweisoft.com/ycpharmacy/file/upload/single/minio';
+let baseUrl='https://wx.hw.hongweisoft.com/parking';
+let upFileUrl='https://wx.hw.hongweisoft.com/ycpharmacy/file/upload/single/minio';
 // 正式
-let baseUrl='https://parking.pdzhtc.com/inspection';
-let upFileUrl='https://parking.pdzhtc.com/file/tencent/upload';
+// let baseUrl='https://parking.pdzhtc.com';
+// let upFileUrl='https://parking.pdzhtc.com/file/tencent/upload';
 //打包用的
 if (node_dev) {
  baseUrl = process.env.H_BASE_URL;

+ 2 - 2
package.json

@@ -6,7 +6,7 @@
         "env": {
           "UNI_PLATFORM": "h5",
           "H_NODE_ENV": "development",
-          "H_BASE_URL": "https://wx.hw.hongweisoft.com/parking/inspection",
+          "H_BASE_URL": "https://wx.hw.hongweisoft.com/parking",
           "H_UP_FILE_URL": "https://wx.hw.hongweisoft.com/ycpharmacy/file/upload/single/minio"
         }
       },
@@ -15,7 +15,7 @@
         "env": {
           "UNI_PLATFORM": "h5",
           "H_NODE_ENV": "production",
-          "H_BASE_URL": "https://parking.pdzhtc.com/inspection",
+          "H_BASE_URL": "https://parking.pdzhtc.com",
           "H_UP_FILE_URL": "https://parking.pdzhtc.com/file/tencent/upload"
         }
       }

+ 35 - 4
pages/deviceList/deviceListType2/deviceListType2.vue

@@ -17,7 +17,7 @@
 					<view class="top u-flex u-flex-wrap u-row-between">
 						<view class="space-name">{{item.spaceName}}</view>
 						<view class="signal">
-							<text>{{item.deviceStatus|device2Status}}</text>
+							<text @click.stop="lockControl(item)">{{item.deviceStatus|device2Status}}</text>
 							<image v-if="item.deviceBattery&&item.deviceBattery<lowBattery" class="img" src="../../../static/img/electricity-r.png" mode="heightFix"></image>
 							<image v-else-if="item.deviceBattery&&item.deviceBattery>=lowBattery" class="img" src="../../../static/img/electricity-g.png" mode="heightFix"></image>
 						</view>
@@ -30,12 +30,22 @@
 				</view>
 			</view>
 		</mescroll-uni>
-		<u-select v-model="deviceStatusSelect" :list="deviceStatusList" @confirm="deviceStatusSelectConfirm"></u-select>
+		<u-select v-model="deviceStatusSelect" :list="deviceStatusList" @confirm="deviceStatusSelectConfirm"></u-select>
+		<u-modal 
+			v-model="lockControlModal" 
+			@confirm="lockControlConfirm" 
+			:content="lockControlContent" 
+			:content-style="{padding:'10px 10px 20px'}"
+			ref="lockControl" 
+			:show-cancel-button="true"
+			:async-close="true">
+		</u-modal>
 	</view>
 </template>
 
 <script>
-	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	import { otherApiUrl } from '@/common/apiurl.js';
 	export default{
 		mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
 		components:{
@@ -80,7 +90,13 @@
 				},
 				dataList:[],
 				lowBattery:'',
-				lowSignal:''
+				lowSignal:'',
+				lockControlModal:false,
+				lockControlContent:'',
+				lockControlForm:{
+					deviceNo:'',
+					cmd:''
+				}
 				
 			}
 		},
@@ -133,6 +149,21 @@
 					}
 				})
 			},
+			lockControl(item){
+				this.lockControlContent = `是否确认针对设备编号为“${item.deviceNo}”的车位锁进行【${item.deviceStatus==1?'降板':'升板'}】操作?`;
+				this.lockControlForm.deviceNo = item.deviceNo;
+				this.lockControlForm.cmd = item.deviceStatus==1?'down':'up';
+				this.lockControlModal = true;
+			},
+			async lockControlConfirm(){
+				// console.log('lockControlForm',this.lockControlForm);
+				let { code, data, msg } = await this.$u.post(otherApiUrl.lockControl,this.lockControlForm);
+				uni.showToast({
+					title:msg,
+					icon:"none"
+				});
+				this.lockControlModal = false;
+			},
 			// 切换菜单
 			tabChange(index) {
 				this.tabCurrent = index;