statisticsDashboard.vue 67 KB

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