riku
2024-11-07 5a678cce1b157411f20fbddfaed49c7bc8d9fba7
pages/inspection/scene/info/devicelist.wxml
@@ -20,13 +20,73 @@
      show-scrollbar="{{false}}"
    >
      <block wx:if="{{item.items.length > 0}}">
        <view class="title">
          <view>{{item.title || item.label}}</view>
        <view class="title flex-h">
          <span>{{item.title || item.label}}</span>
          <t-button
            t-class="side-btn"
            theme="primary"
            icon="add"
            content="添加"
            size="extra-small"
            data-type="{{item.type}}"
            bind:tap="addNewDevice"
          ></t-button>
        </view>
        <block wx:for="{{item.items}}" wx:key="index1" wx:for-item="device" wx:for-index="index1">
          <view class="scene__item" >
            <view class="flex-h" style="align-items: flex-start">
              <view class="scene__item-name">{{device._name}} </view>
              <view>
                <t-tag
                  max-width="{{130}}"
                  shape="square"
                  size="small"
                  theme="success"
                  variant="light-outline"
                  >{{device._type}}</t-tag
                >
              </view>
            </view>
            <view class="flex-h">
              <view class="scene__item-abstract">编号:{{device._deviceCode ? device._deviceCode : '未填写'}} </view>
              <!-- <view class="scene__item-abstract">{{device._runningStatus}} </view> -->
              <t-tag
                  max-width="{{130}}"
                  shape="square"
                  size="small"
                  theme="info"
                  variant="outline"
                  >{{device._runningStatus}}</t-tag
                >
            </view>
            <view class="scene__item-abstract">更新时间:{{device._updateTime}} </view>
            <t-divider />
            <view class="scene__item-tag__wrap flex-h">
              <t-button
                block
                theme="light"
                content="设备信息"
                size="extra-small"
                data-type="{{item.type}}"
                data-index="{{[index, index1]}}"
                bind:tap="updateDevice"
              ></t-button>
              <t-button
                block
                theme="light"
                content="状态变更"
                size="extra-small"
                data-type="{{item.type}}"
                data-index="{{[index, index1]}}"
                bind:tap="updateStatus"
              ></t-button>
            </view>
          </view>
        </block>
      </block>
      <block wx:else>
        <t-empty-page description="{{'暂无' + item.label + '信息'}}" />
        <view style="display: flex; justify-content: space-between">
        <view class="flex-h">
          <t-button
            theme="primary"
            icon="add"