riku
2024-11-07 5a678cce1b157411f20fbddfaed49c7bc8d9fba7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<view class="page">
  <view class="page-header">
    <view class="flex-center">
      <t-button
        wx:if="{{!showNewStatus}}"
        icon="add"
        theme="primary"
        size="small"
        bind:tap="onAddStatus"
        >添加设备状态</t-button
      >
    </view>
    <t-form
      wx:if="{{showNewStatus}}"
      formArr="{{formArray}}"
      bind:submit="saveNewStatus"
      bind:cancel="cancelNewStatus"
    >
      <t-input
        label="设备位置"
        placeholder="请输入设备位置"
        value="{{locations.address}}"
        bind:change="handleLocation"
      >
        <t-button slot="suffix" theme="primary" size="extra-small" bindtap="chooseLocation">
          地图定位
        </t-button>
      </t-input>
      <t-cell title="现场图片">
        <t-upload
          slot="description"
          media-type="{{['image']}}"
          files="{{fileList}}"
          gridConfig="{{gridConfig}}"
          max="{{3}}"
          files="{{fileList}}"
          size-limit="{{sizeLimit}}"
          bind:add="handleAddImg"
          bind:remove="handleRemoveImg"
        />
      </t-cell>
    </t-form>
  </view>
  <t-divider />
  <view class="page-container">
    <block wx:for="{{deviceStatusList}}">
      <device-location
        index="{{index + 1}}"
        read-only="{{true}}"
        location="{{item}}"
      ></device-location>
    </block>
  </view>
  <view class="page-footer"></view>
</view>