index.ejs 93 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608
  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. title: {
  596. text: '金额统计图',
  597. left: 'center',
  598. top:'7%'
  599. },
  600. 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)'],
  601. backgroundColor: '#343a40 ',
  602. tooltip: {
  603. trigger: 'item'
  604. },
  605. // legend: {
  606. // orient: 'vertical',
  607. // left: 'center',
  608. // },
  609. series: [
  610. {
  611. name: '台账金额',
  612. type: 'pie',
  613. radius: '60%',
  614. top:'15%',
  615. formatter: function(name){
  616. return name.length>10?name.substr(0,10)+"...":name;
  617. },
  618. data: [],
  619. emphasis: {
  620. itemStyle: {
  621. shadowBlur: 10,
  622. shadowOffsetX: 0,
  623. shadowColor: 'rgba(0, 0, 0, 0.5)'
  624. }
  625. }
  626. }
  627. ]
  628. };
  629. myChart1.setOption(option1);
  630. // 计量情况柱状图表
  631. // var myChart2 = echarts.init(document.getElementsByClassName('jlchart')[0], 'dark');
  632. option2 = {
  633. title: {
  634. text: '计量情况',
  635. left: 'center',
  636. top:'5%'
  637. },
  638. 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)'],
  639. backgroundColor: '#343a40 ',
  640. tooltip: {
  641. trigger: 'axis',
  642. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  643. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  644. }
  645. },
  646. dataZoom: [
  647. {
  648. type: 'slider',
  649. show: true,
  650. realtime: true,
  651. showdetail: false,
  652. showDataShadow: false,
  653. // dataZoomIndex: 10,
  654. start: 0,
  655. end: 8,
  656. handleSize: 0,
  657. height: 10,
  658. bottom: '10%'
  659. },
  660. // {
  661. // // realtime: true,
  662. // type: 'slider',
  663. // show: true,
  664. // realtime: true,
  665. // showdetail: false,
  666. // showDataShadow: false,
  667. // // dataZoomIndex: 10,
  668. // start: 0,
  669. // end: 8,
  670. // handleSize: 0,
  671. // bottom:30,
  672. // height:10,
  673. // }
  674. ],
  675. legend: {
  676. data: ['台帐', '合同计量', '变更计量'],
  677. top:'17%'
  678. },
  679. grid: {
  680. top:'25%',
  681. left: '3%',
  682. right: '4%',
  683. bottom: '15%',
  684. containLabel: true
  685. },
  686. xAxis: [
  687. {
  688. type: 'category',
  689. data: [],
  690. axisLabel: {
  691. show: true,
  692. interval: 0,
  693. textStyle: {
  694. color: "#fff",
  695. fontSize: 14
  696. },
  697. formatter: function(value) {
  698. var res = value;
  699. if(res.length > 8) {
  700. res = res.substring(0, 6) + "..";
  701. }
  702. return res;
  703. }
  704. }
  705. }
  706. ],
  707. yAxis: [
  708. {
  709. type: 'value',
  710. name:'金额',
  711. position: 'left',
  712. axisLabel : {
  713. formatter: function (value, index) {
  714. if (value < 0) {
  715. let newValue = Math.abs(value);
  716. if (newValue >= 10000 && newValue < 10000000) {
  717. newValue = newValue / 10000 + "万";
  718. } else if (newValue >= 10000000) {
  719. newValue = newValue / 10000000 + "千万";
  720. }
  721. value = '-' + newValue;
  722. }
  723. if (value >= 10000 && value < 10000000) {
  724. value = value / 10000 + "万";
  725. } else if (value >= 10000000) {
  726. value = value / 10000000 + "千万";
  727. }
  728. return value;
  729. }
  730. },
  731. splitArea : {show : true}
  732. },
  733. {
  734. type: 'value',
  735. name:'完成度',
  736. position: 'right',
  737. min:0,
  738. max:100,
  739. axisLabel : {
  740. formatter: '{value} %'
  741. },
  742. splitArea : {show : true}
  743. }
  744. ],
  745. series: [
  746. {
  747. name: '台帐',
  748. type: 'bar',
  749. emphasis: {
  750. focus: 'series'
  751. },
  752. data: []
  753. },
  754. {
  755. name: '合同计量',
  756. type: 'bar',
  757. stack: '计量',
  758. emphasis: {
  759. focus: 'series'
  760. },
  761. data: []
  762. },
  763. {
  764. name: '变更计量',
  765. type: 'bar',
  766. stack: '计量',
  767. emphasis: {
  768. focus: 'series'
  769. },
  770. data: []
  771. }
  772. ]
  773. };
  774. var chart2 = document.getElementsByClassName('jlchart');
  775. var myChart2_1 = echarts.init(chart2[0], 'dark');
  776. var myChart2_2 = echarts.init(chart2[1], 'dark');
  777. var myChart2_3 = echarts.init(chart2[2], 'dark');
  778. myChart2_1.setOption(option2);
  779. myChart2_2.setOption(option2);
  780. myChart2_3.setOption(option2);
  781. // myChart2.setOption(option);
  782. // 计量完成度统计柱状图表
  783. // var myChart3 = echarts.init(document.getElementsByClassName('jlwcdchart')[0], 'dark');
  784. option3 = {
  785. title: {
  786. text: '计量完成度统计',
  787. left: 'center',
  788. top:'5%'
  789. },
  790. 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)'],
  791. backgroundColor: '#343a40 ',
  792. tooltip: {
  793. trigger: 'axis',
  794. axisPointer: { // Use axis to trigger tooltip
  795. type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
  796. }
  797. },
  798. grid: {
  799. left: '10%',
  800. right: '10%',
  801. bottom: '3%',
  802. containLabel: true
  803. },
  804. xAxis: {
  805. type: 'value'
  806. },
  807. yAxis: {
  808. type: 'category',
  809. data: [],
  810. axisLabel: {
  811. show: true,
  812. interval: 0,
  813. // textStyle: {
  814. // color: "#fff",
  815. // fontSize: 14
  816. // },
  817. formatter: function(value) {
  818. var res = value;
  819. if(res.length > 8) {
  820. res = res.substring(0, 6) + "..";
  821. }
  822. return res;
  823. }
  824. }
  825. },
  826. dataZoom: [
  827. {
  828. start: 0,
  829. end: 10,
  830. show: true,
  831. handleSize: 0,
  832. realtime: true,
  833. // filterMode: 'empty',
  834. yAxisIndex: [0,1],
  835. width: 10,
  836. height: '80%',
  837. right: '5%',
  838. bottom:'2%'
  839. },
  840. ],
  841. series: [
  842. {
  843. name: '完成度',
  844. type: 'bar',
  845. stack: 'total',
  846. label: {
  847. show: true
  848. },
  849. emphasis: {
  850. focus: 'series'
  851. },
  852. data: []
  853. }
  854. ]
  855. };
  856. var chart3 = document.getElementsByClassName('jlwcdchart');
  857. var myChart3_1 = echarts.init(chart3[0], 'dark');
  858. var myChart3_2 = echarts.init(chart3[1], 'dark');
  859. myChart3_1.setOption(option3);
  860. myChart3_2.setOption(option3);
  861. // 计量对比线形图表
  862. option4 = {
  863. title: {
  864. text: '计量对比',
  865. left: 'center',
  866. top:'5%'
  867. },
  868. 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)'],
  869. backgroundColor: '#343a40 ',
  870. tooltip: {
  871. trigger: 'axis',
  872. axisPointer: {
  873. type: 'cross',
  874. label: {
  875. backgroundColor: '#6a7985'
  876. }
  877. }
  878. },
  879. legend: {
  880. data: ['本月计量', '累计计量'],
  881. top:'15%'
  882. },
  883. grid: {
  884. top:'25%',
  885. left: '3%',
  886. right: '4%',
  887. bottom: '15%',
  888. containLabel: true
  889. },
  890. xAxis: [
  891. {
  892. type: 'category',
  893. boundaryGap: false,
  894. data: []
  895. }
  896. ],
  897. yAxis: [
  898. {
  899. type: 'value',
  900. axisLabel : {
  901. formatter: function (value, index) {
  902. if (value < 0) {
  903. let newValue = Math.abs(value);
  904. if (newValue >= 10000 && newValue < 10000000) {
  905. newValue = newValue / 10000 + "万";
  906. } else if (newValue >= 10000000) {
  907. newValue = newValue / 10000000 + "千万";
  908. }
  909. value = '-' + newValue;
  910. }
  911. if (value >= 10000 && value < 10000000) {
  912. value = value / 10000 + "万";
  913. } else if (value >= 10000000) {
  914. value = value / 10000000 + "千万";
  915. }
  916. return value;
  917. }
  918. },
  919. }
  920. ],
  921. dataZoom: [
  922. {
  923. show: true,
  924. realtime: true,
  925. dataZoomIndex: 10,
  926. start: 0,
  927. end: 5,
  928. handleSize: 0,
  929. height: 10,
  930. bottom: '10%'
  931. },
  932. ],
  933. series: [
  934. {
  935. name: '本月计量',
  936. type: 'line',
  937. stack: '总量',
  938. areaStyle: {},
  939. emphasis: {
  940. focus: 'series'
  941. },
  942. data: []
  943. },
  944. {
  945. name: '累计计量',
  946. type: 'line',
  947. stack: '总量',
  948. areaStyle: {},
  949. emphasis: {
  950. focus: 'series'
  951. },
  952. data: []
  953. }
  954. ]
  955. };
  956. var chart4 = document.getElementsByClassName('jldbchart');
  957. var myChart4_1 = echarts.init(chart4[0], 'dark');
  958. var myChart4_2 = echarts.init(chart4[1], 'dark');
  959. myChart4_1.setOption(option4);
  960. myChart4_2.setOption(option4);
  961. // for (var i = 0; i < chart4.length; i++) {
  962. // var myChart4 = echarts.init(chart4[i], 'dark');
  963. // myChart4.setOption(option);
  964. // }
  965. // 投资统计分析圆饼图表
  966. var myChart5 = echarts.init(document.getElementById('tztjchart'), 'dark');
  967. option5 = {
  968. title: {
  969. text: '投资统计分析',
  970. left: 'center',
  971. top:'7%'
  972. },
  973. 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)'],
  974. backgroundColor: '#343a40 ',
  975. tooltip: {
  976. trigger: 'item',
  977. },
  978. series: [
  979. {
  980. name: '访问来源',
  981. type: 'pie',
  982. top:'15%',
  983. bottom:'10%',
  984. 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%']<% } %>,
  985. // label: {
  986. // position: 'inner',
  987. // fontSize: 14
  988. // },
  989. label:{
  990. show:false
  991. },
  992. labelLine: {
  993. show: true
  994. },
  995. formatter: function(name){
  996. return name.length>10?name.substr(0,10)+"...":name;
  997. },
  998. data: [
  999. ]
  1000. },
  1001. {
  1002. name: '访问来源',
  1003. type: 'pie',
  1004. top:'15%',
  1005. bottom:'10%',
  1006. radius: <% if (categoryData && categoryData[2] && categoryData[2].value.length > 0) { %>['30%', '60%']<% } else { %>['50%', '85%']<% } %>,
  1007. // label: {
  1008. // position: 'inner',
  1009. // fontSize: 14
  1010. // },
  1011. label:{
  1012. show:false
  1013. },
  1014. labelLine: {
  1015. show: true,
  1016. },
  1017. formatter: function(name){
  1018. return name.length>10?name.substr(0,10)+"...":name;
  1019. },
  1020. data: [
  1021. ]
  1022. },
  1023. {
  1024. name: '访问来源',
  1025. type: 'pie',
  1026. top:'15%',
  1027. bottom:'10%',
  1028. radius: ['60%', '85%'],
  1029. // label: {
  1030. // position: 'inner',
  1031. // fontSize: 14
  1032. // },
  1033. label:{
  1034. show:false
  1035. },
  1036. labelLine: {
  1037. show: true
  1038. },
  1039. formatter: function(name){
  1040. return name.length>10?name.substr(0,10)+"...":name;
  1041. },
  1042. data: [
  1043. ]
  1044. }
  1045. ]
  1046. };
  1047. myChart5.setOption(option5);
  1048. function echartsReset() {
  1049. myChart1.resize();
  1050. myChart2_1.resize();
  1051. myChart2_2.resize();
  1052. myChart2_3.resize();
  1053. myChart3_1.resize();
  1054. myChart3_2.resize();
  1055. myChart4_1.resize();
  1056. myChart4_2.resize();
  1057. myChart5.resize();
  1058. }
  1059. $(function () {
  1060. $('#showFull').click(function () {
  1061. const full=document.getElementById("big-data");
  1062. launchIntoFullscreen(full);
  1063. });
  1064. $('#exitFull').click(function () {
  1065. exitFullscreen();
  1066. })
  1067. })
  1068. $(window).resize(echartsReset);
  1069. // 数据全屏
  1070. function launchIntoFullscreen(element) {
  1071. if(element.requestFullscreen){
  1072. element.requestFullscreen();
  1073. }
  1074. else if(element.mozRequestFullScreen) {
  1075. element.mozRequestFullScreen();
  1076. }
  1077. else if(element.webkitRequestFullscreen) {
  1078. element.webkitRequestFullscreen();
  1079. }
  1080. else if(element.msRequestFullscreen) {
  1081. element.msRequestFullscreen();
  1082. }
  1083. }
  1084. function exitFullscreen() {
  1085. if(document.exitFullscreen) {
  1086. document.exitFullscreen();
  1087. } else if(document.mozCancelFullScreen) {
  1088. document.mozCancelFullScreen();
  1089. } else if(document.webkitExitFullscreen) {
  1090. document.webkitExitFullscreen();
  1091. }
  1092. }
  1093. document.addEventListener("fullscreenchange", function (event) {
  1094. if (document.fullscreenElement) {
  1095. $('#exitfull-div').show();
  1096. $('#showFull').hide();
  1097. } else {
  1098. $('#exitfull-div').hide();
  1099. $('#showFull').show();
  1100. }
  1101. });
  1102. </script>
  1103. <!--<script src="/public/js/map/turf.min.js"></script>-->
  1104. <!--<script src="/public/js/map/gcoord.js"></script>-->
  1105. <!--<script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=C3hLZAjuWTaCdwnwoYY83APrwlPEj4v7"></script>-->
  1106. <script>
  1107. // let map1, map2;
  1108. // function loadScript() {
  1109. // var script = document.createElement("script");
  1110. // script.src = "https://api.map.baidu.com/api?v=1.0&type=webgl&ak=C3hLZAjuWTaCdwnwoYY83APrwlPEj4v7&callback=initialize";
  1111. // document.body.appendChild(script);
  1112. // }
  1113. // window.onload = loadScript;
  1114. // const map1 = new BMapGL.Map("map1");
  1115. // const map2 = new BMapGL.Map("map2");
  1116. // map1.enableScrollWheelZoom(true);
  1117. // map1.setMapStyleV2({styleId: '20d4aea41cf71387395f2dc835f1c4b6'});
  1118. // map2.enableScrollWheelZoom(true);
  1119. // map2.setMapStyleV2({styleId: '20d4aea41cf71387395f2dc835f1c4b6'});
  1120. const originDataCollect = parseInt('<%- ctx.session.sessionProject.dataCollect %>');
  1121. const category = JSON.parse(unescape('<%- escape(JSON.stringify(categoryData)) %>'));
  1122. <!--const mapJson = JSON.parse(unescape('<%- escape(JSON.stringify(map_json)) %>'));-->
  1123. let tenders = '';
  1124. // let noticeList = '';
  1125. $(function () {
  1126. postData('/datacollect/load', {}, function (result) {
  1127. tenders = result.tenderList;
  1128. const chart_option5_data = {
  1129. data1: [],
  1130. data2: [],
  1131. data3: [],
  1132. }
  1133. const chart_category_data = {
  1134. data1: [],
  1135. data2: [],
  1136. data3: [],
  1137. }
  1138. let option5_is_tender = false;
  1139. // 设置圆环图5数据,还要设置圆环图大小
  1140. if (category && category.length > 0) {
  1141. if (category[0] && category[0].value.length > 0) {
  1142. for (const c of category[0].value) {
  1143. chart_category_data.data1.push([{
  1144. cid: category[0].id,
  1145. value: c.id,
  1146. }]);
  1147. chart_option5_data.data1.push({
  1148. value: 0,
  1149. name: c.value,
  1150. });
  1151. }
  1152. }
  1153. if (category[1] && category[1].value.length > 0) {
  1154. for (const c of category[1].value) {
  1155. for (const cc1 of chart_category_data.data1) {
  1156. chart_category_data.data2.push([...cc1, {
  1157. cid: category[1].id,
  1158. value: c.id,
  1159. }]);
  1160. }
  1161. for (const cd1 of chart_option5_data.data1) {
  1162. chart_option5_data.data2.push({
  1163. value: 0,
  1164. name: cd1.name + ' ' + c.value,
  1165. });
  1166. }
  1167. }
  1168. }
  1169. if (category[2] && category[2].value.length > 0) {
  1170. for (const c of category[2].value) {
  1171. for (const cc2 of chart_category_data.data2) {
  1172. chart_category_data.data3.push([...cc2, {
  1173. cid: category[2].id,
  1174. value: c.id,
  1175. }]);
  1176. }
  1177. for (const cd2 of chart_option5_data.data2) {
  1178. chart_option5_data.data3.push({
  1179. value: 0,
  1180. name: cd2.name + ' ' + c.value,
  1181. });
  1182. }
  1183. }
  1184. }
  1185. } else {
  1186. option5_is_tender = true;
  1187. }
  1188. for (const t of tenders) {
  1189. calculateTender(t);
  1190. if (option5_is_tender) {
  1191. chart_option5_data.data1.push({ value: t.total_price ? t.total_price : 0, name: t.name});
  1192. } else {
  1193. for (const cc1 of chart_category_data.data1) {
  1194. const sameObject = _.intersectionWith(t.category, cc1, _.isEqual);
  1195. const index = sameObject[0] ? _.findIndex(cc1, { cid: sameObject[0].cid, value: sameObject[0].value }) : -1;
  1196. if (index !== -1) {
  1197. chart_option5_data.data1[index].value = ZhCalc.add(chart_option5_data.data1[index].value, (t.total_price ? t.total_price : 0));
  1198. }
  1199. }
  1200. for (const cc2 of chart_category_data.data2) {
  1201. const sameObject = _.intersectionWith(t.category, cc2, _.isEqual);
  1202. if(sameObject.length === 2) {
  1203. const index = _.findIndex(chart_category_data.data2, function (item) {
  1204. return _.isEqual(item, sameObject);
  1205. })
  1206. if (index !== -1) {
  1207. chart_option5_data.data2[index].value = ZhCalc.add(chart_option5_data.data2[index].value, (t.total_price ? t.total_price : 0));
  1208. }
  1209. }
  1210. }
  1211. for (const cc3 of chart_category_data.data3) {
  1212. const sameObject = _.intersectionWith(t.category, cc3, _.isEqual);
  1213. if(sameObject.length === 3) {
  1214. const index = _.findIndex(chart_category_data.data3, function (item) {
  1215. return _.isEqual(item, sameObject);
  1216. })
  1217. if (index !== -1) {
  1218. chart_option5_data.data3[index].value = ZhCalc.add(chart_option5_data.data3[index].value, (t.total_price ? t.total_price : 0));
  1219. }
  1220. }
  1221. }
  1222. }
  1223. }
  1224. const option5 = myChart5.getOption();
  1225. option5.series[0].data = chart_option5_data.data1;
  1226. option5.series[1].data = chart_option5_data.data2;
  1227. option5.series[2].data = chart_option5_data.data3;
  1228. myChart5.setOption(option5);
  1229. // const selectCategory = {
  1230. // cid: category && category[0].value ? category[0].id : ,
  1231. // }
  1232. // const categoryName =
  1233. setData(tenders, 0);
  1234. })
  1235. function calculateTender(tender) {
  1236. if (tender.lastStage) {
  1237. tender.gather_tp = ZhCalc.add(tender.lastStage.contract_tp, tender.lastStage.qc_tp);
  1238. tender.end_contract_tp = ZhCalc.add(tender.lastStage.pre_contract_tp, tender.lastStage.contract_tp);
  1239. tender.end_qc_tp = ZhCalc.add(tender.lastStage.pre_qc_tp, tender.lastStage.qc_tp);
  1240. tender.end_gather_tp = ZhCalc.add(tender.end_contract_tp, tender.end_qc_tp);
  1241. tender.pre_gather_tp = ZhCalc.add(tender.lastStage.pre_contract_tp, tender.lastStage.pre_qc_tp);
  1242. tender.yf_tp = ZhCalc.add(tender.lastStage.yf_tp);
  1243. tender.end_yf_tp = ZhCalc.add(tender.lastStage.pre_yf_tp, tender.yf_tp);
  1244. }
  1245. }
  1246. function setData(tenderList, categoryIndex = 0) {
  1247. let total_price = 0;
  1248. let total_change_price = 0;
  1249. let total_stage_price = 0;
  1250. let total_advance_price = 0;
  1251. let total_material_price = 0;
  1252. let month_stage_num = 0;
  1253. let month_change_num = 0;
  1254. let month_revise_num = 0;
  1255. let month_material_num = 0;
  1256. let html = '';
  1257. const chart_option_name = [];
  1258. const chart_option2_data = {
  1259. total_price: [],
  1260. contract_tp:[],
  1261. qc_tp:[],
  1262. };
  1263. const chart_option3_data = [];
  1264. const chart_option1_data = [];
  1265. let option1_is_tender = false;
  1266. const chart_category_data = [];
  1267. if (category && category.length > 0 && category[categoryIndex] && category[categoryIndex].value.length > 0) {
  1268. for (const c of category[categoryIndex].value) {
  1269. chart_category_data.push({
  1270. cid: category[categoryIndex].id,
  1271. value: c.id,
  1272. });
  1273. chart_option1_data.push({
  1274. value: 0,
  1275. name: c.value,
  1276. });
  1277. }
  1278. } else {
  1279. option1_is_tender = true;
  1280. }
  1281. const chart_option4_data = [];
  1282. for(const t of tenderList) {
  1283. total_price = ZhCalc.add(total_price, t.total_price);
  1284. total_change_price = ZhCalc.add(total_change_price, t.end_qc_tp);
  1285. total_stage_price = ZhCalc.add(total_stage_price, t.end_gather_tp);
  1286. total_material_price = ZhCalc.add(total_material_price, t.material_tp);
  1287. total_advance_price = ZhCalc.add(total_advance_price, t.advance_tp);
  1288. month_stage_num = ZhCalc.add(month_stage_num, t.month_stage_num);
  1289. month_change_num = ZhCalc.add(month_change_num, t.month_change_num);
  1290. month_revise_num = ZhCalc.add(month_revise_num, t.month_revise_num);
  1291. month_material_num = ZhCalc.add(month_material_num, t.month_material_num);
  1292. html += '<tr>\n' +
  1293. ' <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' +
  1294. ' <td>第'+ (t.lastStage ? t.lastStage.order : 0) +'期</td>\n' +
  1295. ' <td>'+ (t.total_price ? t.total_price : 0) +'</td>\n' +
  1296. ' <td>'+ (t.gather_tp ? t.gather_tp : 0) +'</td>\n' +
  1297. ' <td>'+ (t.end_gather_tp ? t.end_gather_tp : 0) +'</td>\n' +
  1298. ' <td>'+ (t.yf_tp ? t.yf_tp : 0) +'</td>\n' +
  1299. ' <td>'+ (t.end_yf_tp ? t.end_yf_tp : 0) +'</td>\n' +
  1300. ' </tr>\n';
  1301. chart_option_name.push(t.name);
  1302. chart_option2_data.total_price.push(t.total_price ? t.total_price : 0);
  1303. chart_option2_data.contract_tp.push(t.end_contract_tp ? t.end_contract_tp : 0);
  1304. chart_option2_data.qc_tp.push(t.end_qc_tp ? t.end_qc_tp : 0);
  1305. const rate = ZhCalc.mul(ZhCalc.div(ZhCalc.add(t.pre_gather_tp, t.gather_tp), t.total_price, 2), 100, 0);
  1306. chart_option3_data.push(rate ? rate : '');
  1307. if (option1_is_tender) {
  1308. chart_option1_data.push({ value: t.total_price ? t.total_price : 0, name: t.name});
  1309. } else {
  1310. const sameObject = _.intersectionWith(t.category, chart_category_data, _.isEqual);
  1311. const index = sameObject[0] ? _.findIndex(chart_category_data, { cid: sameObject[0].cid, value: sameObject[0].value }) : -1;
  1312. if (index !== -1) {
  1313. chart_option1_data[index].value = ZhCalc.add(chart_option1_data[index].value, (t.total_price ? t.total_price : 0));
  1314. }
  1315. }
  1316. for (const s of t.month_stage) {
  1317. const index = _.findIndex(chart_option4_data, { yearmonth: s.yearmonth });
  1318. if (index === -1) {
  1319. chart_option4_data.push({
  1320. yearmonth: s.yearmonth,
  1321. tp: s.tp,
  1322. end_tp: s.end_tp,
  1323. })
  1324. // chart_option4_data.yearmonth.push(s.yearmonth);
  1325. // chart_option4_data.tp.push(s.tp);
  1326. // chart_option4_data.end_tp.push(s.end_tp);
  1327. } else {
  1328. // chart_option4_data.tp[index].tp = ZhCalc.add(chart_option4_data.tp[index].tp, s.tp);
  1329. // chart_option4_data.tp[index].end_tp = ZhCalc.add(chart_option4_data.tp[index].end_tp, s.end_tp);
  1330. chart_option4_data[index].tp = ZhCalc.add(chart_option4_data[index].tp, s.tp);
  1331. chart_option4_data[index].end_tp = ZhCalc.add(chart_option4_data[index].end_tp, s.end_tp);
  1332. }
  1333. }
  1334. }
  1335. console.log(tenderList);
  1336. $('.data_tender_num').text(tenderList.length);
  1337. const rate = total_price ? ZhCalc.round(ZhCalc.div(total_stage_price, total_price) * 100, 2) : 0;
  1338. $('.data_tender_rate').text(rate ? rate + '%' : '0%');
  1339. $('.data_total_price').text(formatMoney(total_price));
  1340. $('.data_total_change_price').text(formatMoney(total_change_price));
  1341. $('.data_total_stage_price').text(formatMoney(total_stage_price));
  1342. $('.data_total_advance_price').text(formatMoney(total_advance_price));
  1343. $('.data_total_material_price').text(formatMoney(total_material_price));
  1344. $('.month_stage_num').text(month_stage_num);
  1345. $('.month_change_num').text(month_change_num);
  1346. $('.month_revise_num').text(month_revise_num);
  1347. $('.month_material_num').text(month_material_num);
  1348. // 滚动数据
  1349. $('#stage-data').html(html);
  1350. // if (originDataCollect === 1 || originDataCollect === 2) {
  1351. tableScroll('tableId', '100%', 30, 7);
  1352. // }
  1353. $('[data-toggle="tooltip"]').tooltip();
  1354. // 图表数据赋值
  1355. const option2 = myChart2_1.getOption();
  1356. option2.dataZoom[0].end = computedPosition(tenderList.length);
  1357. option2.xAxis[0].data = chart_option_name;
  1358. option2.series[0].data = chart_option2_data.total_price;
  1359. option2.series[1].data = chart_option2_data.contract_tp;
  1360. option2.series[2].data = chart_option2_data.qc_tp;
  1361. option2.series[2].data = chart_option2_data.qc_tp;
  1362. if (tenderList.length >= 8) {
  1363. option2.dataZoom[0].show = true;
  1364. } else {
  1365. option2.dataZoom[0].show = false;
  1366. }
  1367. myChart2_1.setOption(option2);
  1368. myChart2_2.setOption(option2);
  1369. myChart2_3.setOption(option2);
  1370. const option3 = myChart3_1.getOption();
  1371. option3.dataZoom[0].end = computedPosition(tenderList.length);
  1372. option3.yAxis[0].data = chart_option_name;
  1373. option3.series[0].data = chart_option3_data;
  1374. if (tenderList.length >= 8) {
  1375. option3.dataZoom[0].show = true;
  1376. // option3.dataZoom[0].bottom = '10%';
  1377. // option3.grid.bottom = '15%';
  1378. } else {
  1379. option3.dataZoom[0].show = false;
  1380. // option3.dataZoom[0].bottom = '0%';
  1381. // option3.grid.bottom = '3%';
  1382. }
  1383. myChart3_1.setOption(option3);
  1384. myChart3_2.setOption(option3);
  1385. const option1 = myChart1.getOption();
  1386. option1.series[0].data = chart_option1_data;
  1387. myChart1.setOption(option1);
  1388. const option4_data = {
  1389. yearmonth: [],
  1390. tp: [],
  1391. end_tp: [],
  1392. }
  1393. if (chart_option4_data.length > 0) {
  1394. // chart_option4_data 排序
  1395. const new_chart_option4_data = _.sortBy(chart_option4_data, 'yearmonth');
  1396. for (const [i,c4] of new_chart_option4_data.entries()) {
  1397. option4_data.yearmonth.push(c4.yearmonth);
  1398. option4_data.tp.push(c4.tp);
  1399. if(i !== 0) {
  1400. option4_data.end_tp.push(ZhCalc.add(c4.end_tp, option4_data.end_tp[i-1]));
  1401. } else {
  1402. option4_data.end_tp.push(c4.end_tp);
  1403. }
  1404. }
  1405. }
  1406. const option4 = myChart4_1.getOption();
  1407. option4.dataZoom[0].end = computedPosition(option4_data.yearmonth.length);
  1408. option4.xAxis[0].data = option4_data.yearmonth;
  1409. option4.series[0].data = option4_data.tp;
  1410. option4.series[1].data = option4_data.end_tp;
  1411. if (option4_data.yearmonth.length >= 8) {
  1412. option4.dataZoom[0].show = true;
  1413. // option4.dataZoom[0].bottom = '10%';
  1414. // option4.grid.bottom = '15%';
  1415. } else {
  1416. option4.dataZoom[0].show = false;
  1417. // option4.dataZoom[0].bottom = '0%';
  1418. // option4.grid.bottom = '3%';
  1419. }
  1420. myChart4_1.setOption(option4);
  1421. myChart4_2.setOption(option4);
  1422. // 地图设置
  1423. // const polyLineList = [];
  1424. // const centerPoint = { lng: mapJson.lng, lat: mapJson.lat };
  1425. // let level = mapJson.level;
  1426. // // 初始化地图,设置中心点坐标和地图级别
  1427. // const point = new BMapGL.Point(centerPoint.lng, centerPoint.lat);
  1428. // // 创建地图实例
  1429. // map1.centerAndZoom(point, level);
  1430. // // 创建地图实例
  1431. // map2.centerAndZoom(point, level);
  1432. // map1.reset();
  1433. // map2.reset();
  1434. }
  1435. $('.change-collect').on('click', function () {
  1436. const num = parseInt($(this).data('collect'));
  1437. $('#zhankai span').text(num);
  1438. if (num === 1 || num === 3) {
  1439. $('.flex-content[data-content="1"]').show();
  1440. $('.flex-content[data-content="2"]').hide();
  1441. if (originDataCollect !== 1 && originDataCollect !== 3) {
  1442. tableScroll('tableId', '100%', 30, 7);
  1443. }
  1444. if (num === 3) {
  1445. $('.jlchart[data-chart-num="1"]').hide();
  1446. $('.jlchart[data-chart-num="1"]').siblings().show();
  1447. $('.jlchart[data-chart-num="2"]').show();
  1448. $('.jlchart[data-chart-num="2"]').siblings().hide();
  1449. } else {
  1450. $('.jlchart[data-chart-num="1"]').show();
  1451. $('.jlchart[data-chart-num="1"]').siblings().hide();
  1452. $('.jlchart[data-chart-num="2"]').hide();
  1453. $('.jlchart[data-chart-num="2"]').siblings().show();
  1454. }
  1455. // roll(50);
  1456. } else {
  1457. $('.flex-content[data-content="2"]').show();
  1458. $('.flex-content[data-content="1"]').hide();
  1459. // roll2(50);
  1460. if (num === 4) {
  1461. $('.jldbchart[data-chart-num="2"]').hide();
  1462. $('.jldbchart[data-chart-num="2"]').siblings().show();
  1463. } else {
  1464. $('.jldbchart[data-chart-num="2"]').show();
  1465. $('.jldbchart[data-chart-num="2"]').siblings().hide();
  1466. }
  1467. }
  1468. echartsReset();
  1469. });
  1470. // 第一层分类选择
  1471. $("body").on('click', '#first-category .select-cate', function () {
  1472. const id = $(this).data('value');
  1473. $(this).parents('.dropdown-menu').siblings('button').text($(this).text());
  1474. let newTenderList = tenders;
  1475. let categoryIndex = 0;
  1476. if (!id) {
  1477. $('#second-category').hide();
  1478. $('#third-category').hide();
  1479. $('#first-category').children('button').attr('data-cid', '').attr('data-value', '');
  1480. } else {
  1481. if (category[1] && category[1].value.length > 0) {
  1482. $('#second-category').show();
  1483. $('#third-category').hide();
  1484. $('#second-category').children('button').text('全部').attr('data-cid', '').attr('data-value', '');
  1485. }
  1486. // 获取第一层已选类别
  1487. const firstCategory = { cid: parseInt($(this).data('cid')), value: parseInt(id) };
  1488. $('#first-category').children('button').attr('data-cid', $(this).data('cid')).attr('data-value', id);
  1489. newTenderList = _.filter(tenders, function (item) {
  1490. return _.findIndex(item.category, firstCategory) !== -1;
  1491. })
  1492. categoryIndex = 1;
  1493. // categoryList.push(firstCategory);
  1494. }
  1495. setData(newTenderList, categoryIndex);
  1496. // 获取新的tenderList及categoryList
  1497. });
  1498. // 第二层分类选择
  1499. $("body").on('click', '#second-category .select-cate', function () {
  1500. const id = $(this).data('value');
  1501. // 获取第一层已选类别
  1502. const first_cid = $('#first-category').children('button').attr('data-cid');
  1503. const first_value = $('#first-category').children('button').attr('data-value');
  1504. const firstCategory = { cid: parseInt(first_cid), value: parseInt(first_value) };
  1505. let newTenderList = _.filter(tenders, function (item) {
  1506. return _.findIndex(item.category, firstCategory) !== -1;
  1507. });
  1508. // let categoryList = [firstCategory];
  1509. let categoryIndex = 1;
  1510. $(this).parents('.dropdown-menu').siblings('button').text($(this).text());
  1511. if (!id) {
  1512. $('#third-category').hide();
  1513. } else {
  1514. if (category[2] && category[2].value.length > 0) {
  1515. $('#third-category').show();
  1516. $('#third-category').children('button').text('全部').attr('data-cid', '').attr('data-value', '');
  1517. }
  1518. // 获取第二层已选类别
  1519. const secondCategory = { cid: parseInt($(this).data('cid')), value: parseInt(id) };
  1520. $('#second-category').children('button').attr('data-cid', $(this).data('cid')).attr('data-value', id);
  1521. newTenderList = _.filter(newTenderList, function (item) {
  1522. return _.findIndex(item.category, secondCategory) !== -1;
  1523. });
  1524. categoryIndex = 2;
  1525. // categoryList.push(secondCategory);
  1526. }
  1527. setData(newTenderList, categoryIndex);
  1528. // 获取新的tenderList及categoryList
  1529. });
  1530. // 第三层分类选择(至多三层)
  1531. $("body").on('click', '#third-category .select-cate', function () {
  1532. const id = $(this).data('value');
  1533. // 获取第一层已选类别
  1534. const first_cid = $('#first-category').children('button').attr('data-cid');
  1535. const first_value = $('#first-category').children('button').attr('data-value');
  1536. const firstCategory = { cid: parseInt(first_cid), value: parseInt(first_value) };
  1537. let newTenderList = _.filter(tenders, function (item) {
  1538. return _.findIndex(item.category, firstCategory) !== -1;
  1539. });
  1540. // 获取第二层已选类别
  1541. const second_cid = $('#second-category').children('button').attr('data-cid');
  1542. const second_value = $('#second-category').children('button').attr('data-value');
  1543. const secondCategory = { cid: parseInt(second_cid), value: parseInt(second_value) };
  1544. newTenderList = _.filter(newTenderList, function (item) {
  1545. return _.findIndex(item.category, secondCategory) !== -1;
  1546. });
  1547. // let categoryList = [firstCategory, secondCategory];
  1548. let categoryIndex = 2;
  1549. $(this).parents('.dropdown-menu').siblings('button').text($(this).text());
  1550. if (!id) {
  1551. $('#third-category').children('button').text('全部').attr('data-cid', '').attr('data-value', '');
  1552. } else {
  1553. $('#third-category').children('button').attr('data-cid', $(this).data('cid')).attr('data-value', id);
  1554. categoryIndex = 3;
  1555. const third_cid = $('#third-category').children('button').attr('data-cid');
  1556. const third_value = $('#third-category').children('button').attr('data-value');
  1557. const thirdCategory = { cid: parseInt(third_cid), value: parseInt(third_value) };
  1558. newTenderList = _.filter(newTenderList, function (item) {
  1559. return _.findIndex(item.category, thirdCategory) !== -1;
  1560. });
  1561. // categoryList.push({ cid: parseInt($(this).data('cid')), value: parseInt($(this).data('value')) });
  1562. }
  1563. setData(newTenderList, categoryIndex);
  1564. // 获取新的tenderList及categoryList
  1565. })
  1566. })
  1567. function formatMoney(s, dot = ',', decimal = 2) {
  1568. if (!s) {
  1569. s = 0;
  1570. return s.toFixed(decimal);
  1571. }
  1572. s = parseFloat((s + '').replace(/[^\d\.-]/g, '')).toFixed(decimal) + '';
  1573. if (!decimal) {
  1574. s += '.';
  1575. }
  1576. const l = s.split('.')[0].split('').reverse(),
  1577. r = s.split('.')[1];
  1578. let t = '';
  1579. for (let i = 0; i < l.length; i++) {
  1580. t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? dot : '');
  1581. }
  1582. const num = t.split('').reverse().join('') + (decimal === 0 ? '' : '.' + r);
  1583. return num.replace('-,', '-');
  1584. }
  1585. // 计算显示滚动条长度
  1586. function computedPosition(xArrayLength) {
  1587. if (xArrayLength >= 8) {
  1588. return Math.floor(8 / xArrayLength * 100) > 100 ? 100 : Math.floor(8 / xArrayLength * 100);
  1589. // return length <= 10 ? 35 : 100 - Math.floor(35 / length * 100);
  1590. } else {
  1591. return 100;
  1592. }
  1593. }
  1594. </script>