index.vue 66 KB

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