3 Commity a57d0d8dd5 ... 27e6e042d3

Autor SHA1 Wiadomość Data
  wangtong 27e6e042d3 版本修改 1 rok temu
  wangtong 6059739d5f Merge remote-tracking branch 'origin/master' 1 rok temu
  wangtong b86c9b8cff 版本修改 1 rok temu
100 zmienionych plików z 9853 dodań i 3795 usunięć
  1. 80 4
      api/common.js
  2. 2 2
      common/http.js
  3. 27 0
      pages.json
  4. 50 6
      pages/noLogin/CourtyardNetworkManagement/CourtyardNetworkManagement.vue
  5. 706 0
      pages/noLogin/GRegulatingBoxMaintenance/GRegulatingBoxMaintenance.vue
  6. 82 23
      pages/noLogin/LNGStation/LNGStation.vue
  7. 1198 0
      pages/noLogin/PipelineGasUser/PipelineGasUser.vue
  8. 221 36
      pages/noLogin/PressureRegulatingBox/PressureRegulatingBox.vue
  9. 1 1
      pages/noLogin/WarningPileList.vue
  10. 60 21
      pages/noLogin/emergencyRepairOrder/emergencyRepairOrder.vue
  11. 97 6
      pages/noLogin/listProject.vue
  12. 515 0
      pages/noLogin/patrolFleet/patrolFleet.vue
  13. 11 4
      pages/noLogin/regulatorBoxList.vue
  14. 51 9
      pages/noLogin/roadSection/roadSection.vue
  15. 44 6
      pages/noLogin/typeList.vue
  16. 102 6
      pages/noLogin/valveWellInspection/valveWellInspection.vue
  17. 102 0
      uni_modules/lime-signature/changelog.md
  18. 157 0
      uni_modules/lime-signature/components/l-signature/context.js
  19. 362 0
      uni_modules/lime-signature/components/l-signature/l-signature.uvue
  20. 647 0
      uni_modules/lime-signature/components/l-signature/l-signature.vue
  21. 64 0
      uni_modules/lime-signature/components/l-signature/props.js
  22. 228 0
      uni_modules/lime-signature/components/l-signature/render.js
  23. 1 0
      uni_modules/lime-signature/components/l-signature/signature.js
  24. 161 0
      uni_modules/lime-signature/components/l-signature/signature.uts
  25. 181 0
      uni_modules/lime-signature/components/l-signature/utils.js
  26. 54 0
      uni_modules/lime-signature/components/lime-signature/lime-signature.uvue
  27. 381 0
      uni_modules/lime-signature/components/lime-signature/lime-signature.vue
  28. 226 0
      uni_modules/lime-signature/hybrid/html/index.html
  29. 1 0
      uni_modules/lime-signature/hybrid/html/signature.js
  30. 1 0
      uni_modules/lime-signature/hybrid/html/uni.webview.1.5.3.js
  31. 37 0
      uni_modules/lime-signature/index.uts
  32. 84 0
      uni_modules/lime-signature/package.json
  33. 174 0
      uni_modules/lime-signature/readme.md
  34. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  35. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/runtime.js.map
  36. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
  37. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/back.js.map
  38. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/ming-pop/ming-pop.js.map
  39. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/mp-html/mp-html.js.map
  40. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/mp-html/node/node.js.map
  41. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/mypopup.js.map
  42. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/aboutme/aboutme.js.map
  43. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map
  44. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/login.js.map
  45. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/mapindex/mapindex.js.map
  46. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/CourtyardNetworkManagement/CourtyardNetworkManagement.js.map
  47. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/GRegulatingBoxMaintenance/GRegulatingBoxMaintenance.js.map
  48. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/LNGStation/LNGStation.js.map
  49. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/PipelineGasUser/PipelineGasUser.js.map
  50. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/PressureRegulatingBox/PressureRegulatingBox.js.map
  51. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/WarningPileForm/WarningPileForm.js.map
  52. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/WarningPileList.js.map
  53. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/buildinglist.js.map
  54. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/communitylist.js.map
  55. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/emergencyRepairOrder/emergencyRepairOrder.js.map
  56. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/fileList/fileList.js.map
  57. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/listProject.js.map
  58. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/patrolFleet/patrolFleet.js.map
  59. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/regulatorBoxList.js.map
  60. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/roadSection/roadSection.js.map
  61. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/typeList.js.map
  62. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/unitlist.js.map
  63. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/valveWellInspection/valveWellInspection.js.map
  64. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/notice/noticeDetail.js.map
  65. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/notice/noticeList.js.map
  66. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/cc-pullScroolView/components/cc-pullScroolView/cc-pullScroolView.js.map
  67. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/lime-signature/components/l-signature/l-signature.js.map
  68. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-button/u-button.js.map
  69. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-checkbox-group/u-checkbox-group.js.map
  70. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-checkbox/u-checkbox.js.map
  71. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-col/u-col.js.map
  72. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-form-item/u-form-item.js.map
  73. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-form/u-form.js.map
  74. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-grid-item/u-grid-item.js.map
  75. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-grid/u-grid.js.map
  76. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-icon/u-icon.js.map
  77. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-image/u-image.js.map
  78. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-input/u-input.js.map
  79. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-loading/u-loading.js.map
  80. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-mask/u-mask.js.map
  81. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-parse/libs/trees.js.map
  82. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-parse/u-parse.js.map
  83. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-picker/u-picker.js.map
  84. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-popup/u-popup.js.map
  85. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-radio-group/u-radio-group.js.map
  86. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-radio/u-radio.js.map
  87. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-row/u-row.js.map
  88. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-search/u-search.js.map
  89. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-select/u-select.js.map
  90. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-switch/u-switch.js.map
  91. 4 1
      unpackage/dist/dev/mp-weixin/app.json
  92. 3 3
      unpackage/dist/dev/mp-weixin/common/main.js
  93. 2 2
      unpackage/dist/dev/mp-weixin/common/runtime.js
  94. 3601 3537
      unpackage/dist/dev/mp-weixin/common/vendor.js
  95. 15 15
      unpackage/dist/dev/mp-weixin/components/back.js
  96. 14 14
      unpackage/dist/dev/mp-weixin/components/ming-pop/ming-pop.js
  97. 16 16
      unpackage/dist/dev/mp-weixin/components/mp-html/mp-html.js
  98. 19 19
      unpackage/dist/dev/mp-weixin/components/mp-html/node/node.js
  99. 14 14
      unpackage/dist/dev/mp-weixin/components/mypopup.js
  100. 0 0
      unpackage/dist/dev/mp-weixin/pages/index/index.js

+ 80 - 4
api/common.js

@@ -169,6 +169,10 @@ export default {
 	setregulatorBox(data) {
 		return utils.requestEn(`/mobile/regulatorBox`, data, 'POST')
 	},
+	updateregulatorBox(data)
+	{
+		return utils.requestEn(`/mobile/regulatorBox`, data, 'PUT')
+	},
 	setwarningPile(data) {
 		return utils.requestEn(`/mobile/warningPile`, data, 'Put')
 	},
@@ -181,9 +185,15 @@ export default {
 	setcourtyardNetworkManagement(data) {
 		return utils.requestEn(`/mobile/courtyardNetworkManagement`, data, 'POST')
 	},
+	updatecourtyardNetworkManagement(data) {
+		return utils.requestEn(`/mobile/courtyardNetworkManagement`, data, 'PUT')
+	},
 	setemergencyRepair(data) {
 		return utils.requestEn(`/mobile/emergencyRepair`, data, 'POST')
 	},
+	updateemergencyRepair(data) {
+		return utils.requestEn(`/mobile/emergencyRepair`, data, 'PUT')
+	},
 	getOne() {
 		return utils.requestEn(`/mobile/explain/getOne`)
 	},
@@ -200,6 +210,9 @@ export default {
 	saveroadSectionInspection(data) {
 		return utils.requestEn(`/mobile/roadSectionInspection`,data,'POST')
 	},
+	updateroadSectionInspection(data) {
+		return utils.requestEn(`/mobile/roadSectionInspection`,data,'PUT')
+	},
 	getroadSectionInspection(data) {
 		return utils.requestEn(`/mobile/roadSectionInspection/${data}`)
 	},
@@ -211,7 +224,7 @@ export default {
 		return utils.requestEn(`/mobile/emergencyRepair/${data}`)
 	},
 	//调压箱管理控制器
-	getregulatorBox(data) {
+	getregulatorBox2(data) {
 		return utils.requestEn(`/mobile/regulatorBox/${data}`)
 	},
 	//警示桩控制器
@@ -231,7 +244,7 @@ export default {
 	getregulatorBoxList(data) {
 		return utils.requestLo(`/mobile/pressureRegulatingBox/list`, data)
 	},
-	getregulatorBox(data) {
+	getpressureRegulatingBox(data) {
 		return utils.requestEn(`/mobile/pressureRegulatingBox/${data}`)
 	},
 	getvalveWellPositionlist(data)
@@ -242,13 +255,21 @@ export default {
 	{
 		return utils.requestEn(`/mobile/valveWellInspection`, data,'POST')
 	},
+	updatevalveWellPosition(data)
+	{
+		return utils.requestEn(`/mobile/valveWellInspection`, data,'PUT')
+	},
+	getvalveWellPositionId(data)
+	{
+		return utils.requestEn(`/mobile/valveWellPosition/${data}`)
+	},
 	getvalveWellPosition(data)
 	{
 		return utils.requestEn(`/mobile/valveWellInspection/${data}`)
 	},
-	getvalveWellPositionList()
+	getvalveWellPositionList(data)
 	{
-		return utils.requestEn(`/mobile/valveWellInspection/list`)
+		return utils.requestEn(`/mobile/valveWellInspection/list`,data)
 	},
 	getFileList(data)
 	{
@@ -258,6 +279,10 @@ export default {
 	{
 		return utils.requestEn(`/mobile/transmissionStation/`,data,'POST')
 	},
+	updatetransmissionStation(data)
+	{
+		return utils.requestEn(`/mobile/transmissionStation/`,data,'PUT')
+	},
 	gettransmissionStation(data)
 	{
 		return utils.requestEn(`/mobile/transmissionStation/${data}`)
@@ -265,6 +290,57 @@ export default {
 	gettransmissionStationList(data)
 	{
 		return utils.requestLo(`/mobile/transmissionStation/list`)
+	},
+	patrolTeam(data)
+	{
+		return utils.requestEn(`/mobile/patrolTeam`,data,'POST')
+	},
+	updatepatrolTeam(data)
+	{
+		return utils.requestEn(`/mobile/patrolTeam`,data,'PUT')
+	},
+	getpatrolTeam(data)
+	{
+		return utils.requestEn(`/mobile/patrolTeam/${data}`)
+	},
+	getpatrolTeamList(data)
+	{
+		return utils.requestLo(`/mobile/patrolTeam/list`,data)
+	},
+	setregulatingBoxMaintenance(data)
+	{
+		return utils.requestEn(`/mobile/regulatingBoxMaintenance`,data,'POST')
+	},
+	updateregulatingBoxMaintenance(data)
+	{
+		return utils.requestEn(`/mobile/regulatingBoxMaintenance`,data,'PUT')
+	},
+	getregulatingBoxMaintenance(data)
+	{
+		return utils.requestEn(`/mobile/regulatingBoxMaintenance/${data}`)
+	},
+	getregulatingBoxMaintenanceList(data)
+	{
+		return utils.requestLo(`/mobile/regulatingBoxMaintenance/list`,data)
+	}
+	,
+	setpipelineGasUser(data)
+	{
+		return utils.requestEn(`/mobile/pipelineGasUser`,data,'POST')
+	},
+	updatepipelineGasUser(data)
+	{
+		return utils.requestEn(`/mobile/pipelineGasUser`,data,'PUT')
+	},
+	getpipelineGasUser(data)
+	{
+		return utils.requestEn(`/mobile/pipelineGasUser/${data}`)
+	},
+	getpipelineGasUserList(data)
+	{
+		return utils.requestLo(`/mobile/pipelineGasUser/list`,data)
 	}
 	
+	
+	
 }

+ 2 - 2
common/http.js

@@ -1,7 +1,7 @@
 // 配置信息
 export default {
 	// webUrl: 'http://127.0.0.1:8080',
-	 webUrl: 'https://www.cczdsz.cn/prod-api/',
+	// webUrl: 'https://www.cczdsz.cn/prod-api/',
 	// webUrl: 'http://124.221.101.24:8082',
-	//  webUrl: 'http://192.168.4.11:8080',
+	  webUrl: 'http://192.168.4.11:8080',
 }

+ 27 - 0
pages.json

@@ -210,6 +210,33 @@
 		    }
 		    
 		}
+        ,{
+            "path" : "pages/noLogin/patrolFleet/patrolFleet",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/noLogin/GRegulatingBoxMaintenance/GRegulatingBoxMaintenance",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/noLogin/PipelineGasUser/PipelineGasUser",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 50 - 6
pages/noLogin/CourtyardNetworkManagement/CourtyardNetworkManagement.vue

@@ -11,14 +11,14 @@
 			<u-icon slot="right" name="arrow-right"></u-icon>
 		</u-form-item>
 		<!-- <u-form-item label="单元" labelWidth="140" borderBottom ref="item1">
-			<u-input v-model="unitName" disabled borderBottom @click=" showunit= true&&type!=1"
+			<u-input v-model="unitName" disabled borderBottom @click=" showunit= true  "
 				placeholder="请选择单元"></u-input>
 			<u-select v-model="showunit" :list="unitList" label-name="name" value-name="id"
 				@confirm="unitconfirm()"> </u-select>
 			<u-icon slot="right" name="arrow-right"></u-icon>
 		</u-form-item> -->
 		<u-form-item label="发现问题" labelWidth="140" borderBottom ref="item1">
-			<u-radio-group v-model="form.findProblem" :disabled="type==1">
+			<u-radio-group v-model="form.findProblem"   >
 				<u-radio @change="confirm"
 					v-for="(item, index) in typelist.find_problem"
 					:key="index" :name="item.dictValue">
@@ -28,14 +28,14 @@
 		</u-form-item>
 		<u-form-item borderBottom ref="item1">
 			<view>备注</view>
-			<u-input v-model="form.remarks" type="textarea" placeholder="请输入备注" :disabled="type==1"></u-input>
+			<u-input v-model="form.remarks" type="textarea" placeholder="请输入备注"   ></u-input>
 		</u-form-item>
 		<u-form-item borderBottom ref="item1">
 			<view>巡检照片</view>
 			<u-input v-model="WarningColumnInformation" disabled placeholder="请上传巡检照片"></u-input>
 			<view class="" style="display: flex; flex-wrap: wrap; margin: 0 55rpx;">
 				<image src="https://cczdsz.cn/app/images/chooseimg.png" mode=""
-					style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="choose()" v-if="type!=1">
+					style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="choose()"  >
 				</image>
 				<view v-for="(item,index) in imgymxs" :key="index" style="position: relative;">
 					<view v-if="item.type == 'image'">
@@ -48,14 +48,16 @@
 					</view>
 					<view @click="remove(index)"
 						style="position: absolute; top: 0; right: 14rpx; border-radius: 50%; background-color: #FF0000;">
-						<u-icon name="close" color="#FFFFFF" size="35" v-if="type!=1"></u-icon>
+						<u-icon name="close" color="#FFFFFF" size="35"  ></u-icon>
 					</view>
 				</view>
 			</view>
 		</u-form-item>
 	</u-form>
-	<u-button style="background: #2d95f4;color: #fff;border-radius: 20rpx;" @click="save()" v-if="type!=1"
+	<u-button style="background: #2d95f4;color: #fff;border-radius: 20rpx;" @click="save()" v-if="type!=1" 
 		type='primary'>确认上传</u-button>
+		<u-button style="background: #2d95f4;color: #fff;border-radius: 20rpx;" @click="update()"
+			type='primary'>确认修改</u-button>
 </view>
 </view>
 </template>
@@ -165,6 +167,47 @@ methods: {
 			_this.unitList = res
 		})
 	},
+	update()
+	{
+		let _this = this
+		this.form.photoList = this.imgArr
+		this.form.pressureStatus = null
+		this.building=this.form.buildingId
+		if(this.building==null)
+		{
+			uni.showToast({
+				title: '请选择楼栋',
+				icon: 'none'
+			})
+			return
+		}
+		if(this.imgArr.length==0)
+		{
+			uni.showToast({
+				title: '请上传图片或视频!',
+				icon: 'none'
+			})
+			return
+		}
+		this.form.buildingId = this.building
+		this.form.communityId=this.community
+		this.form.userId=this.userId
+		this.form.createBy=this.userId
+		service.updatecourtyardNetworkManagement(this.form).then(res => {
+			console.log(res)
+			_this.$UTILS.showPrompt('修改成功!')
+			// setTimeout(() => {
+			// 	console.log('跳')
+			// 	uni.switchTab({
+			// 		url: '/pages/index/index'
+			// 	})
+			// }, 2000)
+			// this.form={findProblem:1}
+			// this.buildingName=''
+			// this.imgArr=[]
+			// this.imgymxs=[]
+		})
+	},
 	save() {
 		let _this = this
 		this.form.photoList = this.imgArr
@@ -228,6 +271,7 @@ methods: {
 							url.url = item
 							url.type = 'image'
 							this.imgymxs.push(url)
+							this.imgArr.push(item)
 						})
 					}
 					this.form = res

+ 706 - 0
pages/noLogin/GRegulatingBoxMaintenance/GRegulatingBoxMaintenance.vue

@@ -0,0 +1,706 @@
+<template>
+<view>
+<image src="https://cczdsz.cn/app/images/background-from.png" class="background"></image>
+<view class="project-content">
+	<u-form :model="form" :rules="rules" ref="form">
+		<view class="top">
+			<u-icon class="top-icon" name="map-fill"></u-icon>
+			<u-form-item label=" " borderBottom ref="item1" placeholder=" " labelWidth="20" label-align="left">
+				<u-input v-model="form.name" disabled placeholder=" " disabled trim="false"></u-input>
+			</u-form-item>
+			<u-icon class="top-icon" name="calendar"></u-icon>
+			<u-form-item label=" " borderBottom ref="item1" placeholder=" " labelWidth="20">
+				<u-input v-model="time" disabled style="font-size: 2rpx" length='30px' trim="true"
+					placeholder=" "></u-input>
+			</u-form-item>
+		</view>
+		<view style="flex-flow: row;display: flex; justify-content: flex-end;">
+		<view class="small-title">调压箱 </view> 
+		<view class="small-title" style="margin-left: auto;" @click="BoxDetails()">详情<u-icon name="arrow-right"></u-icon></view>
+		</view>
+		<u-form-item label="名称" borderBottom ref="item1" placeholder="请输入名称" labelWidth="140">
+			<u-input v-model="form.name" length='20px' placeholder="请输入名称" 
+				   type="digit" :clearable="false"  disabled></u-input>
+		</u-form-item>
+		<u-form-item label="管理所" borderBottom ref="item1" labelWidth="140">
+			<u-input v-model="AdministrativeOfficeLabel" placeholder="请输入管理所名称"
+				disabled  borderBottom @click="showadministrativeOffice= true  "></u-input>
+			<!-- 	<u-select v-model="showadministrativeOffice" :list="AdministrativeOfficeList" label-name="name"
+					value-name="value" @confirm="AdministrativeOffice()" disabled> </u-select>
+				<u-icon slot="right" name="arrow-right"></u-icon> -->
+		</u-form-item>
+		<u-form-item label="编号" borderBottom ref="item1" labelWidth="140">
+			<u-input    v-model="form.number" placeholder="请输入编号" disabled></u-input>
+		</u-form-item>
+		<u-form-item label="维护项目" labelWidth="140" borderBottom ref="item1">
+			<u-checkbox-group   @change="changeconfirm" >
+				<u-checkbox  
+					v-for="(item, index) in typelist.regulating_box_maintenance"
+					:key="index" 
+					v-model="item.default" 
+					:name="item.dictValue">
+					{{item.dictLabel}}
+				</u-checkbox>
+			</u-checkbox-group>
+		</u-form-item>
+		<u-form-item borderBottom ref="item1">
+			<view>照片</view>
+			<u-input v-model="WarningColumnInformation" disabled placeholder="请上传巡检照片"></u-input>
+			<view class="" style="display: flex; flex-wrap: wrap; margin: 0 55rpx;">
+				<image src="https://cczdsz.cn/app/images/chooseimg.png" mode=""
+					style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="choose()"  >
+				</image>
+				<view v-for="(item,index) in imgymxs" :key="index" style="position: relative;">
+					<view v-if="item.type == 'image'">
+						<image :src="item.url" mode="" style="width: 190rpx; height: 190rpx; margin: 0 20rpx;"
+							@click="showPhoto(index)">
+						</image>
+					</view>
+					<view v-else>
+						<video :src="item" style="width: 190rpx; height: 190rpx; margin: 0 20rpx;"></video>
+					</view>
+					<view @click="remove(index)"
+						style="position: absolute; top: 0; right: 14rpx; border-radius: 50%; background-color: #FF0000;">
+						<u-icon name="close" color="#FFFFFF" size="35"  ></u-icon>
+					</view>
+				</view>
+			</view>
+		</u-form-item>
+		
+		<!-- <u-form-item borderBottom ref="item1">
+			<view>备注</view>
+			<u-input v-model="form.remarks" type="textarea" placeholder="请输入备注"  ></u-input>
+		</u-form-item> -->
+	</u-form>
+	<u-button style="background: #2d95f4;color: #fff;border-radius: 20rpx;" @click="save()"  
+		type='primary' v-if="type!=1">确认上传</u-button>
+		<u-button style="background: #2d95f4;color: #fff;border-radius: 20rpx;" @click="update()"  
+			type='primary' v-else>确认修改</u-button>
+</view>
+<view>
+			<u-popup v-model="showBoxDetails" height= "400px" border-radius="14" mode=bottom closeable=true   close-icon-color="#000000">
+				<image src="https://cczdsz.cn/app/images/background.png" class="background"></image>
+				<view>
+					<u-form :model="boxform" ref="boxform">
+						<view style="text-align:center; font-size: 40rpx;">调压箱详情</view>
+						<view class="project-content" style="margin-top: 20px;">
+	                    <u-form-item label="管理所" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+		                 <u-input v-model="AdministrativeOfficeLabel" disabled></u-input>
+	                    </u-form-item>
+						<u-form-item label="编号" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="boxform.number" placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="名称" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="boxform.name" placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="性质" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="boxform.nature"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="类型" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="boxform.type"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="路数" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="boxform.numberOfRoutes"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="性质" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="boxform.nature"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="总户数" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.totalNumberOfHousehold"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="调压箱位置" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.positionOfPressureRegulatingBox"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="控制范围" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.controlRange"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="接收时间" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.receivingTime"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="阀井位置" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.valveWellPosition"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="阀井钥匙形状" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.valveWellKeyShape"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="厂家" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.manufacturer"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="流量" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.flow"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="进口管径" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.importPipeDiameter"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="出口管径" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.outletPipeDiameter"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="旁通管径" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.bypassPipeDiameter"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="调压器" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.voltageRegulator"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="设施规格型号" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.facilitySpecificationsAndModels"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="入口压力" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.inletPressure"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="出口压力" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.outletPressure"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="切断压力" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.cutOffPressure"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="放散压力" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.releasePressure"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="出厂编号" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.factoryNumber"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="出厂日期" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.factoryDate"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="主电源位置" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.mainPowerSupplyPosition"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="备注" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="inspectionFrequency"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label=" " labelWidth="0" borderBottom ref="item1">
+							<u-input v-model="boxform.remark" type="textarea" borderBottom placeholder="请填写备注信息内容"
+								  ></u-input>
+						</u-form-item>
+							</view>
+							</u-form>
+				</view>
+			</u-popup>
+		</view>
+</view>
+</template>
+<script>
+import service from '@/api/index.js'
+export default {
+data() {
+	return {
+		showBoxDetails:false,
+		repairType: [{
+			label: '施工问题',
+			value: 1
+		}, {
+			label: '施工问题',
+			value: 2
+		}, ],
+		showrepairType: false,
+		action: this.$HTTP.webUrl + `/obs`,
+		headers: {
+			MAuthorization: "wxBearer " + uni.getStorageSync('token')
+		},
+		url: [],
+		params: {
+			year: true,
+			month: true,
+			day: true,
+			hour: true,
+			minute: true,
+			second: false
+		},
+		uploading: false,
+		time:null,
+		showtime:false,
+		imgArr: [],
+		imgymxs: [],
+		progress: 0, //图片或视频上传百分比
+		form: {
+			findProblem:1
+		},
+		typelist: [],
+		causesOfFamageLabel: null,
+		dictlist: ['regulating_box_maintenance'],
+		teamName: null,
+		team:null,
+		unit: null,
+		unitName: null,
+		showbuilding: false,
+		showunit: false,
+		buildingList: [],
+		unitList: [],
+		type: 2,
+		id: null,
+		community: null,
+		createBy:null,
+		name:null,
+		administrativeOffice:null,
+		AdministrativeOfficeLabel:null,
+		AdministrativeOfficeList:[],
+		maintenanceItem:[],
+		managementOfficeId:null,
+		boxform:{},
+		pressureRegulatingBoxDetailsBo:{}
+		
+	}
+},
+onLoad(e) {
+	// this.building = e.building
+	// this.buildingName = e.buildingName
+	// this.community = e.community
+	// this.unitName = e.unitName
+	// this.unit = e.unit
+	 this.id = e.id
+	this.type = e.type
+	this.administrativeOffice=e.managementOffice
+	this.form.administrativeOffice=e.managementOffice
+	this.form.name=e.name
+	this.name=e.name
+	this.form.number=e.number
+	this.managementOfficeId=e.managementOfficeId
+	this.code=e.number
+	console.log(e)
+	this.name=e.name
+	let time1 = new Date()
+	console.log(time1.toLocaleString())
+	var year = time1.getFullYear(); //得到年份
+	var month = time1.getMonth() + 1; //得到月份
+	var date = time1.getDate(); //得到日期
+	var hours = time1.getHours(); //获取系统时
+	var Min = time1.getMinutes(); //分
+	this.type = e.type
+	this.id = e.id
+	this.time = year + "/" + month + "/" + date + "-" + hours + ":" + Min
+	this.getdictsysinfo()
+	uni.setNavigationBarTitle({
+		title: '调压箱维护'
+	});
+	uni.setNavigationBarColor({
+		frontColor: '#ffffff',
+		backgroundColor: '#2d95f4',
+	})
+	// if (this.type != 1) {
+	// 	this.getBuildingList()
+	// }
+	this.getUserName()
+},
+methods: {
+	BoxDetails()
+	{
+		service.getpressureRegulatingBox(this.managementOfficeId).then(res=>{
+			this.boxform=res
+			this.pressureRegulatingBoxDetailsBo = res.pressureRegulatingBoxDetailsVo[0];
+			this.showBoxDetails=true
+		})
+		
+	},
+	getAdministrativeOffice(userId){
+		service.getAdministrativeOffice({userId:userId}).then(res=>{
+			this.AdministrativeOfficeList=res
+			console.log(this.administrativeOffice)
+			if(this.type!=1)
+			{
+			this.AdministrativeOfficeLabel=this.AdministrativeOfficeList.filter(item=>item.value==this.administrativeOffice)[0].name
+			}
+		})
+	},
+	time(e) {
+		console.log(`${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`)
+		this.form.createTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`
+	},
+	// checksamplingMeterCount(e) {
+	// 	console.log(e)
+	// 				//正则表达试
+	// 				e = (e.match(/^\d*(\.?\d{0,10})/g)[0]) || null
+	// 				//重新赋值给input
+	// 				this.$nextTick(() => {
+	// 					this.form.samplingMeterCount= e
+	// 				})
+	// 			},
+	getUserName(){
+		service.getUserName().then(res=>{
+			this.userId=res.id
+			this.createBy=res.name
+			this.getAdministrativeOffice(res.id)
+		})
+	},
+	// showPhoto(index) {
+	// 	uni.previewImage({
+	// 		current: index,
+	// 		urls: this.imgArr,
+	// 	})
+	// },
+	// showPhotos(index) {
+	// 	uni.previewImage({
+	// 		current: index,
+	// 		urls: this.photo,
+	// 	})
+	// },
+	changeconfirm(e) {
+		console.log(e)
+		this.maintenanceItem=e
+		this.form.maintenanceItem=e.join(',')
+		// this.teamName = e[0].label
+		// this.team = e[0].value
+		// this.form.team=e[0].value
+		// console.log(this.team)
+		//this.getUnitList(e[0].value)
+	},
+	// unitconfirm(e) {
+	// 	this.unitName = e[0].label
+	// 	this.unit = e[0].value
+	// },
+	// getBuildingList() {
+	// 	const _this = this
+	// 	service.getBuildingList({
+	// 		areaId: this.community
+	// 	}).then(res => {
+	// 		_this.buildingList = res
+	// 	})
+	// },
+	// getUnitList(building) {
+	// 	const _this = this
+	// 	service.getUnitList({
+	// 		buildingId: building
+	// 	}).then(res => {
+	// 		_this.unitList = res
+	// 	})
+	// },
+	update()
+	{
+		let _this = this
+		this.form.photoList = this.imgArr
+		// if(this.building==null)
+		// {
+		// 	uni.showToast({
+		// 		title: '请选择楼栋',
+		// 		icon: 'none'
+		// 	})
+		// 	return
+		// }
+		if(this.imgArr.length==0)
+		{
+			uni.showToast({
+				title: '请上传图片或视频!',
+				icon: 'none'
+			})
+			return
+		}
+		this.form.pressureStatus = null
+		// this.form.buildingId = this.building
+		// this.form.communityId=this.community
+		this.form.userId=this.userId
+		this.form.createBy=this.userId
+		service.updateregulatingBoxMaintenance(this.form).then(res => {
+			console.log(res)
+			_this.$UTILS.showPrompt('修改成功!')
+			// setTimeout(() => {
+			// 	console.log('跳')
+			// 	uni.switchTab({
+			// 		url: '/pages/index/index'
+			// 	})
+			// }, 2000)
+			//this.form={isNormalInspection:1}
+			// this.buildingName=''
+			// this.imgArr=[]
+			// this.imgymxs=[]
+		})
+		
+	},
+	save() {
+		let _this = this
+		this.form.photoList = this.imgArr
+		// if(this.building==null)
+		// {
+		// 	uni.showToast({
+		// 		title: '请选择楼栋',
+		// 		icon: 'none'
+		// 	})
+		// 	return
+		// }
+		if(this.imgArr.length==0)
+		{
+			uni.showToast({
+				title: '请上传图片或视频!',
+				icon: 'none'
+			})
+			return
+		}
+		// this.form.buildingId = this.building
+		// this.form.communityId=this.community
+		this.form.userId=this.userId
+		this.form.createBy=this.userId
+		this.form.parentId=this.managementOfficeId
+		this.form.team=this.team
+		service.setregulatingBoxMaintenance(this.form).then(res => {
+			console.log(res)
+			_this.$UTILS.showPrompt('上报成功!')
+			// setTimeout(() => {
+			// 	console.log('跳')
+			// 	uni.switchTab({
+			// 		url: '/pages/index/index'
+			// 	})
+			// }, 2000)
+			this.form={number:this.code,administrativeOffice:this.administrativeOffice,name:this.name}
+			let yesandnolist=[]
+			this.typelist.regulating_box_maintenance .forEach(item=>{
+				item.default=false
+				yesandnolist.push(item)
+			})
+			this.typelist.regulating_box_maintenance=yesandnolist
+			
+			// this.buildingName=''
+			this.imgArr=[]
+			this.imgymxs=[]
+		})
+	},
+	getdictsysinfo() {
+		let _this = this
+		service.getDictInfoList({
+			type: this.dictlist
+		}).then(res => {
+			_this.typelist = res
+			if (this.type == 1) {
+				let _this = this
+				console.log(this.id)
+				service.getregulatingBoxMaintenance(this.id).then(res => {
+					// console.log(_this.typelist)
+					// _this.buildingName = res.buildingName
+					// _this.unitName = res.unitName
+					// let list = []
+					// list = _this.typelist.find_problem
+					// list.forEach((item) => {
+					// 	if (item.dictValue == res.findProblem) {
+					// 		_this.causesOfFamageLabel = item.dictLabel
+					// 	}
+					// })
+					if (null != res.photoList) {
+						res.photoList.forEach(item => {
+							let url = {}
+							url.url = item
+							url.type = 'image'
+							this.imgymxs.push(url)
+							this.imgArr.push(item)
+						})
+					}
+					this.teamName=this.name
+					this.time=res.createTime
+					this.form = res
+					this.maintenanceItem=res.maintenanceItem.split(',')
+					let yesandnolist=[]
+					this.typelist.regulating_box_maintenance .forEach(item=>{
+						item.default=this.maintenanceItem.includes(item.dictValue)
+						yesandnolist.push(item)
+					})
+					this.administrativeOffice=res.administrativeOffice
+					this.name=res.name
+					this.code=res.code
+					this.AdministrativeOfficeLabel=this.AdministrativeOfficeList.filter(item=>item.value==this.administrativeOffice)[0].name
+					this.typelist.regulating_box_maintenance=yesandnolist
+					this.managementOfficeId=this.form.parentId
+				})
+			}
+			
+			
+			console.log(res)
+		})
+	},
+	confirm(e) {
+		this.form.findProblem =e
+	},
+	choose() {
+		let _this = this;
+		uni.showActionSheet({
+			title: '上传',
+			itemList: ['图片', '视频'],
+			success: (res) => {
+				// console.log(res)
+				if (res.tapIndex == 0) {
+					this.chooseimage()
+				} else {
+					this.choosevideo()
+				}
+			}
+		})
+	},
+	chooseimage() {
+		console.log('图片')
+		let _this = this;
+		uni.chooseImage({
+			sourceType: ['camera'],
+			success(resp) {
+				console.log('res--uni.chooseMedia', resp);
+				resp.tempFiles.forEach((item, index) => {
+					const task = uni.uploadFile({
+						url: _this.$HTTP.webUrl + `/obs`,
+						filePath: item.path,
+						name: 'file',
+						formData: {},
+						header: _this.headers,
+						success: res => {
+							// 判断是否json字符串,将其转为json格式
+							let data = _this.$u.test.jsonString(res.data) ? JSON.parse(
+								res.data) : res.data;
+							if (![200, 201, 204].includes(res.statusCode)) {
+								// this.uploadError(index, data);
+								_this.$UTILS.showPrompt('选取失败!')
+							} else {
+								// 上传成功
+								// this.lists[index].response = data;
+								// this.lists[index].progress = 100;
+								// this.lists[index].error = false;
+								// this.$emit('on-success', data, index, this.lists, this
+								// 	.index);
+								if (_this.progress === 100) {
+									// console.log('_this.progress', _this.progress)
+									// console.log('data----', data)
+									// console.log('res--', res)
+									_this.imgymxs.push({
+										url: data.data.url,
+										type: 'image'
+									})
+									_this.imgArr.push(data.data.url)
+									// console.log('imgArr', _this.imgArr)
+									_this.$UTILS.showPrompt('选取成功!')
+								}
+							}
+						},
+						fail: e => {
+							_this.$UTILS.showPrompt('选取失败!')
+							this.uploadError(index, e);
+						},
+						
+						complete: res => {
+							_this.uploading = false;
+							// _this.uploadFile(index + 1);
+							// this.$emit('on-change', res, index, this.lists, this
+							// .index);
+						}
+					});
+					task.onProgressUpdate(res => {
+						// if (res.progress > 0) {
+						// 	this.lists[index].progress = res.progress;
+						// 	this.$emit('on-progress', res, index, this.lists, this.index);
+						// }
+						_this.progress = res.progress;
+						console.log('onProgressUpdate', res)
+						uni.showLoading({
+							title: '选取中'
+						})
+					});
+				})
+			},
+		})
+	},
+	choosevideo() {
+		let _this = this;
+		console.log('视频')
+		uni.chooseVideo({
+			sourceType: ['camera'],
+			maxDuration: 30,
+			success(resp) {
+				const task = uni.uploadFile({
+					url: _this.$HTTP.webUrl + `/obs`,
+					filePath: resp.tempFilePath,
+					name: 'file',
+					formData: {},
+					header: _this.headers,
+					success: res => {
+						// 判断是否json字符串,将其转为json格式
+						let data = _this.$u.test.jsonString(res.data) ? JSON.parse(res.data) :
+							res.data;
+						if (![200, 201, 204].includes(res.statusCode)) {
+							this.uploadError(index, data);
+						} else {
+							// 上传成功
+							// this.lists[index].response = data;
+							// this.lists[index].progress = 100;
+							// this.lists[index].error = false;
+							// this.$emit('on-success', data, index, this.lists, this
+							// 	.index);
+							if (_this.progress === 100) {
+								console.log('_this.progress', _this.progress)
+								console.log('data----', data)
+								console.log('res--', res)
+								// _this.imgArr.push(data.data.url)
+								_this.imgymxs.push({
+									url: data.data.url,
+									type: 'video'
+								})
+								_this.imgArr.push(data.data.url)
+								console.log('imgArr', _this.imgArr)
+								_this.$UTILS.showPrompt('选取成功!')
+							}
+						}
+					},
+					fail: e => {
+						_this.$UTILS.showPrompt('选取失败!')
+						this.uploadError(index, e);
+					},
+					complete: res => {
+						uni.hideLoading();
+						_this.uploading = false;
+						// _this.uploadFile(index + 1);
+						// this.$emit('on-change', res, index, this.lists, this
+						// .index);
+					}
+				});
+				task.onProgressUpdate(res => {
+					// if (res.progress > 0) {
+					// 	this.lists[index].progress = res.progress;
+					// 	this.$emit('on-progress', res, index, this.lists, this.index);
+					// }
+					_this.progress = res.progress;
+					console.log('onProgressUpdate', res)
+					uni.showLoading({
+						title: '选取中'
+					})
+				});
+			},
+		})
+	},
+	remove(index) {
+		uni.showModal({
+			title: '提示',
+			content: '是否删除该图片或视频?',
+			success: (res) => {
+				if (res.confirm) {
+					this.imgArr.splice(index, 1);
+					this.imgymxs.splice(index, 1);
+					console.log('this.imgarr', this.imgArr)
+				}
+			}
+		})
+	},
+}
+}
+</script>
+<style>
+.project-content {
+padding: 10rpx 20rpx;
+border-radius: 20rpx;
+background: #fff;
+width: 90%;
+margin: 0 auto;
+}
+
+.background {
+z-index: -1;
+position: fixed;
+width: 100%;
+height: 100%;
+background-size: 100% 100%;
+}
+.top {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+	}
+
+.top-icon {
+		font-size: 40rpx;
+		color: #2d95f4;
+	}
+.small-title {
+		font-size: 38rpx;
+		color: #2d95f4;
+		margin: 20rpx 0;
+	}
+</style>

+ 82 - 23
pages/noLogin/LNGStation/LNGStation.vue

@@ -5,7 +5,7 @@
 	<u-form :model="form" :rules="rules" ref="form">
 		<view class="small-title">输配站</view>
 		<u-form-item borderBottom  label="名称"ref="item1">
-			<u-input v-model="form.name" :disabled="type==1"></u-input>
+			<u-input v-model="form.name"  ></u-input>
 			</u-form-item>
 	<view class="small-title">储存罐</view>
 		<u-form-item borderBottom ref="item1">
@@ -13,7 +13,7 @@
 			<u-input v-model="WarningColumnInformation" disabled placeholder="请上传压力表照片"></u-input>
 			<view class="" style="display: flex; flex-wrap: wrap; margin: 0 55rpx;">
 				<image src="https://cczdsz.cn/app/images//chooseimg.png" mode=""
-					style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="pressureGaugechoose()" v-if="type!=1">
+					style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="pressureGaugechoose()"  >
 				</image>
 				<view v-for="(item,index) in pressureGaugeimgymxs" :key="index" style="position: relative;">
 					<view v-if="item.type == 'image'">
@@ -26,7 +26,7 @@
 					</view>
 					<view @click="pressureGaugeremove(index)"
 						style="position: absolute; top: 0; right: 14rpx; border-radius: 50%; background-color: #FF0000;">
-						<u-icon name="close" color="#FFFFFF" size="35" v-if="type!=1"></u-icon>
+						<u-icon name="close" color="#FFFFFF" size="35"  ></u-icon>
 					</view>
 				</view>
 			</view>
@@ -36,7 +36,7 @@
 			<u-input v-model="WarningColumnInformation" disabled placeholder="请上传液位计照片"></u-input>
 			<view class="" style="display: flex; flex-wrap: wrap; margin: 0 55rpx;">
 				<image src="https://cczdsz.cn/app/images//chooseimg.png" mode=""
-					style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="LevelGaugechoose()" v-if="type!=1">
+					style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="LevelGaugechoose()"  >
 				</image>
 				<view v-for="(item,index) in LevelGaugeimgymxs" :key="index" style="position: relative;">
 					<view v-if="item.type == 'image'">
@@ -49,7 +49,7 @@
 					</view>
 					<view @click="LevelGaugeremove(index)"
 						style="position: absolute; top: 0; right: 14rpx; border-radius: 50%; background-color: #FF0000;">
-						<u-icon name="close" color="#FFFFFF" size="35" v-if="type!=1"></u-icon>
+						<u-icon name="close" color="#FFFFFF" size="35"  ></u-icon>
 					</view>
 				</view>
 			</view>
@@ -59,7 +59,7 @@
 			<u-input v-model="WarningColumnInformation" disabled placeholder="请上传流量计照片"></u-input>
 			<view class="" style="display: flex; flex-wrap: wrap; margin: 0 55rpx;">
 				<image src="https://cczdsz.cn/app/images//chooseimg.png" mode=""
-					style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="choose()" v-if="type!=1">
+					style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="choose()"  >
 				</image>
 				<view v-for="(item,index) in imgymxs" :key="index" style="position: relative;">
 					<view v-if="item.type == 'image'">
@@ -72,22 +72,22 @@
 					</view>
 					<view @click="remove(index)"
 						style="position: absolute; top: 0; right: 14rpx; border-radius: 50%; background-color: #FF0000;">
-						<u-icon name="close" color="#FFFFFF" size="35" v-if="type!=1"></u-icon>
+						<u-icon name="close" color="#FFFFFF" size="35"  ></u-icon>
 					</view>
 				</view>
 			</view>
 		</u-form-item>
 		<!-- <u-form-item label="路段名称" borderBottom ref="item1" labelWidth="140">
-			<u-input v-model="form.sectionName" :disabled="type==1" borderBottom @click="showbuilding= true&&type!=1"
+			<u-input v-model="form.sectionName"   borderBottom @click="showbuilding= true&&type!=1"
 				placeholder="请输入路段名称"></u-input>
 		</u-form-item>
 		<u-form-item label="抽检米数" labelWidth="140" borderBottom ref="item1">
-			<u-input v-model="form.samplingMeterCount" :disabled="type==1" borderBottom @click="showbuilding= true&&type!=1"
+			<u-input v-model="form.samplingMeterCount"   borderBottom @click="showbuilding= true&&type!=1"
 				placeholder="请输入抽检米数" @input="checksamplingMeterCount()"></u-input>
 		</u-form-item> -->
 		<view class="small-title">输送管道</view>
 		<u-form-item label=" " labelWidth="0" borderBottom ref="item1">
-			<u-radio-group v-model="form.pipeline" :disabled="type==1">
+			<u-radio-group v-model="form.pipeline"  >
 				<u-radio @change="confirm"
 					v-for="(item, index) in typelist.Pipeline"
 					:key="index" :name="item.dictValue">
@@ -97,45 +97,45 @@
 		</u-form-item>
 		<view class="small-title">气化器</view>
 		<u-form-item label="维护" labelWidth="140" borderBottom ref="item1">
-			<u-radio-group v-model="form.maintain" :disabled="type==1">
+			<u-radio-group v-model="form.maintain"  >
 				<u-radio @change="maintainconfirm"
 					v-for="(item, index) in typelist.maintain"
 					:key="index" :name="item.dictValue">
 					{{item.dictLabel}}
 				</u-radio>
 			</u-radio-group>
-			<u-input v-model="maintain"  v-show="form.maintain==2" placeholder="请输入其他" @blur='maintainblur' :disabled="type==1"></u-input>
+			<u-input v-model="maintain"  v-show="form.maintain==2" placeholder="请输入其他" @blur='maintainblur'  ></u-input>
 		</u-form-item>
 		<view class="small-title">安全设施</view>
 		<u-form-item label="报警器" labelWidth="140" borderBottom ref="item1">
-			<u-radio-group v-model="form.alarm" :disabled="type==1">
+			<u-radio-group v-model="form.alarm"  >
 				<u-radio @change="Alarmconfirm"
 					v-for="(item, index) in typelist.safety_facilities"
 					:key="index" :name="item.dictValue">
 					{{item.dictLabel}}
 				</u-radio>
 			</u-radio-group>
-			<u-input v-model="Alarm"  v-show="showAlarm" placeholder="请输入其他" @blur='Alarmblur' :disabled="type==1"></u-input>
+			<u-input v-model="Alarm"  v-show="showAlarm" placeholder="请输入其他" @blur='Alarmblur'  ></u-input>
 		</u-form-item>
 		<u-form-item label="紧急切断阀" labelWidth="140" borderBottom ref="item1">
-			<u-radio-group v-model="form.emergency" :disabled="type==1">
+			<u-radio-group v-model="form.emergency"  >
 				<u-radio @change="emergencyconfirm"
 					v-for="(item, index) in typelist.safety_facilities"
 					:key="index" :name="item.dictValue">
 					{{item.dictLabel}}
 				</u-radio>
 			</u-radio-group>
-			<u-input v-model="emergency"  v-show="showemergency" placeholder="请输入其他" @blur='emergencyblur' :disabled="type==1"></u-input>
+			<u-input v-model="emergency"  v-show="showemergency" placeholder="请输入其他" @blur='emergencyblur'  ></u-input>
 		</u-form-item>
 		<u-form-item label="消防器材" labelWidth="140" borderBottom ref="item1">
-			<u-radio-group v-model="form.fireEquipment" :disabled="type==1">
+			<u-radio-group v-model="form.fireEquipment"  >
 				<u-radio @change="fireEquipmentconfirm"
 					v-for="(item, index) in typelist.safety_facilities"
 					:key="index" :name="item.dictValue">
 					{{item.dictLabel}}
 				</u-radio>
 			</u-radio-group>
-			<u-input v-model="fireEquipment"  v-show="showfireEquipment" placeholder="请输入其他" @blur='fireEquipmentblur' :disabled="type==1"></u-input>
+			<u-input v-model="fireEquipment"  v-show="showfireEquipment" placeholder="请输入其他" @blur='fireEquipmentblur'  ></u-input>
 		</u-form-item>
 		<!-- <u-form-item label="发现时间" labelWidth="140" borderBottom ref="item1">
 				<u-input v-model="form.findTime" borderBottom placeholder="请选择接警时间" disabled
@@ -147,7 +147,7 @@
 			<u-input v-model="WarningColumnInformation" disabled placeholder="请上传巡检照片"></u-input>
 			<view class="" style="display: flex; flex-wrap: wrap; margin: 0 55rpx;">
 				<image src="https://cczdsz.cn/app/images//chooseimg.png" mode=""
-					style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="choose()" v-if="type!=1">
+					style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="choose()"  >
 				</image>
 				<view v-for="(item,index) in imgymxs" :key="index" style="position: relative;">
 					<view v-if="item.type == 'image'">
@@ -160,18 +160,20 @@
 					</view>
 					<view @click="remove(index)"
 						style="position: absolute; top: 0; right: 14rpx; border-radius: 50%; background-color: #FF0000;">
-						<u-icon name="close" color="#FFFFFF" size="35" v-if="type!=1"></u-icon>
+						<u-icon name="close" color="#FFFFFF" size="35"  ></u-icon>
 					</view>
 				</view>
 			</view>
 		</u-form-item> -->
 <!-- 		<u-form-item borderBottom ref="item1">
 			<view>备注</view>
-			<u-input v-model="form.remark" type="textarea" placeholder="请输入备注" :disabled="type==1"></u-input>
+			<u-input v-model="form.remark" type="textarea" placeholder="请输入备注"  ></u-input>
 		</u-form-item> -->
 	</u-form>
-	<u-button style="background: #2d95f4;color: #fff;border-radius: 20rpx;margin-top: 20px;" @click="save()" v-if="type!=1"
-		type='primary'>确认上传</u-button>
+	<u-button style="background: #2d95f4;color: #fff;border-radius: 20rpx;margin-top: 20px;" @click="save()"  
+		type='primary' v-if="type!=1">确认上传</u-button>
+		<u-button style="background: #2d95f4;color: #fff;border-radius: 20rpx;margin-top: 20px;" @click="update()"
+			type='primary' v-else>确认修改</u-button>
 </view>
 </view>
 </template>
@@ -345,6 +347,60 @@ methods: {
 	// 		_this.unitList = res
 	// 	})
 	// },
+	update()
+	{
+		let _this = this
+		this.form.pressureStatus = null
+		this.form.flowMeter = this.imgArr
+		this.form.levelGauge=this.LevelGaugeimgArr
+		this.form.pressureGauge=this.pressureGaugeimgArr
+		// if(this.building==null)
+		// {
+		// 	uni.showToast({
+		// 		title: '请选择楼栋',
+		// 		icon: 'none'
+		// 	})
+		// 	return
+		// }
+		if(this.imgArr.length==0)
+		{
+			uni.showToast({
+				title: '请上传图片或视频!',
+				icon: 'none'
+			})
+			return
+		}
+		// this.form.buildingId = this.building
+		// this.form.communityId=this.community
+		this.form.userId=this.userId
+		this.form.createBy=this.userId
+		service.updatetransmissionStation(this.form).then(res => {
+			console.log(res)
+			_this.$UTILS.showPrompt('修改成功!')
+			// setTimeout(() => {
+			// 	console.log('跳')
+			// 	uni.switchTab({
+			// 		url: '/pages/index/index'
+			// 	})
+			// }, 2000)
+			// this.form={pipeline:0,maintain:0,alarm:0,fireEquipment:0,emergency:0}
+			// // this.buildingName=''
+			// this.imgArr=[]
+			// this.imgymxs=[]
+			// this.LevelGaugeimgArr=[]
+			// this.pressureGaugeimgArr=[]
+			// this.LevelGaugeimgymxs=[]
+			// this.pressureGaugeimgymxs=[]
+			// this.maintain=null
+			// this.Alarm=null
+			// this.fireEquipment=null
+			// this.emergency=null
+			// this.showAlarm=false
+			// this.showemergency=false
+			// this.showfireEquipment=false
+			// this.showmaintain=false
+		})
+	},
 	save() {
 		let _this = this
 		this.form.flowMeter = this.imgArr
@@ -422,6 +478,7 @@ methods: {
 							url.url = item
 							url.type = 'image'
 							this.imgymxs.push(url)
+							this.imgArr.push(item)
 						})
 					}
 					if (null != res.levelGauge) {
@@ -430,6 +487,7 @@ methods: {
 							url.url = item
 							url.type = 'image'
 							this.LevelGaugeimgymxs.push(url)
+							this.LevelGaugeimgArr.push(item)
 						})
 					}
 					if (null != res.pressureGauge) {
@@ -438,6 +496,7 @@ methods: {
 							url.url = item
 							url.type = 'image'
 							this.pressureGaugeimgymxs.push(url)
+							this.pressureGaugeimgArr.push(item)
 						})
 					}
 					this.form = res

Plik diff jest za duży
+ 1198 - 0
pages/noLogin/PipelineGasUser/PipelineGasUser.vue


+ 221 - 36
pages/noLogin/PressureRegulatingBox/PressureRegulatingBox.vue

@@ -14,12 +14,15 @@
 							placeholder=" "></u-input>
 					</u-form-item>
 				</view>
-				<view class="small-title">调压箱部分</view>
+				<view style="flex-flow: row;display: flex; justify-content: flex-end;">
+				<view class="small-title">调压箱部分 </view>
+				<view class="small-title" style="margin-left: auto;" @click="BoxDetails()">详情<u-icon name="arrow-right"></u-icon></view>
+				</view>
 				<u-row gutter="12">
 					<u-col>
 						<u-form-item label="管理所" borderBottom ref="item1" labelWidth="140">
 							<u-input v-model="AdministrativeOfficeLabel" placeholder="请输入管理所名称"
-								disabled  borderBottom @click="showadministrativeOffice= true&&type!=1"></u-input>
+								disabled  borderBottom @click="showadministrativeOffice= true  "></u-input>
 							<!-- 	<u-select v-model="showadministrativeOffice" :list="AdministrativeOfficeList" label-name="name"
 									value-name="value" @confirm="AdministrativeOffice()" disabled> </u-select>
 								<u-icon slot="right" name="arrow-right"></u-icon> -->
@@ -27,12 +30,12 @@
 					</u-col>
 					<u-col>
 						<u-form-item label="编号" borderBottom ref="item1" labelWidth="140">
-							<u-input :disabled="type==1" v-model="form.number" placeholder="请输入编号" ></u-input>
+							<u-input    v-model="form.number" placeholder="请输入编号" disabled></u-input>
 						</u-form-item>
 					</u-col>
 					<u-col>
 						<u-form-item label="商服" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
-							<u-radio-group v-model="form.businessService" :disabled="type==1">
+							<u-radio-group v-model="form.businessService"   >
 								<u-radio @change="businessService" v-for="(item, index) in typelist.business_service" :key="index"
 									:name="item.dictValue">
 									{{item.dictLabel}}
@@ -42,7 +45,7 @@
 					</u-col>
 					<u-col>
 						<u-form-item label="外观" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
-							<u-radio-group v-model="form.appearance" :disabled="type==1">
+							<u-radio-group v-model="form.appearance"   >
 								<u-radio @change="appearance" v-for="(item, index) in typelist.appearance" :key="index"
 									:name="item.dictValue">
 									{{item.dictLabel}}
@@ -52,7 +55,7 @@
 					</u-col>
 					<u-col>
 						<u-form-item label="方砖" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
-							<u-radio-group v-model="form.squareBrick" :disabled="type==1">
+							<u-radio-group v-model="form.squareBrick"   >
 								<u-radio @change="squareBrick" v-for="(item, index) in typelist.square_brick"
 									:key="index" :name="item.dictValue">
 									{{item.dictLabel}}
@@ -62,7 +65,7 @@
 					</u-col>
 					<u-col>
 						<u-form-item label="护栏" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
-							<u-radio-group v-model="form.guardrail" :disabled="type==1">
+							<u-radio-group v-model="form.guardrail"   >
 								<u-radio @change="guardrail" v-for="(item, index) in typelist.guardrail" :key="index"
 									:name="item.dictValue">
 									{{item.dictLabel}}
@@ -72,7 +75,7 @@
 					</u-col>
 					<u-col>
 						<u-form-item label="基础" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
-							<u-radio-group v-model="form.foundation" :disabled="type==1">
+							<u-radio-group v-model="form.foundation"   >
 								<u-radio @change="foundation" v-for="(item, index) in typelist.foundation" :key="index"
 									:name="item.dictValue">
 									{{item.dictLabel}}
@@ -82,7 +85,7 @@
 					</u-col>
 					<u-col>
 						<u-form-item label="压力表" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
-							<u-radio-group v-model="form.pressureGage" :disabled="type==1">
+							<u-radio-group v-model="form.pressureGage"   >
 								<u-radio @change="pressureGage" v-for="(item, index) in typelist.pressure_gage"
 									:key="index" :name="item.dictValue">
 									{{item.dictLabel}}
@@ -92,7 +95,7 @@
 					</u-col>
 					<u-col>
 						<u-form-item label="阀门" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
-							<u-radio-group v-model="form.valve" :disabled="type==1">
+							<u-radio-group v-model="form.valve"   >
 								<u-radio @change="valve" v-for="(item, index) in typelist.valve" :key="index"
 									:name="item.dictValue">
 									{{item.dictLabel}}
@@ -102,7 +105,7 @@
 					</u-col>
 					<u-col>
 						<u-form-item label="是否泄露" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
-							<u-radio-group v-model="form.isThereALeak" :disabled="type==1">
+							<u-radio-group v-model="form.isThereALeak"   >
 								<u-radio @change="isThereALeak" v-for="(item, index) in typelist.yes_and_no"
 									:key="index" :name="item.dictValue">
 									{{item.dictLabel}}
@@ -112,7 +115,7 @@
 					</u-col>
 					<u-col>
 						<u-form-item label="调压器" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
-							<u-radio-group v-model="form.voltageRegulator" :disabled="type==1">
+							<u-radio-group v-model="form.voltageRegulator"   >
 								<u-radio @change="voltageRegulator" v-for="(item, index) in typelist.voltage_regulator"
 									:key="index" :name="item.dictValue">
 									{{item.dictLabel}}
@@ -122,7 +125,7 @@
 					</u-col>
 					<u-col>
 						<u-form-item label="过滤器" borderBottom ref="item1" placeholder="请输入编号" labelWidth="120">
-							<u-radio-group v-model="form.filter" :disabled="type==1">
+							<u-radio-group v-model="form.filter"   >
 								<u-radio @change="filter" v-for="(item, index) in typelist.filter" :key="index"
 									:name="item.dictValue">
 									{{item.dictLabel}}
@@ -135,7 +138,7 @@
 					<u-col span="10">
 						<u-form-item label="入口压力" borderBottom ref="item1" placeholder="请输入入口压力" labelWidth="140">
 							<u-input v-model="form.inletPressure" length='20px' placeholder="请输入入口压力"
-								:disabled="type==1" type="digit" :clearable="false" @input="checkinletPressure"></u-input>
+								   type="digit" :clearable="false" @input="checkinletPressure"></u-input>
 						</u-form-item>
 					</u-col>
 					<u-col span="2">
@@ -195,7 +198,7 @@
 					</u-col>
 					<u-col>
 						<u-form-item label="伴热带" labelWidth="140" borderBottom ref="item1">
-							<u-radio-group v-model="form.xtv" :disabled="type==1">
+							<u-radio-group v-model="form.xtv"   >
 								<u-radio @change="xtv"
 									v-for="(item, index) in typelist.xtv" :key="index"
 									:name="item.dictValue">
@@ -206,7 +209,7 @@
 					</u-col>
 					<u-col>
 						<u-form-item label="有无温控器" borderBottom ref="item1" placeholder="" labelWidth="180">
-							<u-radio-group v-model="form.thermostat" :disabled="type==1">
+							<u-radio-group v-model="form.thermostat"   >
 								<u-radio @change="thermostat"
 									v-for="(item, index) in typelist.yes_or_no" :key="index"
 									:name="item.dictValue">
@@ -217,7 +220,7 @@
 					</u-col>
 					<u-col>
 						<u-form-item label="有无防爆开关" borderBottom ref="item1" placeholder="" labelWidth="180">
-							<u-radio-group v-model="form.explosionProofSwitch" :disabled="type==1">
+							<u-radio-group v-model="form.explosionProofSwitch"   >
 								<u-radio @change="explosionProofSwitch"
 									v-for="(item, index) in typelist.yes_or_no" :key="index"
 									:name="item.dictValue">
@@ -231,7 +234,7 @@
 				<u-row>
 					<u-col>
 						<u-form-item label="切断器测试" borderBottom ref="item1" placeholder="" labelWidth="200">
-							<u-radio-group v-model="form.cutterTested" :disabled="type==1">
+							<u-radio-group v-model="form.cutterTested"   >
 								<u-radio @change="cutterTested"
 									v-for="(item, index) in typelist.cutoff_test_certification" :key="index"
 									:name="item.dictValue">
@@ -242,7 +245,7 @@
 					</u-col>
 					<u-col>
 						<u-form-item label="切断器(放散阀)测试情况" borderBottom ref="item1" placeholder="" labelWidth="320" v-if="form.cutterTested==1">
-							<u-radio-group v-model="form.disconnectorTestStatus" :disabled="type==1">
+							<u-radio-group v-model="form.disconnectorTestStatus"   >
 								<u-radio @change="disconnectorTestStatus"
 									v-for="(item, index) in typelist.disconnector_test_status" :key="index"
 									:name="item.dictValue">
@@ -255,7 +258,7 @@
 				<u-row gutter="12">
 					<u-col span="5">
 						<u-form-item label="切断压力 主路" borderBottom ref="item1" placeholder=" " labelWidth="200" v-if="form.cutterTested==1">
-							<u-input v-model="form.cutOffPressureMain" placeholder=" " :disabled="type==1" type="digit" :clearable="false" @input="checkcutOffPressureMain"></u-input>
+							<u-input v-model="form.cutOffPressureMain" placeholder=" "    type="digit" :clearable="false" @input="checkcutOffPressureMain"></u-input>
 						</u-form-item>
 					</u-col>
 					<u-col span="2" v-if="form.cutterTested==1">
@@ -264,7 +267,7 @@
 					<u-col span="3">
 						<u-form-item label="副路" borderBottom ref="item1" placeholder="" labelWidth="80" v-if="form.cutterTested==1">
 							<u-input v-model="form.cutOffPressureAccessory" length='20px' placeholder="请输入副路"
-								:disabled="type==1" type="digit" :clearable="false" @input="checkcutOffPressureAccessory"></u-input>
+								   type="digit" :clearable="false" @input="checkcutOffPressureAccessory"></u-input>
 						</u-form-item>
 					</u-col>
 					<u-col span="1" v-if="form.cutterTested==1">
@@ -275,7 +278,7 @@
 					<u-col span="10">
 						<u-form-item label="放散压力" borderBottom ref="item1" placeholder="请输入放散压力" labelWidth="140" v-if="form.cutterTested==1">
 							<u-input v-model="form.releasePressure" length='20px' placeholder="请输入放散压力"
-								:disabled="type==1" type="digit" :clearable="false" @input="checkreleasePressure"></u-input>
+								   type="digit" :clearable="false" @input="checkreleasePressure"></u-input>
 						</u-form-item>
 					</u-col>
 					<u-col span="2" v-if="form.cutterTested==1">
@@ -286,7 +289,7 @@
 				<u-row>
 					<u-col>
 						<u-form-item label="是否交替" borderBottom ref="item1" placeholder="请输入编号" labelWidth="200">
-							<u-radio-group v-model="form.manOfAccessoryAlternating" :disabled="type==1">
+							<u-radio-group v-model="form.manOfAccessoryAlternating"   >
 								<u-radio @change="manOfAccessoryAlternating" v-for="(item, index) in typelist.secondary_roads" :key="index"
 									:name="item.dictValue">
 									{{item.dictLabel}}
@@ -301,7 +304,7 @@
 						<u-form-item label="操作结果主副路已交替完毕,现" borderBottom ref="item1" placeholder="请输入编号"
 							labelWidth="420">
 							<u-input v-model="form.mainRoad" length='20px' placeholder="请输入"
-								:disabled="type==1"></u-input>
+								  ></u-input>
 						</u-form-item>
 					</u-col>
 					<u-col span="12">
@@ -312,7 +315,7 @@
 				<u-row>
 					<u-col>
 						<u-form-item label="调压设施特例" borderBottom ref="item1" placeholder="请输入编号" labelWidth="200">
-							<u-radio-group v-model="form.specialCaseOfPressureRegulatingFacilities" :disabled="type==1">
+							<u-radio-group v-model="form.specialCaseOfPressureRegulatingFacilities"   >
 								<u-radio @change="specialCaseOfPressureRegulatingFacilities"
 									v-for="(item, index) in typelist.special_case_of_pressure_regulating_facilities"
 									:key="index" :name="item.dictValue">
@@ -323,7 +326,7 @@
 					</u-col>
 					<u-col>
 						<u-form-item label="超期巡检天数" borderBottom ref="item1" placeholder="请输入编号" labelWidth="200">
-							<u-radio-group v-model="form.overdueInspectionDays" :disabled="type==1">
+							<u-radio-group v-model="form.overdueInspectionDays"   >
 								<u-radio @change="overdueInspectionDays"
 									v-for="(item, index) in typelist.overdue_inspection_days" :key="index"
 									:name="item.dictValue">
@@ -334,7 +337,7 @@
 					</u-col>
 					<!-- <u-col>
 						<u-form-item label="超期巡检原因" borderBottom ref="item1" placeholder="请输入编号" labelWidth="200">
-							<u-radio-group v-model="form.reasonForOverdueInspection" :disabled="type==1">
+							<u-radio-group v-model="form.reasonForOverdueInspection"   >
 								<u-radio @change="reasonForOverdueInspection"
 									v-for="(item, index) in typelist.reason_for_overdue_inspection" :key="index"
 									:name="item.dictValue">
@@ -346,7 +349,7 @@
 					<u-col>
 						<u-form-item label="超期巡检原因" borderBottom ref="item1" labelWidth="200" v-if="form.overdueInspectionDays!=undefined&&form.overdueInspectionDays!=3">
 							<u-input v-model="form.reasonForOverdueInspection" placeholder="请输入超期巡检原因"
-								:disabled="type==1"></u-input>
+								  ></u-input>
 						</u-form-item>
 					</u-col>
 				</u-row>
@@ -354,7 +357,7 @@
 				<u-row>
 					<u-col>
 						<u-form-item label="未测试" borderBottom ref="item1" placeholder="请输入编号" labelWidth="120">
-							<u-switch v-model="form.valveWellTesting" :disabled="type==1"></u-switch>
+							<u-switch v-model="form.valveWellTesting"   ></u-switch>
 						</u-form-item>
 					</u-col>
 					<u-col>
@@ -374,7 +377,7 @@
 					<u-col>
 						<u-form-item label=" " labelWidth="0" borderBottom ref="item1">
 							<u-input v-model="form.remarks" type="textarea" borderBottom placeholder="请填写备注信息内容"
-								:disabled="type==1"></u-input>
+								  ></u-input>
 						</u-form-item>
 					</u-col>
 					<u-col>
@@ -383,7 +386,7 @@
 							<view class="" style="display: flex; flex-wrap: wrap; margin: 0 55rpx;">
 								<image src="https://cczdsz.cn/app/images/chooseimg.png" mode=""
 									style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="choose()"
-									v-if="type!=1"></image>
+									  ></image>
 								<view v-for="(item,index) in imgymxs" :key="index" style="position: relative;">
 									<view v-if="item.type == 'image'">
 										<image :src="item.url" mode=""
@@ -395,9 +398,9 @@
 										<video :src="item"
 											style="width: 190rpx; height: 190rpx; margin: 0 20rpx;"></video>
 									</view>
-									<view @click="remove(index)" v-if="type!=1"
+									<view @click="remove(index)"
 										style="position: absolute; top: 0; right: 14rpx; border-radius: 50%; background-color: #FF0000;">
-										<u-icon name="close" color="#FFFFFF" size="35" v-if="type!=1"></u-icon>
+										<u-icon name="close" color="#FFFFFF" size="35"   ></u-icon>
 									</view>
 								</view>
 							</view>
@@ -406,10 +409,112 @@
 				</u-row>
 			</u-form>
 
-			<u-button class="from-but" style="margin: 40rpx 0;" @click="save()" v-if="type!=1"
+			<u-button class="from-but" style="margin: 40rpx 0;" @click="save() " v-if="type!=1"
 				type='primary'>确认上传</u-button>
+				<u-button class="from-but" style="margin: 40rpx 0;" @click="update()"
+					type='primary' v-else>确认修改</u-button>
 		</view>
 		</u-form>
+		<view>
+			<u-popup v-model="showBoxDetails" height= "400px" border-radius="14" mode=bottom closeable=true   close-icon-color="#000000">
+				<image src="https://cczdsz.cn/app/images/background.png" class="background"></image>
+				<view>
+					<u-form :model="boxform" ref="boxform">
+						<view style="text-align:center; font-size: 40rpx;">调压箱详情</view>
+						<view class="project-content" style="margin-top: 20px;">
+	                    <u-form-item label="管理所" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+		                 <u-input v-model="AdministrativeOfficeLabel" disabled></u-input>
+	                    </u-form-item>
+						<u-form-item label="编号" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="boxform.number" placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="名称" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="boxform.name" placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="性质" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="boxform.nature"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="类型" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="boxform.type"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="路数" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="boxform.numberOfRoutes"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="性质" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="boxform.nature"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="总户数" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.totalNumberOfHousehold"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="调压箱位置" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.positionOfPressureRegulatingBox"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="控制范围" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.controlRange"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="接收时间" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.receivingTime"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="阀井位置" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.valveWellPosition"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="阀井钥匙形状" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.valveWellKeyShape"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="厂家" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.manufacturer"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="流量" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.flow"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="进口管径" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.importPipeDiameter"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="出口管径" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.outletPipeDiameter"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="旁通管径" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.bypassPipeDiameter"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="调压器" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.voltageRegulator"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="设施规格型号" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.facilitySpecificationsAndModels"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="入口压力" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.inletPressure"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="出口压力" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.outletPressure"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="切断压力" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.cutOffPressure"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="放散压力" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.releasePressure"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="出厂编号" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.factoryNumber"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="出厂日期" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.factoryDate"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="主电源位置" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="pressureRegulatingBoxDetailsBo.mainPowerSupplyPosition"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="备注" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="inspectionFrequency"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label=" " labelWidth="0" borderBottom ref="item1">
+							<u-input v-model="boxform.remark" type="textarea" borderBottom placeholder="请填写备注信息内容"
+								  ></u-input>
+						</u-form-item>
+							</view>
+							</u-form>
+				</view>
+			</u-popup>
+		</view>
 	</view>
 	</view>
 </template>
@@ -418,6 +523,7 @@
 	export default {
 		data() {
 			return {
+
 				action: this.$HTTP.webUrl + `/obs`,
 				headers: {
 					MAuthorization: "wxBearer " + uni.getStorageSync('token')
@@ -662,7 +768,11 @@
 				userId:null,createBy:null,
 				administrativeOffice:null,
 				code:null,
-				name:null
+				name:null,
+				showBoxDetails:false,
+				managementOfficeId:null,
+				boxform:{},
+				pressureRegulatingBoxDetailsBo:{}
 
 			}
 		},
@@ -702,6 +812,7 @@
 			var Min = time1.getMinutes(); //分
 			this.type = e.type
 			this.id = e.id
+			this.managementOfficeId=e.managementOfficeId
 			this.time = year + "/" + month + "/" + date + "-" + hours + ":" + Min
 			this.getdictsysinfo()
 			this.getUserName()
@@ -718,6 +829,15 @@
 
 		},
 		methods: {
+			BoxDetails()
+			{
+				service.getpressureRegulatingBox(this.managementOfficeId).then(res=>{
+					this.boxform=res
+					this.pressureRegulatingBoxDetailsBo = res.pressureRegulatingBoxDetailsVo[0];
+					this.showBoxDetails=true
+				})
+
+			},
 			checkinletPressure(e) {
 				console.log(e)
 							//正则表达试
@@ -814,7 +934,7 @@
 				}).then(res => {
 					_this.typelist = res
 					if (this.type == 1) {
-						service.getregulatorBox(this.id).then(res => {
+						service.getregulatorBox2(this.id).then(res => {
 							this.communityName = res.name
 							this.time = res.createTime
 							if (null != res.photoList) {
@@ -823,6 +943,7 @@
 									url.url = item
 									url.type = 'image'
 									this.imgymxs.push(url)
+									this.imgArr.push(item)
 								})
 							}
 							let list = []
@@ -847,6 +968,7 @@
 								}
 							})
 							this.form = res
+							this.managementOfficeId=this.form.parentId
 						})
 						console.log(res)
 					}
@@ -956,6 +1078,67 @@
 				this.valveWellConditioLabel = e[0].label
 				console.log(this.$refs.form.valveWellCondition)
 			},
+			update()
+			{
+				let _this = this
+				if(this.imgArr.length==0)
+				{
+					this.$UTILS.showPrompt('请上传照片或视频!')
+					return
+				}
+				this.form.pressureStatus = null
+				this.form.photoList = this.imgArr
+				this.form.unitId = this.unit
+				this.form.areaId =  this.id
+				 this.form.userId=this.userId
+				 this.form.createBy=this.userId
+				 this.form.name=this.name
+				 // this.form.administrativeOffice=this.administrativeOffice
+				 // this.form.code=this.code
+				 // this.form.name=this.name
+				 // this.form.number=this.code
+				service.updateregulatorBox(this.form).then(res => {
+					console.log(res)
+					_this.$UTILS.showPrompt('修改成功!')
+					// setTimeout(() => {
+					// 	console.log('跳')
+					// 	uni.switchTab({
+					// 		url: '/pages/index/index'
+					// 	})
+					// }, 2000)
+				// 	this.form={businessService:0,
+				// 	administrativeOffice:0,
+
+				// 	businessService:0,
+				// 	isNotXtv:0,
+				// 	appearance:0,
+				// 	squareBrick:0,
+				// 	foundation:0,
+				// 	pressureGage:0,
+				// 	valve:0,
+				// 	isThereALeak:0,
+				// 	voltageRegulator:0,
+				// 	xtv:0,
+				// 	thermostat:0,
+				// 	explosionProofSwitch:0,
+				// 	cutterTested:0,
+				// 	manOfAccessoryAlternating:0,
+				// 	filter:0,
+				// 	specialCaseOfPressureRegulatingFacilities:0,
+				// 	overdueInspectionDays:3,
+				// 	valveWellTesting:true,
+				// 	guardrail:0}
+				// 	this.AdministrativeOfficeLabel=this.AdministrativeOfficeList.filter(item=>item.value==this.administrativeOffice)[0].name
+				// 	this.valveWellConditioLabel=''
+				// 	this.xtvLabel=''
+				// 	this.valveWellConditioLabel=''
+				// 	//this.AdministrativeOfficeLabel=''
+				// 	this.form.administrativeOffice=this.administrativeOffice
+				// 	 this.form.number=this.code
+				// 	this.imgArr=[]
+				// 	this.imgymxs=[]
+				})
+			},
 
 			save() {
 				let _this = this
@@ -992,6 +1175,7 @@
 				this.form.areaId =  this.id
 			     this.form.userId=this.userId
 				 this.form.createBy=this.userId
+				 this.form.parentId=this.managementOfficeId
 				 this.form.name=this.name
 				 // this.form.administrativeOffice=this.administrativeOffice
 				 // this.form.code=this.code
@@ -1034,6 +1218,7 @@
 					this.valveWellConditioLabel=''
 					//this.AdministrativeOfficeLabel=''
 					this.form.administrativeOffice=this.administrativeOffice
+					 this.form.parentId=this.managementOfficeId
 					 this.form.number=this.code
 					this.imgArr=[]
 					this.imgymxs=[]

+ 1 - 1
pages/noLogin/WarningPileList.vue

@@ -84,7 +84,7 @@
 			gotoindex(item) {
 				console.log(item)
 				uni.navigateTo({
-					url:`/pages/noLogin/valveWellInspection/valveWellInspection?valveWellName=${item.valveWellName}&position=${item.position}&id=${item.id}&type=2`
+					url:`/pages/noLogin/valveWellInspection/valveWellInspection?valveWellName=${item.valveWellName}&position=${item.position}&id=${item.id}&managementOfficeId=${item.id}&type=2`
 				})
 			},
 			topage(url) {

+ 60 - 21
pages/noLogin/emergencyRepairOrder/emergencyRepairOrder.vue

@@ -4,26 +4,26 @@
 		<view class="project-content">
 			<u-form labelPosition="left" :model="form" :rules="rules" ref="form">
 				<u-form-item label="工程名称" labelWidth="150" borderBottom ref="item1">
-					<u-input v-model="form.enginName" borderBottom placeholder="请输入工程名称" :disabled="type==1"></u-input>
+					<u-input v-model="form.enginName" borderBottom placeholder="请输入工程名称"   ></u-input>
 				</u-form-item>
 				<u-form-item label="涉及户数" labelWidth="150" borderBottom ref="item1">
-					<u-input v-model="form.houseHolds" borderBottom placeholder="请输入涉及户数" :disabled="type==1"></u-input>
+					<u-input v-model="form.houseHolds" borderBottom placeholder="请输入涉及户数"   ></u-input>
 				</u-form-item>
 				<u-form-item label="接警时间" borderBottom ref="item1" labelWidth="150">
 					<u-input v-model="form.repairTime" borderBottom placeholder="请选择接警时间" disabled
-						@click="showtime=true&&type!=1"></u-input>
+						@click="showtime=true  "></u-input>
 					<u-picker v-model="showtime" mode="time" :params="params" @confirm="time()"></u-picker>
 				</u-form-item>
 				<u-form-item label="报修人名称" labelWidth="150" borderBottom ref="item1">
-					<u-input v-model="form.repairName" borderBottom placeholder="请输入报修人名称" :disabled="type==1"></u-input>
+					<u-input v-model="form.repairName" borderBottom placeholder="请输入报修人名称"   ></u-input>
 				</u-form-item>
 				<u-form-item label="联系电话" labelWidth="150" borderBottom ref="item1">
 					<u-input v-model="form.repairPhone" borderBottom placeholder="请输入联系电话"
-						:disabled="type==1"></u-input>
+						  ></u-input>
 				</u-form-item>
 				<u-form-item label="报修类型" labelWidth="150" borderBottom ref="item1">
 					<u-input v-model="repairTypeLabel" disabled @click=" showrepairType= true;" borderBottom
-						disabledColor="#ffffff" placeholder="请选择报修类型" v-if="type!=1"></u-input>
+						disabledColor="#ffffff" placeholder="请选择报修类型"   ></u-input>
 					<u-input v-model="labelList.repair_type" disabled borderBottom disabledColor="#ffffff"
 						placeholder="请选择报修类型" v-if="type==1"></u-input>
 					<u-select v-model="showrepairType" :list="typelist.repair_type" label-name="dictLabel"
@@ -33,15 +33,15 @@
 				<u-form-item borderBottom ref="item1">
 					<view>报修内容</view>
 					<u-input v-model="form.repairContent" type="textarea" showWordLimit='255' borderBottom
-						:disabled="type==1" placeholder="请输入报修内容"></u-input>
+						   placeholder="请输入报修内容"></u-input>
 				</u-form-item>
 				<u-form-item label="到达时间" labelWidth="150" borderBottom ref="item1">
 					<u-input v-model="form.arrivalTime" borderBottom disabled
-						@click="showtime4=true&&type!=1"></u-input>
+						@click="showtime4=true  "></u-input>
 					<u-picker v-model="showtime4" mode="time" :params="params" @confirm="time4()"></u-picker>
 				</u-form-item>
 				<u-form-item label="损坏原因" labelWidth="150" borderBottom ref="item1">
-					<u-input v-model="causesOfFamageLabel" disabled @click=" causesOfFamageType = true;" v-if="type!=1"
+					<u-input v-model="causesOfFamageLabel" disabled @click=" causesOfFamageType = true;"   
 						borderBottom placeholder="请选择损坏原因"></u-input>
 					<u-input v-model="labelList.causes_of_damage" disabled v-if="type==1" borderBottom
 						placeholder="请选择损坏原因"></u-input>
@@ -50,29 +50,29 @@
 					<u-icon slot="right" name="arrow-right"></u-icon>
 				</u-form-item>
 				<u-form-item label="施工管径" labelWidth="150" borderBottom ref="item1">
-					<u-input v-model="form.constructionPipeDiameter" borderBottom :disabled="type==1"
+					<u-input v-model="form.constructionPipeDiameter" borderBottom   
 						placeholder="请输入施工管径"></u-input>
 				</u-form-item>
 
 				<u-form-item label="管线压力" labelWidth="150" borderBottom ref="item1">
 					<u-input v-model="pipelinePressureLabel" disabled @click=" pipelinePressureType= true;"
-						v-if="type!=1" placeholder="请输入管线压力" borderBottom></u-input>
+						   placeholder="请输入管线压力" borderBottom></u-input>
 					<u-input v-model="labelList.pipeline_pressure" disabled borderBottom v-if="type==1"></u-input>
 					<u-select v-model="pipelinePressureType" :list="typelist.pipeline_pressure" label-name="dictLabel"
 						value-name="dictValue" @confirm="pipelinePressure()" :value="form.pipelinePressure"></u-select>
 					<u-icon slot="right" name="arrow-right"></u-icon>
 				</u-form-item>
 				<u-form-item label="停气方式" labelWidth="150" borderBottom ref="item1">
-					<u-input v-model="form.stopGasMethod" borderBottom :disabled="type==1"
+					<u-input v-model="form.stopGasMethod" borderBottom   
 						placeholder="请输入停气方式"></u-input>
 				</u-form-item>
 				<u-form-item label="使用材料" labelWidth="150" borderBottom ref="item1">
-					<u-input v-model="form.usingMaterials" borderBottom :disabled="type==1"
+					<u-input v-model="form.usingMaterials" borderBottom   
 						placeholder="请输入使用材料" ></u-input>
 				</u-form-item>
 				<u-form-item label="维修人" labelWidth="150" borderBottom ref="item1">
 					<u-input v-model="form.maintenanceName" borderBottom disabled
-						placeholder="请输入维修人" @click="workerModel=true&&type!=1"></u-input>
+						placeholder="请输入维修人" @click="workerModel=true  "></u-input>
 					<!-- 	<u-select v-model="workerModel" :list="workerList" label-name="name"
 							value-name="id" @confirm="Worker()" :value="form.maintenanceName"></u-select> -->
 							<u-popup v-model="workerModel" style= "height: 200px ;padding: 40rpx 36rpx;"mode="bottom">
@@ -101,22 +101,22 @@
 				</u-form-item>
 				<u-form-item label="施工时间" labelWidth="150" borderBottom ref="item1">
 					<u-input v-model="form.constructionTime" borderBottom disabled
-						@click="showtime3=true&&type!=1"></u-input>
+						@click="showtime3=true  "></u-input>
 					<u-picker v-model="showtime3" mode="time" :params="params" @confirm="time3()"></u-picker>
 				</u-form-item>
 
 				<u-form-item label="现场领导" labelWidth="150" borderBottom ref="item1">
-					<u-input v-model="form.onSiteLeadership" borderBottom placeholder="请输入现场领导" :disabled="type==1"></u-input>
+					<u-input v-model="form.onSiteLeadership" borderBottom placeholder="请输入现场领导"   ></u-input>
 				</u-form-item>
 				<u-form-item label="完成时间" labelWidth="150" borderBottom ref="item1">
 					<u-input v-model="form.maintenanceTime" borderBottom disabled
-						@click="showtime2=true&&type!=1"></u-input>
+						@click="showtime2=true  "></u-input>
 					<u-picker v-model="showtime2" mode="time" :params="params" @confirm="time2()"></u-picker>
 				</u-form-item>
 				<u-form-item label="维修照片" labelWidth="150" borderBottom ref="item1">
 					<view class="" style="display: flex; flex-wrap: wrap; margin: 0 55rpx;">
 						<image src="https://cczdsz.cn/app/images//chooseimg.png" mode=""
-							style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="choose()" v-if="type!=1">
+							style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="choose()"   >
 						</image>
 						<view v-for="(item,index) in imgymxs" :key="index" style="position: relative;">
 							<view v-if="item.type == 'image'">
@@ -129,17 +129,18 @@
 							</view>
 							<view @click="remove(index)"
 								style="position: absolute; top: 0; right: 14rpx; border-radius: 50%; background-color: #FF0000;">
-								<u-icon name="close" color="#FFFFFF" size="25" v-if="type!=1"></u-icon>
+								<u-icon name="close" color="#FFFFFF" size="25"   ></u-icon>
 							</view>
 						</view>
 					</view>
 				</u-form-item>
 				<u-form-item borderBottom ref="item1">
 					<view>备注</view>
-					<u-input v-model="form.remarks" borderBottom type="textarea" :disabled="type==1"></u-input>
+					<u-input v-model="form.remarks" borderBottom type="textarea"   ></u-input>
 				</u-form-item>
 			</u-form>
-			<u-button @click="save()" v-if="type!=1" type='primary'>确认上传</u-button>
+			<u-button @click="save()"    type='primary' v-if="type!=1">确认上传</u-button>
+			<u-button @click="update()"    type='primary' v-else>确认修改</u-button>
 		</view>
 	</view>
 </template>
@@ -273,6 +274,7 @@
 									url.url = item
 									url.type = 'image'
 									this.imgymxs.push(url)
+									this.imgArr.push(item)
 								})
 							}
 							this.form = res
@@ -337,6 +339,43 @@
 				console.log(`${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`)
 				this.form.arrivalTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`
 			},
+			update()
+			{
+				let _this = this
+				// this.form.unitId=this.unit
+				if(this.imgArr.length==0)
+				{
+					_this.$UTILS.showPrompt('请上传照片!')
+					return
+				}
+				this.form.pressureStatus = null
+				this.form.photoList = this.imgArr
+				this.form.userId=this.userId
+				this.form.createBy=this.userId
+				service.updateemergencyRepair(this.form).then(res => {
+					console.log(res)
+					_this.$UTILS.showPrompt('修改成功!')
+					// setTimeout(() => {
+					// 	console.log('跳')
+					// 	uni.switchTab({
+					// 		url: '/pages/index/index'
+					// 	})
+					// }, 2000)
+					// this.form={}
+					// this.maintenanceName=''
+					// this.labelList.repair_type=''
+					// this.repairTypeLabel=''
+					// this.labelList.causes_of_damage=''
+					// this.causesOfFamageLabel=''
+					// this.causesOfFamageType=''
+					// this.labelList.pipeline_pressure=''
+					// this.pipelinePressureLabel=''
+					// this.pipelinePressureType=''
+					// this.showtime2=''
+					// this.imgArr=[]
+					// this.imgymxs=[]
+				})
+			},
 			save() {
 				let _this = this
 				// this.form.unitId=this.unit

Plik diff jest za duży
+ 97 - 6
pages/noLogin/listProject.vue


+ 515 - 0
pages/noLogin/patrolFleet/patrolFleet.vue

@@ -0,0 +1,515 @@
+<template>
+<view>
+<image src="https://cczdsz.cn/app/images/background-from.png" class="background"></image>
+<view class="project-content">
+	<u-form :model="form" :rules="rules" ref="form">
+		<u-form-item label="班组" borderBottom ref="item1" labelWidth="140">
+			<u-input v-model="teamName"    disabled borderBottom @click="showbuilding= true"
+				placeholder="请选择班组"></u-input>
+				<u-select v-model="showbuilding" :list="typelist.team" label-name="dictLabel" value-name="dictValue"
+					@confirm="buildingconfirm()"> </u-select>
+				<u-icon slot="right" name="arrow-right"></u-icon>
+		</u-form-item>
+		<u-form-item label="上传位置" labelWidth="140" borderBottom ref="item1">
+			<u-input v-model="form.uploadLocation"   borderBottom 
+				placeholder="请输入上传位置"></u-input>
+		</u-form-item>
+		<u-form-item label="是否正常巡检" labelWidth="140" borderBottom ref="item1">
+			<u-radio-group v-model="form.isNormalInspection"  >
+				<u-radio @change="confirm"
+					v-for="(item, index) in typelist.yes_and_no"
+					:key="index" :name="item.dictValue">
+					{{item.dictLabel}}
+				</u-radio>
+			</u-radio-group>
+		</u-form-item>
+		<u-form-item label="时间" labelWidth="140" borderBottom ref="item1">
+				<u-input v-model="time" borderBottom placeholder="请选择时间" disabled
+					></u-input>
+				<!-- <u-picker v-model="showtime" mode="time" :params="params" @confirm="time()"></u-picker> -->
+		</u-form-item>
+		<u-form-item borderBottom ref="item1">
+			<view>照片</view>
+			<u-input v-model="WarningColumnInformation" disabled placeholder="请上传巡检照片"></u-input>
+			<view class="" style="display: flex; flex-wrap: wrap; margin: 0 55rpx;">
+				<image src="https://cczdsz.cn/app/images/chooseimg.png" mode=""
+					style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="choose()"  >
+				</image>
+				<view v-for="(item,index) in imgymxs" :key="index" style="position: relative;">
+					<view v-if="item.type == 'image'">
+						<image :src="item.url" mode="" style="width: 190rpx; height: 190rpx; margin: 0 20rpx;"
+							@click="showPhoto(index)">
+						</image>
+					</view>
+					<view v-else>
+						<video :src="item" style="width: 190rpx; height: 190rpx; margin: 0 20rpx;"></video>
+					</view>
+					<view @click="remove(index)"
+						style="position: absolute; top: 0; right: 14rpx; border-radius: 50%; background-color: #FF0000;">
+						<u-icon name="close" color="#FFFFFF" size="35"  ></u-icon>
+					</view>
+				</view>
+			</view>
+		</u-form-item>
+	<!-- 	<u-form-item borderBottom ref="item1">
+			<view>备注</view>
+			<u-input v-model="form.remark" type="textarea" placeholder="请输入备注"  ></u-input>
+		</u-form-item> -->
+	</u-form>
+	<u-button style="background: #2d95f4;color: #fff;border-radius: 20rpx;" @click="save()"  
+		type='primary' v-if="type!=1">确认上传</u-button>
+		<u-button style="background: #2d95f4;color: #fff;border-radius: 20rpx;" @click="update()"  
+			type='primary' v-else>确认修改</u-button>
+</view>
+</view>
+</template>
+<script>
+import service from '@/api/index.js'
+export default {
+data() {
+	return {
+		repairType: [{
+			label: '施工问题',
+			value: 1
+		}, {
+			label: '施工问题',
+			value: 2
+		}, ],
+		showrepairType: false,
+		action: this.$HTTP.webUrl + `/obs`,
+		headers: {
+			MAuthorization: "wxBearer " + uni.getStorageSync('token')
+		},
+		url: [],
+		params: {
+			year: true,
+			month: true,
+			day: true,
+			hour: true,
+			minute: true,
+			second: false
+		},
+		uploading: false,
+		time:null,
+		showtime:false,
+		imgArr: [],
+		imgymxs: [],
+		progress: 0, //图片或视频上传百分比
+		form: {
+			findProblem:1
+		},
+		typelist: [],
+		causesOfFamageLabel: null,
+		dictlist: ['yes_and_no','team'],
+		teamName: null,
+		team:null,
+		unit: null,
+		unitName: null,
+		showbuilding: false,
+		showunit: false,
+		buildingList: [],
+		unitList: [],
+		type: 2,
+		id: null,
+		community: null,
+		createBy:null,
+		name:null
+	}
+},
+onLoad(e) {
+	// this.building = e.building
+	// this.buildingName = e.buildingName
+	// this.community = e.community
+	// this.unitName = e.unitName
+	// this.unit = e.unit
+	 this.id = e.id
+	this.type = e.type
+	console.log(e)
+	this.name=e.name
+	let time1 = new Date()
+	console.log(time1.toLocaleString())
+	var year = time1.getFullYear(); //得到年份
+	var month = time1.getMonth() + 1; //得到月份
+	var date = time1.getDate(); //得到日期
+	var hours = time1.getHours(); //获取系统时
+	var Min = time1.getMinutes(); //分
+	this.type = e.type
+	this.id = e.id
+	this.time = year + "/" + month + "/" + date + "-" + hours + ":" + Min
+	this.getdictsysinfo()
+	uni.setNavigationBarTitle({
+		title: '巡检车队'
+	});
+	uni.setNavigationBarColor({
+		frontColor: '#ffffff',
+		backgroundColor: '#2d95f4',
+	})
+	// if (this.type != 1) {
+	// 	this.getBuildingList()
+	// }
+	this.getUserName()
+},
+methods: {
+	time(e) {
+		console.log(`${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`)
+		this.form.createTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`
+	},
+	// checksamplingMeterCount(e) {
+	// 	console.log(e)
+	// 				//正则表达试
+	// 				e = (e.match(/^\d*(\.?\d{0,10})/g)[0]) || null
+	// 				//重新赋值给input
+	// 				this.$nextTick(() => {
+	// 					this.form.samplingMeterCount= e
+	// 				})
+	// 			},
+	getUserName(){
+		service.getUserName().then(res=>{
+			this.userId=res.id
+			this.createBy=res.name
+		})
+	},
+	// showPhoto(index) {
+	// 	uni.previewImage({
+	// 		current: index,
+	// 		urls: this.imgArr,
+	// 	})
+	// },
+	// showPhotos(index) {
+	// 	uni.previewImage({
+	// 		current: index,
+	// 		urls: this.photo,
+	// 	})
+	// },
+	buildingconfirm(e) {
+		this.teamName = e[0].label
+		this.team = e[0].value
+		this.form.team=e[0].value
+		console.log(this.team)
+		//this.getUnitList(e[0].value)
+	},
+	// unitconfirm(e) {
+	// 	this.unitName = e[0].label
+	// 	this.unit = e[0].value
+	// },
+	// getBuildingList() {
+	// 	const _this = this
+	// 	service.getBuildingList({
+	// 		areaId: this.community
+	// 	}).then(res => {
+	// 		_this.buildingList = res
+	// 	})
+	// },
+	// getUnitList(building) {
+	// 	const _this = this
+	// 	service.getUnitList({
+	// 		buildingId: building
+	// 	}).then(res => {
+	// 		_this.unitList = res
+	// 	})
+	// },
+	update()
+	{
+		let _this = this
+		this.form.pressureStatus = null
+		this.form.photoList = this.imgArr
+		// if(this.building==null)
+		// {
+		// 	uni.showToast({
+		// 		title: '请选择楼栋',
+		// 		icon: 'none'
+		// 	})
+		// 	return
+		// }
+		if(this.imgArr.length==0)
+		{
+			uni.showToast({
+				title: '请上传图片或视频!',
+				icon: 'none'
+			})
+			return
+		}
+		// this.form.buildingId = this.building
+		// this.form.communityId=this.community
+		this.form.userId=this.userId
+		this.form.createBy=this.userId
+		service.updatepatrolTeam(this.form).then(res => {
+			console.log(res)
+			_this.$UTILS.showPrompt('修改成功!')
+			// setTimeout(() => {
+			// 	console.log('跳')
+			// 	uni.switchTab({
+			// 		url: '/pages/index/index'
+			// 	})
+			// }, 2000)
+			//this.form={isNormalInspection:1}
+			// this.buildingName=''
+			// this.imgArr=[]
+			// this.imgymxs=[]
+		})
+		
+	},
+	save() {
+		let _this = this
+		this.form.photoList = this.imgArr
+		// if(this.building==null)
+		// {
+		// 	uni.showToast({
+		// 		title: '请选择楼栋',
+		// 		icon: 'none'
+		// 	})
+		// 	return
+		// }
+		if(this.imgArr.length==0)
+		{
+			uni.showToast({
+				title: '请上传图片或视频!',
+				icon: 'none'
+			})
+			return
+		}
+		// this.form.buildingId = this.building
+		// this.form.communityId=this.community
+		this.form.userId=this.userId
+		this.form.createBy=this.userId
+		this.form.team=this.team
+		service.patrolTeam(this.form).then(res => {
+			console.log(res)
+			_this.$UTILS.showPrompt('上报成功!')
+			// setTimeout(() => {
+			// 	console.log('跳')
+			// 	uni.switchTab({
+			// 		url: '/pages/index/index'
+			// 	})
+			// }, 2000)
+			this.form={isNormalInspection:1}
+			// this.buildingName=''
+			this.imgArr=[]
+			this.imgymxs=[]
+		})
+	},
+	getdictsysinfo() {
+		let _this = this
+		service.getDictInfoList({
+			type: this.dictlist
+		}).then(res => {
+			if (this.type == 1) {
+				let _this = this
+				console.log(this.id)
+				
+				service.getpatrolTeam(this.id).then(res => {
+					// console.log(_this.typelist)
+					// _this.buildingName = res.buildingName
+					// _this.unitName = res.unitName
+					// let list = []
+					// list = _this.typelist.find_problem
+					// list.forEach((item) => {
+					// 	if (item.dictValue == res.findProblem) {
+					// 		_this.causesOfFamageLabel = item.dictLabel
+					// 	}
+					// })
+					if (null != res.photoList) {
+						res.photoList.forEach(item => {
+							let url = {}
+							url.url = item
+							url.type = 'image'
+							this.imgymxs.push(url)
+							this.imgArr.push(item)
+						})
+					}
+					this.teamName=this.name
+					this.time=res.createTime
+					this.form = res
+				})
+			}
+			_this.typelist = res
+			console.log(res)
+		})
+	},
+	confirm(e) {
+		this.form.findProblem =e
+	},
+	choose() {
+		let _this = this;
+		uni.showActionSheet({
+			title: '上传',
+			itemList: ['图片', '视频'],
+			success: (res) => {
+				// console.log(res)
+				if (res.tapIndex == 0) {
+					this.chooseimage()
+				} else {
+					this.choosevideo()
+				}
+			}
+		})
+	},
+	chooseimage() {
+		console.log('图片')
+		let _this = this;
+		uni.chooseImage({
+			sourceType: ['camera'],
+			success(resp) {
+				console.log('res--uni.chooseMedia', resp);
+				resp.tempFiles.forEach((item, index) => {
+					const task = uni.uploadFile({
+						url: _this.$HTTP.webUrl + `/obs`,
+						filePath: item.path,
+						name: 'file',
+						formData: {},
+						header: _this.headers,
+						success: res => {
+							// 判断是否json字符串,将其转为json格式
+							let data = _this.$u.test.jsonString(res.data) ? JSON.parse(
+								res.data) : res.data;
+							if (![200, 201, 204].includes(res.statusCode)) {
+								// this.uploadError(index, data);
+								_this.$UTILS.showPrompt('选取失败!')
+							} else {
+								// 上传成功
+								// this.lists[index].response = data;
+								// this.lists[index].progress = 100;
+								// this.lists[index].error = false;
+								// this.$emit('on-success', data, index, this.lists, this
+								// 	.index);
+								if (_this.progress === 100) {
+									// console.log('_this.progress', _this.progress)
+									// console.log('data----', data)
+									// console.log('res--', res)
+									_this.imgymxs.push({
+										url: data.data.url,
+										type: 'image'
+									})
+									_this.imgArr.push(data.data.url)
+									// console.log('imgArr', _this.imgArr)
+									_this.$UTILS.showPrompt('选取成功!')
+								}
+							}
+						},
+						fail: e => {
+							_this.$UTILS.showPrompt('选取失败!')
+							this.uploadError(index, e);
+						},
+						
+						complete: res => {
+							_this.uploading = false;
+							// _this.uploadFile(index + 1);
+							// this.$emit('on-change', res, index, this.lists, this
+							// .index);
+						}
+					});
+					task.onProgressUpdate(res => {
+						// if (res.progress > 0) {
+						// 	this.lists[index].progress = res.progress;
+						// 	this.$emit('on-progress', res, index, this.lists, this.index);
+						// }
+						_this.progress = res.progress;
+						console.log('onProgressUpdate', res)
+						uni.showLoading({
+							title: '选取中'
+						})
+					});
+				})
+			},
+		})
+	},
+	choosevideo() {
+		let _this = this;
+		console.log('视频')
+		uni.chooseVideo({
+			sourceType: ['camera'],
+			maxDuration: 30,
+			success(resp) {
+				const task = uni.uploadFile({
+					url: _this.$HTTP.webUrl + `/obs`,
+					filePath: resp.tempFilePath,
+					name: 'file',
+					formData: {},
+					header: _this.headers,
+					success: res => {
+						// 判断是否json字符串,将其转为json格式
+						let data = _this.$u.test.jsonString(res.data) ? JSON.parse(res.data) :
+							res.data;
+						if (![200, 201, 204].includes(res.statusCode)) {
+							this.uploadError(index, data);
+						} else {
+							// 上传成功
+							// this.lists[index].response = data;
+							// this.lists[index].progress = 100;
+							// this.lists[index].error = false;
+							// this.$emit('on-success', data, index, this.lists, this
+							// 	.index);
+							if (_this.progress === 100) {
+								console.log('_this.progress', _this.progress)
+								console.log('data----', data)
+								console.log('res--', res)
+								// _this.imgArr.push(data.data.url)
+								_this.imgymxs.push({
+									url: data.data.url,
+									type: 'video'
+								})
+								_this.imgArr.push(data.data.url)
+								console.log('imgArr', _this.imgArr)
+								_this.$UTILS.showPrompt('选取成功!')
+							}
+						}
+					},
+					fail: e => {
+						_this.$UTILS.showPrompt('选取失败!')
+						this.uploadError(index, e);
+					},
+					complete: res => {
+						uni.hideLoading();
+						_this.uploading = false;
+						// _this.uploadFile(index + 1);
+						// this.$emit('on-change', res, index, this.lists, this
+						// .index);
+					}
+				});
+				task.onProgressUpdate(res => {
+					// if (res.progress > 0) {
+					// 	this.lists[index].progress = res.progress;
+					// 	this.$emit('on-progress', res, index, this.lists, this.index);
+					// }
+					_this.progress = res.progress;
+					console.log('onProgressUpdate', res)
+					uni.showLoading({
+						title: '选取中'
+					})
+				});
+			},
+		})
+	},
+	remove(index) {
+		uni.showModal({
+			title: '提示',
+			content: '是否删除该图片或视频?',
+			success: (res) => {
+				if (res.confirm) {
+					this.imgArr.splice(index, 1);
+					this.imgymxs.splice(index, 1);
+					console.log('this.imgarr', this.imgArr)
+				}
+			}
+		})
+	},
+}
+}
+</script>
+<style>
+.project-content {
+padding: 10rpx 20rpx;
+border-radius: 20rpx;
+background: #fff;
+width: 90%;
+margin: 0 auto;
+}
+
+.background {
+z-index: -1;
+position: fixed;
+width: 100%;
+height: 100%;
+background-size: 100% 100%;
+}
+</style>

+ 11 - 4
pages/noLogin/regulatorBoxList.vue

@@ -55,13 +55,14 @@
 				code:'',administrativeOffice:'',
 				ReachBottom:false,
 				page:1,
-				total:0
+				total:0,
+				pagetype:null
 			}
 
 		},
-		onLoad() {
+		onLoad(e) {
 			this.getUserName();
-
+            this.pagetype=e.value
 			this.getWorker();
 			uni.setNavigationBarColor({
 			    frontColor: '#ffffff',
@@ -119,8 +120,14 @@
 			},
 			gotoindex(item) {
 				console.log(item)
+				if(this.pagetype=='10')
+				{
+					uni.navigateTo({
+						url:`/pages/noLogin/GRegulatingBoxMaintenance/GRegulatingBoxMaintenance?number=${item.number}&name=${item.name}&managementOffice=${item.managementOffice}&id=${item.id}&managementOfficeId=${item.id}&type=2`
+					})
+				}
 				uni.navigateTo({
-					url:`/pages/noLogin/PressureRegulatingBox/PressureRegulatingBox?number=${item.number}&name=${item.name}&managementOffice=${item.managementOffice}&id=${item.id}&type=2`
+					url:`/pages/noLogin/PressureRegulatingBox/PressureRegulatingBox?number=${item.number}&name=${item.name}&managementOffice=${item.managementOffice}&id=${item.id}&managementOfficeId=${item.id}&type=2`
 				})
 			},
 			topage(url) {

+ 51 - 9
pages/noLogin/roadSection/roadSection.vue

@@ -4,15 +4,15 @@
 <view class="project-content">
 	<u-form :model="form" :rules="rules" ref="form">
 		<u-form-item label="路段名称" borderBottom ref="item1" labelWidth="140">
-			<u-input v-model="form.sectionName" :disabled="type==1" borderBottom @click="showbuilding= true&&type!=1"
+			<u-input v-model="form.sectionName"   borderBottom @click="showbuilding= true "
 				placeholder="请输入路段名称"></u-input>
 		</u-form-item>
 		<u-form-item label="抽检米数" labelWidth="140" borderBottom ref="item1">
-			<u-input v-model="form.samplingMeterCount" :disabled="type==1" borderBottom @click="showbuilding= true&&type!=1"
+			<u-input v-model="form.samplingMeterCount"   borderBottom @click="showbuilding= true "
 				placeholder="请输入抽检米数" @input="checksamplingMeterCount()"></u-input>
 		</u-form-item>
 		<u-form-item label="发现问题" labelWidth="140" borderBottom ref="item1">
-			<u-radio-group v-model="form.findProblem" :disabled="type==1">
+			<u-radio-group v-model="form.findProblem"  >
 				<u-radio @change="confirm"
 					v-for="(item, index) in typelist.find_problem"
 					:key="index" :name="item.dictValue">
@@ -22,7 +22,7 @@
 		</u-form-item>
 		<!-- <u-form-item label="发现时间" labelWidth="140" borderBottom ref="item1">
 				<u-input v-model="form.findTime" borderBottom placeholder="请选择接警时间" disabled
-					@click="showtime=true&&type!=1"></u-input>
+					@click="showtime=true "></u-input>
 				<u-picker v-model="showtime" mode="time" :params="params" @confirm="time()"></u-picker>
 		</u-form-item> -->
 		<u-form-item borderBottom ref="item1">
@@ -30,7 +30,7 @@
 			<u-input v-model="WarningColumnInformation" disabled placeholder="请上传巡检照片"></u-input>
 			<view class="" style="display: flex; flex-wrap: wrap; margin: 0 55rpx;">
 				<image src="https://cczdsz.cn/app/images/chooseimg.png" mode=""
-					style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="choose()" v-if="type!=1">
+					style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="choose()"  >
 				</image>
 				<view v-for="(item,index) in imgymxs" :key="index" style="position: relative;">
 					<view v-if="item.type == 'image'">
@@ -43,18 +43,20 @@
 					</view>
 					<view @click="remove(index)"
 						style="position: absolute; top: 0; right: 14rpx; border-radius: 50%; background-color: #FF0000;">
-						<u-icon name="close" color="#FFFFFF" size="35" v-if="type!=1"></u-icon>
+						<u-icon name="close" color="#FFFFFF" size="35"  ></u-icon>
 					</view>
 				</view>
 			</view>
 		</u-form-item>
 		<u-form-item borderBottom ref="item1">
 			<view>备注</view>
-			<u-input v-model="form.remark" type="textarea" placeholder="请输入备注" :disabled="type==1"></u-input>
+			<u-input v-model="form.remark" type="textarea" placeholder="请输入备注"  ></u-input>
 		</u-form-item>
 	</u-form>
-	<u-button style="background: #2d95f4;color: #fff;border-radius: 20rpx;" @click="save()" v-if="type!=1"
-		type='primary'>确认上传</u-button>
+	<u-button style="background: #2d95f4;color: #fff;border-radius: 20rpx;" @click="save()"  
+		type='primary' v-if="type!=1">确认上传</u-button>
+		<u-button style="background: #2d95f4;color: #fff;border-radius: 20rpx;" @click="update()"
+			type='primary ' v-else>确认修改</u-button>
 </view>
 </view>
 </template>
@@ -226,6 +228,45 @@ methods: {
 			this.imgymxs=[]
 		})
 	},
+	update() {
+		let _this = this
+		this.form.pressureStatus = null
+		this.form.photoList = this.imgArr
+		// if(this.building==null)
+		// {
+		// 	uni.showToast({
+		// 		title: '请选择楼栋',
+		// 		icon: 'none'
+		// 	})
+		// 	return
+		// }
+		if(this.imgArr.length==0)
+		{
+			uni.showToast({
+				title: '请上传图片或视频!',
+				icon: 'none'
+			})
+			return
+		}
+		// this.form.buildingId = this.building
+		// this.form.communityId=this.community
+		this.form.userId=this.userId
+		this.form.createBy=this.userId
+		service.updateroadSectionInspection(this.form).then(res => {
+			console.log(res)
+			_this.$UTILS.showPrompt('修改成功!')
+			// setTimeout(() => {
+			// 	console.log('跳')
+			// 	uni.switchTab({
+			// 		url: '/pages/index/index'
+			// 	})
+			// }, 2000)
+			//this.form={findProblem:1}
+			// this.buildingName=''
+			// this.imgArr=[]
+			// this.imgymxs=[]
+		})
+	},
 	getdictsysinfo() {
 		let _this = this
 		service.getDictInfoList({
@@ -251,6 +292,7 @@ methods: {
 							url.url = item
 							url.type = 'image'
 							this.imgymxs.push(url)
+							this.imgArr.push(item)
 						})
 					}
 					this.form = res

+ 44 - 6
pages/noLogin/typeList.vue

@@ -137,7 +137,7 @@
 				if (url.dictValue == '1') {
 					this.list1 = []
 					this.list.forEach(item => {
-						if (item.dictValue == '1'||item.dictValue == '0'||item.dictValue == '6'||item.dictValue == '8') {
+						if (item.dictValue == '1'||item.dictValue == '0'||item.dictValue == '6'||item.dictValue == '8'||item.dictValue == '11') {
 							item.visable = false
 						} else {
 							item.visable = true
@@ -166,7 +166,7 @@
 					{
 						this.list1 = []
 						this.list.forEach(item => {
-							if (item.dictValue == '1'||item.dictValue == '0'||item.dictValue == '8') {
+							if (item.dictValue == '1'||item.dictValue == '0'||item.dictValue == '8'||item.dictValue == '11') {
 								item.visable = true
 							} else {
 								item.visable = false
@@ -199,7 +199,25 @@
 							url: `/pages/noLogin/regulatorBoxList?value=${url.dictValue}`
 						})
 					}
-					else
+					else if(url.dictValue=='9')
+					{
+						uni.navigateTo({
+							url: `/pages/noLogin/patrolFleet/patrolFleet?type=2`
+						})
+					}
+					else if(url.dictValue=='10')
+					{
+						uni.navigateTo({
+							url: `/pages/noLogin/regulatorBoxList?value=${url.dictValue}`
+						})
+					}
+					else if(url.dictValue=='11')
+					{
+						uni.navigateTo({
+							url: `/pages/noLogin/PipelineGasUser/PipelineGasUser?value=${url.dictValue}`
+						})
+					}
+					else 
 					{
 
 						uni.navigateTo({
@@ -212,6 +230,7 @@
 			},
 			backview()
 			{
+				uni.removeStorageSync('type')
 				this.getProjectType()
 				this.visable=false
 				uni.showTabBar()
@@ -226,7 +245,7 @@
 				this.visable = false
 				this.list1 = []
 				this.list.forEach(item => {
-					if (item.dictValue == '1' || item.dictValue == '2'||item.dictValue == '7' || item.dictValue == '8') {
+					if (item.dictValue == '1' || item.dictValue == '2'||item.dictValue == '7' || item.dictValue == '8' || item.dictValue == '9') {
 						item.visable = true
 					} else {
 						item.visable = false
@@ -258,7 +277,7 @@
 						{
 							item.image='https://cczdsz.cn/app/images/kggs.png'
 						}
-						else if (item.dictValue==6 || item.dictValue == 8){
+						else if (item.dictValue == 8){
 							item.image='https://cczdsz.cn/app/images/kggs.png'
 							item.visable = false
 						}
@@ -294,6 +313,24 @@
 						visable: false,
 						image:'https://cczdsz.cn/app/images/spzxc.png'
 					})
+					this.list1.push({
+						dictLabel: '巡检车队',
+						dictValue: '9',
+						visable: false,
+						image:'https://cczdsz.cn/app/images/xjcd.png'
+					})
+					this.list1.push({
+						dictLabel: '调压箱维护',
+						dictValue: '10',
+						visable: false,
+						image:'https://cczdsz.cn/app/images/xxdy.png'
+					})
+					this.list1.push({
+						dictLabel: '非居民用户',
+						dictValue: '11',
+						visable: false,
+						image:'https://cczdsz.cn/app/images/fjm.png'
+					})
 					this.list = this.list1
 					console.log(this.list)
 				})
@@ -301,7 +338,8 @@
 			getUserName() {
 				service.getUserName().then(res => {
 					this.name = res.name;
-					this.power = res.power + '2,3,4,7,8';
+					this.power = res.power + ',2,3,4,7,8,9,10,11';
+					this.power=this.power.split(',')
 				})
 			},
 		},

+ 102 - 6
pages/noLogin/valveWellInspection/valveWellInspection.vue

@@ -3,6 +3,10 @@
 <image src="https://cczdsz.cn/app/images/background-from.png" class="background"></image>
 <view class="project-content">
 	<u-form :model="form" :rules="rules" ref="form">
+		<view style="flex-flow: row;display: flex; justify-content: flex-end;">
+		<view class="small-title">阀井 </view> 
+		<view class="small-title" style="margin-left: auto;" @click="BoxDetails()">详情<u-icon name="arrow-right"></u-icon></view>
+		</view>
 		<u-form-item label="阀井名称" borderBottom ref="item1" labelWidth="140">
 			<u-input v-model="form.valveWellName" disabled borderBottom
 				placeholder="请输入阀井名称"></u-input>
@@ -15,7 +19,7 @@
 		<u-icon slot="right" name="arrow-right"></u-icon> -->
 		</u-form-item>
 		<u-form-item label="发现问题" labelWidth="140" borderBottom ref="item1">
-			<u-radio-group v-model="form.discoverProblems" :disabled="type==1">
+			<u-radio-group v-model="form.discoverProblems"   >
 				<u-radio @change="confirm"
 					v-for="(item, index) in typelist.find_problem"
 					:key="index" :name="item.dictValue">
@@ -33,7 +37,7 @@
 			<u-input v-model="WarningColumnInformation" disabled placeholder="请上传巡检照片"></u-input>
 			<view class="" style="display: flex; flex-wrap: wrap; margin: 0 55rpx;">
 				<image src="https://cczdsz.cn/app/images/chooseimg.png" mode=""
-					style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="choose()" v-if="type!=1">
+					style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="choose()" >
 				</image>
 				<view v-for="(item,index) in imgymxs" :key="index" style="position: relative;">
 					<view v-if="item.type == 'image'">
@@ -46,19 +50,49 @@
 					</view>
 					<view @click="remove(index)"
 						style="position: absolute; top: 0; right: 14rpx; border-radius: 50%; background-color: #FF0000;">
-						<u-icon name="close" color="#FFFFFF" size="35" v-if="type!=1"></u-icon>
+						<u-icon name="close" color="#FFFFFF" size="35" ></u-icon>
 					</view>
 				</view>
 			</view>
 		</u-form-item>
 		<u-form-item borderBottom ref="item1">
 			<view>备注</view>
-			<u-input v-model="form.remark" type="textarea" placeholder="请输入备注" :disabled="type==1"></u-input>
+			<u-input v-model="form.remark" type="textarea" placeholder="请输入备注" ></u-input>
 		</u-form-item>
 	</u-form>
 	<u-button style="background: #2d95f4;color: #fff;border-radius: 20rpx;" @click="save()" v-if="type!=1"
 		type='primary'>确认上传</u-button>
+		<u-button style="background: #2d95f4;color: #fff;border-radius: 20rpx;" @click="update()" 
+			type='primary' v-else>确认修改</u-button>
 </view>
+	<view>
+			<u-popup v-model="showBoxDetails" height= "400px" border-radius="14" mode=bottom closeable=true   close-icon-color="#000000">
+				<image src="https://cczdsz.cn/app/images/background.png" class="background"></image>
+				<view>
+					<u-form :model="boxform" ref="boxform">
+						<view style="text-align:center; font-size: 40rpx;">阀井详情</view>
+						<view class="project-content" style="margin-top: 20px;">
+	                    <u-form-item label="阀井名称" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+		                 <u-input v-model="boxform.valveWellName" disabled></u-input>
+	                    </u-form-item>
+						<u-form-item label="位置" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="boxform.position" placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="经度" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="boxform.longitude"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="纬度" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="boxform.latitude"  placeholder=" " disabled></u-input>
+						</u-form-item>
+						<u-form-item label="控制区域" borderBottom ref="item1" placeholder=" " labelWidth="200" >
+						 <u-input v-model="boxform.remark"  placeholder=" " disabled></u-input>
+						</u-form-item>
+							</view>
+							</u-form>
+				</view>
+			</u-popup>
+		</view>
+	</view>
 </view>
 </template>
 <script>
@@ -109,7 +143,11 @@ data() {
 		community: null,
 		createBy:null,
 		valveWellName:null,
-		position:null
+		position:null,
+		showBoxDetails:false,
+		boxform:{},
+		managementOfficeId:null,
+		
 	}
 },
 onLoad(e) {
@@ -119,7 +157,7 @@ onLoad(e) {
 	// this.unitName = e.unitName
 	// this.unit = e.unit
 	this.id = e.id
-
+  this.managementOfficeId=e.managementOfficeId
 	this.type = e.type
 
 	console.log(e)
@@ -141,6 +179,14 @@ onLoad(e) {
 	this.getUserName()
 },
 methods: {
+	BoxDetails()
+	{
+		service.getvalveWellPositionId(this.managementOfficeId).then(res=>{
+			this.boxform=res
+			this.showBoxDetails=true
+		})
+		
+	},
 	time(e) {
 		console.log(`${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`)
 		this.form.discoverTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`
@@ -198,6 +244,49 @@ methods: {
 	// 		_this.unitList = res
 	// 	})
 	// },
+	update()
+	{
+		let _this = this
+		this.form.photoList = this.imgArr
+		// if(this.building==null)
+		// {
+		// 	uni.showToast({
+		// 		title: '请选择楼栋',
+		// 		icon: 'none'
+		// 	})
+		// 	return
+		// }
+		if(this.imgArr.length==0)
+		{
+			uni.showToast({
+				title: '请上传图片或视频!',
+				icon: 'none'
+			})
+			return
+		}
+		// this.form.buildingId = this.building
+		// this.form.communityId=this.community
+		this.form.userId=this.userId
+		this.form.pressureStatus = null
+		this.form.createBy=this.userId
+		this.form.positionId=this.id
+		service.updatevalveWellPosition(this.form).then(res => {
+			console.log(res)
+			_this.$UTILS.showPrompt('修改成功!')
+			// setTimeout(() => {
+			// 	console.log('跳')
+			// 	uni.switchTab({
+			// 		url: '/pages/index/index'
+			// 	})
+			// }, 2000)
+			// this.form={discoverProblems:1}
+			// this.form.valveWellName=this.valveWellName
+			// this.form.position=this.position
+			// // this.buildingName=''
+			// this.imgArr=[]
+			// this.imgymxs=[]
+		})
+	},
 	save() {
 		let _this = this
 		this.form.photoList = this.imgArr
@@ -255,12 +344,14 @@ methods: {
 							url.url = item
 							url.type = 'image'
 							this.imgymxs.push(url)
+							this.imgArr.push(item)
 						})
 					}
 					this.form = res
 					res.valveWellName=res.position.valveWellName
 					//this.form.valveWellName=res.position.valveWellName
 					this.form.position=res.position.position
+					this.managementOfficeId=res.positionId
 					console.log('123123',res)
 				})
 			}
@@ -453,4 +544,9 @@ width: 100%;
 height: 100%;
 background-size: 100% 100%;
 }
+.small-title {
+font-size: 38rpx;
+color: #2d95f4;
+margin: 20rpx 0;
+}
 </style>

+ 102 - 0
uni_modules/lime-signature/changelog.md

@@ -0,0 +1,102 @@
+## 1.3.9(2024-04-11)
+- feat: 增加`preferToDataURL`porps,是否优先使用`toDataURL`生成图片,在支持`toDataURL`的环境优先使用,会生成base64的图片
+## 1.3.8(2024-04-10)
+- fix: 修复因兼容抖音导致微信小程序图片不完整
+## 1.3.7(2024-04-10)
+- fix: 修复uniapp x(web)无法生图的问题
+- feat: 支持uniapp x(web on pc)
+## 1.3.6(2024-04-09)
+- fix: 修复抖音小程序无法生成图片
+## 1.3.5(2024-04-01)
+- feat: 支持uniapp x ios(app-js)
+## 1.3.4(2024-03-11)
+- feat: app-vue,app-nvue支持生成图片时传`destWidth`,`destHeight`
+## 1.3.3(2024-03-07)
+- fix: 修复因小数导致mask无法生成
+## 1.3.2(2024-03-06)
+- fix: 修复app-vue多重复命名变量导致无法使用
+## 1.3.1(2024-03-04)
+- fix: 缺少this导致云打包失败
+## 1.3.0(2024-02-28)
+- feat: 支持uniapp x web
+## 1.2.9(2024-02-21)
+- fix: 修复微信小程序IOS会断断续续的问题
+## 1.2.8(2023-12-21)
+- fix: 修复redo函数漏了`,`
+## 1.2.7(2023-12-19)
+- fix: 修复因非uniapp x默认引入了uts文件,导入无法运行
+## 1.2.6(2023-12-18)
+- feat: 增加支持uniapp x
+## 1.2.5(2023-10-11)
+- fix: 修复PC浏览不生效的问题
+## 1.2.4(2023-08-28)
+- feat: 增加 `disabled`
+## 1.2.3(2023-08-26)
+- fix: 修复app-nvue 无法生成图片
+## 1.2.2(2023-08-24)
+- fix: 修复app端获取`boundingBox`尺寸异常
+## 1.2.1(2023-08-23)
+- fix: 修复因画板尺寸有小数导致`boundingBox`失效
+## 1.2.0(2023-08-22)
+- fix: vue3 app 无法在第一时间获取到 `getSystemInfoSync` 函数,故在生命周期里获取
+## 1.1.9(2023-08-18)
+- fix: 排除`backgroundColor`为`transparent`的参数,因为会导致生成空白图片
+## 1.1.8(2023-08-16)
+- chore: 去掉多余的console.log
+## 1.1.7(2023-08-09)
+- fix: 修复 支付宝无法生成的问题
+## 1.1.6(2023-08-03)
+- fix: 多了个 return
+## 1.1.5(2023-07-27)
+- fix: 修复 微信小程序PC端无法绘制问题
+## 1.1.4(2023-07-21)
+- fix: 修复 APP 报 `requestAnimationFrame` 的问题
+## 1.1.3(2023-07-20)
+- fix: 修复 性能较一般的手机 手写会卡顿的问题
+## 1.1.2(2023-07-18)
+- fix: 修复 非 canvas 2d 微信小程序 无法生成图片
+## 1.1.1(2023-07-04)
+- feat: 增加 `boundingBox` 属性,只生成有笔画的内容区域,从而缩小图片的尺寸节省空间
+## 1.1.0(2023-06-20)
+- feat: 增加 `canvasToTempFilePath` 质量参数
+## 1.0.9(2023-06-13)
+- fix: 修复大屏设备上,画板会被离屏canvas挡住的情况
+## 1.0.8(2023-06-12)
+- fix: 修复vue2 rendrejs 导入问题
+## 1.0.7(2023-06-09)
+- fix: 修复vue3 rendrejs 找到不节点问题
+## 1.0.6(2023-05-23)
+- chore: stylus 改为 scss
+## 1.0.5(2023-05-16)
+- fix: 修复转临时路径出错
+## 1.0.4(2023-04-17)
+- chore: 删除多余字符
+## 1.0.3(2023-04-15)
+- BUG: QQ小程序可以使用,会有报错但不影响使用
+## 1.0.2(2023-04-15)
+- feat: 支持横屏
+- BUG: QQ小程序无法使用,为UNI官方问题,插件所需要的API传this都会报错。
+## 1.0.1(2023-04-03)
+- fix: 销毁时报错
+## 1.0.0(2022-10-27)
+- feat: 增加背景色
+- feat: 修复 app canvasToTempFilePath 无操作只能执行一次的问题
+## 0.8.0(2022-08-22)
+- feat: 增加beforeDelay 延时初始化,可用于手写板在弹窗里时
+## 0.7.0(2022-08-16)
+- fix: 修复缺少 canvasWidth
+## 0.6.0(2022-07-16)
+- fix: 修复 success is no defined
+## 0.5.0(2022-07-09)
+- feat: canvasToTempFilePath success 增加返回 isEmpty
+- fix: 修复 微信小程序 canvasToTempFilePath 无效问题
+## 0.4.0(2022-07-04)
+- fix: 生成图片缺少最后一笔
+## 0.3.0(2022-05-24)
+- chore: 支持多端 H5 小程序 APP APP-NVUE
+## 0.2.0(2021-07-09)
+- chore: 统一命名规范,无须主动引入组件
+- fix: 修复错位问题
+## 0.1.0(2021-03-07)
+- 首次上传
+- 撤消、清空、保存、模拟压感等功能

+ 157 - 0
uni_modules/lime-signature/components/l-signature/context.js

@@ -0,0 +1,157 @@
+export const uniContext = (canvasId, context) => {
+	let ctx = uni.createCanvasContext(canvasId, context)
+	if (!ctx.uniDrawImage) {
+		ctx.uniDrawImage = ctx.drawImage
+		ctx.drawImage = (image, ...agrs) => {
+			ctx.uniDrawImage(image.src, ...agrs)
+		}
+	}
+	if (!ctx.getImageData) {
+		ctx.getImageData = (x, y, width, height) => {
+			return new Promise((resolve, reject) => {
+				// #ifdef MP || VUE2
+				if (context.proxy) context = context.proxy
+				// #endif
+				uni.canvasGetImageData({
+					canvasId,
+					x,
+					y,
+					width,
+					height,
+					success(res) {
+						resolve(res)
+					},
+					fail(error) {
+						reject(error)
+					}
+				}, context)
+			})
+		}
+	}
+
+	return ctx
+}
+
+class Image {
+	constructor() {
+		this.currentSrc = null
+		this.naturalHeight = 0
+		this.naturalWidth = 0
+		this.width = 0
+		this.height = 0
+		this.tagName = 'IMG'
+	}
+	set src(src) {
+		this.currentSrc = src
+		uni.getImageInfo({
+			src,
+			success: (res) => {
+				this.naturalWidth = this.width = res.width
+				this.naturalHeight = this.height = res.height
+				this.onload()
+			},
+			fail: () => {
+				this.onerror()
+			}
+		})
+	}
+	get src() {
+		return this.currentSrc
+	}
+}
+
+export const createImage = () => {
+	return new Image()
+}
+export function useCurrentPage() {
+	const pages = getCurrentPages();
+	return pages[pages.length - 1];
+}
+export const toDataURL = (canvasId, context, options = {}) => {
+	// #ifdef MP-QQ
+	// context = context.$scope
+	// #endif
+	// #ifdef MP-ALIPAY
+	context = ''
+	// #endif
+	return new Promise((resolve, reject) => {
+		let {canvas, width, height, destWidth = 0, destHeight = 0, x = 0, y = 0, preferToDataURL} = options
+		const {pixelRatio} =uni.getSystemInfoSync()
+		// #ifdef MP-ALIPAY
+		
+		if(!destWidth || !destHeight) {
+			destWidth = width * pixelRatio;
+			destHeight = height * pixelRatio;
+			width = destWidth;
+			height = destHeight;
+			x = x * pixelRatio
+			y = y * pixelRatio
+		} 
+		// #endif
+		const params = {
+			...options,
+			canvasId,
+			id: canvasId,
+			// #ifdef MP-ALIPAY
+			x, 
+			y,
+			width,
+			height,
+			destWidth,
+			destHeight,
+			// #endif
+			canvas,
+			success: (res) => {
+				resolve(res.tempFilePath)
+			},
+			fail: (err) => {
+				reject(err)
+			}
+		}
+		// 抖音小程序canvas 2d不支持canvasToTempFilePath
+		if(canvas && canvas.toDataURL && preferToDataURL){
+			let next = true
+			const devtools = uni.getSystemInfoSync().platform == 'devtools'
+			// #ifdef MP-TOUTIAO
+			next =  uni.getSystemInfoSync().platform != 'devtools'
+			if(!next){
+				console.warn('[lime-signature] 抖音开发工具不支持bbox')
+			}
+			// #endif
+			if((x || y) && next){
+				const offCanvas = uni.createOffscreenCanvas({type: '2d'});
+				const ctx = offCanvas.getContext("2d");
+				const destWidth = Math.floor(width*pixelRatio)
+				const destHeight =  Math.floor(height*pixelRatio)
+				offCanvas.width = destWidth // canvas.width;
+				offCanvas.height = destHeight // canvas.height;
+				// ctx.scale(pixelRatio, pixelRatio)
+				// ctx.drawImage(canvas, Math.floor(x*pixelRatio), Math.floor(y*pixelRatio), destWidth, destHeight, 0,0, destWidth, destHeight);
+				// 抖音不能在drawImage使用canvas
+				const image = canvas.createImage()
+				image.onload = ()=>{
+					ctx.drawImage(image, Math.floor(x*pixelRatio), Math.floor(y*pixelRatio), destWidth, destHeight, 0,0, destWidth, destHeight)
+					const tempFilePath = offCanvas.toDataURL();
+					resolve(tempFilePath)
+					if(params.success){
+						params.success({tempFilePath})
+					}
+				}
+				image.src = canvas.toDataURL()
+				
+			} else {
+				const tempFilePath = canvas.toDataURL()
+				resolve(tempFilePath)
+				if(params.success){
+					params.success({tempFilePath})
+				}
+			}
+		} else
+		 if(canvas && canvas.toTempFilePath) {
+			canvas.toTempFilePath(params)
+		} else {
+			uni.canvasToTempFilePath(params, context)
+		}
+	})
+
+}

+ 362 - 0
uni_modules/lime-signature/components/l-signature/l-signature.uvue

@@ -0,0 +1,362 @@
+<template>
+	<view class="l-signature" ref="signatureRef" :style="drawableStyle">
+		<!-- #ifdef APP -->
+		<view class="l-signature-landscape" ref="signatureLandscapeRef" v-if="landscape && url !=''"
+			:style="landscapeStyle">
+			<image class="l-signature-image" :style="landscapeImageStyle" :src="url"></image>
+		</view>
+		<!-- #endif -->
+	</view>
+</template>
+<script lang="uts" setup>
+	// @ts-nocheck
+	// #ifdef APP
+	import { Signature } from './signature.uts'
+	// #endif
+	// #ifndef APP
+	import { Signature } from './signature.js'
+	// #endif
+	import { nextTick } from 'vue'
+	import { LSignatureToTempFilePathOptions, LSignatureToFileSuccess, LSignatureOptions } from '../../index.uts'
+	// type SignatureToFileSuccessCallback = (res : UTSJSONObject) => void
+	// type SignatureToFileFailCallback = (res : TakeSnapshotFail) => void
+	// type SignatureToFileCompleteCallback = (res : any) => void
+
+	/**
+	 * LimeSignature 手写板签名
+	 * @description 手写板签名插件,uvue专用版。
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=4354
+	 * @property {Number} penSize 画笔大小
+	 * @property {String} penColor 画笔颜色 
+	 * @property {String} backgroundColor 背景颜色,不填则为透明
+	 * @property {Boolean} disableScroll 当在写字时,禁止屏幕滚动以及下拉刷新,nvue无效
+	 */
+
+	const props = defineProps({
+		styles: {
+			type: String,
+			default: ''
+		},
+		penColor: {
+			type: String,
+			default: 'black'
+		},
+		penSize: {
+			type: Number,
+			default: 2
+		},
+		backgroundColor: {
+			type: String,
+			default: ''
+		},
+		openSmooth: {
+			type: Boolean,
+			default: false
+		},
+		minLineWidth: {
+			type: Number,
+			default: 2
+		},
+		maxLineWidth: {
+			type: Number,
+			default: 6
+		},
+		minSpeed: {
+			type: Number,
+			default: 1.5
+		},
+		maxWidthDiffRate: {
+			type: Number,
+			default: 20
+		},
+		maxHistoryLength: {
+			type: Number,
+			default: 20
+		},
+		disableScroll: {
+			type: Boolean,
+			default: true
+		},
+		disabled: {
+			type: Boolean,
+			default: false
+		},
+		landscape: {
+			type: Boolean,
+			default: false
+		},
+	})
+
+	const drawableStyle = computed<string>(() : string => {
+		let style : string = ''
+
+		if (props.backgroundColor != '') {
+			style += `background-color: ${props.backgroundColor};`
+		}
+		if (props.styles != '') {
+			style += props.styles
+		}
+		return style
+	})
+	const signatureRef = ref<UniElement | null>(null)
+	let signatureLandscapeRef = ref<UniElement | null>(null)
+	let landscapeStyle = ref<Map<string, string>>(new Map())
+	let landscapeImageStyle = ref<Map<string, string>>(new Map())
+
+	let signature : Signature | null = null
+	// let url = ref('')
+	// #ifdef WEB
+	let canvas : HTMLCanvasElement | null = null
+	let touchstart,touchmove,touchend
+	// #endif
+
+	const clear = () => {
+		signature?.clear()
+	}
+	const redo = () => {
+		signature?.redo()
+	}
+	const undo = () => {
+		signature?.undo()
+	}
+	const canvasToTempFilePath = (options : LSignatureToTempFilePathOptions) => {
+		const success = options.success // as SignatureToFileSuccessCallback | null
+		const fail = options.fail // as SignatureToFileFailCallback | null
+		const complete = options.complete// as SignatureToFileCompleteCallback | null
+		const format = options.format ?? 'png'
+		// #ifdef APP
+		signatureRef.value?.takeSnapshot({
+			format,
+			success: (res) => {
+				if (props.landscape) {
+					url.value = res.tempFilePath;
+					setTimeout(() => {
+						signatureLandscapeRef.value?.takeSnapshot({
+							format,
+							success: (res2) => {
+								success?.({
+									tempFilePath: res2.tempFilePath,
+									isEmpty: signature?.isEmpty ?? false
+								} as LSignatureToFileSuccess)
+							}
+						})
+					}, 300)
+
+				} else {
+					success?.({
+						tempFilePath: res.tempFilePath,
+						isEmpty: signature?.isEmpty ?? false
+					} as LSignatureToFileSuccess)
+				}
+			},
+			fail: (res) => {
+				fail?.(res)
+			},
+			complete: (res) => {
+				complete?.(res)
+			}
+		} as TakeSnapshotOptions)
+		// #endif
+
+		// #ifdef WEB
+		// @ts-ignore
+		const { backgroundColor, backgroundImage, landscape, boundingBox } = props
+		const { quality = 1 } = options
+		const flag = landscape || backgroundColor || boundingBox
+		const type = `image/${format}`.replace(/jpg/, 'jpeg');
+		const image = canvas?.toDataURL(!flag && type, !flag && quality)
+
+		if (flag) {
+			// @ts-ignore
+			const canvas = document.createElement('canvas')
+			// @ts-ignore
+			const pixelRatio = signature?.canvas.get('pixelRatio')
+			// @ts-ignore
+			let width = signature?.canvas.get('width')
+			// @ts-ignore
+			let height = signature?.canvas.get('height')
+			let x = 0
+			let y = 0
+			// @ts-ignore
+			const next = () => {
+				const size = [width, height]
+				if (landscape) {
+					size.reverse()
+				}
+				canvas.width = size[0] * pixelRatio
+				canvas.height = size[1] * pixelRatio
+				const param = [x, y, width, height, 0, 0, width, height].map(item => item * pixelRatio)
+				const context = canvas.getContext('2d')
+				if (landscape) {
+					context.translate(0, width * pixelRatio)
+					context.rotate(-Math.PI / 2)
+				}
+				if (backgroundColor) {
+					context.fillStyle = backgroundColor
+					context.fillRect(0, 0, width * pixelRatio, height * pixelRatio)
+				}
+				const drawImage = () => {
+					// @ts-ignore
+					context.drawImage(signature?.canvas!.get('el'), ...param)
+					success?.({
+						tempFilePath: canvas.toDataURL(type, quality),
+						// @ts-ignore
+						isEmpty: signature?.isEmpty() ?? false
+					} as LSignatureToFileSuccess)
+					canvas.remove()
+				}
+				if (backgroundImage) {
+					const img = new Image();
+					img.onload = () => {
+						context.drawImage(img, ...param)
+						drawImage()
+					}
+					img.src = backgroundImage
+				}
+				if (!backgroundImage) {
+					drawImage()
+				}
+			}
+			if (boundingBox) {
+				// @ts-ignore
+				const res = signature?.getContentBoundingBox()
+				width = res.width
+				height = res.height
+				x = res.startX
+				y = res.startY
+				next()
+			} else {
+				next()
+			}
+		} else {
+			success?.({
+				tempFilePath: image,
+				// @ts-ignore
+				isEmpty: signature?.isEmpty() ?? false
+			} as LSignatureToFileSuccess)
+		}
+		// #endif
+	}
+	defineExpose({
+		clear,
+		redo,
+		undo,
+		canvasToTempFilePath,
+	})
+	onMounted(() => {
+		nextTick(() => {
+			const width = signatureRef.value?.offsetWidth
+			const height = signatureRef.value?.offsetHeight
+			// #ifdef APP
+			landscapeStyle.value.set('width', `${height}px`)
+			landscapeStyle.value.set('height', `${width}px`)
+			landscapeImageStyle.value.set('width', `${width}px`)
+			landscapeImageStyle.value.set('height', `${height}px`)
+			landscapeImageStyle.value.set('transform', `rotate(-90deg) translateY(${width}px)`)
+
+			signature = new Signature(signatureRef.value!)
+			// #endif
+			// #ifdef WEB
+			canvas = document.createElement('canvas')
+			canvas.style = 'width: 100%; height: 100%;'
+			signatureRef.value?.appendChild(canvas)
+			// @ts-ignore
+			signature = new Signature({ el: canvas })
+			let isTouch = false
+			touchstart = (event: UniMouseEvent) => {
+				isTouch = true
+				const rect = canvas?.getBoundingClientRect()
+				// @ts-ignore
+				signature!.canvas.emit('touchstart', {
+					points: [
+						{
+							x:  event.clientX -  rect.left,
+							y:  event.clientY - rect.top
+						}
+					]
+				})
+			}
+			touchmove = (event: UniMouseEvent) => {
+				if(!isTouch) return
+				const rect = canvas?.getBoundingClientRect()
+				// @ts-ignore
+				signature!.canvas.emit('touchmove', {
+					points: [
+						{
+							x:  event.clientX - rect.left,
+							y:  event.clientY - rect.top
+						}
+					]
+				})
+			}
+			touchend = (event: UniMouseEvent) => {
+				isTouch = false
+				const rect = canvas?.getBoundingClientRect();
+				// @ts-ignore
+				signature!.canvas.emit('touchend', {
+					points: [
+						{
+							x:  event.clientX -  rect.left,
+							y:  event.clientY - rect.top
+						}
+					]
+				})
+			}
+			canvas?.addEventListener('mousedown', touchstart)
+			canvas?.addEventListener('mousemove', touchmove)
+			canvas?.addEventListener('mouseup', touchend)
+			canvas?.addEventListener('mouseleave', touchend)
+			
+			
+			// #endif
+
+			watchEffect(() => {
+				const options : LSignatureOptions = {
+					penColor: props.penColor,
+					openSmooth: props.openSmooth,
+					disableScroll: props.disableScroll,
+					disabled: props.disabled,
+					penSize: props.penSize,
+					minLineWidth: props.minLineWidth,
+					maxLineWidth: props.maxLineWidth,
+					minSpeed: props.minSpeed,
+					maxWidthDiffRate: props.maxWidthDiffRate,
+					maxHistoryLength: props.maxHistoryLength
+				}
+				// #ifdef APP
+				signature?.setOption(options)
+				// #endif
+				// #ifdef WEB
+				// @ts-ignore
+				signature?.pen.setOption(options)
+				// #endif
+			})
+		})
+	})
+	
+	onUnmounted(()=>{
+		// #ifdef WEB
+		canvas?.removeEventListener('mousedown', touchstart)
+		canvas?.removeEventListener('mousemove', touchmove)
+		canvas?.removeEventListener('mouseup', touchend)
+		canvas?.removeEventListener('mouseleave', touchend)
+		canvas?.remove()
+		// #endif
+		
+	})
+</script>
+<style lang="scss">
+	.l-signature {
+		flex: 1;
+
+		&-landscape {
+			position: absolute;
+			pointer-events: none;
+			left: 1000rpx;
+		}
+
+		&-image {
+			transform-origin: 0% 0%;
+		}
+	}
+</style>

+ 647 - 0
uni_modules/lime-signature/components/l-signature/l-signature.vue

@@ -0,0 +1,647 @@
+<template>
+	<view class="lime-signature" v-if="show" :style="[canvasStyle, styles]" ref="limeSignature">
+		<!-- #ifndef APP-VUE || APP-NVUE -->
+		<canvas v-if="useCanvas2d" class="lime-signature__canvas" :id="canvasId" type="2d"
+			:disableScroll="disableScroll" @touchstart="touchStart" @touchmove="touchMove"
+			@touchend="touchEnd"></canvas>
+		<canvas v-else :disableScroll="disableScroll" class="lime-signature__canvas" :canvas-id="canvasId"
+			:id="canvasId" :width="canvasWidth" :height="canvasHeight" @touchstart="touchStart" @touchmove="touchMove"
+			@touchend="touchEnd" @mousedown="touchStart" @mousemove="touchMove" @mouseup="touchEnd"></canvas>
+		<canvas class="offscreen" canvas-id="offscreen" id="offscreen"
+			:style="'width:' + offscreenSize[0] + 'px;height:' + offscreenSize[1] + 'px'" :width="offscreenSize[0]"
+			:height="offscreenSize[1]">
+		</canvas>
+		<view v-if="showMask" class="mask" @touchstart="touchStart" @touchmove.stop.prevent="touchMove" @touchend="touchEnd"></view>
+		<!-- #endif -->
+		<!-- #ifdef APP-VUE -->
+		<view :id="canvasId" :disableScroll="disableScroll" :rparam="param" :change:rparam="sign.update"
+			:rclear="rclear" 
+			:change:rclear="sign.clear" 
+			:rundo="rundo" 
+			:rredo="rredo" 
+			:change:rredo="sign.redo" 
+			:change:rundo="sign.undo" 
+			:rsave="rsave"
+			:rmask="rmask"
+			:change:rsave="sign.save" 
+			:change:rmask="sign.mask" 
+			:rdestroy="rdestroy"
+			:change:rdestroy="sign.destroy" 
+			:rempty="rempty" 
+			:change:rempty="sign.isEmpty">
+		</view>
+		<!-- #endif -->
+		<!-- #ifdef APP-NVUE -->
+		<web-view src="/uni_modules/lime-signature/hybrid/html/index.html" class="lime-signature__canvas" ref="webview"
+			@pagefinish="onPageFinish" @error="onError" @onPostMessage="onMessage"></web-view>
+		<!-- #endif -->
+	</view>
+</template>
+
+<script>
+	// #ifndef APP-NVUE
+	import { canIUseCanvas2d, wrapEvent, requestAnimationFrame, sleep, isTransparent} from './utils'
+	import {Signature} from './signature.js'
+	// import {Signature} from '@signature';
+	import { uniContext, createImage, toDataURL } from './context'
+	// #endif
+	import props from './props';
+	import { base64ToPath, getRect } from './utils'
+
+	/**
+	 * LimeSignature 手写板签名
+	 * @description 手写板签名插件:一款能跑在uniapp各端中的签名插件,支持横屏、背景色、笔画颜色、笔画大小等功能,可生成有内容的区域,减小图片尺寸,节省空间。
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=4354
+	 * @property {Number} penSize 画笔大小
+	 * @property {Number} minLineWidth 线条最小宽
+	 * @property {Number} maxLineWidth 线条最大宽 
+	 * @property {String} penColor 画笔颜色 
+	 * @property {String} backgroundColor 背景颜色,不填则为透明
+	 * @property {type} 指定 canvas 类型
+	 * @value 2d canvas 2d 
+	 * @value '' 非 canvas 2d 旧接口,微信不再维护
+	 * @property {Boolean} openSmooth 模拟笔锋 
+	 * @property {Number} beforeDelay 延时初始化,在放在弹窗里可以使用 (毫秒)  
+	 * @property {Number} maxHistoryLength 限制历史记录数,即最大可撤销数,传入0则关闭历史记录功能 
+	 * @property {Boolean} landscape 横屏,使用后在最后生成图片时会图片旋转90度
+	 * @property {Boolean} disableScroll 当在写字时,禁止屏幕滚动以及下拉刷新,nvue无效
+	 * @property {Boolean} boundingBox 只生成内容区域,即未画部分不生成,有性能的损耗
+	 */
+	export default {
+		props,
+		data() {
+			return {
+				canvasWidth: null,
+				canvasHeight: null,
+				offscreenWidth: null,
+				offscreenHeight: null,
+				useCanvas2d: true,
+				show: true,
+				offscreenStyles: '',
+				showMask: false,
+				isPC: false,
+				// #ifdef APP-PLUS
+				rclear: 0,
+				rdestroy: 0,
+				rundo: 0,
+				rredo: 0,
+				rsave: JSON.stringify({
+					n: 0,
+					fileType: 'png',
+					quality: 1,
+					destWidth: 0,
+					destHeight: 0,
+				}),
+				rmask: JSON.stringify({
+					n: 0,
+					destWidth: 0,
+					destHeight: 0,
+				}),
+				rempty: 0,
+				risEmpty: true,
+				toDataURL: null,
+				tempFilePath: [],
+				// #endif
+			}
+		},
+		computed: {
+			canvasId() {
+				// #ifdef VUE2
+				return `lime-signature${this._uid}`
+				// #endif
+				// #ifdef VUE3
+				return `lime-signature${this._.uid}`
+				// #endif
+			},
+			offscreenId() {
+				return this.canvasId + 'offscreen'
+			},
+			offscreenSize() {
+				const {offscreenWidth,offscreenHeight} = this
+				return this.landscape ? [offscreenHeight, offscreenWidth] : [offscreenWidth, offscreenHeight]
+			},
+			canvasStyle() {
+				const { canvasWidth, canvasHeight, backgroundColor } = this
+				return {
+					width: canvasWidth && (canvasWidth + 'px'),
+					height: canvasHeight && (canvasHeight + 'px'),
+					background: backgroundColor
+				}
+			},
+			param() {
+				const {
+					penColor,
+					penSize,
+					backgroundColor,
+					backgroundImage,
+					landscape,
+					boundingBox,
+					openSmooth,
+					minLineWidth,
+					maxLineWidth,
+					minSpeed,
+					maxWidthDiffRate,
+					maxHistoryLength,
+					disableScroll,
+					disabled
+				} = this
+				return JSON.parse(JSON.stringify({
+					penColor,
+					penSize,
+					backgroundColor,
+					backgroundImage,
+					landscape,
+					boundingBox,
+					openSmooth,
+					minLineWidth,
+					maxLineWidth,
+					minSpeed,
+					maxWidthDiffRate,
+					maxHistoryLength,
+					disableScroll,
+					disabled
+				}))
+			}
+		},
+		// #ifdef APP-NVUE
+		watch: {
+			param(v) {
+				this.$refs.webview.evalJS(`update(${JSON.stringify(v)})`)
+			}
+		},
+		// #endif
+		// #ifndef APP-PLUS
+		created() {
+			const {platform} = uni.getSystemInfoSync() 
+			this.isPC = /windows|mac/.test(platform)
+			this.useCanvas2d = this.type == '2d' && canIUseCanvas2d() && !this.isPC
+			// #ifndef H5
+			this.showMask = this.isPC
+			// #endif
+			
+		},
+		// #endif
+		// #ifndef APP-PLUS
+		async mounted() {
+			if (this.beforeDelay) {
+				await sleep(this.beforeDelay)
+			}
+			const config = await this.getContext()
+			this.signature = new Signature(config)
+			this.canvasEl = this.signature.canvas.get('el')
+			this.offscreenWidth = this.canvasWidth = this.signature.canvas.get('width')
+			this.offscreenHeight = this.canvasHeight = this.signature.canvas.get('height')
+
+			this.stopWatch = this.$watch('param', (v) => {
+				this.signature.pen.setOption(v)
+			}, {
+				immediate: true
+			})
+		},
+		// #endif
+		// #ifndef APP-PLUS
+		// #ifdef VUE3
+		beforeUnmount() {
+			this.stopWatch && this.stopWatch()
+			this.signature.destroy()
+			this.signature = null
+			this.show = false;
+			// #ifdef APP-VUE || APP-NVUE
+			this.rdestroy++
+			// #endif
+		},
+		// #endif
+		// #ifdef VUE2
+		beforeDestroy() {
+			this.stopWatch && this.stopWatch()
+			this.signature.destroy()
+			this.show = false;
+			this.signature = null
+			// #ifdef APP-VUE || APP-NVUE
+			this.rdestroy++
+			// #endif
+		},
+		// #endif
+		// #endif
+		methods: {
+			// #ifdef MP-QQ
+			// toJSON() { return this },
+			// #endif
+			// #ifdef APP-PLUS
+			onPageFinish() {
+				this.$refs.webview.evalJS(`update(${JSON.stringify(this.param)})`)
+			},
+			onMessage(e = {}) {
+				const {
+					detail: {
+						data: [res]
+					}
+				} = e
+				if (res.event?.save) {
+					this.toDataURL = res.event.save
+				}
+				if (res.event?.changeSize) {
+					const {
+						width,
+						height
+					} = res.event.changeSize
+				}
+				if (res.event.hasOwnProperty('isEmpty')) {
+					this.risEmpty = res.event.isEmpty
+				}
+				if (res.event?.file) {
+					this.tempFilePath.push(res.event.file)
+					if (this.tempFilePath.length > 7) {
+						this.tempFilePath.shift()
+					}
+					return
+				}
+				if (res.event?.success) {
+					if (res.event.success) {
+						this.tempFilePath.push(res.event.success)
+						if (this.tempFilePath.length > 8) {
+							this.tempFilePath.shift()
+						}
+						this.toDataURL = this.tempFilePath.join('')
+						this.tempFilePath = []
+					} else {
+						this.$emit('fail', 'canvas no data')
+					}
+					return
+				}
+			},
+			// #endif
+			redo(){
+				// #ifdef APP-VUE || APP-NVUE
+				this.rredo += 1
+				// #endif
+				// #ifdef APP-NVUE
+				this.$refs.webview.evalJS(`redo()`)
+				// #endif
+				// #ifndef APP-VUE
+				if (this.signature)
+					this.signature.redo()
+				// #endif
+			},
+			restore() {
+				this.redo()
+			},
+			undo() {
+				// #ifdef APP-VUE || APP-NVUE
+				this.rundo += 1
+				// #endif
+				// #ifdef APP-NVUE
+				this.$refs.webview.evalJS(`undo()`)
+				// #endif
+				// #ifndef APP-VUE
+				if (this.signature)
+					this.signature.undo()
+				// #endif
+			},
+			clear() {
+				// #ifdef APP-VUE || APP-NVUE
+				this.rclear += 1
+				// #endif
+				// #ifdef APP-NVUE
+				this.$refs.webview.evalJS(`clear()`)
+				// #endif
+				// #ifndef APP-VUE
+				if (this.signature)
+					this.signature.clear()
+				// #endif
+			},
+			isEmpty() {
+				// #ifdef APP-NVUE
+				this.$refs.webview.evalJS(`isEmpty()`)
+				// #endif
+				// #ifdef APP-VUE || APP-NVUE
+				this.rempty += 1
+				// #endif
+				// #ifndef APP-VUE || APP-NVUE
+				return this.signature.isEmpty()
+				// #endif
+			},
+			canvasToMaskPath(param = {}){
+				const isEmpty = this.isEmpty()
+				// #ifdef APP-NVUE
+				this.$refs.webview.evalJS(`mask(${JSON.stringify(param)})`)
+				// #endif
+				// #ifdef APP-VUE || APP-NVUE
+				const stopURLWatch = this.$watch('toDataURL', (v, n) => {
+					if (v && v !== n) {
+						// if(param.pathType == 'url') {
+						base64ToPath(v).then(res => {
+							param.success({
+								tempFilePath: res,
+								isEmpty: this.risEmpty
+							})
+						})
+						// } else {
+						// 	param.success({tempFilePath: v,isEmpty: this.risEmpty })
+						// }
+						this.toDataURL = ''
+					}
+					stopURLWatch && stopURLWatch()
+				})
+				const {
+					fileType,
+					quality
+				} = param
+				const rmask = JSON.parse(this.rmask)
+				rmask.n++
+				rmask.destWidth = param.destWidth??0
+				rmask.destHeight = param.destHeight??0
+				// rmask.fileType = fileType
+				// rmask.quality = quality
+				this.rmask = JSON.stringify(rmask)
+				// #endif
+				// #ifndef APP-VUE || APP-NVUE
+				let width = this.signature.canvas.get('width')
+				let height = this.signature.canvas.get('height')
+				
+				let {pixelRatio} = uni.getSystemInfoSync()
+				if(this.useCanvas2d){
+					this.offscreenWidth = width * pixelRatio
+					this.offscreenHeight = height * pixelRatio
+				}
+				const context = uni.createCanvasContext('offscreen', this)
+				const success = (success) => param.success && param.success(success)
+				const fail = (fail) => param.fail && param.fail(fail)
+				
+				this.signature.pen.getMaskedImageData((imageData)=>{
+					uni.canvasPutImageData({
+						canvasId: 'offscreen',
+						x: 0,
+						y: 0,
+						width:Math.floor(this.offscreenWidth),
+						height:Math.floor(this.offscreenHeight),
+						data: imageData,
+						fail(err){
+							fail(err)
+						},
+						success: (res) => {
+							toDataURL('offscreen', this, param).then((res) => {
+								const size = Math.max(this.offscreenWidth, this.offscreenHeight)
+								context.restore()
+								context.clearRect(0, 0, size, size)
+								this.offscreenWidth = width
+								this.offscreenHeight = height
+								success({
+									tempFilePath: res,
+									isEmpty
+								})
+							})
+						}
+					}, this)
+				})
+				// #endif
+			},
+			canvasToTempFilePath(param = {}) {
+				const isEmpty = this.isEmpty()
+				// #ifdef APP-NVUE
+				this.$refs.webview.evalJS(`save(${JSON.stringify(param)})`)
+				// #endif
+				// #ifdef APP-VUE || APP-NVUE
+				const stopURLWatch = this.$watch('toDataURL', (v, n) => {
+					if (v && v !== n) {
+						if(this.preferToDataURL){
+							param.success({tempFilePath: v,isEmpty: this.risEmpty })
+						} else {
+							base64ToPath(v).then(res => {
+								param.success({
+									tempFilePath: res,
+									isEmpty: this.risEmpty
+								})
+							})
+						}
+						this.toDataURL = ''
+					}
+					stopURLWatch && stopURLWatch()
+				})
+				const {
+					fileType,
+					quality
+				} = param
+				const rsave = JSON.parse(this.rsave)
+				rsave.n++
+				rsave.fileType = fileType
+				rsave.quality = quality
+				rsave.destWidth = param.destWidth??0
+				rsave.destHeight = param.destHeight??0
+				this.rsave = JSON.stringify(rsave)
+				// #endif
+				// #ifndef APP-VUE || APP-NVUE
+				const useCanvas2d = this.useCanvas2d
+				const success = (success) => param.success && param.success(success)
+				const fail = (err) => param.fail && param.fail(err)
+				const { canvas } = this.signature.canvas.get('el')
+				const {
+					backgroundColor,
+					landscape,
+					boundingBox
+				} = this
+				let width = this.signature.canvas.get('width')
+				let height = this.signature.canvas.get('height')
+				let x = 0
+				let y = 0
+				const devtools = uni.getSystemInfoSync().platform == 'devtools'
+				let preferToDataURL = this.preferToDataURL
+				let scale = 1
+				// #ifdef MP-TOUTIAO
+				scale =  devtools ? uni.getSystemInfoSync().pixelRatio : scale
+				// 由于抖音不支持canvasToTempFilePath故优先使用createOffscreenCanvas
+				preferToDataURL = true
+				// #endif
+				const canvasToTempFilePath = (image) => {
+					const createCanvasContext = ()=>{
+						const useOffscreen = (useCanvas2d && !!uni.createOffscreenCanvas && preferToDataURL) 
+						if(useOffscreen && !devtools){
+							const offCanvas = uni.createOffscreenCanvas({type: '2d'});
+							offCanvas.width = this.offscreenSize[0]*scale
+							offCanvas.height = this.offscreenSize[1]*scale
+							const context = offCanvas.getContext("2d");
+							return [context, offCanvas]
+						} else {
+							const context = uni.createCanvasContext('offscreen', this)
+							return [context]
+						}
+					}
+					
+					const [context, offCanvas] = createCanvasContext()
+					context.save()
+					context.setTransform(1, 0, 0, 1, 0, 0)
+					if (landscape) {
+						context.translate(0, width*scale)
+						context.rotate(-Math.PI / 2)
+					}
+					if (backgroundColor && !isTransparent(backgroundColor)) {
+						context.fillStyle = backgroundColor
+						context.fillRect(0, 0, width, height)
+					}
+					if(offCanvas){
+						const img = canvas.createImage();
+						img.src = image
+						img.onload = () => {
+							context.drawImage(img, 0, 0, width*scale, height*scale);
+							const tempFilePath = offCanvas.toDataURL()
+							success({
+								tempFilePath,
+								isEmpty
+							})
+						}
+						
+					} else {
+						context.drawImage(image, 0, 0, width*scale, height*scale);
+						context.draw(false, () => {
+							toDataURL('offscreen', this, param).then((res) => {
+								const size = Math.max(width, height)
+								context.restore()
+								context.clearRect(0, 0, size, size)
+								success({
+									tempFilePath: res,
+									isEmpty
+								})
+							})
+						})
+					}
+					
+				}
+				const next = async () => {
+					if(this.offscreenWidth != width || this.offscreenHeight != height) {
+						this.offscreenWidth = width
+						this.offscreenHeight = height
+						await sleep(100)
+					}
+					
+					// #ifndef MP-WEIXIN
+					const param = { x, y, width, height, canvas, preferToDataURL }
+					// #endif
+					
+					// #ifdef MP-WEIXIN
+					const param = { x, y, width, height, canvas: useCanvas2d ? canvas : null, preferToDataURL }
+					// #endif
+					toDataURL(this.canvasId, this, param).then(canvasToTempFilePath).catch(fail)
+				}
+				// PC端小程序获取不到 ImageData 数据,长度为0
+				if (boundingBox && !this.isPC) {
+					this.signature.getContentBoundingBox(async res => {
+						this.offscreenWidth = width = res.width
+						this.offscreenHeight = height = res.height
+						
+						x = res.startX
+						y = res.startY
+						next()
+					})
+				} else {
+					next()
+				}
+				// #endif
+			},
+			// #ifndef APP-PLUS
+			getContext() {
+				return getRect(`#${this.canvasId}`, {
+					context: this,
+					type: this.useCanvas2d ? 'fields' : 'boundingClientRect'
+				}).then(res => {
+					if (res) {
+						let { width, height, node: canvas, left, top, right} = res
+						let {pixelRatio} = uni.getSystemInfoSync()
+						let context;
+						if (canvas) {
+							context = canvas.getContext('2d')
+							canvas.width = width * pixelRatio;
+							canvas.height = height * pixelRatio;
+						} else {
+							pixelRatio = 1
+							context = uniContext(this.canvasId, this)
+							canvas = {
+								getContext: (type)=> type=='2d' ? context : null,
+								createImage,
+								toDataURL: () => toDataURL(this.canvasId, this),
+								requestAnimationFrame
+							}
+						}
+						// 支付宝小程序 使用stroke有个默认背景色
+						context.clearRect(0, 0, width, height)
+						return {
+							left,
+							top,
+							right,
+							width,
+							height,
+							context,
+							canvas,
+							pixelRatio
+						};
+					}
+				})
+			},
+			getTouch(e) {
+				if(this.isPC && this.canvasRect) {
+					e.touches = e.touches.map(item => {
+						return {
+							...item,
+							x: item.clientX - this.canvasRect.left,
+							y: item.clientY - this.canvasRect.top,
+						}
+					})
+				}
+				return e
+			},
+			touchStart(e) {
+				if (!this.canvasEl ) return
+				this.isStart = true
+				// 微信小程序PC端不支持事件,使用这方法模拟一下
+				if(this.isPC) {
+					getRect(`#${this.canvasId}`, {context: this}).then(res => {
+						this.canvasRect = res
+						this.canvasEl.dispatchEvent('touchstart', wrapEvent(this.getTouch(e)))
+					})
+					return
+				}
+				this.canvasEl.dispatchEvent('touchstart', wrapEvent(e))
+			},
+			touchMove(e) {
+				if (!this.canvasEl || !this.isStart && this.canvasEl ) return
+				this.canvasEl.dispatchEvent('touchmove', wrapEvent(this.getTouch(e)))
+			},
+			touchEnd(e) {
+				if (!this.canvasEl ) return
+				this.isStart = false
+				this.canvasEl.dispatchEvent('touchend', wrapEvent(e))
+			},
+			// #endif
+		}
+	}
+</script>
+<!-- #ifdef APP-VUE -->
+<script module="sign" lang="renderjs">
+	import sign from './render'
+	export default sign
+</script>
+<!-- #endif -->
+<style lang="scss">
+	.lime-signature,
+	.lime-signature__canvas {
+		/* #ifndef APP-NVUE */
+		position: relative;
+		width: 100%;
+		height: 100%;
+		/* #endif */
+		/* #ifdef APP-NVUE */
+		flex: 1;
+		/* #endif */
+	}
+	.mask {
+		position: absolute;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		top: 0;
+	}
+	.offscreen {
+		position: fixed;
+		top: 0;
+		left: 9999px;
+	}
+</style>

+ 64 - 0
uni_modules/lime-signature/components/l-signature/props.js

@@ -0,0 +1,64 @@
+export default {
+	styles: String,
+	disableScroll: {
+		type: Boolean,
+		default: true
+	},
+	type: {
+		type: String,
+		default: '2d'
+	},
+	// 画笔颜色
+	penColor: {
+		type: String,
+		default: 'black'
+	},
+	penSize: {
+		type: Number,
+		default: 2
+	},
+	// 画板背景颜色
+	backgroundColor: String,
+	backgroundImage: String,
+	// 笔锋
+	openSmooth: Boolean,
+	// 画笔最小值
+	minLineWidth: {
+		type: Number,
+		default: 2
+	},
+	// 画笔最大值
+	maxLineWidth: {
+		type: Number,
+		default: 6
+	},
+	// 画笔达到最小宽度所需最小速度(px/ms),取值范围1.0-10.0,值越小,画笔越容易变细,笔锋效果会比较明显,可以自行调整查看效果,选出自己满意的值。
+	minSpeed: {
+		type: Number,
+		default: 1.5
+	},
+	// 相邻两线宽度增(减)量最大百分比,取值范围1-100,为了达到笔锋效果,画笔宽度会随画笔速度而改变,如果相邻两线宽度差太大,过渡效果就会很突兀,使用maxWidthDiffRate限制宽度差,让过渡效果更自然。可以自行调整查看效果,选出自己满意的值。
+	maxWidthDiffRate: {
+		type: Number,
+		default: 20
+	},
+	// 限制历史记录数,即最大可撤销数,传入0则关闭历史记录功能
+	maxHistoryLength: {
+		type: Number,
+		default: 20
+	},
+	beforeDelay: {
+		type: Number,
+		default: 0
+	},
+	landscape: {
+		type: Boolean
+	},
+	boundingBox: {
+		type: Boolean
+	},
+	disabled: {
+		type: Boolean
+	},
+	preferToDataURL: Boolean
+}

+ 228 - 0
uni_modules/lime-signature/components/l-signature/render.js

@@ -0,0 +1,228 @@
+// #ifdef APP-VUE 
+// import { Signature } from '@signature'
+import {
+	Signature
+} from './signature.js'
+import {
+	isTransparent
+} from './utils'
+export default {
+	data() {
+		return {
+			canvasid: null,
+			signature: null,
+			observer: null,
+			options: {},
+			saveCount: 0,
+		}
+	},
+	mounted() {
+		this.$nextTick(this.init)
+	},
+	methods: {
+		init() {
+			const el = this.$refs.limeSignature || this.$ownerInstance.$el;
+			this.canvas = document.createElement('canvas')
+			this.canvas.style = 'width: 100%; height: 100%;'
+			el.appendChild(this.canvas)
+			this.signature = new Signature({
+				el: this.canvas
+			})
+			this.signature.pen.setOption(this.options)
+			const width = this.signature.canvas.get('width')
+			const height = this.signature.canvas.get('height')
+
+			this.emit({
+				changeSize: {
+					width,
+					height
+				}
+			})
+		},
+		redo(v) {
+			if (v && this.signature) {
+				this.signature.redo()
+			}
+		},
+		undo(v) {
+			if (v && this.signature) {
+				this.signature.undo()
+			}
+		},
+		clear(v) {
+			if (v && this.signature) {
+				this.signature.clear()
+			}
+		},
+		destroy() {
+			if (this.canvas) {
+				this.canvas.remove()
+			}
+		},
+		mask(param={}) {
+			if (this.signature) {
+				let {destWidth=0, destHeight=0} = JSON.parse(param)
+				let canvas = document.createElement('canvas')
+				const ctx = canvas.getContext('2d');
+				const pixelRatio = this.signature.canvas.get('pixelRatio')
+				let width = this.signature.canvas.get('width')
+				let height = this.signature.canvas.get('height')
+				let context = this.signature.canvas.get('context')
+				canvas.width = width * pixelRatio
+				canvas.height = height * pixelRatio
+
+				const imageData = context.getImageData(0, 0, width * pixelRatio, height * pixelRatio);
+				for (let i = 0; i < imageData.data.length; i += 4) {
+					// 判断当前像素是否透明
+					const isTransparent = imageData.data[i + 3] === 0;
+				
+					if (isTransparent) {
+						// 将透明像素设置为黑色背景
+						imageData.data[i] = 0;
+						imageData.data[i + 1] = 0;
+						imageData.data[i + 2] = 0;
+					} else {
+						// 将非透明像素设置为白色内容
+						imageData.data[i] = 255;
+						imageData.data[i + 1] = 255;
+						imageData.data[i + 2] = 255;
+					}
+				}
+				ctx.putImageData(imageData, 0, 0);
+				if(destWidth&&destHeight){
+					const _canvas = document.createElement('canvas')
+					_canvas.width = destWidth
+					_canvas.height = destHeight
+					const _context = _canvas.getContext('2d')
+					_context.drawImage(canvas, 0, 0, destWidth, destHeight)
+					canvas.remove()
+					canvas = _canvas	
+				}
+				this.emit({
+					save: canvas.toDataURL()
+				})
+				canvas.remove()
+			}
+
+		},
+		save(param) {
+			let {
+				fileType = 'png', 
+				quality = 1, 
+				n,
+				destWidth = 0,
+				destHeight = 0,
+			} = JSON.parse(param)
+			const type = `image/${fileType}`.replace(/jpg/, 'jpeg');
+			if (n !== this.saveCount) {
+				this.saveCount = n;
+				const {
+					backgroundColor,
+					backgroundImage,
+					landscape,
+					boundingBox
+				} = this.options
+				const flag = landscape || backgroundColor || boundingBox||destWidth&&destHeight
+				const image = this.signature.canvas.get('el').toDataURL(!flag && type, !flag && quality)
+				if (flag) {
+					let canvas = document.createElement('canvas')
+					const pixelRatio = this.signature.canvas.get('pixelRatio')
+					let width = this.signature.canvas.get('width')
+					let height = this.signature.canvas.get('height')
+					let x = 0
+					let y = 0
+
+					const next = () => {
+						const size = [width, height]
+						if (landscape) {
+							size.reverse()
+						}
+						canvas.width =  size[0] * pixelRatio
+						canvas.height = size[1] * pixelRatio
+						const param = [x, y, width, height, 0, 0, width, height].map(item => item * pixelRatio)
+						const context = canvas.getContext('2d')
+						if (landscape) {
+							context.translate(0, width * pixelRatio)
+							context.rotate(-Math.PI / 2)
+						}
+						if (backgroundColor && !isTransparent(backgroundColor)) {
+							context.fillStyle = backgroundColor
+							context.fillRect(0, 0, width * pixelRatio, height * pixelRatio)
+						}
+						const drawImage = () => {
+							// param
+							context.drawImage(this.signature.canvas.get('el'), ...param)
+							if(destWidth&&destHeight){
+								const _canvas = document.createElement('canvas')
+								_canvas.width = destWidth
+								_canvas.height = destHeight
+								const _context = _canvas.getContext('2d')
+								_context.drawImage(canvas, 0, 0, destWidth, destHeight)
+								canvas.remove()
+								canvas = _canvas	
+							}
+							this.emit({
+								save: canvas.toDataURL(type, quality)
+							})
+							canvas.remove()
+						}
+						if (backgroundImage) {
+							const img = new Image();
+							img.onload = () => {
+								context.drawImage(img, ...param)
+								drawImage()
+							}
+							img.src = backgroundImage
+						}
+						if (!backgroundImage) {
+							drawImage()
+						}
+					}
+					if (boundingBox) {
+						const res = this.signature.getContentBoundingBox()
+						width = res.width
+						height = res.height
+						x = res.startX
+						y = res.startY
+						next()
+					} else {
+						next()
+					}
+
+				} else {
+					this.emit({
+						save: image
+					})
+				}
+			}
+		},
+		isEmpty(v) {
+			if (v && this.signature) {
+				const isEmpty = this.signature.isEmpty()
+				this.emit({
+					isEmpty
+				})
+			}
+		},
+		emit(event) {
+			this.$ownerInstance.callMethod('onMessage', {
+				detail: {
+					data: [{
+						event
+					}]
+				}
+			})
+		},
+		update(v) {
+			if (v) {
+				if (this.signature) {
+					this.options = v
+					this.signature.pen.setOption(v)
+				} else {
+					this.options = v
+				}
+			}
+		}
+	}
+}
+// #endif

Plik diff jest za duży
+ 1 - 0
uni_modules/lime-signature/components/l-signature/signature.js


+ 161 - 0
uni_modules/lime-signature/components/l-signature/signature.uts

@@ -0,0 +1,161 @@
+import { LSignatureOptions, Point, Line } from '../../index.uts'
+
+let points : Line = []
+let undoStack : Line[] = [];
+let redoStack : Line[] = [];
+let lastX = 0;
+let lastY = 0;
+
+
+export class Signature {
+	el : UniElement
+	options : LSignatureOptions = {
+		penColor: 'black',
+		openSmooth: true,
+		disableScroll: true,
+		disabled: false,
+		penSize: 2,
+		minLineWidth: 2,
+		maxLineWidth: 6,
+		minSpeed: 1.5,
+		maxWidthDiffRate: 20,
+		maxHistoryLength: 20
+	} as LSignatureOptions
+	ctx : DrawableContext
+	isEmpty : boolean = true
+	isDrawing : boolean = false
+	// historyList : Point[][] = []
+	// id : string
+	// instance : ComponentPublicInstance
+	constructor(el : UniElement) {
+		this.el = el
+		this.ctx = el.getDrawableContext() as DrawableContext
+		this.init()
+	}
+	init() {
+		this.el.addEventListener('touchstart', this.onTouchStart)
+		this.el.addEventListener('touchmove', this.onTouchMove)
+		this.el.addEventListener('touchend', this.onTouchEnd)
+	}
+	remove() {
+		this.el.removeEventListener('touchstart', this.onTouchStart as UniCallbackWrapper)
+		this.el.removeEventListener('touchmove', this.onTouchMove as UniCallbackWrapper)
+		this.el.removeEventListener('touchend', this.onTouchEnd as UniCallbackWrapper)
+	}
+	setOption(options : LSignatureOptions) {
+		this.options = options
+	}
+	disableScroll(event : UniTouchEvent) {
+		event.stopPropagation()
+		if (this.options.disableScroll) {
+			{
+				event.preventDefault()
+			}
+		}
+	}
+	getTouchPoint(event : UniTouchEvent) : Point {
+		const rect = this.el.getBoundingClientRect()
+		const touche = event.touches[0];
+		const x = touche.clientX
+		const y = touche.clientY
+		// const force = touche.force
+		return {
+			x: x - rect.left,
+			y: y - rect.top
+		} as Point
+	}
+	onTouchStart: (event : UniTouchEvent) => void = (event : UniTouchEvent) =>{
+		if (this.options.disabled) {
+			return
+		}
+		this.disableScroll(event)
+		const { x, y } = this.getTouchPoint(event)
+		this.isDrawing = true;
+		this.isEmpty = false
+		lastX = x
+		lastY = y
+		points.push({ x, y } as Point);
+	}
+	onTouchMove: (event : UniTouchEvent) => void = (event : UniTouchEvent) =>{
+		if (this.options.disabled || !this.isDrawing) {
+			return
+		}
+		this.disableScroll(event)
+		const { x, y } = this.getTouchPoint(event)
+		const lineWidth = this.options.penSize
+		const strokeStyle = this.options.penColor
+		const point = { x, y } as Point
+		const last = { x: lastX, y: lastY } as Point
+		this.drawLine(point, last, lineWidth, strokeStyle)
+
+		lastX = x
+		lastY = y
+		points.push({ x, y, c: strokeStyle, w: lineWidth } as Point);
+	}
+	onTouchEnd: (event : UniTouchEvent) => void = (event : UniTouchEvent) =>{
+		this.disableScroll(event)
+		this.isDrawing = false;
+		undoStack.push(points);
+		redoStack = [] as Line[];
+		points = [] as Point[];
+	}
+	drawLine(point : Point, last : Point, lineWidth : number, strokeStyle : string) {
+		const ctx = this.ctx
+		ctx.lineWidth = lineWidth
+		ctx.strokeStyle = strokeStyle
+		ctx.lineCap = 'round'
+		ctx.lineJoin = 'round'
+		ctx.beginPath()
+		ctx.moveTo(last.x, last.y)
+		ctx.lineTo(point.x, point.y)
+		ctx.stroke()
+		ctx.update()
+	}
+	// addHistory() { }
+	clear() {
+		this.ctx.reset()
+		this.ctx.update()
+		this.isEmpty = true
+		undoStack = [] as Line[];
+		redoStack = [] as Line[];
+		points = [] as Point[];
+	}
+	undo() {
+		if(redoStack.length == this.options.maxHistoryLength && this.options.maxHistoryLength != 0){
+			return
+		}
+		this.ctx.reset()
+		if(undoStack.length > 0){
+			const lastPath : Line = undoStack.pop()!;
+			redoStack.push(lastPath);
+			if(undoStack.length == 0){
+				this.isEmpty = true
+				this.ctx.update()
+				return
+			}
+			for (let l = 0; l < undoStack.length; l++) {
+				for (let i = 1; i < undoStack[l].length; i++) {
+					const last  = undoStack[l][i - 1]
+					const point = undoStack[l][i]
+					this.drawLine(point, last, point.w!, point.c!)
+				}
+			}
+		} else {
+			this.ctx.update()
+		}
+	}
+	redo() {
+		if(redoStack.length < 1) return
+		const lastPath : Line = redoStack.pop()!;
+		undoStack.push(lastPath);
+		this.isEmpty = false
+		for (let l = 0; l < undoStack.length; l++) {
+			for (let i = 1; i < undoStack[l].length; i++) {
+				const last  = undoStack[l][i - 1]
+				const point = undoStack[l][i]
+				this.drawLine(point, last, point.w!, point.c!)
+			}
+		}
+	}
+	// restore() { }
+}

+ 181 - 0
uni_modules/lime-signature/components/l-signature/utils.js

@@ -0,0 +1,181 @@
+export function compareVersion(v1, v2) {
+	v1 = v1.split('.')
+	v2 = v2.split('.')
+	const len = Math.max(v1.length, v2.length)
+	while (v1.length < len) {
+		v1.push('0')
+	}
+	while (v2.length < len) {
+		v2.push('0')
+	}
+	for (let i = 0; i < len; i++) {
+		const num1 = parseInt(v1[i], 10)
+		const num2 = parseInt(v2[i], 10)
+
+		if (num1 > num2) {
+			return 1
+		} else if (num1 < num2) {
+			return -1
+		}
+	}
+	return 0
+}
+
+function gte(version) {
+	let { SDKVersion } = uni.getSystemInfoSync() 
+  // #ifdef MP-ALIPAY
+  SDKVersion = my.SDKVersion
+  // #endif
+  return compareVersion(SDKVersion, version) >= 0;
+}
+
+export function canIUseCanvas2d() {
+	// #ifdef MP-WEIXIN
+	return gte('2.9.0');
+	// #endif
+	// #ifdef MP-ALIPAY
+	return gte('2.7.0');
+	// #endif
+	// #ifdef MP-TOUTIAO
+	return gte('1.78.0');
+	// #endif
+	return false
+}
+
+
+export const wrapEvent = (e) => {
+  if (!e) return;
+  if (!e.preventDefault) {
+    e.preventDefault = function() {};
+  }
+  return e;
+}
+
+export const requestAnimationFrame = (cb) => {
+	setTimeout(cb, 30)
+}
+
+// #ifdef MP
+export const prefix = () => {
+	// #ifdef MP-TOUTIAO
+	return tt
+	// #endif
+	// #ifdef MP-WEIXIN
+	return wx
+	// #endif
+	// #ifdef MP-BAIDU
+	return swan
+	// #endif
+	// #ifdef MP-ALIPAY
+	return my
+	// #endif
+	// #ifdef MP-QQ
+	return qq
+	// #endif
+	// #ifdef MP-360
+	return qh
+	// #endif
+}
+// #endif
+
+/**
+ * base64转路径
+ * @param {Object} base64
+ */
+export function base64ToPath(base64) {
+	const [, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(base64) || [];
+	return new Promise((resolve, reject) => {
+		// #ifdef MP
+		const p = prefix()
+		const fs = p.getFileSystemManager()
+		//自定义文件名
+		if (!format) {
+			reject(new Error('ERROR_BASE64SRC_PARSE'))
+		}
+		const time = new Date().getTime();
+		const filePath = `${p.env.USER_DATA_PATH}/${time}.${format}`;
+		fs.writeFile({
+			filePath,
+			data: base64.split(',')[1],
+			encoding: 'base64',
+			success() {
+				resolve(filePath)
+			},
+			fail(err) {
+				reject(err)
+			}
+		})
+		// #endif
+		// #ifdef APP-PLUS
+		const bitmap = new plus.nativeObj.Bitmap('bitmap' + Date.now())
+		bitmap.loadBase64Data(base64, () => {
+			if (!format) {
+				reject(new Error('ERROR_BASE64SRC_PARSE'))
+			}
+			const time = new Date().getTime();
+			const filePath = `_doc/uniapp_temp/${time}.${format}`
+			bitmap.save(filePath, {},
+				() => {
+					bitmap.clear()
+					resolve(filePath)
+				},
+				(error) => {
+					bitmap.clear()
+					reject(error)
+				})
+		}, (error) => {
+			bitmap.clear()
+			reject(error)
+		})
+		// #endif
+	})
+}
+
+
+export function sleep(delay) {
+	return new Promise(resolve => setTimeout(resolve, delay))
+}
+
+export function getRect(selector, options = {}) {
+	const typeDefault = 'boundingClientRect'
+	const { context, type = typeDefault} = options
+	return new Promise((resolve, reject) => {
+		const dom = uni.createSelectorQuery().in(context).select(selector);
+		const result = (rect) => {
+			if(rect) {
+				 resolve(rect)
+			} else {
+				reject()
+			}
+		}
+		if(type == typeDefault) {
+			dom[type](result).exec()
+		} else {
+			dom[type]({
+				node: true,
+				size: true,
+				rect: true
+			}, result).exec()
+		}
+	});
+};
+
+export function isTransparent(color) {
+  // 判断颜色是否为 transparent
+  if (color === 'transparent') {
+    return true;
+  }
+
+  // 判断颜色是否为 rgba 的 a 为 0
+  if (color.startsWith('rgba')) {
+    const regex = /\d+(\.\d+)?/g;
+    const matches = color.match(regex);
+    if (matches !== null) {
+      const alpha = parseFloat(matches[3]);
+      if (alpha === 0) {
+        return true;
+      }
+    }
+  }
+  return false;
+}

+ 54 - 0
uni_modules/lime-signature/components/lime-signature/lime-signature.uvue

@@ -0,0 +1,54 @@
+<template>
+	<view style="height: 950rpx; background-color: cadetblue;">
+		<l-signature ref="signature" :pen-color="penColor" :pen-size="10" ></l-signature>
+	</view>
+	<image style="width: 750rpx;" :src="url" v-if="url" mode="widthFix"></image>
+	<!-- <view style="height: 200rpx; overflow: visible;"></view> -->
+	<view>
+		<button @click="clear">清空</button>
+		<button @click="undo">撤消</button>
+		<button @click="redo">恢复</button>
+		<button @click="save">生成</button>
+	</view>
+</template>
+<script lang="uts">
+	import {LSignatureToTempFilePathOptions, LSignatureToFileSuccess} from '@/uni_modules/lime-signature'
+	export default {
+		data() {
+			return {
+				penColor: 'red',
+				url: ''
+			}
+		},
+		methods: {
+			clear() {
+				const signature = this.$refs['signature'] as LSignatureComponentPublicInstance
+				signature.clear()
+			},
+			undo() {
+				const signature = this.$refs['signature'] as LSignatureComponentPublicInstance
+				signature.undo()
+			},
+			redo() {
+				const signature = this.$refs['signature'] as LSignatureComponentPublicInstance
+				signature.redo()
+			},
+			save() {
+				const signature = this.$refs['signature'] as LSignatureComponentPublicInstance
+				signature.canvasToTempFilePath({
+					success: (res : LSignatureToFileSuccess) : void => {
+						console.log('isEmpty', res.isEmpty)
+						this.url = res.tempFilePath
+					}
+				} as LSignatureToTempFilePathOptions)
+			}
+		},
+		mounted() {
+			setTimeout(() => {
+				this.penColor = 'blue'
+			}, 2000)
+		}
+	}
+</script>
+<style>
+</style>

Plik diff jest za duży
+ 381 - 0
uni_modules/lime-signature/components/lime-signature/lime-signature.vue


+ 226 - 0
uni_modules/lime-signature/hybrid/html/index.html

@@ -0,0 +1,226 @@
+<!DOCTYPE html>
+<html lang="zh">
+	<head>
+		<meta charset="UTF-8" />
+		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+		<meta http-equiv="X-UA-Compatible" content="ie=edge" />
+		<title></title>
+		<style type="text/css">
+			html,
+			body,
+			canvas {
+				padding: 0;
+				margin: 0;
+				width: 100%;
+				height: 100%;
+				overflow-y: hidden;
+				background-color: transparent;
+			}
+		</style>
+	</head>
+
+	<body>
+		<canvas id="lime-signature"></canvas>
+		<script type="text/javascript" src="./uni.webview.1.5.3.js"></script>
+		<script type="text/javascript" src="./signature.js"></script>
+		<script>
+			var signature = null;
+			var timer = null;
+			var isStart = false;
+			var options = null
+			console.log = function(...args) {
+				postMessage(args);
+			};
+			// function stringify(key, value) {
+			// 	if (typeof value === 'object' && value !== null) {
+			// 		if (cache.indexOf(value) !== -1) {
+			// 			return;
+			// 		}
+			// 		cache.push(value);
+			// 	}
+			// 	return value;
+			// };
+			function emit(event, data) {
+				postMessage({
+					event,
+					data: typeof data !== "object" && data !== null ? data : JSON.stringify(data),
+				});
+				// cache = [];
+			}
+
+			function postMessage(data) {
+				uni.postMessage({
+					data
+				});
+			}
+
+			function update(v = {}) {
+				if (signature) {
+					options = v
+					signature.pen.setOption(v);
+				} else {
+					signature = new Signature.Signature({el: "lime-signature"});
+					canvasEl = signature.canvas.get("el");
+					options = v
+					signature.pen.setOption(v)
+					const width = signature.canvas.get("width");
+					const height = signature.canvas.get("height");
+					
+					emit({changeSize: {width,height}})
+				}
+			}
+
+			function clear() {
+				signature.clear()
+			}
+
+			function undo() {
+				signature.undo()
+			}
+			function redo() {
+				signature.redo()
+			}
+			function isEmpty() {
+				const isEmpty = signature.isEmpty()
+				emit({isEmpty});
+			}
+			function isTransparent(color) {
+			  // 判断颜色是否为 transparent
+			  if (color === 'transparent') {
+			    return true;
+			  }
+			
+			  // 判断颜色是否为 rgba 的 a 为 0
+			  if (color.startsWith('rgba')) {
+			    const regex = /\d+(\.\d+)?/g;
+			    const matches = color.match(regex);
+			    if (matches !== null) {
+			      const alpha = parseFloat(matches[3]);
+			      if (alpha === 0) {
+			        return true;
+			      }
+			    }
+			  }
+			  return false;
+			}
+			function mask(param){
+				clearTimeout(timer);
+				let {destWidth=0, destHeight=0} = param
+				let width = this.signature.canvas.get('width')
+				let height = this.signature.canvas.get('height')
+				let canvas = document.createElement('canvas')
+				const ctx = canvas.getContext('2d');
+				const pixelRatio = signature.canvas.get('pixelRatio')
+				let width = signature.canvas.get('width')
+				let height = signature.canvas.get('height')
+				canvas.width = width * pixelRatio
+				canvas.height = height * pixelRatio
+				
+				this.signature.pen.getMaskedImageData((imageData)=>{
+					ctx.putImageData(imageData, 0, 0);
+					if(destWidth&&destHeight){
+						const _canvas = document.createElement('canvas')
+						_canvas.width = destWidth
+						_canvas.height = destHeight
+						const _context = _canvas.getContext('2d')
+						_context.drawImage(canvas, 0, 0, destWidth, destHeight)
+						canvas.remove()
+						canvas = _canvas	
+					}
+					const path = canvas.toDataURL();
+					canvas.remove()
+					if (typeof path == "string") {
+						const index = Math.ceil(path.length / 8);
+						for (var i = 0; i < 8; i++) {
+							if (i == 7) {
+								emit({"success": path.substr(i * index, index)});
+							} else {
+								emit({"file": path.substr(i * index, index)});
+							}
+						}
+					} else {
+						console.error("canvas no data");
+						emit({"fail": "canvas no data"});
+					}
+				})
+			}
+			function save(param) {
+				// delete param.success;
+				// delete param.fail;
+				clearTimeout(timer);
+				timer = setTimeout(() => {
+					let {fileType = 'png', quality = 1, n, destWidth=0, destHeight=0} = param
+					const type = `image/${fileType}`.replace(/jpg/, 'jpeg');
+					const {backgroundColor, landscape, boundingBox} = options
+					const flag = backgroundColor || landscape || boundingBox||destWidth&&destHeight
+					let path = canvasEl.toDataURL(!flag && type, !flag && quality)
+					if(flag) {
+						let canvas = document.createElement('canvas')
+						const pixelRatio = signature.canvas.get('pixelRatio')
+						let width = signature.canvas.get('width')
+						let height = signature.canvas.get('height')
+						let x = 0
+						let y = 0
+						
+						const next = () => {
+							const size = [width, height]
+							if(landscape) {size.reverse()}
+							canvas.width = size[0] * pixelRatio
+							canvas.height = size[1] * pixelRatio
+							const param = [x, y, width, height, 0 , 0, width, height].map(item => item * pixelRatio)
+							const context = canvas.getContext('2d')
+							// context.scale(pixelRatio, pixelRatio)
+							if (landscape) {
+								context.translate(0, width * pixelRatio)
+								context.rotate(-Math.PI / 2)
+							}
+							if (backgroundColor && !isTransparent(backgroundColor)) {
+								context.fillStyle = backgroundColor
+								context.fillRect(0, 0, width * pixelRatio, height * pixelRatio)
+							}
+							const drawImage = ()=>{
+								
+							}
+							// param
+							context.drawImage(signature.canvas.get('el'), ...param)
+							if(destWidth&&destHeight){
+								const _canvas = document.createElement('canvas')
+								_canvas.width = destWidth
+								_canvas.height = destHeight
+								const _context = _canvas.getContext('2d')
+								_context.drawImage(canvas, 0, 0, destWidth, destHeight)
+								canvas.remove()
+								canvas = _canvas
+							}
+							path = canvas.toDataURL(type, quality)
+							canvas.remove()
+						}
+						if(boundingBox) {
+							const res = signature.getContentBoundingBox()
+							width = res.width
+							height = res.height
+							x = res.startX
+							y = res.startY
+							next()
+						} else {
+							next()
+						}
+					} 
+					if (typeof path == "string") {
+						const index = Math.ceil(path.length / 8);
+						for (var i = 0; i < 8; i++) {
+							if (i == 7) {
+								emit({"success": path.substr(i * index, index)});
+							} else {
+								emit({"file": path.substr(i * index, index)});
+							}
+						}
+					} else {
+						console.error("canvas no data");
+						emit({"fail": "canvas no data"});
+					}
+				}, 30);
+			}
+		</script>
+	</body>
+</html>

Plik diff jest za duży
+ 1 - 0
uni_modules/lime-signature/hybrid/html/signature.js


Plik diff jest za duży
+ 1 - 0
uni_modules/lime-signature/hybrid/html/uni.webview.1.5.3.js


+ 37 - 0
uni_modules/lime-signature/index.uts

@@ -0,0 +1,37 @@
+
+export type LSignatureToFileSuccess = {
+	tempFilePath: string
+	isEmpty: boolean
+}
+export type LSignatureToFileSuccessCallback = (res : LSignatureToFileSuccess) => void
+export type LSignatureToFileFailCallback = (res : TakeSnapshotFail) => void
+export type LSignatureToFileCompleteCallback = (res : any) => void
+
+export type  LSignatureToTempFilePathOptions = {
+	success?: LSignatureToFileSuccessCallback
+	fail?: 	  LSignatureToFileFailCallback
+	complete?: LSignatureToFileCompleteCallback
+	format?: string
+}
+
+export type LSignatureOptions = {
+	penColor : string
+	// backgroundColor : string
+	openSmooth : boolean
+	disableScroll : boolean
+	disabled : boolean
+	penSize : number
+	minLineWidth : number
+	maxLineWidth : number
+	minSpeed : number
+	maxWidthDiffRate : number
+	maxHistoryLength : number
+}
+export type Point = {
+	x: number
+	y: number
+	c?: string
+	w?: number
+}
+
+export type Line = Point[]

+ 84 - 0
uni_modules/lime-signature/package.json

@@ -0,0 +1,84 @@
+{
+  "id": "lime-signature",
+  "displayName": "手写板-签名签字-lime-signature",
+  "version": "1.3.9",
+  "description": "手写板签名插件:一款实用的签名插件,支持横屏、背景色、笔画颜色、笔画大小等功能,可生成有内容的区域,减小图片尺寸,节省空间。支持uniapp/uniappx(web,ios,安卓)。",
+  "keywords": [
+    "写字",
+    "签名",
+    "电子签名",
+    "横屏",
+    "uvue"
+],
+  "repository": "",
+  "engines": {
+    "HBuilderX": "^3.5.4"
+  },
+"dcloudext": {
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "",
+    "type": "component-vue"
+  },
+  "uni_modules": {
+    "dependencies": [
+	],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y",
+        "alipay": "n"
+      },
+      "client": {
+		  "Vue": {
+		    "vue2": "y",
+		    "vue3": "y"
+		  },
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "y",
+          "app-uvue": "y"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "u",
+          "Edge": "u",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "u",
+          "字节跳动": "y",
+          "QQ": "y"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        }
+      }
+    }
+  }
+}

+ 174 - 0
uni_modules/lime-signature/readme.md

@@ -0,0 +1,174 @@
+# signature 写字板
+> uniapp 写字板,可用业务签名等场景  
+> [查看更多 站点1](https://limeui.qcoon.cn/#/signature) <br> 
+> [查看更多 站点2](http://liangei.gitee.io/limeui/#/signature)  
+> Q群:1169785031
+
+
+## 平台兼容
+
+| H5  | 微信小程序 | 支付宝小程序 | 百度小程序 | 头条小程序 | QQ 小程序 | App |
+| --- | ---------- | ------------ | ---------- | ---------- | --------- | --- |
+| √   | √          | √         | 未测       | 未测          | 未测      | √    |
+
+
+## 代码演示
+
+### 基本用法
+```html
+<view style="width: 750rpx ;height: 750rpx;">
+	<l-signature disableScroll  ref="signatureRef" :penColor="penColor" :penSize="penSize" :openSmooth="openSmooth" ></l-signature>
+</view>
+<view>
+	<button @click="onClick('clear')">清空</button>
+	<button @click="onClick('undo')">撤消</button>
+	<button @click="onClick('save')">保存</button>
+	<!-- uvue 不支持 openSmooth -->
+	<button @click="onClick('openSmooth')">压感{{openSmooth?'开':'关'}}</button>
+</view>
+```
+### Vue/Nvue
+```js
+export default {
+	data() {
+		return {
+			title: 'Hello',
+			penColor: 'red',
+			penSize: 5,
+			url: '',
+			openSmooth: true
+		}
+	},
+	methods: {
+		onClick(type) {
+			 if(type == 'openSmooth') {
+				 this.openSmooth = !this.openSmooth
+				 return
+			 }
+			if (type == 'save') {
+				this.$refs.signatureRef.canvasToTempFilePath({
+					success: (res) => {
+						// 是否为空画板 无签名
+						console.log(res.isEmpty)
+						// 生成图片的临时路径
+						// H5 生成的是base64
+						this.url = res.tempFilePath
+					}
+				})
+				return
+			}
+			if (this.$refs.signatureRef)
+				this.$refs.signatureRef[type]()
+		}
+	}
+}
+```
+
+### Uvue
+
+```js
+import {LSignatureToTempFilePathOptions, LSignatureToFileSuccess} from '@/uni_modules/lime-signature'
+export default {
+	data() {
+		return {
+			title: 'Hello',
+			penColor: 'red',
+			penSize: 5,
+			url: '',
+			openSmooth: true
+		}
+	},
+	methods: {
+		onClick(type: string) {
+			const signatureRef = this.$refs['signatureRef'] as LSignatureComponentPublicInstance
+			// APP 不支持
+			// #ifndef APP 
+			 if(type == 'openSmooth') {
+				 this.openSmooth = !this.openSmooth
+			 }
+			 // #endif
+			if (type == 'save') {
+				signatureRef.canvasToTempFilePath({
+					success: (res: LSignatureToFileSuccess) => {
+						// 是否为空画板 无签名
+						console.log(res.isEmpty)
+						// 生成图片的临时路径
+						// H5 生成的是base64
+						this.url = res.tempFilePath
+					}
+				} as LSignatureToTempFilePathOptions)
+				return
+			}
+			if(type == 'undo'){
+				signatureRef.undo()
+			}
+			if(type == 'redo'){
+				signatureRef.redo()
+			}
+			if(type == 'clear'){
+				signatureRef.clear()
+			}
+		}
+	}
+}
+```
+
+
+### 横屏
+通过设置`landscape`,改变生成图片的方向,达到横屏的作用
+```html
+<view style="width: 100vw; height: 100vh;">
+	<l-signature landscape></l-signature>
+</view>
+<view style="transform: rotate(90deg);">
+	<button @click="onClick('clear')">清空</button>
+	<button @click="onClick('undo')">撤消</button>
+	<button @click="onClick('save')">保存</button>
+	<button @click="onClick('openSmooth')">压感{{openSmooth?'开':'关'}}</button>
+</view>
+```
+
+### 插件标签
+- 默认 l-signature 为 component
+- 默认 lime-signature 为 demo
+demo使用了`uni-popup`,如果要看演示请自行导入这个插件
+
+
+## API
+### Props
+
+| 参数             | 说明                  | 类型              | 默认值        |
+| --------------   | ------------         | ----------------  | ------------ |
+| penSize          | 画笔大小              | <em>number</em>   |    `2`           |
+| minLineWidth     | 线条最小宽            | <em>number</em>    | `2`        |
+| maxLineWidth     | 线条最大宽            | <em>number</em>    | `6`        |
+| penColor         | 画笔颜色              | <em>string</em>    | `black`      |
+| backgroundColor  | 背景颜色(不填则为透明背景)              | <em>string</em>    | ``      |
+| type             | 指定 canvas 类型  **uvue暂不支持**  | <em>string</em> | `2d`  |
+| openSmooth       | 是否模拟压感 **uvue暂不支持**          | <em>boolean</em>   | `false`       |
+| beforeDelay       | 延时初始化,在放在弹窗里可以使用 (毫秒)          | <em>number</em>   | `0`       |
+| maxHistoryLength   | 限制历史记录数,即最大可撤销数,传入0则关闭历史记录功能           | <em>boolean</em>   | `20`       |
+| landscape        | 横屏           | <em>boolean</em>   | ``       |
+| disableScroll     | 当在写字时,禁止屏幕滚动以及下拉刷新           | <em>boolean</em>   | `true`       |
+| disabled         | 禁用           | <em>boolean</em>   | `false`       |
+| boundingBox     | 只生成内容区域,即未画部分不生成,有性能的损耗(微信小程序pc/uvue不支持) | <em>boolean</em>   | `false`       |
+| preferToDataURL     | 是否优先使用toDataURL,在支持的环境优先使用`toDataURL`生成图片,图片格式是base64(uvue不支持) | <em>boolean</em>   | `false`       |
+
+
+### 事件 Events
+
+| 事件名  | 说明         | 回调           |
+| ------- | ------------ | -------------- |
+| undo | 撤消,回退到上一步 |  |
+| clear | 清空,清空画板 |  |
+| canvasToTempFilePath | 保存,生成图片,与官方保持一致,但不需要传canvasId |  |
+
+### 常见问题
+- 放在弹窗里时,尺寸不对 可以延时手写板出现时机,给手写板加vif或beforeDelay="300"
+- boundingBox 微信小程序 pc / uvue 不支持, 因为获取不到 ImageData 数据
+- backgroundColor 不能设置为`transparent`,填了也没用,我在代码里排除了。因为会导致微信小程序无法生成图片
+
+### 打赏
+如果你觉得本插件,解决了你的问题,赠人玫瑰,手留余香。   
+![](https://testingcf.jsdelivr.net/gh/liangei/image@1.9/alipay.png)
+![](https://testingcf.jsdelivr.net/gh/liangei/image@1.9/wpay.png)

Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/runtime.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/back.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/ming-pop/ming-pop.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/mp-html/mp-html.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/mp-html/node/node.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/mypopup.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/aboutme/aboutme.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/login.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/mapindex/mapindex.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/CourtyardNetworkManagement/CourtyardNetworkManagement.js.map


Plik diff jest za duży
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/GRegulatingBoxMaintenance/GRegulatingBoxMaintenance.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/LNGStation/LNGStation.js.map


Plik diff jest za duży
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/PipelineGasUser/PipelineGasUser.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/PressureRegulatingBox/PressureRegulatingBox.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/WarningPileForm/WarningPileForm.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/WarningPileList.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/buildinglist.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/communitylist.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/emergencyRepairOrder/emergencyRepairOrder.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/fileList/fileList.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/listProject.js.map


Plik diff jest za duży
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/patrolFleet/patrolFleet.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/regulatorBoxList.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/roadSection/roadSection.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/typeList.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/unitlist.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/noLogin/valveWellInspection/valveWellInspection.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/notice/noticeDetail.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/notice/noticeList.js.map


Plik diff jest za duży
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/cc-pullScroolView/components/cc-pullScroolView/cc-pullScroolView.js.map


Plik diff jest za duży
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/lime-signature/components/l-signature/l-signature.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-button/u-button.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-checkbox-group/u-checkbox-group.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-checkbox/u-checkbox.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-col/u-col.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-form-item/u-form-item.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-form/u-form.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-grid-item/u-grid-item.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-grid/u-grid.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-icon/u-icon.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-image/u-image.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-input/u-input.js.map


Plik diff jest za duży
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-loading/u-loading.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-mask/u-mask.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-parse/libs/trees.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-parse/u-parse.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-picker/u-picker.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-popup/u-popup.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-radio-group/u-radio-group.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-radio/u-radio.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-row/u-row.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-search/u-search.js.map


Plik diff jest za duży
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-select/u-select.js.map


Plik diff jest za duży
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uview-ui/components/u-switch/u-switch.js.map


+ 4 - 1
unpackage/dist/dev/mp-weixin/app.json

@@ -22,7 +22,10 @@
     "pages/noLogin/valveWellInspection/valveWellInspection",
     "pages/mapindex/mapindex",
     "pages/noLogin/LNGStation/LNGStation",
-    "pages/noLogin/fileList/fileList"
+    "pages/noLogin/fileList/fileList",
+    "pages/noLogin/patrolFleet/patrolFleet",
+    "pages/noLogin/GRegulatingBoxMaintenance/GRegulatingBoxMaintenance",
+    "pages/noLogin/PipelineGasUser/PipelineGasUser"
   ],
   "subPackages": [],
   "window": {

+ 3 - 3
unpackage/dist/dev/mp-weixin/common/main.js

@@ -17,7 +17,7 @@ var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
 var _App = _interopRequireDefault(__webpack_require__(/*! ./App */ 27));
 var _index = _interopRequireDefault(__webpack_require__(/*! ./api/index.js */ 33));
 var _utils = _interopRequireDefault(__webpack_require__(/*! ./common/utils.js */ 38));
-var _http = _interopRequireDefault(__webpack_require__(/*! ./common/http.js */ 36));
+var _http = _interopRequireDefault(__webpack_require__(/*! ./common/http.js */ 37));
 var _lodashMin = _interopRequireDefault(__webpack_require__(/*! ./common/lodash.min.js */ 39));
 var _uviewUi = _interopRequireDefault(__webpack_require__(/*! uview-ui */ 42));
 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -29,7 +29,7 @@ _vue.default.config.productionTip = false;
 //返回上一页按钮
 var back = function back() {
   __webpack_require__.e(/*! require.ensure | components/back */ "components/back").then((function () {
-    return resolve(__webpack_require__(/*! @/components/back.vue */ 251));
+    return resolve(__webpack_require__(/*! @/components/back.vue */ 275));
   }).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
 };
 _vue.default.component('back', back);
@@ -37,7 +37,7 @@ _vue.default.component('back', back);
 //弹窗
 var mingPop = function mingPop() {
   __webpack_require__.e(/*! require.ensure | components/ming-pop/ming-pop */ "components/ming-pop/ming-pop").then((function () {
-    return resolve(__webpack_require__(/*! @/components/ming-pop/ming-pop.vue */ 258));
+    return resolve(__webpack_require__(/*! @/components/ming-pop/ming-pop.vue */ 282));
   }).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
 };
 _vue.default.component("ming-pop", mingPop);

Plik diff jest za duży
+ 2 - 2
unpackage/dist/dev/mp-weixin/common/runtime.js


Plik diff jest za duży
+ 3601 - 3537
unpackage/dist/dev/mp-weixin/common/vendor.js


Plik diff jest za duży
+ 15 - 15
unpackage/dist/dev/mp-weixin/components/back.js


Plik diff jest za duży
+ 14 - 14
unpackage/dist/dev/mp-weixin/components/ming-pop/ming-pop.js


Plik diff jest za duży
+ 16 - 16
unpackage/dist/dev/mp-weixin/components/mp-html/mp-html.js


Plik diff jest za duży
+ 19 - 19
unpackage/dist/dev/mp-weixin/components/mp-html/node/node.js


Plik diff jest za duży
+ 14 - 14
unpackage/dist/dev/mp-weixin/components/mypopup.js


+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/index/index.js


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików