b0949b7d5b53cf41422717c3b7442c2d4fb1fffa.svn-base 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. import _default,* as esriLoader from "esri-loader";
  2. const options = {
  3. url: "/arcgisApi/4.7/init.js"
  4. };
  5. function dxsSttpFormat(sttp) {//地下水监测站类型
  6. return sttp == 'NATIONAL'? "国家级监测站":
  7. sttp == 'PROVAUTO'? "省级自动监测站":
  8. sttp == 'PROVHAND'? "省级手动监测站":
  9. sttp == 'PRO'? "省级监测站": '';
  10. }
  11. function gateTypeFormat(sttp) {//水闸类型
  12. return sttp == '1'? "分(泄)洪闸":
  13. sttp == '2'? "节制闸":
  14. sttp == '3'? "排(退)水闸":
  15. sttp == '4'? "引(进)水闸":
  16. sttp == '5'? "挡潮闸":
  17. sttp == '6'? "船闸":
  18. sttp == '9'? "其它": '';
  19. }
  20. function typeFormat172(sttp) {//172类型
  21. return sttp == '0'? "重大农业节水工程":
  22. sttp == '1'? "重大引调水工程":
  23. sttp == '2'? "重点水源工程":
  24. sttp == '3'? "江河湖泊治理骨干工程":
  25. sttp == '4'? "新建大型灌区工程":
  26. sttp == '5'? "非水利部下达投资计划":
  27. sttp == '6'? "全部由地方投资":
  28. sttp == '7'? "其他项目15项": '';
  29. }
  30. function qsFormat(val){
  31. return val == '1'? "自流":
  32. val == '2'? "抽提": '';
  33. }
  34. function dbssydFormat(val){
  35. return val == '1'? "水库":
  36. val == '2'? "湖泊":
  37. val == '3'? "河流":
  38. val == '9'? "其他": '';
  39. }
  40. function swzFormat(sttp){
  41. return sttp == 'MM'? "气象站":
  42. sttp == 'PP'? "雨量站":
  43. sttp == 'BB'? "蒸发站":
  44. sttp == 'ZQ'? "河道水文站":
  45. sttp == 'DD'? "堰闸水文站":
  46. sttp == 'ZZ'? "河道水位站":
  47. sttp == 'TT'? "潮位站":
  48. sttp == 'RR'? "水库水文站":
  49. sttp == 'DP'? "泵站":
  50. sttp == 'ZG'? "地下水站":
  51. sttp == 'SS'? "墒情站":
  52. sttp == 'ZB'? "分洪水位站": '';
  53. }
  54. export function pointMoveHandler(_self,graphic,response){
  55. if(graphic.layer == null){
  56. return;
  57. }
  58. esriLoader.loadModules(["esri/Graphic","esri/layers/GraphicsLayer",
  59. "esri/geometry/Point",
  60. "esri/geometry/Polygon","esri/geometry/Polyline",
  61. "esri/symbols/SimpleLineSymbol"],options).then(
  62. ([Graphic,GraphicsLayer,Point,Polygon,Polyline,SimpleLineSymbol])=>{
  63. if(graphic.layer.id == "personGraphicLayer"){//人员
  64. _self.viewObject.popup.open({
  65. title:graphic.attributes.persName,
  66. content: "<div>"+
  67. "<table>"+
  68. "<tr>"+
  69. "<td>人员姓名</td>"+
  70. "<td>"+graphic.attributes.persName+"</td>"+
  71. "</tr>"+
  72. "<tr>"+
  73. "<td>手机号码</td>"+
  74. "<td>"+graphic.attributes.mobilenumb+"</td>"+
  75. "</tr>"+
  76. "<tr>"+
  77. "<td>最近上线时间</td>"+
  78. "<td>"+graphic.attributes.operateTime+"</td>"+
  79. "</tr>"+
  80. "</table>"+
  81. "</div>"+
  82. "<div style='margin-top:10px;'>"+
  83. "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  84. "</div>",
  85. location:response.results[0].mapPoint
  86. });
  87. }else if(graphic.layer.id == "shgcGraphicLayer"){//水毁工程
  88. _self.viewObject.popup.open({
  89. title:graphic.attributes.nm,
  90. content: "<div>"+
  91. "<table>"+
  92. "<tr>"+
  93. "<td>工程类别</td>"+
  94. "<td>"+graphic.attributes.wtdstType+"</td>"+
  95. "</tr>"+
  96. "<tr>"+
  97. "<td>所在位置</td>"+
  98. "<td>"+graphic.attributes.locNm+"</td>"+
  99. "</tr>"+
  100. "</table>"+
  101. "</div>"+
  102. "<div style='margin-top:10px;'>"+
  103. "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  104. "</div>",
  105. location:response.results[0].mapPoint
  106. });
  107. }else if(graphic.layer.id == "country150Layer"){//150县
  108. _self.viewObject.popup.open({
  109. title:graphic.attributes.adName,
  110. content: "<div>"+
  111. "<table style='width:100%;'>"+
  112. "<tr>"+
  113. "<td>所在地</td>"+
  114. "<td>"+graphic.attributes.adFullName+"</td>"+
  115. "</tr>"+
  116. "</table>"+
  117. "</div>"+
  118. "<div style='margin-top:10px;'>"+
  119. "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  120. "</div>",
  121. location:response.results[0].mapPoint
  122. });
  123. }else if(graphic.layer.id == "xzcGraphicLayer"){//人饮行政村
  124. _self.viewObject.popup.open({
  125. title:graphic.attributes.adNm,
  126. content: "<div>"+
  127. "<table style='width:100%;'>"+
  128. "<tr>"+
  129. "<td>督查时间</td>"+
  130. "<td>"+graphic.attributes.visitDate.substring(0,10)+"</td>"+
  131. "</tr>"+
  132. "</table>"+
  133. "</div>"+
  134. "<div style='margin-top:10px;'>"+
  135. "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  136. "</div>",
  137. location:response.results[0].mapPoint
  138. });
  139. }else if(graphic.layer.id == "ncysgcGraphicLayer"){//农村饮水工程
  140. _self.viewObject.popup.open({
  141. title:graphic.attributes.cwsName,
  142. content: "<div>"+
  143. "<table style='width:100%;'>"+
  144. "<tr>"+
  145. "<td>所在地</td>"+
  146. "<td>"+graphic.attributes.cwsLoc+"</td>"+
  147. "</tr>"+
  148. "</table>"+
  149. "</div>"+
  150. "<div style='margin-top:10px;'>"+
  151. "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  152. "</div>",
  153. location:response.results[0].mapPoint
  154. });
  155. }else if(graphic.layer.id == "graphicLayer172"){//172
  156. _self.viewObject.popup.open({
  157. title:graphic.attributes.nm,
  158. content: "<div>"+
  159. "<table style='width:100%;'>"+
  160. "<tr>"+
  161. "<td>项目类型</td>"+
  162. "<td>"+typeFormat172(graphic.attributes.ptype)+"</td>"+
  163. "</tr>"+
  164. "<tr>"+
  165. "<td>管理单位</td>"+
  166. "<td>"+graphic.attributes.unitNm+"</td>"+
  167. "</tr>"+
  168. "</table>"+
  169. "</div>"+
  170. "<div style='margin-top:10px;'>"+
  171. "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  172. "</div>",
  173. location:response.results[0].mapPoint
  174. });
  175. }else if(graphic.layer.id == "szGraphicLayer"){//水闸
  176. _self.viewObject.popup.open({
  177. title:graphic.attributes.gateName,
  178. content: "<div>"+
  179. "<table style='width:100%;'>"+
  180. "<tr>"+
  181. "<td>水闸类型</td>"+
  182. "<td>"+gateTypeFormat(graphic.attributes.gateType)+"</td>"+
  183. "</tr>"+
  184. "<tr>"+
  185. "<td>所属河流</td>"+
  186. "<td>"+graphic.attributes.locRvName+"</td>"+
  187. "</tr>"+
  188. "<tr>"+
  189. "<td>归口管理部门</td>"+
  190. "<td>"+graphic.attributes.gateAdmDep+"</td>"+
  191. "</tr>"+
  192. "</table>"+
  193. "</div>"+
  194. "<div style='margin-top:10px;'>"+
  195. "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  196. "</div>",
  197. location:response.results[0].mapPoint
  198. });
  199. }else if(graphic.layer.id == "szGraphicLayerAll"){//全部水闸
  200. _self.viewObject.popup.open({
  201. title:graphic.attributes.gateName,
  202. content: "<div>"+
  203. "<table style='width:100%;'>"+
  204. "<tr>"+
  205. "<td>水闸类型</td>"+
  206. "<td>"+gateTypeFormat(graphic.attributes.gateType)+"</td>"+
  207. "</tr>"+
  208. "<tr>"+
  209. "<td>所属河流</td>"+
  210. "<td>"+graphic.attributes.locRvName+"</td>"+
  211. "</tr>"+
  212. "<tr>"+
  213. "<td>归口管理部门</td>"+
  214. "<td>"+graphic.attributes.gateAdmDep+"</td>"+
  215. "</tr>"+
  216. "</table>"+
  217. "</div>"+
  218. "<div style='margin-top:10px;'>"+
  219. // "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  220. "</div>",
  221. location:response.results[0].mapPoint
  222. });
  223. }else if(graphic.layer.id == "dxsGraphicLayer"){//地下水
  224. _self.viewObject.popup.open({
  225. title:graphic.attributes.stnm,
  226. content: "<div>"+
  227. "<table style='width:100%;'>"+
  228. "<tr>"+
  229. "<td>测站类型</td>"+
  230. "<td>"+dxsSttpFormat(graphic.attributes.sttp)+"</td>"+
  231. "</tr>"+
  232. "<tr>"+
  233. "<td>测站位置</td>"+
  234. "<td>"+graphic.attributes.stlc+"</td>"+
  235. "</tr>"+
  236. "<tr>"+
  237. "<td>管理单位</td>"+
  238. "<td>"+graphic.attributes.mnun+"</td>"+
  239. "</tr>"+
  240. "</table>"+
  241. "</div>"+
  242. "<div style='margin-top:10px;'>"+
  243. "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  244. "</div>",
  245. location:response.results[0].mapPoint
  246. });
  247. }else if(graphic.layer.id == "graphicLayerQsk"){//取水口
  248. _self.viewObject.popup.open({
  249. title:graphic.attributes.wintName,
  250. content: "<div>"+
  251. "<table style='width:100%;'>"+
  252. "<tr>"+
  253. "<td>取水方式</td>"+
  254. "<td>"+qsFormat(graphic.attributes.wintType)+"</td>"+
  255. "</tr>"+
  256. "<tr>"+
  257. "<td>取水口位置</td>"+
  258. "<td>"+graphic.attributes.wintPos+"</td>"+
  259. "</tr>"+
  260. "<tr>"+
  261. "<td>管理单位</td>"+
  262. "<td>"+graphic.attributes.admName+"</td>"+
  263. "</tr>"+
  264. "</table>"+
  265. "</div>"+
  266. "<div style='margin-top:10px;'>"+
  267. "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  268. "</div>",
  269. location:response.results[0].mapPoint
  270. });
  271. }else if(graphic.layer.id == "graphicLayerDbssyd"){//地表水水源地
  272. _self.viewObject.popup.open({
  273. title:graphic.attributes.swhsName,
  274. content: "<div>"+
  275. "<table style='width:100%;'>"+
  276. "<tr>"+
  277. "<td>取水水源类型</td>"+
  278. "<td>"+dbssydFormat(graphic.attributes.wainWasoType)+"</td>"+
  279. "</tr>"+
  280. "<tr>"+
  281. "<td>所在位置</td>"+
  282. "<td>"+graphic.attributes.swhsLoc+"</td>"+
  283. "</tr>"+
  284. "<tr>"+
  285. "<td>管理单位</td>"+
  286. "<td>"+graphic.attributes.insName+"</td>"+
  287. "</tr>"+
  288. "</table>"+
  289. "</div>"+
  290. "<div style='margin-top:10px;'>"+
  291. "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  292. "</div>",
  293. location:response.results[0].mapPoint
  294. });
  295. }else if(graphic.layer.id == "graphicLayerSwz"){//水文站
  296. _self.viewObject.popup.open({
  297. title:graphic.attributes.stnm,
  298. content: "<div>"+
  299. "<table style='width:100%;'>"+
  300. "<tr>"+
  301. "<td>测站类型</td>"+
  302. "<td>"+swzFormat(graphic.attributes.sttp)+"</td>"+
  303. "</tr>"+
  304. "<tr>"+
  305. "<td>测站位置</td>"+
  306. "<td>"+graphic.attributes.stlc+"</td>"+
  307. "</tr>"+
  308. "<tr>"+
  309. "<td>隶属单位</td>"+
  310. "<td>"+graphic.attributes.atcunit+"</td>"+
  311. "</tr>"+
  312. "</table>"+
  313. "</div>"+
  314. "<div style='margin-top:10px;'>"+
  315. "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  316. "</div>",
  317. location:response.results[0].mapPoint
  318. });
  319. }else if(graphic.layer.id == "allSkGraphicLayer"){//所有水库
  320. var feature = graphic.attributes;
  321. var str = '<div id="edituser">水库编码:&nbsp;&nbsp;'+feature.rsCode+'<br>'+'督查状态:&nbsp;&nbsp;'+feature.status+'<br>'+'所在位置:&nbsp;&nbsp;'+graphic.attributes.location+
  322. '<div style="display: flex;flex-direction: row;">'+
  323. '<div style="width:70px;cursor:pointer;color: #001fff;padding-right: 10px;"><span @click="showSkBaseInfo('+"'"+feature.rsCode+"'"+')" style="border-bottom: 1px solid blue;">'+'基础信息'+'</span></div><br>'+
  324. '</div></div>';
  325. _self.viewObject.popup.open({
  326. title:graphic.attributes.rsName,
  327. content:_self.initHtml(str),
  328. location:response.results[0].mapPoint
  329. });
  330. }else if(graphic.layer.id == "skGraphicLayer2018"){//2018水库
  331. var feature = graphic.attributes;
  332. var str = '<div id="edituser">水库编码:&nbsp;&nbsp;'+feature.rsCode+'<br>'+'督查状态:&nbsp;&nbsp;'+feature.status+'<br>'+'所在位置:&nbsp;&nbsp;'+graphic.attributes.location+
  333. '<div style="display: flex;flex-direction: row;">'+
  334. '<div style="width:70px;cursor:pointer;color: #001fff;padding-right: 10px;"><span @click="showSkBaseInfo('+"'"+feature.rsCode+"'"+')" style="border-bottom: 1px solid blue;">'+'基础信息'+'</span></div><br>'+
  335. '<div style="width:85px;cursor:pointer;color: #001fff;"><span @click="addSkToPlan('+"'"+feature.rsCode+"',"+"'"+feature.rsName+"',"+"'"+feature.longitude+"',"+"'"+feature.latitude+"',"+"'skGraphicLayer2018'"+')" style="border-bottom: 1px solid blue;">'+'加入督查计划'+'</span></div>'+
  336. '</div></div>';
  337. _self.viewObject.popup.open({
  338. title:graphic.attributes.rsName,
  339. content:_self.initHtml(str),
  340. location:response.results[0].mapPoint
  341. });
  342. }else if(graphic.layer.id == "skGraphicLayer2019"){//2019水库
  343. var feature = graphic.attributes;
  344. var str = '<div id="edituser">水库编码:&nbsp;&nbsp;'+feature.rsCode+'<br>'+'督查状态:&nbsp;&nbsp;'+feature.status+'<br>'+'所在位置:&nbsp;&nbsp;'+graphic.attributes.location+
  345. '<div style="display: flex;flex-direction: row;">'+
  346. '<div style="width:70px;cursor:pointer;color: #001fff;padding-right: 10px;"><span @click="showSkBaseInfo('+"'"+feature.rsCode+"'"+')" style="border-bottom: 1px solid blue;">'+'基础信息'+'</span></div><br>'+
  347. '<div style="width:70px;cursor:pointer;color: #001fff;padding-right: 10px;"><span @click="showSkDcInfo('+"'"+feature.rsCode+"',"+"'"+feature.rsName+"',"+"'"+feature.rgstrId+"',"+"'"+feature.objId+"'"+')" style="border-bottom: 1px solid blue;">'+'督查信息'+'</span></div><br>'+
  348. '</div></div>';
  349. _self.viewObject.popup.open({
  350. title:graphic.attributes.rsName,
  351. content:_self.initHtml(str),
  352. location:response.results[0].mapPoint
  353. });
  354. }else if(graphic.layer.id == "fcskGraphicLayer"){//复查水库
  355. var feature = graphic.attributes;
  356. var str = '<div id="edituser">水库编码:&nbsp;&nbsp;'+feature.rsCode+'<br>'+'督查状态:&nbsp;&nbsp;'+feature.status+'<br>'+'所在位置:&nbsp;&nbsp;'+graphic.attributes.location+
  357. '<div style="display: flex;flex-direction: row;">'+
  358. '<div style="width:70px;cursor:pointer;color: #001fff;padding-right: 10px;"><span @click="showSkBaseInfo('+"'"+feature.rsCode+"'"+')" style="border-bottom: 1px solid blue;">'+'基础信息'+'</span></div><br>'+
  359. '<div style="width:70px;cursor:pointer;color: #001fff;padding-right: 10px;"><span @click="showSkDcInfo('+"'"+feature.rsCode+"',"+"'"+feature.rsName+"',"+"'"+feature.rgstrId+"',"+"'"+feature.objId+"'"+')" style="border-bottom: 1px solid blue;">'+'督查信息'+'</span></div><br>'+
  360. '</div></div>';
  361. _self.viewObject.popup.open({
  362. title:graphic.attributes.rsName,
  363. content:_self.initHtml(str),
  364. location:response.results[0].mapPoint
  365. });
  366. }else if(graphic.layer.id == "jhwskGraphicLayer"){//计划外水库
  367. var feature = graphic.attributes;
  368. var str = '<div id="edituser">水库编码:&nbsp;&nbsp;'+feature.rsCode+'<br>'+'督查状态:&nbsp;&nbsp;'+feature.status+'<br>'+'所在位置:&nbsp;&nbsp;'+graphic.attributes.location+
  369. '<div style="display: flex;flex-direction: row;">'+
  370. '<div style="width:70px;cursor:pointer;color: #001fff;padding-right: 10px;"><span @click="showSkBaseInfo('+"'"+feature.rsCode+"'"+')" style="border-bottom: 1px solid blue;">'+'基础信息'+'</span></div><br>'+
  371. '<div style="width:85px;cursor:pointer;color: #001fff;"><span @click="addSkToPlan('+"'"+feature.rsCode+"',"+"'"+feature.rsName+"',"+"'"+feature.longitude+"',"+"'"+feature.latitude+"',"+"'jhwskGraphicLayer'"+')" style="border-bottom: 1px solid blue;">'+'加入督查计划'+'</span></div>'+
  372. '</div></div>';
  373. _self.viewObject.popup.open({
  374. title:graphic.attributes.rsName,
  375. content:_self.initHtml(str),
  376. location:response.results[0].mapPoint
  377. });
  378. }else if(graphic.layer.id == "bjGraphicLayer"){//标记
  379. var feature = graphic.attributes;
  380. var str = "<div>"+
  381. "<div>"+
  382. "<div style='display: flex;padding: 5px;'>"+
  383. "<p style='font-size: 14px;padding: 5px;'>名称:</p>"+
  384. "<input type='text' id='nameId' style='height: 33px;width: 216px;' value="+feature.inteName+">"+
  385. "</div>"+
  386. "<div style='display: flex;padding: 5px;'>"+
  387. "<p style='font-size: 14px;padding: 5px;'>备注:</p>"+
  388. "<textarea id='noteId' rows='6' cols='28' style='width: 216px;'value="+feature.des+">"+feature.des+
  389. "</textarea>"+
  390. "</div>"+
  391. "</div>"+
  392. "<div style='margin-top:10px;float: right;'>"+
  393. "<button type='button' style='margin-right: 20px;width: 50px;' @click='cancelHandler()'>取消</button>"+
  394. '<button type="button" style="width: 50px;" @click="editHandler('+"'"+feature.id+"',"+"'"+feature.inteName+"',"+"'"+feature.des+"'"+')">保存</button>'+
  395. "</div>"+
  396. "</div>";
  397. _self.viewObject.popup.open({
  398. title:'',
  399. content:_self.initHtml(str),
  400. location:response.results[0].mapPoint
  401. });
  402. }
  403. });
  404. }