approvalCenter.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847
  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 v-model="searchKeywords" @input="handleSearchInput" placeholder="请输入发起人姓名、手机号" placeholder-class="placeholder" />
  8. </view>
  9. </view>
  10. <!-- 顶部选项卡 -->
  11. <view class="top-tabs">
  12. <view class="top-tab-item" :class="{ active: currentTopTab === index }" @click="switchTopTab(index)"
  13. v-for="(item, index) in topTabs" :key="index">
  14. {{ item.label }}·{{ item.badge }}
  15. </view>
  16. </view>
  17. <!-- 核心修改:新增子标签容器,作为popup-box的定位参考 -->
  18. <view class="sub-tabs-wrapper">
  19. <!-- 动态子标签 -->
  20. <view class="sub-tabs">
  21. <view class="sub-tab-item" :class="{ active: currentSubTab === item.value }" @click="popShow = !popShow"
  22. v-for="(item, index) in currentSubTabsList" :key="index">
  23. <text>{{ item.label }}</text>
  24. <image class="icon" src="/static/image/icon_expand.png" mode="widthFix"></image>
  25. </view>
  26. </view>
  27. <!-- 使用tab-popup组件 -->
  28. <tab-popup v-model:show="popShow" :items="tabsList" :selected-item="selectedTabItem" @select="selectTabItem" />
  29. </view>
  30. <!-- 列表内容 -->
  31. <scroll-view class="content" scroll-y>
  32. <view class="task-card" v-for="(item, index) in currentList" :key="index" @click="goDetails(item)">
  33. <!-- 任务/审核标题+状态 -->
  34. <view class="card-top">
  35. <text class="card-task-title">{{ item.auditName || '未设置' }}</text>
  36. <view class="status-tag" :class="item.statusClass">{{ item.statusText }}</view>
  37. </view>
  38. <view class="card-content">
  39. <!-- 时间信息 -->
  40. <view class="time-info">
  41. <view class="time-item">
  42. <text class="title">任务名称:</text>
  43. <text>{{ item.auditName || '未设置' }}</text>
  44. </view>
  45. <view class="time-item">
  46. <text class="title">任务类型:</text>
  47. <text>{{ getBusinessTypeLabel(item.businessType) }}</text>
  48. </view>
  49. </view>
  50. <!-- 操作按钮 -->
  51. <view class="operate-btn-group">
  52. <view class="share-btn" @click="handleShare(item)">
  53. <image class="share-icon" src="/static/image/icon_user.png" mode="widthFix"></image>
  54. <text>{{ item.initiatorName || '未命名' }}</text>
  55. </view>
  56. <view class="date">
  57. {{ formatTime(item.createTime) }}
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. </scroll-view>
  63. <!-- 筛选弹窗 -->
  64. <view class="filter-popup" v-if="showFilter" @click="closeFilter">
  65. <view class="filter-content" @click.stop>
  66. <view class="filter-header">
  67. <view class="filter-title">筛选</view>
  68. <image class="filter-close-btn" src="@/static/image/icon_close.png" @click="closeFilter"
  69. mode="widthFix"></image>
  70. </view>
  71. <view class="filter-form">
  72. <!-- 任务申请时间 -->
  73. <view class="filter-section">
  74. <view class="section-label">任务申请时间</view>
  75. <view class="time-range">
  76. <input class="time-input" placeholder="开始时间" v-model="filters.applyTimeStart" />
  77. <view class="time-separator">-</view>
  78. <input class="time-input" placeholder="结束时间" v-model="filters.applyTimeEnd" />
  79. </view>
  80. </view>
  81. <!-- 任务完成时间:改为判断index:1对应已办 -->
  82. <view class="filter-section" v-if="currentTopTab === 1">
  83. <view class="section-label">任务完成时间</view>
  84. <view class="time-range">
  85. <input class="time-input" placeholder="开始时间" v-model="filters.finishTimeStart" />
  86. <view class="time-separator">-</view>
  87. <input class="time-input" placeholder="结束时间" v-model="filters.finishTimeEnd" />
  88. </view>
  89. </view>
  90. <!-- 完成审核时间:改为判断index:1对应已办 -->
  91. <view class="filter-section" v-if="currentTopTab === 1">
  92. <view class="section-label">完成审核时间</view>
  93. <view class="time-range">
  94. <input class="time-input" placeholder="开始时间" v-model="filters.auditTimeStart" />
  95. <view class="time-separator">-</view>
  96. <input class="time-input" placeholder="结束时间" v-model="filters.auditTimeEnd" />
  97. </view>
  98. </view>
  99. <!-- 任务归属 -->
  100. <view class="filter-section">
  101. <view class="section-label">任务归属</view>
  102. <view class="btn-group">
  103. <view class="filter-btn" :class="{ active: filters.taskBelong === 'my' }"
  104. @click="filters.taskBelong = 'my'">我的任务</view>
  105. <view class="filter-btn" :class="{ active: filters.taskBelong === 'dept' }"
  106. @click="filters.taskBelong = 'dept'">部门任务</view>
  107. </view>
  108. </view>
  109. <!-- 完结状态:改为判断index:1对应已办 -->
  110. <view class="filter-section" v-if="currentTopTab === 1">
  111. <view class="section-label">完结状态</view>
  112. <view class="btn-group">
  113. <view class="filter-btn" :class="{ active: filters.finishStatus === 'unfinished' }"
  114. @click="filters.finishStatus = 'unfinished'">未完结</view>
  115. <view class="filter-btn" :class="{ active: filters.finishStatus === 'finished' }"
  116. @click="filters.finishStatus = 'finished'">已完结</view>
  117. </view>
  118. </view>
  119. <!-- 归属类型 -->
  120. <view class="filter-section">
  121. <view class="section-label">归属类型</view>
  122. <view class="btn-group">
  123. <view class="filter-btn" :class="{ active: filters.belongType === 'inner' }"
  124. @click="filters.belongType = 'inner'">院内</view>
  125. <view class="filter-btn" :class="{ active: filters.belongType === 'outer' }"
  126. @click="filters.belongType = 'outer'">院外</view>
  127. </view>
  128. </view>
  129. </view>
  130. <view class="filter-actions">
  131. <view class="reset-btn" @click="resetFilters">重置</view>
  132. <view class="confirm-btn" @click="confirmFilters">确定</view>
  133. </view>
  134. </view>
  135. </view>
  136. </view>
  137. </template>
  138. <script>
  139. import utils from '@/utils/common.js'
  140. import TabPopup from '@/components/tab-popup.vue'
  141. import { getPendingAuditList, searchCompanyUser } from '@/api/audit.js'
  142. export default {
  143. components: {
  144. TabPopup
  145. },
  146. data() {
  147. return {
  148. processTemplate: null,
  149. popShow: false,
  150. showFilter: false,
  151. selectedTabItem: '',
  152. searchKeywords: '',
  153. searchTimer: null,
  154. filters: {
  155. applyTimeStart: '',
  156. applyTimeEnd: '',
  157. finishTimeStart: '',
  158. finishTimeEnd: '',
  159. auditTimeStart: '',
  160. auditTimeEnd: '',
  161. taskBelong: 'my',
  162. finishStatus: '',
  163. belongType: ''
  164. },
  165. // 顶部选项卡数组
  166. topTabs: [{
  167. label: '待办',
  168. value: 'todo',
  169. badge: 0
  170. },
  171. {
  172. label: '已办',
  173. value: 'done',
  174. badge: 0
  175. },
  176. {
  177. label: '我发起的',
  178. value: 'myInitiate',
  179. badge: 0
  180. }
  181. ],
  182. currentTopTab: 0,
  183. currentSubTab: 'all',
  184. // 子标签数组
  185. taskSubTabs: [{
  186. label: '全部审批',
  187. value: 'all'
  188. },
  189. {
  190. label: '最新发起',
  191. value: 'unfinished'
  192. }
  193. ],
  194. tabsList: ['全部审批', '任务创建'],
  195. tabsList2: ['最新发起', '最早发起'],
  196. // auditSubTabs: [{
  197. // label: '全部',
  198. // value: 'all'
  199. // },
  200. // {
  201. // label: '驳回',
  202. // value: 'rejected'
  203. // }
  204. // ],
  205. // 加载状态
  206. loading: {
  207. todo: false,
  208. done: false,
  209. myInitiate: false
  210. },
  211. // 列表数据
  212. todoList: [], // 待办列表(index=0)
  213. doneList: [], // 已办列表(index=1)
  214. myInitiateList: [] // 我发起的列表(index=2)
  215. }
  216. },
  217. computed: {
  218. currentSubTabsList() {
  219. return this.taskSubTabs;
  220. // if (this.currentTopTab === 0) return this.taskSubTabs;
  221. // if (this.currentTopTab === 1) return this.auditSubTabs;
  222. // if (this.currentTopTab === 2) return this.myInitiateList;
  223. },
  224. currentList() {
  225. if (this.currentTopTab === 0) return this.todoList;
  226. if (this.currentTopTab === 1) return this.doneList;
  227. if (this.currentTopTab === 2) return this.myInitiateList;
  228. }
  229. },
  230. onLoad() {
  231. // 页面加载时的初始化操作
  232. this.loadData();
  233. utils.getDicts("FLOW_TEMPLATE").then(res => {
  234. this.processTemplate = res;
  235. console.log("流程模板", this.processTemplate)
  236. });
  237. },
  238. methods: {
  239. selectTabItem(item) {
  240. this.selectedTabItem = item;
  241. this.popShow = false;
  242. },
  243. goDetails(item) {
  244. console.log("跳转参数",item)
  245. uni.navigateTo({
  246. url: `/pages_task/approvalTaskDetail?taskId=${item.id}&businessType=${item.businessType}`
  247. })
  248. },
  249. switchTopTab(index) {
  250. this.currentTopTab = index;
  251. this.currentSubTab = 'all';
  252. this.popShow = false;
  253. // 切换标签时重新加载数据
  254. this.loadData();
  255. },
  256. closeFilter() {
  257. this.showFilter = false
  258. },
  259. resetFilters() {
  260. this.filters = {
  261. applyTimeStart: '',
  262. applyTimeEnd: '',
  263. finishTimeStart: '',
  264. finishTimeEnd: '',
  265. auditTimeStart: '',
  266. auditTimeEnd: '',
  267. taskBelong: 'my',
  268. finishStatus: '',
  269. belongType: ''
  270. }
  271. },
  272. confirmFilters() {
  273. this.showFilter = false
  274. console.log('筛选条件:', this.filters)
  275. // 筛选后重新加载数据
  276. this.loadData()
  277. },
  278. handleShare(item) {
  279. uni.showToast({
  280. title: '分享功能待实现',
  281. icon: 'none'
  282. })
  283. },
  284. handleSearchInput() {
  285. // 防抖处理,避免频繁请求
  286. if (this.searchTimer) {
  287. clearTimeout(this.searchTimer)
  288. }
  289. this.searchTimer = setTimeout(async () => {
  290. if (this.searchKeywords.trim()) {
  291. try {
  292. // 调用搜索发起人接口
  293. const res = await searchCompanyUser({
  294. keywords: this.searchKeywords.trim(),
  295. pageNum: 1,
  296. pageSize: 10
  297. })
  298. if (res.code === 200 && res.rows) {
  299. // 根据当前标签页更新对应列表
  300. if (this.currentTopTab === 0) {
  301. this.todoList = res.rows.map(item => ({
  302. auditName: item.auditName || '未知审核',
  303. statusText: '待审核',
  304. statusClass: 'status-createPending',
  305. id: item.id,
  306. status: item.status,
  307. auditType: item.auditType,
  308. businessId: item.businessId,
  309. businessType: item.businessType,
  310. createTime: item.createTime,
  311. initiatorName: item.initiatorName
  312. }))
  313. } else if (this.currentTopTab === 1) {
  314. this.doneList = res.rows.map(item => ({
  315. auditName: item.auditName || '未知审核',
  316. statusText: item.status === 1 ? '已通过' : '已驳回',
  317. statusClass: item.status === 1 ? 'status-finish' : 'status-rejected',
  318. id: item.id,
  319. status: item.status,
  320. auditType: item.auditType,
  321. businessId: item.businessId,
  322. businessType: item.businessType,
  323. createTime: item.createTime,
  324. initiatorName: item.initiatorName
  325. }))
  326. } else if (this.currentTopTab === 2) {
  327. this.myInitiateList = res.rows.map(item => ({
  328. auditName: item.auditName || '未知审核',
  329. statusText: '待审核',
  330. statusClass: 'status-createPending',
  331. id: item.id,
  332. status: item.status,
  333. auditType: item.auditType,
  334. businessId: item.businessId,
  335. businessType: item.businessType,
  336. createTime: item.createTime,
  337. initiatorName: item.initiatorName
  338. }))
  339. }
  340. } else {
  341. // 搜索结果为空,清空对应列表
  342. if (this.currentTopTab === 0) {
  343. this.todoList = []
  344. } else if (this.currentTopTab === 1) {
  345. this.doneList = []
  346. } else if (this.currentTopTab === 2) {
  347. this.myInitiateList = []
  348. }
  349. }
  350. } catch (e) {
  351. console.error('搜索失败', e)
  352. uni.showToast({
  353. title: '搜索失败',
  354. icon: 'none'
  355. })
  356. }
  357. } else {
  358. // 搜索框为空,重新加载默认数据
  359. this.loadData()
  360. }
  361. }, 300)
  362. },
  363. // 加载审批数据
  364. async loadData() {
  365. try {
  366. // 无论当前标签是什么,都调用getPendingAuditList请求
  367. const userInfo = JSON.parse(uni.getStorageSync('userInfo') || '{}')
  368. const params = {
  369. initiatorName: userInfo.nickName || '',
  370. initiatorPhone: userInfo.phone || '',
  371. // initiatorId: 0,
  372. status: userInfo.status|| '',
  373. // tempCode: userInfo.productCode || '',
  374. sort: 0,
  375. userId:userInfo.userId|| '',
  376. companyId: userInfo.companyId || 0
  377. }
  378. const res = await getPendingAuditList(params)
  379. if (res.code === 200) {
  380. // 处理返回的数据
  381. const responseData = res.rows|| [];
  382. // 根据status分类数据
  383. const todoData = responseData.filter(item => item.status === 1);
  384. const doneData = responseData.filter(item => item.status === 2);
  385. const myInitiateData = responseData.filter(item => item.status === 3);
  386. // 更新对应列表
  387. if (this.currentTopTab === 0) {
  388. // 待办列表
  389. this.loading.todo = true
  390. this.todoList = todoData.map(item => ({
  391. auditName: item.auditName || '未知审核',
  392. statusText: '待审核',
  393. statusClass: 'status-createPending',
  394. id: item.id,
  395. status: item.status,
  396. auditType: item.auditType,
  397. businessId: item.businessId,
  398. businessType: item.businessType,
  399. createTime: item.createTime,
  400. initiatorName:item.initiatorName
  401. }))
  402. this.loading.todo = false
  403. } else if (this.currentTopTab === 1) {
  404. // 已办列表
  405. this.loading.done = true
  406. this.doneList = doneData.map(item => ({
  407. auditName: item.auditName || '未知审核',
  408. statusText: item.status === 1 ? '已通过' : '已驳回',
  409. statusClass: item.status === 1 ? 'status-finish' : 'status-rejected',
  410. id: item.id,
  411. status: item.status,
  412. auditType: item.auditType,
  413. businessId: item.businessId,
  414. businessType: item.businessType,
  415. createTime: item.createTime,
  416. initiatorName:item.initiatorName
  417. }))
  418. this.loading.done = false
  419. } else if (this.currentTopTab === 2) {
  420. // 我发起的列表
  421. this.loading.myInitiate = true
  422. this.myInitiateList = myInitiateData.map(item => ({
  423. auditName: item.auditName || '未知审核',
  424. statusText: '待审核',
  425. statusClass: 'status-createPending',
  426. id: item.id,
  427. status: item.status,
  428. auditType: item.auditType,
  429. businessId: item.businessId,
  430. businessType: item.businessType,
  431. createTime: item.createTime,
  432. initiatorName:item.initiatorName
  433. }))
  434. this.loading.myInitiate = false
  435. }
  436. // 更新badge数量
  437. this.topTabs[0].badge = todoData.length
  438. this.topTabs[1].badge = doneData.length
  439. this.topTabs[2].badge = myInitiateData.length
  440. } else {
  441. uni.showToast({
  442. title: '获取审核列表失败',
  443. icon: 'none'
  444. })
  445. }
  446. } catch (e) {
  447. console.error('加载数据失败', e)
  448. uni.showToast({
  449. title: '加载数据失败',
  450. icon: 'none'
  451. })
  452. // 重置加载状态
  453. this.loading.todo = false
  454. this.loading.done = false
  455. this.loading.myInitiate = false
  456. }
  457. },
  458. // 格式化时间
  459. formatTime(timeStr) {
  460. if (!timeStr) return ''
  461. const date = new Date(timeStr)
  462. const year = date.getFullYear()
  463. const month = String(date.getMonth() + 1).padStart(2, '0')
  464. const day = String(date.getDate()).padStart(2, '0')
  465. const hours = String(date.getHours()).padStart(2, '0')
  466. const minutes = String(date.getMinutes()).padStart(2, '0')
  467. return `${year}-${month}-${day} ${hours}:${minutes}`
  468. },
  469. getBusinessTypeLabel(businessType) {
  470. if (!businessType || !this.processTemplate) {
  471. return '未设置'
  472. }
  473. const dictItem = this.processTemplate.find(item => item.dictValue === businessType)
  474. return dictItem ? dictItem.dictLabel : businessType
  475. }
  476. }
  477. }
  478. </script>
  479. <style lang="scss" scoped>
  480. .container {
  481. min-height: 100vh;
  482. background: #F7F8FA;
  483. position: relative;
  484. // 搜索栏
  485. .top-box {
  486. padding: 20rpx 32rpx;
  487. display: flex;
  488. align-items: center;
  489. background: #fff;
  490. position: relative;
  491. z-index: 101;
  492. .input-item {
  493. display: flex;
  494. align-items: center;
  495. flex: 1;
  496. height: 72rpx;
  497. background: #F7F8FA;
  498. border-radius: 38rpx;
  499. .search-icon {
  500. width: 26rpx;
  501. height: 26rpx;
  502. margin: 0 10rpx 0 28rpx;
  503. }
  504. input {
  505. flex: 1;
  506. font-size: 28rpx;
  507. color: #333;
  508. }
  509. }
  510. }
  511. // 顶部选项卡
  512. .top-tabs {
  513. display: flex;
  514. background: #fff;
  515. position: relative;
  516. z-index: 101;
  517. .top-tab-item {
  518. flex: 1;
  519. text-align: center;
  520. padding: 24rpx 0;
  521. font-size: 28rpx;
  522. color: #999;
  523. transition: all 0.2s;
  524. &.active {
  525. color: #333;
  526. font-weight: 500;
  527. position: relative;
  528. &::after {
  529. content: '';
  530. position: absolute;
  531. bottom: 0;
  532. left: 50%;
  533. transform: translateX(-50%);
  534. border-radius: 3rpx;
  535. width: 80rpx;
  536. height: 6rpx;
  537. background: #388BFF;
  538. }
  539. }
  540. }
  541. }
  542. // 核心修改:子标签容器(定位参考)
  543. .sub-tabs-wrapper {
  544. position: relative; // 作为popup-box的定位参考
  545. z-index: 101; // 确保在遮罩层之上
  546. // 子标签栏
  547. .sub-tabs {
  548. display: flex;
  549. justify-content: space-between;
  550. background: #fff;
  551. padding: 16rpx 32rpx;
  552. gap: 24rpx;
  553. .sub-tab-item {
  554. flex: 1;
  555. height: 64rpx;
  556. display: flex;
  557. border-radius: 70rpx;
  558. border: 2rpx solid #F2F2F2;
  559. justify-content: center;
  560. align-items: center;
  561. font-size: 28rpx;
  562. color: #666;
  563. transition: all 0.2s;
  564. .icon {
  565. width: 28rpx;
  566. height: 28rpx;
  567. margin-left: 12rpx;
  568. }
  569. }
  570. }
  571. }
  572. // 列表区域
  573. .content {
  574. padding: 24rpx;
  575. box-sizing: border-box;
  576. min-height: calc(100vh - 300rpx);
  577. position: relative;
  578. z-index: 98; // 低于遮罩层
  579. .task-card {
  580. background: #fff;
  581. border-radius: 24rpx;
  582. margin-bottom: 20rpx;
  583. border: 2rpx solid #E9F2FF;
  584. position: relative;
  585. padding-bottom: 24rpx;
  586. .card-top {
  587. display: flex;
  588. justify-content: space-between;
  589. align-items: center;
  590. background: linear-gradient(90deg, #E8F1FF 0%, #FFFFFF 100%);
  591. border-radius: 24rpx 24rpx 0 0;
  592. padding: 26rpx 24rpx;
  593. margin-bottom: 16rpx;
  594. .card-task-title {
  595. font-size: 32rpx;
  596. font-weight: 600;
  597. color: #333;
  598. }
  599. .status-tag {
  600. padding: 8rpx 16rpx;
  601. border-radius: 20rpx;
  602. font-size: 24rpx;
  603. &.status-wait {
  604. background: #E3F2FD;
  605. color: #2196F3;
  606. }
  607. &.status-finish {
  608. background: #E6FAEF;
  609. color: #07C160;
  610. }
  611. &.status-rejected {
  612. background: #FFF4F5;
  613. color: #CF3546;
  614. }
  615. &.status-createPending {
  616. background: #FFF8E6;
  617. color: #FF9500;
  618. }
  619. }
  620. }
  621. .card-content {
  622. padding: 0 24rpx;
  623. .time-info {
  624. font-size: 28rpx;
  625. color: #666;
  626. display: flex;
  627. flex-direction: column;
  628. gap: 8rpx;
  629. margin-bottom: 24rpx;
  630. .time-item {
  631. display: flex;
  632. font-size: 28rpx;
  633. color: #333;
  634. .title {
  635. color: #666;
  636. }
  637. }
  638. }
  639. .operate-btn-group {
  640. display: flex;
  641. align-items: center;
  642. justify-content: space-between;
  643. .share-btn {
  644. display: flex;
  645. align-items: center;
  646. font-size: 28rpx;
  647. color: #666;
  648. .share-icon {
  649. width: 36rpx;
  650. height: 36rpx;
  651. margin-right: 8rpx;
  652. }
  653. }
  654. .date {
  655. font-size: 24rpx;
  656. color: #999;
  657. }
  658. }
  659. }
  660. }
  661. }
  662. // 筛选弹窗
  663. .filter-popup {
  664. position: fixed;
  665. top: 0;
  666. left: 0;
  667. right: 0;
  668. bottom: 0;
  669. background: rgba(0, 0, 0, 0.5);
  670. z-index: 999;
  671. display: flex;
  672. align-items: flex-end;
  673. .filter-content {
  674. width: 100%;
  675. background: #fff;
  676. border-radius: 24rpx 24rpx 0 0;
  677. padding: 32rpx;
  678. .filter-header {
  679. display: flex;
  680. align-items: center;
  681. justify-content: center;
  682. margin-bottom: 32rpx;
  683. position: relative;
  684. .filter-title {
  685. font-size: 32rpx;
  686. font-weight: bold;
  687. color: #333;
  688. }
  689. .filter-close-btn {
  690. position: absolute;
  691. right: 0;
  692. width: 44rpx;
  693. height: 44rpx;
  694. }
  695. }
  696. .filter-form {
  697. padding: 0 0 24rpx 0;
  698. .filter-section {
  699. margin-bottom: 32rpx;
  700. .section-label {
  701. font-weight: 500;
  702. font-size: 28rpx;
  703. color: #333;
  704. margin-bottom: 24rpx;
  705. }
  706. .time-range {
  707. display: flex;
  708. align-items: center;
  709. gap: 16rpx;
  710. .time-input {
  711. flex: 1;
  712. height: 72rpx;
  713. text-align: center;
  714. background: #F7F8FA;
  715. border-radius: 8rpx;
  716. padding: 0 16rpx;
  717. font-size: 26rpx;
  718. color: #333;
  719. }
  720. .time-separator {
  721. font-size: 24rpx;
  722. color: #999;
  723. }
  724. }
  725. .btn-group {
  726. display: flex;
  727. gap: 16rpx;
  728. .filter-btn {
  729. width: 214rpx;
  730. height: 72rpx;
  731. background: #F7F8FA;
  732. border-radius: 70rpx;
  733. line-height: 72rpx;
  734. text-align: center;
  735. font-size: 28rpx;
  736. transition: all 0.2s;
  737. color: #333;
  738. &.active {
  739. background: rgba(56, 139, 255, 0.15);
  740. color: #388BFF;
  741. }
  742. }
  743. }
  744. }
  745. }
  746. .filter-actions {
  747. display: flex;
  748. gap: 24rpx;
  749. margin-top: 40rpx;
  750. .reset-btn,
  751. .confirm-btn {
  752. flex: 1;
  753. height: 80rpx;
  754. line-height: 80rpx;
  755. text-align: center;
  756. border-radius: 200rpx;
  757. font-size: 28rpx;
  758. transition: all 0.2s;
  759. }
  760. .reset-btn {
  761. background: #fff;
  762. color: #388BFF;
  763. border: 2rpx solid #388BFF;
  764. &:active {
  765. background: #EBF3FF;
  766. }
  767. }
  768. .confirm-btn {
  769. background: #388BFF;
  770. color: #fff;
  771. &:active {
  772. background: #2A78E5;
  773. }
  774. }
  775. }
  776. }
  777. }
  778. }
  779. </style>