index.ejs 101 KB

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