Commit 137be4e2d3c0e0ed9a44e7e3e423765a7f45385f
1 parent
b951d827
树木历史
Showing
6 changed files
with
40 additions
and
90 deletions
pages/work/index.vue
... | ... | @@ -58,7 +58,7 @@ |
58 | 58 | <text>人员管理</text> |
59 | 59 | </view> |
60 | 60 | <view class="fs-flex__column fs-items__center item" @click="href('/subPackages/treePage/treeFiles')"> |
61 | - <image class="fs-mb10 icon" src="/static/images/work/itmeHome9.png"></image> | |
61 | + <image class="fs-mb10 icon" src="/static/images/work/itmeHometree.png"></image> | |
62 | 62 | <text>一树一档案</text> |
63 | 63 | </view> |
64 | 64 | </view> | ... | ... |
static/images/work/itmeHometree.png
0 → 100644
889 Bytes
subPackages/treePage/editTreeIfo.vue
... | ... | @@ -317,13 +317,8 @@ export default { |
317 | 317 | treeId: { |
318 | 318 | immediate: true, |
319 | 319 | handler(newVal, oldVal) { |
320 | - if (newVal !== oldVal) { | |
321 | - treeLevelReq().then(res => { | |
322 | - this.treeLevelData = res.data | |
323 | - }) | |
324 | - treeOwnership().then(res => { | |
325 | - this.treeOwnershipData = res.data | |
326 | - }) | |
320 | + if (newVal && newVal !== oldVal) { | |
321 | + | |
327 | 322 | this.treeDetailQuery(newVal) |
328 | 323 | } |
329 | 324 | } |
... | ... | @@ -341,16 +336,22 @@ export default { |
341 | 336 | treeDetailQuery(newVal) { |
342 | 337 | treeDetailReq(newVal).then(res => { |
343 | 338 | this.formData = res.data |
344 | - const option = this.treeOwnershipData.find(item => item.dictValue === this.formData.oldtreeownership); | |
345 | - const optiontreelevel = this.treeLevelData.find(item => item.dictValue === this.formData.treelevel); | |
346 | - if (option) { | |
347 | - this.formData.oldtreeownership = option.dictValue; | |
348 | - this.formData.oldtreeownershipText = option.dictLabel; | |
349 | - } | |
350 | - if (optiontreelevel) { | |
351 | - this.formData.treelevel = optiontreelevel.dictValue; | |
352 | - this.formData.treeleveltext = optiontreelevel.dictLabel; | |
353 | - } | |
339 | + treeLevelReq().then(res => { | |
340 | + this.treeLevelData = res.data | |
341 | + const optiontreelevel = this.treeLevelData.find(item => item.dictValue === this.formData.treelevel); | |
342 | + if (optiontreelevel) { | |
343 | + this.formData.treelevel = optiontreelevel.dictValue; | |
344 | + this.formData.treeleveltext = optiontreelevel.dictLabel; | |
345 | + } | |
346 | + }) | |
347 | + treeOwnership().then(res => { | |
348 | + this.treeOwnershipData = res.data | |
349 | + const option = this.treeOwnershipData.find(item => item.dictValue === this.formData.oldtreeownership); | |
350 | + if (option) { | |
351 | + this.formData.oldtreeownership = option.dictValue; | |
352 | + this.formData.oldtreeownershipText = option.dictLabel; | |
353 | + } | |
354 | + }) | |
354 | 355 | this.formData.treeImgListFile = res.data.treeImgList.map(imgUrl => { |
355 | 356 | return imgUrl.startsWith(OSSURL) |
356 | 357 | ? imgUrl.slice(OSSURL.length) |
... | ... | @@ -372,7 +373,6 @@ export default { |
372 | 373 | handleComplete(e) { |
373 | 374 | if (e.status == 1) { |
374 | 375 | console.log(e) |
375 | - | |
376 | 376 | this.formData.treeImgListFile = e.imgArr |
377 | 377 | this.formData.treeImgList = e.imgArr.map(item => OSSURL + item); |
378 | 378 | console.log(this.formData.treeImgList) | ... | ... |
subPackages/treePage/treeFiles.vue
1 | 1 | <template> |
2 | 2 | <view class="container"> |
3 | 3 | <tui-form ref="form" :show-message="false" :model="formData" style="border-bottom: 1px solid #f5f4f4"> |
4 | - <tui-form-item arrow highlight prop="area" @click="pickerShow"> | |
4 | + <tui-form-item arrow highlight prop="area" @click="pickerShow" label="归属单位"> | |
5 | 5 | <tui-input padding="0" :borderBottom="false" placeholder="请选择归属单位" disabled |
6 | 6 | backgroundColor="transparent" v-model="formData.area"></tui-input> |
7 | 7 | </tui-form-item> | ... | ... |
subPackages/treePage/treeInfo.vue
... | ... | @@ -43,26 +43,28 @@ |
43 | 43 | |
44 | 44 | <tui-col :span="12"> |
45 | 45 | <tui-form-item |
46 | - | |
47 | - label="纬度" | |
46 | + label="经度" | |
48 | 47 | class="location-form-item" |
49 | - | |
50 | 48 | prop="latitude" |
51 | 49 | > |
52 | - {{ formData.latitude }} | |
50 | + {{ formData.longitude }} | |
53 | 51 | </tui-form-item> |
54 | 52 | </tui-col> |
53 | + | |
55 | 54 | <tui-col :span="12"> |
56 | 55 | <tui-form-item |
57 | - label="经度" | |
56 | + | |
57 | + label="纬度" | |
58 | 58 | class="location-form-item" |
59 | + | |
59 | 60 | prop="latitude" |
60 | 61 | > |
61 | - {{ formData.longitude }} | |
62 | + {{ formData.latitude }} | |
62 | 63 | </tui-form-item> |
63 | 64 | </tui-col> |
64 | 65 | |
65 | 66 | |
67 | + | |
66 | 68 | <tui-form-item asterisk label="管护单位" prop="managedutyunit"> |
67 | 69 | |
68 | 70 | <tui-input padding="0" :borderBottom="false" placeholder="请输入" maxlength="30" :disabled="true" |
... | ... | @@ -291,60 +293,14 @@ export default { |
291 | 293 | this.$refs.form && this.$refs.form.immediateValidate(true, rules); |
292 | 294 | }, |
293 | 295 | onLoad(options) { |
294 | - // const eventChannel = this.getOpenerEventChannel(); | |
295 | - // // eventChannel.on监听,获取上一页面通过eventChannel事件传送的数据 | |
296 | - // eventChannel.on('pageDataTreeInfo', data=> { | |
297 | - // console.log(data) // {data: 123, title: "A页面",source: 1, content: "点个赞点个赞,求求了"} | |
298 | - // console.log('4123') | |
299 | - // this.formData =data | |
300 | - // }) | |
301 | - this.formData = { | |
302 | - "searchEntities": null, | |
303 | - "createBy": null, | |
304 | - "createTime": null, | |
305 | - "updateBy": null, | |
306 | - "updateTime": null, | |
307 | - "remark": null, | |
308 | - "beginTime": null, | |
309 | - "endTime": null, | |
310 | - "exportType": null, | |
311 | - "params": {}, | |
312 | - "id": 22, | |
313 | - "treeid": 28, | |
314 | - "treenumber": "daf23b62-d295-4131-b15d-fca6259d251f", | |
315 | - "latinname": "3", | |
316 | - "treetype": "312名称", | |
317 | - "treeheight": "31", | |
318 | - "canopy": null, | |
319 | - "dbh": "312", | |
320 | - "growthvigor": null, | |
321 | - "treelevel": "treeLevel-2", | |
322 | - "longitude": "116.422014", | |
323 | - "latitude": "39.901119", | |
324 | - "location": null, | |
325 | - "maintainunit": null, | |
326 | - "managedutyunit": "单位12321", | |
327 | - "street": null, | |
328 | - "oldtreeownership": "oldTreeOwnership-6", | |
329 | - "datastate": null, | |
330 | - "estimationtreeage": "12", | |
331 | - "canopyeastwest": "4", | |
332 | - "canopysouthnorth": "11", | |
333 | - "weekday": "55", | |
334 | - "growlocation": "北京市东城区崇文门东大街北京明城墙遗址公园内(西侧)", | |
335 | - "growthenvironment": "123", | |
336 | - "treephotoone": "https://test.jichengshanshui.com.cn:28310/yuanlin/alioss/yl/images/2025/08/27/0564bc2272e08f791946b2eab1f5c9e0.jpeg", | |
337 | - "treephototwo": null, | |
338 | - "treephotothree": null, | |
339 | - "treephotofour": null, | |
340 | - "treephotofive": null, | |
341 | - "treeImgList": ["https://test.jichengshanshui.com.cn:28310/yuanlin/alioss/yl/images/2025/08/27/0564bc2272e08f791946b2eab1f5c9e0.jpeg"], | |
342 | - "deleted": 0, | |
343 | - "createby": "严家齐", | |
344 | - "updateby": "严家齐", | |
345 | - "createtime": "2025-08-27 15:01:48", | |
346 | - "updatetime": "2025-08-27 15:01:48" | |
347 | - } | |
296 | + const eventChannel = this.getOpenerEventChannel(); | |
297 | + // eventChannel.on监听,获取上一页面通过eventChannel事件传送的数据 | |
298 | + eventChannel.on('pageDataTreeInfo', data=> { | |
299 | + console.log(data) // {data: 123, title: "A页面",source: 1, content: "点个赞点个赞,求求了"} | |
300 | + console.log('4123') | |
301 | + this.formData =data | |
302 | + }) | |
303 | + | |
348 | 304 | treeLevelReq().then(res => { |
349 | 305 | this.treeLevelData = res.data |
350 | 306 | const optiontreelevel = this.treeLevelData.find(item => item.dictValue === this.formData.treelevel); | ... | ... |
subPackages/treePage/treeLog.vue
... | ... | @@ -12,11 +12,11 @@ |
12 | 12 | <view style="min-width: 100px">{{ i.updatetime.substring(0, 10) }}</view> |
13 | 13 | </view> |
14 | 14 | <view class="fs-mt8 fs-align__center"> |
15 | - <img src="../../static/images/tree/tree-high.png" style="width: 16px;height: 16px;margin-right: 6px;" | |
15 | + <img src="/static/images/tree/tree-high.png" style="width: 16px;height: 16px;margin-right: 6px;" | |
16 | 16 | alt=""> 高度:{{ i.treeheight }} 米 |
17 | 17 | </view> |
18 | 18 | <view class="fs-mt8 fs-align__center"> |
19 | - <img src="../../static/images/tree/treearound.png" style="width: 16px;height: 16px;margin-right: 6px;" | |
19 | + <img src="/static/images/tree/treearound.png" style="width: 16px;height: 16px;margin-right: 6px;" | |
20 | 20 | alt="">胸径:{{ i.dbh }} 厘米 |
21 | 21 | </view> |
22 | 22 | </view> |
... | ... | @@ -70,14 +70,8 @@ export default { |
70 | 70 | }) |
71 | 71 | }, |
72 | 72 | todetailPage(i) { |
73 | - let dataString = JSON.stringify(i) | |
74 | - // uni.navigateTo({ | |
75 | - // url: 'subPackages/treePage/treeDetail?data=' + encodeURIComponent(dataString) | |
76 | - // }) | |
77 | - | |
78 | - | |
79 | - // uni.$tui.href(`/subPackages/treePage/treeInfo?data=${dataString}`) | |
80 | - | |
73 | + console.log(i) | |
74 | + console.log(i) | |
81 | 75 | uni.navigateTo({ |
82 | 76 | url: `/subPackages/treePage/treeInfo`, |
83 | 77 | success: function(res) { | ... | ... |