dataIndex.vue 23 KB

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