857ffd4230006799fc2b38e1eb8e6e27b82029bc.svn-base 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  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. var pt,pt1;
  55. export function locationHandler(_self,item,type,layerId){
  56. esriLoader.loadModules(["esri/Graphic","esri/layers/GraphicsLayer",
  57. "esri/geometry/Point","esri/geometry/SpatialReference",
  58. "esri/geometry/Polygon","esri/geometry/Polyline",
  59. "esri/symbols/SimpleLineSymbol"],options).then(
  60. ([Graphic,GraphicsLayer,Point,SpatialReference,Polygon,Polyline,SimpleLineSymbol])=>{
  61. if(type == "person"){//人员
  62. if(item.lgtd && item.lttd){
  63. pt1 = new Point(item.lgtd-0.08,item.lttd,new SpatialReference(4326));//用于定位偏移
  64. pt = new Point(item.lgtd,item.lttd,new SpatialReference(4326));
  65. _self.viewObject.popup.open({
  66. title:item.persName,
  67. content: "<div>"+
  68. "<table>"+
  69. "<tr>"+
  70. "<td>人员姓名</td>"+
  71. "<td>"+item.persName+"</td>"+
  72. "</tr>"+
  73. "<tr>"+
  74. "<td>手机号码</td>"+
  75. "<td>"+item.mobilenumb+"</td>"+
  76. "</tr>"+
  77. "<tr>"+
  78. "<td>最近上线时间</td>"+
  79. "<td>"+item.operateTime+"</td>"+
  80. "</tr>"+
  81. "</table>"+
  82. "</div>"+
  83. "<div style='margin-top:10px;'>"+
  84. "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  85. "</div>",
  86. location:pt
  87. });
  88. }else{
  89. _self.showMessage("无法获取空间信息!")
  90. }
  91. }else if(layerId == "shgcGraphicLayer"){//水毁工程
  92. if(item.lgtd && item.lttd){
  93. pt1 = new Point(item.lgtd-0.08,item.lttd,new SpatialReference(4326));//用于定位偏移
  94. pt = new Point(item.lgtd,item.lttd,new SpatialReference(4326));
  95. _self.viewObject.popup.open({
  96. title:item.nm,
  97. content: "<div>"+
  98. "<table>"+
  99. "<tr>"+
  100. "<td>工程类别</td>"+
  101. "<td>"+item.wtdstType+"</td>"+
  102. "</tr>"+
  103. "<tr>"+
  104. "<td>所在位置</td>"+
  105. "<td>"+item.locNm+"</td>"+
  106. "</tr>"+
  107. "</table>"+
  108. "</div>"+
  109. "<div style='margin-top:10px;'>"+
  110. "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  111. "</div>",
  112. location:pt
  113. });
  114. }else{
  115. _self.showMessage("无法获取空间信息!")
  116. }
  117. }else if(layerId == "xzcGraphicLayer"){//人饮行政村
  118. if(item.lgtdPc && item.lttdPc){
  119. pt1 = new Point(item.lgtdPc-0.08,item.lttdPc,new SpatialReference(4326));//用于定位偏移
  120. pt = new Point(item.lgtdPc,item.lttdPc,new SpatialReference(4326));
  121. _self.viewObject.popup.open({
  122. title:item.adNm,
  123. content: "<div>"+
  124. "<table style='width:100%;'>"+
  125. "<tr>"+
  126. "<td>督查时间</td>"+
  127. "<td>"+item.visitDate.substring(0,10)+"</td>"+
  128. "</tr>"+
  129. "</table>"+
  130. "</div>"+
  131. "<div style='margin-top:10px;'>"+
  132. "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  133. "</div>",
  134. location:pt
  135. });
  136. }else{
  137. _self.showMessage("无法获取空间信息!")
  138. }
  139. }else if(layerId == "ncysgcGraphicLayer"){//农村饮水工程
  140. if(item.cwsLong && item.cwsLat){
  141. pt1 = new Point(item.cwsLong-0.08,item.cwsLat,new SpatialReference(4326));//用于定位偏移
  142. pt = new Point(item.cwsLong,item.cwsLat,new SpatialReference(4326));
  143. _self.viewObject.popup.open({
  144. title:item.cwsName,
  145. content: "<div>"+
  146. "<table style='width:100%;'>"+
  147. "<tr>"+
  148. "<td>所在地</td>"+
  149. "<td>"+item.cwsLoc+"</td>"+
  150. "</tr>"+
  151. "</table>"+
  152. "</div>"+
  153. "<div style='margin-top:10px;'>"+
  154. "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  155. "</div>",
  156. location:pt
  157. });
  158. }else{
  159. _self.showMessage("无法获取空间信息!")
  160. }
  161. }else if(layerId == "country150Layer"){//150县
  162. if(item.lgtd && item.lttd){
  163. pt1 = new Point(item.lgtd-0.08,item.lttd,new SpatialReference(4326));//用于定位偏移
  164. pt = new Point(item.lgtd,item.lttd,new SpatialReference(4326));
  165. _self.viewObject.popup.open({
  166. title:item.adName,
  167. content: "<div>"+
  168. "<table style='width:100%;'>"+
  169. "<tr>"+
  170. "<td>所在地</td>"+
  171. "<td>"+item.adFullName+"</td>"+
  172. "</tr>"+
  173. "</table>"+
  174. "</div>"+
  175. "<div style='margin-top:10px;'>"+
  176. "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  177. "</div>",
  178. location:pt
  179. });
  180. }else{
  181. _self.showMessage("无法获取空间信息!")
  182. }
  183. }else if(layerId == "graphicLayer172"){//172
  184. if(item.lgtdPc && item.lttdPc){
  185. pt1 = new Point(item.lgtdPc-0.08,item.lttdPc,new SpatialReference(4326));//用于定位偏移
  186. pt = new Point(item.lgtdPc,item.lttdPc,new SpatialReference(4326));
  187. _self.viewObject.popup.open({
  188. title:item.nm,
  189. content: "<div>"+
  190. "<table style='width:100%;'>"+
  191. "<tr>"+
  192. "<td>项目类型</td>"+
  193. "<td>"+typeFormat172(item.ptype)+"</td>"+
  194. "</tr>"+
  195. "<tr>"+
  196. "<td>管理单位</td>"+
  197. "<td>"+item.unitNm+"</td>"+
  198. "</tr>"+
  199. "</table>"+
  200. "</div>"+
  201. "<div style='margin-top:10px;'>"+
  202. // "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  203. "</div>",
  204. location:pt
  205. });
  206. }else{
  207. _self.showMessage("无法获取空间信息!")
  208. }
  209. }else if(layerId == "szGraphicLayer"){//水闸
  210. if(item.lgtd && item.lttd && item.lgtd>0 && item.lttd>0){
  211. pt1 = new Point(item.lgtd-0.08,item.lttd,new SpatialReference(4326));//用于定位偏移
  212. pt = new Point(item.lgtd,item.lttd,new SpatialReference(4326));
  213. _self.viewObject.popup.open({
  214. title:item.gateName,
  215. content: "<div>"+
  216. "<table style='width:100%;'>"+
  217. "<tr>"+
  218. "<td>水闸类型</td>"+
  219. "<td>"+gateTypeFormat(item.gateType)+"</td>"+
  220. "</tr>"+
  221. "<tr>"+
  222. "<td>所属河流</td>"+
  223. "<td>"+item.riverName+"</td>"+
  224. "</tr>"+
  225. "<tr>"+
  226. "<td>归口管理部门</td>"+
  227. "<td>"+item.gateAdmName+"</td>"+
  228. "</tr>"+
  229. "</table>"+
  230. "</div>"+
  231. "<div style='margin-top:10px;'>"+
  232. "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  233. "</div>",
  234. location:pt
  235. });
  236. }else{
  237. _self.showMessage("无法获取空间信息!")
  238. }
  239. }else if(layerId == "szGraphicLayerAll"){//全部水闸
  240. if(item.centerX && item.centerY && item.centerX>0 && item.centerY>0){
  241. pt1 = new Point(item.centerX-0.08,item.centerY,new SpatialReference(4326));//用于定位偏移
  242. pt = new Point(item.centerX,item.centerY,new SpatialReference(4326));
  243. _self.viewObject.popup.open({
  244. title:item.gateName,
  245. content: "<div>"+
  246. "<table style='width:100%;'>"+
  247. "<tr>"+
  248. "<td>水闸类型</td>"+
  249. "<td>"+gateTypeFormat(item.gateType)+"</td>"+
  250. "</tr>"+
  251. "<tr>"+
  252. "<td>所属河流</td>"+
  253. "<td>"+item.locRvName+"</td>"+
  254. "</tr>"+
  255. "<tr>"+
  256. "<td>归口管理部门</td>"+
  257. "<td>"+item.gateAdmName+"</td>"+
  258. "</tr>"+
  259. "</table>"+
  260. "</div>"+
  261. "<div style='margin-top:10px;'>"+
  262. // "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  263. "</div>",
  264. location:pt
  265. });
  266. }else{
  267. _self.showMessage("无法获取空间信息!")
  268. }
  269. }else if(layerId == "dxsGraphicLayer"){//地下水
  270. if(item.lgtdPc && item.lttdPc && item.lgtdPc>0 && item.lttdPc>0){
  271. pt1 = new Point(item.lgtdPc-0.08,item.lttdPc,new SpatialReference(4326));//用于定位偏移
  272. pt = new Point(item.lgtdPc,item.lttdPc,new SpatialReference(4326));
  273. _self.viewObject.popup.open({
  274. title:item.stnm,
  275. content: "<div>"+
  276. "<table style='width:100%;'>"+
  277. "<tr>"+
  278. "<td>测站类型</td>"+
  279. "<td>"+dxsSttpFormat(item.sttp)+"</td>"+
  280. "</tr>"+
  281. "<tr>"+
  282. "<td>测站位置</td>"+
  283. "<td>"+item.stlc+"</td>"+
  284. "</tr>"+
  285. "<tr>"+
  286. "<td>管理单位</td>"+
  287. "<td>"+item.mnun+"</td>"+
  288. "</tr>"+
  289. "</table>"+
  290. "</div>"+
  291. "<div style='margin-top:10px;'>"+
  292. // "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  293. "</div>",
  294. location:pt
  295. });
  296. }else{
  297. _self.showMessage("无法获取空间信息!")
  298. }
  299. }else if(layerId == "graphicLayerQsk"){//取水口
  300. if(item.centerX && item.centerY && item.centerX>0 && item.centerY>0){
  301. pt1 = new Point(item.centerX-0.08,item.centerY,new SpatialReference(4326));//用于定位偏移
  302. pt = new Point(item.centerX,item.centerY,new SpatialReference(4326));
  303. _self.viewObject.popup.open({
  304. title:item.stnm,
  305. content: "<div>"+
  306. "<table style='width:100%;'>"+
  307. "<tr>"+
  308. "<td>取水方式</td>"+
  309. "<td>"+qsFormat(item.wintType)+"</td>"+
  310. "</tr>"+
  311. "<tr>"+
  312. "<td>取水口位置</td>"+
  313. "<td>"+item.wintPos+"</td>"+
  314. "</tr>"+
  315. "<tr>"+
  316. "<td>管理单位</td>"+
  317. "<td>"+item.admName+"</td>"+
  318. "</tr>"+
  319. "</table>"+
  320. "</div>"+
  321. "<div style='margin-top:10px;'>"+
  322. // "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  323. "</div>",
  324. location:pt
  325. });
  326. }else{
  327. _self.showMessage("无法获取空间信息!")
  328. }
  329. }else if(layerId == "graphicLayerDbssyd"){//地表水水源地
  330. if(item.swhsLong && item.swhsLat && item.swhsLong>0 && item.swhsLat>0){
  331. pt1 = new Point(item.swhsLong-0.08,item.swhsLat,new SpatialReference(4326));//用于定位偏移
  332. pt = new Point(item.swhsLong,item.swhsLat,new SpatialReference(4326));
  333. _self.viewObject.popup.open({
  334. title:item.swhsName,
  335. content: "<div>"+
  336. "<table style='width:100%;'>"+
  337. "<tr>"+
  338. "<td>测站类型</td>"+
  339. "<td>"+dbssydFormat(item.wainWasoType)+"</td>"+
  340. "</tr>"+
  341. "<tr>"+
  342. "<td>测站位置</td>"+
  343. "<td>"+item.swhsLoc+"</td>"+
  344. "</tr>"+
  345. "<tr>"+
  346. "<td>管理单位</td>"+
  347. "<td>"+item.insName+"</td>"+
  348. "</tr>"+
  349. "</table>"+
  350. "</div>"+
  351. "<div style='margin-top:10px;'>"+
  352. // "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  353. "</div>",
  354. location:pt
  355. });
  356. }else{
  357. _self.showMessage("无法获取空间信息!")
  358. }
  359. }else if(layerId == "graphicLayerSwz"){//水文站
  360. if(item.lgtd && item.lttd && item.lgtd>0 && item.lttd>0){
  361. pt1 = new Point(item.lgtd-0.08,item.lttd,new SpatialReference(4326));//用于定位偏移
  362. pt = new Point(item.lgtd,item.lttd,new SpatialReference(4326));
  363. _self.viewObject.popup.open({
  364. title:item.stnm,
  365. content: "<div>"+
  366. "<table style='width:100%;'>"+
  367. "<tr>"+
  368. "<td>测站类型</td>"+
  369. "<td>"+swzFormat(item.sttp)+"</td>"+
  370. "</tr>"+
  371. "<tr>"+
  372. "<td>测站位置</td>"+
  373. "<td>"+item.stlc+"</td>"+
  374. "</tr>"+
  375. "<tr>"+
  376. "<td>隶属单位</td>"+
  377. "<td>"+item.atcunit+"</td>"+
  378. "</tr>"+
  379. "</table>"+
  380. "</div>"+
  381. "<div style='margin-top:10px;'>"+
  382. // "<p style='margin:0px;color: #1311129c;'>提示:点击图标查看详细信息</p>"+
  383. "</div>",
  384. location:pt
  385. });
  386. }else{
  387. _self.showMessage("无法获取空间信息!")
  388. }
  389. }else if(layerId == "allSkGraphicLayer"){//所有水库
  390. var feature = item;
  391. pt1 = new Point(item.longitude-0.08,item.latitude,new SpatialReference(4326));//用于定位偏移
  392. pt = new Point(item.longitude,item.latitude,new SpatialReference(4326));
  393. var str = '<div id="edituser">水库编码:&nbsp;&nbsp;'+feature.rsCode+'<br>'+'督查状态:&nbsp;&nbsp;'+feature.status+'<br>'+'所在位置:&nbsp;&nbsp;'+item.location+
  394. '<div style="display: flex;flex-direction: row;">'+
  395. '<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>'+
  396. '</div></div>';
  397. _self.viewObject.popup.open({
  398. title:item.rsName,
  399. content:_self.initHtml(str),
  400. location:pt
  401. });
  402. }else if(layerId == "skGraphicLayer2018"){//2018水库
  403. var feature = item;
  404. pt1 = new Point(item.longitude-0.08,item.latitude,new SpatialReference(4326));//用于定位偏移
  405. pt = new Point(item.longitude,item.latitude,new SpatialReference(4326));
  406. var str = '<div id="edituser">水库编码:&nbsp;&nbsp;'+feature.rsCode+'<br>'+'督查状态:&nbsp;&nbsp;'+feature.status+'<br>'+'所在位置:&nbsp;&nbsp;'+item.location+
  407. '<div style="display: flex;flex-direction: row;">'+
  408. '<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>'+
  409. '<div style="width:85px;cursor:pointer;color: #001fff;"><span @click="addSkToPlan('+"'"+feature.rsCode+"',"+"'"+feature.rsName+"',"+"'"+feature.longitude+"',"+"'"+feature.latitude+"'"+')" style="border-bottom: 1px solid blue;">'+'加入督查计划'+'</span></div>'+
  410. '</div></div>';
  411. _self.viewObject.popup.open({
  412. title:item.rsName,
  413. content:_self.initHtml(str),
  414. location:pt
  415. });
  416. }else if(layerId == "skGraphicLayer2019"){//2019水库
  417. var feature = item;
  418. pt1 = new Point(item.longitude-0.08,item.latitude,new SpatialReference(4326));//用于定位偏移
  419. pt = new Point(item.longitude,item.latitude,new SpatialReference(4326));
  420. var str = '<div id="edituser">水库编码:&nbsp;&nbsp;'+feature.rsCode+'<br>'+'督查状态:&nbsp;&nbsp;'+feature.status+'<br>'+'所在位置:&nbsp;&nbsp;'+item.location+
  421. '<div style="display: flex;flex-direction: row;">'+
  422. '<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>'+
  423. '<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>'+
  424. '</div></div>';
  425. _self.viewObject.popup.open({
  426. title:item.rsName,
  427. content:_self.initHtml(str),
  428. location:pt
  429. });
  430. }else if(layerId == "fcskGraphicLayer"){//复查水库
  431. var feature = item;
  432. pt1 = new Point(item.longitude-0.08,item.latitude,new SpatialReference(4326));//用于定位偏移
  433. pt = new Point(item.longitude,item.latitude,new SpatialReference(4326));
  434. var str = '<div id="edituser">水库编码:&nbsp;&nbsp;'+feature.rsCode+'<br>'+'督查状态:&nbsp;&nbsp;'+feature.status+'<br>'+'所在位置:&nbsp;&nbsp;'+item.location+
  435. '<div style="display: flex;flex-direction: row;">'+
  436. '<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>'+
  437. '<div style="width:70px;cursor:pointer;color: #001fff;padding-right: 10px;"><span @click="showSkDcInfo('+"'"+feature.rsCode+"',"+"'"+feature.rsName+"',"+"'"+feature.longitude+"',"+"'"+feature.latitude+"'"+')" style="border-bottom: 1px solid blue;">'+'督查信息'+'</span></div><br>'+
  438. '</div></div>';
  439. _self.viewObject.popup.open({
  440. title:item.rsName,
  441. content:_self.initHtml(str),
  442. location:pt
  443. });
  444. }else if(layerId == "jhwskGraphicLayer"){//计划外水库
  445. var feature = item;
  446. pt1 = new Point(item.longitude-0.08,item.latitude,new SpatialReference(4326));//用于定位偏移
  447. pt = new Point(item.longitude,item.latitude,new SpatialReference(4326));
  448. var str = '<div id="edituser">水库编码:&nbsp;&nbsp;'+feature.rsCode+'<br>'+'督查状态:&nbsp;&nbsp;'+feature.status+'<br>'+'所在位置:&nbsp;&nbsp;'+item.location+
  449. '<div style="display: flex;flex-direction: row;">'+
  450. '<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>'+
  451. '<div style="width:85px;cursor:pointer;color: #001fff;"><span @click="addSkToPlan('+"'"+feature.rsCode+"',"+"'"+feature.rsName+"',"+"'"+feature.longitude+"',"+"'"+feature.latitude+"'"+')" style="border-bottom: 1px solid blue;">'+'加入督查计划'+'</span></div>'+
  452. '</div></div>';
  453. _self.viewObject.popup.open({
  454. title:item.rsName,
  455. content:_self.initHtml(str),
  456. location:pt
  457. });
  458. }else if(layerId == "bjGraphicLayer"){//标记
  459. var feature = item;
  460. pt1 = new Point(item.lgtd-0.14,item.lttd,new SpatialReference(4326));//用于定位偏移
  461. pt = new Point(item.lgtd,item.lttd,new SpatialReference(4326));
  462. var str = "<div>"+
  463. "<div>"+
  464. "<div style='display: flex;padding: 5px;'>"+
  465. "<p style='font-size: 14px;padding: 5px;'>名称:</p>"+
  466. "<input type='text' id='nameId' style='height: 33px;width: 216px;' value="+feature.inteName+">"+
  467. "</div>"+
  468. "<div style='display: flex;padding: 5px;'>"+
  469. "<p style='font-size: 14px;padding: 5px;'>备注:</p>"+
  470. "<textarea id='noteId' rows='6' cols='28' style='width: 216px;'value="+feature.des+">"+feature.des+
  471. "</textarea>"+
  472. "</div>"+
  473. "</div>"+
  474. "<div style='margin-top:10px;float: right;'>"+
  475. "<button type='button' style='margin-right: 20px;width: 50px;' @click='cancelHandler()'>取消</button>"+
  476. '<button type="button" style="width: 50px;" @click="editHandler('+"'"+feature.id+"',"+"'"+feature.inteName+"',"+"'"+feature.des+"'"+')">保存</button>'+
  477. "</div>"+
  478. "</div>";
  479. _self.viewObject.popup.open({
  480. title:'',
  481. content:_self.initHtml(str),
  482. location:pt
  483. });
  484. }
  485. if(pt){
  486. if(layerId == "country150Layer"){
  487. _self.viewObject.goTo({
  488. target:pt1,
  489. zoom:8
  490. }).then((info)=>{
  491. _self.afterLocation()
  492. })
  493. }else{
  494. _self.viewObject.goTo({
  495. target:pt1,
  496. zoom:12
  497. }).then((info)=>{
  498. _self.afterLocation()
  499. })
  500. }
  501. }
  502. });
  503. }