123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <!-- 数据种类选择标题 -->
- <view class="picker-title">数据集种类:</view>
- <!-- 数据种类选择下拉框 -->
- <picker mode="selector" range="{{types}}" range-key="display" bindchange="onTypeChange">
- <view class="picker-container">
- <view class="picker">
- {{currentType === '' ? '请选择' : (currentType === 'reduce' ? '降酸模型' : '反酸模型')}}
- </view>
- <view class="picker-arrow"></view> <!-- 三角形样式 -->
- </view>
- </picker>
- <!-- 滚动区域 -->
- <scroll-view class="table-container" scroll-x="true" scroll-with-animation="true">
- <!-- 数据加载中 -->
- <view wx:if="{{loading}}" class="loading">数据加载中,请稍候...</view>
- <!-- 无数据提示 -->
- <view wx:if="{{!loading && filteredRows.length === 0 && currentType != ''}}" class="no-data">暂无数据</view>
- <!-- 表格 -->
- <view wx:if="{{filteredRows.length != 0}}"
- class="table-body">
- <view class="table-header">
- <!-- 添加单选框 -->
- <view class="table-cell"></view>
- <view class="table-cell" wx:for="{{tableHeaders}}" wx:key="index">{{item}}</view>
- </view>
- <block wx:for="{{filteredRows}}" wx:key="index">
- <view class="table-row" bindtap="onRowClick" data-index="{{index}}">
- <!-- 单选框列 -->
- <view class="table-cell">
- <radio
- value="{{index}}" checked="{{currentRow && currentRow.index === index}}"
- class="{{currentRow && currentRow.index === index ? 'radio-checked' : 'radio-unchecked'}}"
- />
- </view>
- <!-- 数据列 -->
- <view class="table-cell">{{item.name}}</view>
- <view class="table-cell">{{item.count}}</view>
- <view class="table-cell">{{item.uploadTime}}</view>
- </view>
- </block>
- </view>
- </scroll-view>
- <view class="button-container">
- <button bindtap="trainModel">训练</button>
- </view>
|