index.vue 62 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194
  1. <template>
  2. <div class="statistics-dashboard">
  3. <!-- 数据概览 (Data Overview) -->
  4. <el-card class="overview-section" shadow="never">
  5. <el-row :gutter="20">
  6. <el-col :xs="24" :sm="24" :md="16" :lg="16" :xl="16" class="companybox">
  7. <img src="../assets/images/topbg.png" alt="" class="topimg">
  8. <img src="../assets/images/topbg.png" alt="" class="bottomimg">
  9. <div class="companyboxtitle">
  10. 企业数据
  11. </div>
  12. <div class="companyflex">
  13. <div class="topbg companycard cardafter">
  14. <div class="card-title1">
  15. <img src="../assets/images/tab_company.png" alt="" class="icon-img">
  16. 分公司数量
  17. </div>
  18. <div class="card-value highlight1">
  19. <count-to :start-val="0" :end-val="dealderCount" :duration="3600"
  20. class="card-panel-num companynumber" />
  21. </div>
  22. </div>
  23. <div class="companycard cardafter">
  24. <div class="card-title1">
  25. <img src="../assets/images/salesperson.png" alt="" class="icon-img">
  26. 销售数量
  27. </div>
  28. <div class="card-value highlight1">
  29. <count-to :start-val="0" :end-val="groupMgrCount" :duration="3600"
  30. class="card-panel-num companynumber" />
  31. </div>
  32. </div>
  33. <div class="companycard cardafter">
  34. <div class="card-title1">
  35. <img src="../assets/images/member.png" alt="" class="icon-img">
  36. 会员数量
  37. </div>
  38. <div class="card-value highlight1">
  39. <count-to :start-val="0" :end-val="memberCount" :duration="3600" class="card-panel-num companynumber" />
  40. <span class="highlight-today-add companyadd">+{{todayIncreaseUserNum}}</span>
  41. </div>
  42. </div>
  43. <div class="cardafter companycard">
  44. <div class="card-title1">
  45. <img src="../assets/images/tab_enterprise.png" alt="" class="icon-img">
  46. 企微数量
  47. </div>
  48. <div class="card-value highlight1">
  49. <count-to :start-val="0" :end-val="qwMemberNum" :duration="3600" class="card-panel-num companynumber" />
  50. </div>
  51. </div>
  52. <div class="botttombg companycard">
  53. <div class="card-title1">
  54. <svg-icon icon-class="phone" />
  55. pad使用情况
  56. </div>
  57. <div class="card-value highlight1">
  58. <count-to :start-val="0" :end-val="padUsedNum" :duration="3600" class="card-panel-num companynumber" />
  59. /
  60. <template v-if="typeof padTotalNum === 'number'">
  61. <count-to :start-val="0" :end-val="padTotalNum" :duration="1800" class="card-panel-num companynumber" />
  62. </template>
  63. <template v-else>
  64. <span class="card-panel-num companynumber">{{ padTotalNum }}</span>
  65. </template>
  66. </div>
  67. </div>
  68. </div>
  69. </el-col>
  70. <el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8" class="propertyboxtitle">
  71. <div class="property_title">
  72. 资产概览
  73. </div>
  74. <div class="propertyboxflex">
  75. <div class="property-card propertyline">
  76. <div class="property-title">
  77. <i class="el-icon-money"></i>
  78. 企业资产(元)
  79. </div>
  80. <div class="card-value highlight">
  81. <count-to :start-val="0" :end-val="balance" :duration="3600" class="card-panel-num" />
  82. </div>
  83. </div>
  84. <div class="property-card">
  85. <div class="property-title">
  86. <span>今日消耗 (元)</span>
  87. </div>
  88. <div class="card-value highlight" style="color: rgba(32, 33, 36, 1);margin-top: 10px;">
  89. <count-to :start-val="0" :end-val="todayComsumption" :duration="3600" class="card-panel-num" />
  90. </div>
  91. <div class="card-compare">
  92. 较昨日 <span>+1</span>
  93. </div>
  94. </div>
  95. </div>
  96. </el-col>
  97. </el-row>
  98. <el-row :gutter="20">
  99. <el-col :xs="24" :sm="24" :md="16" :lg="16" :xl="16">
  100. <div class="operatetitle">
  101. 经营数据
  102. </div>
  103. <div class="operatetitle-col">
  104. <div class="operatetitle-card">
  105. <div class="card-title">
  106. <i class="el-icon-shopping-cart-full"></i>
  107. 收款总数
  108. </div>
  109. <div class="operate-value highlight">
  110. <count-to :start-val="0" :end-val="recvTotalNum" :duration="3600" class="card-panel-num" />
  111. <div class="yesterdaybox">
  112. 较昨日 <span class="highlight-today-add2">+{{recvTodayNum}}</span>
  113. </div>
  114. </div>
  115. <div class="card-badge">
  116. </div>
  117. </div>
  118. <div class="operatetitle-card">
  119. <div class="card-title">
  120. <i class="el-icon-shopping-cart-full"></i>
  121. 订单总数
  122. </div>
  123. <div class="operate-value highlight">
  124. <count-to :start-val="0" :end-val="orderTotalNum" :duration="3600" class="card-panel-num" />
  125. <div class="yesterdaybox">
  126. 较昨日 <span class="highlight-today-add2">+{{todayOrderNum}}</span>
  127. </div>
  128. </div>
  129. <div class="card-badge">
  130. </div>
  131. </div>
  132. <div class="operatetitle-card">
  133. <div class="card-title">
  134. 平台今日看课人数
  135. </div>
  136. <div class="operate-value highlight">
  137. <count-to :start-val="0" :end-val="todayWatchUserCount" :duration="3600" class="card-panel-num" />
  138. </div>
  139. <div class="card-sub">
  140. <span>配额上限</span>
  141. <span class="sub-value">
  142. <count-to :start-val="0" :end-val="todayWatchUserCount" :duration="3600" class="card-panel-num"
  143. style="color: rgba(49, 185, 154, 1);" />
  144. /
  145. <count-to :start-val="0" :end-val="versionLimit" :duration="3600" class="card-panel-num" />
  146. </span>
  147. </div>
  148. <el-progress :percentage="versionLimitPercent" :show-text="false"
  149. color="#409EFF"></el-progress>
  150. </div>
  151. <div class="operatetitle-card">
  152. <div class="card-title">
  153. <i class="el-icon-shopping-cart-full"></i>
  154. 商品总数
  155. </div>
  156. <div class="operate-value highlight">
  157. <count-to :start-val="0" :end-val="goodsTotalNum" :duration="3600" class="card-panel-num" />
  158. <div class="yesterdaybox">
  159. 较昨日 <span class="highlight-today-add2">+{{todayGoodsNum}}</span>
  160. </div>
  161. </div>
  162. <div class="card-badge">
  163. </div>
  164. </div>
  165. </div>
  166. </el-col>
  167. <el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8" style="padding-left: 15px;">
  168. <div class="internetbox">
  169. <div class="internet-cardtop">
  170. <div class="cardinnerbox">
  171. <div class="cardtopimg">
  172. <img src="../assets/images/liuliang.png" alt=""><span>剩余流量</span>
  173. </div>
  174. <div class="cardtopnumber">
  175. <span>{{formatBytes(this.trafficCount)}}</span>
  176. </div>
  177. </div>
  178. <div class="progress">
  179. <el-progress :percentage="90" :show-text="false" define-back-color="#000">
  180. </el-progress>
  181. </div>
  182. <div class="cardinnerbox2">
  183. <div>
  184. 今日消耗 <span>{{formatBytes(this.todayTraffic)}}</span>
  185. </div>
  186. <div>
  187. 本月 <span>{{formatBytes(this.thisMonthTraffic)}}</span>
  188. </div>
  189. </div>
  190. </div>
  191. <div class="internetbox-messge">
  192. <div class="internet-card">
  193. <img src="../assets/images/message.png" alt="">
  194. <span class="internet-title">
  195. 短信剩余条数 (条)
  196. </span>
  197. </div>
  198. <div class="internet-number">
  199. 0
  200. </div>
  201. </div>
  202. </div>
  203. </el-col>
  204. </el-row>
  205. </el-card>
  206. <!-- 分析概览 (Analysis Overview) -->
  207. <div class="analysis-section" shadow="never">
  208. <div slot="header" class="header">
  209. <div>分析概览</div>
  210. <div class="tab-group">
  211. <el-radio-group v-model="queryTime" size="medium" @change="handleAnalysis">
  212. <el-radio-button label="今日"></el-radio-button>
  213. <el-radio-button label="昨日"></el-radio-button>
  214. <el-radio-button label="本周"></el-radio-button>
  215. <el-radio-button label="本月"></el-radio-button>
  216. <el-radio-button label="上月"></el-radio-button>
  217. </el-radio-group>
  218. </div>
  219. <div class="action-group">
  220. <div v-if="this.$store.state.user.medicalMallConfig.statics">
  221. <!-- 选择部门 -->
  222. <el-select v-model="deptId" placeholder="请选择部门" size="small" @change="handleDeptChange" style="width: 150px">
  223. <el-option
  224. v-for="company in deptOptions"
  225. :key="company.deptId"
  226. :label="company.deptName"
  227. :value="company.deptId"
  228. />
  229. </el-select>
  230. <!-- 选择销售公司 -->
  231. <el-select v-model="companyId" placeholder="请选择销售公司" size="small" clearable @change="handleCompanyChange" style="width: 180px" >
  232. <el-option
  233. v-for="company in companyOptions"
  234. :key="company.companyId"
  235. :label="company.companyName"
  236. :value="company.companyId"
  237. />
  238. </el-select>
  239. </div>
  240. <el-radio-group v-model="userTypeText" @change="handleUserType">
  241. <el-radio-button label="会员"></el-radio-button>
  242. <el-radio-button label="企微"></el-radio-button>
  243. </el-radio-group>
  244. <el-dropdown @command="handleAutoRefresh" trigger="click">
  245. <el-button size="small" plain>
  246. 自动刷新
  247. <i class="el-icon-arrow-down el-icon--right"></i>
  248. </el-button>
  249. <el-dropdown-menu slot="dropdown">
  250. <el-dropdown-item :command="0" :class="{ 'is-active': !autoRefreshInterval }">关闭</el-dropdown-item>
  251. <el-dropdown-item :command="5" :class="{ 'is-active': autoRefreshInterval === 5 }">5分钟</el-dropdown-item>
  252. <el-dropdown-item :command="10"
  253. :class="{ 'is-active': autoRefreshInterval === 10 }">10分钟</el-dropdown-item>
  254. <el-dropdown-item :command="15"
  255. :class="{ 'is-active': autoRefreshInterval === 15 }">15分钟</el-dropdown-item>
  256. </el-dropdown-menu>
  257. </el-dropdown>
  258. <el-button size="small" plain icon="el-icon-refresh" type="primary" @click="manualRefresh">手动刷新</el-button>
  259. </div>
  260. </div>
  261. </div>
  262. <div>
  263. <el-row :gutter="20">
  264. <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" style="position: relative">
  265. <div class="analysis-card-check" :class="selectedDiv===0?'analysis-card-check-selected color':''"
  266. @click="handleToggleDiv(0)">
  267. <div class="analysis-card">
  268. <img class="card-icon" src="../assets/images/cishu_views.png"></img>
  269. <div class="card-content">
  270. <div class="card-row">
  271. <span>观看人数</span>
  272. <span class="highlight">
  273. <count-to :start-val="0" :end-val="watchUserCount" :duration="3600" class="card-panel-num" />
  274. </span>
  275. </div>
  276. <div class="card-row">
  277. <span>完播人数</span>
  278. <span class="highlight">
  279. <count-to :start-val="0" :end-val="completedUserCount" :duration="3600" class="card-panel-num" />
  280. </span>
  281. </div>
  282. <div class="card-row">
  283. <span>完播率</span>
  284. <span class="highlight">{{completedRate}}%</span>
  285. </div>
  286. </div>
  287. </div>
  288. <div class="analysis-card">
  289. <img class="card-icon" src="../assets/images/number_views.png"></img>
  290. <div class="card-content">
  291. <div class="card-row">
  292. <span>观看次数</span>
  293. <span class="highlight-red">
  294. <count-to :start-val="0" :end-val="watchCount" :duration="3600" class="card-panel-num" /></span>
  295. </div>
  296. <div class="card-row">
  297. <span>完播次数</span>
  298. <span class="highlight-red">
  299. <count-to :start-val="0" :end-val="completedCount" :duration="3600" class="card-panel-num" />
  300. </span>
  301. </div>
  302. <div class="card-row">
  303. <span>视频完播率</span>
  304. <span class="highlight-red">{{watchRate}}%</span>
  305. </div>
  306. </div>
  307. </div>
  308. </div>
  309. </el-col>
  310. <el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6" style="position: relative">
  311. <div class="analysis-card-check" :class="selectedDiv===1?'analysis-card-check-selected color':''"
  312. @click="handleToggleDiv(1)">
  313. <div class="analysis-card">
  314. <img class="card-icon" src="../assets/images/renshu_views.png"></img>
  315. <div class="card-content">
  316. <div class="card-row">
  317. <span>答题人数</span>
  318. <span class="highlight-black">
  319. <count-to :start-val="0" :end-val="answerMemberCount" :duration="3600" class="card-panel-num" />
  320. </span>
  321. </div>
  322. <div class="card-row">
  323. <span>正确人数</span>
  324. <span class="highlight-black">
  325. <count-to :start-val="0" :end-val="correctUserCount" :duration="3600" class="card-panel-num" />
  326. </span>
  327. </div>
  328. <div class="card-row">
  329. <span>正确率</span>
  330. <span class="highlight-black">{{correctRate}}%</span>
  331. </div>
  332. </div>
  333. </div>
  334. </div>
  335. </el-col>
  336. <el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6" style="position: relative">
  337. <div class="analysis-card-check" :class="selectedDiv===2?'analysis-card-check-selected color':''"
  338. @click="handleToggleDiv(2)">
  339. <div class="analysis-card">
  340. <img class="card-icon" src="../assets/images/hongbao_views.png"></img>
  341. <div class="card-content">
  342. <div class="card-row">
  343. <span>答题红包个数</span>
  344. <span class="highlight-black">
  345. <count-to :start-val="0" :end-val="rewardCount" :duration="3600" class="card-panel-num" />
  346. </span>
  347. </div>
  348. <div class="card-row">
  349. <span>答题红包金额(元)</span>
  350. <span class="highlight-black">
  351. <count-to :start-val="0" :end-val="rewardMoney" :duration="3600" class="card-panel-num" /></span>
  352. </div>
  353. </div>
  354. </div>
  355. </div>
  356. </el-col>
  357. </el-row>
  358. </div>
  359. <!-- 图表区域 (Charts Area) -->
  360. <transition name="fade">
  361. <el-row :gutter="20" class="charts-section" v-show="selectedDiv===0">
  362. <el-col :span="12">
  363. <el-card shadow="never">
  364. <div slot="header" class="chart-header">
  365. <span>会员观看、完播人数趋势图</span>
  366. <div class="legend">
  367. <div class="legend-item">
  368. <span class="dot viewer-dot"></span>
  369. <span>观看人数</span>
  370. </div>
  371. <div class="legend-item">
  372. <span class="dot complete-dot"></span>
  373. <span>完播人数</span>
  374. </div>
  375. </div>
  376. <!-- <el-button size="small" plain class="view-more">平台每日统计 <i class="el-icon-arrow-right"></i></el-button>-->
  377. </div>
  378. <div ref="viewerChart" class="chart-container"></div>
  379. </el-card>
  380. </el-col>
  381. <el-col :span="12">
  382. <el-card shadow="never">
  383. <div slot="header" class="chart-header">
  384. <span>经销商会员观看TOP10</span>
  385. <div class="legend">
  386. <el-radio-group v-model="viewerType" size="small" @change="handleDealerChartData">
  387. <el-radio-button label="0">按观看人数</el-radio-button>
  388. <el-radio-button label="1">按完播人数</el-radio-button>
  389. </el-radio-group>
  390. </div>
  391. <!-- <el-button size="small" plain class="view-more">经销商统计 <i class="el-icon-arrow-right"></i></el-button>-->
  392. </div>
  393. <div ref="dealerChart" class="chart-container"></div>
  394. </el-card>
  395. </el-col>
  396. </el-row>
  397. </transition>
  398. <transition name="fade">
  399. <el-row :gutter="20" class="charts-section" v-show="selectedDiv===1">
  400. <el-card shadow="never">
  401. <div slot="header" class="chart-header">
  402. <span>课程观看TOP10</span>
  403. <div class="legend">
  404. <el-radio-group v-model="viewerType" size="small" @change="handleCourseWatchChart">
  405. <el-radio-button label="0">按观看人数</el-radio-button>
  406. <el-radio-button label="1">按完播人数</el-radio-button>
  407. <el-radio-button label="2">按答题人数</el-radio-button>
  408. <el-radio-button label="3">按正确人数</el-radio-button>
  409. </el-radio-group>
  410. </div>
  411. <div class="legend">
  412. <el-radio-group v-model="delerSort" @change="handleCourseWatchChart">
  413. <el-radio label="DESC">前10名</el-radio>
  414. <el-radio label="ASC">倒数10名</el-radio>
  415. </el-radio-group>
  416. </div>
  417. <div class="legend">
  418. <div class="legend-item">
  419. <span class="dot viewer-dot"></span>
  420. <span>观看人数</span>
  421. </div>
  422. <div class="legend-item">
  423. <span class="dot complete-dot"></span>
  424. <span>完播人数</span>
  425. </div>
  426. <div class="legend-item">
  427. <span class="dot" style="background-color: #E6A23C"></span>
  428. <span>答题人数</span>
  429. </div>
  430. <div class="legend-item">
  431. <span class="dot" style="background-color: #F56C6C"></span>
  432. <span>正确人数</span>
  433. </div>
  434. </div>
  435. <!-- <el-button size="small" plain class="view-more">经销商统计 <i class="el-icon-arrow-right"></i></el-button>-->
  436. </div>
  437. <div ref="courseWatchChart" class="chart-container"></div>
  438. </el-card>
  439. </el-row>
  440. </transition>
  441. <transition name="fade">
  442. <el-row :gutter="20" class="charts-section" v-show="selectedDiv===2">
  443. <el-col :span="12">
  444. <el-card shadow="never">
  445. <div slot="header" class="chart-header">
  446. <span>答题红包金额TOP10</span>
  447. <div class="legend">
  448. <el-radio-group v-model="dataType" size="small" @change="handleAnswerRedPackViewerChart">
  449. <el-radio-button label="0">按经销商排行</el-radio-button>
  450. <el-radio-button label="1">按课程排行</el-radio-button>
  451. </el-radio-group>
  452. </div>
  453. <!-- <el-button size="small" plain class="view-more">红包记录 <i class="el-icon-arrow-right"></i></el-button>-->
  454. </div>
  455. <div ref="answerRedPackViewerChart" class="chart-container"></div>
  456. </el-card>
  457. </el-col>
  458. <el-col :span="12">
  459. <el-card shadow="never">
  460. <div slot="header" class="chart-header">
  461. <span>答题红包金额趋势图</span>
  462. <div class="legend">
  463. <div class="legend-item">
  464. <span class="dot viewer-dot"></span>
  465. <span>答题红包金额</span>
  466. </div>
  467. </div>
  468. <!-- <el-button size="small" plain class="view-more">红包记录 <i class="el-icon-arrow-right"></i></el-button>-->
  469. </div>
  470. <div ref="answerRedPackMoneyViewerChart" class="chart-container"></div>
  471. </el-card>
  472. </el-col>
  473. </el-row>
  474. </transition>
  475. <el-row :gutter="20" class="charts-section">
  476. <el-col :span="12">
  477. <el-card shadow="never">
  478. <div slot="header" class="chart-header">
  479. <span>本月订单数</span>
  480. <div class="legend">
  481. <div class="legend-item">
  482. <span class="dot viewer-dot"></span>
  483. <span>订单数</span>
  484. </div>
  485. <div class="legend-item">
  486. <span class="dot complete-dot"></span>
  487. <span>订单金额</span>
  488. </div>
  489. </div>
  490. </div>
  491. <div ref="viewerOrderChart" class="chart-container"></div>
  492. </el-card>
  493. </el-col>
  494. <el-col :span="12">
  495. <el-card shadow="never">
  496. <div slot="header" class="chart-header">
  497. <span>本月收款数</span>
  498. <div class="legend">
  499. <div class="legend-item">
  500. <span class="dot viewer-dot"></span>
  501. <span>收款数</span>
  502. </div>
  503. <div class="legend-item">
  504. <span class="dot complete-dot"></span>
  505. <span>收款金额</span>
  506. </div>
  507. </div>
  508. </div>
  509. <div ref="viewerReceiveChart" class="chart-container"></div>
  510. </el-card>
  511. </el-col>
  512. </el-row>
  513. <br/>
  514. </div>
  515. </template>
  516. <script>
  517. import * as echarts from 'echarts'
  518. import CountTo from "vue-count-to";
  519. import {
  520. analysisPreview,
  521. authorizationInfo,
  522. dealerAggregated, deaMemberTopTen, rechargeComsumption, rewardMoneyTopTen, rewardMoneyTrend,
  523. smsBalance, thisMonthOrderCount, thisMonthRecvCount, trafficLog,
  524. watchCourseTopTen, watchEndPlayTrend
  525. } from "@/api/statistics/statistics";
  526. import dayjs from 'dayjs';
  527. import { listDept } from '@/api/system/dept'
  528. import { listCompany } from '@/api/his/company'
  529. const viewCharOption = {
  530. tooltip: {
  531. trigger: 'axis',
  532. axisPointer: {
  533. type: 'shadow'
  534. }
  535. },
  536. grid: {
  537. left: '3%',
  538. right: '4%',
  539. bottom: '3%',
  540. containLabel: true
  541. },
  542. xAxis: {
  543. type: 'category',
  544. data: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23']
  545. },
  546. yAxis: {
  547. type: 'value'
  548. },
  549. series: [
  550. {
  551. name: '观看人数',
  552. type: 'bar',
  553. data: [],
  554. itemStyle: {
  555. color: '#409EFF'
  556. }
  557. },
  558. {
  559. name: '完播人数',
  560. type: 'bar',
  561. data: [],
  562. itemStyle: {
  563. color: '#67C23A'
  564. }
  565. }
  566. ]
  567. }
  568. const thisMonthOrderCountOption = {
  569. tooltip: {
  570. trigger: 'axis',
  571. axisPointer: {
  572. type: 'shadow'
  573. }
  574. },
  575. grid: {
  576. left: '3%',
  577. right: '4%',
  578. bottom: '3%',
  579. containLabel: true
  580. },
  581. xAxis: {
  582. type: 'category',
  583. data: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23']
  584. },
  585. yAxis: {
  586. type: 'value'
  587. },
  588. series: [
  589. {
  590. name: '订单数',
  591. type: 'line',
  592. data: [],
  593. itemStyle: {
  594. color: '#409EFF'
  595. }
  596. },
  597. {
  598. name: '订单金额',
  599. type: 'line',
  600. data: [],
  601. itemStyle: {
  602. color: '#67C23A'
  603. }
  604. }
  605. ]
  606. }
  607. const thisMonthRecvCountOption = {
  608. tooltip: {
  609. trigger: 'axis',
  610. axisPointer: {
  611. type: 'shadow'
  612. }
  613. },
  614. grid: {
  615. left: '3%',
  616. right: '4%',
  617. bottom: '3%',
  618. containLabel: true
  619. },
  620. xAxis: {
  621. type: 'category',
  622. data: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23']
  623. },
  624. yAxis: {
  625. type: 'value'
  626. },
  627. series: [
  628. {
  629. name: '收款数',
  630. type: 'line',
  631. data: [],
  632. itemStyle: {
  633. color: '#409EFF'
  634. }
  635. },
  636. {
  637. name: '收款金额',
  638. type: 'line',
  639. data: [],
  640. itemStyle: {
  641. color: '#67C23A'
  642. }
  643. }
  644. ]
  645. }
  646. const dealerOption = {
  647. tooltip: {
  648. trigger: 'axis',
  649. axisPointer: {
  650. type: 'shadow'
  651. }
  652. },
  653. grid: {
  654. left: '3%',
  655. right: '4%',
  656. bottom: '3%',
  657. containLabel: true
  658. },
  659. xAxis: {
  660. type: 'value'
  661. },
  662. yAxis: {
  663. type: 'category',
  664. data: []
  665. },
  666. series: [
  667. {
  668. name: '观看人数',
  669. type: 'bar',
  670. data: [],
  671. itemStyle: {
  672. color: '#409EFF'
  673. }
  674. }
  675. ]
  676. }
  677. const courseWatchOption = {
  678. tooltip: {
  679. trigger: 'axis',
  680. axisPointer: {
  681. type: 'shadow'
  682. }
  683. },
  684. grid: {
  685. left: '3%',
  686. right: '4%',
  687. bottom: '8%',
  688. top: '3%',
  689. containLabel: true
  690. },
  691. xAxis: {
  692. type: 'category',
  693. data: [],
  694. axisLabel: {
  695. interval: 0,
  696. rotate: 30,
  697. fontSize: 10,
  698. width: 100,
  699. overflow: 'truncate'
  700. }
  701. },
  702. yAxis: {
  703. type: 'value',
  704. splitLine: {
  705. lineStyle: {
  706. type: 'dashed'
  707. }
  708. }
  709. },
  710. series: [
  711. {
  712. name: '观看人数',
  713. type: 'bar',
  714. data: [],
  715. itemStyle: {
  716. color: '#409EFF'
  717. }
  718. },
  719. {
  720. name: '完播人数',
  721. type: 'bar',
  722. data: [],
  723. itemStyle: {
  724. color: '#67C23A'
  725. }
  726. },
  727. {
  728. name: '答题人数',
  729. type: 'bar',
  730. data: [],
  731. itemStyle: {
  732. color: '#E6A23C'
  733. }
  734. },
  735. {
  736. name: '正确人数',
  737. type: 'bar',
  738. data: [],
  739. itemStyle: {
  740. color: '#F56C6C'
  741. }
  742. }
  743. ]
  744. }
  745. const lineChartOption = {
  746. tooltip: {
  747. trigger: 'axis',
  748. axisPointer: {
  749. type: 'cross' // 改为 'cross' 更适合折线图
  750. }
  751. },
  752. grid: {
  753. left: '3%',
  754. right: '4%',
  755. bottom: '8%', // 如果x轴标签旋转,可能需要更大的 bottom
  756. top: '5%', // 增加一点顶部空间给可能的 Y 轴名称
  757. containLabel: true
  758. },
  759. xAxis: {
  760. type: 'time', // X轴类型改为 'time'
  761. // data: [], // 时间轴不需要单独设置 data,数据在 series 中提供
  762. axisLabel: {
  763. // interval: 0, // 时间轴通常自动处理间隔,可以先移除或注释掉
  764. rotate: 30, // 保留旋转,如果标签可能重叠
  765. fontSize: 10,
  766. // width: 100, // width 和 overflow 对于时间轴可能行为不同,按需调整
  767. // overflow: 'truncate',
  768. formatter: null // ECharts 会自动格式化时间,如需特定格式可用 function 或字符串模板
  769. }
  770. },
  771. yAxis: {
  772. type: 'value',
  773. name: '金额 (元)', // 添加 Y 轴名称
  774. nameLocation: 'end', // 名称位置
  775. nameTextStyle: {
  776. align: 'right',
  777. padding: [0, 10, 0, 0] // 调整名称与轴线的距离
  778. },
  779. splitLine: {
  780. lineStyle: {
  781. type: 'dashed'
  782. }
  783. },
  784. axisLabel: {
  785. formatter: '{value} 元' // 可选:给 Y 轴刻度添加单位
  786. }
  787. },
  788. series: [
  789. {
  790. name: '答题红包金额',
  791. type: 'line', // 系列类型改为 'line'
  792. data: [
  793. ],
  794. itemStyle: { // 控制数据点(标记)的样式
  795. color: '#409EFF'
  796. },
  797. lineStyle: { // 控制线的样式
  798. color: '#409EFF'
  799. },
  800. smooth: false, // 是否平滑曲线,可设为 true
  801. symbol: 'circle', // 数据点标记形状,'emptyCircle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow', 'none'
  802. symbolSize: 4 // 数据点标记大小
  803. }
  804. ]
  805. };
  806. const redPackageOption = {
  807. tooltip: {
  808. trigger: 'axis',
  809. axisPointer: {
  810. type: 'shadow'
  811. }
  812. },
  813. grid: {
  814. left: '3%',
  815. right: '4%',
  816. bottom: '8%',
  817. top: '3%',
  818. containLabel: true
  819. },
  820. xAxis: {
  821. type: 'category',
  822. data: [],
  823. axisLabel: {
  824. interval: 0,
  825. rotate: 30,
  826. fontSize: 10,
  827. width: 100,
  828. overflow: 'truncate'
  829. }
  830. },
  831. yAxis: {
  832. type: 'value',
  833. splitLine: {
  834. lineStyle: {
  835. type: 'dashed'
  836. }
  837. }
  838. },
  839. series: [
  840. {
  841. name: '答题红包金额',
  842. type: 'bar',
  843. data: [],
  844. itemStyle: {
  845. color: '#409EFF'
  846. }
  847. }
  848. ]
  849. }
  850. export default {
  851. name: 'StatisticsDashboard',
  852. components: {CountTo},
  853. data() {
  854. return {
  855. deptInitOptions:[],
  856. deptOptions:[],
  857. intiDeptId:this.$store.state.user.user.deptId,
  858. deptId:this.$store.state.user.user.deptId,
  859. staticParam : {companyId:null,deptId:this.$store.state.user.user.deptId},
  860. companyIntiOptions:[],
  861. companyOptions:[],
  862. companyId:null,
  863. percentage: 0,
  864. // 预测message
  865. remainMessage: '',
  866. // 当天使用流量
  867. todayTraffic: 0,
  868. trafficCount: 0,
  869. // 当月使用流量
  870. thisMonthTraffic: 0,
  871. dataType: '0',
  872. delerSort: 'DESC',
  873. smsRemainCount: 0,
  874. viewerType: '0',
  875. viewerChart: null,
  876. userTypeText: process.env.VUE_APP_COURSE_DEFAULT==1?"会员":"企微",
  877. userType: process.env.VUE_APP_COURSE_DEFAULT,
  878. dealerChart: null,
  879. // 分公司数量
  880. dealderCount: 0,
  881. // 销售数量
  882. groupMgrCount: 0,
  883. // 会员总数量
  884. memberCount: 0,
  885. // 企微数量
  886. qwMemberNum: 0,
  887. // pad使用情况
  888. padTotalNum: 0,
  889. // pad使用情况
  890. padUsedNum: 0,
  891. // 正常会员数量
  892. normalNum: 0,
  893. // 黑名单会员数量
  894. blackNum: 0,
  895. // 观看人数
  896. watchUserCount: 0,
  897. // 完播人数
  898. completedUserCount: 0,
  899. // 完播率
  900. completedRate: 0,
  901. // 观看次数
  902. watchCount:0,
  903. // 完播次数
  904. completedCount: 0,
  905. // 视频完播率
  906. watchRate: 0,
  907. // 答题人数
  908. answerMemberCount: 0,
  909. // 正确人数
  910. correctUserCount: 0,
  911. correctRate: 0.0,
  912. // 答题红包个数
  913. rewardCount: 0,
  914. // 答题红包金额
  915. rewardMoney: 0.0,
  916. queryTime: '今日',
  917. todayWatchUserCount: 0,
  918. versionLimit: 0,
  919. versionLimitPercent : 0.0,
  920. /// 选中的分析概览
  921. selectedDiv: 0,
  922. filterType: 0,
  923. answerRedPackViewerChart: null,
  924. answerRedPackMoneyViewerChart: null,
  925. todayComsumption: 0,
  926. yesterdayComsumption: 0,
  927. balance: 0,
  928. autoRefreshInterval: null,
  929. // 今日新增用户数
  930. todayIncreaseUserNum: 0,
  931. // 订单总数
  932. orderTotalNum: 0,
  933. // 今日新增订单数
  934. todayOrderNum: 0,
  935. // 收款总数
  936. recvTotalNum: 0,
  937. // 今日收款总数
  938. recvTodayNum: 0,
  939. // 商品总数
  940. goodsTotalNum: 0,
  941. // 今日商品总数
  942. todayGoodsNum: 0
  943. }
  944. },
  945. mounted() {
  946. this.$nextTick(() => {
  947. this.initViewerChart()
  948. this.initDealerChart()
  949. this.initCourseWatchChart();
  950. this.initAnswerRedPackViewerChart();
  951. this.initAnswerRedPackMoneyViewerChart();
  952. this.initThisMonthOrderChart();
  953. this.initThisMonthRecvChart()
  954. // 监听窗口大小变化,重新渲染图表
  955. window.addEventListener('resize', () => {
  956. this.viewerChart && this.viewerChart.resize()
  957. this.dealerChart && this.dealerChart.resize()
  958. })
  959. })
  960. },
  961. created() {
  962. this.refresh();
  963. listDept().then(res => {
  964. this.deptInitOptions = res.data;
  965. listCompany().then(res => {
  966. this.companyIntiOptions = res.rows;
  967. this.getDeptOptions(this.intiDeptId);
  968. this.getCompanyOptions(this.intiDeptId);
  969. });
  970. });
  971. },
  972. methods: {
  973. getDeptOptions(deptId) {
  974. const deptInitOptions = this.deptInitOptions;
  975. // 部门本身节点
  976. let deptNode = deptInitOptions.filter(item => item.deptId === deptId);
  977. // 递归查找所有子节点
  978. function findChildren(parentId) {
  979. //部门的子部门
  980. let deptChildren = deptInitOptions.filter(item => item.parentId === parentId);
  981. //添加子部门
  982. deptChildren.forEach(child => {
  983. deptNode.push(child);
  984. findChildren(child.deptId); // 递归查找子节点的子节点
  985. });
  986. }
  987. // 从目标节点开始查找子节点
  988. findChildren(deptId);
  989. this.deptOptions = deptNode;
  990. },
  991. getCompanyOptions(deptId) {
  992. this.companyId = null;
  993. //修改选择后清空查询参数
  994. this.staticParam.companyId = null;
  995. this.staticParam.deptId = deptId;
  996. const deptInitOptions = this.deptInitOptions;
  997. const companyInitOptions = this.companyIntiOptions;
  998. // 部门下的公司
  999. let companyNode = companyInitOptions.filter(item => item.deptId === deptId);
  1000. // 递归查找所有子节点
  1001. function findChildren(parentId) {
  1002. //部门的子部门
  1003. let deptChildren = deptInitOptions.filter(item => item.parentId === parentId);
  1004. //添加子部门
  1005. deptChildren.forEach(child => {
  1006. //子部门下的销售公司
  1007. let companyChildren = companyInitOptions.filter(item => item.deptId === child.deptId);
  1008. companyChildren.forEach(companyChild => {
  1009. companyNode.push(companyChild);
  1010. })
  1011. findChildren(child.deptId); // 递归查找子节点的子节点
  1012. });
  1013. }
  1014. // 从目标节点开始查找子节点
  1015. findChildren(deptId);
  1016. this.companyOptions = companyNode;
  1017. },
  1018. //首页统计选择部门、销售公司
  1019. handleDeptChange() {
  1020. this.getCompanyOptions(this.deptId);
  1021. this.refresh();
  1022. },
  1023. handleCompanyChange() {
  1024. this.staticParam.companyId = this.companyId;
  1025. this.refresh();
  1026. },
  1027. handleUserType() {
  1028. if (this.userTypeText === '会员') {
  1029. this.userType = 1
  1030. } else {
  1031. this.userType = 2
  1032. }
  1033. this.refresh()
  1034. },
  1035. /**
  1036. * 计算余额预计可持续的天数
  1037. * @param {number} balance - 当前账户余额
  1038. * @param {number} todayConsumption - 今日消耗金额
  1039. * @param {number} yesterdayConsumption - 昨日消耗金额
  1040. * @return {Object} 包含天数和进度百分比的对象
  1041. */
  1042. calculateRemainingDays(balance, todayConsumption, yesterdayConsumption) {
  1043. // 如果今日和昨日消耗都为0,则无法预测(避免除以0)
  1044. if (todayConsumption === 0 && yesterdayConsumption === 0) {
  1045. return {
  1046. days: Infinity,
  1047. percentage: 0,
  1048. message: '暂无消耗数据'
  1049. };
  1050. }
  1051. // 计算每日平均消耗量
  1052. const avgDailyConsumption = (todayConsumption + yesterdayConsumption) / 2;
  1053. // 如果平均消耗为0,则无法预测
  1054. if (avgDailyConsumption === 0) {
  1055. return {
  1056. days: Infinity,
  1057. percentage: 0,
  1058. message: '暂无消耗数据'
  1059. };
  1060. }
  1061. // 计算剩余天数(向下取整)
  1062. const remainingDays = Math.floor(balance / avgDailyConsumption);
  1063. // 计算进度条百分比,最大为100
  1064. // 这里假设100天是满值,可以根据需要调整
  1065. const maxDays = 100;
  1066. const percentage = Math.min(100, Math.max(0, Math.round((remainingDays / maxDays) * 100)));
  1067. let message = '';
  1068. if (remainingDays > 365) {
  1069. message = '预测余额充足';
  1070. } else {
  1071. message = `预测不足${remainingDays}天`;
  1072. }
  1073. return {
  1074. days: remainingDays,
  1075. percentage: 100 - percentage,
  1076. message: message
  1077. };
  1078. },
  1079. /**
  1080. * 将字节数转换为合适的单位表示(Byte、KB、MB、GB、TB)
  1081. * @param {number} bytes - 字节数
  1082. * @param {number} [decimals=2] - 小数点后保留的位数
  1083. * @returns {string} 格式化后的字符串,包含数值和单位
  1084. */
  1085. formatBytes(bytes, decimals = 2) {
  1086. const isNegative = bytes < 0; // 判断是否为负数
  1087. bytes = Math.abs(bytes); // 获取绝对值
  1088. if (bytes === 0) return '0 Byte';
  1089. const k = 1024;
  1090. const sizes = ['Byte', 'KB', 'MB', 'GB', 'TB'];
  1091. // 计算合适的单位级别
  1092. let i = Math.floor(Math.log(bytes) / Math.log(k));
  1093. // 转换为对应单位的值
  1094. const value = bytes / Math.pow(k, i);
  1095. if(this.deptId !== 1 || this.companyId !== null){
  1096. i += 1;
  1097. }
  1098. // 格式化为指定小数位的字符串
  1099. const result = parseFloat(value.toFixed(decimals)) + ' ' + sizes[Math.min(i, sizes.length - 1)];
  1100. // 如果是负数,返回带负号的值
  1101. return isNegative ? `-${result}` : result;
  1102. },
  1103. // 手动刷新
  1104. manualRefresh() {
  1105. this.refresh();
  1106. },
  1107. // 处理自动刷新选项
  1108. handleAutoRefresh(command) {
  1109. // 清除之前的定时器
  1110. if (this.timer) {
  1111. clearInterval(this.timer);
  1112. this.timer = null;
  1113. }
  1114. // 设置新的刷新间隔
  1115. this.autoRefreshInterval = parseInt(command);
  1116. // 如果间隔大于0,设置新的定时器
  1117. if (this.autoRefreshInterval > 0) {
  1118. this.timer = setInterval(() => {
  1119. this.refresh();
  1120. }, this.autoRefreshInterval * 60 * 1000); // 转换为毫秒
  1121. this.$message.success(`已设置${this.autoRefreshInterval}分钟自动刷新`);
  1122. } else {
  1123. this.$message.info('已关闭自动刷新');
  1124. }
  1125. },
  1126. refresh() {
  1127. rechargeComsumption(this.staticParam).then(res => {
  1128. if (res.code === 200) {
  1129. this.balance = res.data.balance;
  1130. this.todayComsumption = res.data.todayComsumption;
  1131. this.yesterdayComsumption = res.data.yesterdayComsumption;
  1132. let calculateRemainingDays1 = this.calculateRemainingDays(this.balance, this.todayComsumption, this.yesterdayComsumption);
  1133. this.percentage = calculateRemainingDays1.percentage;
  1134. this.remainMessage = calculateRemainingDays1.message;
  1135. }
  1136. });
  1137. trafficLog(this.staticParam).then(res => {
  1138. if (res.code === 200) {
  1139. this.todayTraffic = res.data.today;
  1140. this.thisMonthTraffic = res.data.thisMonth;
  1141. this.trafficCount = res.data.traffic;
  1142. }
  1143. })
  1144. dealerAggregated(this.staticParam).then(res => {
  1145. if (res.code === 200) {
  1146. this.dealderCount = res.data.dealderCount ?? 0;
  1147. this.groupMgrCount = res.data.groupMgrCount ?? 0;
  1148. this.memberCount = res.data.memberCount ?? 0;
  1149. this.qwMemberNum = res.data.qwMemberNum ?? 0;
  1150. const totalNum = res.data.padTotalNum;
  1151. //-1 不限 null 未设置
  1152. if(totalNum != null && totalNum !== -1 && totalNum > 0){
  1153. this.padTotalNum = totalNum;
  1154. }else{
  1155. this.padTotalNum = '不限';
  1156. }
  1157. this.padUsedNum = res.data.padUsedNum ?? 0;
  1158. this.padInfo = res.data.padInfo;
  1159. this.normalNum = res.data.normalNum ?? 0;
  1160. this.blackNum = res.data.blackNum ?? 0;
  1161. this.todayIncreaseUserNum = res.data.todayIncreaseUserNum ?? 0;
  1162. this.orderTotalNum = res.data.orderTotalNum ?? 0;
  1163. this.todayOrderNum = res.data.todayOrderNum ?? 0;
  1164. this.recvTotalNum = res.data.recvTotalNum ?? 0;
  1165. this.recvTodayNum = res.data.recvTodayNum ?? 0;
  1166. this.goodsTotalNum = res.data.goodsTotalNum ?? 0;
  1167. this.todayGoodsNum = res.data.todayGoodsNum ?? 0;
  1168. }
  1169. })
  1170. let param = this.getParam();
  1171. // 获取当前日期时间
  1172. const today = dayjs();
  1173. param.startTime = this.formatDate(today);
  1174. param.endTime = this.formatDate(today);
  1175. analysisPreview(param).then(res => {
  1176. if (res.code === 200) {
  1177. this.watchUserCount = res.data.watchUserCount;
  1178. this.completedUserCount = res.data.completedUserCount;
  1179. this.completedRate = res.data.completedRate;
  1180. this.watchCount = res.data.watchCount;
  1181. this.completedCount = res.data.completedCount;
  1182. this.answerMemberCount = res.data.answerMemberCount;
  1183. this.correctUserCount = res.data.correctUserCount;
  1184. this.correctRate = res.data.correctRate;
  1185. this.rewardCount = res.data.rewardCount;
  1186. this.rewardMoney = res.data.rewardMoney;
  1187. this.watchRate = res.data.watchRate;
  1188. }
  1189. })
  1190. smsBalance(this.staticParam).then(res => {
  1191. if (res.code === 200) {
  1192. if (res.data == null) {
  1193. this.smsRemainCount = 0;
  1194. } else {
  1195. this.smsRemainCount = res.data;
  1196. }
  1197. }
  1198. })
  1199. authorizationInfo(this.staticParam).then(res => {
  1200. if (res.code === 200 && res.data != null) {
  1201. this.todayWatchUserCount = res.data.todayWatchUserCount;
  1202. this.versionLimit = res.data.versionLimit;
  1203. if(this.versionLimit){
  1204. this.versionLimitPercent = this.todayWatchUserCount/this.versionLimit;
  1205. }
  1206. }
  1207. })
  1208. this.handleCourseWatchChart()
  1209. this.handleViewChartData()
  1210. // 经销商会员观看TOP10
  1211. this.handleDealerChartData()
  1212. this.handleAnswerRedPackViewerChart()
  1213. this.handleAnswerRedPackMoneyViewerChart()
  1214. this.handleThisMonthRecvCount();
  1215. this.handleThisMonthOrderCount();
  1216. },
  1217. /**
  1218. * 将数字添加千位分隔符
  1219. * @param {number|string} num - 需要格式化的数字
  1220. * @return {string} 添加千位分隔符后的字符串
  1221. */
  1222. formatNumberWithCommas(num) {
  1223. if (num === null || num === undefined || isNaN(Number(num))) {
  1224. return '0';
  1225. }
  1226. const numStr = String(num);
  1227. // 处理负数
  1228. const isNegative = numStr.startsWith('-');
  1229. const absNumStr = isNegative ? numStr.slice(1) : numStr;
  1230. // 分离整数部分和小数部分
  1231. const parts = absNumStr.split('.');
  1232. const integerPart = parts[0];
  1233. const decimalPart = parts.length > 1 ? '.' + parts[1] : '';
  1234. const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
  1235. return (isNegative ? '-' : '') + formattedInteger + decimalPart;
  1236. },
  1237. handleToggleDiv(selected) {
  1238. this.selectedDiv = selected;
  1239. if (selected === 1) {
  1240. this.$nextTick(() => {
  1241. if (this.courseWatchChart) {
  1242. this.courseWatchChart.resize();
  1243. } else {
  1244. }
  1245. });
  1246. } else if (selected === 0) {
  1247. this.$nextTick(() => {
  1248. if (this.viewerChart) this.viewerChart.resize();
  1249. if (this.dealerChart) this.dealerChart.resize();
  1250. });
  1251. } else if (selected === 2) {
  1252. this.$nextTick(() => {
  1253. if (this.answerRedPackViewerChart) this.answerRedPackViewerChart.resize();
  1254. if (this.answerRedPackMoneyViewerChart) this.answerRedPackMoneyViewerChart.resize();
  1255. });
  1256. }
  1257. if (this.selectedDiv === 0) {
  1258. this.handleViewChartData()
  1259. this.handleDealerChartData()
  1260. } else if (this.selectedDiv === 1) {
  1261. this.handleCourseWatchChart()
  1262. } else if (this.selectedDiv === 2) {
  1263. this.handleAnswerRedPackViewerChart()
  1264. this.handleAnswerRedPackMoneyViewerChart()
  1265. }
  1266. },
  1267. formatDate(date) {
  1268. return dayjs(date).format('YYYY-MM-DD');
  1269. },
  1270. getParam() {
  1271. let param = {
  1272. startTime: '',
  1273. endTime: '',
  1274. userType: this.userType,
  1275. companyId: this.companyId,
  1276. deptId: this.deptId
  1277. };
  1278. // 获取当前日期时间
  1279. const today = dayjs();
  1280. let type = 0;
  1281. if (this.queryTime === '今日') {
  1282. param.startTime = this.formatDate(today);
  1283. param.endTime = this.formatDate(today);
  1284. type = 0;
  1285. } else if (this.queryTime === '昨日') {
  1286. const yesterday = today.subtract(1, 'day');
  1287. param.startTime = this.formatDate(yesterday);
  1288. param.endTime = this.formatDate(yesterday);
  1289. type = 1;
  1290. } else if (this.queryTime === '本周') {
  1291. param.startTime = this.formatDate(today.startOf('week'));
  1292. param.endTime = this.formatDate(today.endOf('week'));
  1293. type = 2;
  1294. } else if (this.queryTime === '本月') {
  1295. param.startTime = this.formatDate(today.startOf('month'));
  1296. param.endTime = this.formatDate(today.endOf('month'));
  1297. type = 3;
  1298. } else if (this.queryTime === '上月') {
  1299. const lastMonth = today.subtract(1, 'month');
  1300. param.startTime = this.formatDate(lastMonth.startOf('month'));
  1301. param.endTime = this.formatDate(lastMonth.endOf('month'));
  1302. type = 4;
  1303. } else {
  1304. console.warn(`未知的 queryTime: ${this.queryTime}, 默认使用今日`);
  1305. param.startTime = this.formatDate(today);
  1306. param.endTime = this.formatDate(today);
  1307. }
  1308. param.type = type;
  1309. param.sort = this.delerSort;
  1310. return param;
  1311. },
  1312. // 分析概览
  1313. handleAnalysis(e) {
  1314. let param = this.getParam();
  1315. analysisPreview(param).then(res => {
  1316. if (res.code === 200) {
  1317. this.watchUserCount = res.data.watchUserCount;
  1318. this.completedUserCount = res.data.completedUserCount;
  1319. this.completedRate = res.data.completedRate;
  1320. this.watchCount = res.data.watchCount;
  1321. this.completedCount = res.data.completedCount;
  1322. this.answerMemberCount = res.data.answerMemberCount;
  1323. this.correctUserCount = res.data.correctUserCount;
  1324. this.correctRate = res.data.correctRate;
  1325. this.rewardCount = res.data.rewardCount;
  1326. this.rewardMoney = res.data.rewardMoney;
  1327. this.watchRate = res.data.watchRate;
  1328. }
  1329. })
  1330. if (this.selectedDiv === 0) {
  1331. this.handleViewChartData()
  1332. this.handleDealerChartData()
  1333. } else if (this.selectedDiv === 1) {
  1334. this.handleCourseWatchChart()
  1335. } else if (this.selectedDiv === 2) {
  1336. this.handleAnswerRedPackViewerChart()
  1337. this.handleAnswerRedPackMoneyViewerChart()
  1338. }
  1339. },
  1340. handleAnswerRedPackViewerChart() {
  1341. let param = this.getParam();
  1342. param = { ...param, statisticalType: this.viewerType, dataType: this.dataType };
  1343. rewardMoneyTopTen(param).then(res => {
  1344. if (res.code === 200) {
  1345. let data = res.data;
  1346. let companyNameList = data.map(e => e.companyName)
  1347. let courseNameList = data.map(e => e.courseName)
  1348. let rewardMoneyList = data.map(e => e.rewardMoney)
  1349. if (this.dataType === '0') {
  1350. redPackageOption.xAxis.data = companyNameList;
  1351. } else {
  1352. redPackageOption.xAxis.data = courseNameList;
  1353. }
  1354. redPackageOption.series[0].data = rewardMoneyList;
  1355. this.answerRedPackViewerChart.setOption(redPackageOption)
  1356. }
  1357. })
  1358. },
  1359. handleAnswerRedPackMoneyViewerChart() {
  1360. let param = this.getParam();
  1361. param = { ...param, statisticalType: this.viewerType, dataType: this.dataType };
  1362. rewardMoneyTrend(param).then(res => {
  1363. if (res.code === 200) {
  1364. let data = res.data;
  1365. let option = data.map(e => [e.x, e.rewardMoney])
  1366. lineChartOption.series[0].data = option;
  1367. this.answerRedPackMoneyViewerChart.setOption(lineChartOption)
  1368. }
  1369. })
  1370. },
  1371. handleCourseWatchChart() {
  1372. let param = this.getParam();
  1373. param = { ...param, statisticalType: this.viewerType };
  1374. watchCourseTopTen(param).then(res => {
  1375. if (res.code === 200) {
  1376. let data = res.data;
  1377. let watchUserCountList = data.map(e => e.watchUserCount);
  1378. let completedUserCountList = data.map(e => e.completedUserCount);
  1379. let answerUserCountList = data.map(e => e.answerUserCount);
  1380. let correctUserCountList = data.map(e => e.correctUserCount);
  1381. let courseNameList = data.map(e => e.courseName);
  1382. courseWatchOption.xAxis.data = courseNameList;
  1383. courseWatchOption.series[0].data = watchUserCountList;
  1384. courseWatchOption.series[1].data = completedUserCountList;
  1385. courseWatchOption.series[2].data = answerUserCountList;
  1386. courseWatchOption.series[3].data = correctUserCountList;
  1387. this.courseWatchChart.setOption(courseWatchOption)
  1388. }
  1389. })
  1390. },
  1391. handleDealerChartData() {
  1392. let param = this.getParam();
  1393. // 经销商会员观看TOP10
  1394. deaMemberTopTen({ ...param, statisticalType: this.viewerType }).then(res => {
  1395. if (res.code === 200) {
  1396. let data = res.data;
  1397. let companyNameList = data.map(e => e.companyName);
  1398. let watchUserList = data.map(e => e.watchUserCount);
  1399. dealerOption.yAxis.data = companyNameList;
  1400. dealerOption.series[0].data = watchUserList;
  1401. this.dealerChart.setOption(dealerOption)
  1402. }
  1403. })
  1404. },
  1405. handleThisMonthOrderCount() {
  1406. thisMonthOrderCount(this.staticParam).then(res => {
  1407. if (res.code === 200) {
  1408. let dates = res.dates;
  1409. let orderCount = res.orderCount;
  1410. let payPrice = res.payPrice;
  1411. thisMonthOrderCountOption.series[0].data = orderCount;
  1412. thisMonthOrderCountOption.series[1].data = payPrice;
  1413. thisMonthOrderCountOption.xAxis.data = dates;
  1414. this.thisMonthOrderChart.setOption(thisMonthOrderCountOption)
  1415. }
  1416. })
  1417. },
  1418. handleThisMonthRecvCount() {
  1419. thisMonthRecvCount(this.staticParam).then(res => {
  1420. if (res.code === 200) {
  1421. let dates = res.dates;
  1422. let orderCount = res.orderCount;
  1423. let payMoney = res.payMoney;
  1424. thisMonthRecvCountOption.series[0].data = orderCount;
  1425. thisMonthRecvCountOption.series[1].data = payMoney;
  1426. thisMonthRecvCountOption.xAxis.data = dates;
  1427. this.thisMonthRecvChart.setOption(thisMonthRecvCountOption)
  1428. }
  1429. })
  1430. },
  1431. handleViewChartData() {
  1432. let param = this.getParam();
  1433. watchEndPlayTrend({ ...param }).then(res => {
  1434. if (res.code === 200) {
  1435. let data = res.data;
  1436. let watchUserCountList = data.map(e => e.watchUserCount);
  1437. let completedUserCountList = data.map(e => e.completedUserCount);
  1438. let xAxis = data.map(e => e.x);
  1439. viewCharOption.series[0].data = watchUserCountList;
  1440. viewCharOption.series[1].data = completedUserCountList;
  1441. viewCharOption.xAxis.data = xAxis;
  1442. this.viewerChart.setOption(viewCharOption);
  1443. }
  1444. })
  1445. },
  1446. initThisMonthOrderChart() {
  1447. this.thisMonthOrderChart = echarts.init(this.$refs.viewerOrderChart)
  1448. this.thisMonthOrderChart.setOption(thisMonthOrderCountOption)
  1449. },
  1450. initThisMonthRecvChart() {
  1451. this.thisMonthRecvChart = echarts.init(this.$refs.viewerReceiveChart)
  1452. this.thisMonthRecvChart.setOption(thisMonthOrderCountOption)
  1453. },
  1454. initViewerChart() {
  1455. this.viewerChart = echarts.init(this.$refs.viewerChart)
  1456. this.viewerChart.setOption(viewCharOption)
  1457. },
  1458. initDealerChart() {
  1459. this.dealerChart = echarts.init(this.$refs.dealerChart)
  1460. this.dealerChart.setOption(dealerOption)
  1461. },
  1462. initCourseWatchChart() {
  1463. this.courseWatchChart = echarts.init(this.$refs.courseWatchChart)
  1464. this.courseWatchChart.setOption(courseWatchOption)
  1465. },
  1466. initAnswerRedPackViewerChart() {
  1467. this.answerRedPackViewerChart = echarts.init(this.$refs.answerRedPackViewerChart)
  1468. this.answerRedPackViewerChart.setOption(redPackageOption)
  1469. },
  1470. initAnswerRedPackMoneyViewerChart() {
  1471. this.answerRedPackMoneyViewerChart = echarts.init(this.$refs.answerRedPackMoneyViewerChart)
  1472. this.answerRedPackMoneyViewerChart.setOption(lineChartOption)
  1473. }
  1474. },
  1475. beforeDestroy() {
  1476. // 组件销毁时清除定时器
  1477. if (this.timer) {
  1478. clearInterval(this.timer);
  1479. this.timer = null;
  1480. }
  1481. // window.removeEventListener('resize', this.resizeHandler)
  1482. this.viewerChart && this.viewerChart.dispose()
  1483. this.dealerChart && this.dealerChart.dispose()
  1484. }
  1485. }
  1486. </script>
  1487. <style scoped>
  1488. .highlight-today-add {
  1489. color: green;
  1490. font-size: 17px;
  1491. font-weight: normal;
  1492. }
  1493. .highlight-today-add2 {
  1494. color: rgba(49, 185, 154, 1);
  1495. font-size: 14px;
  1496. font-weight: normal;
  1497. transform: scale(.9);
  1498. }
  1499. .action-group .el-button + .el-button,
  1500. .action-group .el-dropdown {
  1501. margin-left: 10px;
  1502. }
  1503. .is-active {
  1504. color: #409EFF;
  1505. font-weight: bold;
  1506. }
  1507. ::v-deep .el-radio-button__inner:hover {
  1508. color: #409EFF;
  1509. /* 鼠标悬浮时的文字颜色,可以根据需要调整 */
  1510. }
  1511. ::v-deep .el-radio-button.is-active .el-radio-button__inner {
  1512. background-color: #409EFF;
  1513. /* 选中时的背景色 */
  1514. border-color: #409EFF;
  1515. /* 选中时的边框色 */
  1516. color: #FFFFFF;
  1517. /* 选中时的文字颜色 (通常是白色) */
  1518. box-shadow: -1px 0 0 0 #409EFF;
  1519. /* 处理按钮间的连接缝隙 */
  1520. }
  1521. /* 如果需要,也可以修改非选中状态下的聚焦(focus)或悬浮(hover)样式 */
  1522. /* 例如,让非选中按钮悬浮时边框和文字也变蓝 */
  1523. ::v-deep .el-radio-button:not(.is-active) .el-radio-button__inner:hover {
  1524. color: #409EFF;
  1525. /* border-color: #b3d8ff; Element UI 默认悬浮边框色,可以按需修改 */
  1526. }
  1527. /* 聚焦时的外框,如果需要的话 */
  1528. ::v-deep .el-radio-button:focus:not(.is-checked) .el-radio-button__inner {
  1529. /* border-color: #409EFF; */
  1530. /* Element UI 默认的 focus 颜色通常关联主题色 */
  1531. /* box-shadow: 0 0 2px 2px rgba(64, 158, 255, 0.2); */
  1532. /* 示例 focus 光晕 */
  1533. }
  1534. .statistics-dashboard {
  1535. padding: 20px;
  1536. background-color: #f5f7fa;
  1537. }
  1538. .overview-section,
  1539. .analysis-section {
  1540. margin-bottom: 20px;
  1541. border-radius: 4px;
  1542. }
  1543. .header {
  1544. display: flex;
  1545. justify-content: space-between;
  1546. align-items: center;
  1547. font-size: 16px;
  1548. font-weight: 500;
  1549. }
  1550. .data-card {
  1551. background-color: #fff;
  1552. border-radius: 4px;
  1553. padding: 15px;
  1554. height: 120px;
  1555. display: flex;
  1556. flex-direction: column;
  1557. position: relative;
  1558. transition: background-color 0.3s ease-in-out;
  1559. }
  1560. .data-card:hover {
  1561. border: 1px solid #4592ff;
  1562. background-color: #e7f1ff;
  1563. }
  1564. .card-title {
  1565. color: #606266;
  1566. font-size: 14px;
  1567. margin-bottom: 10px;
  1568. }
  1569. .card-title1 {
  1570. color: white;
  1571. font-size: 14px;
  1572. margin-bottom: 10px;
  1573. }
  1574. .card-value {
  1575. font-size: 24px;
  1576. font-weight: bold;
  1577. margin-top: 20px;
  1578. }
  1579. .highlight {
  1580. color: #409EFF;
  1581. }
  1582. .card-sub {
  1583. display: flex;
  1584. justify-content: space-between;
  1585. font-size: 12px;
  1586. color: #909399;
  1587. margin-top: 5px;
  1588. }
  1589. .card-desc {
  1590. font-size: 12px;
  1591. color: #909399;
  1592. margin-top: 5px;
  1593. }
  1594. .card-badge {
  1595. position: absolute;
  1596. top: 15px;
  1597. right: 15px;
  1598. background: #f0f9eb;
  1599. color: #67c23a;
  1600. padding: 2px 5px;
  1601. border-radius: 4px;
  1602. }
  1603. .cdn-label {
  1604. background-color: #409EFF;
  1605. color: white;
  1606. padding: 2px 5px;
  1607. border-radius: 4px;
  1608. margin-right: 5px;
  1609. font-size: 12px;
  1610. }
  1611. .tab-group {
  1612. display: flex;
  1613. gap: 10px;
  1614. }
  1615. .action-group {
  1616. display: flex;
  1617. gap: 10px;
  1618. }
  1619. .analysis-card {
  1620. border-radius: 4px;
  1621. padding: 20px;
  1622. display: flex;
  1623. align-items: center;
  1624. }
  1625. .card-icon {
  1626. width: 50px;
  1627. height: 50px;
  1628. background-color: rgba(64, 158, 255, 0.1);
  1629. border-radius: 8px;
  1630. display: flex;
  1631. justify-content: center;
  1632. align-items: center;
  1633. font-size: 24px;
  1634. color: #409EFF;
  1635. margin-right: 20px;
  1636. }
  1637. .card-content {
  1638. display: flex;
  1639. }
  1640. .card-row {
  1641. display: flex;
  1642. justify-content: center;
  1643. justify-items: center;
  1644. flex-direction: column;
  1645. padding: 10px;
  1646. .highlight {
  1647. text-align: center;
  1648. margin-top: 1em;
  1649. font-family: BebasNeue;
  1650. color: #1677ff;
  1651. font-size: 21px;
  1652. line-height: 42px;
  1653. font-weight: 600;
  1654. margin-top: 8px;
  1655. }
  1656. font-size: 15px;
  1657. color: #000;
  1658. }
  1659. .charts-section {
  1660. margin-top: 20px;
  1661. }
  1662. .chart-header {
  1663. display: flex;
  1664. justify-content: space-between;
  1665. align-items: center;
  1666. }
  1667. .view-more {
  1668. font-size: 12px;
  1669. }
  1670. .legend {
  1671. display: flex;
  1672. gap: 15px;
  1673. }
  1674. .legend-item {
  1675. display: flex;
  1676. align-items: center;
  1677. font-size: 12px;
  1678. }
  1679. .dot {
  1680. width: 10px;
  1681. height: 10px;
  1682. border-radius: 50%;
  1683. margin-right: 5px;
  1684. }
  1685. .viewer-dot {
  1686. background-color: #409EFF;
  1687. }
  1688. .complete-dot {
  1689. background-color: #67C23A;
  1690. }
  1691. .chart-container {
  1692. height: 350px;
  1693. width: 100%;
  1694. }
  1695. .analysis-card-check {
  1696. display: flex;
  1697. flex-direction: row;
  1698. border: 1px solid transparent;
  1699. background-color: #fff;
  1700. border-radius: 4px;
  1701. }
  1702. .analysis-card-check:hover {
  1703. cursor: pointer;
  1704. }
  1705. .analysis-card-check-selected:after {
  1706. content: "";
  1707. display: block;
  1708. border-width: 15px;
  1709. position: absolute;
  1710. bottom: -30px;
  1711. left: 50%;
  1712. margin-left: -32px;
  1713. border-style: solid dashed dashed solid;
  1714. border-color: #4592FF transparent transparent transparent;
  1715. font-size: 0;
  1716. line-height: 0;
  1717. z-index: 1;
  1718. }
  1719. .analysis-card-check-selected:before {
  1720. content: "";
  1721. display: block;
  1722. border-width: 15px;
  1723. position: absolute;
  1724. bottom: -30px;
  1725. left: 50%;
  1726. margin-left: -32px;
  1727. border-style: solid dashed dashed solid;
  1728. border-color: #4592FF transparent transparent transparent;
  1729. font-size: 0;
  1730. line-height: 0;
  1731. z-index: 1;
  1732. }
  1733. .analysis-card-check-selected {
  1734. border: 1px solid #4592FF;
  1735. background-color: #e7f1ff;
  1736. }
  1737. .color {
  1738. position: relative;
  1739. border: 1px solid #4592FF;
  1740. background-color: #e7f1ff;
  1741. }
  1742. .color:after {
  1743. bottom: -27px;
  1744. border-color: #E7F1FF transparent transparent transparent;
  1745. }
  1746. .companybox {
  1747. color: white;
  1748. background-color: #006CFF;
  1749. padding: 10px 10px 40px 10px;
  1750. box-sizing: border-box;
  1751. position: relative;
  1752. border-radius: 6px;
  1753. .topimg {
  1754. width: 100px;
  1755. height: 80px;
  1756. position: absolute;
  1757. top: 0px;
  1758. left: 0;
  1759. }
  1760. .bottomimg {
  1761. width: 100px;
  1762. height: 80px;
  1763. position: absolute;
  1764. bottom: -10px;
  1765. right: 0;
  1766. transform: rotate(180deg);
  1767. }
  1768. .companyboxtitle {
  1769. height: 30px;
  1770. margin-bottom: 20px;
  1771. font-weight: 600;
  1772. }
  1773. .companyflex {
  1774. display: flex;
  1775. justify-content: space-around;
  1776. }
  1777. }
  1778. .companynumber {
  1779. color: white;
  1780. }
  1781. .companycard {
  1782. width: 25%;
  1783. }
  1784. .companyadd {
  1785. color: white;
  1786. }
  1787. .cardafter {
  1788. position: relative;
  1789. }
  1790. .cardafter::after {
  1791. content: "";
  1792. height: 60px;
  1793. border-right: 1px solid rgba(255, 255, 255, 0.20);
  1794. position: absolute;
  1795. right: 30px;
  1796. top: 0px;
  1797. }
  1798. .highlight1 {
  1799. margin-top: 10px;
  1800. margin-left: 20px;
  1801. }
  1802. .propertyboxtitle {
  1803. background-image: url(../assets/images/zcgl_bg.png);
  1804. height: 100px;
  1805. }
  1806. .propertyboxflex {
  1807. display: flex;
  1808. background-color: white;
  1809. justify-content: space-between;
  1810. }
  1811. .property-card {
  1812. width: 48%;
  1813. border-radius: 4px;
  1814. padding: 15px;
  1815. height: 100px;
  1816. display: flex;
  1817. flex-direction: column;
  1818. position: relative;
  1819. transition: background-color 0.3s ease-in-out;
  1820. }
  1821. .property_title {
  1822. height: 40px;
  1823. line-height: 40px;
  1824. color: rgba(32, 33, 36, 1);
  1825. box-sizing: border-box;
  1826. padding-left: 10px;
  1827. font-weight: 600;
  1828. }
  1829. .card-compare {
  1830. margin-top: 5px;
  1831. font-size: 14px;
  1832. color: rgba(92, 95, 102, 1);
  1833. span {
  1834. font-size: 13px;
  1835. transform: scale(.8);
  1836. color: rgba(49, 185, 154, 1);
  1837. }
  1838. }
  1839. .propertyline {
  1840. position: relative;
  1841. }
  1842. .propertyline::after {
  1843. position: absolute;
  1844. content: "";
  1845. height: 80px;
  1846. border-right: 1px solid rgba(237, 239, 242, 1);
  1847. right: 0;
  1848. }
  1849. .operatetitle {
  1850. font-weight: 600;
  1851. height: 50px;
  1852. line-height: 50px;
  1853. }
  1854. .operatetitle-col {
  1855. display: flex;
  1856. justify-content: space-between;
  1857. padding-bottom: 20px;
  1858. padding-right: 5px;
  1859. .operatetitle-card {
  1860. width: 24%;
  1861. border: 1px solid transparent;
  1862. background-color: rgba(245, 247, 250, 1);
  1863. border-radius: 4px;
  1864. padding: 15px;
  1865. display: flex;
  1866. flex-direction: column;
  1867. position: relative;
  1868. transition: background-color 0.3s ease-in-out;
  1869. .operate-value {
  1870. font-size: 24px;
  1871. font-weight: bold;
  1872. }
  1873. }
  1874. }
  1875. .yesterdaybox {
  1876. font-size: 14px;
  1877. color: rgba(92, 95, 102, 1);
  1878. font-weight: 200;
  1879. margin-top: 10px;
  1880. }
  1881. .internetbox {
  1882. background: linear-gradient(to right, rgba(255, 99, 0, 1), rgba(255, 159, 1, 1));
  1883. border-radius: 6px;
  1884. padding: 2px 5px 15px 5px;
  1885. width: 100%;
  1886. .internet-cardtop {
  1887. background-color: white;
  1888. border-radius: 3px;
  1889. margin-top: 5px;
  1890. justify-content: space-between;
  1891. padding: 15px;
  1892. box-sizing: border-box;
  1893. color: rgba(32, 33, 36, 1);
  1894. .cardinnerbox {
  1895. display: flex;
  1896. justify-content: space-between;
  1897. .cardtopimg {
  1898. display: flex;
  1899. align-items: center;
  1900. font-size: 15px;
  1901. img {
  1902. height: 18px;
  1903. width: 18px;
  1904. }
  1905. }
  1906. .cardtopnumber {
  1907. font-size: 25px;
  1908. color: rgba(32, 33, 36, 1);
  1909. font-weight: bold;
  1910. }
  1911. }
  1912. .cardinnerbox2 {
  1913. display: flex;
  1914. justify-content: space-between;
  1915. font-size: 14px;
  1916. color: rgba(92, 95, 102, 1);
  1917. }
  1918. }
  1919. .internetbox-messge {
  1920. color: white;
  1921. display: flex;
  1922. justify-content: space-between;
  1923. padding: 15px 10px 10px 10px;
  1924. .internet-card {
  1925. display: flex;
  1926. font-size: 14px;
  1927. align-items: center;
  1928. img {
  1929. height: 18px;
  1930. width: 18px;
  1931. }
  1932. span {
  1933. padding-left: 5px;
  1934. }
  1935. }
  1936. .internet-number {
  1937. font-size: 25px;
  1938. }
  1939. }
  1940. .internetbox {
  1941. display: flex;
  1942. color: white;
  1943. .internet-card {
  1944. width: 100%;
  1945. display: flex;
  1946. color: white;
  1947. }
  1948. }
  1949. .internet-title {
  1950. font-size: 14px;
  1951. }
  1952. }
  1953. .company {
  1954. background-color: #006CFF;
  1955. }
  1956. .highlight-red {
  1957. text-align: center;
  1958. margin-top: 1em;
  1959. font-family: BebasNeue;
  1960. color: rgba(255, 82, 82, 1);
  1961. font-size: 21px;
  1962. line-height: 42px;
  1963. font-weight: 600;
  1964. margin-top: 8px;
  1965. }
  1966. .highlight-black {
  1967. text-align: center;
  1968. margin-top: 1em;
  1969. font-family: BebasNeue;
  1970. color: rgba(32, 33, 36, 1);
  1971. font-size: 21px;
  1972. line-height: 42px;
  1973. font-weight: 600;
  1974. margin-top: 8px;
  1975. }
  1976. .operatetitle-card:hover {
  1977. border: 1px solid #4592ff;
  1978. background-color: #e7f1ff;
  1979. }
  1980. .icon-img {
  1981. height: 14px;
  1982. width: 14px;
  1983. }
  1984. .progress {
  1985. transform: rotate(180deg);
  1986. margin-top: 20px;
  1987. }
  1988. .progress ::v-deep .el-progress-bar__outer {
  1989. background-color: rgba(247, 152, 11, 0.2);
  1990. }
  1991. ::v-deep .el-progress {
  1992. .el-progress-bar {
  1993. .el-progress-bar__inner {
  1994. background: linear-gradient(to right, #FF6300, #FF9F01)
  1995. }
  1996. }
  1997. }
  1998. </style>