wh 2 rokov pred
rodič
commit
ae3fb7bde5
5 zmenil súbory, kde vykonal 244 pridanie a 38 odobranie
  1. 11 8
      App.vue
  2. 93 0
      http/Api.js
  3. 25 27
      pages.json
  4. 40 3
      pages/Workorder/Remotecontrol/Remotecontrol.vue
  5. 75 0
      utils/index.js

+ 11 - 8
App.vue

@@ -1,19 +1,22 @@
 <script>
+	import Api from "./@/http/Api.js";
 	export default {
 		data() {
 			return {
 			//	globalData: {},
 			}
 		},
+		methods:{
+			getDictAll() {
+			  Api.getDictList().then((res) => {
+				  console.log(res)
+			    window.SITE_CONFIG["dictList"] = res.data;
+			  });
+			},
+		},
 		onLaunch: function() {
-			console.log('App Launch')
-			// uni.getSystemInfo({ //设置屏幕高度
-			// 	success: res => {
-			// 		//减去tabbar的高度,默认为50px
-			// 		this.globalData.screenHeight = res.screenHeight;
-			// 	//	this.globalData.screenWidth = res.screenWidth;
-			// 	}
-			// })
+			// 获取字典列表, 添加并全局变量保存
+			this.getDictAll();
 		},
 		onShow: function() {
 			console.log('App Show')

+ 93 - 0
http/Api.js

@@ -0,0 +1,93 @@
+import $api from '@/http/index.js'
+export default {
+
+    //账号密码登录
+    loginByPwd: (params) => $api.post("/login", params),
+
+    //用户信息
+    getUserInfo: (params) => $api.get("/user/userInfo", params),
+
+    //修改密码
+    updatePwd: (params) => $api.put("/user/password", params),
+
+    //数据字典
+    getDictList: (params) => $api.get("/all",params),
+
+    //首页信息
+    homeData: (params) => $api.get("/home/homedata", params),
+
+    // 获取空间树
+    getBuildInfo: (params) => $api.get("/control/getOrgStructureTree",params),
+
+    //上传图片
+    uploadFile: (params) => $api.post("/uploadFile", params, { header: { "Content-Type": "multipart/form-data" } }),
+
+    //空调设备控制分页
+    airconditioner: (params) => $api.get("/airconditioner/page", params),
+
+    //电表控制分页
+    getElec: (params) => $api.get("/relay/control/page", params),
+
+    //一键开闸关闸
+    elecControl: (params) => $api.post("/relay/control/command", params),
+
+    //空调下发指令
+    setControl: (params) => $api.post("/airconditioner/command", params),
+
+    //继电器下发指令
+    setControlElec: (params) => $api.post("/relay/control/command", params),
+
+    //工单维修--列表
+    repairList: (params) => $api.get("/repairorder/page", params),
+
+    //工单维修--详情
+    repairDetail: (id) => $api.get(`/repairorder/${id}`),
+
+    //工单维修--保存
+    repairSave: (params) => $api.post("/repairorder", params),
+
+    //工单维修--指派
+    repairDispatch: (params) => $api.put('/repairorder', params),
+
+    //工单维修--完成
+    repairFinish: (id) => $api.post(`/repairorder/finish/${id}`),
+
+    //工单维修--联系人列表
+    repairUserList: (params) => $api.get('/user/list',params),
+
+    // 设备异常--列表
+    deviceAlarmList: (params) => $api.get("/home/actualAlertList",params),
+
+    // 欠费待收--列表
+    lackFeeList: (params) => $api.get("/expeditrecordpage",params),
+
+    // 欠费待收--详情
+    lackFeeDetail: (params) => $api.get("/expeditrecord/recordpage",params),
+
+    // 欠费待收--催费
+    lackFeePay: (params) => $api.post("/expeditrecord/charge", params),
+
+    //扣缴记录
+    reduceRecordList: (params) => $api.get("/payrecord/page",params),
+
+    //租户账单
+    rentBillList: (params) => $api.get("/billinfo/paypage",params),
+
+    //租户账单明细--列表
+    rentBillDetail: (params) => $api.post("/billinfo/billDetail", params),
+
+    //获取缴费账户
+    getTenantAccount: (params) => $api.get(`/accountinfo/detail/${params}`),
+
+    //预存缴费
+    tenantPay: (params) => $api.post('/accountinfo/pay', params),
+
+    //立即支付
+    billPay: (params) => $api.post('/billinfo/billPay', params),
+
+    //巡检记录
+    reviewList: (params) => $api.get("/circuitrecord/page",params),
+
+    //巡检记录--打卡
+    reviewClock: (params) => $api.post("/circuitrecord", params),
+}

+ 25 - 27
pages.json

@@ -1,5 +1,5 @@
 {
-	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+	"pages": [ 
 
 
 		{
@@ -31,27 +31,25 @@
 				"navigationBarTitleText": "首页"
 			}
 		}, 
-		// {
-		// 	"path": "pages/equipment/equipment",
-		// 	"style": {
-		// 		"navigationBarTitleText": "设备"
-		// 	}
+		{
+			"path": "pages/equipment/equipment",
+			"style": {
+				"navigationBarTitleText": "设备"
+			}
 		
-		// },
+		},
 		{
 			"path": "pages/Workorder/Workorder",
 			"style": {
 				"navigationBarTitleText": "工作台"
-			//	"navigationStyle": "custom" ,// 隐藏系统导航栏
-					//		"navigationBarTextStyle": "white" 
 			}
 		},
-		// {
-		// 	"path": "pages/Energyconsumption/Energyconsumption",
-		// 	"style": {
-		// 		"navigationBarTitleText": "能耗"
-		// 	}
-		// },
+		{
+			"path": "pages/Energyconsumption/Energyconsumption",
+			"style": {
+				"navigationBarTitleText": "能耗"
+			}
+		},
 		{
 			"path": "pages/my/my",
 			"style": {
@@ -182,24 +180,24 @@
 							"selectedIconPath": "static/tab/h2.png",
 				"text": "首页"
 			},
-			// {
-			// 	"pagePath": "pages/equipment/equipment",
-			// 	"iconPath": "static/tab/s1.png",
-			// 				"selectedIconPath": "static/tab/s2.png",
-			// 	"text": "设备"
-			// },
+			{
+				"pagePath": "pages/equipment/equipment",
+				"iconPath": "static/tab/s1.png",
+							"selectedIconPath": "static/tab/s2.png",
+				"text": "设备"
+			},
 			{
 				"pagePath": "pages/Workorder/Workorder",
 				"iconPath": "static/tab/w1.png",
 							"selectedIconPath": "static/tab/w2.png",
 				"text": "工作台"
 			},			
-			// {
-			// 	"pagePath": "pages/Energyconsumption/Energyconsumption",
-			// 	"iconPath": "static/tab/e1.png",
-			// 				"selectedIconPath": "static/tab/e2.png",
-			// 	"text": "能耗"
-			// },
+			{
+				"pagePath": "pages/Energyconsumption/Energyconsumption",
+				"iconPath": "static/tab/e1.png",
+							"selectedIconPath": "static/tab/e2.png",
+				"text": "能耗"
+			},
 			{
 				"pagePath": "pages/my/my",
 				"iconPath": "static/tab/y1.png",

+ 40 - 3
pages/Workorder/Remotecontrol/Remotecontrol.vue

@@ -1,6 +1,32 @@
 <template>
 	<view>
-		Remotecontrol
+		<view class="header"></view>
+		<view class="position">
+			<u-icon name="map-fill"></u-icon>
+			<text>{{name}}</text>
+			<u-icon name="arrow-rightward"></u-icon>
+		</view>
+		<view class="form">
+			<view class="topbilledit">
+				<view class="changetime1">
+					<picker mode="date" :value="myday" fields="month" @change="dateChange">
+						<view class="selestDate">{{myday}}</view>
+					</picker>
+				</view>
+				<view class="changetime2">
+					<u-icon name="arrow-down-fill" color="#666666" size="20"></u-icon>
+				</view>
+			</view>
+			<view class="topbilledit" @click="typechange">
+				<view class="changetime1">
+					{{mytype}}
+				</view>
+				<view class="changetime2">
+					<u-icon name="arrow-down-fill" color="#666666" size="20"></u-icon>
+				</view>
+			</view>
+		</view>
+		
 	</view>
 </template>
 
@@ -8,11 +34,22 @@
 	export default {
 		data() {
 			return {
-				
+				name:'',
 			}
 		},
 		methods: {
-			
+			 getDeviceTypeList() {
+			      this.deviceTypeList = JSON.parse(
+			        JSON.stringify(getDictDataList("DeviceCategory"))
+			      );
+			      this.deviceTypeList.forEach((item) => {
+			        item.text = item.dictLabel;
+			        item.value = item.dictValue;
+			      });
+			      this.deviceTypeList = this.deviceTypeList.filter(
+			        (item) => item.value != "Relay"
+			      );
+			    },
 		}
 	}
 </script>

+ 75 - 0
utils/index.js

@@ -0,0 +1,75 @@
+export function isEmpty(v) {
+    switch (typeof v) {
+        case 'undefined':
+            return true;
+        case 'string':
+            if (v.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
+            break;
+        case 'boolean':
+            if (!v) return true;
+            break;
+        case 'number':
+            if (isNaN(v)) return true;
+            break;
+        case 'object':
+            if (null === v || v.length === 0) return true;
+            for (var i in v) {
+                return false;
+            }
+            return true;
+    }
+    return false;
+}
+
+/**
+ * 获取字典数据列表
+ * @param dictType  字典类型
+ */
+export function getDictDataList(dictType, subtype) {
+    const type = window.SITE_CONFIG['dictList'].find((element) => (element.dictType === dictType))
+    if (type) {
+        if (dictType == 'PeopleType') {
+            if (subtype == "touch") {
+                return type.dataList.slice(0, 2)
+            } else {
+                return type.dataList
+            }
+        } else {
+            return type.dataList
+        }
+    } else {
+        return []
+    }
+}
+
+export function getCurrentTime() {
+    var date = new Date();
+    var year = date.getFullYear();
+    var month = date.getMonth() + 1;
+    var day = date.getDate();
+    var hours = date.getHours();
+    var minutes = date.getMinutes();
+    var seconds =
+        date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
+    return (year +
+        "-" +
+        month +
+        "-" +
+        day +
+        " " +
+        hours +
+        ":" +
+        minutes +
+        ":" +
+        seconds);
+}
+
+export function getUrlKey(name) {
+    return (
+      decodeURIComponent(
+        (new RegExp("[?|&]" + name + "=" + "([^&;]+?)(&|#|;|$)").exec(
+          location.href
+        ) || [, ""])[1].replace(/\+/g, "%20")
+      ) || null
+    );
+  }