riku
2026-04-02 3282e95db0207ee133d1e98d9771dec9d83b0fc4
pages/inspection/scene/info/devicelist.wxml
@@ -1,3 +1,6 @@
<wxs src="../util.wxs" module="_" />
<view class="device-summary">{{deviceSummary}}</view>
<view class="side-bar-wrapper">
  <t-side-bar value="{{sideBarIndex}}" bind:change="onSideBarChange">
    <t-side-bar-item
@@ -20,13 +23,71 @@
      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> -->
          <span>设备清单</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="{{_.updateTimeStyle(device._diffMonth) + ' 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"