index.ejs 94 KB

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