index.ejs 92 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587
  1. <link href="/public/css/bootstrap/bootstrap-colorpicker.min.css" rel="stylesheet">
  2. <div class="panel-content" style="background:#2c3237 !important">
  3. <div class="panel-title fluid border-top-0" style="background:#2c3237 !important">
  4. <div class="title-main d-flex justify-content-between">
  5. <div class="d-inline-block mr-2">
  6. <div class="btn-group" id="first-category">
  7. <button type="button" class="btn btn-sm btn-outline-dark text-white dropdown-toggle" data-cid="" data-value="" data-toggle="dropdown">全部</button>
  8. <div class="dropdown-menu" aria-labelledby="zhankai">
  9. <a class="dropdown-item select-cate" data-value="" href="javascript:void(0);">全部</a>
  10. <% if (categoryData.length > 0 && categoryData[0].value.length > 0) { %>
  11. <% for (const c of categoryData[0].value) { %>
  12. <a class="dropdown-item select-cate" data-cid="<%- c.cid %>" data-value="<%- c.id %>" href="javascript:void(0);"><%- c.value %></a>
  13. <% } %>
  14. <% } %>
  15. </div>
  16. </div>
  17. <% if (categoryData[1] && categoryData[1].value.length > 0) { %>
  18. <div class="btn-group" id="second-category" style="display: none">
  19. <button type="button" class="btn btn-sm btn-outline-dark text-white dropdown-toggle" data-cid="" data-value="" data-toggle="dropdown">全部</button>
  20. <div class="dropdown-menu" aria-labelledby="zhankai">
  21. <a class="dropdown-item select-cate" data-value="" href="javascript:void(0);">全部</a>
  22. <% for (const c of categoryData[1].value) { %>
  23. <a class="dropdown-item select-cate" data-cid="<%- c.cid %>" data-value="<%- c.id %>" href="javascript:void(0);"><%- c.value %></a>
  24. <% } %>
  25. </div>
  26. </div>
  27. <% } %>
  28. <% if (categoryData[2] && categoryData[2].value.length > 0) { %>
  29. <div class="btn-group" id="third-category" style="display: none">
  30. <button type="button" class="btn btn-sm btn-outline-dark text-white dropdown-toggle" data-cid="" data-value="" data-toggle="dropdown">全部</button>
  31. <div class="dropdown-menu" aria-labelledby="zhankai">
  32. <a class="dropdown-item select-cate" data-value="" href="javascript:void(0);">全部</a>
  33. <% for (const c of categoryData[2].value) { %>
  34. <a class="dropdown-item select-cate" data-cid="<%- c.cid %>" data-value="<%- c.id %>" href="javascript:void(0);"><%- c.value %></a>
  35. <% } %>
  36. </div>
  37. </div>
  38. <% } %>
  39. </div>
  40. <div>
  41. <a href="javascript:void(0)" title="全屏显示" id="showFull" class="text-white"><i class="fa fa-arrows-alt"></i></a>
  42. <div class="btn-group">
  43. <button type="button" class="btn btn-sm btn-outline-dark text-white dropdown-toggle" data-toggle="dropdown" id="zhankai">决策大屏<span><%- ctx.session.sessionProject.dataCollect %></span></button>
  44. <div class="dropdown-menu" aria-labelledby="zhankai">
  45. <a class="dropdown-item change-collect" href="javascript:void(0)" data-collect="1">决策大屏1</a>
  46. <a class="dropdown-item change-collect" href="javascript:void(0)" data-collect="2">决策大屏2</a>
  47. <a class="dropdown-item change-collect" href="javascript:void(0)" data-collect="3">决策大屏3</a>
  48. <a class="dropdown-item change-collect" href="javascript:void(0)" data-collect="4">决策大屏4</a>
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="content-wrap" id="big-data">
  55. <div style="height: 30px;background-color: #2c3237; display: none" id="exitfull-div">
  56. <div class="title-main d-flex">
  57. <div class="ml-auto">
  58. <div class="dropdown d-flex float-left mt-1 mr-2">
  59. <button id="exitFull" class="btn btn-sm btn-secondary ml-auto">退出全屏</button>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. <div class="c-body" style="background:#2c3237 !important">
  65. <div class="flex-content" data-content="1" <% if (ctx.session.sessionProject.dataCollect !== 1 && ctx.session.sessionProject.dataCollect !== 2) { %>style="display: none"<% } %>>
  66. <div class="row">
  67. <div class="col-3 pr-0">
  68. <div class="left-content">
  69. <div class="left-card-content">
  70. <div class="height-20 mb-2">
  71. <div class="card text-center bg-dark text-white ml-2 mr-2 py-1 height-100">
  72. <div class="card-body card-per-body">
  73. <div class="row">
  74. <div class="col-6">
  75. <h5 class="card-title card-case-title data_tender_num">0</h5>
  76. <p class="card-text card-case-text text-muted">标段个数</p>
  77. </div>
  78. <div class="col-6">
  79. <h5 class="card-title card-case-title data_tender_rate">0%</h5>
  80. <p class="card-text card-case-text text-muted">计量进度</p>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. <div class="height-20 mb-2">
  87. <div class="card text-center bg-dark text-white ml-2 mr-2 py-2 height-100">
  88. <div class="card-body card-per-body">
  89. <h5 class="card-title card-case-title data_total_price">0.00</h5>
  90. <p class="card-text card-case-text text-muted">台帐金额</p>
  91. </div>
  92. </div>
  93. </div>
  94. <div class="height-20 mb-2">
  95. <div class="card text-center bg-dark text-white ml-2 mr-2 py-2 height-100">
  96. <div class="card-body card-per-body">
  97. <h5 class="card-title card-case-title data_total_change_price">0.00</h5>
  98. <p class="card-text text-muted">累计变更金额</p>
  99. </div>
  100. </div>
  101. </div>
  102. <div class="height-20 mb-2">
  103. <div class="card text-center bg-dark text-white ml-2 mr-2 py-2 height-100">
  104. <div class="card-body card-per-body">
  105. <h5 class="card-title card-case-title data_total_stage_price">0.00</h5>
  106. <p class="card-text text-muted">累计完成金额</p>
  107. </div>
  108. </div>
  109. </div>
  110. <div class="height-20">
  111. <div class="card text-center bg-dark text-white ml-2 mr-2 height-100">
  112. <div class="card-body card-per-body">
  113. <h5 class="card-title card-case-title data_total_material_price">0.00</h5>
  114. <p class="card-text text-muted">材料调差</p>
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. <!--饼图-->
  120. <div class="left-chart">
  121. <div class="card height-100 bg-dark mt-2 ml-2 mr-2">
  122. <div id="jechart" style="height: 100%; width: 100%;"></div>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. <div class="col-6 pl-0 pr-0">
  128. <div class="center-content mr-2">
  129. <div class="center-chart-content">
  130. <div class="center-di">
  131. <div class="card bg-dark height-100">
  132. <div class="jlchart" data-chart-num="1" id="jlchart" style="height: 100%; width: 100%; <% if (ctx.session.sessionProject.dataCollect === 1) { %>display:none;<% } %>"></div>
  133. <div class="di-content mb-2" id="map1" style="background: #343A40; width: 100%; <% if (ctx.session.sessionProject.dataCollect === 2) { %>display:none;<% } %>">
  134. </div>
  135. </div>
  136. </div>
  137. <div class="center-chart">
  138. <div class="card height-100 bg-dark mt-2">
  139. <div class="jlchart" data-chart-num="2" id="jlchart" style="height: 100%; width: 100%; <% if (ctx.session.sessionProject.dataCollect === 2) { %>display:none;<% } %>"></div>
  140. <div class="di-content mb-2" <% if (ctx.session.sessionProject.dataCollect === 1) { %>style="display:none;"<% } %>>
  141. <div class="jldbchart" data-chart-num="1" id="jldbchart" style="height: 100%; width: 100%;"></div>
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. <div class="center-table">
  147. <div class="card height-100 bg-dark mt-2">
  148. <h6 class="bg-dark text-center text-white m-0 py-3">标段明细数据</h6>
  149. <div class="tablebox">
  150. <table id="tableId">
  151. <thead>
  152. <tr>
  153. <th>标段</th>
  154. <th>期数</th>
  155. <th>0号台帐</th>
  156. <th>本期完成</th>
  157. <th>截至本期完成</th>
  158. <th>本期应付</th>
  159. <th>截至本期应付</th>
  160. </tr>
  161. </thead>
  162. <tbody id="stage-data">
  163. </tbody>
  164. </table>
  165. <table id="tableId1"></table>
  166. </div>
  167. </div>
  168. </div>
  169. </div>
  170. </div>
  171. <div class="col-3 pl-0">
  172. <div class="right-content">
  173. <div class="right-chart-content">
  174. <div class="right-month">
  175. <h6 class="card bg-dark text-center text-white m-0 pt-2 pb-3">本月审批统计</h6>
  176. <div class="row right-month-height">
  177. <div class="col-6 pr-0">
  178. <div class="card text-center bg-dark text-white border-right-0 border-botton-0 height-100">
  179. <div class="card-body card-small-body height-100">
  180. <h5 class="card-title card-approve-title height-50"><span class="month_stage_num">0</span><small>期</small></h5>
  181. <p class="card-text text-muted height-50">计量期</p>
  182. </div>
  183. </div>
  184. </div>
  185. <div class="col-6 pl-0">
  186. <div class="card text-center bg-dark text-white border-botton-0 height-100">
  187. <div class="card-body card-small-body height-100">
  188. <h5 class="card-title card-approve-title height-50"><span class="month_change_num">0</span><small class="">条</small></h5>
  189. <p class="card-text text-muted height-50">变更令</p>
  190. </div>
  191. </div>
  192. </div>
  193. <div class="col-6 pr-0">
  194. <div class="card text-center bg-dark text-white border-right-0 border-top-0 height-100">
  195. <div class="card-body card-small-body height-100">
  196. <h5 class="card-title card-approve-title height-50"><span class="month_revise_num">0</span><small class="">次</small></h5>
  197. <p class="card-text text-muted height-50">台帐修订</p>
  198. </div>
  199. </div>
  200. </div>
  201. <div class="col-6 pl-0">
  202. <div class="card text-center bg-dark text-white border-top-0 height-100">
  203. <div class="card-body card-small-body height-100">
  204. <h5 class="card-title card-approve-title height-50"><span class="month_material_num">0</span><small class="">期</small></h5>
  205. <p class="card-text text-muted height-50">材料调差</p>
  206. </div>
  207. </div>
  208. </div>
  209. </div>
  210. </div>
  211. <div class="right-chart">
  212. <div class="card height-100 bg-dark">
  213. <div class="jlwcdchart" id="jlwcdchart" style="height: 100%; width: 100%;"></div>
  214. </div>
  215. </div>
  216. </div>
  217. <div class="right-biaoduan">
  218. <div class="card height-100 bg-dark mt-2">
  219. <h6 class="bg-dark text-center text-white m-0 py-3">标段审批信息</h6>
  220. <div id="review_box" class="m-0 p-3 mb-2">
  221. <ul class="list-unstyled" id="comment1">
  222. <% for (const notice of noticeList) { %>
  223. <% if(notice.type === pushType.stage) { %>
  224. <li class="media pb-3 mb-3 border-bottom-grey-1">
  225. <div class="media-body">
  226. <div class="row">
  227. <div class="col-2"><span class="badge badge-success">计量审批</span></div>
  228. <div class="col-10 text-white">
  229. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  230. <a href="/tender/<%- notice.tid %>/measure/stage/<%- notice.order %>" class="text-white">第<%- notice.order %>期 </a>
  231. <span class="<%- acStage.statusClass[notice.status] %>"><%- acStage.statusString[notice.status]%></span>
  232. </div>
  233. </div>
  234. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  235. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  236. </p>
  237. </div>
  238. </li>
  239. <% } else if(notice.type === pushType.material) { %>
  240. <li class="media pb-3 mb-3 border-bottom-grey-1">
  241. <div class="media-body">
  242. <div class="row">
  243. <div class="col-2"><span class="badge badge-secondary">材料调差</span></div>
  244. <div class="col-10 text-white">
  245. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  246. <a href="/tender/<%- notice.tid %>/measure/material/<%- notice.order %>" class="text-white">第<%- notice.order %>期 </a>
  247. <span class="<%- acMaterial.statusClass[notice.status] %>"><%- acMaterial.statusString[notice.status]%></span>
  248. </div>
  249. </div>
  250. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  251. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  252. </p>
  253. </div>
  254. </li>
  255. <% } else if(notice.type === pushType.ledger) { %>
  256. <li class="media pb-3 mb-3 border-bottom-grey-1">
  257. <div class="media-body">
  258. <div class="row">
  259. <div class="col-2"><span class="badge badge-info">台账审批</span></div>
  260. <div class="col-10 text-white">
  261. <a data-id="<%- notice.id %>"href="/tender/<%- notice.tid %>/ledger" class="text-white"><%- notice.name %></a> <span class="<%- acLedger.statusClass[notice.status] %>"><%- acLedger.statusString[notice.status]%></span>
  262. </div>
  263. </div>
  264. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  265. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  266. </p>
  267. </div>
  268. </li>
  269. <% } else if(notice.type === pushType.revise) { %>
  270. <li class="media pb-3 mb-3 border-bottom-grey-1">
  271. <div class="media-body">
  272. <div class="row">
  273. <div class="col-2"><span class="badge badge-info">台账修订</span></div>
  274. <div class="col-10 text-white">
  275. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  276. <a href="/tender/<%- notice.tid %>/revise/info" class="text-white">台账修订(第<%- notice.corder %>次)</a>
  277. <span class="<%- acRevise.statusClass[notice.status] %>"><%- acRevise.statusString[notice.status]%></span>
  278. </div>
  279. </div>
  280. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  281. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  282. </p>
  283. </div>
  284. </li>
  285. <% } else if(notice.type === pushType.change){ %>
  286. <li class="media pb-3 mb-3 border-bottom-grey-1">
  287. <div class="media-body">
  288. <div class="row">
  289. <div class="col-2"><span class="badge badge-danger">变更审批</span></div>
  290. <div class="col-10 text-white">
  291. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  292. <a href="/tender/<%- notice.tid %>/change/<%- notice.cid %>/information" class="text-white"><%- notice.c_code %> </a>
  293. <span class="<%- acChange.statusClass[notice.status] %>"><%- acChange.statusString[notice.status]%></span>
  294. </div>
  295. </div>
  296. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  297. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  298. </p>
  299. </div>
  300. </li>
  301. <% } else if(notice.type === pushType.advance) { %>
  302. <li class="media pb-3 mb-3 border-bottom-grey-1">
  303. <div class="media-body">
  304. <div class="row">
  305. <div class="col-2"><span class="badge badge-warning">预付款</span></div>
  306. <div class="col-10 text-white">
  307. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  308. <a href="/tender/<%- notice.tid %>/advance/<%- notice.vid %>/detail" class="text-white">第<%- notice.order %>期</a>
  309. <span class="<%- acAdvance.statusClass[notice.status] %>"><%- acAdvance.statusString[notice.status]%></span>
  310. </div>
  311. </div>
  312. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  313. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  314. </p>
  315. </div>
  316. </li>
  317. <% } %>
  318. <% } %>
  319. </ul>
  320. <ul id="comment2"></ul>
  321. </div>
  322. </div>
  323. </div>
  324. </div>
  325. </div>
  326. </div>
  327. </div>
  328. <div class="flex-content" data-content="2" <% if (ctx.session.sessionProject.dataCollect !== 3 && ctx.session.sessionProject.dataCollect !== 4) { %>style="display: none"<% } %>>
  329. <div class="mx-3">
  330. <div class="row">
  331. <div class="col-6 pr-1">
  332. <div class="left-content">
  333. <div class="left-small-card-content ml-3">
  334. <div class="row height-100">
  335. <div class="col-4 pl-0">
  336. <div class="card text-center bg-dark text-white ml-0 mr-0 height-100">
  337. <div class="card-body card-per-body">
  338. <div class="row height-100">
  339. <div class="col-6">
  340. <h5 class="card-title card-case-title data_tender_num">0</h5>
  341. <p class="card-text card-case-text text-muted">标段个数</p>
  342. </div>
  343. <div class="col-6">
  344. <h5 class="card-title card-case-title data_tender_rate">0%</h5>
  345. <p class="card-text card-case-text text-muted">计量进度</p>
  346. </div>
  347. </div>
  348. </div>
  349. </div>
  350. </div>
  351. <div class="col-4 pl-0">
  352. <div class="card text-center bg-dark text-white height-100">
  353. <div class="card-body card-per-body">
  354. <h5 class="card-title card-case-title data_total_price">0.00</h5>
  355. <p class="card-text card-case-text text-muted">台帐金额</p>
  356. </div>
  357. </div>
  358. </div>
  359. <div class="col-4 pl-0">
  360. <div class="card text-center bg-dark text-white height-100">
  361. <div class="card-body card-per-body">
  362. <h5 class="card-title card-case-title data_total_change_price">0.00</h5>
  363. <p class="card-text text-muted">累计变更金额</p>
  364. </div>
  365. </div>
  366. </div>
  367. </div>
  368. </div>
  369. <div class="left-big-chart-content">
  370. <div class="card height-60 bg-dark mt-2 mb-2">
  371. <div class="jlchart" id="jlchart" style="height: 100%; width: 100%;"></div>
  372. </div>
  373. <div class="height-36">
  374. <div class="row height-100">
  375. <div class="col-6 pr-2">
  376. <div class="left-bottom-chart height-100">
  377. <div class="card height-100 bg-dark">
  378. <div class="jlwcdchart" id="jlwcdchart" style="height: 100%; width: 100%;"></div>
  379. </div>
  380. </div>
  381. </div>
  382. <div class="col-6 pl-0">
  383. <div class="left-bottom-chart height-100">
  384. <div class="card height-100 bg-dark">
  385. <div id="tztjchart" style="height: 100%; width: 100%;"></div>
  386. </div>
  387. </div>
  388. </div>
  389. </div>
  390. </div>
  391. </div>
  392. </div>
  393. </div>
  394. <div class="col-6 pl-1 pr-0">
  395. <div class="right-content">
  396. <div class="right-small-card-content mx-3">
  397. <div class="row height-100">
  398. <div class="col-4 pl-0">
  399. <div class="card text-center bg-dark text-white mb-2 height-100">
  400. <div class="card-body card-per-body">
  401. <h5 class="card-title card-case-title data_total_stage_price">0.00</h5>
  402. <p class="card-text card-case-text text-muted">累计完成金额</p>
  403. </div>
  404. </div>
  405. </div>
  406. <div class="col-4 pl-0">
  407. <div class="card text-center bg-dark text-white height-100">
  408. <div class="card-body card-per-body">
  409. <h5 class="card-title card-case-title data_total_advance_price">0.00</h5>
  410. <p class="card-text card-case-text text-muted">预付款</p>
  411. </div>
  412. </div>
  413. </div>
  414. <div class="col-4 pl-0">
  415. <div class="card text-center bg-dark text-white height-100">
  416. <div class="card-body card-per-body">
  417. <h5 class="card-title card-case-title data_total_material_price">0.00</h5>
  418. <p class="card-text card-case-text text-muted">材料调差</p>
  419. </div>
  420. </div>
  421. </div>
  422. </div>
  423. </div>
  424. <div class="right-big-chart-content mr-3">
  425. <div class="height-60 mt-2">
  426. <div class="card height-100 bg-dark">
  427. <div class="jldbchart" data-chart-num="2" id="jldbchart" style="height: 100%; width: 100%; <% if (ctx.session.sessionProject.dataCollect === 3) { %>display:none;<% } %>"></div>
  428. <div class="di-content mb-2" id="map2" style="height: 100%; width: 100%; <% if (ctx.session.sessionProject.dataCollect === 4) { %>display:none;<% } %>"></div>
  429. </div>
  430. </div>
  431. <div class="height-36 mt-2">
  432. <div class="height-100 right-bottom-50-fl">
  433. <div class="left-bd-scroll height-100 mr-1">
  434. <div class="card bg-dark height-100">
  435. <h6 class="bg-dark text-center text-white m-0 py-3">标段审批信息</h6>
  436. <div id="review_box2" class="m-0 p-3 mb-2 height-100">
  437. <ul class="list-unstyled" id="comment3">
  438. <% for (const notice of noticeList) { %>
  439. <% if(notice.type === pushType.stage) { %>
  440. <li class="media pb-3 mb-3 border-bottom-grey-1">
  441. <div class="media-body">
  442. <div class="row">
  443. <div class="col-2"><span class="badge badge-success">计量审批</span></div>
  444. <div class="col-10 text-white">
  445. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  446. <a href="/tender/<%- notice.tid %>/measure/stage/<%- notice.order %>" class="text-white">第<%- notice.order %>期 </a>
  447. <span class="<%- acStage.statusClass[notice.status] %>"><%- acStage.statusString[notice.status]%></span>
  448. </div>
  449. </div>
  450. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  451. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  452. </p>
  453. </div>
  454. </li>
  455. <% } else if(notice.type === pushType.material) { %>
  456. <li class="media pb-3 mb-3 border-bottom-grey-1">
  457. <div class="media-body">
  458. <div class="row">
  459. <div class="col-2"><span class="badge badge-secondary">材料调差</span></div>
  460. <div class="col-10 text-white">
  461. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  462. <a href="/tender/<%- notice.tid %>/measure/material/<%- notice.order %>" class="text-white">第<%- notice.order %>期 </a>
  463. <span class="<%- acMaterial.statusClass[notice.status] %>"><%- acMaterial.statusString[notice.status]%></span>
  464. </div>
  465. </div>
  466. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  467. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  468. </p>
  469. </div>
  470. </li>
  471. <% } else if(notice.type === pushType.ledger) { %>
  472. <li class="media pb-3 mb-3 border-bottom-grey-1">
  473. <div class="media-body">
  474. <div class="row">
  475. <div class="col-2"><span class="badge badge-info">台账审批</span></div>
  476. <div class="col-10 text-white">
  477. <a data-id="<%- notice.id %>"href="/tender/<%- notice.tid %>/ledger" class="text-white"><%- notice.name %></a> <span class="<%- acLedger.statusClass[notice.status] %>"><%- acLedger.statusString[notice.status]%></span>
  478. </div>
  479. </div>
  480. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  481. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  482. </p>
  483. </div>
  484. </li>
  485. <% } else if(notice.type === pushType.revise) { %>
  486. <li class="media pb-3 mb-3 border-bottom-grey-1">
  487. <div class="media-body">
  488. <div class="row">
  489. <div class="col-2"><span class="badge badge-info">台账修订</span></div>
  490. <div class="col-10 text-white">
  491. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  492. <a href="/tender/<%- notice.tid %>/revise/info" class="text-white">台账修订(第<%- notice.corder %>次)</a>
  493. <span class="<%- acRevise.statusClass[notice.status] %>"><%- acRevise.statusString[notice.status]%></span>
  494. </div>
  495. </div>
  496. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  497. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  498. </p>
  499. </div>
  500. </li>
  501. <% } else if(notice.type === pushType.change){ %>
  502. <li class="media pb-3 mb-3 border-bottom-grey-1">
  503. <div class="media-body">
  504. <div class="row">
  505. <div class="col-2"><span class="badge badge-danger">变更审批</span></div>
  506. <div class="col-10 text-white">
  507. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  508. <a href="/tender/<%- notice.tid %>/change/<%- notice.cid %>/information" class="text-white"><%- notice.c_code %> </a>
  509. <span class="<%- acChange.statusClass[notice.status] %>"><%- acChange.statusString[notice.status]%></span>
  510. </div>
  511. </div>
  512. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  513. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  514. </p>
  515. </div>
  516. </li>
  517. <% } else if(notice.type === pushType.advance) { %>
  518. <li class="media pb-3 mb-3 border-bottom-grey-1">
  519. <div class="media-body">
  520. <div class="row">
  521. <div class="col-2"><span class="badge badge-warning">预付款</span></div>
  522. <div class="col-10 text-white">
  523. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  524. <a href="/tender/<%- notice.tid %>/advance/<%- notice.vid %>/detail" class="text-white">第<%- notice.order %>期</a>
  525. <span class="<%- acAdvance.statusClass[notice.status] %>"><%- acAdvance.statusString[notice.status]%></span>
  526. </div>
  527. </div>
  528. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  529. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  530. </p>
  531. </div>
  532. </li>
  533. <% } %>
  534. <% } %>
  535. </ul>
  536. <ul id="comment4"></ul>
  537. </div>
  538. </div>
  539. </div>
  540. </div>
  541. <div class="height-100 right-bottom-50-fl">
  542. <div class="right-month height-100 ml-1">
  543. <h6 class="card bg-dark text-center text-white m-0 py-3">本月审批统计</h6>
  544. <div class="row right-month-height">
  545. <div class="col-6 pr-0">
  546. <div class="card text-center bg-dark text-white border-right-0 border-botton-0 height-100">
  547. <div class="card-body card-small-body">
  548. <h5 class="card-title card-approve-title height-50"><span class="month_stage_num">0</span><small>期</small></h5>
  549. <p class="card-text text-muted height-50">计量期</p>
  550. </div>
  551. </div>
  552. </div>
  553. <div class="col-6 pl-0">
  554. <div class="card text-center bg-dark text-white border-botton-0 height-100">
  555. <div class="card-body card-small-body">
  556. <h5 class="card-title card-approve-title height-50"><span class="month_change_num">0</span><small class="">条</small></h5>
  557. <p class="card-text text-muted height-50">变更令</p>
  558. </div>
  559. </div>
  560. </div>
  561. <div class="col-6 pr-0">
  562. <div class="card text-center bg-dark text-white border-right-0 border-top-0 height-100">
  563. <div class="card-body card-small-body">
  564. <h5 class="card-title card-approve-title height-50"><span class="month_revise_num">0</span><small class="">次</small></h5>
  565. <p class="card-text text-muted height-50">台帐修订</p>
  566. </div>
  567. </div>
  568. </div>
  569. <div class="col-6 pl-0">
  570. <div class="card text-center bg-dark text-white border-top-0 height-100">
  571. <div class="card-body card-small-body">
  572. <h5 class="card-title card-approve-title height-50"><span class="month_material_num">0</span><small class="">期</small></h5>
  573. <p class="card-text text-muted height-50">材料调差</p>
  574. </div>
  575. </div>
  576. </div>
  577. </div>
  578. </div>
  579. </div>
  580. </div>
  581. </div>
  582. </div>
  583. </div>
  584. </div>
  585. </div>
  586. </div>
  587. </div>
  588. </div>
  589. </div>
  590. <script src="/public/js/datacollect_scroll.js"></script>
  591. <script type="text/javascript"> autoFlashHeight();</script>
  592. <script type="text/javascript">
  593. // 分类金额饼图表
  594. var myChart1 = echarts.init(document.getElementById('jechart'), 'dark');
  595. option1 = {
  596. title: {
  597. text: '金额统计图',
  598. left: 'center',
  599. top:'7%'
  600. },
  601. color: ['rgba(24,144,255,0.7)','rgba(69,183,149,0.7)','rgba(250,204,20,0.7)','rgba(145,82,225,0.7)','rgba(58,207,221,0.7)','rgba(204,73,80,0.7)','rgba(255,255,225,0.7)'],
  602. backgroundColor: '#343a40 ',
  603. tooltip: {
  604. trigger: 'item'
  605. },
  606. // legend: {
  607. // orient: 'vertical',
  608. // left: 'center',
  609. // },
  610. series: [
  611. {
  612. name: '台账金额',
  613. type: 'pie',
  614. radius: '60%',
  615. top:'15%',
  616. formatter: function(name){
  617. return name.length>10?name.substr(0,10)+"...":name;
  618. },
  619. data: [],
  620. emphasis: {
  621. itemStyle: {
  622. shadowBlur: 10,
  623. shadowOffsetX: 0,
  624. shadowColor: 'rgba(0, 0, 0, 0.5)'
  625. }
  626. }
  627. }
  628. ]
  629. };
  630. myChart1.setOption(option1);
  631. // 计量情况柱状图表
  632. // var myChart2 = echarts.init(document.getElementsByClassName('jlchart')[0], 'dark');
  633. option2 = {
  634. title: {
  635. text: '计量情况',
  636. left: 'center',
  637. top:'5%'
  638. },
  639. color: ['rgba(24,144,255,0.7)','rgba(69,183,149,0.7)','rgba(250,204,20,0.7)','rgba(145,82,225,0.7)','rgba(58,207,221,0.7)','rgba(204,73,80,0.7)','rgba(255,255,225,0.7)'],
  640. backgroundColor: '#343a40 ',
  641. tooltip: {
  642. trigger: 'axis',
  643. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  644. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  645. }
  646. },
  647. dataZoom: [
  648. {
  649. type: 'slider',
  650. show: true,
  651. realtime: true,
  652. showdetail: false,
  653. showDataShadow: false,
  654. // dataZoomIndex: 10,
  655. start: 0,
  656. end: 8,
  657. handleSize: 0,
  658. height: 10,
  659. bottom: '10%'
  660. },
  661. // {
  662. // // realtime: true,
  663. // type: 'slider',
  664. // show: true,
  665. // realtime: true,
  666. // showdetail: false,
  667. // showDataShadow: false,
  668. // // dataZoomIndex: 10,
  669. // start: 0,
  670. // end: 8,
  671. // handleSize: 0,
  672. // bottom:30,
  673. // height:10,
  674. // }
  675. ],
  676. legend: {
  677. data: ['台帐', '合同计量', '变更计量'],
  678. top:'17%'
  679. },
  680. grid: {
  681. top:'25%',
  682. left: '3%',
  683. right: '4%',
  684. bottom: '15%',
  685. containLabel: true
  686. },
  687. xAxis: [
  688. {
  689. type: 'category',
  690. data: [],
  691. axisLabel: {
  692. show: true,
  693. interval: 0,
  694. textStyle: {
  695. color: "#fff",
  696. fontSize: 14
  697. },
  698. formatter: function(value) {
  699. var res = value;
  700. if(res.length > 8) {
  701. res = res.substring(0, 6) + "..";
  702. }
  703. return res;
  704. }
  705. }
  706. }
  707. ],
  708. yAxis: [
  709. {
  710. type: 'value',
  711. name:'金额',
  712. position: 'left',
  713. axisLabel : {
  714. formatter: function (value, index) {
  715. if (value < 0) {
  716. let newValue = Math.abs(value);
  717. if (newValue >= 10000 && newValue < 10000000) {
  718. newValue = newValue / 10000 + "万";
  719. } else if (newValue >= 10000000) {
  720. newValue = newValue / 10000000 + "千万";
  721. }
  722. value = '-' + newValue;
  723. }
  724. if (value >= 10000 && value < 10000000) {
  725. value = value / 10000 + "万";
  726. } else if (value >= 10000000) {
  727. value = value / 10000000 + "千万";
  728. }
  729. return value;
  730. }
  731. },
  732. splitArea : {show : true}
  733. },
  734. {
  735. type: 'value',
  736. name:'完成度',
  737. position: 'right',
  738. min:0,
  739. max:100,
  740. axisLabel : {
  741. formatter: '{value} %'
  742. },
  743. splitArea : {show : true}
  744. }
  745. ],
  746. series: [
  747. {
  748. name: '台帐',
  749. type: 'bar',
  750. emphasis: {
  751. focus: 'series'
  752. },
  753. data: []
  754. },
  755. {
  756. name: '合同计量',
  757. type: 'bar',
  758. stack: '计量',
  759. emphasis: {
  760. focus: 'series'
  761. },
  762. data: []
  763. },
  764. {
  765. name: '变更计量',
  766. type: 'bar',
  767. stack: '计量',
  768. emphasis: {
  769. focus: 'series'
  770. },
  771. data: []
  772. }
  773. ]
  774. };
  775. var chart2 = document.getElementsByClassName('jlchart');
  776. var myChart2_1 = echarts.init(chart2[0], 'dark');
  777. var myChart2_2 = echarts.init(chart2[1], 'dark');
  778. var myChart2_3 = echarts.init(chart2[2], 'dark');
  779. myChart2_1.setOption(option2);
  780. myChart2_2.setOption(option2);
  781. myChart2_3.setOption(option2);
  782. // myChart2.setOption(option);
  783. // 计量完成度统计柱状图表
  784. // var myChart3 = echarts.init(document.getElementsByClassName('jlwcdchart')[0], 'dark');
  785. option3 = {
  786. title: {
  787. text: '计量完成度统计',
  788. left: 'center',
  789. top:'5%'
  790. },
  791. color: ['rgba(24,144,255,0.7)','rgba(69,183,149,0.7)','rgba(250,204,20,0.7)','rgba(145,82,225,0.7)','rgba(58,207,221,0.7)','rgba(204,73,80,0.7)','rgba(255,255,225,0.7)'],
  792. backgroundColor: '#343a40 ',
  793. tooltip: {
  794. trigger: 'axis',
  795. axisPointer: { // Use axis to trigger tooltip
  796. type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
  797. }
  798. },
  799. grid: {
  800. left: '10%',
  801. right: '10%',
  802. bottom: '3%',
  803. containLabel: true
  804. },
  805. xAxis: {
  806. type: 'value'
  807. },
  808. yAxis: {
  809. type: 'category',
  810. data: [],
  811. axisLabel: {
  812. show: true,
  813. interval: 0,
  814. // textStyle: {
  815. // color: "#fff",
  816. // fontSize: 14
  817. // },
  818. formatter: function(value) {
  819. var res = value;
  820. if(res.length > 6) {
  821. res = res.substring(0, 4) + "..";
  822. }
  823. return res;
  824. }
  825. }
  826. },
  827. dataZoom: [
  828. {
  829. start: 0,
  830. end: 10,
  831. show: true,
  832. handleSize: 0,
  833. realtime: true,
  834. // filterMode: 'empty',
  835. yAxisIndex: [0,1],
  836. width: 10,
  837. height: '80%',
  838. right: '5%',
  839. bottom:'2%'
  840. },
  841. ],
  842. series: [
  843. {
  844. name: '完成度',
  845. type: 'bar',
  846. stack: 'total',
  847. label: {
  848. show: true
  849. },
  850. emphasis: {
  851. focus: 'series'
  852. },
  853. data: []
  854. }
  855. ]
  856. };
  857. var chart3 = document.getElementsByClassName('jlwcdchart');
  858. var myChart3_1 = echarts.init(chart3[0], 'dark');
  859. var myChart3_2 = echarts.init(chart3[1], 'dark');
  860. myChart3_1.setOption(option3);
  861. myChart3_2.setOption(option3);
  862. // 计量对比线形图表
  863. option4 = {
  864. title: {
  865. text: '计量对比',
  866. left: 'center',
  867. top:'5%'
  868. },
  869. color: ['rgba(24,144,255,0.7)','rgba(69,183,149,0.7)','rgba(250,204,20,0.7)','rgba(145,82,225,0.7)','rgba(58,207,221,0.7)','rgba(204,73,80,0.7)','rgba(255,255,225,0.7)'],
  870. backgroundColor: '#343a40 ',
  871. tooltip: {
  872. trigger: 'axis',
  873. axisPointer: {
  874. type: 'cross',
  875. label: {
  876. backgroundColor: '#6a7985'
  877. }
  878. }
  879. },
  880. legend: {
  881. data: ['本月计量', '累计计量'],
  882. top:'15%'
  883. },
  884. grid: {
  885. top:'25%',
  886. left: '3%',
  887. right: '4%',
  888. bottom: '15%',
  889. containLabel: true
  890. },
  891. xAxis: [
  892. {
  893. type: 'category',
  894. boundaryGap: false,
  895. data: []
  896. }
  897. ],
  898. yAxis: [
  899. {
  900. type: 'value',
  901. axisLabel : {
  902. formatter: function (value, index) {
  903. if (value < 0) {
  904. let newValue = Math.abs(value);
  905. if (newValue >= 10000 && newValue < 10000000) {
  906. newValue = newValue / 10000 + "万";
  907. } else if (newValue >= 10000000) {
  908. newValue = newValue / 10000000 + "千万";
  909. }
  910. value = '-' + newValue;
  911. }
  912. if (value >= 10000 && value < 10000000) {
  913. value = value / 10000 + "万";
  914. } else if (value >= 10000000) {
  915. value = value / 10000000 + "千万";
  916. }
  917. return value;
  918. }
  919. },
  920. }
  921. ],
  922. dataZoom: [
  923. {
  924. show: true,
  925. realtime: true,
  926. dataZoomIndex: 10,
  927. start: 0,
  928. end: 5,
  929. handleSize: 0,
  930. height: 10,
  931. bottom: '10%'
  932. },
  933. ],
  934. series: [
  935. {
  936. name: '本月计量',
  937. type: 'line',
  938. stack: '总量',
  939. areaStyle: {},
  940. emphasis: {
  941. focus: 'series'
  942. },
  943. data: []
  944. },
  945. {
  946. name: '累计计量',
  947. type: 'line',
  948. stack: '总量',
  949. areaStyle: {},
  950. emphasis: {
  951. focus: 'series'
  952. },
  953. data: []
  954. }
  955. ]
  956. };
  957. var chart4 = document.getElementsByClassName('jldbchart');
  958. var myChart4_1 = echarts.init(chart4[0], 'dark');
  959. var myChart4_2 = echarts.init(chart4[1], 'dark');
  960. myChart4_1.setOption(option4);
  961. myChart4_2.setOption(option4);
  962. // for (var i = 0; i < chart4.length; i++) {
  963. // var myChart4 = echarts.init(chart4[i], 'dark');
  964. // myChart4.setOption(option);
  965. // }
  966. // 投资统计分析圆饼图表
  967. var myChart5 = echarts.init(document.getElementById('tztjchart'), 'dark');
  968. option5 = {
  969. title: {
  970. text: '投资统计分析',
  971. left: 'center',
  972. top:'7%'
  973. },
  974. color: ['rgba(24,144,255,0.7)','rgba(69,183,149,0.7)','rgba(250,204,20,0.7)','rgba(145,82,225,0.7)','rgba(58,207,221,0.7)','rgba(204,73,80,0.7)','rgba(255,255,225,0.7)'],
  975. backgroundColor: '#343a40 ',
  976. tooltip: {
  977. trigger: 'item',
  978. },
  979. series: [
  980. {
  981. name: '访问来源',
  982. type: 'pie',
  983. top:'15%',
  984. bottom:'10%',
  985. radius: <% if (categoryData && categoryData[2] && categoryData[2].value.length > 0) { %>['0%', '30%']<% } else if (categoryData && categoryData[1] && categoryData[1].value.length > 0) { %>['0%', '50%']<% } else { %>['0%', '85%']<% } %>,
  986. // label: {
  987. // position: 'inner',
  988. // fontSize: 14
  989. // },
  990. label:{
  991. show:false
  992. },
  993. labelLine: {
  994. show: true
  995. },
  996. formatter: function(name){
  997. return name.length>10?name.substr(0,10)+"...":name;
  998. },
  999. data: [
  1000. ]
  1001. },
  1002. {
  1003. name: '访问来源',
  1004. type: 'pie',
  1005. top:'15%',
  1006. bottom:'10%',
  1007. radius: <% if (categoryData && categoryData[2] && categoryData[2].value.length > 0) { %>['30%', '60%']<% } else { %>['50%', '85%']<% } %>,
  1008. // label: {
  1009. // position: 'inner',
  1010. // fontSize: 14
  1011. // },
  1012. label:{
  1013. show:false
  1014. },
  1015. labelLine: {
  1016. show: true,
  1017. },
  1018. formatter: function(name){
  1019. return name.length>10?name.substr(0,10)+"...":name;
  1020. },
  1021. data: [
  1022. ]
  1023. },
  1024. {
  1025. name: '访问来源',
  1026. type: 'pie',
  1027. top:'15%',
  1028. bottom:'10%',
  1029. radius: ['60%', '85%'],
  1030. // label: {
  1031. // position: 'inner',
  1032. // fontSize: 14
  1033. // },
  1034. label:{
  1035. show:false
  1036. },
  1037. labelLine: {
  1038. show: true
  1039. },
  1040. formatter: function(name){
  1041. return name.length>10?name.substr(0,10)+"...":name;
  1042. },
  1043. data: [
  1044. ]
  1045. }
  1046. ]
  1047. };
  1048. myChart5.setOption(option5);
  1049. function echartsReset() {
  1050. myChart1.resize();
  1051. myChart2_1.resize();
  1052. myChart2_2.resize();
  1053. myChart2_3.resize();
  1054. myChart3_1.resize();
  1055. myChart3_2.resize();
  1056. myChart4_1.resize();
  1057. myChart4_2.resize();
  1058. myChart5.resize();
  1059. }
  1060. $(function () {
  1061. $('#showFull').click(function () {
  1062. const full=document.getElementById("big-data");
  1063. launchIntoFullscreen(full);
  1064. });
  1065. $('#exitFull').click(function () {
  1066. exitFullscreen();
  1067. })
  1068. })
  1069. $(window).resize(echartsReset);
  1070. // 数据全屏
  1071. function launchIntoFullscreen(element) {
  1072. if(element.requestFullscreen){
  1073. element.requestFullscreen();
  1074. }
  1075. else if(element.mozRequestFullScreen) {
  1076. element.mozRequestFullScreen();
  1077. }
  1078. else if(element.webkitRequestFullscreen) {
  1079. element.webkitRequestFullscreen();
  1080. }
  1081. else if(element.msRequestFullscreen) {
  1082. element.msRequestFullscreen();
  1083. }
  1084. }
  1085. function exitFullscreen() {
  1086. if(document.exitFullscreen) {
  1087. document.exitFullscreen();
  1088. } else if(document.mozCancelFullScreen) {
  1089. document.mozCancelFullScreen();
  1090. } else if(document.webkitExitFullscreen) {
  1091. document.webkitExitFullscreen();
  1092. }
  1093. }
  1094. document.addEventListener("fullscreenchange", function (event) {
  1095. if (document.fullscreenElement) {
  1096. $('#exitfull-div').show();
  1097. $('#showFull').hide();
  1098. } else {
  1099. $('#exitfull-div').hide();
  1100. $('#showFull').show();
  1101. }
  1102. });
  1103. </script>
  1104. <script src="/public/js/map/turf.min.js"></script>
  1105. <script src="/public/js/map/gcoord.js"></script>
  1106. <!--<script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=C3hLZAjuWTaCdwnwoYY83APrwlPEj4v7"></script>-->
  1107. <script>
  1108. function loadScript() {
  1109. var script = document.createElement("script");
  1110. script.src = "https://api.map.baidu.com/api?v=1.0&type=webgl&ak=C3hLZAjuWTaCdwnwoYY83APrwlPEj4v7&callback=initialize";
  1111. document.body.appendChild(script);
  1112. }
  1113. window.onload = loadScript;
  1114. const originDataCollect = parseInt('<%- ctx.session.sessionProject.dataCollect %>');
  1115. const category = JSON.parse(unescape('<%- escape(JSON.stringify(categoryData)) %>'));
  1116. const mapJson = JSON.parse(unescape('<%- escape(JSON.stringify(map_json)) %>'));
  1117. let tenders = '';
  1118. // let noticeList = '';
  1119. $(function () {
  1120. postData('/datacollect/load', {}, function (result) {
  1121. tenders = result.tenderList;
  1122. const chart_option5_data = {
  1123. data1: [],
  1124. data2: [],
  1125. data3: [],
  1126. }
  1127. const chart_category_data = {
  1128. data1: [],
  1129. data2: [],
  1130. data3: [],
  1131. }
  1132. let option5_is_tender = false;
  1133. // 设置圆环图5数据,还要设置圆环图大小
  1134. if (category && category.length > 0) {
  1135. if (category[0] && category[0].value.length > 0) {
  1136. for (const c of category[0].value) {
  1137. chart_category_data.data1.push([{
  1138. cid: category[0].id,
  1139. value: c.id,
  1140. }]);
  1141. chart_option5_data.data1.push({
  1142. value: 0,
  1143. name: c.value,
  1144. });
  1145. }
  1146. }
  1147. if (category[1] && category[1].value.length > 0) {
  1148. for (const c of category[1].value) {
  1149. for (const cc1 of chart_category_data.data1) {
  1150. chart_category_data.data2.push([...cc1, {
  1151. cid: category[1].id,
  1152. value: c.id,
  1153. }]);
  1154. }
  1155. for (const cd1 of chart_option5_data.data1) {
  1156. chart_option5_data.data2.push({
  1157. value: 0,
  1158. name: cd1.name + ' ' + c.value,
  1159. });
  1160. }
  1161. }
  1162. }
  1163. if (category[2] && category[2].value.length > 0) {
  1164. for (const c of category[2].value) {
  1165. for (const cc2 of chart_category_data.data2) {
  1166. chart_category_data.data3.push([...cc2, {
  1167. cid: category[2].id,
  1168. value: c.id,
  1169. }]);
  1170. }
  1171. for (const cd2 of chart_option5_data.data2) {
  1172. chart_option5_data.data3.push({
  1173. value: 0,
  1174. name: cd2.name + ' ' + c.value,
  1175. });
  1176. }
  1177. }
  1178. }
  1179. } else {
  1180. option5_is_tender = true;
  1181. }
  1182. for (const t of tenders) {
  1183. calculateTender(t);
  1184. if (option5_is_tender) {
  1185. chart_option5_data.data1.push({ value: t.total_price ? t.total_price : 0, name: t.name});
  1186. } else {
  1187. for (const cc1 of chart_category_data.data1) {
  1188. const sameObject = _.intersectionWith(t.category, cc1, _.isEqual);
  1189. const index = sameObject[0] ? _.findIndex(cc1, { cid: sameObject[0].cid, value: sameObject[0].value }) : -1;
  1190. if (index !== -1) {
  1191. chart_option5_data.data1[index].value = ZhCalc.add(chart_option5_data.data1[index].value, (t.total_price ? t.total_price : 0));
  1192. }
  1193. }
  1194. for (const cc2 of chart_category_data.data2) {
  1195. const sameObject = _.intersectionWith(t.category, cc2, _.isEqual);
  1196. if(sameObject.length === 2) {
  1197. const index = _.findIndex(chart_category_data.data2, function (item) {
  1198. return _.isEqual(item, sameObject);
  1199. })
  1200. if (index !== -1) {
  1201. chart_option5_data.data2[index].value = ZhCalc.add(chart_option5_data.data2[index].value, (t.total_price ? t.total_price : 0));
  1202. }
  1203. }
  1204. }
  1205. for (const cc3 of chart_category_data.data3) {
  1206. const sameObject = _.intersectionWith(t.category, cc3, _.isEqual);
  1207. if(sameObject.length === 3) {
  1208. const index = _.findIndex(chart_category_data.data3, function (item) {
  1209. return _.isEqual(item, sameObject);
  1210. })
  1211. if (index !== -1) {
  1212. chart_option5_data.data3[index].value = ZhCalc.add(chart_option5_data.data3[index].value, (t.total_price ? t.total_price : 0));
  1213. }
  1214. }
  1215. }
  1216. }
  1217. }
  1218. const option5 = myChart5.getOption();
  1219. option5.series[0].data = chart_option5_data.data1;
  1220. option5.series[1].data = chart_option5_data.data2;
  1221. option5.series[2].data = chart_option5_data.data3;
  1222. myChart5.setOption(option5);
  1223. // const selectCategory = {
  1224. // cid: category && category[0].value ? category[0].id : ,
  1225. // }
  1226. // const categoryName =
  1227. setData(tenders, 0);
  1228. })
  1229. function calculateTender(tender) {
  1230. if (tender.lastStage) {
  1231. tender.gather_tp = ZhCalc.add(tender.lastStage.contract_tp, tender.lastStage.qc_tp);
  1232. tender.end_contract_tp = ZhCalc.add(tender.lastStage.pre_contract_tp, tender.lastStage.contract_tp);
  1233. tender.end_qc_tp = ZhCalc.add(tender.lastStage.pre_qc_tp, tender.lastStage.qc_tp);
  1234. tender.end_gather_tp = ZhCalc.add(tender.end_contract_tp, tender.end_qc_tp);
  1235. tender.pre_gather_tp = ZhCalc.add(tender.lastStage.pre_contract_tp, tender.lastStage.pre_qc_tp);
  1236. tender.yf_tp = ZhCalc.add(tender.lastStage.yf_tp);
  1237. tender.end_yf_tp = ZhCalc.add(tender.lastStage.pre_yf_tp, tender.yf_tp);
  1238. }
  1239. }
  1240. function setData(tenderList, categoryIndex = 0) {
  1241. let total_price = 0;
  1242. let total_change_price = 0;
  1243. let total_stage_price = 0;
  1244. let total_advance_price = 0;
  1245. let total_material_price = 0;
  1246. let month_stage_num = 0;
  1247. let month_change_num = 0;
  1248. let month_revise_num = 0;
  1249. let month_material_num = 0;
  1250. let html = '';
  1251. const chart_option_name = [];
  1252. const chart_option2_data = {
  1253. total_price: [],
  1254. contract_tp:[],
  1255. qc_tp:[],
  1256. };
  1257. const chart_option3_data = [];
  1258. const chart_option1_data = [];
  1259. let option1_is_tender = false;
  1260. const chart_category_data = [];
  1261. if (category && category.length > 0 && category[categoryIndex] && category[categoryIndex].value.length > 0) {
  1262. for (const c of category[categoryIndex].value) {
  1263. chart_category_data.push({
  1264. cid: category[categoryIndex].id,
  1265. value: c.id,
  1266. })
  1267. chart_option1_data.push({
  1268. value: 0,
  1269. name: c.value,
  1270. });
  1271. }
  1272. } else {
  1273. option1_is_tender = true;
  1274. }
  1275. console.log(tenderList);
  1276. console.log(_.differenceWith(tenders, tenderList, _.isEqual));
  1277. const chart_option4_data = [];
  1278. for(const t of tenderList) {
  1279. total_price = ZhCalc.add(total_price, t.total_price);
  1280. total_change_price = ZhCalc.add(total_change_price, t.end_qc_tp);
  1281. total_stage_price = ZhCalc.add(total_stage_price, t.end_gather_tp);
  1282. total_material_price = ZhCalc.add(total_material_price, t.material_tp);
  1283. total_advance_price = ZhCalc.add(total_advance_price, t.advance_tp);
  1284. month_stage_num = ZhCalc.add(month_stage_num, t.month_stage_num);
  1285. month_change_num = ZhCalc.add(month_change_num, t.month_change_num);
  1286. month_revise_num = ZhCalc.add(month_revise_num, t.month_revise_num);
  1287. month_material_num = ZhCalc.add(month_material_num, t.month_material_num);
  1288. html += '<tr>\n' +
  1289. ' <td><span data-toggle="tooltip" data-placement="right" data-original-title="'+ t.name +'">'+ (t.name.length > 15 ? t.name.substring(0, 15) + '...' : t.name) +'</span></td>\n' +
  1290. ' <td>第'+ (t.lastStage ? t.lastStage.order : 0) +'期</td>\n' +
  1291. ' <td>'+ (t.total_price ? total_price : 0) +'</td>\n' +
  1292. ' <td>'+ (t.gather_tp ? t.gather_tp : 0) +'</td>\n' +
  1293. ' <td>'+ (t.end_gather_tp ? t.end_gather_tp : 0) +'</td>\n' +
  1294. ' <td>'+ (t.yf_tp ? t.yf_tp : 0) +'</td>\n' +
  1295. ' <td>'+ (t.end_yf_tp ? t.end_yf_tp : 0) +'</td>\n' +
  1296. ' </tr>\n';
  1297. chart_option_name.push(t.name);
  1298. chart_option2_data.total_price.push(t.total_price ? t.total_price : 0);
  1299. chart_option2_data.contract_tp.push(t.end_contract_tp ? t.end_contract_tp : 0);
  1300. chart_option2_data.qc_tp.push(t.end_qc_tp ? t.end_qc_tp : 0);
  1301. const rate = ZhCalc.mul(ZhCalc.div(ZhCalc.add(t.pre_gather_tp, t.gather_tp), t.total_price, 2), 100, 0);
  1302. chart_option3_data.push(rate ? rate : '');
  1303. if (option1_is_tender) {
  1304. chart_option1_data.push({ value: t.total_price ? t.total_price : 0, name: t.name});
  1305. } else {
  1306. const sameObject = _.intersectionWith(t.category, chart_category_data, _.isEqual);
  1307. const index = sameObject[0] ? _.findIndex(chart_category_data, { cid: sameObject[0].cid, value: sameObject[0].value }) : -1;
  1308. if (index !== -1) {
  1309. chart_option1_data[index].value = ZhCalc.add(chart_option1_data[index].value, (t.total_price ? t.total_price : 0));
  1310. }
  1311. }
  1312. for (const s of t.month_stage) {
  1313. const index = _.findIndex(chart_option4_data, { yearmonth: s.yearmonth });
  1314. if (index === -1) {
  1315. chart_option4_data.push({
  1316. yearmonth: s.yearmonth,
  1317. tp: s.tp,
  1318. end_tp: s.end_tp,
  1319. })
  1320. // chart_option4_data.yearmonth.push(s.yearmonth);
  1321. // chart_option4_data.tp.push(s.tp);
  1322. // chart_option4_data.end_tp.push(s.end_tp);
  1323. } else {
  1324. // chart_option4_data.tp[index].tp = ZhCalc.add(chart_option4_data.tp[index].tp, s.tp);
  1325. // chart_option4_data.tp[index].end_tp = ZhCalc.add(chart_option4_data.tp[index].end_tp, s.end_tp);
  1326. chart_option4_data[index].tp = ZhCalc.add(chart_option4_data[index].tp, s.tp);
  1327. chart_option4_data[index].end_tp = ZhCalc.add(chart_option4_data[index].end_tp, s.end_tp);
  1328. }
  1329. }
  1330. }
  1331. $('.data_tender_num').text(tenderList.length);
  1332. const rate = total_price ? ZhCalc.round(ZhCalc.div(total_stage_price, total_price) * 100, 2) : 0;
  1333. $('.data_tender_rate').text(rate ? rate + '%' : '0%');
  1334. $('.data_total_price').text(formatMoney(total_price));
  1335. $('.data_total_change_price').text(formatMoney(total_change_price));
  1336. $('.data_total_stage_price').text(formatMoney(total_stage_price));
  1337. $('.data_total_advance_price').text(formatMoney(total_advance_price));
  1338. $('.data_total_material_price').text(formatMoney(total_material_price));
  1339. $('.month_stage_num').text(month_stage_num);
  1340. $('.month_change_num').text(month_change_num);
  1341. $('.month_revise_num').text(month_revise_num);
  1342. $('.month_material_num').text(month_material_num);
  1343. // 滚动数据
  1344. $('#stage-data').html(html);
  1345. // if (originDataCollect === 1 || originDataCollect === 2) {
  1346. tableScroll('tableId', '100%', 30, 7);
  1347. // }
  1348. $('[data-toggle="tooltip"]').tooltip();
  1349. // 图表数据赋值
  1350. const option2 = myChart2_1.getOption();
  1351. option2.dataZoom[0].end = computedPosition(tenderList.length);
  1352. // option2.dataZoom[1].end = computedPosition(tenderList.length);
  1353. option2.xAxis[0].data = chart_option_name;
  1354. option2.series[0].data = chart_option2_data.total_price;
  1355. option2.series[1].data = chart_option2_data.contract_tp;
  1356. option2.series[2].data = chart_option2_data.qc_tp;
  1357. option2.series[2].data = chart_option2_data.qc_tp;
  1358. myChart2_1.setOption(option2);
  1359. myChart2_2.setOption(option2);
  1360. myChart2_3.setOption(option2);
  1361. const option3 = myChart3_1.getOption();
  1362. option3.dataZoom[0].end = computedPosition(tenderList.length);
  1363. option3.yAxis[0].data = chart_option_name;
  1364. option3.series[0].data = chart_option3_data;
  1365. myChart3_1.setOption(option3);
  1366. myChart3_2.setOption(option3);
  1367. const option1 = myChart1.getOption();
  1368. option1.series[0].data = chart_option1_data;
  1369. myChart1.setOption(option1);
  1370. const option4_data = {
  1371. yearmonth: [],
  1372. tp: [],
  1373. end_tp: [],
  1374. }
  1375. if (chart_option4_data.length > 0) {
  1376. // chart_option4_data 排序
  1377. const new_chart_option4_data = _.sortBy(chart_option4_data, 'yearmonth');
  1378. for (const [i,c4] of new_chart_option4_data.entries()) {
  1379. option4_data.yearmonth.push(c4.yearmonth);
  1380. option4_data.tp.push(c4.tp);
  1381. if(i !== 0) {
  1382. option4_data.end_tp.push(ZhCalc.add(c4.end_tp, option4_data.end_tp[i-1]));
  1383. } else {
  1384. option4_data.end_tp.push(c4.end_tp);
  1385. }
  1386. }
  1387. }
  1388. const option4 = myChart4_1.getOption();
  1389. option4.dataZoom[0].end = computedPosition(option4_data.yearmonth.length);
  1390. option4.xAxis[0].data = option4_data.yearmonth;
  1391. option4.series[0].data = option4_data.tp;
  1392. option4.series[1].data = option4_data.end_tp;
  1393. myChart4_1.setOption(option4);
  1394. myChart4_2.setOption(option4);
  1395. // 地图设置
  1396. // const polyLineList = [];
  1397. const centerPoint = { lng: mapJson.lng, lat: mapJson.lat };
  1398. let level = mapJson.level;
  1399. // 初始化地图,设置中心点坐标和地图级别
  1400. const map1 = new BMapGL.Map("map1");
  1401. const map2 = new BMapGL.Map("map2");
  1402. const point = new BMapGL.Point(centerPoint.lng, centerPoint.lat);
  1403. // 创建地图实例
  1404. map1.centerAndZoom(point, level);
  1405. map1.enableScrollWheelZoom(true);
  1406. map1.setMapStyleV2({styleId: '20d4aea41cf71387395f2dc835f1c4b6'});
  1407. // 创建地图实例
  1408. map2.centerAndZoom(point, level);
  1409. map2.enableScrollWheelZoom(true);
  1410. map2.setMapStyleV2({styleId: '20d4aea41cf71387395f2dc835f1c4b6'});
  1411. map1.reset();
  1412. map2.reset();
  1413. }
  1414. $('.change-collect').on('click', function () {
  1415. const num = parseInt($(this).data('collect'));
  1416. $('#zhankai span').text(num);
  1417. if (num === 1 || num === 2) {
  1418. $('.flex-content[data-content="1"]').show();
  1419. $('.flex-content[data-content="2"]').hide();
  1420. if (originDataCollect !== 1 && originDataCollect !== 2) {
  1421. tableScroll('tableId', '100%', 30, 7);
  1422. }
  1423. if (num === 1) {
  1424. $('.jlchart[data-chart-num="1"]').hide();
  1425. $('.jlchart[data-chart-num="1"]').siblings().show();
  1426. $('.jlchart[data-chart-num="2"]').show();
  1427. $('.jlchart[data-chart-num="2"]').siblings().hide();
  1428. } else {
  1429. $('.jlchart[data-chart-num="1"]').show();
  1430. $('.jlchart[data-chart-num="1"]').siblings().hide();
  1431. $('.jlchart[data-chart-num="2"]').hide();
  1432. $('.jlchart[data-chart-num="2"]').siblings().show();
  1433. }
  1434. // roll(50);
  1435. } else {
  1436. $('.flex-content[data-content="2"]').show();
  1437. $('.flex-content[data-content="1"]').hide();
  1438. // roll2(50);
  1439. if (num === 3) {
  1440. $('.jldbchart[data-chart-num="2"]').hide();
  1441. $('.jldbchart[data-chart-num="2"]').siblings().show();
  1442. } else {
  1443. $('.jldbchart[data-chart-num="2"]').show();
  1444. $('.jldbchart[data-chart-num="2"]').siblings().hide();
  1445. }
  1446. }
  1447. echartsReset();
  1448. });
  1449. // 第一层分类选择
  1450. $("body").on('click', '#first-category .select-cate', function () {
  1451. const id = $(this).data('value');
  1452. $(this).parents('.dropdown-menu').siblings('button').text($(this).text());
  1453. let newTenderList = tenders;
  1454. let categoryIndex = 0;
  1455. if (!id) {
  1456. $('#second-category').hide();
  1457. $('#third-category').hide();
  1458. $('#first-category').children('button').attr('data-cid', '').attr('data-value', '');
  1459. } else {
  1460. if (category[1] && category[1].value.length > 0) {
  1461. $('#second-category').show();
  1462. $('#third-category').hide();
  1463. $('#second-category').children('button').text('全部').attr('data-cid', '').attr('data-value', '');
  1464. }
  1465. // 获取第一层已选类别
  1466. const firstCategory = { cid: parseInt($(this).data('cid')), value: parseInt(id) };
  1467. $('#first-category').children('button').attr('data-cid', $(this).data('cid')).attr('data-value', id);
  1468. newTenderList = _.filter(tenders, function (item) {
  1469. return _.findIndex(item.category, firstCategory) !== -1;
  1470. })
  1471. categoryIndex = 1;
  1472. // categoryList.push(firstCategory);
  1473. }
  1474. setData(newTenderList, categoryIndex);
  1475. // 获取新的tenderList及categoryList
  1476. });
  1477. // 第二层分类选择
  1478. $("body").on('click', '#second-category .select-cate', function () {
  1479. const id = $(this).data('value');
  1480. // 获取第一层已选类别
  1481. const first_cid = $('#first-category').children('button').attr('data-cid');
  1482. const first_value = $('#first-category').children('button').attr('data-value');
  1483. const firstCategory = { cid: parseInt(first_cid), value: parseInt(first_value) };
  1484. let newTenderList = _.filter(tenders, function (item) {
  1485. return _.findIndex(item.category, firstCategory) !== -1;
  1486. });
  1487. // let categoryList = [firstCategory];
  1488. let categoryIndex = 1;
  1489. $(this).parents('.dropdown-menu').siblings('button').text($(this).text());
  1490. if (!id) {
  1491. $('#third-category').hide();
  1492. } else {
  1493. if (category[2] && category[2].value.length > 0) {
  1494. $('#third-category').show();
  1495. $('#third-category').children('button').text('全部').attr('data-cid', '').attr('data-value', '');
  1496. }
  1497. // 获取第二层已选类别
  1498. const secondCategory = { cid: parseInt($(this).data('cid')), value: parseInt(id) };
  1499. $('#second-category').children('button').attr('data-cid', $(this).data('cid')).attr('data-value', id);
  1500. newTenderList = _.filter(newTenderList, function (item) {
  1501. return _.findIndex(item.category, secondCategory) !== -1;
  1502. });
  1503. categoryIndex = 2;
  1504. // categoryList.push(secondCategory);
  1505. }
  1506. setData(newTenderList, categoryIndex);
  1507. // 获取新的tenderList及categoryList
  1508. });
  1509. // 第三层分类选择(至多三层)
  1510. $("body").on('click', '#third-category .select-cate', function () {
  1511. const id = $(this).data('value');
  1512. // 获取第一层已选类别
  1513. const first_cid = $('#first-category').children('button').attr('data-cid');
  1514. const first_value = $('#first-category').children('button').attr('data-value');
  1515. const firstCategory = { cid: parseInt(first_cid), value: parseInt(first_value) };
  1516. let newTenderList = _.filter(tenders, function (item) {
  1517. return _.findIndex(item.category, firstCategory) !== -1;
  1518. });
  1519. // 获取第二层已选类别
  1520. const second_cid = $('#second-category').children('button').attr('data-cid');
  1521. const second_value = $('#second-category').children('button').attr('data-value');
  1522. const secondCategory = { cid: parseInt(second_cid), value: parseInt(second_value) };
  1523. newTenderList = _.filter(newTenderList, function (item) {
  1524. return _.findIndex(item.category, secondCategory) !== -1;
  1525. });
  1526. // let categoryList = [firstCategory, secondCategory];
  1527. let categoryIndex = 2;
  1528. $(this).parents('.dropdown-menu').siblings('button').text($(this).text());
  1529. if (!id) {
  1530. $('#third-category').children('button').text('全部').attr('data-cid', '').attr('data-value', '');
  1531. } else {
  1532. $('#third-category').children('button').attr('data-cid', $(this).data('cid')).attr('data-value', id);
  1533. categoryIndex = 3;
  1534. const third_cid = $('#third-category').children('button').attr('data-cid');
  1535. const third_value = $('#third-category').children('button').attr('data-value');
  1536. const thirdCategory = { cid: parseInt(third_cid), value: parseInt(third_value) };
  1537. newTenderList = _.filter(newTenderList, function (item) {
  1538. return _.findIndex(item.category, thirdCategory) !== -1;
  1539. });
  1540. // categoryList.push({ cid: parseInt($(this).data('cid')), value: parseInt($(this).data('value')) });
  1541. }
  1542. setData(newTenderList, categoryIndex);
  1543. // 获取新的tenderList及categoryList
  1544. })
  1545. })
  1546. function formatMoney(s, dot = ',', decimal = 2) {
  1547. if (!s) {
  1548. s = 0;
  1549. return s.toFixed(decimal);
  1550. }
  1551. s = parseFloat((s + '').replace(/[^\d\.-]/g, '')).toFixed(decimal) + '';
  1552. if (!decimal) {
  1553. s += '.';
  1554. }
  1555. const l = s.split('.')[0].split('').reverse(),
  1556. r = s.split('.')[1];
  1557. let t = '';
  1558. for (let i = 0; i < l.length; i++) {
  1559. t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? dot : '');
  1560. }
  1561. return t.split('').reverse().join('') + (decimal === 0 ? '' : '.' + r);
  1562. }
  1563. // 计算显示滚动条长度
  1564. function computedPosition(xArrayLength) {
  1565. if (xArrayLength >= 8) {
  1566. return Math.floor(8 / xArrayLength * 100) > 100 ? 100 : Math.floor(8 / xArrayLength * 100);
  1567. // return length <= 10 ? 35 : 100 - Math.floor(35 / length * 100);
  1568. } else {
  1569. return 100;
  1570. }
  1571. }
  1572. </script>