water_xcx/pages/p-task/p-task.wxml

264 lines
11 KiB
Plaintext
Raw Permalink Normal View History

2025-04-15 15:44:51 +08:00
<!--pages/p-task/p-task.wxml-->
<view class="container">
<t-tabs defaultValue="{{0}}"
bind:change="onTabsChange"
bind:click="onTabsClick"
t-class="custom-tabs"
sticky>
<t-tab-panel class="tab1" label="运行参数" value="0" customStyle="{{tabPanelCustomStyle}}">
<base />
<view class="pannel-item last">
<t-cell
title="选择日期"
hover
note="{{dateText || ''}}"
arrow
data-mode="date"
bindtap="showPicker"
class="test"
t-class="pannel-item"
/>
<!-- 年月日 -->
<t-date-time-picker
title="选择日期"
visible="{{dateVisible}}"
mode="date"
defaultValue="{{date}}"
format="YYYY-MM-DD"
bindchange="onConfirm"
bindpick="onColumnChange"
bindcancel="hidePicker"
start="{{start}}"
end="{{end}}"
/>
</view>
<view class="pannel-item last" >
<t-cell class="block" title="选择传感器" arrow hover note="{{dataKeyText}}" bind:click="onPicker" data-filed="dataKey"/>
<t-picker
visible="{{dataKeyVisible}}"
value="{{dataKeyValue}}"
data-key="dataKey"
title="选择传感器"
cancelBtn="取消"
confirmBtn="确认"
bindchange="onPickerChange"
bindpick="onColumnChange"
bindcancel="onPickerCancel"
>
<t-picker-item options="{{sensorData}}"></t-picker-item>
</t-picker>
</view>
<view class="form">
<view class="form-head">曲线图</view>
<view class="canvas">
<ec-canvas force-use-old-canvas="true" id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec }}"></ec-canvas>
</view>
</view>
<view class="form">
<view class="form-head">数据表</view>
<view class="table">
<view class="tr bg-w">
<view class="th ">日期</view>
<view class="th">数据</view>
<view class="th">描述</view>
</view>
<scroll-view scroll-y type="custom" class="tbody"
scroll-into-view="{{who}}"
bindscrolltoupper="bindtopScroll"
bindscrolltolower="bindnextScroll">
<block wx:for="{{historyData}}">
<view class="tr" id="item{{item[2]}}">
<view class="td">{{item[0]}}</view>
<view class="td">{{item[1]}}</view>
<view class="td">{{sensorInfo.unit}}</view>
</view>
</block>
</scroll-view>
</view>
</view>
</t-tab-panel>
<t-tab-panel label="设备情况" value="1" customStyle="{{tabPanelCustomStyle}}">
<scroll-view style="height: 100vh" scroll-y="true">
<view>
<t-search bind:action-click="search" bind:change="getSearchKeywords" placeholder="搜索传感器" action="搜索" />
</view>
<view class="s-task-list" >
<view class="s-task-item" wx:if="{{state != ''}}" wx:for="{{state}}" wx:if="{{item.readWrite != '只读'}}">
<view class="l-task-item">
<image class="square" src="{{item.img == '' || item.img == null ? '../../assets/site.png' : fileUrl + item.img}}" alt=""/>
<text style="display: block;">{{item.name}}</text>
</view>
<t-tag variant="light" theme="success">{{item.dataValue}}</t-tag>
<t-tag wx:if="{{item.readWrite != '只读'}}" bind:tap="handlePopup" data-unit="{{item.unit}}" data-convertflag="{{item.convertFlag}}" data-key="{{item.dataKey}}" style="margin-top: 60rpx;" variant="light" theme="warning">控制</t-tag>
</view>
<view class="s-task-item" wx:if="{{state != ''}}" wx:for="{{state}}" wx:if="{{item.readWrite == '只读'}}">
<view class="l-task-item">
<image class="square" src="{{item.img == '' || item.img == null ? '../../assets/site.png' : fileUrl + item.img}}" alt=""/>
<text style="display: block;">{{item.name}}</text>
</view>
<t-tag variant="light" theme="success">{{item.dataValue}}</t-tag>
</view>
<view class="s-task-null" wx:if="{{state == ''}}">
<text>暂无数据!</text>
</view>
<view class="tag-navigation">
<t-button theme="primary" bindtap="prev" variant="outline" size="small" disabled="{{page <= 1 ? true : false}}">上一页</t-button>
<t-button theme="primary" bindtap="next" variant="outline" size="small" disabled="{{page >= siteTotal ? true : false}}">下一页</t-button>
</view>
</view>
</scroll-view>
</t-tab-panel>
<t-tab-panel label="基本信息" value="2" customStyle="{{tabPanelCustomStyle}}">
<view class="task-line"></view>
<view class="h-task">
<view class="task-list">
<view class="task-item" bindtap="getCenterLocation">
<view class="l-task">
<image src="../../assets/task_icon01.png" />
<text>站点位置</text>
</view>
<view class="r-task">
<text>{{details.townName}}/{{details.community}}</text>
<t-icon name="chevron-right" size="40rpx" data-name="chevron-right" />
</view>
</view>
<view class="task-item" bindtap="getCenterLocation">
<view class="l-task">
<image src="../../assets/task_icon02.png" />
<text>站点坐标</text>
</view>
<view class="r-task">
<text>[{{details.longitude}},{{details.latitude}}]</text>
<t-icon name="chevron-right" size="40rpx" data-name="chevron-right" />
</view>
</view>
<view class="task-item">
<view class="l-task">
<image src="../../assets/task_icon03.png" />
<text>站点类型</text>
</view>
<view class="r-task">
<text>{{details.type}}</text>
</view>
</view>
</view>
</view>
<view class="task-line"></view>
<view class="task-content">
<view class="c-task-head">
<text>站点状态</text>
<t-tag variant="light" wx:if="{{details.status == 1}}" theme="success">在线</t-tag>
<t-tag variant="light" wx:else theme="danger">离线</t-tag>
</view>
<!-- <view class="task-item">
<view class="l-task">
<text>站点类型</text>
</view>
<view class="r-task">
<text>{{details.type}}</text>
<t-icon name="chevron-right" size="40rpx" data-name="chevron-right" bind:click="onIconTap" />
</view>
</view> -->
<view class="task-item">
<text>处理规模</text>
<text>{{details.technology}}/{{details.specifications}}</text>
</view>
<!-- <view class="task-item">
<text>设备厂家</text>
<text>{{details.technology}}</text>
</view> -->
<view class="task-item">
<text>运行日期</text>
<text>{{details.onlineTime}}</text>
</view>
<!-- <view class="task-item">
<text>网关编号</text>
<text>{{details.technology}}</text>
</view>
<view class="task-item">
<text>电表编号</text>
<text>{{details.technology}}</text>
</view> -->
</view>
<view class="task-line"></view>
<view class="p-task">
<view class="task-item">
<text>负责人</text>
<view class="c-task-item">
<t-icon name="user" size="36rpx" data-name="user" bind:click="onIconTap" />
<text>{{details.leader}}</text>
</view>
<view class="r-task-item">
<t-icon name="call" size="36rpx" data-name="call" bind:click="onIconTap" />
<text>{{details.contact}}</text>
</view>
</view>
<!-- <view class="task-item">
<text>维修负责人</text>
<view class="c-task-item">
<t-icon name="user" size="36rpx" data-name="user" bind:click="onIconTap" />
<text>戴佳</text>
</view>
<view class="r-task-item">
<t-icon name="call" size="36rpx" data-name="call" bind:click="onIconTap" />
<text>15232142312</text>
</view>
</view> -->
</view>
<view class="task-line"></view>
<view class="u-task">
<text class="u-task-head">站点公示牌</text>
<!-- <button bindtap="chooseImage">选择图片</button> -->
<t-upload
mediaType="{{['video','image']}}"
max="{{1}}"
files="{{fileList}}"
bind:add="handleAdd"
bind:remove="handleRemove"
></t-upload>
</view>
</t-tab-panel>
<t-tab-panel label="告警信息" value="3" customStyle="{{tabPanelCustomStyle}}">
<view class="query-list">
<view class="query-item" wx:if="{{alarmData != ''}}" wx:for="{{alarmData}}">
<view class="query-head">
<text>{{item.device.name}}</text>
<t-tag variant="light" theme="danger">{{item.alarmLevel}}</t-tag>
</view>
<view class="query-time">{{item.alarmTime}}</view>
<view class="t-query-content">
<text>告警内容:{{item.alarmContent}}</text>
</view>
<view class="t-query-base">
<text>处理人:</text>
<text>{{item.handlerName}}</text>
<t-tag variant="light" bindtap="toTask" data-id="{{item.alarmRecordId}}" data-name="{{item.deviceName}}" data-code="{{item.deviceCode}}" theme="primary">转任务</t-tag>
</view>
</view>
<view class="query-item-null" wx:if="{{alarmData == ''}}">
<text>暂无数据!</text>
</view>
</view>
</t-tab-panel>
</t-tabs>
<t-popup visible="{{visible}}" bind:visible-change="onVisibleChange" placement="bottom">
<view class="block">
<view class="header">
<view class="btn btn--cancel" bindtap="cancellation" aria-role="button">取消</view>
<view class="title">下发数据</view>
<view class="btn btn--confirm" bindtap="Distribute" aria-role="button">确定</view>
</view>
<view class="body">
<t-radio-group wx:if="{{is_text == false}}" t-class="horizontal-box" value="{{dataValue}}" bind:change="onChangeDistribute">
<view wx:for="{{distributeData}}" class="card {{dataValue == item.value ? 'card--active' : ''}}">
<t-icon wx:if="{{dataValue == item.value}}" name="check" t-class="card__icon" />
<t-radio value="{{item.value}}" label="{{item.label}}" icon="none" borderless />
</view>
</t-radio-group>
<t-input wx:if="{{is_text == true}}" label="数据下发" type="number" bindchange="getDataValue" value="{{dataValue}}" placeholder="请输入数值"></t-input>
</view>
</view>
</t-popup>
</view>