taskDetails.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. <template>
  2. <view class="page_body">
  3. <!-- 头部 -->
  4. <nav-bar height="96" title="任务详情" :onlyTitle="true" :showHeaderborder="true" @GoBack="GoBack"></nav-bar>
  5. <view class="page_content padding_btm">
  6. <view class="task_title">期中考试集体研讨会的通知期中考试集体研讨会的通知</view>
  7. <view class="task_class_collect">
  8. <view class="task_class_name">
  9. <text class="class_item">必修任务</text>
  10. <text class="class_item">课堂观摩</text>
  11. <text class="class_item">教务处</text>
  12. </view>
  13. <view class="task_collect">
  14. <view class="preview">
  15. <image class="img" src="@/static/image/icon/preview.png"></image>
  16. <text class="text">2761</text>
  17. </view>
  18. <view class="collect">
  19. <image class="img" src="@/static/image/icon/collect.png"></image>
  20. <text class="text">2761</text>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="task_time">
  25. <view class="time_day">
  26. <text class="time_item">2025-02-02</text>
  27. <text class="time_item">至</text>
  28. <text class="time_item">2025-02-02</text>
  29. <text class="time_item">剩余3天</text>
  30. </view>
  31. <view class="task_status finished">进行中</view>
  32. </view>
  33. <view class="task_desc">
  34. 课程简介:文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案
  35. </view>
  36. <view class="expand_btn"><text class="expand_text">展开</text><uni-icons class="expand_icon" type="down"></uni-icons></view>
  37. </view>
  38. <view class="row_gap"></view>
  39. <!-- 吸顶 -->
  40. <uv-sticky style="top:98rpx">
  41. <!-- 搜索框 -->
  42. <uni-easyinput class="search_box" v-model="state.searchWord" trim="all" :styles="state.searchInputStyles"
  43. :placeholderStyle="state.searchInputPlaceholderStyle" placeholder="请输入关键字搜索" @input="HandleSearchInput">
  44. <template #left>
  45. <image src="/static/image/overview/search.png" class="search_icon"></image>
  46. </template>
  47. </uni-easyinput>
  48. <scroll-view class="scroll_tabs" scroll-x="true" scroll-left="0" :show-scrollbar="false">
  49. <view :class="['tab_item',{'selected':item.value==state.tabsSelected}]" v-for="item in state.tabList" :key="item.value" @click="SelectTabsValue(item.value)">
  50. {{item.label}}
  51. </view>
  52. </scroll-view>
  53. </uv-sticky>
  54. <view class="page_content">
  55. <view class="total">共 230 人</view>
  56. <view class="list_item">
  57. <view class="created_progress_status">
  58. <text class="created_by">刘惟安</text>
  59. <view class="item_progress">
  60. <view class="progress_bar">
  61. <view class="bar_width" style="width: 49%;"></view>
  62. </view>
  63. <view class="progress_label">80%</view>
  64. </view>
  65. <view class="item_status await">待完成</view>
  66. </view>
  67. <view class="item_time">
  68. <text class="time">开始时间:2025-11-01</text>
  69. <text class="time">结束时间:2025-11-04</text>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. </template>
  75. <script setup>
  76. import uniEasyinput from '@/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue';
  77. import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue';
  78. import uvSticky from '@/uni_modules/uv-sticky/components/uv-sticky/uv-sticky.vue';//吸顶
  79. import navBar from '@/components/nav-bar.vue';
  80. import { selectCourseDetail,addQuestionAnswerData } from '@/reqApi/teacherStudy.js';
  81. import {
  82. onLoad
  83. } from '@dcloudio/uni-app';
  84. import {
  85. reactive,
  86. ref
  87. } from 'vue';
  88. const state = reactive({
  89. id: '', //任务id
  90. searchInputStyles: { //搜素框样式
  91. borderColor: '#DCDFE6',
  92. color: '#333333'
  93. },
  94. searchInputPlaceholderStyle: 'color: #C0C4CC;fontSize: 28rpx' ,//搜素框样式
  95. tabsSelected:'0',
  96. tabList:[{
  97. label:'全部',
  98. value:'0'
  99. },{
  100. label:'待完成',
  101. value:'1'
  102. },{
  103. label:'已完成',
  104. value:'2'
  105. }]
  106. });
  107. onLoad((option) => {
  108. state.id = option.id;
  109. })
  110. //返回
  111. const GoBack = () => {
  112. uni.navigateBack({
  113. delta: 1
  114. });
  115. }
  116. </script>
  117. <style scoped lang="scss">
  118. .page_content {
  119. &.padding_btm{
  120. padding-bottom: 24rpx;
  121. .task_title{
  122. font-weight: 500;
  123. font-size: 32rpx;
  124. color: #333333;
  125. margin-top: 24rpx;
  126. }
  127. .task_class_collect{
  128. display: flex;
  129. align-items: flex-start;
  130. width: 100%;
  131. margin-top: 16rpx;
  132. .task_class_name{
  133. display: inline-flex;
  134. align-items: center;
  135. flex-wrap: wrap;
  136. flex: 1;
  137. gap: 16rpx;
  138. .class_item{
  139. font-weight: 400;
  140. font-size: 24rpx;
  141. color: #999999;
  142. }
  143. }
  144. .task_collect{
  145. display: inline-flex;
  146. gap: 40rpx;
  147. .preview,.collect{
  148. display: inline-flex;
  149. align-items: center;
  150. }
  151. .img{
  152. width: 24rpx;
  153. height: 24rpx;
  154. margin-right: 12rpx;
  155. }
  156. .text{
  157. font-weight: 400;
  158. font-size: 24rpx;
  159. color: #999999;
  160. }
  161. }
  162. }
  163. .task_time{
  164. display: flex;
  165. align-items: flex-start;
  166. width: 100%;
  167. margin-top: 16rpx;
  168. .time_day{
  169. display: inline-flex;
  170. align-items: center;
  171. flex-wrap: wrap;
  172. flex: 1;
  173. .time_item{
  174. font-weight: 400;
  175. font-size: 24rpx;
  176. line-height: 48rpx;
  177. color: #999999;
  178. &:nth-child(2){
  179. margin: 0 8rpx;
  180. }
  181. &:nth-child(4){
  182. color: #2E64FA;
  183. margin-left: 16rpx;
  184. }
  185. }
  186. }
  187. .task_status{
  188. display: inline-flex;
  189. align-items: center;
  190. height: 48rpx;
  191. padding: 0 12rpx;
  192. border-radius: 8rpx;
  193. font-weight: 400;
  194. font-size: 24rpx;
  195. &.going{
  196. background: rgba(43,198,68,0.1);
  197. color: #2BC644;
  198. }
  199. &.finished{
  200. background: rgba(245,108,108,0.1);
  201. color: #F56C6C;
  202. }
  203. }
  204. }
  205. .task_desc{
  206. margin-top: 24rpx;
  207. display: flex;
  208. width: 100%;
  209. padding-top: 24rpx;
  210. border-top: 2rpx solid #F3F3F3;
  211. font-weight: 400;
  212. font-size: 28rpx;
  213. color: #999999;
  214. line-height: 44rpx;
  215. max-height: 168rpx;
  216. box-sizing: border-box;
  217. overflow: hidden;
  218. transition: all 0.25s;
  219. display: -webkit-box;
  220. -webkit-line-clamp: 3;
  221. -webkit-box-orient: vertical;
  222. position: relative;
  223. }
  224. .expand_btn{
  225. width: 100%;
  226. height: 40rpx;
  227. background-color: #FFFFFF;
  228. display: flex;
  229. justify-content: flex-end;
  230. align-items: center;
  231. .expand_text{
  232. font-weight: 400;
  233. font-size: 28rpx;
  234. color: #2E64FA;
  235. margin-right: 8rpx;
  236. }
  237. .expand_icon{
  238. font-size: 32rpx !important;
  239. color: #2E64FA !important;
  240. }
  241. }
  242. }
  243. }
  244. .row_gap{
  245. background-color: #F8F9FD;
  246. width: 100%;
  247. height: 24rpx;
  248. }
  249. :deep(.search_box) {
  250. display: flex;
  251. align-items: center;
  252. box-sizing: border-box;
  253. width: 100%;
  254. padding: 24rpx;
  255. box-sizing: border-box;
  256. background-color: #FFFFFF;
  257. .is-input-border{
  258. border-radius: 8rpx;
  259. border: 2rpx solid #DCDFE6;
  260. border-color: #DCDFE6 !important;
  261. }
  262. .search_icon {
  263. width: 32rpx;
  264. height: 32rpx;
  265. margin-left:24rpx;
  266. }
  267. .uni-easyinput__content-input {
  268. padding-left: 8rpx !important;
  269. font-size: 28rpx;
  270. color: #333333;
  271. height: 72rpx;
  272. }
  273. }
  274. .scroll_tabs{
  275. padding-bottom: 24rpx;
  276. background-color: #FFFFFF;
  277. }
  278. .total{
  279. width: 100%;
  280. display: flex;
  281. font-weight: 400;
  282. font-size: 28rpx;
  283. color: #333333;
  284. padding-bottom: 24rpx;
  285. border-bottom: 2rpx solid #F3F3F3;
  286. }
  287. .list_item{
  288. display: flex;
  289. flex-direction: column;
  290. width: 100%;
  291. padding: 24rpx 0;
  292. border-bottom: 2rpx solid #F3F3F3;
  293. .created_progress_status{
  294. display: flex;
  295. width: 100%;
  296. justify-content: space-between;
  297. align-items: center;
  298. .created_by{
  299. flex:1;
  300. font-weight: 500;
  301. font-size: 32rpx;
  302. color: #333333;
  303. }
  304. .item_progress{
  305. display: inline-flex;
  306. align-items: center;
  307. width: 308rpx;
  308. .progress_bar{
  309. width: 200rpx;
  310. height: 12rpx;
  311. background-color: #E2E6F0;
  312. border-radius: 14rpx;
  313. position: relative;
  314. .bar_width{
  315. position: absolute;
  316. left:0;
  317. top:0;
  318. height: 12rpx;
  319. background-color: #2E64FA;
  320. border-radius: 14rpx;
  321. }
  322. }
  323. .progress_label{
  324. flex: 1;
  325. margin-left: 24rpx;
  326. font-weight: 400;
  327. font-size: 32rpx;
  328. color: #666666;
  329. }
  330. }
  331. .item_status{
  332. display: inline-flex;
  333. align-items: center;
  334. justify-content: center;
  335. width: 96rpx;
  336. height: 48rpx;
  337. border-radius: 8rpx;
  338. font-weight: 400;
  339. font-size: 24rpx;
  340. margin-left: 68rpx;
  341. &.await{
  342. background-color: rgba(46,100,250,0.1);
  343. color: #2E64FA;
  344. }
  345. &.finish{
  346. background-color: rgba(43,198,68,0.1);
  347. color: #2BC644;
  348. }
  349. }
  350. }
  351. .item_time{
  352. display: flex;
  353. width: 100%;
  354. align-items: center;
  355. flex-wrap: wrap;
  356. gap:16rpx;
  357. margin-top: 18rpx;
  358. .time{
  359. font-weight: 400;
  360. font-size: 24rpx;
  361. color: #999999;
  362. }
  363. }
  364. }
  365. </style>