dataIndex.vue 23 KB

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