作者 xuqiang

提交

@@ -53,7 +53,7 @@ @@ -53,7 +53,7 @@
53 } 53 }
54 }, 54 },
55 methods: { 55 methods: {
56 - delAddress(){ 56 + delAddress(index){
57 this.keyList[index].moreInfo.LAT = '' 57 this.keyList[index].moreInfo.LAT = ''
58 this.keyList[index].moreInfo.LON = '' 58 this.keyList[index].moreInfo.LON = ''
59 }, 59 },
1 <template> 1 <template>
2 <view> 2 <view>
3 <!-- 顶部区域 --> 3 <!-- 顶部区域 -->
4 - <check-top-wrap @changeParamType="changeParamType" :yearVal="param.year" :keyword="keyword" :cityVal="basinTxt" @showPicker="showPicker"></check-top-wrap> 4 + <check-top-wrap @changeParamType="changeParamType" :yearVal="yearTxt" :keyword="keyword" :cityVal="basinTxt" @showPicker="showPicker"></check-top-wrap>
5 <w-picker 5 <w-picker
6 :visible.sync="visibleYear" 6 :visible.sync="visibleYear"
7 mode="date" 7 mode="date"
@@ -55,6 +55,7 @@ @@ -55,6 +55,7 @@
55 export default { 55 export default {
56 data() { 56 data() {
57 return { 57 return {
  58 + yearTxt:new Date().getFullYear().toString(),
58 basinTxt:'全流域', 59 basinTxt:'全流域',
59 param:{ 60 param:{
60 // 恢复位置 61 // 恢复位置
@@ -89,7 +90,7 @@ @@ -89,7 +90,7 @@
89 }, 90 },
90 onLoad() { 91 onLoad() {
91 //#ifdef APP-PLUS 92 //#ifdef APP-PLUS
92 - uni.getLocation({ 93 + /* uni.getLocation({
93 type: 'gcj02', 94 type: 'gcj02',
94 geocode: true, 95 geocode: true,
95 success: (res) => { 96 success: (res) => {
@@ -97,12 +98,15 @@ @@ -97,12 +98,15 @@
97 this.basinTxt = res.address.city 98 this.basinTxt = res.address.city
98 this.defaultRegion = [res.address.province,res.address.city] 99 this.defaultRegion = [res.address.province,res.address.city]
99 } 100 }
100 - }); 101 + }); */
101 //#endif 102 //#endif
102 //#ifdef H5 103 //#ifdef H5
103 // 恢复位置 104 // 恢复位置
104 - this.defaultRegion = ['全流域',''] 105 + // this.defaultRegion = ['全流域','']
105 //#endif 106 //#endif
  107 + this.param.basin = ''
  108 + this.basinTxt = '全流域'
  109 + this.defaultRegion = ['全流域','']
106 this.getData() 110 this.getData()
107 }, 111 },
108 methods: { 112 methods: {
@@ -143,7 +147,15 @@ @@ -143,7 +147,15 @@
143 }, 147 },
144 onConfirm(e,pickerType){ 148 onConfirm(e,pickerType){
145 if(pickerType == 'year'){ 149 if(pickerType == 'year'){
146 - this.param.year = e.result 150 + console.log('e.result',e.result)
  151 + if(e.result == '全'){
  152 + this.param.year = ''
  153 + this.yearTxt = '全'
  154 + }else{
  155 + this.param.year = e.result
  156 + this.yearTxt = e.result
  157 + }
  158 +
147 } 159 }
148 if(pickerType == 'region'){ 160 if(pickerType == 'region'){
149 if(e.obj.city.label != ''){ 161 if(e.obj.city.label != ''){
@@ -2002,8 +2002,8 @@ @@ -2002,8 +2002,8 @@
2002 uni.getLocation({ 2002 uni.getLocation({
2003 type: 'wgs84', 2003 type: 'wgs84',
2004 success: (res) => { 2004 success: (res) => {
2005 - this.LAT = 123  
2006 - this.LON = 456 2005 + this.LAT = res.latitude
  2006 + this.LON = res.longitude
2007 var moreInfo = { 2007 var moreInfo = {
2008 LAT:this.LAT, 2008 LAT:this.LAT,
2009 LON:this.LON, 2009 LON:this.LON,
@@ -2056,11 +2056,25 @@ @@ -2056,11 +2056,25 @@
2056 this.showRecordMore = false 2056 this.showRecordMore = false
2057 }, 2057 },
2058 editRecordMore(e){ 2058 editRecordMore(e){
2059 - console.log('e',e) 2059 + if(this.checkList[e.checkIndex].keyList[e.keyIndex].moreInfo.LAT != ''){
  2060 + this.LAT = this.checkList[e.checkIndex].keyList[e.keyIndex].moreInfo.LAT
  2061 + }else{
  2062 + this.LAT = ''
  2063 + this.LON = ''
  2064 + }
  2065 + if(this.checkList[e.checkIndex].keyList[e.keyIndex].moreInfo.NOTE != ''){
  2066 + this.desc = this.checkList[e.checkIndex].keyList[e.keyIndex].moreInfo.NOTE
  2067 + }else{
  2068 + this.desc = ''
  2069 + }
  2070 + if(this.checkList[e.checkIndex].keyList[e.keyIndex].moreInfo.IMGS){
  2071 + this.IMGS = this.checkList[e.checkIndex].keyList[e.keyIndex].moreInfo.IMGS
  2072 + }else{
  2073 + this.IMGS = []
  2074 + }
2060 this.checkIndex = e.checkIndex 2075 this.checkIndex = e.checkIndex
2061 this.keyIndex = e.keyIndex 2076 this.keyIndex = e.keyIndex
2062 this.showRecordMore = true 2077 this.showRecordMore = true
2063 - // this.checkList[e.checkIndex].keyList[e.keyIndex].  
2064 }, 2078 },
2065 async setSubKeyList(subKeyObj,keyList){ 2079 async setSubKeyList(subKeyObj,keyList){
2066 var subKey = { 2080 var subKey = {
@@ -214,6 +214,9 @@ @@ -214,6 +214,9 @@
214 } 214 }
215 }) 215 })
216 }, 216 },
  217 + onCancel(){
  218 +
  219 + },
217 onConfirm(e,pickerType){ 220 onConfirm(e,pickerType){
218 this.checkTime = e.result 221 this.checkTime = e.result
219 }, 222 },