diff --git a/pages.js b/pages.js index 7bf1229..46095dc 100644 --- a/pages.js +++ b/pages.js @@ -9,6 +9,7 @@ module.exports = hot((pagesJson)=>{ ...require("./router/massif.js"), ...require('./router/purchase.js'), ...require('./router/stock.js'), + ...require('./router/patrolGarden.js'), ], tabBar:{ color:"#999", diff --git a/pages/home/index.vue b/pages/home/index.vue index b70ec52..a89d498 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -286,6 +286,8 @@ + 巡园记录 + diff --git a/pages/patrolGarden/abnoReport.vue b/pages/patrolGarden/abnoReport.vue new file mode 100644 index 0000000..bea2c9f --- /dev/null +++ b/pages/patrolGarden/abnoReport.vue @@ -0,0 +1,33 @@ + + + \ No newline at end of file diff --git a/pages/patrolGarden/app.vue b/pages/patrolGarden/app.vue new file mode 100644 index 0000000..6d57ef5 --- /dev/null +++ b/pages/patrolGarden/app.vue @@ -0,0 +1,75 @@ + + + \ No newline at end of file diff --git a/pages/patrolGarden/detail.vue b/pages/patrolGarden/detail.vue new file mode 100644 index 0000000..6aefe48 --- /dev/null +++ b/pages/patrolGarden/detail.vue @@ -0,0 +1,166 @@ + + + \ No newline at end of file diff --git a/pages/patrolGarden/info.vue b/pages/patrolGarden/info.vue new file mode 100644 index 0000000..22c1684 --- /dev/null +++ b/pages/patrolGarden/info.vue @@ -0,0 +1,120 @@ + + + \ No newline at end of file diff --git a/pages/patrolGarden/record.vue b/pages/patrolGarden/record.vue new file mode 100644 index 0000000..1e98728 --- /dev/null +++ b/pages/patrolGarden/record.vue @@ -0,0 +1,131 @@ + + + \ No newline at end of file diff --git a/router/patrolGarden.js b/router/patrolGarden.js new file mode 100644 index 0000000..6aef537 --- /dev/null +++ b/router/patrolGarden.js @@ -0,0 +1,55 @@ +module.exports=[ + { + path:"pages/patrolGarden/record", + style:{ + navigationBarTitleText:"巡园记录", + "app-plus":{ + titleNView:false + } + } + }, + { + path:"pages/patrolGarden/detail", + style:{ + navigationBarTitleText:"巡园详情", + navigationBarBackgroundColor:"#10C176", + navigationBarTextStyle:"white", + "app-plus":{ + "titleNView":true + } + } + }, + { + path:"pages/patrolGarden/info", + style:{ + navigationBarTitleText:"巡园信息", + navigationBarBackgroundColor:"#10C176", + navigationBarTextStyle:"white", + "app-plus":{ + "titleNView":true + } + } + }, + { + path:"pages/patrolGarden/app", + style:{ + navigationBarTitleText:"巡园应用", + navigationBarBackgroundColor:"#10C176", + navigationBarTextStyle:"white", + "app-plus":{ + "titleNView":true + } + } + }, + { + path:"pages/patrolGarden/abnoReport", + style:{ + navigationBarTitleText:"异常上报", + navigationBarBackgroundColor:"#10C176", + navigationBarTextStyle:"white", + "app-plus":{ + "titleNView":true + } + } + }, +] \ No newline at end of file diff --git a/static/patrolGarden/inventory.svg b/static/patrolGarden/inventory.svg new file mode 100644 index 0000000..d24ed3f --- /dev/null +++ b/static/patrolGarden/inventory.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/patrolGarden/point.png b/static/patrolGarden/point.png new file mode 100644 index 0000000..289dac3 Binary files /dev/null and b/static/patrolGarden/point.png differ diff --git a/static/patrolGarden/procure.svg b/static/patrolGarden/procure.svg new file mode 100644 index 0000000..23f7806 --- /dev/null +++ b/static/patrolGarden/procure.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/patrolGarden/tour.svg b/static/patrolGarden/tour.svg new file mode 100644 index 0000000..78fb280 --- /dev/null +++ b/static/patrolGarden/tour.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/uni.scss b/uni.scss index 7b67f09..c93d1d5 100644 --- a/uni.scss +++ b/uni.scss @@ -88,9 +88,9 @@ $uni-font-size-paragraph:15px; .card{ background:#fff; - border-radius: 12px; - margin:15px; - padding:15px; + border-radius: 16rpx; + margin:30rpx; + padding:30rpx; box-shadow: 0 3px 6px 1px rgba(0,0,0,0.1); &>.title{ color:#333; @@ -117,7 +117,13 @@ view{ overflow: hidden; white-space: nowrap; } - +.doubleLine{ + word-break: break-all; + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: var(--n,2); + -webkit-box-orient: vertical; +} // .u-navbar{ // height:calc(var(--status-bar-height) + 44px); // margin-bottom:15px; diff --git a/uni_modules/d-form/components/d-form/d-form.vue b/uni_modules/d-form/components/d-form/d-form.vue index b413533..8de466e 100644 --- a/uni_modules/d-form/components/d-form/d-form.vue +++ b/uni_modules/d-form/components/d-form/d-form.vue @@ -20,13 +20,13 @@ margin-left:30rpx; } } - .map,.u-input,textarea{ + .u-input,textarea{ background:#F7F7F7; margin-top:14rpx; border-radius: 24rpx; width:100%; } - .map,.navigate{ + .navigate{ height:80rpx; display:flex; align-items: center; @@ -39,6 +39,12 @@ color:#999; } } + map{ + margin-top:10rpx; + border-radius: 10rpx; + width:100%; + height:320rpx; + } textarea{ height:auto; min-height:160rpx; @@ -263,26 +269,6 @@ } } } - .amap{ - position:fixed; - top:0; - left:0; - width:100%; - height:100%; - z-index: -1; - background:rgba(0, 0, 0, 0.4); - &.show{ - z-index: 100; - map{ - top:0; - } - } - map{ - top:100%; - width:100%; - height:100%; - } - } .select-tab-input{ position:absolute; bottom:0; @@ -313,7 +299,8 @@ - {{value.length>0?Object.values(value[0]).join():"选择经纬度"}} + + {{pickerContent}} {{value||placeholder||`请选择${labelName}`}} @@ -393,9 +380,9 @@ - + @@ -535,6 +522,8 @@ import {computeArea} from '@/common/utils' pickerChangeVal:null, dictCodeList:[], + points:[], + amap:null, } }, watch:{ @@ -598,6 +587,23 @@ import {computeArea} from '@/common/utils' this.getDictCode() } }, + mounted(){ + if(this.type=='map'){ + this.amap=uni.createMapContext("amap",this).$getAppMap() + this.amap.onclick=e=>{ + this.points=[{ + id:1, + title:"sss", + latitude: e.latitude, + longitude:e.longitude, + iconPath:"/static/patrolGarden/point.png", + width:10, + height:10, + }] + this.$emit('position',e) + } + } + }, methods:{ async getDictCode(){ var res=await request("/common/api/dict/queryDictItemByDictCode",{ @@ -682,6 +688,9 @@ import {computeArea} from '@/common/utils' this.$emit("input",this.filter(e)) } }, + tapMap(e){ + console.log(e,'----e-----') + }, openMap(){ // uni.navigateTo({url:"/plantPages/massif/mapEditor"})