statisticsDashboard.vue 68 KB

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