xlTask.vue 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517
  1. <template>
  2. <view class="container">
  3. <!-- 搜索+筛选栏 -->
  4. <view class="top-box">
  5. <view class="input-item">
  6. <image class="icon search-icon" src="/static/image/search.png" mode="widthFix"></image>
  7. <input placeholder="请输入客户姓名/机构名称" placeholder-class="placeholder" />
  8. </view>
  9. <view class="filter-item" @click="showFilter = true">
  10. <image class="filter-icon" src="/static/image/icon_select.png" mode="widthFix"></image>
  11. <text>筛选</text>
  12. </view>
  13. </view>
  14. <!-- 顶部选项卡:任务列表/审核列表 -->
  15. <view class="top-tabs">
  16. <view class="top-tab-item" :class="{ active: currentTopTab === 'task' }" @click="switchTopTab('task')">
  17. 任务列表
  18. </view>
  19. <view class="top-tab-item" :class="{ active: currentTopTab === 'audit' }" @click="switchTopTab('audit')">
  20. 审核列表
  21. </view>
  22. </view>
  23. <!-- 动态子标签 -->
  24. <view class="sub-tabs">
  25. <view class="sub-tab-item" :class="{ active: currentSubTab === item.value }"
  26. @click="selectSubTab(item.value)" v-for="(item, index) in currentSubTabsList" :key="index">
  27. {{ item.label }}
  28. </view>
  29. </view>
  30. <!-- 列表内容 -->
  31. <scroll-view class="content" scroll-y @scrolltolower="loadMore" @refresherrefresh="refresh" refresher-enabled="true" refresher-threshold="80" refresher-default-style="black">
  32. <!-- 任务列表 -->
  33. <view v-if="currentTopTab === 'task'">
  34. <view class="task-card" v-for="(item, index) in currentList" :key="index" @click="goDetails(item)">
  35. <!-- 任务标题+状态 -->
  36. <view class="card-top">
  37. <text class="card-task-title">{{ item.taskName }}</text>
  38. <view class="status-tag" :class="item.statusClass">{{ item.statusText }}</view>
  39. </view>
  40. <view class="card-content">
  41. <!-- 讲者信息 -->
  42. <view class="speaker-info">
  43. <text class="speaker-name">{{ item.doctorName||'未命名' }}</text>
  44. <view class="level-tag" v-if="item.level">{{ item.level }}</view>
  45. </view>
  46. <!-- 医院+科室 -->
  47. <view class="org-info">
  48. <image class="org-icon" src="/static/image/icon_hospital.png" mode="widthFix"></image>
  49. <text>{{ item.deptName ||'-' }}</text>
  50. <view class="line"></view>
  51. <text>{{ item.deptName||'-' }}</text>
  52. </view>
  53. <!-- 标签组 -->
  54. <view class="card-tags">
  55. <view class="tag-left-group">
  56. <view class="tag-item video-tag" v-if="item.taskTypeName">
  57. <image class="video-tag-icon" src="/static/image/icon_longvideo.png" mode="widthFix">
  58. </image>
  59. <text>{{ item.taskTypeName ||'-'}}</text>
  60. </view>
  61. <view class="tag-item category-tag" v-if="item.taskTypeName">
  62. {{ item.taskTypeName }}
  63. </view>
  64. </view>
  65. <view class="tag-right-group">
  66. <view class="tag-item points-tag">{{ item.taskIntegral||'0' }}积分</view>
  67. <view class="tag-item count-tag">{{ item.taskCount ||'0' }}个</view>
  68. <view class="tag-item count-tag">院内</view>
  69. </view>
  70. </view>
  71. <!-- 时间信息 -->
  72. <view class="time-info">
  73. <view class="time-item">
  74. <text>申请时间:</text>
  75. <text>{{ item.createTime ||'-'}}</text>
  76. </view>
  77. <view class="time-item">
  78. <text>完成时间:</text>
  79. <text>{{ item.updateTime || '-' }}</text>
  80. </view>
  81. <view class="time-item">
  82. <text>完成审核:</text>
  83. <text>{{ item.auditStatus || '-' }}</text>
  84. </view>
  85. </view>
  86. <!-- 操作按钮 -->
  87. <view class="operate-btn-group">
  88. <view class="share-btn" @click="handleShare(item)">
  89. <image class="share-icon" src="/static/image/icon_share.png" mode="widthFix"></image>
  90. <text>分享</text>
  91. </view>
  92. <view class="btn-group">
  93. <view class="btn" v-if="item.showDelete" @click.stop="handleTaskDelete(item, index)">删除</view>
  94. <!-- @click.stop="handleCopy(item)" -->
  95. <view class="btn" @click.stop="copyTask(item.id)" >复制创建</view>
  96. </view>
  97. </view>
  98. <!-- 状态印章 -->
  99. <image class="status-seal" :src="item.sealImg" mode="widthFix">
  100. </image>
  101. </view>
  102. </view>
  103. </view>
  104. <!-- 审核列表 -->
  105. <view v-else>
  106. <view class="task-card" v-for="(item, index) in currentList" :key="index" @click="goDetails(item)">
  107. <!-- 任务标题+状态 -->
  108. <view class="card-top">
  109. <text class="card-task-title">{{ item.auditName || '未设置' }}</text>
  110. <view class="status-tag" :class="item.statusClass">{{ item.statusText }}</view>
  111. </view>
  112. <view class="card-content">
  113. <!-- 讲者信息 -->
  114. <view class="speaker-info">
  115. <text class="speaker-name">{{ item.businessData.taskInfo.doctorVO.doctorName||'未命名' }}</text>
  116. <view class="level-tag" v-if="item.businessData.taskInfo.doctorVO.jobTitle">{{ item.businessData.taskInfo.doctorVO.jobTitle }}</view>
  117. </view>
  118. <!-- 医院+科室 -->
  119. <view class="org-info">
  120. <image class="org-icon" src="/static/image/icon_hospital.png" mode="widthFix"></image>
  121. <text>{{ item.businessData.taskInfo.doctorVO.institution ||'-' }}</text>
  122. <view class="line"></view>
  123. <text>{{ item.businessData.taskInfo.doctorVO.department||'-' }}</text>
  124. </view>
  125. <!-- 标签组 -->
  126. <view class="card-tags">
  127. <view class="tag-left-group">
  128. <view class="tag-item video-tag" v-if="item.businessData.taskInfo.taskTypeName">
  129. <image class="video-tag-icon" src="/static/image/icon_longvideo.png" mode="widthFix">
  130. </image>
  131. <text>{{ item.businessData.taskInfo.taskTypeName ||'-'}}</text>
  132. </view>
  133. <view class="tag-item category-tag" v-if="item.businessData.taskInfo.taskTypeName">
  134. {{ item.businessData.taskInfo.taskTypeName }}
  135. </view>
  136. </view>
  137. <view class="tag-right-group">
  138. <view class="tag-item points-tag">{{ item.businessData.taskInfo.doctorVO.taskIntegral||'0' }}积分</view>
  139. <view class="tag-item count-tag">{{ item.businessData.taskInfo.doctorVO.taskCount ||'0' }}个</view>
  140. <view class="tag-item count-tag">院内</view>
  141. </view>
  142. </view>
  143. <!-- 时间信息 -->
  144. <view class="time-info">
  145. <view class="time-item">
  146. <text>申请时间:</text>
  147. <text>{{ item.businessData.taskInfo.createTime ||'-'}}</text>
  148. </view>
  149. </view>
  150. <!-- 操作按钮 -->
  151. <view class="operate-btn-group">
  152. <view class="share-btn" @click="handleShare(item)">
  153. <image class="share-icon" src="/static/image/icon_user.png" mode="widthFix"></image>
  154. <text>{{ item.initiatorName || '未命名' }}</text>
  155. </view>
  156. <view class="btn-group">
  157. <view class="btn" @click.stop="handleTaskDelete(item, index)">删除</view>
  158. <view class="btn" @click.stop="handleCopy(item)">编辑</view>
  159. </view>
  160. </view>
  161. <!-- 状态印章 -->
  162. <image class="status-seal" :src="item.sealImg" mode="widthFix">
  163. </image>
  164. </view>
  165. </view>
  166. </view>
  167. </scroll-view>
  168. <view class="side">
  169. <view class="side-item" >
  170. <image class="icon" @click="goCreate" src="/static/image/btn_add.png"></image>
  171. </view>
  172. <view class="side-item" >
  173. <image class="icon" @click="goData" src="/static/image/btn_data.png"></image>
  174. </view>
  175. </view>
  176. <!-- 筛选弹窗 -->
  177. <view class="filter-popup" v-if="showFilter" @click="closeFilter">
  178. <view class="filter-content" @click.stop>
  179. <view class="filter-header">
  180. <view class="filter-title">筛选</view>
  181. <image class="filter-close-btn" src="/static/image/icon_close.png" @click="closeFilter"
  182. mode="widthFix"></image>
  183. </view>
  184. <view class="filter-form">
  185. <!-- 任务申请时间 -->
  186. <view class="filter-section">
  187. <view class="section-label">任务申请时间</view>
  188. <view class="time-range">
  189. <view class="time-input" @click="openDatePicker('applyTimeStart')">{{ filters.applyTimeStart || '开始时间' }}</view>
  190. <view class="time-separator">-</view>
  191. <view class="time-input" @click="openDatePicker('applyTimeEnd')">{{ filters.applyTimeEnd || '结束时间' }}</view>
  192. </view>
  193. </view>
  194. <!-- 任务完成时间 -->
  195. <view class="filter-section" v-if="currentTopTab === 'audit'">
  196. <view class="section-label">任务完成时间</view>
  197. <view class="time-range">
  198. <view class="time-input" @click="openDatePicker('finishTimeStart')">{{ filters.finishTimeStart || '开始时间' }}</view>
  199. <view class="time-separator">-</view>
  200. <view class="time-input" @click="openDatePicker('finishTimeEnd')">{{ filters.finishTimeEnd || '结束时间' }}</view>
  201. </view>
  202. </view>
  203. <!-- 完成审核时间 -->
  204. <view class="filter-section" v-if="currentTopTab === 'audit'">
  205. <view class="section-label">完成审核时间</view>
  206. <view class="time-range">
  207. <view class="time-input" @click="openDatePicker('auditTimeStart')">{{ filters.auditTimeStart || '开始时间' }}</view>
  208. <view class="time-separator">-</view>
  209. <view class="time-input" @click="openDatePicker('auditTimeEnd')">{{ filters.auditTimeEnd || '结束时间' }}</view>
  210. </view>
  211. </view>
  212. <!-- 任务归属 -->
  213. <view class="filter-section">
  214. <view class="section-label">任务归属</view>
  215. <view class="btn-group">
  216. <view class="filter-btn" :class="{ active: filters.taskBelong === '' }"
  217. @click="filters.taskBelong = ''">我的任务</view>
  218. <!-- <view class="filter-btn" :class="{ active: filters.taskBelong === 'dept' }"
  219. @click="filters.taskBelong = 'dept'">部门任务</view> -->
  220. </view>
  221. </view>
  222. <!-- 完结状态 -->
  223. <view class="filter-section" v-if="currentTopTab === 'audit'">
  224. <view class="section-label">完结状态</view>
  225. <view class="btn-group">
  226. <view class="filter-btn" :class="{ active: filters.finishStatus === 'unfinished' }"
  227. @click="filters.finishStatus = 'unfinished'">未完结</view>
  228. <view class="filter-btn" :class="{ active: filters.finishStatus === 'finished' }"
  229. @click="filters.finishStatus = 'finished'">已完结</view>
  230. </view>
  231. </view>
  232. <!-- 归属类型 -->
  233. <view class="filter-section">
  234. <view class="section-label">归属类型</view>
  235. <view class="btn-group">
  236. <view v-for="item in taskBelong" :key="item.dictValue"
  237. class="filter-btn" :class="{ active: filters.belongType === item.dictValue }"
  238. @click="filters.belongType = item.dictValue">{{ item.dictLabel }}</view>
  239. </view>
  240. </view>
  241. </view>
  242. <view class="filter-actions">
  243. <view class="reset-btn" @click="resetFilters">重置</view>
  244. <view class="confirm-btn" @click="confirmFilters">确定</view>
  245. </view>
  246. </view>
  247. </view>
  248. <!-- 日期选择器 -->
  249. <u-datetime-picker
  250. :show="showDatePicker"
  251. :value="datePickerValue"
  252. mode="date"
  253. @confirm="datePickerConfirm"
  254. @cancel="datePickerCancel"
  255. ></u-datetime-picker>
  256. </view>
  257. </template>
  258. <script>
  259. import { dicts } from '@/api/common.js';
  260. import utils from '@/utils/common.js'
  261. // auditList
  262. import { list, deleted, company ,auditList,copy} from '@/api/task.js';
  263. import { getPendingAuditList } from '@/api/audit.js';
  264. export default {
  265. data() {
  266. return {
  267. showFilter: false,
  268. showDatePicker: false,
  269. currentDateField: '',
  270. datePickerValue: new Date().getTime(),
  271. processTemplate: null,
  272. companySettingsLoaded: false,
  273. isLoading: false,
  274. filters: {
  275. applyTimeStart: '',
  276. applyTimeEnd: '',
  277. finishTimeStart: '',
  278. finishTimeEnd: '',
  279. auditTimeStart: '',
  280. auditTimeEnd: '',
  281. taskBelong: '',
  282. finishStatus: '',
  283. belongType: ''
  284. },
  285. currentTopTab: 'task',
  286. currentSubTab: '',
  287. taskSubTabs: [
  288. { label: '全部任务', value: '' }
  289. ],
  290. auditSubTabs: [{
  291. label: '全部',
  292. value: ''
  293. }
  294. ],
  295. taskList: [],
  296. auditList: [],
  297. userInfo: {
  298. companyId: ''
  299. },taskStatus:{
  300. },
  301. taskBelong: [],
  302. taskType: [],
  303. taskAuditStatus: [],
  304. auditStatus: [],
  305. // 分页参数
  306. page: 1,
  307. pageSize: 20,
  308. hasMore: true,
  309. auditPage: 1,
  310. auditPageSize: 20,
  311. auditHasMore: true,
  312. // 加载状态
  313. isLoadingMore: false
  314. }
  315. },
  316. onLoad: async function(options) {
  317. // 先获取用户信息
  318. this.userInfo =uni.getStorageSync('userInfo') || '{}';
  319. // this.userInfo = JSON.parse(uni.getStorageSync('userInfo') || '{}');
  320. try {
  321. // 并行获取所有字典数据,提高性能
  322. const [taskBelongRes, taskTypeRes, processTemplateRes, taskAuditStatusRes] = await Promise.all([
  323. utils.getDicts("task_belong_type"),//任务归属
  324. utils.getDicts("task_type"),//任务类型
  325. utils.getDicts("FLOW_TEMPLATE"),//流程模板
  326. utils.getDicts("task_audit_status")//任务审核状态
  327. ]);
  328. this.taskBelong = taskBelongRes;
  329. this.taskType = taskTypeRes;
  330. this.processTemplate = processTemplateRes;
  331. this.taskAuditStatus = taskAuditStatusRes;
  332. console.log("task_audit_status", this.taskAuditStatus);
  333. // 构建审核子标签
  334. this.auditSubTabs = [{
  335. label: '全部',
  336. value: ''
  337. }];
  338. this.taskAuditStatus.forEach(item => {
  339. this.auditSubTabs.push({
  340. label: item.dictLabel,
  341. value: item.dictValue
  342. });
  343. });
  344. console.log('任务归属字典:', this.taskBelong);
  345. } catch (e) {
  346. console.log('获取字典数据失败:', e);
  347. }
  348. // 获取任务状态字典
  349. this.dicts();
  350. },
  351. computed: {
  352. currentSubTabsList() {
  353. return this.currentTopTab === 'task' ? this.taskSubTabs : this.auditSubTabs;
  354. },
  355. currentList() {
  356. return this.currentTopTab === 'task' ? this.taskList : this.auditList;
  357. }
  358. },
  359. mounted() {
  360. this.loadData();
  361. },
  362. methods: {
  363. //复制任务
  364. copyTask(id){
  365. console.log("复制",id);
  366. copy(id).then(res => {
  367. if (res.code === 200) {
  368. uni.showToast({
  369. title: '复制成功',
  370. icon: 'success'
  371. });
  372. this.loadData();
  373. } else {
  374. uni.showToast({
  375. title: res.msg || '复制失败',
  376. icon: 'none'
  377. });}})},
  378. //审批列表
  379. getAuditList() {
  380. // 构建请求参数
  381. const params = {
  382. userId: this.userInfo.userId,
  383. taskStatus: this.currentSubTab || '',
  384. status:'',
  385. companyId:this.userInfo.companyId,
  386. templateCode: this.templateCode||'',
  387. pageNum: this.auditPage,
  388. pageSize: this.auditPageSize,
  389. // 任务申请时间
  390. applyStartTime: this.filters.applyTimeStart || '',
  391. applyEndTime: this.filters.applyTimeEnd || '',
  392. // 任务完成时间
  393. taskFinishTimeStart: this.filters.finishTimeStart || '',
  394. taskFinishTimeEnd: this.filters.finishTimeEnd || '',
  395. // 任务完成审核时间
  396. finishAuditTimeStart: this.filters.auditTimeStart || '',
  397. finishAuditTimeEnd: this.filters.auditTimeEnd || '',
  398. // 完结状态
  399. finishStatus: this.filters.finishStatus === 'unfinished' ? 0 : this.filters.finishStatus === 'finished' ? 1 : ''
  400. };
  401. // 避免重复请求
  402. if (this.isLoading) return;
  403. this.isLoading = true;
  404. if (!this.isLoadingMore) {
  405. uni.showLoading({
  406. title: '加载中...'
  407. });
  408. }
  409. getPendingAuditList(params).then(res => {
  410. this.isLoading = false;
  411. this.isLoadingMore = false;
  412. uni.hideLoading();
  413. if (res.code === 200 && res.rows) {
  414. // 处理审核列表数据
  415. const newAuditList = res.rows.map(item => {
  416. // 从businessData.taskInfo中获取任务信息
  417. const taskInfo = item.businessData?.taskInfo || {};
  418. return {
  419. id: item.id,
  420. auditName: item.auditName,
  421. initiatorName: taskInfo.doctorName || item.initiatorName || '未知',
  422. createTime: item.createTime,
  423. statusText: this.getAuditStatusText(item.status),
  424. statusClass: this.getAuditStatusClass(item.status),
  425. doctorName: taskInfo.doctorName || item.initiatorName || '未知',
  426. initiatorId: item.initiatorId || '',
  427. sealImg: item.status === 1 ? '/static/image/img_finish.png' : '/static/image/img_unfinish.png',
  428. businessData: item.businessData || {},
  429. // 从taskInfo中获取其他需要的字段
  430. taskTitle: taskInfo.taskName || item.auditName,
  431. hospital: taskInfo.deptName || '-',
  432. department: taskInfo.deptName || '-',
  433. videoType: taskInfo.taskTypeName || '-',
  434. category: taskInfo.taskTypeName || '-',
  435. points: taskInfo.taskIntegral || 0,
  436. count: taskInfo.taskCount || 0,
  437. applyTime: item.createTime
  438. };
  439. });
  440. // 如果是加载更多,则追加数据
  441. if (this.isLoadingMore) {
  442. this.auditList = [...this.auditList, ...newAuditList];
  443. } else {
  444. // 否则替换数据
  445. this.auditList = newAuditList;
  446. }
  447. // 判断是否还有更多数据
  448. this.auditHasMore = res.rows.length === this.auditPageSize;
  449. console.log("审核列表数据",this.auditList);
  450. } else {
  451. // 如果是加载更多,则保持原有数据
  452. if (!this.isLoadingMore) {
  453. uni.showToast({
  454. title: '获取数据失败',
  455. icon: 'none'
  456. });
  457. }
  458. this.auditHasMore = false;
  459. }
  460. }).catch(err => {
  461. this.isLoading = false;
  462. this.isLoadingMore = false;
  463. uni.hideLoading();
  464. uni.showToast({
  465. title: '网络错误',
  466. icon: 'none'
  467. });
  468. });
  469. },
  470. dicts() {
  471. dicts('task_status').then(res => {
  472. if (res.code === 200 ) {
  473. console.log(res.data)
  474. this.taskStatus = res.data;
  475. this.taskSubTabs = [
  476. { label: '全部任务', value: '' }
  477. ];
  478. res.data.forEach(item => {
  479. this.taskSubTabs.push({
  480. label: item.dictLabel,
  481. value: item.dictValue
  482. });
  483. });
  484. console.log('更新后的taskSubTabs:', this.taskSubTabs);
  485. }
  486. });
  487. },
  488. loadData() {
  489. // 根据当前标签加载对应数据
  490. if (this.currentTopTab === 'task') {
  491. this.getTaskList();
  492. } else if (this.currentTopTab === 'audit') {
  493. this.getAuditList();
  494. }
  495. // 只在首次加载时获取公司项目设置
  496. if (!this.companySettingsLoaded) {
  497. this.getCompanySettings();
  498. this.companySettingsLoaded = true;
  499. }
  500. },
  501. // 下拉刷新
  502. refresh() {
  503. // 重置分页参数
  504. if (this.currentTopTab === 'task') {
  505. this.page = 1;
  506. this.hasMore = true;
  507. this.taskList = [];
  508. } else if (this.currentTopTab === 'audit') {
  509. this.auditPage = 1;
  510. this.auditHasMore = true;
  511. this.auditList = [];
  512. }
  513. // 重新加载数据
  514. this.loadData();
  515. },
  516. // 加载更多
  517. loadMore() {
  518. // 检查是否正在加载或没有更多数据
  519. if (this.isLoading || this.isLoadingMore) return;
  520. if (this.currentTopTab === 'task') {
  521. if (!this.hasMore) return;
  522. // 增加页码并加载更多
  523. this.page++;
  524. this.isLoadingMore = true;
  525. this.getTaskList();
  526. } else if (this.currentTopTab === 'audit') {
  527. if (!this.auditHasMore) return;
  528. // 增加页码并加载更多
  529. this.auditPage++;
  530. this.isLoadingMore = true;
  531. this.getAuditList();
  532. }
  533. },
  534. //任务列表
  535. getTaskList() {
  536. // 构建请求参数
  537. const params = {
  538. ...this.filters,
  539. type: this.currentTopTab,
  540. taskStatus: this.currentSubTab,
  541. page: this.page,
  542. pageSize: this.pageSize
  543. };
  544. // 避免重复请求
  545. if (this.isLoading) return;
  546. this.isLoading = true;
  547. if (!this.isLoadingMore) {
  548. uni.showLoading({
  549. title: '加载中...'
  550. });
  551. }
  552. list(params).then(res => {
  553. this.isLoading = false;
  554. this.isLoadingMore = false;
  555. uni.hideLoading();
  556. if (res.code === 200 && res.rows) {
  557. // 处理任务列表数据
  558. const newTaskList = res.rows.map(item => ({
  559. id: item.id,
  560. doctorName: item.doctorName,
  561. taskName: item.taskName,
  562. statusText: this.getStatusText(item.taskStatus),
  563. statusClass: this.getStatusClass(item.taskStatus),
  564. level: '', // 接口返回数据中没有level字段
  565. deptName: item.deptName, // 使用deptName作为deptName
  566. taskTypeName: item.taskTypeName,
  567. taskIntegral: item.taskIntegral,
  568. taskCount: item.taskCount,
  569. createTime: item.createTime,
  570. finishAuditTime: item.finishAuditTime || '-',
  571. auditStatus: this.getAuditStatusText(item.finishAuditStatus),
  572. showDelete: true,
  573. sealImg: item.taskStatus === 1 ? '/static/image/img_finish.png' : '/static/image/img_unfinish.png',
  574. finishAuditInstanceId: item.finishAuditInstanceId || '-',
  575. createAuditInstanceId: item.createAuditInstanceId || '-',
  576. }));
  577. // 如果是加载更多,则追加数据
  578. if (this.isLoadingMore) {
  579. this.taskList = [...this.taskList, ...newTaskList];
  580. } else {
  581. // 否则替换数据
  582. this.taskList = newTaskList;
  583. }
  584. // 判断是否还有更多数据
  585. this.hasMore = res.rows.length === this.pageSize;
  586. } else {
  587. // 如果是加载更多,则保持原有数据
  588. if (!this.isLoadingMore) {
  589. uni.showToast({
  590. title: '获取数据失败',
  591. icon: 'none'
  592. });
  593. }
  594. this.hasMore = false;
  595. }
  596. }).catch(err => {
  597. this.isLoading = false;
  598. this.isLoadingMore = false;
  599. uni.hideLoading();
  600. uni.showToast({
  601. icon: 'none',
  602. title: '网络错误'
  603. });
  604. });
  605. },
  606. getCompanySettings() {
  607. // 获取公司项目设置
  608. if (this.userInfo.companyId) {
  609. company(this.userInfo.companyId).then(res => {
  610. if (res.code === 200) {
  611. console.log('公司项目设置:', res.data);
  612. // 处理公司项目设置数据
  613. }
  614. }).catch(err => {
  615. console.error('获取公司项目设置失败:', err);
  616. });
  617. }
  618. },
  619. getStatusText(status) {
  620. // 根据状态获取状态文本
  621. const statusMap = {
  622. 0: '未完成',
  623. 1: '已完成'
  624. };
  625. return statusMap[status] || '未知状态';
  626. },
  627. getStatusClass(status) {
  628. // 根据状态获取状态样式类
  629. const statusMap = {
  630. 0: 'status-wait',
  631. 1: 'status-finish'
  632. };
  633. return statusMap[status] || 'status-wait';
  634. },
  635. getAuditStatusText(status) {
  636. // 根据审核状态获取状态文本
  637. const statusMap = {
  638. 0: '待审核',
  639. 1: '已通过',
  640. 2: '已驳回'
  641. };
  642. return statusMap[status] || '-';
  643. },
  644. getAuditStatusClass(status) {
  645. // 根据审核状态获取状态样式类
  646. const statusMap = {
  647. 0: 'status-wait',
  648. 1: 'status-finish',
  649. 2: 'status-rejected'
  650. };
  651. return statusMap[status] || 'status-wait';
  652. },
  653. getBusinessTypeLabel(businessType) {
  654. // 根据业务类型获取标签文本
  655. if (!businessType || !this.processTemplate) {
  656. return '未设置';
  657. }
  658. const dictItem = this.processTemplate.find(item => item.dictValue === businessType);
  659. return dictItem ? dictItem.dictLabel : businessType;
  660. },
  661. formatTime(time) {
  662. // 格式化时间
  663. if (!time) return '-';
  664. const date = new Date(time);
  665. const year = date.getFullYear();
  666. const month = String(date.getMonth() + 1).padStart(2, '0');
  667. const day = String(date.getDate()).padStart(2, '0');
  668. return `${year}-${month}-${day}`;
  669. },
  670. goCreate(){
  671. console.log('创建任务');
  672. uni.navigateTo({
  673. url: '/pages_task/createTask'
  674. })
  675. },
  676. goData(){
  677. console.log("跳转到数据页");
  678. uni.navigateTo({
  679. url: '/pages_task/statistics'
  680. })
  681. },
  682. goDetails(item) {
  683. console.log("跳转到任务详情页",item);
  684. // 直接跳转到任务详情页,传递id作为taskId参数
  685. let id = ''
  686. if(this.currentTopTab === 'task'){
  687. id = item.id
  688. }else if(this.currentTopTab === 'audit'){
  689. id = item.businessData.taskInfo.id
  690. }
  691. uni.navigateTo({
  692. url: `/pages_task/taskDetail?taskId=${item.createAuditInstanceId||item.businessData.taskInfo.createAuditInstanceId||''}&taskId2=${item.finishAuditInstanceId||item.businessData.taskInfo.finishAuditInstanceId||''}&id=${id||''}`
  693. });
  694. },
  695. selectSubTab(value) {
  696. this.currentSubTab = value;
  697. // 重置分页参数
  698. if (this.currentTopTab === 'task') {
  699. this.page = 1;
  700. this.hasMore = true;
  701. this.taskList = [];
  702. this.getTaskList();
  703. } else if (this.currentTopTab === 'audit') {
  704. this.auditPage = 1;
  705. this.auditHasMore = true;
  706. this.auditList = [];
  707. this.getAuditList();
  708. }
  709. },
  710. switchTopTab(type) {
  711. this.currentTopTab = type;
  712. this.currentSubTab = '';
  713. // 重置分页参数
  714. if (type === 'task') {
  715. this.page = 1;
  716. this.hasMore = true;
  717. this.taskList = [];
  718. this.getTaskList();
  719. } else if (type === 'audit') {
  720. this.auditPage = 1;
  721. this.auditHasMore = true;
  722. this.auditList = [];
  723. this.getAuditList();
  724. }
  725. },
  726. closeFilter() {
  727. this.showFilter = false
  728. },
  729. resetFilters() {
  730. this.filters = {
  731. applyTimeStart: '',
  732. applyTimeEnd: '',
  733. finishTimeStart: '',
  734. finishTimeEnd: '',
  735. auditTimeStart: '',
  736. auditTimeEnd: '',
  737. taskBelong: '',
  738. finishStatus: '',
  739. belongType: ''
  740. }
  741. },
  742. confirmFilters() {
  743. this.showFilter = false
  744. // 根据筛选条件重新加载数据
  745. this.loadData();
  746. },
  747. // 打开日期选择器
  748. openDatePicker(field) {
  749. console.log('openDatePicker called with field:', field);
  750. this.currentDateField = field;
  751. const currentValue = this.filters[field];
  752. if (currentValue) {
  753. this.datePickerValue = new Date(currentValue).getTime();
  754. } else {
  755. this.datePickerValue = new Date().getTime();
  756. }
  757. this.showDatePicker = true;
  758. },
  759. // 日期选择器确认
  760. datePickerConfirm(e) {
  761. console.log('datePickerConfirm:', e);
  762. const date = new Date(e.value);
  763. const year = date.getFullYear();
  764. const month = String(date.getMonth() + 1).padStart(2, '0');
  765. const day = String(date.getDate()).padStart(2, '0');
  766. const formattedDate = `${year}-${month}-${day}`;
  767. this.filters[this.currentDateField] = formattedDate;
  768. this.showDatePicker = false;
  769. },
  770. // 日期选择器取消
  771. datePickerCancel() {
  772. this.showDatePicker = false;
  773. },
  774. handleShare(item) {
  775. uni.showToast({
  776. title: '分享功能待实现',
  777. icon: 'none'
  778. })
  779. },
  780. handleTaskDelete(item, index) {
  781. uni.showModal({
  782. title: '提示',
  783. content: '确定要删除这条任务吗?',
  784. cancelText: '取消',
  785. confirmText: '删除',
  786. confirmColor: '#FF0000',
  787. success: (res) => {
  788. if (res.confirm) {
  789. uni.showLoading({
  790. title: '删除中...'
  791. });
  792. deleted(item.id).then(res => {
  793. uni.hideLoading();
  794. if (res.code === 200) {
  795. this.taskList.splice(index, 1);
  796. uni.showToast({
  797. title: '任务已删除',
  798. icon: 'success',
  799. duration: 1500
  800. });
  801. this.loadData();
  802. } else {
  803. uni.showToast({
  804. title: '删除失败',
  805. icon: 'none'
  806. });
  807. }
  808. }).catch(err => {
  809. uni.hideLoading();
  810. uni.showToast({
  811. title: '网络错误',
  812. icon: 'none'
  813. });
  814. });
  815. }
  816. }
  817. });
  818. },
  819. handleCopy(item) {
  820. console.log('去编辑', item);
  821. uni.navigateTo({
  822. url: `/pages_task/fillTask?id=${item.id}&doctorId=${item.initiatorId}&copy=true`
  823. })
  824. },
  825. handleAuditDelete(item, index) {
  826. uni.showModal({
  827. title: '提示',
  828. content: '确定要删除这条审核项吗?',
  829. cancelText: '取消',
  830. confirmText: '删除',
  831. confirmColor: '#FF0000',
  832. success: (res) => {
  833. if (res.confirm) {
  834. uni.showLoading({
  835. title: '删除中...'
  836. });
  837. deleted(item.id).then(res => {
  838. uni.hideLoading();
  839. if (res.code === 200) {
  840. this.auditList.splice(index, 1);
  841. uni.showToast({
  842. title: '审核项已删除',
  843. icon: 'success',
  844. duration: 1500
  845. });
  846. } else {
  847. uni.showToast({
  848. title: '删除失败',
  849. icon: 'none'
  850. });
  851. }
  852. }).catch(err => {
  853. uni.hideLoading();
  854. uni.showToast({
  855. title: '网络错误',
  856. icon: 'none'
  857. });
  858. });
  859. }
  860. }
  861. });
  862. },
  863. handleEdit(item) {
  864. uni.navigateTo({
  865. url: `/pages_task/createTask?id=${item.id}&edit=true`
  866. })
  867. }
  868. }
  869. }
  870. </script>
  871. <style lang="scss" scoped>
  872. .container {
  873. min-height: 100vh;
  874. background: #f5f5f5;
  875. .top-box {
  876. padding: 20rpx 32rpx;
  877. display: flex;
  878. align-items: center;
  879. background: #fff;
  880. .input-item {
  881. display: flex;
  882. align-items: center;
  883. flex: 1;
  884. height: 72rpx;
  885. background: #F7F8FA;
  886. border-radius: 38rpx;
  887. .search-icon {
  888. width: 26rpx;
  889. height: 26rpx;
  890. margin: 0 10rpx 0 28rpx;
  891. }
  892. input {
  893. flex: 1;
  894. font-size: 28rpx;
  895. color: #333;
  896. }
  897. }
  898. .filter-item {
  899. margin-left: 24rpx;
  900. display: flex;
  901. align-items: center;
  902. font-size: 28rpx;
  903. color: #999;
  904. .filter-icon {
  905. width: 28rpx;
  906. height: 28rpx;
  907. margin-right: 10rpx;
  908. }
  909. }
  910. }
  911. .top-tabs {
  912. display: flex;
  913. background: #fff;
  914. .top-tab-item {
  915. flex: 1;
  916. text-align: center;
  917. padding: 24rpx 0;
  918. font-size: 28rpx;
  919. color: #999;
  920. transition: all 0.2s;
  921. &.active {
  922. color: #333;
  923. font-weight: 500;
  924. position: relative;
  925. &::after {
  926. content: '';
  927. position: absolute;
  928. bottom: 0;
  929. left: 50%;
  930. transform: translateX(-50%);
  931. border-radius: 3rpx;
  932. width: 80rpx;
  933. height: 6rpx;
  934. background: #388BFF;
  935. }
  936. }
  937. }
  938. }
  939. .sub-tabs {
  940. display: flex;
  941. justify-content: space-between;
  942. background: #fff;
  943. padding: 16rpx 32rpx;
  944. gap: 24rpx;
  945. .sub-tab-item {
  946. padding: 12rpx 24rpx;
  947. border-radius: 30rpx;
  948. font-size: 28rpx;
  949. color: #666;
  950. transition: all 0.2s;
  951. &.active {
  952. background: #EBF3FF;
  953. color: #388BFF;
  954. }
  955. }
  956. }
  957. .content {
  958. padding: 24rpx;
  959. box-sizing: border-box;
  960. min-height: calc(100vh - 300rpx);
  961. .task-card {
  962. background: #fff;
  963. border-radius: 24rpx;
  964. margin-bottom: 20rpx;
  965. border: 2rpx solid #E9F2FF;
  966. position: relative;
  967. padding-bottom: 24rpx;
  968. .card-top {
  969. display: flex;
  970. justify-content: space-between;
  971. align-items: center;
  972. background: linear-gradient(90deg, #E8F1FF 0%, #FFFFFF 100%);
  973. border-radius: 24rpx 24rpx 0 0;
  974. padding: 26rpx 24rpx;
  975. margin-bottom: 16rpx;
  976. .card-task-title {
  977. font-size: 32rpx;
  978. font-weight: 600;
  979. color: #333;
  980. }
  981. .status-tag {
  982. padding: 8rpx 16rpx;
  983. border-radius: 20rpx;
  984. font-size: 24rpx;
  985. &.status-wait {
  986. background: #E3F2FD;
  987. color: #2196F3;
  988. }
  989. &.status-finish {
  990. background: #E6FAEF;
  991. color: #07C160;
  992. }
  993. &.status-rejected {
  994. background: #FFF4F5;
  995. color: #CF3546;
  996. }
  997. &.status-createPending {
  998. background: #FFF8E6;
  999. color: #FF9500;
  1000. }
  1001. }
  1002. }
  1003. .card-content {
  1004. padding: 0 24rpx;
  1005. .speaker-info {
  1006. display: flex;
  1007. align-items: center;
  1008. margin-bottom: 16rpx;
  1009. .speaker-name {
  1010. font-weight: 600;
  1011. font-size: 32rpx;
  1012. color: #333;
  1013. }
  1014. .level-tag {
  1015. margin-left: 16rpx;
  1016. padding: 2rpx 12rpx;
  1017. font-size: 22rpx;
  1018. color: #C89743;
  1019. background: #FFF6E5;
  1020. border-radius: 8rpx;
  1021. }
  1022. }
  1023. .org-info {
  1024. display: flex;
  1025. align-items: center;
  1026. margin-bottom: 16rpx;
  1027. font-size: 28rpx;
  1028. color: #666;
  1029. .org-icon {
  1030. width: 32rpx;
  1031. height: 32rpx;
  1032. margin-right: 16rpx;
  1033. }
  1034. .line {
  1035. width: 2rpx;
  1036. height: 28rpx;
  1037. background: #EAEBEE;
  1038. margin: 0 24rpx;
  1039. }
  1040. }
  1041. .card-tags {
  1042. display: flex;
  1043. align-items: center;
  1044. flex-wrap: wrap;
  1045. gap: 12rpx;
  1046. margin-bottom: 16rpx;
  1047. .tag-left-group {
  1048. display: flex;
  1049. gap: 0;
  1050. .video-tag {
  1051. background: linear-gradient(90deg, #FFE9C7 0%, #F3D091 100%);
  1052. border-radius: 8rpx 0 0 8rpx;
  1053. color: #5D410F;
  1054. display: flex;
  1055. align-items: center;
  1056. padding: 8rpx;
  1057. font-size: 24rpx;
  1058. .video-tag-icon {
  1059. width: 28rpx;
  1060. height: 28rpx;
  1061. margin-right: 10rpx;
  1062. }
  1063. }
  1064. .category-tag {
  1065. border-radius: 0 8rpx 8rpx 0;
  1066. border: 2rpx solid #F3D191;
  1067. background: #FFFAF4;
  1068. color: #5D410F;
  1069. padding: 8rpx;
  1070. font-size: 24rpx;
  1071. }
  1072. }
  1073. .tag-right-group {
  1074. display: flex;
  1075. gap: 12rpx;
  1076. .points-tag {
  1077. border: 1rpx solid #388BFF;
  1078. color: #388BFF;
  1079. background: transparent;
  1080. border-radius: 8rpx;
  1081. padding: 8rpx;
  1082. font-size: 24rpx;
  1083. }
  1084. .count-tag {
  1085. border: 2rpx solid #E8E8E8;
  1086. border-radius: 8rpx;
  1087. padding: 8rpx;
  1088. font-size: 24rpx;
  1089. color: #666;
  1090. }
  1091. }
  1092. }
  1093. .time-info {
  1094. font-size: 28rpx;
  1095. color: #666;
  1096. display: flex;
  1097. flex-direction: column;
  1098. gap: 8rpx;
  1099. margin-bottom: 24rpx;
  1100. .time-item {
  1101. display: flex;
  1102. &:first-child {
  1103. color: #333;
  1104. }
  1105. }
  1106. }
  1107. .operate-btn-group {
  1108. display: flex;
  1109. align-items: center;
  1110. justify-content: space-between;
  1111. &.flex-end {
  1112. justify-content: flex-end;
  1113. }
  1114. .share-btn {
  1115. display: flex;
  1116. align-items: center;
  1117. font-size: 28rpx;
  1118. color: #666;
  1119. .share-icon {
  1120. width: 36rpx;
  1121. height: 36rpx;
  1122. margin-right: 8rpx;
  1123. }
  1124. }
  1125. .btn-group {
  1126. display: flex;
  1127. align-items: center;
  1128. .btn {
  1129. padding: 12rpx 32rpx;
  1130. font-size: 28rpx;
  1131. color: #388BFF;
  1132. border: 2rpx solid #388BFF;
  1133. margin-left: 16rpx;
  1134. border-radius: 34rpx;
  1135. transition: all 0.2s;
  1136. &:active {
  1137. background: #EBF3FF;
  1138. }
  1139. }
  1140. }
  1141. }
  1142. .status-seal {
  1143. position: absolute;
  1144. right: 24rpx;
  1145. bottom: 156rpx;
  1146. width: 152rpx;
  1147. height: 142rpx;
  1148. opacity: 0.8;
  1149. }
  1150. }
  1151. }
  1152. .audit-card {
  1153. background: #f9f9f9;
  1154. border-radius: 24rpx;
  1155. margin-bottom: 20rpx;
  1156. border: 2rpx solid #E9F2FF;
  1157. position: relative;
  1158. padding-bottom: 24rpx;
  1159. .card-top {
  1160. display: flex;
  1161. justify-content: space-between;
  1162. align-items: center;
  1163. background: linear-gradient(90deg, #E8F1FF 0%, #FFFFFF 100%);
  1164. border-radius: 24rpx 24rpx 0 0;
  1165. padding: 26rpx 24rpx;
  1166. margin-bottom: 16rpx;
  1167. .card-task-title {
  1168. font-size: 32rpx;
  1169. font-weight: 600;
  1170. color: #333;
  1171. }
  1172. .status-tag {
  1173. padding: 8rpx 16rpx;
  1174. border-radius: 20rpx;
  1175. font-size: 24rpx;
  1176. &.status-wait {
  1177. background: #E3F2FD;
  1178. color: #2196F3;
  1179. }
  1180. &.status-finish {
  1181. background: #E6FAEF;
  1182. color: #07C160;
  1183. }
  1184. &.status-rejected {
  1185. background: #FFF4F5;
  1186. color: #CF3546;
  1187. }
  1188. &.status-createPending {
  1189. background: #FFF8E6;
  1190. color: #FF9500;
  1191. }
  1192. }
  1193. }
  1194. .card-content {
  1195. padding: 0 24rpx;
  1196. .time-info {
  1197. margin-bottom: 16rpx;
  1198. .time-item {
  1199. margin-bottom: 8rpx;
  1200. display: flex;
  1201. align-items: flex-start;
  1202. text {
  1203. font-size: 24rpx;
  1204. color: #999;
  1205. &.title {
  1206. color: #666;
  1207. margin-right: 8rpx;
  1208. white-space: nowrap;
  1209. }
  1210. &:not(.title) {
  1211. flex: 1;
  1212. word-break: break-word;
  1213. overflow-wrap: break-word;
  1214. }
  1215. }
  1216. }
  1217. }
  1218. .operate-btn-group {
  1219. display: flex;
  1220. justify-content: space-between;
  1221. align-items: center;
  1222. margin-top: 16rpx;
  1223. .share-btn {
  1224. display: flex;
  1225. align-items: center;
  1226. font-size: 24rpx;
  1227. color: #999;
  1228. .share-icon {
  1229. width: 36rpx;
  1230. height: 36rpx;
  1231. margin-right: 8rpx;
  1232. }
  1233. }
  1234. .date {
  1235. font-size: 24rpx;
  1236. color: #999;
  1237. }
  1238. }
  1239. }
  1240. }
  1241. }
  1242. .side {
  1243. position: fixed;
  1244. top: 60%;
  1245. right: 36rpx;
  1246. display: flex;
  1247. flex-direction: column;
  1248. align-items: center;
  1249. z-index: 9;
  1250. .side-item {
  1251. width: 96rpx;
  1252. height: 96rpx;
  1253. margin-bottom: 28rpx;
  1254. .icon {
  1255. width: 100%;
  1256. height: 100%;
  1257. }
  1258. &:active {
  1259. opacity: 0.6;
  1260. }
  1261. }
  1262. }
  1263. .filter-popup {
  1264. position: fixed;
  1265. top: 0;
  1266. left: 0;
  1267. right: 0;
  1268. bottom: 0;
  1269. background: rgba(0, 0, 0, 0.5);
  1270. z-index: 999;
  1271. display: flex;
  1272. align-items: flex-end;
  1273. .filter-content {
  1274. width: 100%;
  1275. background: #fff;
  1276. border-radius: 24rpx 24rpx 0 0;
  1277. padding: 32rpx;
  1278. .filter-header {
  1279. display: flex;
  1280. align-items: center;
  1281. justify-content: center;
  1282. margin-bottom: 32rpx;
  1283. position: relative;
  1284. .filter-title {
  1285. font-size: 32rpx;
  1286. font-weight: bold;
  1287. color: #333;
  1288. }
  1289. .filter-close-btn {
  1290. position: absolute;
  1291. right: 0;
  1292. width: 44rpx;
  1293. height: 44rpx;
  1294. }
  1295. }
  1296. .filter-form {
  1297. padding: 0 0 24rpx 0;
  1298. .filter-section {
  1299. margin-bottom: 32rpx;
  1300. .section-label {
  1301. font-weight: 500;
  1302. font-size: 28rpx;
  1303. color: #333;
  1304. margin-bottom: 24rpx;
  1305. }
  1306. .time-range {
  1307. display: flex;
  1308. align-items: center;
  1309. gap: 16rpx;
  1310. .time-input {
  1311. flex: 1;
  1312. line-height: 72rpx;
  1313. height: 72rpx;
  1314. text-align: center;
  1315. background: #F7F8FA;
  1316. border-radius: 8rpx;
  1317. padding: 0 16rpx;
  1318. font-size: 26rpx;
  1319. color: #333;
  1320. }
  1321. .time-separator {
  1322. font-size: 24rpx;
  1323. color: #999;
  1324. }
  1325. }
  1326. .btn-group {
  1327. display: flex;
  1328. gap: 16rpx;
  1329. .filter-btn {
  1330. width: 214rpx;
  1331. height: 72rpx;
  1332. background: #F7F8FA;
  1333. border-radius: 70rpx 70rpx 70rpx 70rpx;
  1334. line-height: 72rpx;
  1335. text-align: center;
  1336. font-size: 28rpx;
  1337. transition: all 0.2s;
  1338. color: #333333;
  1339. &.active {
  1340. background: rgba(56, 139, 255, 0.15);
  1341. color: #388BFF;
  1342. }
  1343. }
  1344. }
  1345. }
  1346. }
  1347. .filter-actions {
  1348. display: flex;
  1349. gap: 24rpx;
  1350. margin-top: 40rpx;
  1351. .reset-btn,
  1352. .confirm-btn {
  1353. flex: 1;
  1354. height: 80rpx;
  1355. line-height: 80rpx;
  1356. text-align: center;
  1357. border-radius: 200rpx;
  1358. font-size: 28rpx;
  1359. transition: all 0.2s;
  1360. }
  1361. .reset-btn {
  1362. background: #fff;
  1363. color: #388BFF;
  1364. border: 2rpx solid #388BFF;
  1365. &:active {
  1366. background: #EBF3FF;
  1367. }
  1368. }
  1369. .confirm-btn {
  1370. background: #388BFF;
  1371. color: #fff;
  1372. &:active {
  1373. background: #2A78E5;
  1374. }
  1375. }
  1376. }
  1377. }
  1378. }
  1379. }
  1380. </style>