diff --git a/miniprogram/app.js b/miniprogram/app.js index 4f1ad89..1be30c7 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -26,7 +26,7 @@ indexCount:1, nickName:"", userName:"", - currentUserName:"", + currentUserName:"", // 当前用户的名字 role:"", // 角色,是管理用户还是普通用户 isConfigProject: '', // 管理用户是否配置了选择项目,,1 是【选择项目】,'0'否,【不选择项目】, devcode:"", diff --git a/miniprogram/app.js b/miniprogram/app.js index 4f1ad89..1be30c7 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -26,7 +26,7 @@ indexCount:1, nickName:"", userName:"", - currentUserName:"", + currentUserName:"", // 当前用户的名字 role:"", // 角色,是管理用户还是普通用户 isConfigProject: '', // 管理用户是否配置了选择项目,,1 是【选择项目】,'0'否,【不选择项目】, devcode:"", diff --git a/miniprogram/images/addNew.png b/miniprogram/images/addNew.png deleted file mode 100644 index 654768e..0000000 --- a/miniprogram/images/addNew.png +++ /dev/null Binary files differ diff --git a/miniprogram/app.js b/miniprogram/app.js index 4f1ad89..1be30c7 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -26,7 +26,7 @@ indexCount:1, nickName:"", userName:"", - currentUserName:"", + currentUserName:"", // 当前用户的名字 role:"", // 角色,是管理用户还是普通用户 isConfigProject: '', // 管理用户是否配置了选择项目,,1 是【选择项目】,'0'否,【不选择项目】, devcode:"", diff --git a/miniprogram/images/addNew.png b/miniprogram/images/addNew.png deleted file mode 100644 index 654768e..0000000 --- a/miniprogram/images/addNew.png +++ /dev/null Binary files differ diff --git a/miniprogram/images/gray-marker.png b/miniprogram/images/gray-marker.png index ab8f593..b800a31 100644 --- a/miniprogram/images/gray-marker.png +++ b/miniprogram/images/gray-marker.png Binary files differ diff --git a/miniprogram/app.js b/miniprogram/app.js index 4f1ad89..1be30c7 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -26,7 +26,7 @@ indexCount:1, nickName:"", userName:"", - currentUserName:"", + currentUserName:"", // 当前用户的名字 role:"", // 角色,是管理用户还是普通用户 isConfigProject: '', // 管理用户是否配置了选择项目,,1 是【选择项目】,'0'否,【不选择项目】, devcode:"", diff --git a/miniprogram/images/addNew.png b/miniprogram/images/addNew.png deleted file mode 100644 index 654768e..0000000 --- a/miniprogram/images/addNew.png +++ /dev/null Binary files differ diff --git a/miniprogram/images/gray-marker.png b/miniprogram/images/gray-marker.png index ab8f593..b800a31 100644 --- a/miniprogram/images/gray-marker.png +++ b/miniprogram/images/gray-marker.png Binary files differ diff --git a/miniprogram/images/jia.png b/miniprogram/images/jia.png deleted file mode 100644 index 71e68b4..0000000 --- a/miniprogram/images/jia.png +++ /dev/null Binary files differ diff --git a/miniprogram/app.js b/miniprogram/app.js index 4f1ad89..1be30c7 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -26,7 +26,7 @@ indexCount:1, nickName:"", userName:"", - currentUserName:"", + currentUserName:"", // 当前用户的名字 role:"", // 角色,是管理用户还是普通用户 isConfigProject: '', // 管理用户是否配置了选择项目,,1 是【选择项目】,'0'否,【不选择项目】, devcode:"", diff --git a/miniprogram/images/addNew.png b/miniprogram/images/addNew.png deleted file mode 100644 index 654768e..0000000 --- a/miniprogram/images/addNew.png +++ /dev/null Binary files differ diff --git a/miniprogram/images/gray-marker.png b/miniprogram/images/gray-marker.png index ab8f593..b800a31 100644 --- a/miniprogram/images/gray-marker.png +++ b/miniprogram/images/gray-marker.png Binary files differ diff --git a/miniprogram/images/jia.png b/miniprogram/images/jia.png deleted file mode 100644 index 71e68b4..0000000 --- a/miniprogram/images/jia.png +++ /dev/null Binary files differ diff --git a/miniprogram/images/minusNew.png b/miniprogram/images/minusNew.png deleted file mode 100644 index 6db0fe7..0000000 --- a/miniprogram/images/minusNew.png +++ /dev/null Binary files differ diff --git a/miniprogram/app.js b/miniprogram/app.js index 4f1ad89..1be30c7 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -26,7 +26,7 @@ indexCount:1, nickName:"", userName:"", - currentUserName:"", + currentUserName:"", // 当前用户的名字 role:"", // 角色,是管理用户还是普通用户 isConfigProject: '', // 管理用户是否配置了选择项目,,1 是【选择项目】,'0'否,【不选择项目】, devcode:"", diff --git a/miniprogram/images/addNew.png b/miniprogram/images/addNew.png deleted file mode 100644 index 654768e..0000000 --- a/miniprogram/images/addNew.png +++ /dev/null Binary files differ diff --git a/miniprogram/images/gray-marker.png b/miniprogram/images/gray-marker.png index ab8f593..b800a31 100644 --- a/miniprogram/images/gray-marker.png +++ b/miniprogram/images/gray-marker.png Binary files differ diff --git a/miniprogram/images/jia.png b/miniprogram/images/jia.png deleted file mode 100644 index 71e68b4..0000000 --- a/miniprogram/images/jia.png +++ /dev/null Binary files differ diff --git a/miniprogram/images/minusNew.png b/miniprogram/images/minusNew.png deleted file mode 100644 index 6db0fe7..0000000 --- a/miniprogram/images/minusNew.png +++ /dev/null Binary files differ diff --git a/miniprogram/images/ys.png b/miniprogram/images/ys.png deleted file mode 100644 index c539501..0000000 --- a/miniprogram/images/ys.png +++ /dev/null Binary files differ diff --git a/miniprogram/app.js b/miniprogram/app.js index 4f1ad89..1be30c7 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -26,7 +26,7 @@ indexCount:1, nickName:"", userName:"", - currentUserName:"", + currentUserName:"", // 当前用户的名字 role:"", // 角色,是管理用户还是普通用户 isConfigProject: '', // 管理用户是否配置了选择项目,,1 是【选择项目】,'0'否,【不选择项目】, devcode:"", diff --git a/miniprogram/images/addNew.png b/miniprogram/images/addNew.png deleted file mode 100644 index 654768e..0000000 --- a/miniprogram/images/addNew.png +++ /dev/null Binary files differ diff --git a/miniprogram/images/gray-marker.png b/miniprogram/images/gray-marker.png index ab8f593..b800a31 100644 --- a/miniprogram/images/gray-marker.png +++ b/miniprogram/images/gray-marker.png Binary files differ diff --git a/miniprogram/images/jia.png b/miniprogram/images/jia.png deleted file mode 100644 index 71e68b4..0000000 --- a/miniprogram/images/jia.png +++ /dev/null Binary files differ diff --git a/miniprogram/images/minusNew.png b/miniprogram/images/minusNew.png deleted file mode 100644 index 6db0fe7..0000000 --- a/miniprogram/images/minusNew.png +++ /dev/null Binary files differ diff --git a/miniprogram/images/ys.png b/miniprogram/images/ys.png deleted file mode 100644 index c539501..0000000 --- a/miniprogram/images/ys.png +++ /dev/null Binary files differ diff --git a/miniprogram/pages/addDevice/addDevice.wxml b/miniprogram/pages/addDevice/addDevice.wxml index 6e4022b..51e4e7a 100644 --- a/miniprogram/pages/addDevice/addDevice.wxml +++ b/miniprogram/pages/addDevice/addDevice.wxml @@ -108,8 +108,7 @@ /> - - + - + diff --git a/miniprogram/app.js b/miniprogram/app.js index 4f1ad89..1be30c7 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -26,7 +26,7 @@ indexCount:1, nickName:"", userName:"", - currentUserName:"", + currentUserName:"", // 当前用户的名字 role:"", // 角色,是管理用户还是普通用户 isConfigProject: '', // 管理用户是否配置了选择项目,,1 是【选择项目】,'0'否,【不选择项目】, devcode:"", diff --git a/miniprogram/images/addNew.png b/miniprogram/images/addNew.png deleted file mode 100644 index 654768e..0000000 --- a/miniprogram/images/addNew.png +++ /dev/null Binary files differ diff --git a/miniprogram/images/gray-marker.png b/miniprogram/images/gray-marker.png index ab8f593..b800a31 100644 --- a/miniprogram/images/gray-marker.png +++ b/miniprogram/images/gray-marker.png Binary files differ diff --git a/miniprogram/images/jia.png b/miniprogram/images/jia.png deleted file mode 100644 index 71e68b4..0000000 --- a/miniprogram/images/jia.png +++ /dev/null Binary files differ diff --git a/miniprogram/images/minusNew.png b/miniprogram/images/minusNew.png deleted file mode 100644 index 6db0fe7..0000000 --- a/miniprogram/images/minusNew.png +++ /dev/null Binary files differ diff --git a/miniprogram/images/ys.png b/miniprogram/images/ys.png deleted file mode 100644 index c539501..0000000 --- a/miniprogram/images/ys.png +++ /dev/null Binary files differ diff --git a/miniprogram/pages/addDevice/addDevice.wxml b/miniprogram/pages/addDevice/addDevice.wxml index 6e4022b..51e4e7a 100644 --- a/miniprogram/pages/addDevice/addDevice.wxml +++ b/miniprogram/pages/addDevice/addDevice.wxml @@ -108,8 +108,7 @@ /> - - + - + diff --git a/miniprogram/pages/addDevicelog/addDeviceLog.wxml b/miniprogram/pages/addDevicelog/addDeviceLog.wxml index eaa4533..de4cb95 100644 --- a/miniprogram/pages/addDevicelog/addDeviceLog.wxml +++ b/miniprogram/pages/addDevicelog/addDeviceLog.wxml @@ -115,8 +115,8 @@ /> - + - + diff --git a/miniprogram/app.js b/miniprogram/app.js index 4f1ad89..1be30c7 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -26,7 +26,7 @@ indexCount:1, nickName:"", userName:"", - currentUserName:"", + currentUserName:"", // 当前用户的名字 role:"", // 角色,是管理用户还是普通用户 isConfigProject: '', // 管理用户是否配置了选择项目,,1 是【选择项目】,'0'否,【不选择项目】, devcode:"", diff --git a/miniprogram/images/addNew.png b/miniprogram/images/addNew.png deleted file mode 100644 index 654768e..0000000 --- a/miniprogram/images/addNew.png +++ /dev/null Binary files differ diff --git a/miniprogram/images/gray-marker.png b/miniprogram/images/gray-marker.png index ab8f593..b800a31 100644 --- a/miniprogram/images/gray-marker.png +++ b/miniprogram/images/gray-marker.png Binary files differ diff --git a/miniprogram/images/jia.png b/miniprogram/images/jia.png deleted file mode 100644 index 71e68b4..0000000 --- a/miniprogram/images/jia.png +++ /dev/null Binary files differ diff --git a/miniprogram/images/minusNew.png b/miniprogram/images/minusNew.png deleted file mode 100644 index 6db0fe7..0000000 --- a/miniprogram/images/minusNew.png +++ /dev/null Binary files differ diff --git a/miniprogram/images/ys.png b/miniprogram/images/ys.png deleted file mode 100644 index c539501..0000000 --- a/miniprogram/images/ys.png +++ /dev/null Binary files differ diff --git a/miniprogram/pages/addDevice/addDevice.wxml b/miniprogram/pages/addDevice/addDevice.wxml index 6e4022b..51e4e7a 100644 --- a/miniprogram/pages/addDevice/addDevice.wxml +++ b/miniprogram/pages/addDevice/addDevice.wxml @@ -108,8 +108,7 @@ /> - - + - + diff --git a/miniprogram/pages/addDevicelog/addDeviceLog.wxml b/miniprogram/pages/addDevicelog/addDeviceLog.wxml index eaa4533..de4cb95 100644 --- a/miniprogram/pages/addDevicelog/addDeviceLog.wxml +++ b/miniprogram/pages/addDevicelog/addDeviceLog.wxml @@ -115,8 +115,8 @@ /> - + - + diff --git a/miniprogram/pages/defineMap/defineMap.js b/miniprogram/pages/defineMap/defineMap.js index f21c39e..5d00faf 100644 --- a/miniprogram/pages/defineMap/defineMap.js +++ b/miniprogram/pages/defineMap/defineMap.js @@ -19,6 +19,21 @@ {label: '消防井', value: '16'}, {label: '监控井', value: '17'}, ] +const tamWellTypes = [ + {label: '雨水井', value: '3'}, + {label: '污水井', value: '4'}, + {label: '燃气井', value: '5'}, + {label: '热力井', value: '7'}, + {label: '通信井', value: '8'}, + {label: '给水井', value: '9'}, + {label: '路灯井', value: '10'}, + {label: '园林井', value: '11'}, + {label: '消防井', value: '12'}, + {label: '城区电力', value: '13'}, + {label: '电力电缆', value: '14'}, + {label: '其他', value: '15'}, + {label: '井找不到', value: '6'}, +] let wellList = [] Page({ data: { @@ -41,6 +56,22 @@ '消防井', '监控井' ], + tamWellTypesList: [ + '雨水井', + '污水井', + '燃气井', + '热力井', + '通信井', + '给水井', + '路灯井', + '园林井', + '消防井', + '城区电力', + '电力电缆', + '其他', + '井找不到', + ], + showTAMSelect: false, // 是否显示天安门井 longitude: "116.627340", latitude: "39.874390", scale: 17, @@ -249,19 +280,18 @@ getMarkerIcon(status, wellType) { // 地图上 橙红色:井打不开2,黄色 :已安装,蓝色1:未安装0 - if((wellType === '燃气井' || wellType === '雨水井' || wellType === '污水井') && status !== '3' && status !== '4' && status !== '5' && status !== '6') { + if((wellType === '燃气井' || wellType === '雨水井' || wellType === '污水井') && status === '0') { return '/images/gray-marker.png' } else if((wellType === '燃气井' || wellType === '雨水井' || wellType === '污水井') && (status === '3' || status === '4' || status === '5')) { return '/images/purple-marker.png' - } else if(status === '6') { - return '/images/red-marker.png' } else{ switch(status) { case '0': return '/images/blue-marker.png'; case '1': return '/images/yellow-marker.png'; case '2': return '/images/orange-marker.png'; - default: return '/images/default-marker.png'; + case '6': return '/images/red-marker.png'; // 找不到 + default: return '/images/purple-marker.png'; } } }, @@ -776,6 +806,69 @@ }) } }) + }, + // --------------------------------------------天安门井相关方法---------------------------------- + // 打开popup + showPopupTAMSelect() { + this.setData({ showTAMSelect: true }); + }, + // 关闭popup + onCloseTAMSelect() { + this.setData({ showTAMSelect: false }); + }, + // 点击确认按钮 + confirmSelectTAMWell: function (event) { + var that = this + console.log('确认选择井类型', event); + const { picker, value, index } = event.detail; + that.onCloseTAMSelect() + console.log('ppppp'); + console.log(value); + let sendIsInStallParam = '' + const tempIndex = tamWellTypes.findIndex(item => item.label === value) + if(tempIndex !== -1) { + sendIsInStallParam = tamWellTypes[tempIndex].value + } + console.log(sendIsInStallParam); + wx.showLoading({ + // title: '获取闸井信息中', + mask: true, // 是否显示透明蒙层,防止触摸穿透 + }) + wx.request({ + method: "post", + url: app.globalData.httpsUrl + "/appDeviceAdd/markerTamWell", + data: { + wellCode: that.data.activeMarker.manholeInfo.wellCode, + isInStall: sendIsInStallParam, + personName: app.globalData.currentUserName, // 当前用户的名字 + }, + header: { + 'content-type': 'application/x-www-form-urlencoded;charset=utf-8' + }, + success(res) { + wx.hideLoading() + const index = wellList.findIndex(item => item.wellCode === that.data.activeMarkerWellCode) + if(index !== -1) { + wellList[index].wellType = value + wellList[index].isInStall = sendIsInStallParam + that.initManholeData(wellList) + } + wx.showToast({ + title: "天安门井状态修改成功", + icon: 'none', + duration: 2000 + }) + }, + fail(err) { + wx.hideLoading() + wx.showToast({ + title: "天安门井状态修改失败", + icon: 'none', + duration: 2000 + }) + } + }) } + // --------------------------------------------天安门井相关方法---------------------------------- }) \ No newline at end of file diff --git a/miniprogram/app.js b/miniprogram/app.js index 4f1ad89..1be30c7 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -26,7 +26,7 @@ indexCount:1, nickName:"", userName:"", - currentUserName:"", + currentUserName:"", // 当前用户的名字 role:"", // 角色,是管理用户还是普通用户 isConfigProject: '', // 管理用户是否配置了选择项目,,1 是【选择项目】,'0'否,【不选择项目】, devcode:"", diff --git a/miniprogram/images/addNew.png b/miniprogram/images/addNew.png deleted file mode 100644 index 654768e..0000000 --- a/miniprogram/images/addNew.png +++ /dev/null Binary files differ diff --git a/miniprogram/images/gray-marker.png b/miniprogram/images/gray-marker.png index ab8f593..b800a31 100644 --- a/miniprogram/images/gray-marker.png +++ b/miniprogram/images/gray-marker.png Binary files differ diff --git a/miniprogram/images/jia.png b/miniprogram/images/jia.png deleted file mode 100644 index 71e68b4..0000000 --- a/miniprogram/images/jia.png +++ /dev/null Binary files differ diff --git a/miniprogram/images/minusNew.png b/miniprogram/images/minusNew.png deleted file mode 100644 index 6db0fe7..0000000 --- a/miniprogram/images/minusNew.png +++ /dev/null Binary files differ diff --git a/miniprogram/images/ys.png b/miniprogram/images/ys.png deleted file mode 100644 index c539501..0000000 --- a/miniprogram/images/ys.png +++ /dev/null Binary files differ diff --git a/miniprogram/pages/addDevice/addDevice.wxml b/miniprogram/pages/addDevice/addDevice.wxml index 6e4022b..51e4e7a 100644 --- a/miniprogram/pages/addDevice/addDevice.wxml +++ b/miniprogram/pages/addDevice/addDevice.wxml @@ -108,8 +108,7 @@ /> - - + - + diff --git a/miniprogram/pages/addDevicelog/addDeviceLog.wxml b/miniprogram/pages/addDevicelog/addDeviceLog.wxml index eaa4533..de4cb95 100644 --- a/miniprogram/pages/addDevicelog/addDeviceLog.wxml +++ b/miniprogram/pages/addDevicelog/addDeviceLog.wxml @@ -115,8 +115,8 @@ /> - + - + diff --git a/miniprogram/pages/defineMap/defineMap.js b/miniprogram/pages/defineMap/defineMap.js index f21c39e..5d00faf 100644 --- a/miniprogram/pages/defineMap/defineMap.js +++ b/miniprogram/pages/defineMap/defineMap.js @@ -19,6 +19,21 @@ {label: '消防井', value: '16'}, {label: '监控井', value: '17'}, ] +const tamWellTypes = [ + {label: '雨水井', value: '3'}, + {label: '污水井', value: '4'}, + {label: '燃气井', value: '5'}, + {label: '热力井', value: '7'}, + {label: '通信井', value: '8'}, + {label: '给水井', value: '9'}, + {label: '路灯井', value: '10'}, + {label: '园林井', value: '11'}, + {label: '消防井', value: '12'}, + {label: '城区电力', value: '13'}, + {label: '电力电缆', value: '14'}, + {label: '其他', value: '15'}, + {label: '井找不到', value: '6'}, +] let wellList = [] Page({ data: { @@ -41,6 +56,22 @@ '消防井', '监控井' ], + tamWellTypesList: [ + '雨水井', + '污水井', + '燃气井', + '热力井', + '通信井', + '给水井', + '路灯井', + '园林井', + '消防井', + '城区电力', + '电力电缆', + '其他', + '井找不到', + ], + showTAMSelect: false, // 是否显示天安门井 longitude: "116.627340", latitude: "39.874390", scale: 17, @@ -249,19 +280,18 @@ getMarkerIcon(status, wellType) { // 地图上 橙红色:井打不开2,黄色 :已安装,蓝色1:未安装0 - if((wellType === '燃气井' || wellType === '雨水井' || wellType === '污水井') && status !== '3' && status !== '4' && status !== '5' && status !== '6') { + if((wellType === '燃气井' || wellType === '雨水井' || wellType === '污水井') && status === '0') { return '/images/gray-marker.png' } else if((wellType === '燃气井' || wellType === '雨水井' || wellType === '污水井') && (status === '3' || status === '4' || status === '5')) { return '/images/purple-marker.png' - } else if(status === '6') { - return '/images/red-marker.png' } else{ switch(status) { case '0': return '/images/blue-marker.png'; case '1': return '/images/yellow-marker.png'; case '2': return '/images/orange-marker.png'; - default: return '/images/default-marker.png'; + case '6': return '/images/red-marker.png'; // 找不到 + default: return '/images/purple-marker.png'; } } }, @@ -776,6 +806,69 @@ }) } }) + }, + // --------------------------------------------天安门井相关方法---------------------------------- + // 打开popup + showPopupTAMSelect() { + this.setData({ showTAMSelect: true }); + }, + // 关闭popup + onCloseTAMSelect() { + this.setData({ showTAMSelect: false }); + }, + // 点击确认按钮 + confirmSelectTAMWell: function (event) { + var that = this + console.log('确认选择井类型', event); + const { picker, value, index } = event.detail; + that.onCloseTAMSelect() + console.log('ppppp'); + console.log(value); + let sendIsInStallParam = '' + const tempIndex = tamWellTypes.findIndex(item => item.label === value) + if(tempIndex !== -1) { + sendIsInStallParam = tamWellTypes[tempIndex].value + } + console.log(sendIsInStallParam); + wx.showLoading({ + // title: '获取闸井信息中', + mask: true, // 是否显示透明蒙层,防止触摸穿透 + }) + wx.request({ + method: "post", + url: app.globalData.httpsUrl + "/appDeviceAdd/markerTamWell", + data: { + wellCode: that.data.activeMarker.manholeInfo.wellCode, + isInStall: sendIsInStallParam, + personName: app.globalData.currentUserName, // 当前用户的名字 + }, + header: { + 'content-type': 'application/x-www-form-urlencoded;charset=utf-8' + }, + success(res) { + wx.hideLoading() + const index = wellList.findIndex(item => item.wellCode === that.data.activeMarkerWellCode) + if(index !== -1) { + wellList[index].wellType = value + wellList[index].isInStall = sendIsInStallParam + that.initManholeData(wellList) + } + wx.showToast({ + title: "天安门井状态修改成功", + icon: 'none', + duration: 2000 + }) + }, + fail(err) { + wx.hideLoading() + wx.showToast({ + title: "天安门井状态修改失败", + icon: 'none', + duration: 2000 + }) + } + }) } + // --------------------------------------------天安门井相关方法---------------------------------- }) \ No newline at end of file diff --git a/miniprogram/pages/defineMap/defineMap.wxml b/miniprogram/pages/defineMap/defineMap.wxml index 0c111f3..57fc3ea 100644 --- a/miniprogram/pages/defineMap/defineMap.wxml +++ b/miniprogram/pages/defineMap/defineMap.wxml @@ -40,8 +40,6 @@ - - @@ -57,6 +55,11 @@ 井找不到 --> + @@ -57,6 +55,11 @@ 井找不到 --> + @@ -57,6 +55,11 @@ 井找不到 --> + @@ -57,6 +55,11 @@ 井找不到 --> +