index.ejs 124 KB

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