curriculum.wxml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <view class="curriculum" style="height: {{vh}}px;">
  2. <van-search value="{{workName}}" placeholder="请输入作业名称" bind:change="goSearch" input-align="center" shape="round" left-icon="" use-action-slot use-right-icon-slot>
  3. <van-icon name="search" slot="right-icon" />
  4. <view slot="action" class="filter">
  5. <van-icon name="filter-o" size="18" bindtap="showFilter" />
  6. </view>
  7. </van-search>
  8. <view class="curr-content">
  9. <view class="curr-item">
  10. <view>
  11. 期号-作业名称
  12. </view>
  13. <view>
  14. 任务班级
  15. </view>
  16. </view>
  17. <scroll-view wx:if="{{workList.length>0}}" scroll-y="true" bindscrolltolower="scrolltolower">
  18. <view class="work-cell" wx:for="{{workList}}" catchtap="toWorkPushDetail" data-index="{{item.id}}">
  19. <view class="work-name">
  20. <text>{{item.homeworkNumber}}-{{item.homeworkName}}</text>
  21. </view>
  22. <view class="work-class">
  23. <text>{{item.classesNames}}</text>
  24. </view>
  25. </view>
  26. </scroll-view>
  27. <van-empty wx:else description="暂无已发布作业" />
  28. <view class="curr-btn">
  29. <van-button type="info" bindtap="onShowDialog" custom-style="width:600rpx;border-radius: 10px;">发布作业</van-button>
  30. </view>
  31. </view>
  32. </view>
  33. <van-dialog use-slot title="发布作业" show="{{ showDialog }}" showConfirmButton="{{false}}" bind:close="onCloseDialog">
  34. <view class="form-create">
  35. <van-field label="作业名称:" model:value="{{ formWorkName }}" placeholder="请输入作业名称" border="{{ true }}" />
  36. <zh-select placeholder="请选择" label="任务班级:" bind:change="selectChange" dataType="{{optionType}}" value="{{classIds}}" option="{{classList}}"></zh-select>
  37. <van-field label="作业要求:" type="" model:value="{{ formWorkDetail }}" placeholder="请输入作业要求" border="{{ true }}" />
  38. <van-cell bindtap="chooseUpload">
  39. <view slot='title' class="upload">
  40. <text>作业文件:</text>
  41. <view class="choose-upload" bindtap="chooseUpload">
  42. <van-icon name="back-top" wx:if="{{workPathName==''}}" />
  43. <text>{{workPathName==""? '点击上传':workPathName}}</text>
  44. </view>
  45. </view>
  46. </van-cell>
  47. <view class="btn-attr">
  48. <van-button type="warning" block custom-style="border-radius: 10px;height:30px;" bindtap="closeSubmit">取消</van-button>
  49. <van-button type="info" block custom-style="border-radius: 10px;height:30px;" bindtap="submitWork">确认</van-button>
  50. </view>
  51. </view>
  52. </van-dialog>
  53. <van-action-sheet show="{{ filterShow }}" title="全部搜索" bind:close="showFilter">
  54. <view class="filter-sheet">
  55. <van-cell-group>
  56. <van-cell title-width="100%">
  57. <view slot="title" class="time-content">
  58. <text class="title">发布时间:</text>
  59. <van-button size="mini" bindtap="onShowTimeAttr" data-active="{{true}}">{{startTime==""?'开始时间':module.getTime(startTime)}}</van-button>
  60. <text>——</text>
  61. <van-button size="mini" bindtap="onShowTimeAttr" data-active="{{false}}">{{endTime==""?'结束时间':module.getTime(endTime)}}</van-button>
  62. </view>
  63. </van-cell>
  64. <van-field label="作业名称:" model:value="{{ workName }}" placeholder="请输入作业名" border="{{ false }}" bind:change="onChange" border="{{true}}" />
  65. <van-cell title="期号:{{issue==''?'请选择期号':issue}}" is-link bindtap="onCloseIssus">
  66. <view slot="title" class="issus-content">
  67. <text class="title">发布时间:</text>
  68. <text class="title">发布时间:</text>
  69. </view>
  70. </van-cell>
  71. <van-cell title="学员班级" use-label-slot sticky="false">
  72. <scroll-view class="class-item-cell" slot="label" scroll-x>
  73. <view class="content">
  74. <view bindtap="onClassID" data-id="{{item.id}}" class="cell {{item.id == filterClassId?'active':'' }}" wx:for="{{classList}}">{{item.className}}</view>
  75. </view>
  76. </scroll-view>
  77. </van-cell>
  78. </van-cell-group>
  79. <view class="btn-attr">
  80. <van-button type="warning" block custom-style="border-radius: 10px;height:40px;" bindtap="reSetData">重置</van-button>
  81. <van-button type="info" block custom-style="border-radius: 10px;height:40px;" bindtap="onSearchFilter">确认</van-button>
  82. </view>
  83. </view>
  84. </van-action-sheet>
  85. <van-popup show="{{ showTimeAttr }}" position="bottom" bind:close="onCloseTimeAttr">
  86. <van-datetime-picker title="开始时间" wx:if="{{timeType}}" type="date" value="{{ timeArrStart }}" min-date="{{ minDate }}" bind:input="startTimeChange" bind:cancel="onCloseTimeAttr" bind:confirm="onTimeAttr" />
  87. <van-datetime-picker title="结束时间" type="date" wx:else value="{{ timeArrEnd }}" min-date="{{ minDate }}" bind:input="endTimeChange" bind:cancel="onCloseTimeAttr" bind:confirm="onTimeAttr" />
  88. </van-popup>
  89. <van-popup show="{{showIssus}}" position="bottom">
  90. <van-picker columns="{{ AllWorkList }}" default-index="{{0}}" value-key="homeworkNumber" bind:change="onIssusChange" bind:cancel="onCloseIssus" bind:confirm="onIssus" show-toolbar />
  91. </van-popup>
  92. <wxs src="../../utils/getTime.wxs" module="module" />