index.ejs 93 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589
  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. show: true,
  650. realtime: true,
  651. dataZoomIndex: 10,
  652. start: 0,
  653. end: 5,
  654. handleSize: 0,
  655. // startValue: 1,
  656. // 结束位置的数值
  657. // endValue: 10
  658. },
  659. {
  660. type: 'inside',
  661. // realtime: true,
  662. start: 1,
  663. end: 10
  664. }
  665. ],
  666. legend: {
  667. data: ['台帐', '合同计量', '变更计量'],
  668. top:'17%'
  669. },
  670. grid: {
  671. top:'35%',
  672. left: '3%',
  673. right: '4%',
  674. bottom: '3%',
  675. containLabel: true
  676. },
  677. xAxis: [
  678. {
  679. type: 'category',
  680. data: [],
  681. axisLabel: {
  682. show: true,
  683. interval: 0,
  684. textStyle: {
  685. color: "#fff",
  686. fontSize: 14
  687. },
  688. formatter: function(value) {
  689. var res = value;
  690. if(res.length > 8) {
  691. res = res.substring(0, 6) + "..";
  692. }
  693. return res;
  694. }
  695. }
  696. }
  697. ],
  698. yAxis: [
  699. {
  700. type: 'value',
  701. name:'金额',
  702. position: 'left',
  703. axisLabel : {
  704. formatter: function (value, index) {
  705. if (value < 0) {
  706. let newValue = Math.abs(value);
  707. if (newValue >= 10000 && newValue < 10000000) {
  708. newValue = newValue / 10000 + "万";
  709. } else if (newValue >= 10000000) {
  710. newValue = newValue / 10000000 + "千万";
  711. }
  712. value = '-' + newValue;
  713. }
  714. if (value >= 10000 && value < 10000000) {
  715. value = value / 10000 + "万";
  716. } else if (value >= 10000000) {
  717. value = value / 10000000 + "千万";
  718. }
  719. return value;
  720. }
  721. },
  722. splitArea : {show : true}
  723. },
  724. {
  725. type: 'value',
  726. name:'完成度',
  727. position: 'right',
  728. min:0,
  729. max:100,
  730. axisLabel : {
  731. formatter: '{value} %'
  732. },
  733. splitArea : {show : true}
  734. }
  735. ],
  736. series: [
  737. {
  738. name: '台帐',
  739. type: 'bar',
  740. emphasis: {
  741. focus: 'series'
  742. },
  743. data: []
  744. },
  745. {
  746. name: '合同计量',
  747. type: 'bar',
  748. stack: '计量',
  749. emphasis: {
  750. focus: 'series'
  751. },
  752. data: []
  753. },
  754. {
  755. name: '变更计量',
  756. type: 'bar',
  757. stack: '计量',
  758. emphasis: {
  759. focus: 'series'
  760. },
  761. data: []
  762. }
  763. ]
  764. };
  765. var chart2 = document.getElementsByClassName('jlchart');
  766. var myChart2_1 = echarts.init(chart2[0], 'dark');
  767. var myChart2_2 = echarts.init(chart2[1], 'dark');
  768. var myChart2_3 = echarts.init(chart2[2], 'dark');
  769. myChart2_1.setOption(option2);
  770. myChart2_2.setOption(option2);
  771. myChart2_3.setOption(option2);
  772. // myChart2.setOption(option);
  773. // 计量完成度统计柱状图表
  774. // var myChart3 = echarts.init(document.getElementsByClassName('jlwcdchart')[0], 'dark');
  775. option3 = {
  776. title: {
  777. text: '计量完成度统计',
  778. left: 'center',
  779. top:'5%'
  780. },
  781. 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)'],
  782. backgroundColor: '#343a40 ',
  783. tooltip: {
  784. trigger: 'axis',
  785. axisPointer: { // Use axis to trigger tooltip
  786. type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
  787. }
  788. },
  789. grid: {
  790. left: '3%',
  791. right: '4%',
  792. bottom: '3%',
  793. containLabel: true
  794. },
  795. xAxis: {
  796. type: 'value'
  797. },
  798. yAxis: {
  799. type: 'category',
  800. data: [],
  801. axisLabel: {
  802. show: true,
  803. interval: 0,
  804. // textStyle: {
  805. // color: "#fff",
  806. // fontSize: 14
  807. // },
  808. formatter: function(value) {
  809. var res = value;
  810. if(res.length > 6) {
  811. res = res.substring(0, 4) + "..";
  812. }
  813. return res;
  814. }
  815. }
  816. },
  817. dataZoom: [
  818. {
  819. start: 0,
  820. end: 10,
  821. show: true,
  822. handleSize: 0,
  823. realtime: true,
  824. filterMode: 'filter',
  825. yAxisIndex: [0,1],
  826. },
  827. {
  828. type: 'inside',
  829. realtime: true,
  830. start: 0,
  831. end: 10,
  832. yAxisIndex: [0,1],
  833. }
  834. ],
  835. series: [
  836. {
  837. name: '完成度',
  838. type: 'bar',
  839. stack: 'total',
  840. label: {
  841. show: true
  842. },
  843. emphasis: {
  844. focus: 'series'
  845. },
  846. data: []
  847. }
  848. ]
  849. };
  850. var chart3 = document.getElementsByClassName('jlwcdchart');
  851. var myChart3_1 = echarts.init(chart3[0], 'dark');
  852. var myChart3_2 = echarts.init(chart3[1], 'dark');
  853. myChart3_1.setOption(option3);
  854. myChart3_2.setOption(option3);
  855. // 计量对比线形图表
  856. option4 = {
  857. title: {
  858. text: '计量对比',
  859. left: 'center',
  860. top:'5%'
  861. },
  862. 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)'],
  863. backgroundColor: '#343a40 ',
  864. tooltip: {
  865. trigger: 'axis',
  866. axisPointer: {
  867. type: 'cross',
  868. label: {
  869. backgroundColor: '#6a7985'
  870. }
  871. }
  872. },
  873. legend: {
  874. data: ['本月计量', '累计计量'],
  875. top:'15%'
  876. },
  877. grid: {
  878. top:'25%',
  879. left: '3%',
  880. right: '4%',
  881. bottom: '0',
  882. containLabel: true
  883. },
  884. xAxis: [
  885. {
  886. type: 'category',
  887. boundaryGap: false,
  888. data: []
  889. }
  890. ],
  891. yAxis: [
  892. {
  893. type: 'value',
  894. axisLabel : {
  895. formatter: function (value, index) {
  896. if (value < 0) {
  897. let newValue = Math.abs(value);
  898. if (newValue >= 10000 && newValue < 10000000) {
  899. newValue = newValue / 10000 + "万";
  900. } else if (newValue >= 10000000) {
  901. newValue = newValue / 10000000 + "千万";
  902. }
  903. value = '-' + newValue;
  904. }
  905. if (value >= 10000 && value < 10000000) {
  906. value = value / 10000 + "万";
  907. } else if (value >= 10000000) {
  908. value = value / 10000000 + "千万";
  909. }
  910. return value;
  911. }
  912. },
  913. }
  914. ],
  915. dataZoom: [
  916. {
  917. show: true,
  918. realtime: true,
  919. dataZoomIndex: 10,
  920. start: 0,
  921. end: 5,
  922. handleSize: 0,
  923. // startValue: 1,
  924. // 结束位置的数值
  925. // endValue: 10
  926. },
  927. {
  928. type: 'inside',
  929. // realtime: true,
  930. start: 1,
  931. end: 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.dataZoom[1].end = computedPosition(tenderList.length);
  1364. option3.yAxis[0].data = chart_option_name;
  1365. option3.series[0].data = chart_option3_data;
  1366. myChart3_1.setOption(option3);
  1367. myChart3_2.setOption(option3);
  1368. const option1 = myChart1.getOption();
  1369. option1.series[0].data = chart_option1_data;
  1370. myChart1.setOption(option1);
  1371. const option4_data = {
  1372. yearmonth: [],
  1373. tp: [],
  1374. end_tp: [],
  1375. }
  1376. if (chart_option4_data.length > 0) {
  1377. // chart_option4_data 排序
  1378. const new_chart_option4_data = _.sortBy(chart_option4_data, 'yearmonth');
  1379. for (const [i,c4] of new_chart_option4_data.entries()) {
  1380. option4_data.yearmonth.push(c4.yearmonth);
  1381. option4_data.tp.push(c4.tp);
  1382. if(i !== 0) {
  1383. option4_data.end_tp.push(ZhCalc.add(c4.end_tp, option4_data.end_tp[i-1]));
  1384. } else {
  1385. option4_data.end_tp.push(c4.end_tp);
  1386. }
  1387. }
  1388. }
  1389. const option4 = myChart4_1.getOption();
  1390. option4.dataZoom[0].end = computedPosition(option4_data.yearmonth.length);
  1391. option4.dataZoom[1].end = computedPosition(option4_data.yearmonth.length);
  1392. option4.xAxis[0].data = option4_data.yearmonth;
  1393. option4.series[0].data = option4_data.tp;
  1394. option4.series[1].data = option4_data.end_tp;
  1395. myChart4_1.setOption(option4);
  1396. myChart4_2.setOption(option4);
  1397. // 地图设置
  1398. // const polyLineList = [];
  1399. const centerPoint = { lng: mapJson.lng, lat: mapJson.lat };
  1400. let level = mapJson.level;
  1401. // 初始化地图,设置中心点坐标和地图级别
  1402. const map1 = new BMapGL.Map("map1");
  1403. const map2 = new BMapGL.Map("map2");
  1404. const point = new BMapGL.Point(centerPoint.lng, centerPoint.lat);
  1405. // 创建地图实例
  1406. map1.centerAndZoom(point, level);
  1407. map1.enableScrollWheelZoom(true);
  1408. map1.setMapStyleV2({styleId: '20d4aea41cf71387395f2dc835f1c4b6'});
  1409. // 创建地图实例
  1410. map2.centerAndZoom(point, level);
  1411. map2.enableScrollWheelZoom(true);
  1412. map2.setMapStyleV2({styleId: '20d4aea41cf71387395f2dc835f1c4b6'});
  1413. map1.reset();
  1414. map2.reset();
  1415. }
  1416. $('.change-collect').on('click', function () {
  1417. const num = parseInt($(this).data('collect'));
  1418. $('#zhankai span').text(num);
  1419. if (num === 1 || num === 2) {
  1420. $('.flex-content[data-content="1"]').show();
  1421. $('.flex-content[data-content="2"]').hide();
  1422. if (originDataCollect !== 1 && originDataCollect !== 2) {
  1423. tableScroll('tableId', '100%', 30, 7);
  1424. }
  1425. if (num === 1) {
  1426. $('.jlchart[data-chart-num="1"]').hide();
  1427. $('.jlchart[data-chart-num="1"]').siblings().show();
  1428. $('.jlchart[data-chart-num="2"]').show();
  1429. $('.jlchart[data-chart-num="2"]').siblings().hide();
  1430. } else {
  1431. $('.jlchart[data-chart-num="1"]').show();
  1432. $('.jlchart[data-chart-num="1"]').siblings().hide();
  1433. $('.jlchart[data-chart-num="2"]').hide();
  1434. $('.jlchart[data-chart-num="2"]').siblings().show();
  1435. }
  1436. // roll(50);
  1437. } else {
  1438. $('.flex-content[data-content="2"]').show();
  1439. $('.flex-content[data-content="1"]').hide();
  1440. // roll2(50);
  1441. if (num === 3) {
  1442. $('.jldbchart[data-chart-num="2"]').hide();
  1443. $('.jldbchart[data-chart-num="2"]').siblings().show();
  1444. } else {
  1445. $('.jldbchart[data-chart-num="2"]').show();
  1446. $('.jldbchart[data-chart-num="2"]').siblings().hide();
  1447. }
  1448. }
  1449. echartsReset();
  1450. });
  1451. // 第一层分类选择
  1452. $("body").on('click', '#first-category .select-cate', function () {
  1453. const id = $(this).data('value');
  1454. $(this).parents('.dropdown-menu').siblings('button').text($(this).text());
  1455. let newTenderList = tenders;
  1456. let categoryIndex = 0;
  1457. if (!id) {
  1458. $('#second-category').hide();
  1459. $('#third-category').hide();
  1460. $('#first-category').children('button').attr('data-cid', '').attr('data-value', '');
  1461. } else {
  1462. if (category[1] && category[1].value.length > 0) {
  1463. $('#second-category').show();
  1464. $('#third-category').hide();
  1465. $('#second-category').children('button').text('全部').attr('data-cid', '').attr('data-value', '');
  1466. }
  1467. // 获取第一层已选类别
  1468. const firstCategory = { cid: parseInt($(this).data('cid')), value: parseInt(id) };
  1469. $('#first-category').children('button').attr('data-cid', $(this).data('cid')).attr('data-value', id);
  1470. newTenderList = _.filter(tenders, function (item) {
  1471. return _.findIndex(item.category, firstCategory) !== -1;
  1472. })
  1473. categoryIndex = 1;
  1474. // categoryList.push(firstCategory);
  1475. }
  1476. setData(newTenderList, categoryIndex);
  1477. // 获取新的tenderList及categoryList
  1478. });
  1479. // 第二层分类选择
  1480. $("body").on('click', '#second-category .select-cate', function () {
  1481. const id = $(this).data('value');
  1482. // 获取第一层已选类别
  1483. const first_cid = $('#first-category').children('button').attr('data-cid');
  1484. const first_value = $('#first-category').children('button').attr('data-value');
  1485. const firstCategory = { cid: parseInt(first_cid), value: parseInt(first_value) };
  1486. let newTenderList = _.filter(tenders, function (item) {
  1487. return _.findIndex(item.category, firstCategory) !== -1;
  1488. });
  1489. // let categoryList = [firstCategory];
  1490. let categoryIndex = 1;
  1491. $(this).parents('.dropdown-menu').siblings('button').text($(this).text());
  1492. if (!id) {
  1493. $('#third-category').hide();
  1494. } else {
  1495. if (category[2] && category[2].value.length > 0) {
  1496. $('#third-category').show();
  1497. $('#third-category').children('button').text('全部').attr('data-cid', '').attr('data-value', '');
  1498. }
  1499. // 获取第二层已选类别
  1500. const secondCategory = { cid: parseInt($(this).data('cid')), value: parseInt(id) };
  1501. $('#second-category').children('button').attr('data-cid', $(this).data('cid')).attr('data-value', id);
  1502. newTenderList = _.filter(newTenderList, function (item) {
  1503. return _.findIndex(item.category, secondCategory) !== -1;
  1504. });
  1505. categoryIndex = 2;
  1506. // categoryList.push(secondCategory);
  1507. }
  1508. setData(newTenderList, categoryIndex);
  1509. // 获取新的tenderList及categoryList
  1510. });
  1511. // 第三层分类选择(至多三层)
  1512. $("body").on('click', '#third-category .select-cate', function () {
  1513. const id = $(this).data('value');
  1514. // 获取第一层已选类别
  1515. const first_cid = $('#first-category').children('button').attr('data-cid');
  1516. const first_value = $('#first-category').children('button').attr('data-value');
  1517. const firstCategory = { cid: parseInt(first_cid), value: parseInt(first_value) };
  1518. let newTenderList = _.filter(tenders, function (item) {
  1519. return _.findIndex(item.category, firstCategory) !== -1;
  1520. });
  1521. // 获取第二层已选类别
  1522. const second_cid = $('#second-category').children('button').attr('data-cid');
  1523. const second_value = $('#second-category').children('button').attr('data-value');
  1524. const secondCategory = { cid: parseInt(second_cid), value: parseInt(second_value) };
  1525. newTenderList = _.filter(newTenderList, function (item) {
  1526. return _.findIndex(item.category, secondCategory) !== -1;
  1527. });
  1528. // let categoryList = [firstCategory, secondCategory];
  1529. let categoryIndex = 2;
  1530. $(this).parents('.dropdown-menu').siblings('button').text($(this).text());
  1531. if (!id) {
  1532. $('#third-category').children('button').text('全部').attr('data-cid', '').attr('data-value', '');
  1533. } else {
  1534. $('#third-category').children('button').attr('data-cid', $(this).data('cid')).attr('data-value', id);
  1535. categoryIndex = 3;
  1536. const third_cid = $('#third-category').children('button').attr('data-cid');
  1537. const third_value = $('#third-category').children('button').attr('data-value');
  1538. const thirdCategory = { cid: parseInt(third_cid), value: parseInt(third_value) };
  1539. newTenderList = _.filter(newTenderList, function (item) {
  1540. return _.findIndex(item.category, thirdCategory) !== -1;
  1541. });
  1542. // categoryList.push({ cid: parseInt($(this).data('cid')), value: parseInt($(this).data('value')) });
  1543. }
  1544. setData(newTenderList, categoryIndex);
  1545. // 获取新的tenderList及categoryList
  1546. })
  1547. })
  1548. function formatMoney(s, dot = ',', decimal = 2) {
  1549. if (!s) {
  1550. s = 0;
  1551. return s.toFixed(decimal);
  1552. }
  1553. s = parseFloat((s + '').replace(/[^\d\.-]/g, '')).toFixed(decimal) + '';
  1554. if (!decimal) {
  1555. s += '.';
  1556. }
  1557. const l = s.split('.')[0].split('').reverse(),
  1558. r = s.split('.')[1];
  1559. let t = '';
  1560. for (let i = 0; i < l.length; i++) {
  1561. t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? dot : '');
  1562. }
  1563. return t.split('').reverse().join('') + (decimal === 0 ? '' : '.' + r);
  1564. }
  1565. // 计算显示滚动条长度
  1566. function computedPosition(xArrayLength) {
  1567. if (xArrayLength >= 10) {
  1568. return Math.floor(10 / xArrayLength * 100) > 100 ? 100 : Math.floor(10 / xArrayLength * 100);
  1569. // return length <= 10 ? 35 : 100 - Math.floor(35 / length * 100);
  1570. } else {
  1571. return 100;
  1572. }
  1573. }
  1574. </script>