index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736
  1. <!-- 数据组件页面 -->
  2. <template>
  3. <view class="column flex-1 hb">
  4. <view class="topdata">
  5. <view class="topdata-box">
  6. <view>数据汇总</view>
  7. <view class="x-bc">
  8. <view class="topdata-item">
  9. <view class="topdata-item-num"><text>{{companyUserUserCount}}</text>人</view>
  10. <view>会员总数</view>
  11. </view>
  12. <view class="topdata-item">
  13. <view class="topdata-item-num"><text>{{companyUserCount}}</text>人</view>
  14. <view>今日新增会员</view>
  15. </view>
  16. </view>
  17. </view>
  18. <view>
  19. <u-collapse ref="puyaodameinvRef" :value="['0']" :border='false' @change='changelable'>
  20. <u-collapse-item name="0" :border='false'>
  21. <view slot="title">
  22. <text class="bold fs32">标签统计</text>
  23. <text class="fs24 base-color-9 ml12">左滑查看更多</text>
  24. </view>
  25. <text slot="value" class="statistics-slot-title">{{collapseLable?'展开':'收回'}}</text>
  26. <view slot="right-icon">
  27. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  28. </view>
  29. <view class="">
  30. <view class=" mb20 morelable">
  31. <view class="base-bg-f5 p20 radius20 boxlable mr40"
  32. v-for="(item,index) in lablelistnum" :key="index" style="display: inline-block;">
  33. <view class="base-color-3 ">{{item.tag}}</view>
  34. <view class="base-color mt8">
  35. <text class="fs40 bold">{{item.count}}</text>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </u-collapse-item>
  41. </u-collapse>
  42. </view>
  43. <view class="searchbox">
  44. <view class="searchbox-bar x-ac">
  45. <view :class="queryParam.type == index ? 'searchbox-item searchbox-active':'searchbox-item'"
  46. v-for="(item,index) in typeOption" :key="index" @click="handleType(index)">{{item.label}}</view>
  47. </view>
  48. <view class="x-ac ss" v-show="queryParam.type == 3">
  49. <view class="calendar-day x-c" @click="showCalendar = true"><u-icon name="calendar" color="#999"
  50. size="20"></u-icon>{{startTime}}</view>
  51. <view class="calendar-day x-c" @click="showCalendar = true"><u-icon name="calendar" color="#999"
  52. size="20"></u-icon>{{endTime}}</view>
  53. </view>
  54. </view>
  55. </view>
  56. <u-calendar :show="showCalendar" :mode="mode" @confirm="confirmCalendar" style="flex: 0;"
  57. @close="closeCalendar"></u-calendar>
  58. <view class="statistics pb120" :style="{height: contentH}">
  59. <u-collapse :border='false' :value='collapseValue' @change="changeCollapse">
  60. <u-collapse-item name="course">
  61. <text slot="title" class="statistics-title">课程统计</text>
  62. <text slot="value"
  63. class="statistics-slot-title">{{collapseValue.includes('course')?'收回':'展开'}}</text>
  64. <view slot="right-icon">
  65. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  66. </view>
  67. <view class="collapse-content x-ac">
  68. <view class="collapse-content-item">
  69. <view class="collapse-content-title">观看人数</view>
  70. <view class="collapse-content-num"><text>{{courseCount.count || 0}}</text>人</view>
  71. <view style="color: #1677ff;" v-show="queryParam.type == 0">
  72. 较昨天持平{{compare(courseCount.count,courseCount.yesterdayCount)}}</view>
  73. <view v-show="queryParam.type == 0">昨天{{courseCount.yesterdayCount || 0}}</view>
  74. </view>
  75. <view class="collapse-content-item">
  76. <view class="collapse-content-title">完播人数</view>
  77. <view class="collapse-content-num"><text>{{courseCount.completeCount || 0}}</text>人</view>
  78. <view style="color: #1677ff;" v-show="queryParam.type == 0">
  79. 较昨天持平{{compare(courseCount.completeCount,courseCount.yesterdayCountCompleteCount)}}
  80. </view>
  81. <view v-show="queryParam.type == 0">昨天{{courseCount.yesterdayCountCompleteCount || 0}}
  82. </view>
  83. </view>
  84. <view class="collapse-content-item">
  85. <view class="collapse-content-title">完播率</view>
  86. <view class="collapse-content-num"><text>{{courseCount.rate || 0}}</text>%</view>
  87. <view style="color: #1677ff;" v-show="queryParam.type == 0">
  88. 较昨天持平{{compare(courseCount.rate,courseCount.yesterdayRate)}}</view>
  89. <view v-show="queryParam.type == 0">昨天{{courseCount.yesterdayRate || 0}}</view>
  90. </view>
  91. </view>
  92. </u-collapse-item>
  93. <u-collapse-item name="questions">
  94. <text slot="title" class="statistics-title">答题统计</text>
  95. <text slot="value"
  96. class="statistics-slot-title">{{collapseValue.includes('questions')?'收回':'展开'}}</text>
  97. <view slot="right-icon">
  98. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  99. </view>
  100. <view class="collapse-content x-ac">
  101. <view class="collapse-content-item">
  102. <view class="collapse-content-title">答题人数</view>
  103. <view class="collapse-content-num"><text>{{quesCount.count || 0}}</text>人</view>
  104. <view style="color: #1677ff;" v-show="queryParam.type == 0">
  105. 较昨天持平{{compare(quesCount.count,quesCount.yesterdayCount)}}</view>
  106. <view v-show="queryParam.type == 0">昨天{{quesCount.yesterdayCount || 0}}</view>
  107. </view>
  108. <view class="collapse-content-item">
  109. <view class="collapse-content-title">正确人数</view>
  110. <view class="collapse-content-num"><text>{{quesCount.completeCount || 0}}</text>人</view>
  111. <view style="color: #1677ff;" v-show="queryParam.type == 0">
  112. 较昨天持平{{compare(quesCount.completeCount,quesCount.yesterdayCountCompleteCount)}}</view>
  113. <view v-show="queryParam.type == 0">昨天{{quesCount.yesterdayCountCompleteCount || 0}}</view>
  114. </view>
  115. <view class="collapse-content-item">
  116. <view class="collapse-content-title">正确率</view>
  117. <view class="collapse-content-num"><text>{{quesCount.rate || 0}}</text>%</view>
  118. <view style="color: #1677ff;" v-show="queryParam.type == 0">
  119. 较昨天持平{{compare(quesCount.rate,quesCount.yesterdayRate)}}</view>
  120. <view v-show="queryParam.type == 0">昨天{{quesCount.yesterdayRate || 0}}</view>
  121. </view>
  122. </view>
  123. </u-collapse-item>
  124. <u-collapse-item name="redenvelope">
  125. <text slot="title" class="statistics-title">红包统计</text>
  126. <text slot="value"
  127. class="statistics-slot-title">{{collapseValue.includes('redenvelope')?'收回':'展开'}}</text>
  128. <view slot="right-icon">
  129. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  130. </view>
  131. <view>
  132. <view class="collapse-content x-ac">
  133. <view class="collapse-content-item">
  134. <view class="collapse-content-title">答题红包数</view>
  135. <view class="collapse-content-num"><text>{{redPacketCount.count || 0}}</text>个</view>
  136. <view style="color: #1677ff;" v-show="queryParam.type == 0">
  137. 较昨天持平{{compare(redPacketCount.count,redPacketCount.yesterdayCount)}}</view>
  138. <view v-show="queryParam.type == 0">昨天{{redPacketCount.yesterdayCount || 0}}</view>
  139. </view>
  140. <view class="collapse-content-item">
  141. <view class="collapse-content-title">答题红包金额</view>
  142. <view class="collapse-content-num"><text>{{redPacketCount.amount || '0.00'}}</text>元
  143. </view>
  144. <view style="color: #1677ff;" v-show="queryParam.type == 0">
  145. 较昨天持平{{compare(redPacketCount.amount,redPacketCount.yesterdayAmount,1)}}</view>
  146. <view v-show="queryParam.type == 0">昨天{{redPacketCount.yesterdayAmount || '0.00'}}
  147. </view>
  148. </view>
  149. </view>
  150. <view class="collapse-content x-ac" style="padding: 8px 0;">
  151. <view class="collapse-content-item">
  152. <view class="collapse-content-title">新会员奖励数</view>
  153. <view class="collapse-content-num"><text>{{redPacketCount.newCount || 0}}</text>个</view>
  154. <view style="color: #1677ff;" v-show="queryParam.type == 0">
  155. 较昨天持平{{compare(redPacketCount.newCount,redPacketCount.yesterdayNewCount)}}</view>
  156. <view v-show="queryParam.type == 0">昨天{{redPacketCount.yesterdayNewCount || 0}}</view>
  157. </view>
  158. <view class="collapse-content-item">
  159. <view class="collapse-content-title">新会员奖励金额</view>
  160. <view class="collapse-content-num">
  161. <text>{{redPacketCount.totalAmount || '0.00'}}</text>元
  162. </view>
  163. <view style="color: #1677ff;" v-show="queryParam.type == 0">
  164. 较昨天持平{{compare(redPacketCount.totalAmount,redPacketCount.yesterdayTotalAmount,1)}}
  165. </view>
  166. <view v-show="queryParam.type == 0">昨天{{redPacketCount.yesterdayTotalAmount || '0.00'}}
  167. </view>
  168. </view>
  169. </view>
  170. </view>
  171. </u-collapse-item>
  172. <u-collapse-item name="funnel" v-if="user.userType==0">
  173. <text slot="title" class="statistics-title">转化漏斗图</text>
  174. <text slot="value"
  175. class="statistics-slot-title">{{collapseValue.includes('funnel')?'收回':'展开'}}</text>
  176. <view slot="right-icon">
  177. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  178. </view>
  179. <view >
  180. <funnelChart :getratelist="getrateimg" />
  181. </view>
  182. </u-collapse-item>
  183. <u-collapse-item name="rank" v-if="user.userType==0">
  184. <text slot="title" class="statistics-title">排行榜</text>
  185. <text slot="value"
  186. class="statistics-slot-title">{{collapseValue.includes('rank')?'收回':'展开'}}</text>
  187. <view slot="right-icon">
  188. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  189. </view>
  190. <view class="flex-1">
  191. <view class="mt40">
  192. <view class="justify-between align-center">
  193. <view class="base-color-3 bold fs32">群管排行榜</view>
  194. <view class="justify-start" @click="ordergroup(1)"
  195. v-if="orderGroup=='asc'">
  196. <u-icon name="list-dot" size="20"></u-icon>
  197. <view>按正序(前20名)</view>
  198. </view>
  199. <view class="justify-start" @click="ordergroup(0)" v-else>
  200. <u-icon name="list-dot" size="20"></u-icon>
  201. <view>按倒序(后20名)</view>
  202. </view>
  203. </view>
  204. <view class="centerV">
  205. <u-tabs :list="list1" @click="clickTab" lineColor='#1773ff' lineWidth='40'
  206. activeStyle="font-weight:bold"></u-tabs>
  207. </view>
  208. <view class="justify-start align-center mtb28"
  209. v-for="(item,index) in rankListA"
  210. :key="index">
  211. <u-avatar :src="item.avatar" size="40"></u-avatar>
  212. <view class="flex-1 ml20">
  213. <view class="justify-between mb16">
  214. <view class="base-color-3">{{item.name}}</view>
  215. <view>{{item.rate}}%</view>
  216. </view>
  217. <u-line-progress :percentage="30" activeColor='#1773ff'/>
  218. </view>
  219. </view>
  220. <view v-if="rankListA.length==0" class="center mtb32">暂无数据</view>
  221. </view>
  222. <view class="mt60 column flex-1">
  223. <view class="justify-between align-center">
  224. <view class="base-color-3 bold fs32">课程排行榜</view>
  225. <view class="justify-start" @click="ordergroupB(1)"
  226. v-if="orderGroupB=='asc'">
  227. <u-icon name="list-dot" size="20"></u-icon>
  228. <view>按正序(前20名)</view>
  229. </view>
  230. <view class="justify-start" @click="ordergroupB(0)" v-else>
  231. <u-icon name="list-dot" size="20"></u-icon>
  232. <view>按倒序(后20名)</view>
  233. </view>
  234. </view>
  235. <view class="centerV">
  236. <u-tabs :list="list1" @click="clickTabB" lineColor='#1773ff' lineWidth='40'
  237. activeStyle="font-weight:bold"></u-tabs>
  238. </view>
  239. <view class="justify-start align-center"
  240. v-for="(item,index) in rankListB"
  241. :key="index">
  242. <view class="flex-1 ml20">
  243. <view class="justify-between mb16">
  244. <view class="base-color-3">{{item.name}}</view>
  245. <view>{{item.rate}}%</view>
  246. </view>
  247. <u-line-progress :percentage="30" activeColor='#ed0922'/>
  248. </view>
  249. </view>
  250. <view v-if="rankListB.length==0" class="center mtb32">暂无数据</view>
  251. </view>
  252. </view>
  253. </u-collapse-item>
  254. </u-collapse>
  255. </view>
  256. </view>
  257. </template>
  258. <script>
  259. import code from "../../../uni_modules/uview-ui/libs/config/props/code"
  260. import funnelChart from "../components/chart.vue"
  261. import {
  262. getCompanyUserAndUserCount,
  263. getCourseCount,
  264. getQuesCount,
  265. getRecPacketCount,
  266. getlableNum,
  267. getcourseRate,
  268. getGroupRanklist,
  269. getCourseRanklist
  270. } from "@/api/courseManage.js"
  271. export default {
  272. components: {
  273. funnelChart,
  274. },
  275. data() {
  276. return {
  277. list1: [{
  278. name: '按完播率',
  279. }, {
  280. name: '按正确率'
  281. }],
  282. orderGroup:'asc',
  283. orderGroupB:'asc',
  284. showCalendar: false,
  285. mode: 'range',
  286. typeOption: [{
  287. label: '今日',
  288. value: 0
  289. }, {
  290. label: '昨日',
  291. value: 1
  292. }, {
  293. label: '本月',
  294. value: 2
  295. }, {
  296. label: '自定义',
  297. value: 3
  298. }],
  299. queryParam: {
  300. type: 0
  301. },
  302. contentH: 0,
  303. collapseValue: ['course', 'questions', 'redenvelope', 'funnel','rank'],
  304. user: {},
  305. todayday: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd'),
  306. startTime: '',
  307. endTime: '',
  308. companyUserCount: 0,
  309. companyUserUserCount: 0,
  310. courseCount: {},
  311. quesCount: {},
  312. redPacketCount: {},
  313. collapseLable: false,
  314. lablelistnum: [],
  315. getrateimg: {},
  316. rankListA:[],
  317. rankListB:[],
  318. activeA:0,
  319. activeB:0
  320. }
  321. },
  322. computed: {
  323. compare() {
  324. return (today, yesterday, type) => {
  325. const num = Number(yesterday || 0) - Number(today || 0)
  326. return type == 1 ? num.toFixed(2) : 0
  327. }
  328. }
  329. },
  330. mounted() {
  331. this.getHeight()
  332. this.user = uni.getStorageSync("companyUserInfo") ? JSON.parse(uni.getStorageSync("companyUserInfo")) : {}
  333. // this.getUserCount()
  334. // this.resetDate()
  335. this.getlableData()
  336. this.getrateList()
  337. this.getrankCourse()
  338. this.getrankgroup()
  339. },
  340. methods: {
  341. clickTab(item) {
  342. this.activeA=item.index+1
  343. this.getrankgroup()
  344. console.log(this.activeA)
  345. },
  346. clickTabB(item) {
  347. this.activeB=item.index+1
  348. this.getrankCourse()
  349. console.log(this.activeA)
  350. },
  351. ordergroup(item){
  352. if(item==0){
  353. this.orderGroup='asc'
  354. this.getrankgroup()
  355. }else{
  356. this.orderGroup='desc'
  357. this.getrankgroup()
  358. }
  359. },
  360. ordergroupB(item){
  361. if(item==0){
  362. this.orderGroupB='asc'
  363. this.getrankCourse()
  364. }else{
  365. this.orderGroupB='desc'
  366. this.getrankCourse()
  367. }
  368. },
  369. getrankCourse(){
  370. //获取课程排行
  371. this.startTime = this.todayday
  372. this.endTime = this.todayday
  373. this.resetDate()
  374. const params = {
  375. companyId: this.user.companyId,
  376. endTime: this.endTime+' 23:59:59',
  377. startTime: this.startTime+' 00:00:00',
  378. order:this.orderGroupB,
  379. type: this.activeB, // 0:经销商/1:群管
  380. }
  381. getCourseRanklist(params).then(res=>{
  382. if (res.code == 200) {
  383. this.rankListB = res.data
  384. } else {
  385. uni.showToast({
  386. icon: 'none',
  387. title: res.msg
  388. })
  389. }
  390. })
  391. },
  392. getrankgroup(){
  393. //获取群管排行
  394. this.startTime = this.todayday
  395. this.endTime = this.todayday
  396. this.resetDate()
  397. const params = {
  398. companyId: this.user.companyId,
  399. endTime: this.endTime+' 23:59:59',
  400. startTime: this.startTime+' 00:00:00',
  401. order:this.orderGroup,
  402. type: this.activeA, // 0:经销商/1:群管
  403. }
  404. getGroupRanklist(params).then(res=>{
  405. if (res.code == 200) {
  406. console.log(res)
  407. this.rankListA = res.data
  408. } else {
  409. uni.showToast({
  410. icon: 'none',
  411. title: res.msg
  412. })
  413. }
  414. })
  415. },
  416. getrateList() {
  417. //获取漏斗图
  418. this.startTime = this.todayday
  419. this.endTime = this.todayday
  420. this.resetDate()
  421. const params = {
  422. companyId: this.user.companyId,
  423. companyUserId: this.user.userId,
  424. endTime: this.endTime+' 23:59:59',
  425. startTime: this.startTime+' 00:00:00',
  426. courseId: this.courseid,
  427. videoId: this.courseids,
  428. type: this.user.userType == '00' ? 0 : 1, // 0:经销商/1:群管
  429. }
  430. getcourseRate(params).then(res => {
  431. if (res.code == 200) {
  432. this.getrateimg = res
  433. } else {
  434. uni.showToast({
  435. icon: 'none',
  436. title: res.msg
  437. })
  438. }
  439. })
  440. },
  441. getlableData() {
  442. const params = {
  443. type: this.user.userType == '00' ? 0 : 1, // 0:经销商/1:群管
  444. }
  445. getlableNum(params).then(res => {
  446. if (res.code == 200) {
  447. this.lablelistnum = res.data
  448. this.$nextTick(() => {
  449. this.$refs.puyaodameinvRef.init()
  450. })
  451. console.log(res)
  452. } else {
  453. uni.showToast({
  454. icon: 'none',
  455. title: res.msg,
  456. });
  457. }
  458. })
  459. },
  460. changelable(e) {
  461. if (e[0].status = 'open') {
  462. this.collapseLable = true
  463. }
  464. },
  465. getHeight() {
  466. const windowHeight = uni.getSystemInfoSync().windowHeight
  467. const query = uni.createSelectorQuery().in(this);
  468. query
  469. .select(".topdata")
  470. .boundingClientRect((data) => {
  471. this.contentH = `calc(${windowHeight}px - ${data.height}px - 56px)`
  472. })
  473. .exec();
  474. },
  475. resetDate() {
  476. if (this.queryParam.type == 0) {
  477. this.startTime = this.todayday
  478. this.endTime = this.todayday
  479. } else if (this.queryParam.type == 1) {
  480. let yesterday = new Date();
  481. yesterday.setDate(yesterday.getDate() - 1);
  482. this.startTime = uni.$u.timeFormat(yesterday, 'yyyy-mm-dd')
  483. this.endTime = uni.$u.timeFormat(yesterday, 'yyyy-mm-dd')
  484. } else if (this.queryParam.type == 2) {
  485. let today = new Date();
  486. let lastDayOfMonth = new Date(today.getFullYear(), today.getMonth() + 1, 0);
  487. this.startTime = uni.$u.timeFormat(this.todayday, 'yyyy-mm') + '-01'
  488. this.endTime = uni.$u.timeFormat(lastDayOfMonth, 'yyyy-mm-dd')
  489. } else if (this.queryParam.type == 3) {
  490. this.startTime = this.todayday
  491. this.endTime = this.todayday
  492. }
  493. this.getCount()
  494. },
  495. handleType(type) {
  496. if (this.queryParam.type == type) {
  497. return
  498. }
  499. this.queryParam.type = type
  500. if (this.queryParam.type == 3) {
  501. this.getHeight()
  502. }
  503. this.resetDate()
  504. this.getrateList()
  505. this.getrankCourse()
  506. this.getrankgroup()
  507. },
  508. changeCollapse(e) {
  509. this.collapseValue = e.filter(item => item.status == 'open').map(it => it.name)
  510. },
  511. closeCalendar() {
  512. this.showCalendar = false
  513. },
  514. confirmCalendar(e) {
  515. this.startTime = e[0]
  516. this.endTime = e[e.length - 1]
  517. this.showCalendar = false
  518. this.getCount()
  519. },
  520. getUserCount() {
  521. const day = uni.$u.timeFormat(new Date(), 'yyyy-mm-dd')
  522. const param = {
  523. companyId: this.user.companyId,
  524. companyUserId: this.user.userId,
  525. courseId: '',
  526. endTime: day + ' 23:59:59',
  527. startTime: day + ' 00:00:00',
  528. type: this.user.userType == '00' ? 0 : 1, // 0:经销商/1:群管
  529. }
  530. getCompanyUserAndUserCount(param).then(res => {
  531. if (res.code == 200) {
  532. this.companyUserCount = res.data.companyUserCount || 0
  533. this.companyUserUserCount = res.data.companyUserUserCount || 0
  534. } else {
  535. uni.showToast({
  536. icon: 'none',
  537. title: res.msg,
  538. });
  539. }
  540. })
  541. },
  542. getCount() {
  543. const param = {
  544. companyId: this.user.companyId,
  545. companyUserId: this.user.userId,
  546. courseId: '',
  547. endTime: this.endTime + ' 23:59:59',
  548. startTime: this.startTime + ' 00:00:00',
  549. type: this.user.userType == '00' ? 0 : 1, // 0:经销商/1:群管
  550. }
  551. this.getCourseCount(param)
  552. this.getQuesCount(param)
  553. this.getRecPacketCount(param)
  554. },
  555. getCourseCount(param) {
  556. getCourseCount(param).then(res => {
  557. if (res.code == 200) {
  558. this.courseCount = res.data
  559. } else {
  560. uni.showToast({
  561. icon: 'none',
  562. title: res.msg,
  563. });
  564. }
  565. })
  566. },
  567. getQuesCount(param) {
  568. getQuesCount(param).then(res => {
  569. if (res.code == 200) {
  570. this.quesCount = res.data
  571. } else {
  572. uni.showToast({
  573. icon: 'none',
  574. title: res.msg,
  575. });
  576. }
  577. })
  578. },
  579. getRecPacketCount(param) {
  580. getRecPacketCount(param).then(res => {
  581. if (res.code == 200) {
  582. this.redPacketCount = res.data
  583. } else {
  584. uni.showToast({
  585. icon: 'none',
  586. title: res.msg,
  587. });
  588. }
  589. })
  590. }
  591. }
  592. }
  593. </script>
  594. <style scoped lang="scss">
  595. .boxlable {
  596. width: 47%;
  597. }
  598. .morelable {
  599. width: 100%;
  600. overflow-x: auto;
  601. /* 添加横向滚动条 */
  602. white-space: nowrap;
  603. }
  604. .container {
  605. font-family: PingFang SC, PingFang SC;
  606. font-weight: 400;
  607. font-size: 14px;
  608. color: #222222;
  609. }
  610. .calendar-day {
  611. font-family: PingFang SC, PingFang SC;
  612. font-weight: 400;
  613. font-size: 12px;
  614. color: #999;
  615. flex: 1;
  616. margin: 10px 10px 0 10px;
  617. background-color: #f5f5f5;
  618. border-radius: 4px;
  619. }
  620. .topdata {
  621. padding-top: 25px;
  622. background: linear-gradient(to right, rgba(225, 238, 255, 1), rgba(223, 224, 254, 1));
  623. &-box {
  624. padding: 12px;
  625. margin: 0 12px 0 12px;
  626. background-color: rgba(255, 255, 255, 0.5);
  627. border-radius: 8px 8px;
  628. font-family: PingFang SC, PingFang SC;
  629. font-weight: 400;
  630. font-size: 14px;
  631. color: #222222;
  632. }
  633. &-item {
  634. width: 50%;
  635. text-align: center;
  636. padding: 8px;
  637. box-sizing: border-box;
  638. &-num {
  639. color: #1677ff;
  640. text {
  641. font-family: DIN, DIN;
  642. font-weight: bold;
  643. font-size: 25px;
  644. }
  645. }
  646. }
  647. .searchbox {
  648. background-color: #fff;
  649. border-radius: 8rpx 8rpx 0 0;
  650. padding: 15px;
  651. &-item {
  652. height: 23px;
  653. line-height: 23px;
  654. width: 65px;
  655. background: #f5f5f5;
  656. text-align: center;
  657. border-radius: 5px;
  658. font-family: PingFang SC, PingFang SC;
  659. font-weight: 400;
  660. font-size: 12px;
  661. color: #888;
  662. }
  663. &-active {
  664. color: #fff !important;
  665. background-color: #1677ff !important;
  666. }
  667. }
  668. }
  669. .statistics {
  670. background-color: #fff;
  671. overflow-y: auto;
  672. box-sizing: border-box;
  673. &-title {
  674. font-family: PingFang SC, PingFang SC;
  675. font-weight: bold;
  676. font-size: 16px;
  677. color: #222222;
  678. }
  679. &-slot-title {
  680. font-size: 12px;
  681. color: #1677ff;
  682. }
  683. .collapse-content {
  684. margin: 0 -8px -8rpx 0;
  685. &-item {
  686. flex: 1;
  687. padding: 12px;
  688. box-sizing: border-box;
  689. border-radius: 10px;
  690. background: #f5f5f5;
  691. font-family: PingFang SC, PingFang SC;
  692. font-weight: 400;
  693. font-size: 10px;
  694. color: #222222;
  695. margin: 0 8px 8rpx 0;
  696. }
  697. &-title {
  698. font-size: 14px;
  699. margin-bottom: 10px;
  700. }
  701. &-num {
  702. color: #1677ff;
  703. font-size: 10px;
  704. text {
  705. font-family: DIN, DIN;
  706. font-weight: bold;
  707. font-size: 25px;
  708. }
  709. }
  710. }
  711. }
  712. </style>