index.vue 61 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196
  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>{{ consumptionDayCompareText }}</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. <el-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="versionLimit ? Math.min(100, Math.round(todayWatchUserCount/versionLimit*100)) : 0" :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. {{ trafficRemainText }}
  184. </div>
  185. </div>
  186. <div class="progress" v-if="trafficUsagePercent != null">
  187. <el-progress :percentage="trafficUsagePercent" :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. {{ smsRemainCount }}
  208. </div>
  209. </div>
  210. </div>
  211. </el-col>
  212. </el-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, 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: this.$runtimeConfig.VUE_APP_COURSE_DEFAULT==1?"会员":"企微",
  923. userType: this.$runtimeConfig.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. trafficRemainText: '--',
  987. trafficUsagePercent: null
  988. }
  989. },
  990. computed: {
  991. consumptionDayCompareText() {
  992. const today = Number(this.todayComsumption) || 0
  993. const yesterday = Number(this.yesterdayComsumption) || 0
  994. const diff = today - yesterday
  995. if (diff > 0) {
  996. return '+' + diff.toFixed(2)
  997. }
  998. if (diff < 0) {
  999. return diff.toFixed(2)
  1000. }
  1001. return '0'
  1002. }
  1003. },
  1004. mounted() {
  1005. this.$nextTick(() => {
  1006. this.initViewerChart()
  1007. this.initDealerChartNew();
  1008. this.initCourseWatchChart();
  1009. this.initAnswerRedPackViewerChart();
  1010. this.initAnswerRedPackMoneyViewerChart();
  1011. this.initThisMonthOrderChart();
  1012. this.initThisMonthRecvChart()
  1013. // 监听窗口大小变化,重新渲染图表
  1014. window.addEventListener('resize', () => {
  1015. this.viewerChart && this.viewerChart.resize()
  1016. this.dealerChartNew && this.dealerChartNew.resize()
  1017. this.courseWatchChart && this.courseWatchChart.resize()
  1018. })
  1019. })
  1020. },
  1021. created() {
  1022. // 检查是否是首次登录
  1023. if (localStorage.getItem('isFirstLogin') === 'true') {
  1024. this.$message.warning('请先设置密码');
  1025. this.$router.push('/set-password');
  1026. return;
  1027. }
  1028. this.refresh();
  1029. },
  1030. methods: {
  1031. handleUserType(){
  1032. if(this.userTypeText === '会员'){
  1033. this.userType = 1
  1034. }else{
  1035. this.userType = 2
  1036. }
  1037. this.refresh()
  1038. },
  1039. /**
  1040. * 计算余额预计可持续的天数
  1041. * @param {number} balance - 当前账户余额
  1042. * @param {number} todayConsumption - 今日消耗金额
  1043. * @param {number} yesterdayConsumption - 昨日消耗金额
  1044. * @return {Object} 包含天数和进度百分比的对象
  1045. */
  1046. calculateRemainingDays(balance, todayConsumption, yesterdayConsumption) {
  1047. // 如果今日和昨日消耗都为0,则无法预测(避免除以0)
  1048. if (todayConsumption === 0 && yesterdayConsumption === 0) {
  1049. return {
  1050. days: Infinity,
  1051. percentage: 0,
  1052. message: '暂无消耗数据'
  1053. };
  1054. }
  1055. // 计算每日平均消耗量
  1056. const avgDailyConsumption = (todayConsumption + yesterdayConsumption) / 2;
  1057. // 如果平均消耗为0,则无法预测
  1058. if (avgDailyConsumption === 0) {
  1059. return {
  1060. days: Infinity,
  1061. percentage: 0,
  1062. message: '暂无消耗数据'
  1063. };
  1064. }
  1065. // 计算剩余天数(向下取整)
  1066. const remainingDays = Math.floor(balance / avgDailyConsumption);
  1067. // 计算进度条百分比,最大为100
  1068. // 这里假设100天是满值,可以根据需要调整
  1069. const maxDays = 100;
  1070. const percentage = Math.min(100, Math.max(0, Math.round((remainingDays / maxDays) * 100)));
  1071. let message = '';
  1072. if (remainingDays > 365) {
  1073. message = '预测余额充足';
  1074. } else {
  1075. message = `预测不足${remainingDays}天`;
  1076. }
  1077. return {
  1078. days: remainingDays,
  1079. percentage: 100 - percentage,
  1080. message: message
  1081. };
  1082. },
  1083. /**
  1084. * 将字节数转换为合适的单位表示(Byte、KB、MB、GB、TB)
  1085. * @param {number} bytes - 字节数
  1086. * @param {number} [decimals=2] - 小数点后保留的位数
  1087. * @returns {string} 格式化后的字符串,包含数值和单位
  1088. */
  1089. formatBytes(bytes, decimals = 2) {
  1090. if (bytes === 0) return '0 Byte';
  1091. const k = 1024;
  1092. const sizes = ['Byte', 'KB', 'MB', 'GB', 'TB'];
  1093. // 计算合适的单位级别
  1094. const i = Math.floor(Math.log(bytes) / Math.log(k));
  1095. // 转换为对应单位的值
  1096. const value = bytes / Math.pow(k, i);
  1097. // 格式化为指定小数位的字符串
  1098. return parseFloat(value.toFixed(decimals)) + ' ' + sizes[Math.min(i, sizes.length - 1)];
  1099. },
  1100. // 手动刷新
  1101. manualRefresh() {
  1102. this.refresh();
  1103. },
  1104. // 处理自动刷新选项
  1105. handleAutoRefresh(command) {
  1106. // 清除之前的定时器
  1107. if (this.timer) {
  1108. clearInterval(this.timer);
  1109. this.timer = null;
  1110. }
  1111. // 设置新的刷新间隔
  1112. this.autoRefreshInterval = parseInt(command);
  1113. // 如果间隔大于0,设置新的定时器
  1114. if (this.autoRefreshInterval > 0) {
  1115. this.timer = setInterval(() => {
  1116. this.refresh();
  1117. }, this.autoRefreshInterval * 60 * 1000); // 转换为毫秒
  1118. this.$message.success(`已设置${this.autoRefreshInterval}分钟自动刷新`);
  1119. } else {
  1120. this.$message.info('已关闭自动刷新');
  1121. }
  1122. },
  1123. refresh() {
  1124. rechargeComsumption().then(res=>{
  1125. if(res.code === 200){
  1126. this.balance = res.data.balance;
  1127. this.todayComsumption = res.data.todayComsumption;
  1128. this.yesterdayComsumption = res.data.yesterdayComsumption;
  1129. let calculateRemainingDays1 = this.calculateRemainingDays(this.balance,this.todayComsumption,this.yesterdayComsumption);
  1130. this.percentage = calculateRemainingDays1.percentage;
  1131. this.remainMessage = calculateRemainingDays1.message;
  1132. }
  1133. });
  1134. // 获取红包概览
  1135. redPacketInfo().then(res=>{
  1136. if(res.code === 200){
  1137. if(res.data){
  1138. this.redBalance = res.data.redBalance || 0;
  1139. this.redTodayComsumption = res.data.redTodayComsumption || 0;
  1140. }
  1141. }
  1142. }).catch(() => {
  1143. // 红包接口不可用时静默处理
  1144. this.redBalance = 0;
  1145. this.redTodayComsumption = 0;
  1146. })
  1147. trafficLog().then(res=>{
  1148. if(res.code === 200 && res.data) {
  1149. this.todayTraffic = res.data.today || 0;
  1150. this.thisMonthTraffic = res.data.thisMonth || 0;
  1151. if (res.data.traffic) {
  1152. this.trafficRemainText = res.data.traffic
  1153. } else if (this.thisMonthTraffic > 0) {
  1154. this.trafficRemainText = this.formatBytes(this.thisMonthTraffic)
  1155. } else {
  1156. this.trafficRemainText = '--'
  1157. }
  1158. }
  1159. }).catch(() => {
  1160. this.trafficRemainText = '--'
  1161. })
  1162. dealerAggregated().then(res=>{
  1163. if(res.code === 200){
  1164. this.dealderCount = res.data.dealderCount??0;
  1165. this.groupMgrCount = res.data.groupMgrCount??0;
  1166. this.memberCount = res.data.memberCount??0;
  1167. this.qwMemberNum = res.data.qwMemberNum??0;
  1168. this.normalNum = res.data.normalNum??0;
  1169. this.blackNum = res.data.blackNum??0;
  1170. this.todayIncreaseUserNum = res.data.todayIncreaseUserNum??0;
  1171. this.orderTotalNum = res.data.orderTotalNum??0;
  1172. this.todayOrderNum = res.data.todayOrderNum??0;
  1173. this.recvTotalNum = res.data.recvTotalNum??0;
  1174. this.recvTodayNum = res.data.recvTodayNum??0;
  1175. this.goodsTotalNum = res.data.goodsTotalNum??0;
  1176. this.todayGoodsNum = res.data.todayGoodsNum??0;
  1177. }
  1178. })
  1179. let param = this.getParam();
  1180. // 获取当前日期时间
  1181. const today = dayjs();
  1182. param.startTime = this.formatDate(today);
  1183. param.endTime = this.formatDate(today);
  1184. analysisPreview(param).then(res=>{
  1185. if(res.code === 200){
  1186. this.watchUserCount = res.data.watchUserCount;
  1187. this.completedUserCount = res.data.completedUserCount;
  1188. this.completedRate = res.data.completedRate;
  1189. this.watchCount = res.data.watchCount;
  1190. this.completedCount = res.data.completedCount;
  1191. this.answerMemberCount = res.data.answerMemberCount;
  1192. this.correctUserCount = res.data.correctUserCount;
  1193. this.correctRate = res.data.correctRate;
  1194. this.rewardCount = res.data.rewardCount;
  1195. this.rewardMoney = res.data.rewardMoney;
  1196. this.watchRate = res.data.watchRate;
  1197. }
  1198. })
  1199. smsBalance().then(res=>{
  1200. if(res.code === 200){
  1201. if(res.data == null) {
  1202. this.smsRemainCount = 0;
  1203. } else {
  1204. this.smsRemainCount = res.data;
  1205. }
  1206. }
  1207. })
  1208. authorizationInfo().then(res=>{
  1209. if(res.code === 200){
  1210. this.todayWatchUserCount = res.data.todayWatchUserCount;
  1211. this.versionLimit = res.data.versionLimit;
  1212. }
  1213. })
  1214. this.handleCourseWatchChart()
  1215. this.handleViewChartData()
  1216. this.handleDealerChartDataNew()
  1217. this.handleAnswerRedPackViewerChart()
  1218. this.handleAnswerRedPackMoneyViewerChart()
  1219. this.handleThisMonthRecvCount();
  1220. this.handleThisMonthOrderCount();
  1221. },
  1222. /**
  1223. * 将数字添加千位分隔符
  1224. * @param {number|string} num - 需要格式化的数字
  1225. * @return {string} 添加千位分隔符后的字符串
  1226. */
  1227. formatNumberWithCommas(num) {
  1228. if (num === null || num === undefined || isNaN(Number(num))) {
  1229. return '0';
  1230. }
  1231. const numStr = String(num);
  1232. // 处理负数
  1233. const isNegative = numStr.startsWith('-');
  1234. const absNumStr = isNegative ? numStr.slice(1) : numStr;
  1235. // 分离整数部分和小数部分
  1236. const parts = absNumStr.split('.');
  1237. const integerPart = parts[0];
  1238. const decimalPart = parts.length > 1 ? '.' + parts[1] : '';
  1239. const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
  1240. return (isNegative ? '-' : '') + formattedInteger + decimalPart;
  1241. },
  1242. handleToggleDiv(selected) {
  1243. this.selectedDiv = selected;
  1244. if (selected === 1) {
  1245. this.$nextTick(() => {
  1246. if (this.courseWatchChart) {
  1247. this.courseWatchChart.resize();
  1248. } else {
  1249. }
  1250. });
  1251. }
  1252. else if (selected === 0) {
  1253. this.$nextTick(() => {
  1254. if (this.viewerChart) this.viewerChart.resize();
  1255. if (this.dealerChartNew) this.dealerChartNew.resize();
  1256. });
  1257. } else if (selected === 2) {
  1258. this.$nextTick(() => {
  1259. if (this.answerRedPackViewerChart) this.answerRedPackViewerChart.resize();
  1260. if (this.answerRedPackMoneyViewerChart) this.answerRedPackMoneyViewerChart.resize();
  1261. });
  1262. }
  1263. if (this.selectedDiv === 0) {
  1264. this.handleViewChartData()
  1265. this.handleDealerChartDataNew()
  1266. } else if (this.selectedDiv === 1) {
  1267. this.handleCourseWatchChart()
  1268. } else if (this.selectedDiv === 2) {
  1269. this.handleAnswerRedPackViewerChart()
  1270. this.handleAnswerRedPackMoneyViewerChart()
  1271. }
  1272. },
  1273. formatDate(date) {
  1274. return dayjs(date).format('YYYY-MM-DD');
  1275. },
  1276. getParam(){
  1277. let param = {
  1278. startTime: '',
  1279. endTime: '',
  1280. userType: this.userType
  1281. };
  1282. // 获取当前日期时间
  1283. const today = dayjs();
  1284. let type = 0;
  1285. if (this.queryTime === '今日') {
  1286. param.startTime = this.formatDate(today);
  1287. param.endTime = this.formatDate(today);
  1288. type = 0;
  1289. } else if (this.queryTime === '昨日') {
  1290. const yesterday = today.subtract(1, 'day');
  1291. param.startTime = this.formatDate(yesterday);
  1292. param.endTime = this.formatDate(yesterday);
  1293. type = 1;
  1294. } else if (this.queryTime === '本周') {
  1295. param.startTime = this.formatDate(today.startOf('week'));
  1296. param.endTime = this.formatDate(today.endOf('week'));
  1297. type = 2;
  1298. } else if (this.queryTime === '本月') {
  1299. param.startTime = this.formatDate(today.startOf('month'));
  1300. param.endTime = this.formatDate(today.endOf('month'));
  1301. type = 3;
  1302. } else if (this.queryTime === '上月') {
  1303. const lastMonth = today.subtract(1, 'month');
  1304. param.startTime = this.formatDate(lastMonth.startOf('month'));
  1305. param.endTime = this.formatDate(lastMonth.endOf('month'));
  1306. type = 4;
  1307. } else {
  1308. console.warn(`未知的 queryTime: ${this.queryTime}, 默认使用今日`);
  1309. param.startTime = this.formatDate(today);
  1310. param.endTime = this.formatDate(today);
  1311. }
  1312. param.type = type;
  1313. param.sort = this.delerSort;
  1314. return param;
  1315. },
  1316. // 分析概览
  1317. handleAnalysis(e) {
  1318. let param = this.getParam();
  1319. analysisPreview(param).then(res => {
  1320. if (res.code === 200) {
  1321. this.watchUserCount = res.data.watchUserCount;
  1322. this.completedUserCount = res.data.completedUserCount;
  1323. this.completedRate = res.data.completedRate;
  1324. this.watchCount = res.data.watchCount;
  1325. this.completedCount = res.data.completedCount;
  1326. this.answerMemberCount = res.data.answerMemberCount;
  1327. this.correctUserCount = res.data.correctUserCount;
  1328. this.correctRate = res.data.correctRate;
  1329. this.rewardCount = res.data.rewardCount;
  1330. this.rewardMoney = res.data.rewardMoney;
  1331. this.watchRate = res.data.watchRate;
  1332. }
  1333. })
  1334. if (this.selectedDiv === 0) {
  1335. this.handleViewChartData()
  1336. this.handleDealerChartDataNew()
  1337. } else if (this.selectedDiv === 1) {
  1338. this.handleCourseWatchChart()
  1339. } else if (this.selectedDiv === 2) {
  1340. this.handleAnswerRedPackViewerChart()
  1341. this.handleAnswerRedPackMoneyViewerChart()
  1342. }
  1343. },
  1344. handleAnswerRedPackViewerChart(){
  1345. let param = this.getParam();
  1346. param = {...param,statisticalType:this.viewerType,dataType: this.dataType};
  1347. rewardMoneyTopTen(param).then(res=>{
  1348. if(res.code === 200){
  1349. let data = res.data;
  1350. let companyNameList = data.map(e=>e.companyName)
  1351. let courseNameList = data.map(e=>e.courseName)
  1352. let rewardMoneyList = data.map(e=>e.rewardMoney)
  1353. if(this.dataType === '0'){
  1354. redPackageOption.xAxis.data = companyNameList;
  1355. }else{
  1356. redPackageOption.xAxis.data = courseNameList;
  1357. }
  1358. redPackageOption.series[0].data = rewardMoneyList;
  1359. this.answerRedPackViewerChart.setOption(redPackageOption)
  1360. }
  1361. })
  1362. },
  1363. handleAnswerRedPackMoneyViewerChart(){
  1364. let param = this.getParam();
  1365. param = {...param,statisticalType:this.viewerType,dataType: this.dataType};
  1366. rewardMoneyTrend(param).then(res=>{
  1367. if(res.code === 200){
  1368. let data = res.data;
  1369. let option = data.map(e=>[e.x,e.rewardMoney])
  1370. lineChartOption.series[0].data = option;
  1371. this.answerRedPackMoneyViewerChart.setOption(lineChartOption)
  1372. }
  1373. })
  1374. },
  1375. handleCourseWatchChart() {
  1376. let param = this.getParam();
  1377. param = {...param,statisticalType:this.viewerType};
  1378. watchCourseTopTen(param).then(res=>{
  1379. if(res.code === 200){
  1380. let data = res.data;
  1381. let watchUserCountList = data.map(e=>e.watchUserCount);
  1382. let completedUserCountList = data.map(e=>e.completedUserCount);
  1383. let answerUserCountList = data.map(e=>e.answerUserCount);
  1384. let correctUserCountList = data.map(e=>e.correctUserCount);
  1385. let courseNameList = data.map(e=>e.courseName);
  1386. courseWatchOption.xAxis.data = courseNameList;
  1387. courseWatchOption.series[0].data = watchUserCountList;
  1388. courseWatchOption.series[1].data = completedUserCountList;
  1389. courseWatchOption.series[2].data = answerUserCountList;
  1390. courseWatchOption.series[3].data = correctUserCountList;
  1391. this.courseWatchChart.setOption(courseWatchOption)
  1392. }
  1393. })
  1394. },
  1395. handleDealerChartDataNew() {
  1396. let param = this.getParam();
  1397. getWatchCourseStatisticsData({ ...param }).then(res => {
  1398. if (res.code === 200) {
  1399. // 根据实际数据结构调整
  1400. let data = res.data;
  1401. let watchUserCountList = data.map(e => e.watchCount); // 观看次数
  1402. let completedUserCountList = data.map(e => e.finishCount); // 完播次数
  1403. let xAxis = data.map(e => e.companyName); // X轴使用公司名称
  1404. // 更新图表配置
  1405. dealerOptionNew.series[0].data = watchUserCountList;
  1406. dealerOptionNew.series[1].data = completedUserCountList;
  1407. dealerOptionNew.xAxis.data = xAxis;
  1408. this.dealerChartNew.setOption(dealerOptionNew);
  1409. }
  1410. })
  1411. },
  1412. initDealerChartNew() {
  1413. this.dealerChartNew = echarts.init(this.$refs.dealerChartNew)
  1414. this.dealerChartNew.setOption(dealerOptionNew)
  1415. },
  1416. handleThisMonthOrderCount(){
  1417. thisMonthOrderCount().then(res=>{
  1418. if(res.code === 200){
  1419. let dates = res.dates;
  1420. let orderCount = res.orderCount;
  1421. let payPrice = res.payPrice;
  1422. thisMonthOrderCountOption.series[0].data = orderCount;
  1423. thisMonthOrderCountOption.series[1].data = payPrice;
  1424. thisMonthOrderCountOption.xAxis.data = dates;
  1425. this.thisMonthOrderChart.setOption(thisMonthOrderCountOption)
  1426. }
  1427. })
  1428. },
  1429. handleThisMonthRecvCount(){
  1430. thisMonthRecvCount().then(res=>{
  1431. if(res.code === 200){
  1432. let dates = res.dates;
  1433. let orderCount = res.orderCount;
  1434. let payMoney = res.payMoney;
  1435. thisMonthRecvCountOption.series[0].data = orderCount;
  1436. thisMonthRecvCountOption.series[1].data = payMoney;
  1437. thisMonthRecvCountOption.xAxis.data = dates;
  1438. this.thisMonthRecvChart.setOption(thisMonthRecvCountOption)
  1439. }
  1440. })
  1441. },
  1442. handleViewChartData(){
  1443. let param = this.getParam();
  1444. watchEndPlayTrend({...param}).then(res=>{
  1445. if(res.code === 200){
  1446. let data = res.data;
  1447. let watchUserCountList = data.map(e=>e.watchUserCount);
  1448. let completedUserCountList = data.map(e=>e.completedUserCount);
  1449. let xAxis = data.map(e=>e.x);
  1450. viewCharOption.series[0].data = watchUserCountList;
  1451. viewCharOption.series[1].data = completedUserCountList;
  1452. viewCharOption.xAxis.data = xAxis;
  1453. this.viewerChart.setOption(viewCharOption);
  1454. }
  1455. })
  1456. },
  1457. initThisMonthOrderChart(){
  1458. this.thisMonthOrderChart = echarts.init(this.$refs.viewerOrderChart)
  1459. this.thisMonthOrderChart.setOption(thisMonthOrderCountOption)
  1460. },
  1461. initThisMonthRecvChart(){
  1462. this.thisMonthRecvChart = echarts.init(this.$refs.viewerReceiveChart)
  1463. this.thisMonthRecvChart.setOption(thisMonthRecvCountOption)
  1464. },
  1465. initViewerChart() {
  1466. this.viewerChart = echarts.init(this.$refs.viewerChart)
  1467. this.viewerChart.setOption(viewCharOption)
  1468. },
  1469. initCourseWatchChart() {
  1470. this.courseWatchChart = echarts.init(this.$refs.courseWatchChart)
  1471. this.courseWatchChart.setOption(courseWatchOption)
  1472. },
  1473. initAnswerRedPackViewerChart(){
  1474. this.answerRedPackViewerChart = echarts.init(this.$refs.answerRedPackViewerChart)
  1475. this.answerRedPackViewerChart.setOption(redPackageOption)
  1476. },
  1477. initAnswerRedPackMoneyViewerChart(){
  1478. this.answerRedPackMoneyViewerChart = echarts.init(this.$refs.answerRedPackMoneyViewerChart)
  1479. this.answerRedPackMoneyViewerChart.setOption(lineChartOption)
  1480. }
  1481. },
  1482. beforeDestroy() {
  1483. // 组件销毁时清除定时器
  1484. if (this.timer) {
  1485. clearInterval(this.timer);
  1486. this.timer = null;
  1487. }
  1488. // window.removeEventListener('resize', this.resizeHandler)
  1489. this.viewerChart && this.viewerChart.dispose()
  1490. this.dealerChartNew && this.dealerChartNew.dispose()
  1491. this.courseWatchChart && this.courseWatchChart.dispose()
  1492. this.answerRedPackViewerChart && this.answerRedPackViewerChart.dispose()
  1493. this.answerRedPackMoneyViewerChart && this.answerRedPackMoneyViewerChart.dispose()
  1494. this.thisMonthOrderChart && this.thisMonthOrderChart.dispose()
  1495. this.thisMonthRecvChart && this.thisMonthRecvChart.dispose()
  1496. }
  1497. }
  1498. </script>
  1499. <style scoped>
  1500. .highlight-today-add {
  1501. color: green;
  1502. font-size: 17px;
  1503. font-weight: normal;
  1504. }
  1505. .highlight-today-add2 {
  1506. color: rgba(49, 185, 154, 1);
  1507. font-size: 14px;
  1508. font-weight: normal;
  1509. transform: scale(.9);
  1510. }
  1511. .action-group .el-button+.el-button,
  1512. .action-group .el-dropdown {
  1513. margin-left: 10px;
  1514. }
  1515. .is-active {
  1516. color: #409EFF;
  1517. font-weight: bold;
  1518. }
  1519. ::v-deep .el-radio-button__inner:hover {
  1520. color: #409EFF;
  1521. /* 鼠标悬浮时的文字颜色,可以根据需要调整 */
  1522. }
  1523. ::v-deep .el-radio-button.is-active .el-radio-button__inner {
  1524. background-color: #409EFF;
  1525. /* 选中时的背景色 */
  1526. border-color: #409EFF;
  1527. /* 选中时的边框色 */
  1528. color: #FFFFFF;
  1529. /* 选中时的文字颜色 (通常是白色) */
  1530. box-shadow: -1px 0 0 0 #409EFF;
  1531. /* 处理按钮间的连接缝隙 */
  1532. }
  1533. /* 如果需要,也可以修改非选中状态下的聚焦(focus)或悬浮(hover)样式 */
  1534. /* 例如,让非选中按钮悬浮时边框和文字也变蓝 */
  1535. ::v-deep .el-radio-button:not(.is-active) .el-radio-button__inner:hover {
  1536. color: #409EFF;
  1537. /* border-color: #b3d8ff; Element UI 默认悬浮边框色,可以按需修改 */
  1538. }
  1539. /* 聚焦时的外框,如果需要的话 */
  1540. ::v-deep .el-radio-button:focus:not(.is-checked) .el-radio-button__inner {
  1541. /* border-color: #409EFF; */
  1542. /* Element UI 默认的 focus 颜色通常关联主题色 */
  1543. /* box-shadow: 0 0 2px 2px rgba(64, 158, 255, 0.2); */
  1544. /* 示例 focus 光晕 */
  1545. }
  1546. .statistics-dashboard {
  1547. padding: 20px;
  1548. background-color: #f5f7fa;
  1549. }
  1550. .overview-section,
  1551. .analysis-section {
  1552. margin-bottom: 20px;
  1553. border-radius: 4px;
  1554. }
  1555. .header {
  1556. display: flex;
  1557. justify-content: space-between;
  1558. align-items: center;
  1559. font-size: 16px;
  1560. font-weight: 500;
  1561. }
  1562. .data-card {
  1563. background-color: #fff;
  1564. border-radius: 4px;
  1565. padding: 15px;
  1566. height: 120px;
  1567. display: flex;
  1568. flex-direction: column;
  1569. position: relative;
  1570. transition: background-color 0.3s ease-in-out;
  1571. }
  1572. .data-card:hover {
  1573. border: 1px solid #4592ff;
  1574. background-color: #e7f1ff;
  1575. }
  1576. .card-title {
  1577. color: #606266;
  1578. font-size: 14px;
  1579. margin-bottom: 10px;
  1580. }
  1581. .card-title1 {
  1582. color: white;
  1583. font-size: 14px;
  1584. margin-bottom: 10px;
  1585. }
  1586. .card-value {
  1587. font-size: 24px;
  1588. font-weight: bold;
  1589. margin-top: 20px;
  1590. }
  1591. .highlight {
  1592. color: #409EFF;
  1593. }
  1594. .card-sub {
  1595. display: flex;
  1596. justify-content: space-between;
  1597. font-size: 12px;
  1598. color: #909399;
  1599. margin-top: 5px;
  1600. }
  1601. .card-desc {
  1602. font-size: 12px;
  1603. color: #909399;
  1604. margin-top: 5px;
  1605. }
  1606. .card-badge {
  1607. position: absolute;
  1608. top: 15px;
  1609. right: 15px;
  1610. background: #f0f9eb;
  1611. color: #67c23a;
  1612. padding: 2px 5px;
  1613. border-radius: 4px;
  1614. }
  1615. .cdn-label {
  1616. background-color: #409EFF;
  1617. color: white;
  1618. padding: 2px 5px;
  1619. border-radius: 4px;
  1620. margin-right: 5px;
  1621. font-size: 12px;
  1622. }
  1623. .tab-group {
  1624. display: flex;
  1625. gap: 10px;
  1626. }
  1627. .action-group {
  1628. display: flex;
  1629. gap: 10px;
  1630. }
  1631. .analysis-card {
  1632. border-radius: 4px;
  1633. padding: 20px;
  1634. display: flex;
  1635. align-items: center;
  1636. }
  1637. .card-icon {
  1638. width: 50px;
  1639. height: 50px;
  1640. background-color: rgba(64, 158, 255, 0.1);
  1641. border-radius: 8px;
  1642. display: flex;
  1643. justify-content: center;
  1644. align-items: center;
  1645. font-size: 24px;
  1646. color: #409EFF;
  1647. margin-right: 20px;
  1648. }
  1649. .card-content {
  1650. display: flex;
  1651. }
  1652. .card-row {
  1653. display: flex;
  1654. justify-content: center;
  1655. justify-items: center;
  1656. flex-direction: column;
  1657. padding: 10px;
  1658. .highlight {
  1659. text-align: center;
  1660. margin-top: 1em;
  1661. font-family: BebasNeue;
  1662. color: #1677ff;
  1663. font-size: 21px;
  1664. line-height: 42px;
  1665. font-weight: 600;
  1666. margin-top: 8px;
  1667. }
  1668. font-size: 15px;
  1669. color: #000;
  1670. }
  1671. .charts-section {
  1672. margin-top: 20px;
  1673. }
  1674. .chart-header {
  1675. display: flex;
  1676. justify-content: space-between;
  1677. align-items: center;
  1678. }
  1679. .view-more {
  1680. font-size: 12px;
  1681. }
  1682. .legend {
  1683. display: flex;
  1684. gap: 15px;
  1685. }
  1686. .legend-item {
  1687. display: flex;
  1688. align-items: center;
  1689. font-size: 12px;
  1690. }
  1691. .dot {
  1692. width: 10px;
  1693. height: 10px;
  1694. border-radius: 50%;
  1695. margin-right: 5px;
  1696. }
  1697. .viewer-dot {
  1698. background-color: #409EFF;
  1699. }
  1700. .complete-dot {
  1701. background-color: #67C23A;
  1702. }
  1703. .chart-container {
  1704. height: 350px;
  1705. width: 100%;
  1706. }
  1707. .analysis-card-check {
  1708. display: flex;
  1709. flex-direction: row;
  1710. border: 1px solid transparent;
  1711. background-color: #fff;
  1712. border-radius: 4px;
  1713. }
  1714. .analysis-card-check:hover {
  1715. cursor: pointer;
  1716. }
  1717. .analysis-card-check-selected:after {
  1718. content: "";
  1719. display: block;
  1720. border-width: 15px;
  1721. position: absolute;
  1722. bottom: -30px;
  1723. left: 50%;
  1724. margin-left: -32px;
  1725. border-style: solid dashed dashed solid;
  1726. border-color: #4592FF transparent transparent transparent;
  1727. font-size: 0;
  1728. line-height: 0;
  1729. z-index: 1;
  1730. }
  1731. .analysis-card-check-selected:before {
  1732. content: "";
  1733. display: block;
  1734. border-width: 15px;
  1735. position: absolute;
  1736. bottom: -30px;
  1737. left: 50%;
  1738. margin-left: -32px;
  1739. border-style: solid dashed dashed solid;
  1740. border-color: #4592FF transparent transparent transparent;
  1741. font-size: 0;
  1742. line-height: 0;
  1743. z-index: 1;
  1744. }
  1745. .analysis-card-check-selected {
  1746. border: 1px solid #4592FF;
  1747. background-color: #e7f1ff;
  1748. }
  1749. .color {
  1750. position: relative;
  1751. border: 1px solid #4592FF;
  1752. background-color: #e7f1ff;
  1753. }
  1754. .color:after {
  1755. bottom: -27px;
  1756. border-color: #E7F1FF transparent transparent transparent;
  1757. }
  1758. .companybox {
  1759. color: white;
  1760. background-color: #006CFF;
  1761. padding: 10px 10px 40px 10px;
  1762. box-sizing: border-box;
  1763. position: relative;
  1764. border-radius: 6px;
  1765. .topimg {
  1766. width: 100px;
  1767. height: 80px;
  1768. position: absolute;
  1769. top: 0px;
  1770. left: 0;
  1771. }
  1772. .bottomimg {
  1773. width: 100px;
  1774. height: 80px;
  1775. position: absolute;
  1776. bottom: -10px;
  1777. right: 0;
  1778. transform: rotate(180deg);
  1779. }
  1780. .companyboxtitle {
  1781. height: 30px;
  1782. margin-bottom: 20px;
  1783. font-weight: 600;
  1784. }
  1785. .companyflex {
  1786. display: flex;
  1787. justify-content: space-around;
  1788. }
  1789. }
  1790. .companynumber {
  1791. color: white;
  1792. }
  1793. .companycard {
  1794. width: 25%;
  1795. }
  1796. .companyadd {
  1797. color: white;
  1798. }
  1799. .cardafter {
  1800. position: relative;
  1801. }
  1802. .cardafter::after {
  1803. content: "";
  1804. height: 60px;
  1805. border-right: 1px solid rgba(255, 255, 255, 0.20);
  1806. position: absolute;
  1807. right: 30px;
  1808. top: 0px;
  1809. }
  1810. .highlight1 {
  1811. margin-top: 10px;
  1812. margin-left: 20px;
  1813. }
  1814. .propertyboxtitle {
  1815. background-image: url(../assets/images/zcgl_bg.png);
  1816. height: 100px;
  1817. }
  1818. .propertyboxflex {
  1819. display: flex;
  1820. background-color: white;
  1821. justify-content: space-between;
  1822. }
  1823. .property-card {
  1824. width: 48%;
  1825. border-radius: 4px;
  1826. padding: 15px;
  1827. height: 100px;
  1828. display: flex;
  1829. flex-direction: column;
  1830. position: relative;
  1831. transition: background-color 0.3s ease-in-out;
  1832. }
  1833. .property_title {
  1834. height: 40px;
  1835. line-height: 40px;
  1836. color: rgba(32, 33, 36, 1);
  1837. box-sizing: border-box;
  1838. padding-left: 10px;
  1839. font-weight: 600;
  1840. }
  1841. .card-compare {
  1842. margin-top: 5px;
  1843. font-size: 14px;
  1844. color: rgba(92, 95, 102, 1);
  1845. span {
  1846. font-size: 13px;
  1847. transform: scale(.8);
  1848. color: rgba(49, 185, 154, 1);
  1849. }
  1850. }
  1851. .propertyline {
  1852. position: relative;
  1853. }
  1854. .propertyline::after {
  1855. position: absolute;
  1856. content: "";
  1857. height: 80px;
  1858. border-right: 1px solid rgba(237, 239, 242, 1);
  1859. right: 0;
  1860. }
  1861. .operatetitle {
  1862. font-weight: 600;
  1863. height: 50px;
  1864. line-height: 50px;
  1865. }
  1866. .operatetitle-col{
  1867. display: flex;
  1868. justify-content: space-between;
  1869. padding-bottom: 20px;
  1870. padding-right: 5px;
  1871. .operatetitle-card {
  1872. width: 24%;
  1873. border: 1px solid transparent;
  1874. background-color: rgba(245, 247, 250, 1);
  1875. border-radius: 4px;
  1876. padding: 15px;
  1877. display: flex;
  1878. flex-direction: column;
  1879. position: relative;
  1880. transition: background-color 0.3s ease-in-out;
  1881. .operate-value {
  1882. font-size: 24px;
  1883. font-weight: bold;
  1884. }
  1885. }
  1886. }
  1887. .yesterdaybox {
  1888. font-size: 14px;
  1889. color: rgba(92, 95, 102, 1);
  1890. font-weight: 200;
  1891. margin-top: 10px;
  1892. }
  1893. .internetbox {
  1894. background: linear-gradient(to right, rgba(255, 99, 0, 1), rgba(255, 159, 1, 1));
  1895. border-radius: 6px;
  1896. padding: 2px 5px 15px 5px;
  1897. width: 100%;
  1898. .internet-cardtop {
  1899. background-color: white;
  1900. border-radius: 3px;
  1901. margin-top: 5px;
  1902. justify-content: space-between;
  1903. padding: 15px;
  1904. box-sizing: border-box;
  1905. color: rgba(32, 33, 36, 1);
  1906. .cardinnerbox {
  1907. display: flex;
  1908. justify-content: space-between;
  1909. .cardtopimg {
  1910. display: flex;
  1911. align-items: center;
  1912. font-size: 15px;
  1913. img {
  1914. height: 18px;
  1915. width: 18px;
  1916. }
  1917. }
  1918. .cardtopnumber {
  1919. font-size: 25px;
  1920. color: rgba(32, 33, 36, 1);
  1921. font-weight: bold;
  1922. }
  1923. }
  1924. .cardinnerbox2 {
  1925. display: flex;
  1926. justify-content: space-between;
  1927. font-size: 14px;
  1928. color: rgba(92, 95, 102, 1);
  1929. }
  1930. }
  1931. .internetbox-messge{
  1932. color: white;
  1933. display: flex;
  1934. justify-content: space-between;
  1935. padding: 15px 10px 10px 10px;
  1936. .internet-card{
  1937. display: flex;
  1938. font-size: 14px;
  1939. align-items: center;
  1940. img{
  1941. height: 18px;
  1942. width: 18px;
  1943. }
  1944. span{
  1945. padding-left: 5px;
  1946. }
  1947. }
  1948. .internet-number{
  1949. font-size: 25px;
  1950. }
  1951. }
  1952. .internetbox {
  1953. display: flex;
  1954. color: white;
  1955. .internet-card {
  1956. width: 100%;
  1957. display: flex;
  1958. color: white;
  1959. }
  1960. }
  1961. .internet-title {
  1962. font-size: 14px;
  1963. }
  1964. }
  1965. .company {
  1966. background-color: 006CFF;
  1967. }
  1968. .highlight-red{
  1969. text-align: center;
  1970. margin-top: 1em;
  1971. font-family: BebasNeue;
  1972. color: rgba(255, 82, 82, 1);
  1973. font-size: 21px;
  1974. line-height: 42px;
  1975. font-weight: 600;
  1976. margin-top: 8px;
  1977. }
  1978. .highlight-black{
  1979. text-align: center;
  1980. margin-top: 1em;
  1981. font-family: BebasNeue;
  1982. color: rgba(32, 33, 36, 1);
  1983. font-size: 21px;
  1984. line-height: 42px;
  1985. font-weight: 600;
  1986. margin-top: 8px;
  1987. }
  1988. .operatetitle-card:hover{
  1989. border: 1px solid #4592ff;
  1990. background-color: #e7f1ff;
  1991. }
  1992. .icon-img{
  1993. height: 14px;
  1994. width: 14px;
  1995. }
  1996. .progress{
  1997. transform: rotate(180deg);
  1998. margin-top: 20px;
  1999. }
  2000. .progress ::v-deep .el-progress-bar__outer{
  2001. background-color: rgba(247, 152, 11, 0.2);
  2002. }
  2003. ::v-deep .el-progress {
  2004. .el-progress-bar {
  2005. .el-progress-bar__inner {
  2006. background: linear-gradient(to right, #FF6300,#FF9F01)
  2007. }
  2008. }
  2009. }
  2010. </style>