activityList.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895
  1. <template>
  2. <view
  3. class="activity-list">
  4. <view
  5. v-if="dropList.length > 0"
  6. class="drop-wrapper">
  7. <view class="btn-group">
  8. <view
  9. :class="{active: queryType === 1}"
  10. class="btn-group-item"
  11. @click="queryType = 1">
  12. 跟进记录
  13. </view>
  14. <view
  15. :class="{active: queryType === 2}"
  16. class="btn-group-item"
  17. @click="queryType = 2">
  18. {{ activityTitle }}动态
  19. </view>
  20. </view>
  21. <view
  22. v-if="dropItem&&queryType === 2"
  23. class="filter"
  24. @click="handleToFilter">
  25. <image :src="$static(dropItem.img)" mode="" class="pic" />
  26. <text class="text">
  27. {{ dropItem.label }}
  28. </text>
  29. <text class="wk wk-arrow-right icon" />
  30. </view>
  31. <view
  32. v-else
  33. class="filter"
  34. @click="handleToFilter">
  35. <text class="text">
  36. 筛选时间
  37. </text>
  38. <text class="wk wk-arrow-right icon" />
  39. </view>
  40. </view>
  41. <view class="list-container">
  42. <view
  43. v-if="listData.length === 0"
  44. :style="{backgroundImage: bgUrl('images/no_data.png'), height: contentHeight + 'px'}"
  45. class="no-data" />
  46. <template v-if="queryType === 1&&listOver">
  47. <view
  48. v-for="(item, index) in listData"
  49. :key="index"
  50. class="activity-item">
  51. <view
  52. v-if="item.createUser"
  53. class="user-info">
  54. <wk-avatar
  55. :name="item.createUser.realname"
  56. :avatar="item.createUser.img"
  57. :size="14"
  58. class="avatar" />
  59. <view class="info">
  60. <view class="username">
  61. {{ item.createUser.realname }}
  62. </view>
  63. <view class="text">
  64. {{ formatTime(item.createTime) }}
  65. </view>
  66. </view>
  67. <view
  68. v-if="item.category"
  69. class="category">
  70. {{ item.category }}
  71. </view>
  72. </view>
  73. <view
  74. v-if="item.type === 1"
  75. class="log-content content">
  76. <log-item :log-data="item" />
  77. </view>
  78. <view
  79. v-else-if="item.type === 2"
  80. class="record content">
  81. <text>{{ item.realname }}创建了{{ activityMap[item.activityType].label }}:</text>
  82. <text
  83. class="special"
  84. @click="handleToDetail(item)">
  85. {{ item.activityTypeName || '查看详情' }}
  86. </text>
  87. </view>
  88. <view
  89. v-else-if="item.type === 3"
  90. class="record content">
  91. <text>{{ item.realname }}将商机:</text>
  92. <text
  93. class="special"
  94. @click="handleToDetail(item)">
  95. {{ item.activityTypeName }}
  96. </text>
  97. <text>
  98. 阶段变更为{{ item.content }}
  99. </text>
  100. </view>
  101. <view
  102. v-else-if="item.type === 4"
  103. class="legwork-content content">
  104. <log-item :log-data="item" />
  105. <!-- <text>{{ item.realname }}拜访了{{ activityMap[item.activityType].label }}:</text>
  106. <text
  107. class="special"
  108. @click="handleToDetail(item)">
  109. {{ item.activityTypeName }}
  110. </text> -->
  111. </view>
  112. </view>
  113. </template>
  114. <template v-if="queryType === 2&&listOver">
  115. <view
  116. v-for="(item, index) in listData"
  117. :key="index"
  118. >
  119. <view
  120. v-if="getShow(item)"
  121. class="activity-item"
  122. >
  123. <view
  124. class="user-info">
  125. <wk-avatar
  126. :name="item.createUser.realname"
  127. :avatar="item.createUser.img"
  128. :size="14"
  129. class="avatar" />
  130. <view class="info">
  131. <view class="username">
  132. <view>
  133. {{ item.createUser.realname }}
  134. </view>
  135. <view v-if="dynamicName[item.activityType]" class="dynamic-name">
  136. 创建了{{ dynamicName[item.activityType] }}
  137. </view>
  138. </view>
  139. <view class="text">
  140. {{ formatTime(item.createTime) }}
  141. </view>
  142. </view>
  143. <view
  144. v-if="item.category"
  145. class="category">
  146. {{ item.category }}
  147. </view>
  148. </view>
  149. <activity-list-item
  150. :item-data="item"
  151. />
  152. </view>
  153. </view>
  154. </template>
  155. </view>
  156. <wk-drag-button
  157. v-if="!hiddenAdd && addAuth"
  158. @click="handleToggleCommand">
  159. <view class="wk-drag-btn">
  160. <text class="wk wk-edit-pen icon" />
  161. <text class="text">
  162. 写跟进
  163. </text>
  164. </view>
  165. </wk-drag-button>
  166. <uni-popup
  167. ref="popup"
  168. radius="10rpx 10rpx 0 0"
  169. type="actionsheet">
  170. <wk-action-sheet
  171. :list="popList"
  172. label="label"
  173. value="value"
  174. @select="handleCommand" />
  175. </uni-popup>
  176. <uni-popup
  177. ref="popupBottom"
  178. radius="24rpx 24rpx 0 0"
  179. type="bottom">
  180. <view class="filter-popup">
  181. <view class="popup-header">
  182. <view class="text">
  183. {{ queryType===1?'时间':'筛选' }}
  184. </view>
  185. <text class="wk wk-close icon" @click="handleCloseFilter" />
  186. </view>
  187. <view class="popup-content">
  188. <template v-if="queryType === 1&&listOver">
  189. <view
  190. class="filter-time">
  191. <view class="time-container">
  192. <view
  193. v-for="(item, index) in timeOptions"
  194. :key="index"
  195. :class="{ active: dateFilter === item.value }"
  196. class="box-item"
  197. @click=" dateFilter = item.value ">
  198. {{ item.label }}
  199. </view>
  200. <view class="box-item empty" />
  201. </view>
  202. <view
  203. v-if="dateFilter === 'custom'"
  204. class="defined-filter">
  205. <view
  206. class="start time-box"
  207. @click="handleChooseDate('startDate')">
  208. <image
  209. :src="$static('images/icon/calendar_gray.png')"
  210. class="calendar-icon" />
  211. <text v-if="filterDate.startDate">
  212. {{ filterDate.startDate }}
  213. </text>
  214. <text v-else class="wk-placeholder">
  215. 开始时间
  216. </text>
  217. </view>
  218. <text class="ident">
  219. --
  220. </text>
  221. <view
  222. :class="{ active: !!filterDate.endDate }"
  223. class="end time-box"
  224. @click="handleChooseDate('endDate')">
  225. <image
  226. :src="$static('images/icon/calendar_gray.png')"
  227. class="calendar-icon" />
  228. <text v-if="filterDate.endDate">
  229. {{ filterDate.endDate }}
  230. </text>
  231. <text v-else class="wk-placeholder">
  232. 结束时间
  233. </text>
  234. </view>
  235. </view>
  236. <uni-popup ref="popupDate" type="picker">
  237. <wk-date-picker
  238. v-model="timeValue"
  239. type="date"
  240. @select="handleSelectTime" />
  241. </uni-popup>
  242. </view>
  243. <view
  244. class="btn-group">
  245. <button class="button" @click="handleFilter({})">
  246. 确定
  247. </button>
  248. </view>
  249. </template>
  250. <template v-if="queryType === 2&&listOver">
  251. <view
  252. v-for="item in dropList"
  253. :key="item.value"
  254. class="popup-content__item"
  255. @click="handleFilter(item)">
  256. <image :src="$static(item.img)" class="pic" />
  257. <text class="text">
  258. {{ item.label }}
  259. </text>
  260. </view>
  261. </template>
  262. </view>
  263. </view>
  264. </uni-popup>
  265. </view>
  266. </template>
  267. <script>
  268. import {GetCrmActivityPageList} from 'API/crm/crmActivity'
  269. import LogItem from '@/components/base/log-item.vue'
  270. import ActivityListItem from './activityListItem.vue'
  271. import { isObject } from '@/utils/types.js'
  272. import moment from 'moment'
  273. export default {
  274. name: 'ActivityList',
  275. components: {
  276. LogItem,
  277. ActivityListItem
  278. },
  279. props: {
  280. detailId: {
  281. type: [Number, String],
  282. required: true
  283. },
  284. type: {
  285. type: String,
  286. required: true
  287. },
  288. hiddenAdd: {
  289. type: Boolean,
  290. default: false
  291. },
  292. activityTitle: {
  293. type: String,
  294. default: ''
  295. }
  296. },
  297. data() {
  298. return {
  299. dropValue: -1,
  300. queryType: 1,
  301. dateFilter: 'all',
  302. filterDate: {
  303. endDate: '',
  304. startDate: '',
  305. },
  306. timeValue: '',
  307. dateField: null,
  308. typeMap: {
  309. crm_leads: 1,
  310. crm_customer: 2,
  311. crm_contacts: 3,
  312. crm_product: 4,
  313. crm_business: 5,
  314. crm_contract: 6,
  315. crm_receivables: 7
  316. },
  317. timeOptions: [
  318. { label: '全部', value: 'all' },
  319. { label: '最近七天', value: 'previous7day' },
  320. { label: '最近三十天', value: 'previous30day' },
  321. { label: '最近六十天', value: 'previous60day' },
  322. { label: '自定义', value: 'custom' }
  323. ],
  324. activityMap: {
  325. 1: {label: '线索', icon: '', color: '', path: '/pages_crm/leads/detail'},
  326. 2: {label: '客户', icon: 'wk-customer', color: '#487DFF', path: '/pages_crm/customer/detail'},
  327. 3: {label: '联系人', icon: 'wk-contacts', color: '#27BA4A', path: '/pages_crm/contacts/detail'},
  328. 4: {label: '产品', icon: '', color: '', path: '/pages_crm/product/detail'},
  329. 5: {label: '商机', icon: 'wk-business', color: '#FB9323', path: '/pages_crm/business/detail'},
  330. 6: {label: '合同', icon: 'wk-contract', color: '#FD5B4A', path: '/pages_crm/contract/detail'},
  331. 7: {label: '回款', icon: 'wk-receivables', color: '#FFB940', path: '/pages_crm/receivables/detail'},
  332. 8: {label: '日志', icon: 'wk-log', color: '#5864FF', path: '/pages_log/detail'},
  333. 9: {label: '审批', icon: 'wk-approve', color: '#9376FF', path: '/pages_examine/detail'},
  334. // 10: {label: '日程', icon: '', color: '', path: '/oa/event/detail'},
  335. 11: {label: '任务', icon: 'wk-o-task', color: '#D376FF', path: '/pages_task/detail'},
  336. },
  337. listData: [],
  338. listOver: false,
  339. page: 0,
  340. contentHeight: 0,
  341. popList: [
  342. { label: '新增跟进记录', value: 'record' },
  343. { label: '新增外勤签到', value: 'legwork' }
  344. ],
  345. dynamicName: {
  346. 1: '线索',
  347. 2: '客户',
  348. 3: '联系人',
  349. 4: '产品',
  350. 5: '商机',
  351. 6: '合同',
  352. 7: '回款',
  353. 8: '日志',
  354. 9: '审批',
  355. 10: '日程',
  356. 11: '任务',
  357. // 发邮件
  358. 12: '',
  359. 14: '回款计划'
  360. }
  361. }
  362. },
  363. computed: {
  364. // 下拉选项
  365. dropList() {
  366. const lib = [
  367. {label: '全部', value: -1, img: 'images/application/all.png'},
  368. {label: '客户', value: 2, img: 'images/application/customer.png'},
  369. {label: '任务', value: 11, img: 'images/application/task.png'},
  370. {label: '商机', value: 5, img: 'images/application/business.png'},
  371. {label: '合同', value: 6, img: 'images/application/contract.png'},
  372. {label: '联系人', value: 3, img: 'images/application/contacts.png'},
  373. {label: '回款', value: 7, img: 'images/application/receivables.png'},
  374. {label: '日志', value: 8, img: 'images/application/worklog.png'},
  375. {label: '审批', value: 9, img: 'images/application/examine.png'}
  376. ]
  377. const map = {
  378. crm_customer: [-1, 2, 11, 5, 6, 3, 7, 8, 9],
  379. crm_contacts: [-1, 3, 11, 8, 9],
  380. crm_business: [-1, 5, 11, 8, 9, 6, 7],
  381. crm_contract: [-1, 6, 7, 11, 8, 9]
  382. }
  383. const arr = map.hasOwnProperty(this.type) ? map[this.type] : []
  384. if (arr.length === 0) return []
  385. return lib.filter(o => arr.includes(o.value))
  386. },
  387. addAuth() {
  388. return this.$auth('crm.followRecord.save')
  389. },
  390. dropItem() {
  391. return this.dropList.find(o => o.value === this.dropValue)
  392. }
  393. },
  394. watch: {
  395. queryType: {
  396. handler(val) {
  397. this.getList(true)
  398. },
  399. immediate: true
  400. }
  401. },
  402. mounted() {
  403. const that = this
  404. uni.createSelectorQuery()
  405. .in(this)
  406. .select('.list-container')
  407. .boundingClientRect(data => {
  408. // 计算无数据时填充区域高度
  409. const clientHeight = uni.getSystemInfoSync().windowHeight
  410. this.contentHeight = clientHeight - data.top - uni.upx2px(38)
  411. })
  412. .exec()
  413. this.getList()
  414. },
  415. methods: {
  416. bgUrl(val) {
  417. return `url(${this.$static(val)})`
  418. },
  419. formatTime(time) {
  420. if (!time) return ''
  421. return moment(time).format('YYYY-MM-DD HH:mm')
  422. },
  423. /**
  424. * 判断字段是否展示
  425. * @param item
  426. * @return {boolean}
  427. */
  428. getShow(item) {
  429. return isObject(item.content)
  430. },
  431. /**
  432. * 获取列表数据
  433. */
  434. getList(refresh = false) {
  435. if (this.loading) return
  436. this.loading = true
  437. if (refresh) {
  438. this.listOver = false
  439. this.page = 0
  440. }
  441. let activityType = this.dropValue || ''
  442. if (activityType === -1) activityType = ''
  443. let params = {
  444. crmType: this.typeMap[this.type],
  445. activityTypeId: this.detailId,
  446. queryType: this.queryType
  447. }
  448. if (
  449. this.queryType === 2
  450. ) {
  451. params.activityType = activityType || ''
  452. }
  453. if (
  454. !this.$isEmpty(this.dateFilter) &&
  455. this.dateFilter != 'all' &&
  456. this.queryType === 1
  457. ) {
  458. params.dateFilter = this.dateFilter
  459. if (this.dateFilter === 'custom' &&
  460. !this.$isEmpty(this.filterDate.endDate) &&
  461. !this.$isEmpty(this.filterDate.startDate)) {
  462. params = {
  463. ...params,
  464. ...this.filterDate
  465. }
  466. }
  467. }
  468. this.page++
  469. GetCrmActivityPageList({
  470. page: this.page,
  471. ...params
  472. }).then(res => {
  473. this.loading = false
  474. this.listOver = res.lastPage || res.list.length === 0
  475. if (this.page === 1) {
  476. this.listData = []
  477. }
  478. this.listData = this.listData.concat(res.list)
  479. this.$nextTick(() => {
  480. this.calcScrollStatus()
  481. })
  482. }).catch(() => {
  483. this.loading = false
  484. this.listOver = true
  485. this.listData = []
  486. })
  487. },
  488. /**
  489. * 去自定义选择时间
  490. * @param {Object} field
  491. */
  492. handleChooseDate(field) {
  493. this.timeValue = this.filterDate[field]
  494. this.dateField = field
  495. this.$refs.popupDate.open()
  496. },
  497. /**
  498. * 选择时间回调
  499. * @param {Object} date
  500. * @param {Object} next
  501. */
  502. handleSelectTime(date, next) {
  503. next()
  504. this.filterDate[this.dateField] = date
  505. let start = this.filterDate.startDate || null
  506. let end = this.filterDate.endDate || null
  507. if (start && end) {
  508. if (start > end) {
  509. this.filterDate[this.dateField] = ''
  510. this.$toast('开始时间不能大于结束时间')
  511. }
  512. }
  513. },
  514. handleToFilter() {
  515. this.$refs.popupBottom.open()
  516. },
  517. handleCloseFilter() {
  518. this.$refs.popupBottom.close()
  519. },
  520. handleFilter(item) {
  521. let start = this.filterDate.startDate || null
  522. let end = this.filterDate.endDate || null
  523. if (this.dateFilter === 'custom') {
  524. if (!start || !end) {
  525. return this.$toast('请选择时间')
  526. }
  527. }
  528. if (!this.$isEmpty(item)) {
  529. this.dropValue = item.value
  530. }
  531. this.handleCloseFilter()
  532. this.getList(true)
  533. },
  534. calcScrollStatus() {
  535. const that = this
  536. uni.createSelectorQuery()
  537. .select('.scroll-view-hook')
  538. .fields({
  539. size: true,
  540. scrollOffset: true
  541. }, data => {
  542. console.log('scroll-view-hook info: ', data)
  543. // 如果不能滚动,并且还有下一页数据则立即去加载下一页
  544. if (!that.listOver && data.height >= data.scrollHeight) {
  545. that.getList()
  546. }
  547. })
  548. .exec()
  549. },
  550. getNext() {
  551. if (this.listOver) return
  552. this.getList()
  553. },
  554. handleCommand(index, command, next) {
  555. if (next) {
  556. next()
  557. }
  558. if (command.value === 'record') {
  559. this.$Router.navigateTo({
  560. url: '/pages_crm/addRecord',
  561. query: {
  562. id: this.detailId,
  563. type: this.type
  564. }
  565. })
  566. } else if (command.value === 'legwork') {
  567. this.$Router.navigateTo({
  568. url: '/pages_oa/legwork/add',
  569. query: {
  570. customerId: this.detailId
  571. }
  572. })
  573. }
  574. },
  575. handleToggleCommand() {
  576. if (this.type !== 'crm_customer') {
  577. this.handleCommand(null, { value: 'record' }, null)
  578. return
  579. }
  580. this.$refs.popup.open()
  581. },
  582. handleToDetail(item) {
  583. if (item.type === 1) return
  584. let d = this.activityMap[item.activityType] || null
  585. if (!d) return;
  586. this.$Router.navigateTo({
  587. url: d.path,
  588. query: {
  589. id: item.activityTypeId
  590. }
  591. })
  592. }
  593. }
  594. }
  595. </script>
  596. <style scoped lang="scss">
  597. .activity-list {
  598. width: 100%;
  599. background-color: white;
  600. box-sizing: border-box;
  601. padding: 38rpx 32rpx;
  602. border-radius: 18rpx 18rpx 0 0;
  603. .drop-wrapper {
  604. width: 100%;
  605. margin-bottom: 15rpx;
  606. @include left;
  607. .btn-group {
  608. flex: 1;
  609. @include left;
  610. .btn-group-item {
  611. padding: 5rpx 10rpx;
  612. margin: 0 5rpx;
  613. font-size: $wk-font-sm;
  614. border-radius: 5rpx;
  615. &.active {
  616. background-color: #344563;
  617. color: white;
  618. }
  619. }
  620. }
  621. .filter {
  622. font-size: $wk-font-sm;
  623. @include right;
  624. .pic {
  625. width: 32rpx;
  626. height: 32rpx;
  627. margin-right: 10rpx;
  628. }
  629. .text {
  630. margin-right: 10rpx;
  631. }
  632. .icon {
  633. font-size: $wk-font-sm;
  634. transform: rotate(90deg);
  635. }
  636. }
  637. }
  638. .list-container {
  639. .activity-item {
  640. border-bottom: 1rpx solid $border-color !important;
  641. padding: 15rpx 0 20rpx !important;
  642. margin-bottom: 20rpx;
  643. &:last-child {
  644. border-bottom: 0 none;
  645. padding-bottom: 0;
  646. }
  647. .user-info {
  648. @include left;
  649. .avatar {
  650. width: 65rpx;
  651. height: 65rpx;
  652. }
  653. .info {
  654. flex: 1;
  655. margin-left: 16rpx;
  656. .username {
  657. font-size: $wk-font-base;
  658. color: #333;
  659. @include left;
  660. .dynamic-name {
  661. margin-left: 10rpx;
  662. }
  663. }
  664. .text {
  665. font-size: $wk-font-mini;
  666. color: $light;
  667. }
  668. }
  669. .category {
  670. font-size: $wk-font-mini;
  671. color: $light;
  672. background-color: #EEEEEE;
  673. border-radius: 5rpx;
  674. padding: 5rpx 15rpx;
  675. }
  676. }
  677. .content {
  678. font-size: 26rpx;
  679. color: #666;
  680. margin-top: 20rpx;
  681. padding-left: 10rpx;
  682. &.record, &.legwork-content {
  683. .special {
  684. color: $theme-color;
  685. }
  686. }
  687. }
  688. }
  689. }
  690. .wk-drag-btn {
  691. .icon {
  692. font-size: 30rpx;
  693. line-height: 1.2;
  694. }
  695. .text {
  696. font-size: 22rpx;
  697. }
  698. }
  699. .no-data {
  700. width: 100%;
  701. text-align: center;
  702. font-size: 26rpx;
  703. color: #BBBBBB;
  704. background-position: center 200rpx;
  705. background-repeat: no-repeat;
  706. background-size: 36%;
  707. }
  708. .filter-popup {
  709. padding: 36rpx;
  710. .popup-header {
  711. position: relative;
  712. @include center;
  713. .text {
  714. font-size: $wk-font-large;
  715. }
  716. .icon {
  717. position: absolute;
  718. left: 0;
  719. top: 50%;
  720. transform: translateY(-50%);
  721. color: $gray;
  722. font-size: $wk-font-medium;
  723. }
  724. }
  725. .popup-content {
  726. width: 100%;
  727. flex-wrap: wrap;
  728. margin-top: 38rpx;
  729. @include left;
  730. .btn-group {
  731. width: 100%;
  732. @include center;
  733. position: absolute;
  734. bottom: 0rpx;
  735. left: 0;
  736. right: 0;
  737. padding:0 38rpx 30rpx;
  738. background: white;
  739. border-top: 1px solid white;
  740. .button {
  741. flex: 1;
  742. height: 80rpx;
  743. color: white;
  744. font-size: $wk-font-base;
  745. background-color: $theme-color;
  746. border-radius: 12rpx;
  747. @include center;
  748. }
  749. }
  750. .popup-content__item {
  751. width: 17%;
  752. flex-direction: column;
  753. margin: 25rpx 4%;
  754. @include center;
  755. .pic {
  756. width: 60rpx;
  757. height: 60rpx;
  758. }
  759. .text {
  760. color: $dark;
  761. font-size: $wk-font-base;
  762. margin-top: 10rpx;
  763. }
  764. }
  765. .filter-time {
  766. flex: 1;
  767. width: 100%;
  768. height: 560rpx;
  769. .title {
  770. font-size: $wk-font-base;
  771. font-weight: bold;
  772. color: $dark;
  773. }
  774. .time-container {
  775. width: 100%;
  776. display: flex;
  777. justify-content: space-between;
  778. flex-wrap: wrap;
  779. .box-item {
  780. width: 32%;
  781. height: 60rpx;
  782. color: #666;
  783. font-size: $wk-font-base;
  784. background-color: #f4f4f4;
  785. border-radius: 10rpx;
  786. margin-top: 20rpx;
  787. @include center;
  788. &.active {
  789. color: $theme-color;
  790. background-color: #E7F0FF;
  791. }
  792. &.empty {
  793. visibility: hidden;
  794. }
  795. }
  796. }
  797. .defined-filter {
  798. font-size: $wk-font-base;
  799. margin-top: 25rpx;
  800. @include left;
  801. .time-box {
  802. flex: 1;
  803. text-align: center;
  804. border: 1rpx solid #E1E1E1;
  805. border-radius: 6rpx;
  806. padding: 10rpx 15rpx;
  807. @include left;
  808. &.active {
  809. color: #333;
  810. }
  811. .calendar-icon {
  812. width: 38rpx;
  813. height: 38rpx;
  814. margin-right: 10rpx;
  815. }
  816. .wk-placeholder {
  817. font-size: inherit;
  818. }
  819. }
  820. .ident {
  821. color: #CDCDCD;
  822. padding: 0 30rpx;
  823. }
  824. }
  825. }
  826. }
  827. }
  828. }
  829. </style>