index.vue 63 KB

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