big.html 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  6. <title>大数据综合展示</title>
  7. <link rel="stylesheet" type="text/css" href="static/big/css/app.css" />
  8. <link rel="stylesheet" type="text/css" href="static/big/css/power-float/common.css" />
  9. <link rel="stylesheet" type="text/css" href="static/big/css/power-float/powerFloat.css" />
  10. </head>
  11. <body>
  12. <header id="header">
  13. <h3 class="header-title">西安建工资管集团大数据综合展示</h3>
  14. <div class="header-info header-info-l">数据来源:西安建工 & 资管集团</div>
  15. <div class="header-info header-info-r">数据日期:<span id="nowDate"></span></div>
  16. </header>
  17. <footer id="footer"></footer>
  18. <div id="container">
  19. <div id="flexCon">
  20. <div class="flex-row">
  21. <div class="flex-cell flex-cell-c" style="padding-right:0;">
  22. <div class="chart-wrapper">
  23. <h3 class="chart-title">年度经营数据(万元)</h3>
  24. <div class="chart-div chart-done">
  25. <table class="data-t">
  26. <tr>
  27. <th><img onclick="dataClick(1)" src="static/big/img/icon-03.png" style="cursor: pointer"/></th>
  28. <td>
  29. <p><span onclick="dataClick(1)" id="financeYearTask" style="cursor: pointer">0</span></p>
  30. <p>年度利润任务</p>
  31. </td>
  32. <th><img onclick="dataClick(1)" src="static/big/img/11.png" style="cursor: pointer" /></th>
  33. <td>
  34. <p><span onclick="dataClick(1)" id="financeYearRatio" style="cursor: pointer">0</span></p>
  35. <p>年度利润完成率</p>
  36. </td>
  37. </tr>
  38. <tr>
  39. <th><img onclick="dataClick(2)" src="static/big/img/icon-03.png" style="cursor: pointer"/></th>
  40. <td>
  41. <p><span onclick="dataClick(2)" id="financingYearTask" style="cursor: pointer">0</span></p>
  42. <p>年度融资任务</p>
  43. </td>
  44. <th><img onclick="dataClick(2)" src="static/big/img/11.png" style="cursor: pointer" /></th>
  45. <td>
  46. <p><span onclick="dataClick(2)" id="financingYearRatio" style="cursor: pointer">0</span></p>
  47. <p>年度融资完成率</p>
  48. </td>
  49. </tr>
  50. <tr>
  51. <th><img onclick="dataClick(3)" src="static/big/img/icon-03.png" style="cursor: pointer"/></th>
  52. <td>
  53. <p><span onclick="dataClick(3)" id="investYearTask" style="cursor: pointer">0</span></p>
  54. <p>年度投资任务</p>
  55. </td>
  56. <th><img onclick="dataClick(3)" src="static/big/img/11.png" style="cursor: pointer" /></th>
  57. <td>
  58. <p><span onclick="dataClick(3)" id="investYearRatio" style="cursor: pointer">0</span></p>
  59. <p>年度投资完成率</p>
  60. </td>
  61. </tr>
  62. <tr>
  63. <th><img onclick="dataClick(4)" style="cursor: pointer" src="static/big/img/icon-03.png" /></th>
  64. <td>
  65. <p><span onclick="dataClick(4)" style="cursor: pointer" id="liquidateYearTask">0</span></p>
  66. <p>年度清收任务</p>
  67. </td>
  68. <th><img onclick="dataClick(4)" style="cursor: pointer" src="static/big/img/11.png" /></th>
  69. <td>
  70. <p><span onclick="dataClick(4)" style="cursor: pointer" id="liquidateYearRatio">0</span></p>
  71. <p>年度清收完成率</p>
  72. </td>
  73. </tr>
  74. </table>
  75. </div>
  76. </div>
  77. </div>
  78. <div class="flex-cell flex-cell-c" style="padding-right:0;">
  79. <div class="chart-wrapper">
  80. <h3 class="chart-title">季度经营数据(万元)</h3>
  81. <div class="chart-div chart-done">
  82. <table class="data-t">
  83. <tr>
  84. <th><img onclick="dataClick(1)" style="cursor: pointer" src="static/big/img/icon-03.png" /></th>
  85. <td>
  86. <p><span onclick="dataClick(1)" style="cursor: pointer" id="financeQuarterTask">0</span></p>
  87. <p>季度利润累计任务</p>
  88. </td>
  89. <th><img onclick="dataClick(1)" style="cursor: pointer" src="static/big/img/11.png" /></th>
  90. <td>
  91. <p><span onclick="dataClick(1)" style="cursor: pointer" id="financeQuarterRatio">0</span></p>
  92. <p>季度利润累计完成率</p>
  93. </td>
  94. </tr>
  95. <tr>
  96. <th><img onclick="dataClick(2)" style="cursor: pointer" src="static/big/img/icon-03.png" /></th>
  97. <td>
  98. <p><span onclick="dataClick(2)" style="cursor: pointer" id="financingQuarterTask">0</span></p>
  99. <p>季度融资累计任务</p>
  100. </td>
  101. <th><img onclick="dataClick(2)" style="cursor: pointer" src="static/big/img/11.png" /></th>
  102. <td>
  103. <p><span onclick="dataClick(2)" style="cursor: pointer" id="financingQuarterRatio">0</span></p>
  104. <p>季度融资累计完成率</p>
  105. </td>
  106. </tr>
  107. <tr>
  108. <th><img onclick="dataClick(3)" style="cursor: pointer" src="static/big/img/icon-03.png" /></th>
  109. <td>
  110. <p><span onclick="dataClick(3)" style="cursor: pointer" id="investQuarterTask">0</span></p>
  111. <p>季度投资累计任务</p>
  112. </td>
  113. <th><img onclick="dataClick(3)" style="cursor: pointer" src="static/big/img/11.png" /></th>
  114. <td>
  115. <p><span onclick="dataClick(3)" style="cursor: pointer" id="investQuarterRatio">0</span></p>
  116. <p>季度投资累计完成率</p>
  117. </td>
  118. </tr>
  119. <tr>
  120. <th><img onclick="dataClick(4)" style="cursor: pointer" src="static/big/img/icon-03.png" /></th>
  121. <td>
  122. <p><span onclick="dataClick(4)" style="cursor: pointer" id="liquidateQuarterTask">0</span></p>
  123. <p>季度清收累计任务</p>
  124. </td>
  125. <th><img onclick="dataClick(4)" style="cursor: pointer" src="static/big/img/11.png" /></th>
  126. <td>
  127. <p><span onclick="dataClick(4)" style="cursor: pointer" id="liquidateQuarterRatio">0</span></p>
  128. <p>季度清收累计完成率</p>
  129. </td>
  130. </tr>
  131. </table>
  132. </div>
  133. </div>
  134. </div>
  135. <div class="flex-cell flex-cell-c" style="padding-right:0;">
  136. <div class="chart-wrapper">
  137. <h3 class="chart-title">月度经营数据(万元)</h3>
  138. <div class="chart-div chart-done">
  139. <table class="data-t">
  140. <tr>
  141. <th><img onclick="dataClick(1)" style="cursor: pointer" src="static/big/img/icon-03.png" /></th>
  142. <td>
  143. <p><span onclick="dataClick(1)" style="cursor: pointer" id="financeMonthTask">0</span></p>
  144. <p>月度利润累计任务</p>
  145. </td>
  146. <th><img onclick="dataClick(1)" style="cursor: pointer" src="static/big/img/11.png" /></th>
  147. <td>
  148. <p><span onclick="dataClick(1)" style="cursor: pointer" id="financeMonthRatio">0</span></p>
  149. <p>月度利润累计完成率</p>
  150. </td>
  151. </tr>
  152. <tr>
  153. <th><img onclick="dataClick(2)" style="cursor: pointer" src="static/big/img/icon-03.png" /></th>
  154. <td>
  155. <p><span onclick="dataClick(2)" style="cursor: pointer" id="financingMonthTask">0</span></p>
  156. <p>月度融资累计任务</p>
  157. </td>
  158. <th><img onclick="dataClick(2)" style="cursor: pointer" src="static/big/img/11.png" /></th>
  159. <td>
  160. <p><span onclick="dataClick(2)" style="cursor: pointer" id="financingMonthRatio">0</span></p>
  161. <p>月度融资累计完成率</p>
  162. </td>
  163. </tr>
  164. <tr>
  165. <th><img onclick="dataClick(3)" style="cursor: pointer" src="static/big/img/icon-03.png" /></th>
  166. <td>
  167. <p><span onclick="dataClick(3)" style="cursor: pointer" id="investMonthTask">0</span></p>
  168. <p>月度投资累计任务</p>
  169. </td>
  170. <th><img onclick="dataClick(3)" style="cursor: pointer" src="static/big/img/11.png" /></th>
  171. <td>
  172. <p><span onclick="dataClick(3)" style="cursor: pointer" id="investMonthRatio">0</span></p>
  173. <p>月度投资累计完成率</p>
  174. </td>
  175. </tr>
  176. <tr>
  177. <th><img onclick="dataClick(4)" style="cursor: pointer" src="static/big/img/icon-03.png" /></th>
  178. <td>
  179. <p><span onclick="dataClick(4)" style="cursor: pointer" id="liquidateMonthTask">0</span></p>
  180. <p>月度清收累计任务</p>
  181. </td>
  182. <th><img onclick="dataClick(4)" style="cursor: pointer" src="static/big/img/11.png" /></th>
  183. <td>
  184. <p><span onclick="dataClick(4)" style="cursor: pointer" id="liquidateMonthRatio">0</span></p>
  185. <p>月度清收累计完成率</p>
  186. </td>
  187. </tr>
  188. </table>
  189. </div>
  190. </div>
  191. </div>
  192. <div class="flex-cell flex-cell-c" style="padding-right:0;">
  193. <div class="chart-wrapper">
  194. <h3 class="chart-title">财务数据(万元)</h3>
  195. <div class="chart-div chart-done">
  196. <table class="data-t">
  197. <tr>
  198. <th><img onclick="dataClick(1)" style="cursor: pointer" src="static/big/img/icon-03.png" /></th>
  199. <td>
  200. <p><span onclick="dataClick(1)" style="cursor: pointer" id="accountZjc">0</span></p>
  201. <p>资金池总额</p>
  202. </td>
  203. <th><img onclick="dataClick(1)" style="cursor: pointer" src="static/big/img/icon-03.png" /></th>
  204. <td>
  205. <p><span onclick="dataClick(1)" style="cursor: pointer" id="accountFzjc">0</span></p>
  206. <p>非资金池总额</p>
  207. </td>
  208. </tr>
  209. <tr>
  210. <th><img onclick="dataClick(1)" style="cursor: pointer" src="static/big/img/icon-03.png" /></th>
  211. <td id="planInTdShow" rel="planInTdShowBox">
  212. <p><span onclick="dataClick(1)" style="cursor: pointer" id="planIn">0</span></p>
  213. <p>本月计划收入</p>
  214. </td>
  215. <th><img onclick="dataClick(1)" style="cursor: pointer" src="static/big/img/icon-03.png" /></th>
  216. <td id="realInTdShow" rel="realInTdShowBox">
  217. <p><span onclick="dataClick(1)" style="cursor: pointer" id="realIn">0</span></p>
  218. <p>本月实际收入</p>
  219. </td>
  220. </tr>
  221. <tr>
  222. <th><img onclick="dataClick(1)" style="cursor: pointer" src="static/big/img/icon-03.png" /></th>
  223. <td id="planOutTdShow" rel="planOutTdShowBox">
  224. <p><span onclick="dataClick(1)" style="cursor: pointer" id="planOut">0</span></p>
  225. <p>本月计划支出</p>
  226. </td>
  227. <th><img onclick="dataClick(1)" style="cursor: pointer" src="static/big/img/icon-03.png" /></th>
  228. <td id="realOutTdShow" rel="realOutTdShowBox">
  229. <p><span onclick="dataClick(1)" style="cursor: pointer" id="realOut">0</span></p>
  230. <p>本月实际支出</p>
  231. </td>
  232. </tr>
  233. <tr>
  234. <th><img onclick="dataClick(2)" style="cursor: pointer" src="static/big/img/icon-03.png" /></th>
  235. <td>
  236. <p><span onclick="dataClick(2)" style="cursor: pointer" id="rongzidaifu">0</span></p>
  237. <p>本月融资待还</p>
  238. </td>
  239. <th><img onclick="dataClick(2)" style="cursor: pointer" src="static/big/img/icon-03.png" /></th>
  240. <td>
  241. <p><span onclick="dataClick(2)" style="cursor: pointer" id="rongziyifu">0</span></p>
  242. <p>本月融资已还</p>
  243. </td>
  244. </tr>
  245. </table>
  246. </div>
  247. </div>
  248. </div>
  249. <!--<div class="flex-cell flex-cell-r" style="padding-left:0;">
  250. <div class="chart-wrapper">
  251. <h3 class="chart-title" style="display: inline-block;cursor: pointer" onclick="dataClick(7)" >融资月度汇总(万元)</h3>
  252. &lt;!&ndash;<h3 class="chart-title" id="qs-type" style="display: inline-block;float: right;margin-right: 35px">展期项目</h3>&ndash;&gt;
  253. <div class="chart-div" id="qsChart">
  254. <div class="chart-loader"><div class="loader"></div></div>
  255. </div>
  256. </div>
  257. </div>-->
  258. </div>
  259. <div class="flex-row">
  260. <!-- <div class="flex-cell flex-cell-lc" style="padding-bottom:0;">
  261. <div class="chart-wrapper">
  262. <h3 class="chart-title" style="display: inline-block;cursor: pointer" onclick="dataClick(4)">利润月度汇总(万元)</h3>
  263. &lt;!&ndash;<h3 class="chart-title" id="project-type" style="display: inline-block;float: right;margin-right: 35px">融资项目</h3>&ndash;&gt;
  264. <div class="chart-div" id="trendChart">
  265. <div class="chart-loader"><div class="loader"></div></div>
  266. </div>
  267. </div>
  268. </div>-->
  269. <div class="flex-cell flex-cell-r" style="padding-bottom:0;">
  270. <div class="chart-wrapper">
  271. <h3 class="chart-title" onclick="dataClick(1)" style="display: inline-block;cursor: pointer">利润月度汇总(万元)</h3>
  272. <div class="chart-div" id="financeChart">
  273. <div class="chart-loader"><div class="loader"></div></div>
  274. </div>
  275. </div>
  276. </div>
  277. <div class="flex-cell flex-cell-r" style="padding-bottom:0;">
  278. <div class="chart-wrapper">
  279. <h3 class="chart-title" onclick="dataClick(2)" style="display: inline-block;cursor: pointer">融资月度汇总(万元)</h3>
  280. <div class="chart-div" id="financingChart">
  281. <div class="chart-loader"><div class="loader"></div></div>
  282. </div>
  283. </div>
  284. </div>
  285. <div class="flex-cell flex-cell-r" style="padding-bottom:0;">
  286. <div class="chart-wrapper">
  287. <h3 class="chart-title" onclick="dataClick(3)" style="display: inline-block;cursor: pointer">投资月度汇总(万元)</h3>
  288. <div class="chart-div" id="investChart">
  289. <div class="chart-loader"><div class="loader"></div></div>
  290. </div>
  291. </div>
  292. </div>
  293. <div class="flex-cell flex-cell-r" style="padding-bottom:0;">
  294. <div class="chart-wrapper">
  295. <h3 class="chart-title" onclick="dataClick(4)" style="display: inline-block;cursor: pointer">清收月度汇总(万元)</h3>
  296. <div class="chart-div" id="liquidateChart">
  297. <div class="chart-loader"><div class="loader"></div></div>
  298. </div>
  299. </div>
  300. </div>
  301. </div>
  302. </div>
  303. </div>
  304. <!--rgba(0,0,0,0.6)-->
  305. <div id="planInTdShowBox" class="shadow target_box dn background-show-box">
  306. <div class="target_list">
  307. <p style="padding-top: 15px;padding-left: 15px;padding-right: 15px">计划经营回款: <span id="planBackAmount">0</span></p>
  308. <p style="padding: 15px;">&nbsp;&nbsp;&nbsp;&nbsp;计划融资款: <span id="planFinancingAmount">0</span></p>
  309. </div>
  310. </div>
  311. <div id="realInTdShowBox" class="shadow target_box dn background-show-box">
  312. <div class="target_list">
  313. <p style="padding-top: 15px;padding-left: 15px;padding-right: 15px">实际已回款: <span id="realBackAmount">0</span></p>
  314. <p style="padding-top: 15px;padding-left: 15px;">实际融资款: <span id="realFinancingAmount">0</span></p>
  315. </div>
  316. </div>
  317. <div id="planOutTdShowBox" class="shadow target_box dn background-show-box">
  318. <div class="target_list">
  319. <p style="padding-top: 15px;padding-left: 15px;padding-right: 15px">项目计划支出: <span id="planExpendAmount">0</span></p>
  320. <p style="padding: 15px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;需还贷: <span id="planRepayLoan">0</span></p>
  321. </div>
  322. </div>
  323. <div id="realOutTdShowBox" class="shadow target_box dn background-show-box">
  324. <div class="target_list">
  325. <p style="padding-top: 15px;padding-left: 15px;padding-right: 15px">项目实际支出: <span id="realExpendAmount">0</span></p>
  326. <p style="padding: 15px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;实际还贷: <span id="realRepayLoan">0</span></p>
  327. </div>
  328. </div>
  329. <script type="text/javascript" src="static/big/js/jquery-3.3.1.min.js"></script>
  330. <script type="text/javascript" src="static/big/js/countUp.min.js"></script>
  331. <script type="text/javascript" src="static/big/js/echarts.min.js"></script>
  332. <script type="text/javascript" src="static/big/js/echarts-map-china.js"></script>
  333. <script type="text/javascript" src="static/big/js/echarts-theme-shine.js"></script>
  334. <script type="text/javascript" src="static/common/base.js"></script>
  335. <script type="text/javascript" src="static/big/js/power-float/jquery-powerFloat-min.js"></script>
  336. <script type="text/javascript">
  337. const ACCESS_TOKEN = 'Access-Token'
  338. const VUE_STORE_BASE = 'pro__'
  339. $(function() {
  340. //获取当天日期
  341. (function() {
  342. const now = new Date();
  343. const year = now.getFullYear();
  344. const month = now.getMonth()+1;
  345. const day = now.getDate();
  346. $("#nowDate").html(year+"年"+month+"月"+day+"日");
  347. $("#planInTdShow").powerFloat();
  348. $("#realInTdShow").powerFloat();
  349. $("#planOutTdShow").powerFloat();
  350. $("#realOutTdShow").powerFloat();
  351. })();
  352. // 经营数据
  353. countData()
  354. const financingChart = financingProject()
  355. const investChart = investProject()
  356. const financeChart = financeProject()
  357. const liquidateChart = liquidateProject()
  358. //浏览器窗口大小变化时,重置报表大小
  359. $(window).resize(function() {
  360. financingChart.resize();
  361. investChart.resize();
  362. financeChart.resize();
  363. liquidateChart.resize();
  364. });
  365. });
  366. /**
  367. * 获取vue token
  368. * @returns {string}
  369. */
  370. function getToken(){
  371. const storeTokenJson = JSON.parse(localStorage.getItem(VUE_STORE_BASE+ACCESS_TOKEN))
  372. return 'Bearer ' + storeTokenJson.value
  373. }
  374. function getHeader(){
  375. return {
  376. Authorization: getToken(),
  377. // accept: "application/json; charset=utf-8",
  378. // "Access-Control-Allow-Origin": "http://localhost:5000",
  379. // "Access-Control-Allow-Headers":"Origin, X-Requested-With, Content-Type, Accept"
  380. }
  381. }
  382. function ajaxError(xhr){
  383. if (xhr.status === 401) {
  384. // 跳转登录页面
  385. window.parent.location.href = '/user/login'
  386. } else{
  387. // 调用外部的error
  388. error && error(xhr,textStatus,errorThrown);
  389. }
  390. }
  391. function dataClick (type) {
  392. if(type === 1){
  393. jumpUrl('/dashboard/analysisFinance')
  394. }
  395. if(type === 2){
  396. jumpUrl('/dashboard/analysisFinancing')
  397. // jumpUrl('/finance/daily/profit')
  398. }
  399. if(type === 3){
  400. jumpUrl('/dashboard/analysisInvest')
  401. }
  402. if(type === 4){
  403. jumpUrl('/dashboard/analysisLiquidate')
  404. }
  405. if(type === 5){
  406. jumpUrl('/finance/capital/task')
  407. }
  408. if(type === 6){
  409. jumpUrl('/finance/capital/task')
  410. }
  411. if(type === 7){
  412. jumpUrl('/financing/yearly/task')
  413. }
  414. if(type === 8){
  415. jumpUrl('/financing/loan/ledger')
  416. }
  417. if(type === 9){
  418. jumpUrl('/invest/yearly/task')
  419. }
  420. if(type === 10){
  421. jumpUrl('/invest/project/manager')
  422. }
  423. if(type === 11){
  424. jumpUrl('/invest/loan/liquidate')
  425. }
  426. if(type === 12){
  427. jumpUrl('/invest/loan/liquidate')
  428. }
  429. }
  430. function jumpUrl (url) {
  431. window.parent.location.href = url
  432. }
  433. /**
  434. * 经营数据
  435. */
  436. function countData(){
  437. $.ajax({
  438. type: "get",
  439. url: "/api/big/screens/count-data",
  440. headers: getHeader(),
  441. success: function (response) {
  442. const data = response.data
  443. const code = response.code
  444. if(code === 0){
  445. rollNum("accountZjc", 0,divTenThousand(data.companyAccountSumVO.zjc), 2); // 账户总额
  446. //$('#zjc-amount').text('账户总额(资金池:'+divTenThousand(data.companyAccountSumVO.zjc)+'万元)'); // 资金池金额
  447. rollNum("accountFzjc", 0,divTenThousand(data.companyAccountSumVO.fzjc), 2); // 资金池金额
  448. rollNum("planIn", 0, divTenThousand(data.financeCapitalMonthTaskTotalVO.planIncomeAmountSum), 2); // 本月计划收入
  449. rollNum("realIn", 0, divTenThousand(data.financeCapitalMonthTaskTotalVO.realIncomeAmountSum), 2); // 本月实际收入
  450. rollNum("planOut", 0, divTenThousand(data.financeCapitalMonthTaskTotalVO.planExpendAmountSum), 2); // 本月计划支出
  451. rollNum("realOut", 0, divTenThousand(data.financeCapitalMonthTaskTotalVO.realExpendAmountSum), 2); // 本月实际支出
  452. rollNum("rongzidaifu", 0, divTenThousand(data.financingRepaySum.repayPrincipal), 2);// 本月计划还付金额
  453. rollNum("rongziyifu", 0, divTenThousand(data.financingRepaySum.repaidPrincipal), 2);// 本月融资已付
  454. // rollNum("listedCompany", 0, divTenThousand(data.profitTaskYearly.newAmount),2);// 年度利润
  455. // rollNum("listedSecurity", 0, divTenThousand(data.profitTaskYearly.amount),2);// 累计完成利润
  456. $('#planBackAmount').text(divScale(divTenThousand(data.financeCapitalMonthTaskTotalVO.planBackAmount))); // 本月实际支出
  457. $('#planFinancingAmount').text(divScale(divTenThousand(data.financeCapitalMonthTaskTotalVO.planFinancingAmount))); // 本月实际支出
  458. $('#realBackAmount').text(divScale(divTenThousand(data.financeCapitalMonthTaskTotalVO.realBackAmount))); // 本月实际支出
  459. $('#realFinancingAmount').text(divScale(divTenThousand(data.financeCapitalMonthTaskTotalVO.realFinancingAmount))); // 本月实际支出
  460. $('#planExpendAmount').text(divScale(divTenThousand(data.financeCapitalMonthTaskTotalVO.planExpendAmount))); // 本月实际支出
  461. $('#planRepayLoan').text(divScale(divTenThousand(data.financeCapitalMonthTaskTotalVO.planRepayLoan))); // 本月实际支出
  462. $('#realExpendAmount').text(divScale(divTenThousand(data.financeCapitalMonthTaskTotalVO.realExpendAmount))); // 本月实际支出
  463. $('#realRepayLoan').text(divScale(divTenThousand(data.financeCapitalMonthTaskTotalVO.realRepayLoan))); // 本月实际支出
  464. //$('#yhf-amount').text('本月融资待付(已付:'+divTenThousand(data.financingRepaySum.repaidPrincipal)+'万元)'); // 本月计划还付金额
  465. }
  466. },
  467. error: function (xhr,textStatus,errorThrown) {
  468. ajaxError(xhr);
  469. }
  470. });
  471. }
  472. // 利润
  473. function financeProject() {
  474. const myDate=new Date()
  475. const trendChart = echarts.init(document.getElementById("financeChart"), "shine");
  476. const trendChartOpt = {
  477. tooltip: {
  478. trigger: "axis",
  479. axisPointer: {
  480. type: "none"
  481. }
  482. },
  483. legend: {
  484. left: "center",
  485. bottom: 3,
  486. itemWidth: 15,
  487. itemHeight: 10,
  488. textStyle: {
  489. fontSize: 12,
  490. color: "#b0c2f9"
  491. },
  492. data: ["累计新增任务", "累计完成", "累计完成比例(%)"]
  493. },
  494. grid: {
  495. top: 40,
  496. bottom: 50,
  497. left: 100,
  498. right: 60
  499. },
  500. xAxis: {
  501. type: "category",
  502. axisLine: {
  503. lineStyle: { color: "#b0c2f9" }
  504. },
  505. axisTick: { show: false },
  506. axisLabel: {
  507. fontSize: 12,
  508. color: "#b0c2f9"
  509. }
  510. },
  511. yAxis: [{
  512. name: "金额",
  513. type: "value",
  514. splitNumber: 5,
  515. axisLine: {
  516. lineStyle: { color: "#b0c2f9" }
  517. },
  518. splitLine: { show: false },
  519. axisTick: { color: "#b0c2f9" },
  520. axisLabel: {
  521. fontSize: 12,
  522. color: "#b0c2f9",
  523. formatter: function(value, index) {
  524. return parseInt(value) + "万";
  525. }
  526. }
  527. }, {
  528. name: "累计完成比例(%)",
  529. type: "value",
  530. // splitNumber: 5,
  531. // maxInterval: 10000,
  532. // minInterval: 0,
  533. // interval: 5,
  534. axisLine: {
  535. lineStyle: { color: "#b0c2f9" }
  536. },
  537. splitLine: { show: false },
  538. axisTick: { color: "#b0c2f9" },
  539. axisLabel: {
  540. fontSize: 12,
  541. color: "#b0c2f9",
  542. formatter: function(value, index) {
  543. return value + "%";
  544. }
  545. }
  546. }],
  547. visualMap: {
  548. show: false,
  549. seriesIndex: 2,
  550. dimension: 0,
  551. pieces: [{
  552. lte: 9,
  553. color: "rgba(176, 58, 91, 1)"
  554. }, {
  555. gt: 9,
  556. lte: 11,
  557. color: "rgba(176, 58, 91, 0.5)"
  558. }]
  559. },
  560. series: [{
  561. name: "累计新增任务",
  562. type: "bar",
  563. symbol: 'path://d="M150 50 L130 130 L170 130 Z"',
  564. barCategoryGap: "40%",
  565. itemStyle: {
  566. color:"rgba(119, 96, 246, 1)"
  567. },
  568. }, {
  569. name: "累计完成",
  570. type: "bar",
  571. symbol: 'path://d="M150 50 L130 130 L170 130 Z"',
  572. barCategoryGap: "40%",
  573. itemStyle: {
  574. color:"rgb(230, 182, 0)"
  575. },
  576. },{
  577. name: "累计完成比例(%)",
  578. type: "line",
  579. yAxisIndex: 1
  580. }]
  581. };
  582. trendChart.setOption(trendChartOpt);
  583. const params = {
  584. type: 3,
  585. startYear: myDate.getFullYear(),
  586. endYear: myDate.getFullYear()
  587. }
  588. $.ajax({
  589. type: "get",
  590. url: "/api/task/yearly_tasks/finance/profits?type="+
  591. params.type+"&startYear="+params.startYear+"&endYear="+params.endYear,
  592. headers: getHeader(),
  593. success: function (response) {
  594. const data = response.data
  595. const code = response.code
  596. if(code === 0){
  597. setCountData(data,'finance')
  598. const xData = [];
  599. const yData2 = [];
  600. const yDataAdd = [];
  601. const yData3 = [];
  602. for (let i = 0; i < data.length; i++) {
  603. let item = data[i];
  604. xData.push(item.targetName+"月");
  605. // 累计新增任务
  606. yData2.push(divTenThousand(item.newAmountSum));
  607. // 累计完成
  608. yDataAdd.push(divTenThousand(item.amountSum));
  609. // 完成率
  610. yData3.push(item.sumRatio);
  611. }
  612. trendChart.setOption({
  613. xAxis: {
  614. data: xData,
  615. },
  616. series: [{
  617. name: "累计新增任务",
  618. data: yData2
  619. }, {
  620. name: "累计完成",
  621. data: yDataAdd
  622. }, {
  623. name: "累计完成比例(%)",
  624. data: yData3
  625. }]
  626. });
  627. }
  628. },
  629. error: function (xhr,textStatus,errorThrown) {
  630. ajaxError(xhr);
  631. }
  632. });
  633. return trendChart;
  634. }
  635. /**
  636. * 存放任务经营指标
  637. * @param financeYearData :
  638. * @param yearId :
  639. * @param quarterId :
  640. * @param monthId :
  641. */
  642. function setCountData (financeYearData,typeId) {
  643. let dataMap = {};
  644. for (let i = 0; i < financeYearData.length; i++) {
  645. let data = financeYearData[i];
  646. dataMap[data.targetName] = data;
  647. }
  648. const myDate=new Date();
  649. // 当前月度
  650. const month = myDate.getMonth()+1;
  651. // 当前季度
  652. // myDate.getMonth(); //获取当前月份(0-11,0代表1月)
  653. // const currQuarter = Math.floor( ( month % 3 === 0 ? ( month / 3 ) : ( month / 3 + 1 ) ) );
  654. // 获取年度
  655. let yearData = dataMap[12];
  656. rollNum(typeId+'YearTask', 0, divTenThousand(yearData.newAmountSum), 2);
  657. rollNum(typeId+'YearRatio', 0, yearData.sumRatio, 2);
  658. // 获取季度
  659. let quarterData = null;
  660. if(month<=3){
  661. quarterData = dataMap[3];
  662. }else if(month<=6){
  663. quarterData = dataMap[6];
  664. }else if(month<=9){
  665. quarterData = dataMap[9];
  666. }else {
  667. quarterData = dataMap[12];
  668. }
  669. rollNum(typeId+'QuarterTask', 0, divTenThousand(quarterData.newAmountSum), 2);
  670. rollNum(typeId+'QuarterRatio', 0, quarterData.sumRatio, 2);
  671. // 获取月度
  672. let monthData = dataMap[month];
  673. rollNum(typeId+'MonthTask', 0, divTenThousand(monthData.newAmountSum), 2);
  674. rollNum(typeId+'MonthRatio', 0, monthData.sumRatio, 2);
  675. console.log(111, yearData, quarterData, monthData)
  676. }
  677. //项目
  678. function investProject() {
  679. const myDate=new Date()
  680. const trendChart = echarts.init(document.getElementById("investChart"), "shine");
  681. const trendChartOpt = {
  682. tooltip: {
  683. trigger: "axis",
  684. axisPointer: {
  685. type: "none"
  686. }
  687. },
  688. legend: {
  689. left: "center",
  690. bottom: 3,
  691. itemWidth: 15,
  692. itemHeight: 10,
  693. textStyle: {
  694. fontSize: 12,
  695. color: "#b0c2f9"
  696. },
  697. data: ["累计新增任务", "累计完成", "累计完成比例(%)"]
  698. },
  699. grid: {
  700. top: 40,
  701. bottom: 50,
  702. left: 80,
  703. right: 60
  704. },
  705. xAxis: {
  706. type: "category",
  707. axisLine: {
  708. lineStyle: { color: "#b0c2f9" }
  709. },
  710. axisTick: { show: false },
  711. axisLabel: {
  712. fontSize: 12,
  713. color: "#b0c2f9"
  714. }
  715. },
  716. yAxis: [{
  717. name: "金额",
  718. type: "value",
  719. splitNumber: 5,
  720. axisLine: {
  721. lineStyle: { color: "#b0c2f9" }
  722. },
  723. splitLine: { show: false },
  724. axisTick: { color: "#b0c2f9" },
  725. axisLabel: {
  726. fontSize: 12,
  727. color: "#b0c2f9",
  728. formatter: function(value, index) {
  729. return parseInt(value) + "万";
  730. }
  731. }
  732. }, {
  733. name: "累计完成比例(%)",
  734. type: "value",
  735. // splitNumber: 5,
  736. // maxInterval: 10000,
  737. // minInterval: 0,
  738. // interval: 5,
  739. axisLine: {
  740. lineStyle: { color: "#b0c2f9" }
  741. },
  742. splitLine: { show: false },
  743. axisTick: { color: "#b0c2f9" },
  744. axisLabel: {
  745. fontSize: 12,
  746. color: "#b0c2f9",
  747. formatter: function(value, index) {
  748. return value + "%";
  749. }
  750. }
  751. }],
  752. visualMap: {
  753. show: false,
  754. seriesIndex: 2,
  755. dimension: 0,
  756. pieces: [{
  757. lte: 9,
  758. color: "rgba(176, 58, 91, 1)"
  759. }, {
  760. gt: 9,
  761. lte: 11,
  762. color: "rgba(176, 58, 91, 0.5)"
  763. }]
  764. },
  765. series: [{
  766. name: "累计新增任务",
  767. type: "bar",
  768. symbol: 'path://d="M150 50 L130 130 L170 130 Z"',
  769. barCategoryGap: "40%",
  770. itemStyle: {
  771. color:"rgba(119, 96, 246, 1)"
  772. },
  773. }, {
  774. name: "累计完成",
  775. type: "bar",
  776. symbol: 'path://d="M150 50 L130 130 L170 130 Z"',
  777. barCategoryGap: "40%",
  778. itemStyle: {
  779. color:"rgb(230, 182, 0)"
  780. },
  781. },{
  782. name: "累计完成比例(%)",
  783. type: "line",
  784. yAxisIndex: 1
  785. }]
  786. };
  787. trendChart.setOption(trendChartOpt);
  788. const params = {
  789. type: 3,
  790. startYear: myDate.getFullYear(),
  791. endYear: myDate.getFullYear()
  792. }
  793. $.ajax({
  794. type: "get",
  795. url: "/api/task/yearly_tasks/invest/new-amounts?type="+
  796. params.type+"&startYear="+params.startYear+"&endYear="+params.endYear,
  797. headers: getHeader(),
  798. success: function (response) {
  799. const data = response.data
  800. const code = response.code
  801. if(code === 0){
  802. setCountData(data,'invest')
  803. const xData = [];
  804. const yData2 = [];
  805. const yDataAdd = [];
  806. const yData3 = [];
  807. for (let i = 0; i < data.length; i++) {
  808. let item = data[i];
  809. xData.push(item.targetName+"月");
  810. // 累计新增任务
  811. yData2.push(divTenThousand(item.newAmountSum));
  812. // 累计完成
  813. yDataAdd.push(divTenThousand(item.amountSum));
  814. // 完成率
  815. yData3.push(item.sumRatio);
  816. }
  817. trendChart.setOption({
  818. xAxis: {
  819. data: xData,
  820. },
  821. series: [{
  822. name: "累计新增任务",
  823. data: yData2
  824. }, {
  825. name: "累计完成",
  826. data: yDataAdd
  827. }, {
  828. name: "累计完成比例(%)",
  829. data: yData3
  830. }]
  831. });
  832. }
  833. },
  834. error: function (xhr,textStatus,errorThrown) {
  835. ajaxError(xhr);
  836. }
  837. });
  838. return trendChart;
  839. }
  840. //项目
  841. function financingProject() {
  842. const myDate=new Date()
  843. const trendChart = echarts.init(document.getElementById("financingChart"), "shine");
  844. const trendChartOpt = {
  845. tooltip: {
  846. trigger: "axis",
  847. axisPointer: {
  848. type: "none"
  849. }
  850. },
  851. legend: {
  852. left: "center",
  853. bottom: 3,
  854. itemWidth: 15,
  855. itemHeight: 10,
  856. textStyle: {
  857. fontSize: 12,
  858. color: "#b0c2f9"
  859. },
  860. data: ["累计新增任务", "累计完成", "累计完成比例(%)"]
  861. },
  862. grid: {
  863. top: 40,
  864. bottom: 50,
  865. left: 100,
  866. right: 60
  867. },
  868. xAxis: {
  869. type: "category",
  870. axisLine: {
  871. lineStyle: { color: "#b0c2f9" }
  872. },
  873. axisTick: { show: false },
  874. axisLabel: {
  875. fontSize: 12,
  876. color: "#b0c2f9"
  877. }
  878. },
  879. yAxis: [{
  880. name: "金额",
  881. type: "value",
  882. splitNumber: 5,
  883. axisLine: {
  884. lineStyle: { color: "#b0c2f9" }
  885. },
  886. splitLine: { show: false },
  887. axisTick: { color: "#b0c2f9" },
  888. axisLabel: {
  889. fontSize: 12,
  890. color: "#b0c2f9",
  891. formatter: function(value, index) {
  892. return parseInt(value) + "万";
  893. }
  894. }
  895. }, {
  896. name: "累计完成比例(%)",
  897. type: "value",
  898. // splitNumber: 5,
  899. // maxInterval: 10000,
  900. // minInterval: 0,
  901. // interval: 5,
  902. axisLine: {
  903. lineStyle: { color: "#b0c2f9" }
  904. },
  905. splitLine: { show: false },
  906. axisTick: { color: "#b0c2f9" },
  907. axisLabel: {
  908. fontSize: 12,
  909. color: "#b0c2f9",
  910. formatter: function(value, index) {
  911. return value + "%";
  912. }
  913. }
  914. }],
  915. visualMap: {
  916. show: false,
  917. seriesIndex: 2,
  918. dimension: 0,
  919. pieces: [{
  920. lte: 9,
  921. color: "rgba(176, 58, 91, 1)"
  922. }, {
  923. gt: 9,
  924. lte: 11,
  925. color: "rgba(176, 58, 91, 0.5)"
  926. }]
  927. },
  928. series: [{
  929. name: "累计新增任务",
  930. type: "bar",
  931. symbol: 'path://d="M150 50 L130 130 L170 130 Z"',
  932. barCategoryGap: "40%",
  933. itemStyle: {
  934. color:"rgba(119, 96, 246, 1)"
  935. },
  936. }, {
  937. name: "累计完成",
  938. type: "bar",
  939. symbol: 'path://d="M150 50 L130 130 L170 130 Z"',
  940. barCategoryGap: "40%",
  941. itemStyle: {
  942. color:"rgb(230, 182, 0)"
  943. },
  944. },{
  945. name: "累计完成比例(%)",
  946. type: "line",
  947. yAxisIndex: 1
  948. }]
  949. };
  950. trendChart.setOption(trendChartOpt);
  951. const params = {
  952. type: 3,
  953. startYear: myDate.getFullYear(),
  954. endYear: myDate.getFullYear()
  955. }
  956. $.ajax({
  957. type: "get",
  958. url: "/api/task/yearly_tasks/financing/new-amounts?type="+
  959. params.type+"&startYear="+params.startYear+"&endYear="+params.endYear,
  960. headers: getHeader(),
  961. success: function (response) {
  962. const data = response.data
  963. const code = response.code
  964. if(code === 0){
  965. setCountData(data,'financing')
  966. const xData = [];
  967. const yData2 = [];
  968. const yDataAdd = [];
  969. const yData3 = [];
  970. for (let i = 0; i < data.length; i++) {
  971. let item = data[i];
  972. xData.push(item.targetName+"月");
  973. // 累计新增任务
  974. yData2.push(divTenThousand(item.newAmountSum));
  975. // 累计完成
  976. yDataAdd.push(divTenThousand(item.amountSum));
  977. // 完成率
  978. yData3.push(item.sumRatio);
  979. }
  980. trendChart.setOption({
  981. xAxis: {
  982. data: xData,
  983. },
  984. series: [{
  985. name: "累计新增任务",
  986. data: yData2
  987. }, {
  988. name: "累计完成",
  989. data: yDataAdd
  990. }, {
  991. name: "累计完成比例(%)",
  992. data: yData3
  993. }]
  994. });
  995. }
  996. },
  997. error: function (xhr,textStatus,errorThrown) {
  998. ajaxError(xhr);
  999. }
  1000. });
  1001. return trendChart;
  1002. }
  1003. //项目
  1004. function liquidateProject() {
  1005. const myDate=new Date()
  1006. const trendChart = echarts.init(document.getElementById("liquidateChart"), "shine");
  1007. const trendChartOpt = {
  1008. tooltip: {
  1009. trigger: "axis",
  1010. axisPointer: {
  1011. type: "none"
  1012. }
  1013. },
  1014. legend: {
  1015. left: "center",
  1016. bottom: 3,
  1017. itemWidth: 15,
  1018. itemHeight: 10,
  1019. textStyle: {
  1020. fontSize: 12,
  1021. color: "#b0c2f9"
  1022. },
  1023. data: ["累计新增任务", "累计完成", "累计完成比例(%)"]
  1024. },
  1025. grid: {
  1026. top: 40,
  1027. bottom: 50,
  1028. left: 100,
  1029. right: 60
  1030. },
  1031. xAxis: {
  1032. type: "category",
  1033. axisLine: {
  1034. lineStyle: { color: "#b0c2f9" }
  1035. },
  1036. axisTick: { show: false },
  1037. axisLabel: {
  1038. fontSize: 12,
  1039. color: "#b0c2f9"
  1040. }
  1041. },
  1042. yAxis: [{
  1043. name: "金额",
  1044. type: "value",
  1045. splitNumber: 5,
  1046. axisLine: {
  1047. lineStyle: { color: "#b0c2f9" }
  1048. },
  1049. splitLine: { show: false },
  1050. axisTick: { color: "#b0c2f9" },
  1051. axisLabel: {
  1052. fontSize: 12,
  1053. color: "#b0c2f9",
  1054. formatter: function(value, index) {
  1055. return parseInt(value) + "万";
  1056. }
  1057. }
  1058. }, {
  1059. name: "累计完成比例(%)",
  1060. type: "value",
  1061. // splitNumber: 5,
  1062. // maxInterval: 10000,
  1063. // minInterval: 0,
  1064. // interval: 5,
  1065. axisLine: {
  1066. lineStyle: { color: "#b0c2f9" }
  1067. },
  1068. splitLine: { show: false },
  1069. axisTick: { color: "#b0c2f9" },
  1070. axisLabel: {
  1071. fontSize: 12,
  1072. color: "#b0c2f9",
  1073. formatter: function(value, index) {
  1074. return value + "%";
  1075. }
  1076. }
  1077. }],
  1078. visualMap: {
  1079. show: false,
  1080. seriesIndex: 2,
  1081. dimension: 0,
  1082. pieces: [{
  1083. lte: 9,
  1084. color: "rgba(176, 58, 91, 1)"
  1085. }, {
  1086. gt: 9,
  1087. lte: 11,
  1088. color: "rgba(176, 58, 91, 0.5)"
  1089. }]
  1090. },
  1091. series: [{
  1092. name: "累计新增任务",
  1093. type: "bar",
  1094. symbol: 'path://d="M150 50 L130 130 L170 130 Z"',
  1095. barCategoryGap: "40%",
  1096. itemStyle: {
  1097. color:"rgba(119, 96, 246, 1)"
  1098. },
  1099. }, {
  1100. name: "累计完成",
  1101. type: "bar",
  1102. symbol: 'path://d="M150 50 L130 130 L170 130 Z"',
  1103. barCategoryGap: "40%",
  1104. itemStyle: {
  1105. color:"rgb(230, 182, 0)"
  1106. },
  1107. },{
  1108. name: "累计完成比例(%)",
  1109. type: "line",
  1110. yAxisIndex: 1
  1111. }]
  1112. };
  1113. trendChart.setOption(trendChartOpt);
  1114. const params = {
  1115. type: 3,
  1116. startYear: myDate.getFullYear(),
  1117. endYear: myDate.getFullYear()
  1118. }
  1119. $.ajax({
  1120. type: "get",
  1121. url: "/api/liquidate/tasks/task-analysis?type="+
  1122. params.type+"&startYear="+params.startYear+"&endYear="+params.endYear,
  1123. headers: getHeader(),
  1124. success: function (response) {
  1125. const data = response.data
  1126. const code = response.code
  1127. if(code === 0){
  1128. setCountData(data,'liquidate')
  1129. const xData = [];
  1130. const yData2 = [];
  1131. const yDataAdd = [];
  1132. const yData3 = [];
  1133. for (let i = 0; i < data.length; i++) {
  1134. let item = data[i];
  1135. xData.push(item.targetName+"月");
  1136. // 累计新增任务
  1137. yData2.push(divTenThousand(item.newAmountSum));
  1138. // 累计完成
  1139. yDataAdd.push(divTenThousand(item.amountSum));
  1140. // 完成率
  1141. yData3.push(item.sumRatio);
  1142. }
  1143. trendChart.setOption({
  1144. xAxis: {
  1145. data: xData,
  1146. },
  1147. series: [{
  1148. name: "累计新增任务",
  1149. data: yData2
  1150. }, {
  1151. name: "累计完成",
  1152. data: yDataAdd
  1153. }, {
  1154. name: "累计完成比例(%)",
  1155. data: yData3
  1156. }]
  1157. });
  1158. }
  1159. },
  1160. error: function (xhr,textStatus,errorThrown) {
  1161. ajaxError(xhr);
  1162. }
  1163. });
  1164. return trendChart;
  1165. }
  1166. //数字变化特效
  1167. function rollNum(elId, startVal, endVal, decimalNum) {
  1168. let n = decimalNum || 0;
  1169. let countUp = new CountUp(elId, startVal, endVal, n, 2.5, {
  1170. useEasing: true,
  1171. useGrouping: true,
  1172. separator: ',',
  1173. decimal: '.'
  1174. });
  1175. if(!countUp.error) {
  1176. countUp.start();
  1177. }else {
  1178. console.error(countUp.error);
  1179. }
  1180. }
  1181. // 日期格式转化 dateFormat("YYYY-mm-dd HH:MM", date)
  1182. function dateFormat(fmt, date) {
  1183. let ret;
  1184. const opt = {
  1185. "Y+": date.getFullYear().toString(), // 年
  1186. "m+": (date.getMonth() + 1).toString(), // 月
  1187. "d+": date.getDate().toString(), // 日
  1188. "H+": date.getHours().toString(), // 时
  1189. "M+": date.getMinutes().toString(), // 分
  1190. "S+": date.getSeconds().toString() // 秒
  1191. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  1192. };
  1193. for (let k in opt) {
  1194. ret = new RegExp("(" + k + ")").exec(fmt);
  1195. if (ret) {
  1196. fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
  1197. };
  1198. };
  1199. return fmt;
  1200. }
  1201. </script>
  1202. </body>
  1203. </html>