index.vue 61 KB

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