ModelTrain.wxml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <!-- 数据种类选择标题 -->
  2. <view class="picker-title">数据集种类:</view>
  3. <!-- 数据种类选择下拉框 -->
  4. <picker mode="selector" range="{{types}}" range-key="display" bindchange="onTypeChange">
  5. <view class="picker-container">
  6. <view class="picker">
  7. {{currentType === '' ? '请选择' : (currentType === 'reduce' ? '降酸模型' : '反酸模型')}}
  8. </view>
  9. <view class="picker-arrow"></view> <!-- 三角形样式 -->
  10. </view>
  11. </picker>
  12. <!-- 滚动区域 -->
  13. <scroll-view class="table-container" scroll-x="true" scroll-with-animation="true">
  14. <!-- 数据加载中 -->
  15. <view wx:if="{{loading}}" class="loading">数据加载中,请稍候...</view>
  16. <!-- 无数据提示 -->
  17. <view wx:if="{{!loading && filteredRows.length === 0 && currentType != ''}}" class="no-data">暂无数据</view>
  18. <!-- 表格 -->
  19. <view wx:if="{{filteredRows.length != 0}}"
  20. class="table-body">
  21. <view class="table-header">
  22. <!-- 添加单选框 -->
  23. <view class="table-cell"></view>
  24. <view class="table-cell" wx:for="{{tableHeaders}}" wx:key="index">{{item}}</view>
  25. </view>
  26. <block wx:for="{{filteredRows}}" wx:key="index">
  27. <view class="table-row" bindtap="onRowClick" data-index="{{index}}">
  28. <!-- 单选框列 -->
  29. <view class="table-cell">
  30. <radio
  31. value="{{index}}" checked="{{currentRow && currentRow.index === index}}"
  32. class="{{currentRow && currentRow.index === index ? 'radio-checked' : 'radio-unchecked'}}"
  33. />
  34. </view>
  35. <!-- 数据列 -->
  36. <view class="table-cell">{{item.name}}</view>
  37. <view class="table-cell">{{item.count}}</view>
  38. <view class="table-cell">{{item.uploadTime}}</view>
  39. </view>
  40. </block>
  41. </view>
  42. </scroll-view>
  43. <view class="button-container">
  44. <button bindtap="trainModel">训练</button>
  45. </view>