xaj_data.js 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924
  1. var jyzf = ['AH_SL_YL', 'ZJ_SL_YL', 'AH_SL_ZF'];
  2. var jl = ['TBA_SW_XAJ', 'AH_SL_JL', 'ZJ_SL_JL'];
  3. var slgc = ['DW_XAJ_ST', 'FD_XAJ', 'HS_SK_XAJ', 'CA_SK_XAJ'];
  4. var qsh = ['AH_SL_WIU', 'ZJ_SL_WIU'];
  5. var gxdata = {
  6. init: function (table, $, layer, form) {
  7. form.on('select(xaj-sel-unit)', function (data) {
  8. var selIndex = data.elem.selectedIndex;
  9. var selunit = data.elem[data.elem.selectedIndex].getAttribute("id");
  10. $('.tba-unit-button').hide();
  11. $('#' + selunit + '-buttons').show();
  12. var bizCode = "TBA_SW_XAJ";
  13. var tp = "0";
  14. //水文数据范围:太湖流域管理局
  15. if (selIndex == 0) {
  16. bizCode = "TBA_SW_XAJ";
  17. } else if (selIndex == 1) {
  18. //安徽省水利厅
  19. bizCode = 'AH_SL_YL';
  20. } else if (selIndex == 2) {
  21. //浙江省水利厅
  22. bizCode = 'ZJ_SL_YL';
  23. } else if (selIndex == 3) {
  24. //国家电网有限公司华东分部
  25. bizCode = 'DW_XAJ_ST';
  26. } else if (selIndex == 4) {
  27. //新安江水力发电厂
  28. bizCode = 'FD_XAJ';
  29. } else if (selIndex == 5) {
  30. //黄山市水利局
  31. bizCode = 'HS_SK_XAJ';
  32. } else if (selIndex == 6) {
  33. //淳安县水利水电局
  34. bizCode = 'CA_SK_XAJ';
  35. } else if (selIndex == 7) {
  36. //各地区政府
  37. bizCode = 'GDP_XAJ';
  38. } else {
  39. //新安江流域
  40. bizCode = 'DRP';
  41. tp = "DRP";
  42. }
  43. window.location.href = ctx + "web/xaj-data.html?page=" + pageParam + "&bizCode=" + bizCode + "&unit=" + selunit + "&tp=" + tp;
  44. });
  45. form.on('select(xaj-sel-tp)', function (data) {
  46. let bizCode = data.value;
  47. window.location.href = ctx + "web/xaj-data.html?page=" + pageParam + "&bizCode=" + bizCode + "&unit=all_xaj" + "&tp=" + bizCode;
  48. });
  49. $(document).on('click', '.tba-btn', function () {
  50. var bizCodeParam = $(this).attr("id");
  51. window.location.href = ctx + "web/xaj-data.html?page=" + pageParam + "&bizCode=" + bizCodeParam + "&unit=" + unitParam + "&tp=0";
  52. return false;
  53. });
  54. $("#szSearchBtn").click(function () {
  55. table.reload('rtuDataGrid', {
  56. where: {
  57. startTime: $("#startTime").val(),
  58. endTime: $("#endTime").val(),
  59. } //设定异步数据接口的额外参数
  60. });
  61. })
  62. $("#szSearchBtn1").click(function () {
  63. table.reload('rtuDataGrid1', {
  64. where: {
  65. startTime: $("#startTime1").val(),
  66. endTime: $("#endTime1").val(),
  67. } //设定异步数据接口的额外参数
  68. });
  69. })
  70. },
  71. format0data: function (rows) {
  72. if (rows && Array.isArray(rows)) {
  73. for (var i = 0; i < rows.length; i++) {
  74. var row = rows[i];
  75. for (var key in row) {
  76. if (row[key] != null) {
  77. if (key == 'drp' || key == 'dyp' || key == 'q' || key == 'inq' || key == 'outq' || key == 'z' || key == 'dwz') {
  78. row[key] = Number(row[key]).toFixed(1);
  79. }
  80. if (key == 'peoCitySum' || key == 'peoCountySum' || key == 'pepSum' || key == 'peoRadio' || key == 'gdpSum'
  81. || key == 'insduAdd' || key == 'gdArea') {
  82. row[key] = Number(row[key]).toFixed(2);
  83. }
  84. if (key == 'w' || key == 'ww') {
  85. row[key] = Number(row[key]).toFixed(3);
  86. }
  87. }
  88. // if ((typeof row[key]) == "string") {
  89. // var fVal = parseFloat(row[key]);
  90. // if (fVal && fVal < 1 && fVal >= 0) {
  91. // if (row[key].substr(0, 1) != "0") {
  92. // row[key] = "0" + row[key];
  93. // }
  94. // }
  95. // }
  96. }
  97. }
  98. }
  99. return rows;
  100. },
  101. getDataDefine: function (bizCode) {
  102. switch (bizCode) {
  103. case 'DRP':
  104. return {
  105. newestDataUrl: ctx + 'gx/xaj/newest?tp=' + bizCode,
  106. listDataUrl: ctx + 'gx/xaj/list?tp=' + bizCode,
  107. downloadUrl: ctx + 'gx/sw/gcdd/download?tp=' + bizCode,
  108. timeBetween: 1,
  109. layuiTable: [
  110. {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 100, templet: '#xuhao'}
  111. , {field: 'stnm', title: '断面名称', fixed: 'left', align: 'center', width: 200}
  112. , {field: 'tm', title: '时间', align: 'center', fixed: 'left', width: 200, templet: '#timeTpl'}
  113. , {field: 'drp', title: '降雨量(mm)', align: 'center', width: 150,}
  114. , {field: 'prov', title: '省份', align: 'center', width: 150}
  115. , {field: 'city', title: '城市', align: 'center', width: 150}
  116. , {field: 'county', title: '县级市', align: 'center', width: 150}
  117. ],
  118. chartTable: [
  119. {field: 'tm', title: '时间', align: 'center', sort: true, width: 200}
  120. , {field: 'drp', title: '降雨量(mm)', align: 'center', width: 150, templet: '#UPZTpl'}
  121. ],
  122. chart: {
  123. title: '水文监测',
  124. xCategory: 'tm',
  125. yAxis: ["mm"],
  126. series: [
  127. {
  128. name: '降雨量',
  129. field: 'drp',
  130. type: 'bar',
  131. color: "#5793F3",
  132. yAxisIndex: 0,
  133. selected: true
  134. },
  135. ]
  136. }
  137. }
  138. break;
  139. case 'ZZ':
  140. return {
  141. newestDataUrl: ctx + 'gx/xaj/newest?tp=' + bizCode,
  142. listDataUrl: ctx + 'gx/xaj/list?tp=' + bizCode,
  143. downloadUrl: ctx + 'gx/sw/gcdd/download?tp=' + bizCode,
  144. timeBetween: 1,
  145. layuiTable: [
  146. {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 100, templet: '#xuhao'}
  147. , {field: 'stnm', title: '断面名称', fixed: 'left', align: 'center', width: 200}
  148. , {field: 'tm', title: '时间', align: 'center', fixed: 'left', width: 200, templet: '#timeTpl'}
  149. , {field: 'z', title: '水位(m)', align: 'center', width: 200}
  150. , {field: 'q', title: '径流量(m³/s)', align: 'center', width: 200,}
  151. , {field: 'prov', title: '省份', align: 'center', width: 150}
  152. , {field: 'city', title: '城市', align: 'center', width: 150}
  153. , {field: 'county', title: '县级市', align: 'center', width: 150}
  154. ],
  155. chartTable: [
  156. {field: 'tm', title: '时间', align: 'center', sort: true, width: 200, templet: '#timeTpl'}
  157. , {field: 'z', title: '水位(m)', align: 'center', width: 200}
  158. , {field: 'q', title: '径流量(m³/s)', align: 'center', width: 200}
  159. ],
  160. chart: {
  161. title: '水文监测',
  162. xCategory: 'tm',
  163. yAxis: ["m", "m³/s"],
  164. series: [
  165. {name: '水位', field: 'z', type: "line", color: "#49af4d", yAxisIndex: 0, selected: true},
  166. {name: '径流量', field: 'q', type: 'bar', color: "#5793F3", yAxisIndex: 1, selected: true},
  167. ]
  168. }
  169. }
  170. break;
  171. case 'DYP':
  172. return {
  173. newestDataUrl: ctx + 'gx/xaj/newest?tp=' + bizCode,
  174. listDataUrl: ctx + 'gx/xaj/list?tp=' + bizCode,
  175. downloadUrl: ctx + 'gx/sw/gcdd/download?tp=' + bizCode,
  176. timeBetween: 1,
  177. layuiTable: [
  178. {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 100, templet: '#xuhao'}
  179. , {field: 'stnm', title: '断面名称', fixed: 'left', align: 'center', width: 200}
  180. , {field: 'tm', title: '时间', align: 'center', fixed: 'left', width: 200, templet: '#timeTpl'}
  181. , {field: 'dyp', title: '蒸发量(mm)', align: 'center', width: 300,}
  182. , {field: 'prov', title: '省份', align: 'center', width: 150}
  183. , {field: 'city', title: '城市', align: 'center', width: 150}
  184. , {field: 'county', title: '县级市', align: 'center', width: 150}
  185. ],
  186. chartTable: [
  187. {field: 'tm', title: '时间', align: 'center', sort: true, width: 200, templet: '#timeTpl'}
  188. , {field: 'dyp', title: '蒸发量(mm)', align: 'center', width: 150, templet: '#UPZTpl'}
  189. ],
  190. chart: {
  191. title: '水文监测',
  192. xCategory: 'tm',
  193. yAxis: ["mm"],
  194. series: [
  195. {
  196. name: '蒸发量',
  197. field: 'dyp',
  198. type: 'bar',
  199. color: "#5793F3",
  200. yAxisIndex: 0,
  201. selected: true
  202. },
  203. ]
  204. }
  205. }
  206. break;
  207. case 'WIU':
  208. return {
  209. newestDataUrl: ctx + 'gx/xaj/newest?tp=' + bizCode,
  210. listDataUrl: ctx + 'gx/xaj/list?tp=' + bizCode,
  211. downloadUrl: ctx + 'gx/sw/gcdd/download?tp=' + bizCode,
  212. timeBetween: 1,
  213. layuiTable: [
  214. {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 100, templet: '#xuhao'}
  215. , {field: 'stnm', title: '取用水户名称', fixed: 'left', align: 'center', width: 450}
  216. , {field: 'uscc', title: '社会信用代码', align: 'center', width: 300}
  217. , {field: 'tradTp', title: '取水户类型', align: 'center', width: 120}
  218. , {field: 'prov', title: '省份', align: 'center', width: 120}
  219. , {field: 'city', title: '城市', align: 'center', width: 120}
  220. , {field: 'county', title: '县级市', align: 'center', width: 120}
  221. ],
  222. }
  223. break;
  224. // case 'SK':
  225. // return {
  226. // newestDataUrl: ctx + 'gx/xaj/skswList?tp=' + bizCode,
  227. // listDataUrl: ctx + 'gx/xaj/skswList?tp=' + bizCode,
  228. // downloadUrl: ctx + 'gx/xaj/skswList?tp=' + bizCode,
  229. // timeBetween: 1,
  230. // layuiTable: [
  231. // {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 100, templet: '#xuhao'}
  232. // , {field: 'stnm', title: '站点名称', fixed: 'left', align: 'center', width: 250}
  233. // , {field: 'tm', title: '时间', fixed: 'left', align: 'center', width: 250}
  234. // , {field: 'z', title: '水位', align: 'center', width: 200}
  235. // , {field: 'w', title: '蓄水量(万m³)', align: 'center', width: 200}
  236. // ],
  237. // chartTable: [
  238. // {field: 'tm', title: '时间', align: 'center', width: 150}
  239. // , {field: 'z', title: '水位', align: 'center', width: 150}
  240. // , {field: 'w', title: '蓄水量(万m³)', align: 'center', width: 150}
  241. // ],
  242. // chart: {
  243. // title: '水库蓄水变化过程图',
  244. // xCategory: 'tm',
  245. // yAxis: ["m", "万m³"],
  246. // series: [
  247. // {
  248. // name: '水位',
  249. // field: 'z',
  250. // type: 'line',
  251. // color: "#3adbe0",
  252. // yAxisIndex: 0,
  253. // selected: true
  254. // },
  255. // {
  256. // name: '蓄水量',
  257. // field: 'w',
  258. // type: 'bar',
  259. // color: "#5793F3",
  260. // yAxisIndex: 1,
  261. // selected: true
  262. // }
  263. // ]
  264. // }
  265. // }
  266. // break;
  267. case 'TBA_SW_XAJ':
  268. return {
  269. newestDataUrl: ctx + 'gx/xaj/newest?bizCode=' + bizCode,
  270. listDataUrl: ctx + 'gx/xaj/list?bizCode=' + bizCode,
  271. downloadUrl: ctx + 'gx/sw/gcdd/download?bizCode=' + bizCode,
  272. timeBetween: 1,
  273. layuiTable: [
  274. {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 100, templet: '#xuhao'}
  275. , {field: 'stnm', title: '断面名称', fixed: 'left', align: 'center', width: 200}
  276. , {field: 'tm', title: '时间', align: 'center', fixed: 'left', width: 200, templet: '#timeTpl'}
  277. , {field: 'q', title: '下泄流量(m³/s)', align: 'center', width: 200,}
  278. , {field: 'gurdinfo', title: '保障情况', align: 'center', width: 500}
  279. ],
  280. chartTable: [
  281. {field: 'tm', title: '时间', align: 'center', sort: true, width: 200, templet: '#timeTpl'}
  282. , {field: 'q', title: '下泄流量(m³/s)', align: 'center', width: 150, templet: '#UPZTpl'}
  283. ],
  284. chart: {
  285. title: '水文监测',
  286. xCategory: 'tm',
  287. yAxis: ["m³/s"],
  288. series: [
  289. {name: '下泄流量', field: 'q', type: 'bar', color: "#5793F3", selected: true},
  290. ]
  291. }
  292. }
  293. break;
  294. case 'AH_SL_JL':
  295. case 'ZJ_SL_JL':
  296. return {
  297. newestDataUrl: ctx + 'gx/xaj/newest?bizCode=' + bizCode,
  298. listDataUrl: ctx + 'gx/xaj/list?bizCode=' + bizCode,
  299. downloadUrl: ctx + 'gx/sw/gcdd/download?bizCode=' + bizCode,
  300. timeBetween: 1,
  301. layuiTable: [
  302. {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 100, templet: '#xuhao'}
  303. , {field: 'stnm', title: '断面名称', fixed: 'left', align: 'center', width: 200}
  304. , {field: 'tm', title: '时间', align: 'center', fixed: 'left', width: 200, templet: '#timeTpl'}
  305. , {field: 'z', title: '水位(m)', align: 'center', width: 200}
  306. , {field: 'q', title: '径流量(m³/s)', align: 'center', width: 200,}
  307. , {field: 'prov', title: '省份', align: 'center', width: 150}
  308. , {field: 'city', title: '城市', align: 'center', width: 150}
  309. , {field: 'county', title: '县级市', align: 'center', width: 150}
  310. ],
  311. chartTable: [
  312. {field: 'tm', title: '时间', align: 'center', sort: true, width: 200, templet: '#timeTpl'}
  313. , {field: 'z', title: '水位(m)', align: 'center', width: 200}
  314. , {field: 'q', title: '径流量(m³/s)', align: 'center', width: 200}
  315. ],
  316. chart: {
  317. title: '水文监测',
  318. xCategory: 'tm',
  319. yAxis: ["m", "m³/s"],
  320. series: [
  321. {name: '水位', field: 'z', type: "line", color: "#49af4d", yAxisIndex: 0, selected: true},
  322. {name: '径流量', field: 'q', type: 'bar', color: "#5793F3", yAxisIndex: 1, selected: true},
  323. ]
  324. }
  325. }
  326. break;
  327. case 'AH_SL_YL':
  328. case 'ZJ_SL_YL':
  329. return {
  330. newestDataUrl: ctx + 'gx/xaj/newest?bizCode=' + bizCode,
  331. listDataUrl: ctx + 'gx/xaj/list?bizCode=' + bizCode,
  332. downloadUrl: ctx + 'gx/sw/gcdd/download?bizCode=' + bizCode,
  333. timeBetween: 1,
  334. layuiTable: [
  335. {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 100, templet: '#xuhao'}
  336. , {field: 'stnm', title: '断面名称', fixed: 'left', align: 'center', width: 200}
  337. , {field: 'tm', title: '时间', align: 'center', fixed: 'left', width: 200, templet: '#timeTpl'}
  338. , {field: 'drp', title: '降雨量(mm)', align: 'center', width: 150,}
  339. , {field: 'prov', title: '省份', align: 'center', width: 150}
  340. , {field: 'city', title: '城市', align: 'center', width: 150}
  341. , {field: 'county', title: '县级市', align: 'center', width: 150}
  342. ],
  343. chartTable: [
  344. {field: 'tm', title: '时间', align: 'center', sort: true, width: 200}
  345. , {field: 'drp', title: '降雨量(mm)', align: 'center', width: 150, templet: '#UPZTpl'}
  346. ],
  347. chart: {
  348. title: '水文监测',
  349. xCategory: 'tm',
  350. yAxis: ["mm"],
  351. series: [
  352. {
  353. name: '降雨量',
  354. field: 'drp',
  355. type: 'bar',
  356. color: "#5793F3",
  357. yAxisIndex: 0,
  358. selected: true
  359. },
  360. ]
  361. }
  362. }
  363. break;
  364. case 'AH_SL_ZF':
  365. return {
  366. newestDataUrl: ctx + 'gx/xaj/newest?bizCode=' + bizCode,
  367. listDataUrl: ctx + 'gx/xaj/list?bizCode=' + bizCode,
  368. downloadUrl: ctx + 'gx/sw/gcdd/download?bizCode=' + bizCode,
  369. timeBetween: 1,
  370. layuiTable: [
  371. {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 100, templet: '#xuhao'}
  372. , {field: 'stnm', title: '断面名称', fixed: 'left', align: 'center', width: 200}
  373. , {field: 'tm', title: '时间', align: 'center', fixed: 'left', width: 200, templet: '#timeTpl'}
  374. , {field: 'dyp', title: '蒸发量(mm)', align: 'center', width: 300,}
  375. , {field: 'prov', title: '省份', align: 'center', width: 150}
  376. , {field: 'city', title: '城市', align: 'center', width: 150}
  377. , {field: 'county', title: '县级市', align: 'center', width: 150}
  378. ],
  379. chartTable: [
  380. {field: 'tm', title: '时间', align: 'center', sort: true, width: 200, templet: '#timeTpl'}
  381. , {field: 'dyp', title: '蒸发量(mm)', align: 'center', width: 150, templet: '#UPZTpl'}
  382. ],
  383. chart: {
  384. title: '水文监测',
  385. xCategory: 'tm',
  386. yAxis: ["mm"],
  387. series: [
  388. {
  389. name: '蒸发量',
  390. field: 'dyp',
  391. type: 'bar',
  392. color: "#5793F3",
  393. yAxisIndex: 0,
  394. selected: true
  395. },
  396. ]
  397. }
  398. }
  399. break;
  400. case 'AH_SL_WIU':
  401. case 'ZJ_SL_WIU':
  402. return {
  403. newestDataUrl: ctx + 'gx/xaj/newest?bizCode=' + bizCode,
  404. listDataUrl: ctx + 'gx/xaj/list?bizCode=' + bizCode,
  405. downloadUrl: ctx + 'gx/sw/gcdd/download?bizCode=' + bizCode,
  406. timeBetween: 1,
  407. layuiTable: [
  408. {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 100, templet: '#xuhao'}
  409. , {field: 'stnm', title: '取用水户名称', fixed: 'left', align: 'center', width: 450}
  410. , {field: 'uscc', title: '社会信用代码', align: 'center', width: 300}
  411. , {field: 'tradTp', title: '取水户类型', align: 'center', width: 120}
  412. , {field: 'prov', title: '省份', align: 'center', width: 120}
  413. , {field: 'city', title: '城市', align: 'center', width: 120}
  414. , {field: 'county', title: '县级市', align: 'center', width: 120}
  415. ],
  416. }
  417. break;
  418. case 'DW_XAJ_ST':
  419. return {
  420. newestDataUrl: ctx + 'gx/xaj/newest?bizCode=' + bizCode,
  421. listDataUrl: ctx + 'gx/xaj/list?bizCode=' + bizCode,
  422. downloadUrl: ctx + 'gx/sw/gcdd/download?bizCode=' + bizCode,
  423. timeBetween: 1,
  424. layuiTable: [
  425. {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 100, templet: '#xuhao'}
  426. , {field: 'stnm', title: '站点名称', fixed: 'left', align: 'center', width: 250}
  427. , {
  428. field: 'tm',
  429. title: '时间',
  430. fixed: 'left',
  431. align: 'center',
  432. width: 150,
  433. templet: '#timeTpl'
  434. }
  435. , {field: 'z', title: '坝上水位(m)', align: 'center', width: 150}
  436. , {field: 'inq', title: '入库流量(m³/s)', align: 'center', width: 150}
  437. , {field: 'outq', title: '出库流量(m³/s)', align: 'center', width: 150}
  438. ],
  439. chartTable: [
  440. {field: 'tm', title: '时间', align: 'center', sort: true, width: 150, templet: '#timeTpl'}
  441. , {field: 'z', title: '坝上水位(m)', align: 'center', width: 150}
  442. , {field: 'inq', title: '入库流量(m³/s)', align: 'center', width: 150}
  443. , {field: 'outq', title: '出库流量(m³/s)', align: 'center', width: 150}
  444. ],
  445. chart: {
  446. title: '水文监测',
  447. xCategory: 'tm',
  448. yAxis: ["m", "m³/s"],
  449. series: [
  450. {
  451. name: '坝上水位',
  452. field: 'z',
  453. type: 'line',
  454. color: "#5793F3",
  455. yAxisIndex: 0,
  456. selected: true
  457. },
  458. {
  459. name: '入库流量',
  460. field: 'inq',
  461. type: 'bar',
  462. color: "#30AF30",
  463. yAxisIndex: 1,
  464. selected: true
  465. },
  466. {
  467. name: '出库流量',
  468. field: 'outq',
  469. type: 'bar',
  470. color: "#368BFF",
  471. yAxisIndex: 1,
  472. selected: true
  473. },
  474. ]
  475. }
  476. }
  477. break;
  478. case 'FD_XAJ':
  479. return {
  480. newestDataUrl: ctx + 'gx/xaj/newest?bizCode=' + bizCode,
  481. listDataUrl: ctx + 'gx/xaj/list?bizCode=' + bizCode,
  482. downloadUrl: ctx + 'gx/sw/gcdd/download?bizCode=' + bizCode,
  483. timeBetween: 1,
  484. layuiTable: [
  485. {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 100, templet: '#xuhao'}
  486. , {field: 'stnm', title: '站点名称', fixed: 'left', align: 'center', width: 250}
  487. , {
  488. field: 'tm',
  489. title: '时间',
  490. fixed: 'left',
  491. align: 'center',
  492. width: 200,
  493. templet: '#timeTpl'
  494. }
  495. , {field: 'z', title: '坝上水位(m)', align: 'center', width: 200}
  496. , {field: 'dwz', title: '坝下水位(m)', align: 'center', width: 200}
  497. , {field: 'inq', title: '入库流量(m³/s)', align: 'center', width: 200}
  498. , {field: 'outq', title: '出库流量(m³/s)', align: 'center', width: 200}
  499. ],
  500. chartTable: [
  501. {field: 'tm', title: '时间', align: 'center', sort: true, width: 150, templet: '#timeTpl'}
  502. , {field: 'inq', title: '入库流量(m³/s)', align: 'center', width: 150}
  503. , {field: 'outq', title: '出库流量(m³/s)', align: 'center', width: 150}
  504. , {field: 'z', title: '坝上水位(m)', align: 'center', width: 150}
  505. , {field: 'dwz', title: '坝下水位(m)', align: 'center', width: 150}
  506. ],
  507. chart: {
  508. title: '水文监测',
  509. xCategory: 'tm',
  510. yAxis: ["m", "m³/s"],
  511. series: [
  512. {
  513. name: '坝上水位',
  514. field: 'z',
  515. type: 'line',
  516. color: "#5793F3",
  517. yAxisIndex: 0,
  518. selected: true
  519. },
  520. {
  521. name: '坝下水位',
  522. field: 'dwz',
  523. type: 'line',
  524. color: "#4F5FCBCC",
  525. yAxisIndex: 0,
  526. selected: true
  527. },
  528. {
  529. name: '入库流量',
  530. field: 'inq',
  531. type: 'bar',
  532. color: "#30AF30",
  533. yAxisIndex: 1,
  534. selected: true
  535. },
  536. {
  537. name: '出库流量',
  538. field: 'outq',
  539. type: 'bar',
  540. color: "#368BFF",
  541. yAxisIndex: 1,
  542. selected: true
  543. },
  544. ]
  545. }
  546. }
  547. break;
  548. case 'FD_XAJ_FILE':
  549. case 'HS_SK_XAJ_FILE':
  550. case 'CA_SK_XAJ_FILE':
  551. return {
  552. newestDataUrl: ctx + 'gx/xaj/file/list?bizCode=' + bizCode,
  553. // listDataUrl: ctx + 'gx/xaj/list?bizCode=' + bizCode,
  554. // downloadUrl: ctx + 'gx/sw/gcdd/download?bizCode=' + bizCode,
  555. timeBetween: 1,
  556. layuiTable: [
  557. {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 100, templet: '#xuhao'}
  558. // , {field: 'stcd', title: '站码', align: 'center', width: 120}
  559. , {field: 'stnm', title: '站点名称', align: 'center', width: 200}
  560. , {field: 'fileName', title: '文件名称', align: 'center', width: 700}
  561. , {field: 'fileTime', title: '上传时间', align: 'center', width: 150}
  562. , {
  563. field: 'filePath', title: '操作', align: 'center', width: 200, templet: function (e) {
  564. let url = ctx + "doc/" + e.filePath + "/" + e.fileName + "' download='" + ctx + "doc/" + e.filePath + "/" + e.fileName;
  565. // return "<a type=\"button\" href='" + url.replace("[", "%5B").replace("]", "%5D") + "' class=\"layui-btn layui-btn-sm layui-btn-primary\">\n" +
  566. // "下载</a>";
  567. return "<button type=\"button\" onclick='downLoad(\"" + e.fileId + "\")' class=\"layui-btn layui-btn-sm layui-btn-primary\">\n" +
  568. "下载" +
  569. "</button>";
  570. }
  571. }
  572. ],
  573. }
  574. break;
  575. case 'HS_SK_XAJ':
  576. case 'CA_SK_XAJ':
  577. return {
  578. newestDataUrl: ctx + 'gx/xaj/newest?bizCode=' + bizCode,
  579. listDataUrl: ctx + 'gx/xaj/list?bizCode=' + bizCode,
  580. timeBetween: 1,
  581. layuiTable: [
  582. {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 100, templet: '#xuhao'}
  583. , {field: 'stnm', title: '站点名称', fixed: 'left', align: 'center', width: 250}
  584. , {field: 'tm', title: '时间', align: 'center', width: 200, templet: '#timeTpl'}
  585. , {field: 'ww', title: '下泄水量(万m³)', align: 'center', width: 200}
  586. ],
  587. chartTable: [
  588. {field: 'tm', title: '时间', align: 'center', sort: true, width: 200, templet: '#timeTpl'}
  589. , {field: 'ww', title: '下泄水量(万m³)', align: 'center', width: 200}
  590. ],
  591. chart: {
  592. title: '水文监测',
  593. xCategory: 'tm',
  594. yAxis: ["万m³"],
  595. series: [
  596. {
  597. name: '下泄水量',
  598. field: 'ww',
  599. type: 'bar',
  600. color: "#5793F3",
  601. yAxisIndex: 0,
  602. selected: true
  603. },
  604. ]
  605. }
  606. }
  607. break;
  608. case 'DW_XAJ_ST_KR':
  609. case 'HS_SK_XAJ_KR':
  610. case 'CA_SK_XAJ_KR':
  611. case 'FD_XAJ_KR':
  612. return {
  613. newestDataUrl: ctx + 'gx/xaj/krList?bizCode=' + bizCode,
  614. listDataUrl: ctx + 'gx/xaj/krList?bizCode=' + bizCode,
  615. downloadUrl: ctx + 'gx/xaj/krList?bizCode=' + bizCode,
  616. timeBetween: 1,
  617. layuiTable: [
  618. {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 100, templet: '#xuhao'}
  619. , {field: 'stnm', title: '站点名称', fixed: 'left', align: 'center', width: 250}
  620. , {field: 'z', title: '水位(m)', fixed: 'left', align: 'center', width: 200}
  621. , {field: 'w', title: '库容(万m³)', align: 'center', width: 200}
  622. ],
  623. chartTable: [
  624. {field: 'z', title: '水位(m)', align: 'center', width: 150}
  625. ],
  626. chart: {
  627. title: '库容曲线',
  628. xCategory: 'kr',
  629. yAxis: ["m³"],
  630. series: [
  631. {
  632. name: '水位',
  633. field: 'z',
  634. type: 'line',
  635. color: "#5793F3",
  636. yAxisIndex: 0,
  637. selected: true
  638. }
  639. ]
  640. }
  641. }
  642. break;
  643. case 'DW_XAJ_ST_XS':
  644. case 'HS_SK_XAJ_XS':
  645. case 'CA_SK_XAJ_XS':
  646. return {
  647. newestDataUrl: ctx + 'gx/xaj/skswList?bizCode=' + bizCode,
  648. listDataUrl: ctx + 'gx/xaj/skswList?bizCode=' + bizCode,
  649. downloadUrl: ctx + 'gx/xaj/skswList?bizCode=' + bizCode,
  650. timeBetween: 1,
  651. layuiTable: [
  652. {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 100, templet: '#xuhao'}
  653. , {field: 'stnm', title: '站点名称', fixed: 'left', align: 'center', width: 250}
  654. , {field: 'tm', title: '时间', fixed: 'left', align: 'center', width: 250}
  655. , {field: 'z', title: '水位(m)', align: 'center', width: 200}
  656. , {field: 'w', title: '蓄水量(万m³)', align: 'center', width: 200}
  657. ],
  658. chartTable: [
  659. {field: 'tm', title: '时间', align: 'center', width: 150}
  660. , {field: 'z', title: '水位(m)', align: 'center', width: 150}
  661. , {field: 'w', title: '蓄水量(万m³)', align: 'center', width: 150}
  662. ],
  663. chart: {
  664. title: '水库蓄水变化过程图',
  665. xCategory: 'tm',
  666. yAxis: ["m", "万m³"],
  667. series: [
  668. {
  669. name: '水位',
  670. field: 'z',
  671. type: 'line',
  672. color: "#3adbe0",
  673. yAxisIndex: 0,
  674. selected: true
  675. },
  676. {
  677. name: '蓄水量',
  678. field: 'w',
  679. type: 'bar',
  680. color: "#5793F3",
  681. yAxisIndex: 1,
  682. selected: true
  683. }
  684. ]
  685. }
  686. }
  687. break;
  688. case 'FD_XAJ_XS':
  689. return {
  690. newestDataUrl: ctx + 'gx/xaj/skswList?bizCode=' + bizCode,
  691. listDataUrl: ctx + 'gx/xaj/skswList?bizCode=' + bizCode,
  692. downloadUrl: ctx + 'gx/xaj/skswList?bizCode=' + bizCode,
  693. timeBetween: 1,
  694. layuiTable: [
  695. {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 100, templet: '#xuhao'}
  696. , {field: 'stnm', title: '站点名称', fixed: 'left', align: 'center', width: 250}
  697. , {field: 'tm', title: '时间', fixed: 'left', align: 'center', width: 250}
  698. , {field: 'z', title: '水位(m)', align: 'center', width: 200}
  699. , {field: 'w', title: '蓄水量(亿m³)', align: 'center', width: 200}
  700. ],
  701. chartTable: [
  702. {field: 'tm', title: '时间', align: 'center', width: 150}
  703. , {field: 'z', title: '水位(m)', align: 'center', width: 150}
  704. , {field: 'w', title: '蓄水量(亿m³)', align: 'center', width: 150}
  705. ],
  706. chart: {
  707. title: '水库蓄水变化过程图',
  708. xCategory: 'tm',
  709. yAxis: ["m", "亿m³"],
  710. series: [
  711. {
  712. name: '水位',
  713. field: 'z',
  714. type: 'line',
  715. color: "#3adbe0",
  716. yAxisIndex: 0,
  717. selected: true
  718. },
  719. {
  720. name: '蓄水量',
  721. field: 'w',
  722. type: 'bar',
  723. color: "#5793F3",
  724. yAxisIndex: 1,
  725. selected: true
  726. }
  727. ]
  728. }
  729. }
  730. break;
  731. case 'WIU_XAJ':
  732. return {
  733. listDataUrl: ctx + 'gx/xaj/wiuMonthList?bizCode=' + bizCode,
  734. timeBetween: 1,
  735. layuiTable: [
  736. {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 80, templet: '#xuhao'}
  737. , {field: 'tm', title: '时间', fixed: 'left', align: 'center', width: 150}
  738. , {field: 'gongshuiWW', title: '公共供水企业用水量', align: 'center', width: 150}
  739. , {field: 'fwWW', title: '服务业自备水源用水量', align: 'center', width: 150}
  740. , {field: 'insdutryWW', title: '工业自备水源用水量', align: 'center', width: 150}
  741. ],
  742. chartTable: [
  743. {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 80, templet: '#xuhao'}
  744. , {field: 'tm', title: '时间', fixed: 'left', align: 'center', width: 150}
  745. , {field: 'gongshuiWW', title: '公共供水企业用水量', align: 'center', width: 150}
  746. , {field: 'fwWW', title: '服务业自备水源用水量', align: 'center', width: 150}
  747. , {field: 'insdutryWW', title: '工业自备水源用水量', align: 'center', width: 150}
  748. ],
  749. chart: {
  750. title: '分行业月度用水量',
  751. xCategory: 'tm',
  752. yAxis: ["万m³"],
  753. series: [
  754. {
  755. field: 'gongshuiWW',
  756. name: '公共供水企业用水量',
  757. type: 'bar',
  758. stack: 'tradTp',
  759. color: "#FCD521",
  760. selected: true
  761. }
  762. , {
  763. field: 'fwWW',
  764. name: '服务业自备水源用水量',
  765. type: 'bar',
  766. stack: 'tradTp',
  767. color: "#6F17FF",
  768. selected: true
  769. }
  770. , {
  771. field: 'insdutryWW',
  772. name: '工业自备水源用水量',
  773. type: 'bar',
  774. stack: 'tradTp',
  775. color: "#0277F4",
  776. selected: true
  777. }
  778. ]
  779. }
  780. }
  781. break;
  782. case 'GDP_XAJ':
  783. return {
  784. newestDataUrl: ctx + 'gx/xaj/gdpnewest?bizCode=' + bizCode,
  785. listDataUrl: ctx + 'gx/xaj/gdpList?bizCode=' + bizCode,
  786. downloadUrl: ctx + 'gx/sw/gcdd/download?bizCode=' + bizCode,
  787. timeBetween: 1,
  788. layuiTable: [
  789. {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 100, templet: '#xuhao'}
  790. , {field: 'prov', title: '省份', fixed: 'left', align: 'center', width: 80}
  791. , {field: 'city', title: '城市', fixed: 'left', align: 'center', width: 80}
  792. , {field: 'county', title: '县区', fixed: 'left', align: 'center', width: 80}
  793. , {field: 'yr', title: '年份', fixed: 'left', align: 'center', width: 80}
  794. , {field: 'peoCitySum', title: '城市人口总数(万人)', align: 'center', width: 180}
  795. , {field: 'peoCountySum', title: '农村人口总数(万人)', align: 'center', width: 180}
  796. , {field: 'pepSum', title: '人口总数(万人)', align: 'center', width: 150}
  797. , {field: 'peoRadio', title: '城镇化率(%)', align: 'center', width: 150}
  798. // , {field: 'gdp1Sum', title: '一产', align: 'center', width: 80}
  799. // , {field: 'gdp2Sum', title: '二产', align: 'center', width: 80}
  800. // , {field: 'gdp3Sum', title: '三产', align: 'center', width: 80}
  801. , {field: 'gdpSum', title: '国内(地区)生产总值(亿元)', align: 'center', width: 250}
  802. , {field: 'insduAdd', title: '工业增加值(亿元)', align: 'center', width: 190}
  803. //, {field: 'effectIrrArea', title: '农田有效灌溉面积(万亩)', align: 'center', width: 120}
  804. , {field: 'gdArea', title: '耕地面积(万亩)', align: 'center', width: 190}
  805. ],
  806. chartTable: [
  807. {field: 'id', title: '序号', fixed: 'left', align: 'center', width: 100, templet: '#xuhao'}
  808. , {field: 'yr', title: '年份', fixed: 'left', align: 'center', width: 80}
  809. , {field: 'peoCitySum', title: '城市人口总数(万人)', align: 'center', width: 180}
  810. , {field: 'peoCountySum', title: '农村人口总数(万人)', align: 'center', width: 180}
  811. , {field: 'pepSum', title: '人口总数(万人)', align: 'center', width: 150}
  812. , {field: 'peoRadio', title: '城镇化率(%)', align: 'center', width: 150}
  813. , {field: 'gdpSum', title: '国内(地区)生产总值(亿元)', align: 'center', width: 250}
  814. , {field: 'insduAdd', title: '工业增加值(亿元)', align: 'center', width: 190}
  815. // , {field: 'effectIrrArea', title: '农田有效灌溉面积(万亩)', align: 'center', width: 100}
  816. , {field: 'gdArea', title: '耕地面积(万亩)', align: 'center', width: 190}
  817. ],
  818. chart: {
  819. title: 'GDP监测',
  820. xCategory: 'yr',
  821. yAxis: ["万人", "%", "亿元", "万亩"],
  822. series: [
  823. , {
  824. field: 'peoCitySum',
  825. name: '城市人口总数(万人)',
  826. type: 'bar',
  827. stack: 'peoTp',
  828. yAxisIndex: 0,
  829. selected: false
  830. }
  831. , {
  832. field: 'peoCountySum',
  833. name: '农村人口总数(万人)',
  834. type: 'bar',
  835. stack: 'peoTp',
  836. yAxisIndex: 0,
  837. selected: false
  838. }
  839. , {
  840. field: 'pepSum',
  841. name: '人口总数(万人)',
  842. type: 'line',
  843. stack: 'peoTp1',
  844. yAxisIndex: 0,
  845. selected: false
  846. }
  847. , {field: 'peoRadio', name: '城镇化率(%)', type: 'bar', yAxisIndex: 1, selected: false}
  848. , {
  849. field: 'gdpSum',
  850. name: '国内(地区)生产总值(亿元)',
  851. type: 'bar',
  852. yAxisIndex: 2,
  853. selected: true
  854. }
  855. , {field: 'insduAdd', name: '工业增加值(亿元)', type: 'bar', yAxisIndex: 2, selected: false}
  856. , {field: 'gdArea', name: '耕地面积(万亩)', type: 'bar', yAxisIndex: 3, selected: false}
  857. ]
  858. }
  859. }
  860. break;
  861. }
  862. }
  863. }
  864. function isblank(str) {
  865. return str == '' || str == undefined || str == null;
  866. }
  867. function arrSUM(arr) {
  868. var s = 0;
  869. arr.forEach(function (val, idx, arr) {
  870. if (val) {
  871. s += val;
  872. }
  873. }, 0);
  874. return s;
  875. }
  876. function downLoad(fileId) {
  877. window.location.href = ctx + "biz/doc/file/downloadFile?fileId=" + fileId;
  878. }
  879. //罗桐埠和街口生态断面指标数据
  880. function stTargetData(stcd) {
  881. switch (stcd) {
  882. case '70112100'://罗桐埠
  883. return [
  884. {
  885. silent: false, label: {
  886. position: 'middle', // 文字位置
  887. formatter: '预警线 22.7m³/s', //文字
  888. color: '#FA4009'
  889. }, yAxis: 22.7, lineStyle: {type: 'solid', color: "#FA4009", width: 1}
  890. }
  891. ];
  892. case '70111400'://街口
  893. return [
  894. {
  895. silent: false, label: {
  896. position: 'middle', // 文字位置
  897. formatter: '蓝色预警线 9.2m³/s', //文字
  898. color: '#0C57D0'
  899. }, yAxis: 9.2, lineStyle: {type: 'solid', color: "#0C57D0", width: 1}
  900. },
  901. {
  902. silent: false, label: {
  903. position: 'middle', // 文字位置
  904. formatter: '橙色预警线 7.7m³/s', //文字
  905. color: '#FFAF0F'
  906. }, yAxis: 7.7, lineStyle: {type: 'solid', color: "#FFAF0F", width: 1}
  907. },
  908. {
  909. silent: false, label: {
  910. position: 'middle', // 文字位置
  911. formatter: '红色预警线 6.2m³/s', //文字
  912. color: '#FA4009'
  913. }, yAxis: 6.2, lineStyle: {type: 'solid', color: "#FA4009", width: 1}
  914. }
  915. ];
  916. }
  917. }