ComprehensiveAnalysis.vue 94 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041
  1. <template>
  2. <div
  3. class="comprehensive-analysis"
  4. v-loading="layerLoading"
  5. element-loading-text="拼命加载中"
  6. element-loading-spinner="el-icon-loading"
  7. element-loading-background="rgba(0, 0, 0, 0.8)"
  8. >
  9. <div class="comprehensive-analysis-basemapswitch">
  10. <div
  11. class="basemapBox"
  12. :style="{
  13. backgroundImage: 'url(' + baseMapCollectionArr[0].imgUrl + ')',
  14. }"
  15. @mouseenter="showMapList(baseMapCollectionArr[0].type)"
  16. >
  17. <div class="basemapBox-titlebox">
  18. {{ baseMapCollectionArr[0].type }}
  19. </div>
  20. <div
  21. class="basemapBox-panel"
  22. v-show="satImgChecked"
  23. @mouseleave="closePanelEvent"
  24. >
  25. <div
  26. class="panel-item"
  27. v-for="item in mapList[baseMapCollectionArr[0].type]"
  28. :key="item.mapName"
  29. @click="changeBaseMap(item)"
  30. >
  31. {{ item.abbr }}
  32. </div>
  33. </div>
  34. </div>
  35. <div
  36. class="basemapBox"
  37. :style="{
  38. backgroundImage: 'url(' + baseMapCollectionArr[1].imgUrl + ')',
  39. }"
  40. @mouseenter="showMapList(baseMapCollectionArr[1].type)"
  41. >
  42. <div class="basemapBox-titlebox">
  43. {{ baseMapCollectionArr[1].type }}
  44. </div>
  45. <div
  46. class="basemapBox-panel"
  47. v-show="airImgChecked"
  48. @mouseleave="closePanelEvent"
  49. >
  50. <div
  51. class="panel-item"
  52. v-for="item in mapList[baseMapCollectionArr[1].type]"
  53. :key="item.mapName"
  54. @click="changeBaseMap(item)"
  55. >
  56. {{ item.abbr }}
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. <LawPopup class="comprehensive-analysis-law-popup" />
  62. <LabelCasePopup
  63. class="comprehensive-analysis-label-popup"
  64. style="left: 40%"
  65. v-if="updateCasePopupShow"
  66. ref="updateLabelRef"
  67. @close="closeLabelEvent"
  68. @save="modifyLabelEvent"
  69. />
  70. <div
  71. class="comprehensive-analysis-backbtn"
  72. @click="backEvent"
  73. v-if="$store.state.backMenu.index && $store.state.backMenu.subIndex"
  74. >
  75. <div class="left-arrow"></div>
  76. <div class="title">返回上级</div>
  77. </div>
  78. <div class="comprehensive-analysis-searchbox">
  79. <el-input placeholder="请输入地名地址" v-model="addressInput">
  80. <el-button
  81. type="primary"
  82. slot="append"
  83. icon="el-icon-search"
  84. style="vertical-align: bottom"
  85. ></el-button>
  86. </el-input>
  87. </div>
  88. <div class="comprehensive-analysis-infobox">
  89. 当前显示的疑点数 : &nbsp;<span>{{ currentTotal }}</span>
  90. </div>
  91. <div class="comprehensive-analysis-leftjuanlianInfo" v-show="showJLInfo">
  92. {{ basemapName }}
  93. </div>
  94. <div class="comprehensive-analysis-rightjuanlianInfo" v-show="showJLInfo">
  95. sat2018-s2
  96. </div>
  97. <!-- 属性弹窗 -->
  98. <AttributePopup
  99. class="comprehensive-analysis-popup"
  100. v-if="attrTableShow"
  101. :boxWidth="boxWidth"
  102. :boxHeight="boxHeight"
  103. :tableType="tableType"
  104. :tableData="tableData"
  105. @close="closeEvent"
  106. />
  107. <!-- 图例 -->
  108. <Legend
  109. v-show="legendShow"
  110. class="comprehensive-analysis-legendbox"
  111. :legendData="{
  112. boxWidth: '230',
  113. boxHeight: legendHeight,
  114. menuIndex: '3',
  115. legendIcon: legendIcon,
  116. legendTitle: legendTitle,
  117. leftWidth: '30%',
  118. rightWidth: '70%',
  119. rightItemWidth: '120',
  120. }"
  121. />
  122. <!-- 开启左边面板的控制按钮 -->
  123. <div class="comprehensive-analysis-leftopenbox" v-show="leftBoxBtn">
  124. <div @click="leftPanelDisplay('show')"><div></div></div>
  125. </div>
  126. <!-- 开启右边面板的控制按钮 -->
  127. <div class="comprehensive-analysis-rightopenbox" v-show="rightBoxBtn">
  128. <div @click="rightPanelDisplay('show')"><div></div></div>
  129. </div>
  130. <!-- 左侧面板的显示与隐藏 -->
  131. <transition name="fade-left">
  132. <div class="comprehensive-analysis-left" v-show="showLeftBox">
  133. <div class="close-btnbox">
  134. <div @click="leftPanelDisplay('hide')"><div></div></div>
  135. </div>
  136. <div class="control-container">
  137. <el-input
  138. class="control-container-input"
  139. v-model="filterText"
  140. placeholder="请输入搜索内容"
  141. ></el-input>
  142. <NewSelect
  143. class="control-container-select"
  144. :placeholder="'请选择街镇'"
  145. v-model="townSelectVal"
  146. :options="townOptions"
  147. :value="townSelectVal"
  148. @selectEvent="changeTownEvent"
  149. />
  150. <el-tooltip
  151. effect="light"
  152. :content="isLeftLock ? '解锁面板' : '锁定面板'"
  153. placement="bottom-end"
  154. >
  155. <div
  156. :class="{ 'lock-style': isLeftLock }"
  157. class="control-container-pin-btn"
  158. @click="leftPanelLock"
  159. ></div>
  160. </el-tooltip>
  161. </div>
  162. <div class="contant-container">
  163. <div class="contant-container-innerbox">
  164. <el-tree
  165. :data="modelData"
  166. :props="defaultProps"
  167. @check-change="handleCheckChange"
  168. node-key="id"
  169. ref="tree"
  170. :filter-node-method="filterNode"
  171. :default-expanded-keys="expandedKeys"
  172. >
  173. <span class="custom-tree-node" slot-scope="{ node }">
  174. <template
  175. v-if="
  176. node.data.mainType === '所有图层' ||
  177. node.data.mainType === '我的模型' ||
  178. node.data.mainType === '疑点问题' ||
  179. node.data.mainType === '我的图层'
  180. "
  181. >
  182. <el-checkbox
  183. v-model="node.checked"
  184. style="position: relative; width: 100%"
  185. >
  186. <el-tooltip
  187. class="item"
  188. effect="light"
  189. :content="node.label"
  190. placement="top-start"
  191. >
  192. <div class="custom-tree-node-item">
  193. {{ node.label }}
  194. </div>
  195. </el-tooltip>
  196. <span
  197. ><el-button
  198. size="normal"
  199. type="text"
  200. icon="el-icon-location"
  201. @click="locateEvent(node)"
  202. style="position: absolute; right: -30px; top: -12px"
  203. ></el-button
  204. ></span>
  205. <span style="position: absolute; right: -80px; top: -9px">
  206. <el-button
  207. v-if="node.parent.label === '我的模型'"
  208. size="small"
  209. type="text"
  210. icon="el-icon-edit"
  211. @click="handleUpdate(node)"
  212. ></el-button>
  213. <el-button
  214. v-if="node.parent.label === '我的模型'"
  215. size="small"
  216. type="text"
  217. icon="el-icon-delete"
  218. @click="handleDelete(node)"
  219. ></el-button>
  220. </span>
  221. </el-checkbox>
  222. </template>
  223. <template v-else-if="node.data.mainType === '预设模型'">
  224. <el-checkbox
  225. v-model="node.checked"
  226. :disabled="
  227. node.data.disabled ||
  228. (caseAuditEventStatus == true &&
  229. $store.state.preModelLayerMap.length > 0 &&
  230. $store.state.preModelLayerMap.indexOf(node.data.id) ==
  231. -1)
  232. "
  233. style="position: relative; width: 100%"
  234. >
  235. <el-tooltip
  236. class="item"
  237. effect="light"
  238. :content="node.label"
  239. placement="top-start"
  240. >
  241. <div class="custom-tree-node-item">
  242. {{ node.label }} {{ node.id }}
  243. </div>
  244. </el-tooltip>
  245. <span
  246. ><el-button
  247. size="normal"
  248. type="text"
  249. icon="el-icon-location"
  250. @click="locateEvent(node)"
  251. style="position: absolute; right: -30px; top: -12px"
  252. ></el-button
  253. ></span>
  254. </el-checkbox>
  255. </template>
  256. <template v-else>
  257. <div
  258. :class="{
  259. 'tree-arrow': !node.expanded,
  260. 'tree-arrow-expanded': node.expanded,
  261. }"
  262. ></div>
  263. <span>{{ node.label }}</span>
  264. </template>
  265. </span>
  266. </el-tree>
  267. </div>
  268. </div>
  269. </div>
  270. </transition>
  271. <!-- 右侧面板的显示与隐藏 -->
  272. <transition name="fade-right">
  273. <div class="comprehensive-analysis-right" v-show="showRightBox">
  274. <div class="close-btnbox">
  275. <div @click="rightPanelDisplay('hide')"><div></div></div>
  276. </div>
  277. <div class="control-container">
  278. <el-tooltip
  279. effect="light"
  280. :content="isRightLock ? '解锁面板' : '锁定面板'"
  281. placement="bottom-start"
  282. >
  283. <div
  284. :class="{ 'lock-style': isRightLock }"
  285. @click="rightPanelLock"
  286. ></div>
  287. </el-tooltip>
  288. </div>
  289. <div class="contant-container">
  290. <div class="contant-container-innerbox">
  291. <el-collapse v-model="activeNames">
  292. <el-collapse-item
  293. v-for="key in Object.keys(originalData)"
  294. :key="key"
  295. :name="key"
  296. >
  297. <template slot="title">
  298. <div class="status-select" @mouseenter="panelMouseEnter(key)">
  299. <div class="title">{{ key }}</div>
  300. <NewSelect
  301. style="width: 100px"
  302. :placeholder="'请选择排序方式'"
  303. v-model="statusSelectVal"
  304. :options="statusOptions"
  305. :value="statusSelectVal"
  306. @selectEvent="changeSortMethod"
  307. />
  308. </div>
  309. </template>
  310. <div
  311. class="panel-list-item"
  312. v-for="(v, i) in originalData[key]"
  313. :key="v.id"
  314. @dblclick="locateCase(v)"
  315. >
  316. <div>
  317. {{
  318. v.title +
  319. "_" +
  320. ((paginationData.currentPage - 1) * currentPageSize +
  321. (i + 1))
  322. }}
  323. </div>
  324. <span class="normal-icon">
  325. <span
  326. v-if="v.mainType === '预设模型' && v.c_boolean === '疑点'"
  327. style="color: rgb(0, 230, 255)"
  328. >{{ v.c_boolean }}</span
  329. >
  330. <span
  331. v-else-if="
  332. v.mainType === '预设模型' && v.c_boolean === '非疑点'
  333. "
  334. style="color: rgb(0, 100, 240)"
  335. >{{ v.c_boolean }}</span
  336. >
  337. <span
  338. v-else-if="
  339. v.mainType === '预设模型' && v.c_boolean === '未标记'
  340. "
  341. >{{ v.c_boolean }}</span
  342. >
  343. <el-button
  344. size="normal"
  345. type="text"
  346. icon="el-icon-location"
  347. @click.stop="locateCase(v)"
  348. ></el-button
  349. ><el-button
  350. size="normal"
  351. type="text"
  352. icon="el-icon-more"
  353. @click.stop="listItemClick('default', v)"
  354. ></el-button>
  355. </span>
  356. <!-- {{ v.column_name + "_" + (i + 1) }} -->
  357. </div>
  358. <div class="panel-footer" @mouseenter="panelMouseEnter(key)">
  359. <Pagination :paginationData="paginationData" />
  360. </div>
  361. </el-collapse-item>
  362. <el-collapse-item name="myLabel">
  363. <template slot="title">
  364. 我的标记
  365. <div class="all-icon">
  366. <div
  367. class="all-icon-locate"
  368. @click.stop="labelAllLocate"
  369. ></div>
  370. <div
  371. class="all-icon-visible"
  372. :class="{ click: labelAllVisibleChecked }"
  373. @click.stop="labelAllVisible"
  374. ></div>
  375. </div>
  376. </template>
  377. <div
  378. class="panel-list-item"
  379. v-for="(item, index) in rightLabelData"
  380. :key="item.id"
  381. >
  382. <div @click="listItemClick('new', item)">
  383. {{ item.name ? item.name : `疑点${index}` }}
  384. </div>
  385. <span class="operation-icon"
  386. ><el-button
  387. size="normal"
  388. type="text"
  389. icon="el-icon-edit"
  390. @click="updateLabel(item)"
  391. ></el-button
  392. ><el-button
  393. size="normal"
  394. type="text"
  395. icon="el-icon-delete"
  396. @click="deleteLabel(item.id)"
  397. ></el-button
  398. ></span>
  399. <span
  400. class="visible-icon"
  401. :class="{ click: item.geometryChecked }"
  402. @click="controlLabel(item)"
  403. ></span>
  404. </div>
  405. </el-collapse-item>
  406. </el-collapse>
  407. </div>
  408. </div>
  409. </div>
  410. </transition>
  411. </div>
  412. </template>
  413. <script>
  414. // 综合分析 this.$store.state.leftMenuTitle
  415. import MenuCard from "@/components/layout/MenuCard.vue";
  416. import Legend from "@/components/map/Legend.vue";
  417. import Pagination from "@/components/common/Pagination.vue";
  418. import NewSelect from "@/components/common/NewSelect.vue";
  419. import publicFun from "@/utils/publicFunction.js";
  420. import AttributePopup from "@/components/popup/AttributePopup.vue";
  421. import LabelCasePopup from "@/components/popup/LabelCasePopup.vue";
  422. import LawPopup from "@/components/popup/LawPopup.vue";
  423. export default {
  424. name: "ComprehensiveAnalysis",
  425. components: {
  426. MenuCard,
  427. Legend,
  428. AttributePopup,
  429. LawPopup,
  430. LabelCasePopup,
  431. Pagination,
  432. NewSelect,
  433. },
  434. data() {
  435. return {
  436. displaySortSelect: false,
  437. basemapName: "",
  438. caseAuditEventStatus: false,
  439. satImgChecked: false,
  440. airImgChecked: false,
  441. basemapChecked: "",
  442. mapList: {
  443. 卫星影像: [],
  444. 航空影像: [],
  445. },
  446. baseMapCollectionArr: [
  447. {
  448. id: 1,
  449. type: "卫星影像",
  450. imgUrl: require("../assets/map/sat_img.png"),
  451. },
  452. {
  453. id: 2,
  454. type: "航空影像",
  455. imgUrl: require("../assets/map/air_img.png"),
  456. },
  457. ],
  458. showJLInfo: false,
  459. // 存储图斑颜色
  460. collectColorMapIndex: 0,
  461. collectColorMap: new Map(),
  462. targetLayerPage: {},
  463. targetLayerTotal: {},
  464. currentTotal: 0,
  465. layerLoading: false,
  466. expandedKeys: [],
  467. // 我的模型id集合
  468. myModelIdMap: new Map(),
  469. // 第一层数据集合
  470. firstLevelIdMap: new Map(),
  471. problemIdMap: new Map(),
  472. // 下拉框镇集合
  473. townSelectTreeMap: new Map(),
  474. // 所有图层 -- 根据镇域划分的数据集合
  475. allLayersByTownMap: new Map(),
  476. labelAllVisibleChecked: true,
  477. townSelectVal: "老港镇",
  478. townOptions: [],
  479. statusSelectVal: "",
  480. statusOptions: [
  481. {
  482. value: "未标记",
  483. label: "未标记",
  484. },
  485. {
  486. value: "疑点",
  487. label: "疑点",
  488. },
  489. {
  490. value: "非疑点",
  491. label: "非疑点",
  492. },
  493. ],
  494. enteredPanelId: "",
  495. enteredColumnId: "",
  496. enteredMainType: "",
  497. enteredSourceType: "",
  498. uploadBaseUrl: "/dms",
  499. classTextToIndex: {},
  500. addressInput: "",
  501. legendShow: false,
  502. tableType: "normal",
  503. tableData: [],
  504. legendHeight: "0",
  505. boxWidth: "600",
  506. boxHeight: "400",
  507. activeNames: ["myLabel"],
  508. rightPanelTitle: "",
  509. rightPanelDataMap: new Map(),
  510. originalData: {},
  511. originalDataMap: new Map(),
  512. rightLabelData: [],
  513. showLeftBox: true,
  514. showRightBox: true,
  515. leftBoxBtn: false,
  516. rightBoxBtn: false,
  517. modelData: [],
  518. defaultProps: {
  519. children: "children",
  520. label: "label",
  521. },
  522. legendIcon: [],
  523. legendTitle: [],
  524. // 我的模型相关数据
  525. myModel: null,
  526. filterText: "",
  527. // 存放对应图层的坐标
  528. treeCoordMap: new Map(),
  529. layerIdMap: new Map(),
  530. isLeftLock: true,
  531. isRightLock: true,
  532. currentPage: 1,
  533. currentPageSize: 10,
  534. paginationData: {
  535. pageSize: 10,
  536. pagerCount: 5,
  537. currentPage: 1,
  538. pageSizes: [5, 10, 20, 30],
  539. total: 50,
  540. currentChange: (val) => {
  541. let columnId = this.enteredColumnId;
  542. let currentPageSize = this.currentPageSize;
  543. let panelId = this.enteredPanelId;
  544. let mainType = this.enteredMainType;
  545. let sourceType = this.enteredSourceType;
  546. this.changeSingleLayer(
  547. val,
  548. currentPageSize,
  549. columnId,
  550. panelId,
  551. mainType,
  552. sourceType
  553. );
  554. },
  555. handleSizeChange: (val) => {
  556. this.handleSizeChange(val);
  557. },
  558. },
  559. };
  560. },
  561. computed: {
  562. // 监听卷帘对比状态
  563. getJLStatus() {
  564. return this.$store.state.jlActiveState;
  565. },
  566. // 监听底部菜单栏状态 -- 仅针对疑点审计
  567. getAuditBtnStatus() {
  568. let _index = this.$store.state.bottomMenuIndexs.index;
  569. let _subIndex = this.$store.state.bottomMenuIndexs.subIndex;
  570. return {
  571. index: _index,
  572. subIndex: _subIndex,
  573. };
  574. },
  575. getCustomModel() {
  576. return this.$store.state.customModelsArr;
  577. },
  578. getLeftMenuTitle() {
  579. return this.$store.state.leftMenuTitle;
  580. },
  581. getMyLabelData() {
  582. return this.$store.getters.myLabelPointsArr;
  583. },
  584. getMyPoints() {
  585. return map2DViewer.myLabels;
  586. },
  587. attrTableShow: {
  588. get() {
  589. return this.$store.state.attrTableShow;
  590. },
  591. set(val) {
  592. this.$store.state.attrTableShow = val;
  593. },
  594. },
  595. updateCasePopupShow: {
  596. get() {
  597. return this.$store.state.updateCasePopupShow;
  598. },
  599. set(val) {
  600. this.$store.state.updateCasePopupShow = val;
  601. },
  602. },
  603. uploadDataArr() {
  604. return uploadDataIdArr;
  605. },
  606. },
  607. watch: {
  608. townSelectVal: {
  609. handler(val) {
  610. // console.log(val, "综合分析当前选中的值");
  611. },
  612. immediate: true,
  613. },
  614. // 监听底部菜单栏
  615. getJLStatus(val) {
  616. console.log("监听底部菜单栏 ----- 卷帘对比", val);
  617. if (val) {
  618. this.showJLInfo = true;
  619. } else {
  620. this.showJLInfo = false;
  621. }
  622. },
  623. // 控制全选的显示或隐藏
  624. labelAllVisibleChecked(val) {
  625. if (this.rightLabelData.length > 0) {
  626. this.rightLabelData.forEach((item) => {
  627. this.controlLabel(item);
  628. });
  629. if (val) {
  630. this.labelAllLocate();
  631. }
  632. }
  633. },
  634. "$store.state.navSelect": {
  635. handler(val, oldVal) {
  636. if (
  637. (val.index === "1" || val.index === "2") &&
  638. oldVal.index &&
  639. oldVal.index === "3"
  640. ) {
  641. // 不进入综合分析页面 -- 切换回暗黑地图
  642. if (!map2DViewer.map.hasLayer(map2DViewer.layers["darkmap"])) {
  643. map2DViewer.map.hasLayer(map2DViewer.layers["imagery"]) &&
  644. map2DViewer.map.removeLayer(map2DViewer.layers["imagery"]);
  645. map2DViewer.map.hasLayer(map2DViewer.layers["imagery2"]) &&
  646. map2DViewer.map.removeLayer(map2DViewer.layers["imagery2"]);
  647. map2DViewer.map.addLayer(map2DViewer.layers["darkmap"]);
  648. }
  649. this.clearAllData();
  650. this.labelAllVisibleChecked = false;
  651. }
  652. if (val.index === "3") {
  653. // 默认切换为最新航空影像图
  654. if (!map2DViewer.map.hasLayer(map2DViewer.layers["imagery"])) {
  655. map2DViewer.map.hasLayer(map2DViewer.layers["darkmap"]) &&
  656. map2DViewer.map.removeLayer(map2DViewer.layers["darkmap"]);
  657. map2DViewer.map.hasLayer(map2DViewer.layers["imagery2"]) &&
  658. map2DViewer.map.removeLayer(map2DViewer.layers["imagery2"]);
  659. map2DViewer.map.addLayer(map2DViewer.layers["imagery"]);
  660. }
  661. // console.log("进入综合分析页面 -- 默认展开老港镇数据");
  662. setTimeout(() => {
  663. this.changeTownEvent(this.townSelectVal);
  664. }, 1000);
  665. // 如果没有初始化设置
  666. if (!map2DViewer.groups["我的标记图层组"]) {
  667. this.getUserMarkers();
  668. this.activeNames = ["myLabel"];
  669. }
  670. this.labelAllVisibleChecked = true;
  671. // 进入该页面后监听地图移动事件
  672. map2DViewer.map.on("move", (e) => {
  673. if (!this.isLeftLock) {
  674. this.showLeftBox = false;
  675. this.leftBoxBtn = true;
  676. }
  677. if (!this.isRightLock) {
  678. this.showRightBox = false;
  679. this.rightBoxBtn = true;
  680. }
  681. });
  682. }
  683. },
  684. deep: true,
  685. },
  686. uploadDataArr: {
  687. handler(val) {
  688. if (val.length > 0) {
  689. // console.log(val, "uploadDataIdArr");
  690. }
  691. },
  692. immediate: true,
  693. deep: true,
  694. },
  695. getLeftMenuTitle: {
  696. handler(val) {
  697. this.$nextTick(() => {
  698. // 从疑点筛查进入综合分析页面默认勾选
  699. if (defaultModelNameMap.has(val)) {
  700. setTimeout(() => {
  701. this.expandedKeys.push(defaultModelNameMap.get(val));
  702. // 设置默认勾选项
  703. this.$refs.tree.setCheckedKeys([defaultModelNameMap.get(val)]);
  704. this.$refs.tree.setCurrentKey(defaultModelNameMap.get(val));
  705. let nodeData = this.$refs.tree.getCurrentNode();
  706. this.handleCheckChange(nodeData, true);
  707. }, 1000);
  708. }
  709. });
  710. },
  711. immediate: true,
  712. },
  713. legendTitle(val) {
  714. // console.log(val, "监听当前图例item数量");
  715. if (val.length === 0) {
  716. this.legendShow = false;
  717. }
  718. if (val.length > 0 && val.length <= 10) {
  719. this.legendShow = true;
  720. this.legendHeight = 50 * val.length + 50 + "";
  721. }
  722. },
  723. filterText(val) {
  724. this.$refs.tree.filter(val);
  725. },
  726. getCustomModel: {
  727. handler(val) {
  728. // console.log(val, "目前存在的自定义模型");
  729. this.getMyModelData();
  730. },
  731. deep: true,
  732. },
  733. getMyLabelData: {
  734. handler(val) {
  735. // console.log("标记点保存事件成功,允许开始定位");
  736. this.rightLabelData = [];
  737. if (val.length > 0) {
  738. let _myLabelPointsItem = {};
  739. let _myLabelPointsItemState = false;
  740. this.rightLabelData = val.map((v, i) => {
  741. let data = JSON.parse(v.geojson);
  742. if (
  743. sessionStorage.getItem("myLabelPointsId") &&
  744. sessionStorage.getItem("myLabelPointsId") == v.id
  745. ) {
  746. sessionStorage.removeItem("myLabelPointsId");
  747. _myLabelPointsItemState = true;
  748. _myLabelPointsItem = {
  749. id: v.id,
  750. name: data.properties.name,
  751. coord: data.geometry.coordinates[0][0],
  752. type: data.properties.title,
  753. des: data.properties.desc,
  754. geojson: v.geojson,
  755. geometryChecked: false,
  756. featureType: data.properties.featureType,
  757. };
  758. return _myLabelPointsItem;
  759. }
  760. return {
  761. id: v.id,
  762. name: data.properties.name,
  763. coord: data.geometry.coordinates[0][0],
  764. type: data.properties.title,
  765. des: data.properties.desc,
  766. geojson: v.geojson,
  767. geometryChecked: false,
  768. featureType: data.properties.featureType,
  769. };
  770. });
  771. if (_myLabelPointsItemState) {
  772. setTimeout(() => {
  773. this.controlLabel(_myLabelPointsItem);
  774. if (map2DViewer.groups["我的标记图层组"]) {
  775. map2DViewer.map.fitBounds(
  776. map2DViewer.groups["我的标记图层组"].getBounds()
  777. );
  778. }
  779. }, 300);
  780. } else {
  781. setTimeout(() => {
  782. if (this.rightLabelData.length > 0) {
  783. this.rightLabelData.forEach((item) => {
  784. this.controlLabel(item);
  785. });
  786. if (map2DViewer.groups["我的标记图层组"]) {
  787. map2DViewer.map.fitBounds(
  788. map2DViewer.groups["我的标记图层组"].getBounds()
  789. );
  790. }
  791. }
  792. }, 300);
  793. }
  794. // console.log(this.rightLabelData, "rightLabelData");
  795. }
  796. },
  797. deep: true,
  798. // immediate: true,
  799. },
  800. },
  801. created() {
  802. this.townOptions = [];
  803. this.classDictQuery("0", "c_task_type", "任务类型");
  804. this.classDictQuery("0", "浦东新区行政区划", "浦东新区行政区划");
  805. setTimeout(() => {
  806. this.getColumnList();
  807. }, 500);
  808. },
  809. mounted() {
  810. // 上传数据后更新我的图层节点
  811. this.$bus.$off("addUploadLayerEvent");
  812. this.$bus.$on("addUploadLayerEvent", (data) => {
  813. if (this.$refs.tree) {
  814. let children = [
  815. {
  816. id: data.id,
  817. label: data.label,
  818. mainType: "我的图层",
  819. children: [],
  820. },
  821. ];
  822. this.$refs.tree.updateKeyChildren(
  823. this.firstLevelIdMap.get("我的图层").id,
  824. children
  825. );
  826. this.expandedKeys.push(this.firstLevelIdMap.get("我的图层").id);
  827. this.$refs.tree.setCheckedKeys([data.id]);
  828. this.$refs.tree.setCurrentKey(data.id);
  829. let nodeData = this.$refs.tree.getCurrentNode();
  830. this.handleCheckChange(nodeData, true);
  831. }
  832. });
  833. this.$bus.$off("viewDetailsPopup");
  834. this.$bus.$on("viewDetailsPopup", (data) => {
  835. this.viewDetailsPopup(data);
  836. });
  837. // 我的任务页面,用户点击已审核的任务时:
  838. this.$bus.$off("openMyTask");
  839. this.$bus.$on("openMyTask", (data) => {
  840. console.log(
  841. `监听到用户点击任务!任务类型Code:${data[0]},所属街道Code:${data[1]}!`
  842. );
  843. this.classTextToIndex["浦东新区行政区划"].forEach((v, i) => {
  844. if (v === data[1]) {
  845. // console.log(i, "当前所属街镇选中");
  846. this.townSelectVal = i;
  847. this.changeTownEvent(i);
  848. }
  849. });
  850. });
  851. // 全流程详细页面,用户点击整改中的某个数据时:
  852. this.$bus.$off("openMyView");
  853. this.$bus.$on("openMyView", (data) => {
  854. if (this.problemIdMap.has("疑点问题")) {
  855. console.log(
  856. this.problemIdMap.get("疑点问题"),
  857. "疑点问题 -- 老港全流程管理"
  858. );
  859. setTimeout(() => {
  860. console.log(
  861. `监听到用户点击全流程详细页面,用户点击整改中的某个数据时:!任务类型Code:${data[0]},所属街道Code:${data[1]}!`
  862. );
  863. this.expandedKeys.push(this.problemIdMap.get("疑点问题").id);
  864. this.$refs.tree.setCheckedKeys([
  865. this.problemIdMap.get("疑点问题").id,
  866. ]);
  867. this.$refs.tree.setCurrentKey(this.problemIdMap.get("疑点问题").id);
  868. let nodeData = this.$refs.tree.getCurrentNode();
  869. this.handleCheckChange(nodeData, true);
  870. }, 1000);
  871. }
  872. });
  873. this.$bus.$off("caseAuditEvent2");
  874. this.$bus.$on("caseAuditEvent2", () => {
  875. this.caseAuditEvent();
  876. });
  877. // 统计标记的疑点或非疑点数并排序
  878. this.$store.state.mapMethodsCollection.set("METHODS", {
  879. changeSortMethod: this.changeSortMethod,
  880. changeCaseBoolean: this.changeCaseBoolean,
  881. });
  882. },
  883. destroy() {
  884. // 当容器销毁时,需要停止监听该事件
  885. this.$bus.$off("viewDetailsPopup");
  886. this.$bus.$off("openMyTask");
  887. this.$bus.$off("openMyView");
  888. this.$bus.$off("caseAuditEvent2");
  889. },
  890. methods: {
  891. // 修改数据中的疑点
  892. changeCaseBoolean(val, status) {
  893. if (this.enteredPanelId) {
  894. let data = this.originalDataMap.get(this.enteredPanelId);
  895. let index;
  896. data.forEach((v, i) => {
  897. if (v.id === val) {
  898. index = i;
  899. }
  900. });
  901. data[index]["c_boolean"] = status;
  902. this.originalDataMap.set(this.enteredPanelId, data);
  903. console.log(data, "修改疑点布尔值");
  904. }
  905. },
  906. // 选择排序方式
  907. changeSortMethod(val) {
  908. if (this.enteredPanelId) {
  909. let data = this.originalDataMap.get(this.enteredPanelId);
  910. // console.log(data, "当前数据过滤");
  911. let arr1 = data.filter((v) => {
  912. return v.c_boolean === "未标记";
  913. });
  914. let arr2 = data.filter((v) => {
  915. return v.c_boolean === "疑点";
  916. });
  917. let arr3 = data.filter((v) => {
  918. return v.c_boolean === "非疑点";
  919. });
  920. switch (val) {
  921. case "未标记":
  922. this.originalDataMap.set(this.enteredPanelId, [
  923. ...arr1,
  924. ...arr2,
  925. ...arr3,
  926. ]);
  927. break;
  928. case "疑点":
  929. this.originalDataMap.set(this.enteredPanelId, [
  930. ...arr2,
  931. ...arr3,
  932. ...arr1,
  933. ]);
  934. break;
  935. case "非疑点":
  936. this.originalDataMap.set(this.enteredPanelId, [
  937. ...arr3,
  938. ...arr2,
  939. ...arr1,
  940. ]);
  941. break;
  942. }
  943. this.changeSingleLayer(
  944. 1,
  945. this.currentPageSize,
  946. this.enteredColumnId,
  947. this.enteredPanelId,
  948. this.enteredMainType,
  949. this.enteredSourceType
  950. );
  951. }
  952. },
  953. // 得到底部菜单疑点审计开启状态
  954. caseAuditEvent() {
  955. this.caseAuditEventStatus = !this.caseAuditEventStatus;
  956. },
  957. closePanelEvent() {
  958. this.satImgChecked = false;
  959. this.airImgChecked = false;
  960. },
  961. changeBaseMap(data) {
  962. if (map2DViewer.map.hasLayer(map2DViewer.layers["imagery"])) {
  963. map2DViewer.map.removeLayer(map2DViewer.layers["imagery"]);
  964. map2DViewer.layers["imagery"] = this.$store.state.mapMethodsCollection
  965. .get("RENDER")
  966. .addTiledMapLayer(data.mapUrl);
  967. map2DViewer.map.addLayer(map2DViewer.layers["imagery"]);
  968. this.basemapName = data.abbr;
  969. }
  970. this.$bus.$emit("reJLControl");
  971. this.satImgChecked = false;
  972. this.airImgChecked = false;
  973. },
  974. // 勾选镇时默认展开当前镇
  975. changeTownEvent(val) {
  976. if (this.townSelectTreeMap.has(val)) {
  977. let children = [];
  978. let data = this.townSelectTreeMap.get(val).data;
  979. if (data.length > 0) {
  980. children = data.map((item1) => {
  981. return {
  982. id: `${item1.title}_${item1.id}`,
  983. label: item1.title,
  984. children:
  985. !item1.columnList || item1.columnList.length === 0
  986. ? []
  987. : item1.columnList.map((item2) => {
  988. this.rightPanelDataMap.set(`${item2.title}_${item2.id}`, {
  989. id: item2.id,
  990. mainType: "所有图层",
  991. sourceType: item1.title,
  992. });
  993. return {
  994. id: `${item2.title}_${item2.id}`,
  995. label: item2.title,
  996. columnId: item2.id,
  997. townId: this.townSelectTreeMap.get(val).id,
  998. townType: val,
  999. sourceId: item1.id,
  1000. sourceType: item1.title,
  1001. mainType: "所有图层",
  1002. color: publicFun.getRGBColor(),
  1003. children: [],
  1004. };
  1005. }),
  1006. };
  1007. });
  1008. }
  1009. if (this.$refs.tree) {
  1010. this.$refs.tree.updateKeyChildren(
  1011. this.firstLevelIdMap.get("所有图层").id,
  1012. children
  1013. );
  1014. this.expandedKeys.push(this.firstLevelIdMap.get("所有图层").id);
  1015. }
  1016. }
  1017. },
  1018. showMapList(val) {
  1019. if (val === "卫星影像" && map2DViewer.baseMapCollection.length > 0) {
  1020. this.mapList["卫星影像"] = map2DViewer.baseMapCollection.filter((v) => {
  1021. return v.basemapType === "1";
  1022. });
  1023. this.satImgChecked = true;
  1024. this.airImgChecked = false;
  1025. }
  1026. if (val === "航空影像" && map2DViewer.baseMapCollection.length > 0) {
  1027. this.mapList["航空影像"] = map2DViewer.baseMapCollection.filter((v) => {
  1028. return v.basemapType === "2";
  1029. });
  1030. this.satImgChecked = false;
  1031. this.airImgChecked = true;
  1032. }
  1033. },
  1034. // 清除页面所有数据
  1035. clearAllData() {
  1036. this.currentTotal = 0;
  1037. this.paginationData.total = 0;
  1038. this.targetLayerTotal = {};
  1039. this.targetLayerPage = {};
  1040. this.originalDataMap.clear();
  1041. this.originalData = {};
  1042. map2DViewer.map.off("move");
  1043. // 所有图层或预设模型全部删除
  1044. if (Object.getOwnPropertyNames(map2DViewer.analysisGroups).length > 0) {
  1045. for (let group in map2DViewer.analysisGroups) {
  1046. // 仅从地图上删除对应图层组
  1047. this.$store.state.mapMethodsCollection
  1048. .get("RENDER")
  1049. .deleteGroupFromMap(group);
  1050. }
  1051. this.$refs.tree.setCheckedKeys([]);
  1052. }
  1053. // map2DViewer.analysisGroups = {};
  1054. map2DViewer.polygons = {};
  1055. this.attrTableShow = false;
  1056. this.updateCasePopupShow = false;
  1057. map2DViewer.map.closePopup();
  1058. },
  1059. // 右侧分页栏图斑定位
  1060. locateCase(data) {
  1061. console.log(data, "locateCase");
  1062. // 将当前点定位到中心位置
  1063. if (map2DViewer.polygons[data.id]) {
  1064. map2DViewer.map.fitBounds(map2DViewer.polygons[data.id].getBounds());
  1065. }
  1066. },
  1067. labelAllLocate() {
  1068. if (map2DViewer.groups["我的标记图层组"]) {
  1069. map2DViewer.map.fitBounds(
  1070. map2DViewer.groups["我的标记图层组"].getBounds()
  1071. );
  1072. }
  1073. },
  1074. labelAllVisible() {
  1075. this.labelAllVisibleChecked = !this.labelAllVisibleChecked;
  1076. },
  1077. panelMouseEnter(val) {
  1078. if (this.rightPanelDataMap.has(val)) {
  1079. this.enteredPanelId = val;
  1080. console.log(this.enteredPanelId, "enteredPanelId");
  1081. this.enteredColumnId = this.rightPanelDataMap.get(val).id;
  1082. this.enteredMainType = this.rightPanelDataMap.get(val).mainType;
  1083. this.enteredSourceType = this.rightPanelDataMap.get(val).sourceType;
  1084. }
  1085. },
  1086. handleSizeChange(val) {
  1087. console.log(`每页 ${val} 条`);
  1088. this.currentPageSize = val;
  1089. this.changeSingleLayer(
  1090. this.currentPage,
  1091. this.currentPageSize,
  1092. this.enteredColumnId,
  1093. this.enteredPanelId,
  1094. this.enteredMainType,
  1095. this.enteredColumnId
  1096. );
  1097. },
  1098. getMapData(uniqueId, columnId, mainType, sourceType) {
  1099. let layerParams = new FormData();
  1100. layerParams = {
  1101. columnId: columnId,
  1102. states: "0,1,2,3",
  1103. pageSize: 500,
  1104. page: this.targetLayerPage[uniqueId],
  1105. };
  1106. if (mainType === "预设模型") {
  1107. this.enteredPanelId = uniqueId;
  1108. let searchParam = [];
  1109. let paramTown = {
  1110. field: "c_xzqh",
  1111. // 等值查询
  1112. searchType: "1",
  1113. content: {
  1114. value: this.classTextToIndex["浦东新区行政区划"].get(
  1115. this.townSelectVal || "老港镇"
  1116. ),
  1117. },
  1118. };
  1119. searchParam.push(paramTown);
  1120. layerParams.search = JSON.stringify(searchParam);
  1121. }
  1122. this.$Post(this.urlsCollection.selectContentList, layerParams).then(
  1123. (res) => {
  1124. if (res.code === 202 && res.content === "数据不存在") {
  1125. this.layerLoading = false;
  1126. // 初始化请求 page为0时,提示无数据
  1127. if (this.targetLayerPage[uniqueId] === 0) {
  1128. this.$message.info("暂无数据!");
  1129. }
  1130. }
  1131. if (res.code === 200) {
  1132. this.layerLoading = false;
  1133. }
  1134. if (res.code === 200 && res.content.data.length > 0) {
  1135. if (!this.$store.state.selectSelectDataMap["singlePolygon"]) {
  1136. this.$store.state.selectSelectDataMap["singlePolygon"] = [];
  1137. }
  1138. // 初始化时将请求到的疑点数据中是否疑点全部改为未标记,疑点,非疑点三种状态
  1139. let changeCaseStatusArr = res.content.data.map((ele) => {
  1140. let targetBoolean = "未标记";
  1141. // 预设模型下的targetBoolean默认是undefined
  1142. if (mainType == "预设模型" && ele.c_boolean == true) {
  1143. targetBoolean = "疑点";
  1144. }
  1145. if (mainType == "预设模型" && ele.c_boolean == false) {
  1146. targetBoolean = "非疑点";
  1147. }
  1148. return {
  1149. id: ele.id,
  1150. column_name: ele.column_name,
  1151. c_boolean: targetBoolean,
  1152. c_xzqh: ele.c_xzqh,
  1153. c_content: ele.c_content,
  1154. c_date_time: ele.c_date_time,
  1155. title: ele.title,
  1156. model_id: ele.model_id,
  1157. column_id: ele.column_id,
  1158. content: ele.content,
  1159. secret_level: ele.secret_level,
  1160. mainType: mainType,
  1161. };
  1162. });
  1163. // 存储请求到的疑点数据
  1164. if (!this.originalDataMap.has(uniqueId)) {
  1165. this.originalDataMap.set(uniqueId, changeCaseStatusArr);
  1166. } else {
  1167. let arr = this.originalDataMap
  1168. .get(uniqueId)
  1169. .concat(changeCaseStatusArr);
  1170. this.originalDataMap.set(uniqueId, arr);
  1171. }
  1172. // 该图层疑点总数
  1173. this.targetLayerTotal[uniqueId] = res.content.count;
  1174. // 分页组件total
  1175. this.paginationData.total =
  1176. this.originalDataMap.get(uniqueId).length;
  1177. // 当前图层id存在
  1178. if (
  1179. map2DViewer.analysisGroups[uniqueId] &&
  1180. this.originalDataMap.get(uniqueId).length > 0 &&
  1181. res.content.data.length > 0
  1182. ) {
  1183. // 统计所有图斑数
  1184. this.currentTotal += res.content.data.length;
  1185. // 请求到数据后直接渲染点
  1186. changeCaseStatusArr.forEach((ele) => {
  1187. let cid = ele.id;
  1188. let geometry = ele.c_content;
  1189. let defaultStatus = ele.c_boolean;
  1190. let modelId = ele.model_id;
  1191. let columnId = ele.column_id;
  1192. let color = this.collectColorMap.get(this.collectColorMapIndex);
  1193. if (defaultStatus === "疑点") {
  1194. color = `rgb(${caseColorChange["isPointColor"][0]},${caseColorChange["isPointColor"][1]},${caseColorChange["isPointColor"][2]})`;
  1195. }
  1196. if (defaultStatus === "非疑点") {
  1197. color = `rgb(${caseColorChange["notPointColor"][0]},${caseColorChange["notPointColor"][1]},${caseColorChange["notPointColor"][2]})`;
  1198. }
  1199. this.$store.state.mapMethodsCollection
  1200. .get("RENDER")
  1201. .addSinglePolygon(
  1202. geometry,
  1203. cid,
  1204. color,
  1205. uniqueId,
  1206. mainType,
  1207. sourceType,
  1208. defaultStatus,
  1209. modelId,
  1210. columnId
  1211. );
  1212. });
  1213. // 所有数据均需要进行分页展示
  1214. // 激活当前展开面板
  1215. this.activeNames = ["myLabel", uniqueId];
  1216. // 用于分页数据
  1217. this.originalData[uniqueId] = this.originalDataMap.get(uniqueId);
  1218. // 进行分页列表展示
  1219. this.changeSingleLayer(
  1220. 1,
  1221. this.currentPageSize,
  1222. columnId,
  1223. uniqueId,
  1224. mainType,
  1225. sourceType
  1226. );
  1227. // 当前图斑数小于数据库中的图斑总数时,递归请求图斑
  1228. if (
  1229. this.originalDataMap.get(uniqueId).length <=
  1230. this.targetLayerTotal[uniqueId]
  1231. ) {
  1232. this.targetLayerPage[uniqueId]++;
  1233. this.getMapData(uniqueId, columnId, mainType, sourceType);
  1234. }
  1235. }
  1236. }
  1237. },
  1238. (error) => {
  1239. this.layerLoading = false;
  1240. if (this.targetLayerPage[uniqueId]) {
  1241. this.$message.error("请求错误!");
  1242. }
  1243. }
  1244. );
  1245. },
  1246. /**
  1247. * 获取图层信息 -- 所有模型和预设模型
  1248. * @columnId
  1249. * @id label_columnId
  1250. * @mainType 所有图层/预设模型
  1251. * @sourceType 土地资源/林地资源/生态资源/水资源/全部
  1252. */
  1253. displaySingleLayer(columnId, id, mainType, sourceType) {
  1254. let uniqueId = id;
  1255. this.layerIdMap.set(uniqueId, uniqueId);
  1256. // 图层未初始化
  1257. if (!map2DViewer.analysisGroups[uniqueId]) {
  1258. // 生成图例时设置初始图层颜色
  1259. if (targetColor.length > this.collectColorMapIndex + 1) {
  1260. this.collectColorMapIndex++;
  1261. } else {
  1262. this.collectColorMapIndex = 0;
  1263. }
  1264. this.collectColorMap.set(
  1265. this.collectColorMapIndex,
  1266. `rgb(${targetColor[this.collectColorMapIndex][0]},${
  1267. targetColor[this.collectColorMapIndex][1]
  1268. },${targetColor[this.collectColorMapIndex][2]})`
  1269. );
  1270. // 图例
  1271. this.legendTitle.push({
  1272. name: uniqueId,
  1273. info: uniqueId,
  1274. });
  1275. this.legendIcon.push({
  1276. name: uniqueId,
  1277. background: "transparent",
  1278. border: `1px solid ${this.collectColorMap.get(
  1279. this.collectColorMapIndex
  1280. )}`,
  1281. });
  1282. map2DViewer.analysisGroups[uniqueId] = L.featureGroup();
  1283. map2DViewer.analysisGroups[uniqueId].addTo(map2DViewer.map);
  1284. this.targetLayerPage[uniqueId] = 0;
  1285. if (!this.layerLoading && this.targetLayerPage[uniqueId] === 0) {
  1286. this.layerLoading = true;
  1287. }
  1288. this.getMapData(uniqueId, columnId, mainType, sourceType);
  1289. }
  1290. },
  1291. /**
  1292. * 切换页时改变图层数据
  1293. * @val 当前页
  1294. * @currentPageSize 当前面板pageSize
  1295. * @columnId
  1296. * @id label_columnId
  1297. * @mainType 所有图层/预设模型
  1298. * @sourceType 土地资源,水资源,林地资源,全部
  1299. */
  1300. changeSingleLayer(val, currentPageSize, columnId, id) {
  1301. let uniqueId = id;
  1302. if (map2DViewer.analysisGroups[uniqueId]) {
  1303. this.paginationData.currentPage = val;
  1304. this.originalData[uniqueId] = [];
  1305. let oldData = this.originalDataMap.get(uniqueId);
  1306. this.originalData[uniqueId] = oldData.slice(
  1307. (val - 1) * currentPageSize,
  1308. val * currentPageSize
  1309. );
  1310. // 激活当前展开面板
  1311. this.activeNames = ["myLabel", uniqueId];
  1312. }
  1313. },
  1314. // 数据字典查询 -- 根据内容获取对应的index
  1315. // this.classTextToIndex["任务类型"]
  1316. classDictQuery(type, cName, keyName) {
  1317. let params = new FormData();
  1318. params = {
  1319. type: type,
  1320. cName: cName,
  1321. };
  1322. this.$Post(this.urlsCollection.selectByCNameAType, params).then((res) => {
  1323. if (res.code === 200 && res.content.length > 0) {
  1324. this.classTextToIndex[keyName] = new Map();
  1325. res.content.forEach((v) => {
  1326. this.classTextToIndex[keyName].set(v.name, v.index + "");
  1327. });
  1328. }
  1329. });
  1330. },
  1331. // 获取分级栏目列表
  1332. getColumnList() {
  1333. this.modelData = [];
  1334. this.$Post(this.urlsCollection.getColumnList).then((res) => {
  1335. if (res.code === 200 && res.content.length > 0) {
  1336. let data = res.content.map((item1) => {
  1337. if (item1.title === "所有图层" && item1.columnList.length > 0) {
  1338. this.firstLevelIdMap.set(item1.title, {
  1339. id: `${item1.title}_${item1.id}`,
  1340. label: item1.title,
  1341. });
  1342. if (item1.columnList && item1.columnList.length > 0) {
  1343. item1.columnList.map((item2) => {
  1344. if (item2.columnList && item2.columnList.length > 0) {
  1345. //存储所有镇相关的数据
  1346. this.townSelectTreeMap.set(item2.title, {
  1347. id: item2.id,
  1348. data:
  1349. !item2.columnList || item2.columnList.length === 0
  1350. ? []
  1351. : item2.columnList,
  1352. });
  1353. }
  1354. });
  1355. }
  1356. return {
  1357. id: `${item1.title}_${item1.id}`,
  1358. label: item1.title,
  1359. children: [],
  1360. };
  1361. }
  1362. if (item1.title === "预设模型" && item1.columnList.length > 0) {
  1363. this.firstLevelIdMap.set(item1.title, {
  1364. id: `${item1.title}_${item1.id}`,
  1365. label: item1.title,
  1366. });
  1367. return {
  1368. id: `${item1.title}_${item1.id}`,
  1369. label: item1.title,
  1370. children:
  1371. !item1.columnList || item1.columnList.length === 0
  1372. ? []
  1373. : item1.columnList.map((item2) => {
  1374. return {
  1375. id: `${item2.title}_${item2.id}`,
  1376. label: item2.title,
  1377. children:
  1378. !item2.columnList || item2.columnList.length === 0
  1379. ? []
  1380. : item2.columnList.map((item3) => {
  1381. this.rightPanelDataMap.set(
  1382. `${item3.title}_${item3.id}`,
  1383. {
  1384. id: item3.id,
  1385. mainType: item1.title,
  1386. sourceType: item2.title,
  1387. }
  1388. );
  1389. defaultModelNameMap.set(
  1390. item3.title,
  1391. `${item3.title}_${item3.id}`
  1392. );
  1393. return {
  1394. id: `${item3.title}_${item3.id}`,
  1395. label: item3.title,
  1396. sourceType: item2.title,
  1397. mainType: item1.title,
  1398. columnId: item3.id,
  1399. children: [],
  1400. disabled: false,
  1401. };
  1402. }),
  1403. };
  1404. }),
  1405. };
  1406. }
  1407. if (item1.title === "我的模型") {
  1408. this.firstLevelIdMap.set(item1.title, {
  1409. id: `${item1.title}_${item1.id}`,
  1410. label: item1.title,
  1411. });
  1412. this.myModelIdMap.set(
  1413. `${item1.title}_${item1.id}`,
  1414. `${item1.title}_${item1.id}`
  1415. );
  1416. return {
  1417. id: `${item1.title}_${item1.id}`,
  1418. children: [],
  1419. label: item1.title,
  1420. };
  1421. }
  1422. if (item1.title === "疑点问题" || item1.title === "我的图层") {
  1423. this.firstLevelIdMap.set(item1.title, {
  1424. id: `${item1.title}_${item1.id}`,
  1425. label: item1.title,
  1426. });
  1427. return {
  1428. id: `${item1.title}_${item1.id}`,
  1429. label: item1.title,
  1430. children:
  1431. !item1.columnList || item1.columnList.length === 0
  1432. ? []
  1433. : item1.columnList.map((item2) => {
  1434. // 疑点问题
  1435. this.problemIdMap.set(item1.title, {
  1436. id: `${item2.title}_${item2.id}`,
  1437. label: item2.title,
  1438. });
  1439. return {
  1440. id: `${item2.title}_${item2.id}`,
  1441. label: item2.title,
  1442. mainType: item1.title,
  1443. columnId: item2.id,
  1444. modelId: item2.modelId,
  1445. sourceType: "土地资源",
  1446. children: [],
  1447. };
  1448. }),
  1449. };
  1450. }
  1451. });
  1452. data.forEach((v) => {
  1453. if (v) {
  1454. this.modelData.push(v);
  1455. }
  1456. });
  1457. // 获取我的模型数据
  1458. let oldOptions = [];
  1459. this.getMyModelData();
  1460. this.classTextToIndex["浦东新区行政区划"].forEach((v, i) => {
  1461. if (this.townSelectTreeMap.has(i)) {
  1462. oldOptions.push({
  1463. value: i,
  1464. label: i,
  1465. });
  1466. // this.townOptions.push({
  1467. // value: i,
  1468. // label: i,
  1469. // });
  1470. }
  1471. });
  1472. let arrDistrict = oldOptions.filter((v) => {
  1473. if (v.value.indexOf("区") > -1) {
  1474. return v;
  1475. }
  1476. });
  1477. let arrTown1 = oldOptions.filter((v) => {
  1478. if (v.value.indexOf("镇") > -1 && v.value === "老港镇") {
  1479. return v;
  1480. }
  1481. });
  1482. let arrTown2 = oldOptions.filter((v) => {
  1483. if (v.value.indexOf("镇") > -1 && v.value === "泥城镇") {
  1484. return v;
  1485. }
  1486. });
  1487. let arrTown3 = oldOptions.filter((v) => {
  1488. if (
  1489. v.value.indexOf("镇") > -1 &&
  1490. v.value !== "老港镇" &&
  1491. v.value !== "泥城镇"
  1492. ) {
  1493. return v;
  1494. }
  1495. });
  1496. let arrStreet = oldOptions.filter((v) => {
  1497. if (v.value.indexOf("道") > -1) {
  1498. return v;
  1499. }
  1500. });
  1501. this.townOptions = [
  1502. ...arrDistrict,
  1503. ...arrTown1,
  1504. ...arrTown2,
  1505. ...arrTown3,
  1506. ...arrStreet,
  1507. ];
  1508. }
  1509. });
  1510. },
  1511. getMyModelData() {
  1512. let params = new FormData();
  1513. params = {
  1514. columnId: 49,
  1515. states: "0,1,2,3",
  1516. pageSize: 20,
  1517. page: 0,
  1518. };
  1519. this.$Post(this.urlsCollection.selectContentList, params)
  1520. .then((res) => {
  1521. if (res.code === 200 && res.content.data.length > 0) {
  1522. let children = res.content.data.map((ele) => {
  1523. customModelIdMap.set(ele.title, {
  1524. column_id: ele.column_id,
  1525. id: `${ele.title}_${ele.id}`,
  1526. });
  1527. this.rightPanelDataMap.set(`${ele.title}_${ele.id}`, {
  1528. id: `${ele.title}_${ele.id}`,
  1529. mainType: "我的模型",
  1530. sourceType: "",
  1531. label: ele.title,
  1532. });
  1533. return {
  1534. id: `${ele.title}_${ele.id}`,
  1535. label: ele.title,
  1536. modelId: ele.id,
  1537. children: [],
  1538. column_id: ele.column_id,
  1539. model_name: ele.model_name,
  1540. model_id: ele.model_id,
  1541. state: ele.state,
  1542. mainType: "我的模型",
  1543. c_bind_layer: ele.c_bind_layer,
  1544. c_layer_name: ele.c_layer_name,
  1545. c_dzfx_file: ele.c_dzfx_file || "",
  1546. };
  1547. });
  1548. if (this.modelData.length > 0) {
  1549. if (this.$refs.tree) {
  1550. this.$refs.tree.updateKeyChildren(
  1551. this.firstLevelIdMap.get("我的模型").id,
  1552. children
  1553. );
  1554. }
  1555. // this.expandedKeys.push(this.firstLevelIdMap.get("我的模型").id);
  1556. // this.modelData.forEach((ele) => {
  1557. // if (ele.label == "我的模型") {
  1558. // ele.children = children;
  1559. // }
  1560. // });
  1561. }
  1562. }
  1563. })
  1564. .catch((err) => {
  1565. console.log(err, "getMyModelData");
  1566. });
  1567. },
  1568. // 调用我的标记接口
  1569. getUserMarkers() {
  1570. if (localStorage.getItem("USER_ID")) {
  1571. let paramData = new FormData();
  1572. paramData = {
  1573. userId: Number(localStorage.getItem("USER_ID")),
  1574. sourceId: 0,
  1575. pageSize: 10,
  1576. };
  1577. if (!map2DViewer.groups["我的标记图层组"]) {
  1578. map2DViewer.groups["我的标记图层组"] = L.featureGroup();
  1579. map2DViewer.groups["我的标记图层组"].addTo(map2DViewer.map);
  1580. }
  1581. this.$Post(this.urlsCollection.selectByUser, paramData).then((res) => {
  1582. if (res.code === 200 && res.content.length >= 1) {
  1583. this.$store.state.myLabelPointsArr = [];
  1584. this.$store.state.myLabelPointsArr = res.content.map((v) => {
  1585. let data = JSON.parse(v.geojson);
  1586. let name = data.properties.name;
  1587. myLabelNameMap.set(name, v.geojson);
  1588. return {
  1589. id: v.id,
  1590. geojson: v.geojson,
  1591. type: v.type,
  1592. };
  1593. });
  1594. }
  1595. // res.content 返回数据为空
  1596. if (res.code === 205) {
  1597. this.$store.state.myLabelPointsArr = [];
  1598. }
  1599. });
  1600. }
  1601. },
  1602. // 回退事件
  1603. backEvent() {
  1604. if (
  1605. this.$store.state.backMenu.index &&
  1606. this.$store.state.backMenu.subIndex
  1607. ) {
  1608. this.$store.commit("changeNavSelect", {
  1609. index: this.$store.state.backMenu.index,
  1610. subIndex: this.$store.state.backMenu.subIndex,
  1611. name: this.$store.state.backMenu.name
  1612. ? this.$store.state.backMenu.name
  1613. : "",
  1614. });
  1615. }
  1616. },
  1617. // 左侧面板的显示与隐藏
  1618. leftPanelDisplay(val) {
  1619. if (val === "show") {
  1620. this.showLeftBox = true;
  1621. this.leftBoxBtn = false;
  1622. }
  1623. if (val === "hide") {
  1624. this.showLeftBox = false;
  1625. this.leftBoxBtn = true;
  1626. }
  1627. },
  1628. // 右侧面板的显示与隐藏
  1629. rightPanelDisplay(val) {
  1630. if (val === "show") {
  1631. this.showRightBox = true;
  1632. this.rightBoxBtn = false;
  1633. }
  1634. if (val === "hide") {
  1635. this.showRightBox = false;
  1636. this.rightBoxBtn = true;
  1637. }
  1638. },
  1639. leftPanelLock() {
  1640. this.isLeftLock = !this.isLeftLock;
  1641. },
  1642. rightPanelLock() {
  1643. this.isRightLock = !this.isRightLock;
  1644. },
  1645. // 节点过滤事件
  1646. filterNode(value, data) {
  1647. if (!value) return true;
  1648. return data.label.indexOf(value) !== -1;
  1649. },
  1650. // 定位功能失效
  1651. locateEvent(node) {
  1652. if (this.layerIdMap.has(node.data.id)) {
  1653. this.layerIdMap.get(node.data.id);
  1654. if (map2DViewer.analysisGroups[node.data.id].getBounds()) {
  1655. map2DViewer.map.fitBounds(
  1656. map2DViewer.analysisGroups[node.data.id].getBounds()
  1657. );
  1658. }
  1659. }
  1660. },
  1661. handleUpdate(node) {
  1662. this.$bus.$emit("updateModel", node);
  1663. },
  1664. handleDelete(node) {
  1665. // console.log(node, "删除节点");
  1666. let deleteParams = {
  1667. id: customModelIdMap.get(node.data.label).id,
  1668. columnId: 49,
  1669. state: 4,
  1670. };
  1671. this.$Post(this.urlsCollection.updateAudit, deleteParams).then((res) => {
  1672. if (res.code === 200) {
  1673. this.$message.info("模型已删除!");
  1674. this.$store.state.customModelsArr =
  1675. this.$store.state.customModelsArr =
  1676. this.$store.state.customModelsArr.filter((v) => {
  1677. return v.name !== node.data.label;
  1678. });
  1679. // this.getMyModelData();
  1680. }
  1681. });
  1682. },
  1683. // 节点change事件
  1684. handleCheckChange(data, checked) {
  1685. if (data.mainType && data.mainType !== "我的模型") {
  1686. if (checked) {
  1687. this.showRightBox = true;
  1688. // 第一级菜单是所有图层
  1689. if (data.mainType === "所有图层") {
  1690. this.rightPanelTitle = data.id;
  1691. let searchParam = [];
  1692. let targetTown = this.classTextToIndex["浦东新区行政区划"].get(
  1693. data.townType
  1694. );
  1695. let targetType = this.classTextToIndex["任务类型"].get(
  1696. data.sourceType
  1697. );
  1698. this.$store.state.treeDataCollection.set(data.id, {
  1699. // mainType: data.mainType,
  1700. townId: data.townId,
  1701. townType: data.townType,
  1702. sourceId: data.sourceId,
  1703. sourceType: data.sourceType,
  1704. layerId: data.id,
  1705. layerName: data.label,
  1706. });
  1707. let paramUser = {
  1708. field: "c_user_id",
  1709. searchType: "1",
  1710. content: {
  1711. value: localStorage.getItem("USER_ID"),
  1712. },
  1713. };
  1714. searchParam.push(paramUser);
  1715. let paramTown = {
  1716. field: "c_area_code",
  1717. searchType: "1",
  1718. content: {
  1719. value: targetTown,
  1720. },
  1721. };
  1722. searchParam.push(paramTown);
  1723. let paramType = {
  1724. field: "c_task_type",
  1725. searchType: "1",
  1726. content: {
  1727. value: targetType,
  1728. },
  1729. };
  1730. searchParam.push(paramType);
  1731. let params = new FormData();
  1732. params = {
  1733. columnId: 48,
  1734. states: "2,3",
  1735. pageSize: 10,
  1736. page: 0,
  1737. search: JSON.stringify(searchParam),
  1738. };
  1739. this.$Post(this.urlsCollection.selectContentList, params).then(
  1740. (res) => {
  1741. if (res.code === 202 && res.content === "数据不存在") {
  1742. this.$message.info("当前用户无权限!");
  1743. layerAuthorityMap.set(data.id, "无权限");
  1744. }
  1745. if (res.code === 200 && res.content.data.length > 0) {
  1746. layerAuthorityMap.set(data.id, "有权限");
  1747. this.displaySingleLayer(
  1748. data.columnId,
  1749. data.id,
  1750. data.mainType,
  1751. data.sourceType ? data.sourceType : ""
  1752. );
  1753. }
  1754. }
  1755. );
  1756. }
  1757. // 第一级菜单是预设模型
  1758. if (data.mainType === "预设模型") {
  1759. layerAuthorityMap.set(data.id, "有权限");
  1760. this.$store.state.preModelLayerMap.push(data.id);
  1761. this.rightPanelTitle = data.id;
  1762. this.displaySingleLayer(
  1763. data.columnId,
  1764. data.id,
  1765. data.mainType,
  1766. data.sourceType ? data.sourceType : ""
  1767. );
  1768. }
  1769. // 第一级菜单是疑点问题
  1770. if (data.mainType === "疑点问题") {
  1771. layerAuthorityMap.set(data.id, "有权限");
  1772. this.rightPanelTitle = data.id;
  1773. this.displaySingleLayer(
  1774. data.columnId,
  1775. data.id,
  1776. data.mainType,
  1777. data.sourceType ? data.sourceType : ""
  1778. );
  1779. }
  1780. } else {
  1781. if (
  1782. this.$store.state.selectSelectDataMap["singlePolygon"] &&
  1783. this.$store.state.selectSelectDataMap["singlePolygon"][data.id]
  1784. ) {
  1785. delete this.$store.state.selectSelectDataMap["singlePolygon"][
  1786. data.id
  1787. ];
  1788. }
  1789. // 取消勾选当前图层勾选,图斑数改变, 如果是所有图层数据移除折叠面板
  1790. if (
  1791. this.originalDataMap &&
  1792. this.originalDataMap.has(data.id) &&
  1793. this.currentTotal > 0
  1794. ) {
  1795. this.currentTotal -= this.originalDataMap.get(data.id).length;
  1796. this.originalDataMap.delete(data.id);
  1797. if (this.originalData && this.originalData[data.id]) {
  1798. delete this.originalData[data.id];
  1799. }
  1800. }
  1801. if (
  1802. data.mainType === "预设模型" &&
  1803. this.$store.state.preModelLayerMap.includes(data.id)
  1804. ) {
  1805. this.$store.state.preModelLayerMap.splice(
  1806. this.$store.state.preModelLayerMap.indexOf(data.id),
  1807. 1
  1808. );
  1809. }
  1810. // 统计后小于0改为0
  1811. if (this.currentTotal < 0) {
  1812. this.currentTotal = 0;
  1813. }
  1814. map2DViewer.map.closePopup();
  1815. // 移除图例
  1816. if (this.legendTitle.length > 0) {
  1817. this.legendTitle = this.legendTitle.filter((v) => {
  1818. return v.name !== data.id;
  1819. });
  1820. this.legendIcon = this.legendIcon.filter((v) => {
  1821. return v.name !== data.id;
  1822. });
  1823. }
  1824. this.layerIdMap.has(data.id) && this.layerIdMap.delete(data.id);
  1825. //关联自定义模型
  1826. this.$store.state.treeDataCollection.has(data.id) &&
  1827. this.$store.state.treeDataCollection.delete(data.id);
  1828. // 只激活我的标记
  1829. this.activeNames = ["myLabel"];
  1830. this.$store.state.mapMethodsCollection
  1831. .get("RENDER")
  1832. .deleteGroupFromMap(data.id);
  1833. // 移除图层id
  1834. if (map2DViewer.analysisGroups[data.id]) {
  1835. delete this.targetLayerTotal[data.id];
  1836. delete map2DViewer.analysisGroups[data.id];
  1837. }
  1838. }
  1839. }
  1840. // 第一级菜单是我的模型
  1841. if (data.mainType && data.mainType === "我的模型") {
  1842. // 显示叠置分析的数据
  1843. checked ? this.displayMyModelData(data) : this.deleteMyModelData(data);
  1844. }
  1845. },
  1846. // 显示我的模型数据
  1847. displayMyModelData(data) {
  1848. this.$nextTick(() => {
  1849. if (this.$refs.tree) {
  1850. this.$refs.tree.setCheckedKeys([data.id]);
  1851. }
  1852. });
  1853. let uniqueId = data.id;
  1854. // 我的模型图层组初始化
  1855. if (!map2DViewer.analysisGroups[uniqueId]) {
  1856. // 生成图例时设置初始化图层颜色
  1857. if (targetColor.length > this.collectColorMapIndex + 1) {
  1858. this.collectColorMapIndex++;
  1859. } else {
  1860. this.collectColorMapIndex = 0;
  1861. }
  1862. this.collectColorMap.set(
  1863. this.collectColorMapIndex,
  1864. `rgb(${targetColor[this.collectColorMapIndex][0]},${
  1865. targetColor[this.collectColorMapIndex][1]
  1866. },${targetColor[this.collectColorMapIndex][2]})`
  1867. );
  1868. // 图例
  1869. this.legendTitle.push({
  1870. name: uniqueId,
  1871. info: uniqueId,
  1872. });
  1873. this.legendIcon.push({
  1874. name: uniqueId,
  1875. background: "transparent",
  1876. border: `1px solid ${this.collectColorMap.get(
  1877. this.collectColorMapIndex
  1878. )}`,
  1879. });
  1880. map2DViewer.analysisGroups[uniqueId] = L.featureGroup();
  1881. map2DViewer.analysisGroups[uniqueId].addTo(map2DViewer.map);
  1882. this.layerIdMap.set(uniqueId, uniqueId);
  1883. if (!this.$store.state.selectSelectDataMap["singlePolygon"]) {
  1884. this.$store.state.selectSelectDataMap["singlePolygon"] = [];
  1885. }
  1886. // 如果有叠置分析文件 -- 呈现叠置分析内容
  1887. if (data.c_dzfx_file) {
  1888. this.$Get(this.uploadBaseUrl + data.c_dzfx_file, "").then(
  1889. (response) => {
  1890. if (response.features.length > 0) {
  1891. let condition = response.features[0].geometry.coordinates.every(
  1892. (coord) => coord.length == 0
  1893. );
  1894. if (condition) {
  1895. this.$message.info("未发现叠置的几何体!");
  1896. } else {
  1897. if (map2DViewer.analysisGroups[uniqueId]) {
  1898. let uniqueIdList = [];
  1899. if (
  1900. this.$store.state.selectSelectDataMap["singlePolygon"][
  1901. uniqueId
  1902. ]
  1903. ) {
  1904. uniqueIdList =
  1905. this.$store.state.selectSelectDataMap["singlePolygon"][
  1906. uniqueId
  1907. ];
  1908. }
  1909. // 清除当前图层组内所有图层,并读取GeoJSON数据
  1910. map2DViewer.analysisGroups[uniqueId].clearLayers();
  1911. // 叠置分析图斑数统计
  1912. this.targetLayerTotal[uniqueId] = response.features.length;
  1913. this.currentTotal += response.features.length;
  1914. response.features.forEach((v) => {
  1915. // 存储叠置分析的图层 -- 以便同屏对比时显示
  1916. let coord = v.geometry.coordinates;
  1917. let correctCoord = publicFun.latLngsCorrection(coord);
  1918. let coordinates =
  1919. publicFun.latLngsToReverse(correctCoord);
  1920. coordinates = publicFun.latLngsToReverse(coordinates);
  1921. let geojson = publicFun.standardGeojson(coordinates);
  1922. let singlePolygonItem = {
  1923. uniqueId: `overlay_${uniqueId}`,
  1924. geometry: JSON.stringify(geojson),
  1925. cid: publicFun.buildGuid(data.label),
  1926. color: this.collectColorMap.get(
  1927. this.collectColorMapIndex
  1928. ),
  1929. };
  1930. uniqueIdList.push(singlePolygonItem);
  1931. this.$store.state.selectSelectDataMap["singlePolygon"][
  1932. uniqueId
  1933. ] = uniqueIdList;
  1934. this.readGeojson(
  1935. geojson,
  1936. data.id,
  1937. this.collectColorMap.get(this.collectColorMapIndex)
  1938. );
  1939. });
  1940. }
  1941. }
  1942. }
  1943. }
  1944. );
  1945. } else {
  1946. this.layerLoading = true;
  1947. let params = new FormData();
  1948. params = {
  1949. modelId: data.modelId,
  1950. userId: localStorage.getItem("USER_ID"),
  1951. };
  1952. // 调用我的模型查看接口读取所有图层数据
  1953. this.$Post(this.urlsCollection.getModelCoverAgeInfo, params).then(
  1954. (res) => {
  1955. if (res.code === 201 && res.message === "未申请任务权限") {
  1956. this.layerLoading = false;
  1957. this.$message.info("暂无数据!");
  1958. }
  1959. if (res.code === 200) {
  1960. this.layerLoading = false;
  1961. }
  1962. if (res.code === 200 && res.content.length > 0) {
  1963. // 清除当前图层组内所有图层,并读取GeoJSON数据
  1964. map2DViewer.analysisGroups[uniqueId].clearLayers();
  1965. let changeCaseStatusArr = res.content.map((ele) => {
  1966. return {
  1967. id: ele.id,
  1968. column_name: ele.column_name,
  1969. c_boolean: "未标记",
  1970. c_xzqh: ele.c_xzqh,
  1971. c_content: ele.c_content,
  1972. c_date_time: ele.c_date_time,
  1973. title: ele.title,
  1974. model_id: ele.model_id,
  1975. column_id: ele.column_id,
  1976. content: ele.content,
  1977. secret_level: ele.secret_level,
  1978. mainType: data.mainType,
  1979. };
  1980. });
  1981. // 存储请求到的疑点数据
  1982. this.originalDataMap.set(uniqueId, changeCaseStatusArr);
  1983. // 该图层疑点总数
  1984. this.targetLayerTotal[uniqueId] = res.content.length;
  1985. // 分页组件total
  1986. this.paginationData.total =
  1987. this.originalDataMap.get(uniqueId).length;
  1988. // 当前图层的id存在
  1989. if (
  1990. map2DViewer.analysisGroups[uniqueId] &&
  1991. this.originalDataMap.get(uniqueId).length > 0 &&
  1992. changeCaseStatusArr.length > 0
  1993. ) {
  1994. // 统计所有图斑数
  1995. this.currentTotal += changeCaseStatusArr.length;
  1996. // 请求到数据后直接渲染点
  1997. changeCaseStatusArr.forEach((ele) => {
  1998. let cid = ele.id;
  1999. let geometry = ele.c_content;
  2000. let modelId = ele.model_id;
  2001. let columnId = ele.column_id;
  2002. this.$store.state.mapMethodsCollection
  2003. .get("RENDER")
  2004. .addSinglePolygon(
  2005. geometry,
  2006. cid,
  2007. this.collectColorMap.get(this.collectColorMapIndex),
  2008. uniqueId,
  2009. data.mainType,
  2010. "",
  2011. "",
  2012. modelId,
  2013. columnId
  2014. );
  2015. });
  2016. }
  2017. // 激活当前展开面板
  2018. this.activeNames = ["myLabel", uniqueId];
  2019. // 我的模型数据进行分页列表展示
  2020. this.originalData[uniqueId] =
  2021. this.originalDataMap.get(uniqueId);
  2022. // 进行分页列表展示
  2023. this.changeSingleLayer(
  2024. 1,
  2025. this.currentPageSize,
  2026. data.columnId,
  2027. uniqueId
  2028. );
  2029. }
  2030. }
  2031. );
  2032. }
  2033. }
  2034. },
  2035. // geojson直接读取的坐标顺序是经纬度
  2036. readGeojson(geojson, uniqueId, color) {
  2037. // 尽量与所有图层,预设模型读取几何数据的方式一样,
  2038. let states = [];
  2039. states.push(geojson);
  2040. let geojsonData = L.geoJSON(states, {
  2041. style: function (feature) {
  2042. return { color: color };
  2043. // console.log(feature);
  2044. },
  2045. }).addTo(map2DViewer.map);
  2046. map2DViewer.analysisGroups[uniqueId] = geojsonData;
  2047. },
  2048. // 我的模型图层取消勾选
  2049. deleteMyModelData(data) {
  2050. // 直接删除图层组中的数据
  2051. if (map2DViewer.analysisGroups[data.id]) {
  2052. map2DViewer.map.removeLayer(map2DViewer.analysisGroups[data.id]);
  2053. }
  2054. if (
  2055. this.$store.state.selectSelectDataMap["singlePolygon"] &&
  2056. this.$store.state.selectSelectDataMap["singlePolygon"][data.id]
  2057. ) {
  2058. delete this.$store.state.selectSelectDataMap["singlePolygon"][data.id];
  2059. }
  2060. // 取消勾选当前图层勾选,图斑数改变, 如果是所有图层数据移除折叠面板
  2061. if (
  2062. this.originalDataMap &&
  2063. this.originalDataMap.has(data.id) &&
  2064. this.currentTotal > 0
  2065. ) {
  2066. this.currentTotal -= this.originalDataMap.get(data.id).length;
  2067. this.originalDataMap.delete(data.id);
  2068. if (
  2069. // data.mainType === "所有图层" &&
  2070. this.originalData &&
  2071. this.originalData[data.id]
  2072. ) {
  2073. delete this.originalData[data.id];
  2074. }
  2075. }
  2076. // 统计后小于0改为0
  2077. if (this.currentTotal < 0) {
  2078. this.currentTotal = 0;
  2079. }
  2080. map2DViewer.map.closePopup();
  2081. // 移除图例
  2082. if (this.legendTitle.length > 0) {
  2083. this.legendTitle = this.legendTitle.filter((v) => {
  2084. return v.name !== data.id;
  2085. });
  2086. this.legendIcon = this.legendIcon.filter((v) => {
  2087. return v.name !== data.id;
  2088. });
  2089. }
  2090. this.layerIdMap.has(data.id) && this.layerIdMap.delete(data.id);
  2091. // 只激活我的标记
  2092. this.activeNames = ["myLabel"];
  2093. this.$store.state.mapMethodsCollection
  2094. .get("RENDER")
  2095. .deleteGroupFromMap(data.id);
  2096. // 移除图层id
  2097. if (map2DViewer.analysisGroups[data.id]) {
  2098. delete this.targetLayerTotal[data.id];
  2099. delete map2DViewer.analysisGroups[data.id];
  2100. }
  2101. },
  2102. //显示详细信息
  2103. viewDetailsPopup(data) {
  2104. this.$store.state.bottomMenuIndexs.index = -1;
  2105. this.$store.state.bottomMenuIndexs.subIndex = -1;
  2106. this.updateCasePopupShow = false;
  2107. this.tableType = "normal";
  2108. this.boxWidth = "600";
  2109. this.boxHeight = "600";
  2110. this.tableData = [];
  2111. let obj = JSON.parse(data).properties;
  2112. this.tableData.push(obj);
  2113. this.attrTableShow = true;
  2114. },
  2115. // 右侧面板项点击事件
  2116. listItemClick(type, data) {
  2117. this.$store.state.bottomMenuIndexs.index = -1;
  2118. this.$store.state.bottomMenuIndexs.subIndex = -1;
  2119. this.updateCasePopupShow = false;
  2120. this.tableData = [];
  2121. if (type === "default") {
  2122. this.tableType = "normal";
  2123. this.boxWidth = "600";
  2124. this.boxHeight = "600";
  2125. if (data.c_content) {
  2126. let obj = JSON.parse(data.c_content).properties;
  2127. console.log(obj);
  2128. this.tableData.push(obj);
  2129. }
  2130. }
  2131. if (type === "new") {
  2132. this.rightLabelData.forEach((item) => {
  2133. if (item.id == data.id) {
  2134. item.geometryChecked = false;
  2135. this.controlLabel(item);
  2136. }
  2137. });
  2138. if (data.featureType === "点") {
  2139. this.$store.state.mapMethodsCollection
  2140. .get("RENDER")
  2141. .setView(data.coord, 6);
  2142. } else {
  2143. map2DViewer.map.fitBounds(
  2144. map2DViewer.myLabels[`label_${data.id}`].getBounds()
  2145. );
  2146. }
  2147. let geoType = JSON.parse(data.geojson).properties.featureType;
  2148. this.$store.state.mapMethodsCollection
  2149. .get("RENDER")
  2150. .drawGeometry(geoType, data);
  2151. this.tableType = "personal";
  2152. this.boxWidth = "300";
  2153. this.boxHeight = "300";
  2154. this.tableData.push({
  2155. 名称: data.name,
  2156. 类别: data.type,
  2157. 描述: data.des,
  2158. });
  2159. }
  2160. this.attrTableShow = true;
  2161. },
  2162. closeEvent() {
  2163. this.attrTableShow = false;
  2164. },
  2165. // 关闭修改标记弹窗
  2166. closeLabelEvent() {
  2167. this.updateCasePopupShow = false;
  2168. },
  2169. modifyLabelEvent() {
  2170. this.$nextTick(() => {
  2171. let selectType = this.$refs.updateLabelRef.selectVal;
  2172. let desContent = this.$refs.updateLabelRef.textContent;
  2173. let currentNameInput = this.$refs.updateLabelRef.nameInput;
  2174. let geojson = JSON.parse(this.$refs.updateLabelRef.geojson);
  2175. let geometryType = geojson.properties.featureTypeIndex;
  2176. if (
  2177. myLabelNameMap.has(currentNameInput) &&
  2178. currentNameInput !== geojson.properties.name
  2179. ) {
  2180. this.$message.info("该名称已存在,请重新输入!");
  2181. } else {
  2182. let id = this.$refs.updateLabelRef.id;
  2183. let params = new FormData();
  2184. let nameInput = this.$refs.updateLabelRef.nameInput;
  2185. // 修改标题和描述
  2186. geojson.properties.title = selectType;
  2187. geojson.properties.desc = desContent;
  2188. geojson.properties.name = nameInput;
  2189. console.log(geojson, "修改后的geojson数据");
  2190. params = {
  2191. userId: Number(localStorage.getItem("USER_ID")),
  2192. sourceId: 0,
  2193. type: geometryType,
  2194. geojson: JSON.stringify(geojson),
  2195. id: id,
  2196. };
  2197. this.$Post(this.urlsCollection.updateConllection, params).then(
  2198. (res) => {
  2199. if (res.code === 200) {
  2200. // console.log("修改成功", res);
  2201. this.updateCasePopupShow = false;
  2202. this.getUserMarkers();
  2203. this.$message.success("修改成功!");
  2204. }
  2205. },
  2206. (error) => {
  2207. this.$message.error("保存失败");
  2208. console.log(error);
  2209. }
  2210. );
  2211. }
  2212. });
  2213. },
  2214. // 修改标记 -- 仅支持修改类型和描述
  2215. updateLabel(val) {
  2216. // console.log("修改标记", val);
  2217. this.$store.state.bottomMenuIndexs.index = -1;
  2218. this.$store.state.bottomMenuIndexs.subIndex = -1;
  2219. this.updateCasePopupShow = true;
  2220. this.attrTableShow = false;
  2221. if (this.updateCasePopupShow) {
  2222. this.$nextTick(() => {
  2223. this.$refs.updateLabelRef.menuData.title = "修改标记";
  2224. this.$refs.updateLabelRef.nameInput = val.name;
  2225. this.$refs.updateLabelRef.selectVal = val.type;
  2226. this.$refs.updateLabelRef.textContent = val.des;
  2227. this.$refs.updateLabelRef.id = val.id;
  2228. this.$refs.updateLabelRef.geojson = val.geojson;
  2229. });
  2230. }
  2231. },
  2232. // 删除标记
  2233. deleteLabel(id) {
  2234. if (localStorage.getItem("USER_ID")) {
  2235. // console.log("删除标记");
  2236. let params = new FormData();
  2237. this.$store.state.mapMethodsCollection
  2238. .get("RENDER")
  2239. .deleteGeometry(map2DViewer.myLabels[`label_${id}`]);
  2240. map2DViewer.myLabels[`label_${id}`] = null;
  2241. params = {
  2242. userId: Number(localStorage.getItem("USER_ID")),
  2243. sourceId: 0,
  2244. id: id,
  2245. };
  2246. this.$Post(this.urlsCollection.deleteConllection, params).then(
  2247. (res) => {
  2248. if (res.code === 200) {
  2249. // console.log("疑点删除成功");
  2250. this.getUserMarkers();
  2251. }
  2252. }
  2253. );
  2254. }
  2255. },
  2256. // 控制标记的显示与隐藏
  2257. controlLabel(val) {
  2258. val.geometryChecked = !val.geometryChecked;
  2259. // 已经绘制了几何体
  2260. if (map2DViewer.myLabels[`label_${val.id}`]) {
  2261. if (val.featureType === "点") {
  2262. map2DViewer.myLabels[`label_${val.id}`].setOpacity(
  2263. val.geometryChecked ? 1 : 0
  2264. );
  2265. }
  2266. if (val.featureType !== "点") {
  2267. map2DViewer.myLabels[`label_${val.id}`].setStyle(
  2268. val.geometryChecked
  2269. ? {
  2270. opacity: 1,
  2271. fillOpacity: 0.4,
  2272. }
  2273. : {
  2274. opacity: 0,
  2275. fillOpacity: 0,
  2276. }
  2277. );
  2278. }
  2279. } else {
  2280. // 未绘制几何体
  2281. // console.log(val, "未绘制几何体");
  2282. if (val.geometryChecked && val.geojson) {
  2283. let geoType = JSON.parse(val.geojson).properties.featureType;
  2284. this.$store.state.mapMethodsCollection
  2285. .get("RENDER")
  2286. .drawGeometry(geoType, val);
  2287. }
  2288. }
  2289. },
  2290. },
  2291. };
  2292. </script>
  2293. <style lang="less" scoped>
  2294. @commonBorderColor: rgb(0, 170, 255);
  2295. .comprehensive-analysis {
  2296. &-law-popup {
  2297. position: fixed;
  2298. left: 0;
  2299. right: 0;
  2300. margin: 100px auto;
  2301. pointer-events: auto;
  2302. z-index: 99;
  2303. }
  2304. &-label-popup {
  2305. position: absolute;
  2306. top: 15%;
  2307. left: 35%;
  2308. pointer-events: auto;
  2309. z-index: 99;
  2310. }
  2311. .el-checkbox {
  2312. color: #fff;
  2313. /deep/.el-checkbox__input.is-checked + .el-checkbox__label {
  2314. color: rgba(116, 255, 255, 1);
  2315. }
  2316. /deep/.el-checkbox__input.is-checked .el-checkbox__inner::after {
  2317. width: 70%;
  2318. height: 70%;
  2319. background: #74ffff;
  2320. border-radius: 0;
  2321. transform: rotate(0deg) scaleY(1);
  2322. position: static;
  2323. }
  2324. /deep/.el-checkbox__inner {
  2325. border: 1px solid #dcdfe6;
  2326. background: rgba(0, 170, 255, 0);
  2327. display: flex;
  2328. align-items: center;
  2329. justify-content: center;
  2330. position: static;
  2331. &::after {
  2332. transition: 0ms;
  2333. }
  2334. }
  2335. /deep/.el-checkbox__label {
  2336. padding-left: 0;
  2337. font-size: 15px;
  2338. position: absolute;
  2339. top: 1px;
  2340. left: 25px;
  2341. }
  2342. }
  2343. &-infobox {
  2344. width: 250px;
  2345. height: 40px;
  2346. display: flex;
  2347. align-items: center;
  2348. justify-content: center;
  2349. position: absolute;
  2350. border: none;
  2351. right: 10%;
  2352. top: 15px;
  2353. pointer-events: auto;
  2354. color: #fff;
  2355. font-size: 20px;
  2356. }
  2357. &-leftjuanlianInfo {
  2358. width: 150px;
  2359. height: 40px;
  2360. display: flex;
  2361. align-items: center;
  2362. justify-content: center;
  2363. position: absolute;
  2364. border: none;
  2365. left: 0.5%;
  2366. top: 15px;
  2367. pointer-events: auto;
  2368. color: #fff;
  2369. font-size: 20px;
  2370. }
  2371. &-rightjuanlianInfo {
  2372. width: 150px;
  2373. height: 40px;
  2374. display: flex;
  2375. align-items: center;
  2376. justify-content: center;
  2377. position: absolute;
  2378. border: none;
  2379. right: 0.5%;
  2380. top: 15px;
  2381. pointer-events: auto;
  2382. color: #fff;
  2383. font-size: 20px;
  2384. }
  2385. &-searchbox {
  2386. width: 300px;
  2387. height: 40px;
  2388. display: flex;
  2389. align-items: center;
  2390. justify-content: center;
  2391. position: absolute;
  2392. left: 21%;
  2393. top: 30px;
  2394. pointer-events: auto;
  2395. /deep/.el-input-group__append,
  2396. .el-input-group__prepend {
  2397. background-color: transparent;
  2398. color: #fff;
  2399. border-left: none;
  2400. }
  2401. /deep/.el-input-group--append .el-input__inner,
  2402. .el-input-group__prepend {
  2403. border-right: none;
  2404. }
  2405. }
  2406. &-basemapswitch {
  2407. width: 300px;
  2408. height: 80px;
  2409. // border: 1px solid black;
  2410. position: absolute;
  2411. right: 420px;
  2412. bottom: 20px;
  2413. display: flex;
  2414. align-items: center;
  2415. justify-content: space-around;
  2416. pointer-events: auto;
  2417. .basemapBox {
  2418. cursor: pointer;
  2419. border-radius: 5px;
  2420. width: 120px;
  2421. height: 75px;
  2422. border: 1px solid rgba(255, 255, 255, 0.6);
  2423. background-repeat: no-repeat;
  2424. background-size: 99% 98%;
  2425. position: relative;
  2426. &-titlebox {
  2427. width: 70px;
  2428. height: 30px;
  2429. position: absolute;
  2430. right: 0;
  2431. bottom: 0;
  2432. background: rgba(20, 20, 20, 0.5);
  2433. display: flex;
  2434. align-items: center;
  2435. justify-content: center;
  2436. color: rgba(255, 255, 255, 0.7);
  2437. font-size: 14px;
  2438. }
  2439. &-panel {
  2440. width: 100px;
  2441. height: 150px;
  2442. border: 1px solid rgba(255, 255, 255, 0.6);
  2443. position: absolute;
  2444. left: 0;
  2445. top: -160px;
  2446. background: url("../assets/map/basemap-list-back.png") no-repeat center;
  2447. overflow: auto;
  2448. .panel-item {
  2449. width: 100%;
  2450. height: 30px;
  2451. color: rgba(255, 255, 255, 0.6);
  2452. display: flex;
  2453. align-items: center;
  2454. justify-content: center;
  2455. border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  2456. font-size: 14px;
  2457. &:hover {
  2458. color: rgb(0, 170, 255, 0.4);
  2459. }
  2460. }
  2461. }
  2462. &:hover {
  2463. box-shadow: 0 2px 15px 3px rgb(0, 170, 255, 0.6);
  2464. & > div:nth-child(2) {
  2465. border: 1px solid rgb(0, 170, 255, 0.4);
  2466. }
  2467. & > div:nth-child(1) {
  2468. background: rgb(0, 170, 255, 0.4);
  2469. color: rgba(20, 20, 20, 1);
  2470. font-weight: bold;
  2471. }
  2472. }
  2473. }
  2474. }
  2475. &-backbtn {
  2476. width: 120px;
  2477. height: 35px;
  2478. background: @commonBorderColor;
  2479. color: #fff;
  2480. border-radius: 3px;
  2481. position: absolute;
  2482. left: 30px;
  2483. top: 15px;
  2484. pointer-events: auto;
  2485. cursor: pointer;
  2486. .left-arrow {
  2487. width: 7px;
  2488. height: 7px;
  2489. border-top: 2px solid #ffffff;
  2490. border-right: 2px solid #ffffff;
  2491. transform: translate(-50%, -50%) rotate(225deg);
  2492. position: absolute;
  2493. top: 16.5px;
  2494. left: 25px;
  2495. }
  2496. .title {
  2497. width: 80px;
  2498. height: 35px;
  2499. line-height: 35px;
  2500. position: absolute;
  2501. left: 34px;
  2502. }
  2503. }
  2504. &-legendbox {
  2505. position: absolute;
  2506. right: 410px;
  2507. top: 30px;
  2508. z-index: 1;
  2509. }
  2510. /* 弹窗 */
  2511. &-popup {
  2512. position: fixed;
  2513. left: 0;
  2514. right: 0;
  2515. margin: 100px auto;
  2516. pointer-events: auto;
  2517. z-index: 99;
  2518. }
  2519. /* 左侧面板开启按钮 */
  2520. &-leftopenbox {
  2521. position: absolute;
  2522. left: 5px;
  2523. width: 50px;
  2524. height: 100%;
  2525. display: flex;
  2526. flex-direction: column;
  2527. justify-content: center;
  2528. & > div {
  2529. pointer-events: auto;
  2530. width: 40px;
  2531. height: 40px;
  2532. border-radius: 50%;
  2533. background: rgba(102, 203, 255, 1);
  2534. position: relative;
  2535. cursor: pointer;
  2536. & > div {
  2537. position: absolute;
  2538. top: 8px;
  2539. left: 16px;
  2540. display: inline-block;
  2541. width: 0px;
  2542. height: 0px;
  2543. border: 12px solid transparent;
  2544. border-left-color: #fff;
  2545. }
  2546. }
  2547. }
  2548. /* 右侧面板开启按钮 */
  2549. &-rightopenbox {
  2550. position: absolute;
  2551. right: 0;
  2552. width: 50px;
  2553. height: 100%;
  2554. display: flex;
  2555. flex-direction: column;
  2556. justify-content: center;
  2557. & > div {
  2558. pointer-events: auto;
  2559. width: 40px;
  2560. height: 40px;
  2561. border-radius: 50%;
  2562. cursor: pointer;
  2563. position: relative;
  2564. background: rgba(102, 203, 255, 1);
  2565. & > div {
  2566. position: absolute;
  2567. top: 8px;
  2568. right: 16px;
  2569. display: inline-block;
  2570. width: 0px;
  2571. height: 0px;
  2572. border: 12px solid transparent;
  2573. border-right-color: #fff;
  2574. }
  2575. }
  2576. }
  2577. /* 左边树状面板 */
  2578. &-left {
  2579. width: 400px;
  2580. height: 85%;
  2581. position: absolute;
  2582. top: 60px;
  2583. left: 0;
  2584. background: url("../assets/image/tree_background.png") no-repeat center;
  2585. background-size: 100% 100%;
  2586. pointer-events: auto;
  2587. .close-btnbox {
  2588. position: absolute;
  2589. right: -20px;
  2590. height: 100%;
  2591. width: 40px;
  2592. display: flex;
  2593. flex-direction: column;
  2594. justify-content: center;
  2595. & > div {
  2596. pointer-events: auto;
  2597. width: 40px;
  2598. height: 40px;
  2599. border-radius: 50%;
  2600. cursor: pointer;
  2601. position: relative;
  2602. background: rgba(102, 203, 255, 1);
  2603. & > div {
  2604. position: absolute;
  2605. top: 8px;
  2606. right: 16px;
  2607. display: inline-block;
  2608. width: 0px;
  2609. height: 0px;
  2610. border: 12px solid transparent;
  2611. border-right-color: #fff;
  2612. }
  2613. }
  2614. }
  2615. .control-container {
  2616. width: 100%;
  2617. height: 8%;
  2618. display: flex;
  2619. justify-content: flex-end;
  2620. align-items: center;
  2621. position: relative;
  2622. &-pin-btn {
  2623. width: 30px;
  2624. height: 30px;
  2625. background: url("../assets/image/panel_unlock.png") no-repeat center;
  2626. position: absolute;
  2627. top: 0;
  2628. right: 3px;
  2629. cursor: pointer;
  2630. &.lock-style {
  2631. background: url("../assets/image/panel_lock.png") no-repeat center;
  2632. }
  2633. }
  2634. &-input {
  2635. width: 200px;
  2636. position: absolute;
  2637. bottom: 5px;
  2638. left: 30px;
  2639. /deep/.el-input__inner {
  2640. font-size: 15px;
  2641. height: 35px;
  2642. }
  2643. }
  2644. &-select {
  2645. width: 130px;
  2646. position: absolute;
  2647. bottom: 7px;
  2648. right: 35px;
  2649. }
  2650. }
  2651. .contant-container {
  2652. width: 100%;
  2653. height: 92%;
  2654. overflow: auto;
  2655. display: flex;
  2656. align-items: center;
  2657. justify-content: center;
  2658. &-innerbox {
  2659. width: 90%;
  2660. height: 98%;
  2661. .tree-arrow {
  2662. position: relative;
  2663. top: 0;
  2664. left: 0;
  2665. display: inline-block;
  2666. width: 0px;
  2667. height: 0px;
  2668. border: 7px solid transparent;
  2669. border-left-color: #fff;
  2670. }
  2671. .tree-arrow-expanded {
  2672. position: relative;
  2673. top: 4px;
  2674. left: -3px;
  2675. display: inline-block;
  2676. width: 0px;
  2677. height: 0px;
  2678. border: 7px solid transparent;
  2679. border-top-color: #fff;
  2680. }
  2681. .custom-tree-node {
  2682. position: relative;
  2683. width: 250px;
  2684. .el-checkbox {
  2685. width: 100%;
  2686. }
  2687. &-item {
  2688. max-width: 240px;
  2689. overflow: hidden;
  2690. white-space: nowrap;
  2691. text-overflow: ellipsis;
  2692. }
  2693. }
  2694. }
  2695. }
  2696. }
  2697. /* 右面板 -- 显示标记疑点 */
  2698. &-right {
  2699. width: 400px;
  2700. height: 85%;
  2701. position: absolute;
  2702. top: 60px;
  2703. right: 0;
  2704. background: url("../assets/image/tree_background.png") no-repeat center;
  2705. background-size: 100% 100%;
  2706. pointer-events: auto;
  2707. z-index: 2;
  2708. // 关闭折叠面板
  2709. .close-btnbox {
  2710. position: absolute;
  2711. left: -20px;
  2712. height: 100%;
  2713. width: 40px;
  2714. display: flex;
  2715. flex-direction: column;
  2716. justify-content: center;
  2717. & > div {
  2718. pointer-events: auto;
  2719. width: 40px;
  2720. height: 40px;
  2721. border-radius: 50%;
  2722. background: rgba(102, 203, 255, 1);
  2723. position: relative;
  2724. cursor: pointer;
  2725. & > div {
  2726. position: absolute;
  2727. top: 8px;
  2728. left: 16px;
  2729. display: inline-block;
  2730. width: 0px;
  2731. height: 0px;
  2732. border: 12px solid transparent;
  2733. border-left-color: #fff;
  2734. }
  2735. }
  2736. }
  2737. .control-container {
  2738. width: 100%;
  2739. height: 5%;
  2740. position: relative;
  2741. & > div {
  2742. width: 30px;
  2743. height: 30px;
  2744. background: url("../assets/image/panel_unlock.png") no-repeat center;
  2745. position: absolute;
  2746. top: 0;
  2747. left: 3px;
  2748. cursor: pointer;
  2749. &.lock-style {
  2750. background: url("../assets/image/panel_lock.png") no-repeat center;
  2751. }
  2752. }
  2753. }
  2754. .contant-container {
  2755. width: 100%;
  2756. height: 95%;
  2757. overflow: auto;
  2758. display: flex;
  2759. align-items: center;
  2760. justify-content: center;
  2761. &-innerbox {
  2762. width: 90%;
  2763. height: 98%;
  2764. .el-collapse-item__header {
  2765. .status-select {
  2766. width: 300px;
  2767. height: 30px;
  2768. display: flex;
  2769. align-items: center;
  2770. justify-content: flex-start;
  2771. font-size: 15px;
  2772. .title {
  2773. width: 200px;
  2774. height: 30px;
  2775. line-height: 30px;
  2776. overflow: hidden;
  2777. white-space: nowrap;
  2778. text-overflow: ellipsis;
  2779. }
  2780. /deep/.el-input__suffix {
  2781. right: -15px;
  2782. }
  2783. }
  2784. .all-icon {
  2785. position: relative;
  2786. left: 10px;
  2787. display: flex;
  2788. align-items: center;
  2789. justify-content: space-around;
  2790. width: 100px;
  2791. & > div {
  2792. width: 30px;
  2793. height: 30px;
  2794. }
  2795. &-locate {
  2796. background: url("../assets/map/white_locate.png") no-repeat center;
  2797. }
  2798. &-visible {
  2799. background: url("../assets/map/white_hide.png") no-repeat center;
  2800. &.click {
  2801. background: url("../assets/map/white_display.png") no-repeat
  2802. center;
  2803. }
  2804. }
  2805. }
  2806. }
  2807. .panel-list-item {
  2808. position: relative;
  2809. margin: 0 auto;
  2810. width: 80%;
  2811. height: auto;
  2812. background: #00aaff;
  2813. font-family: "PingFangSC SC";
  2814. font-weight: 400;
  2815. font-size: 18px;
  2816. line-height: 40px;
  2817. background: rgba(0, 47, 86, 0.3);
  2818. color: #fff;
  2819. padding-left: 20px;
  2820. border-left: 1px solid rgba(207, 222, 255, 0.2);
  2821. border-right: 1px solid rgba(207, 222, 255, 0.2);
  2822. border-bottom: 1px solid rgba(207, 222, 255, 0.2);
  2823. cursor: pointer;
  2824. .normal-icon {
  2825. position: absolute;
  2826. right: 20px;
  2827. top: 0;
  2828. display: flex;
  2829. align-items: center;
  2830. justify-content: space-around;
  2831. width: 120px;
  2832. color: #666666;
  2833. }
  2834. .operation-icon {
  2835. position: absolute;
  2836. right: 60px;
  2837. top: 0;
  2838. display: flex;
  2839. align-items: center;
  2840. justify-content: space-around;
  2841. width: 75px;
  2842. // background: red;
  2843. }
  2844. .visible-icon {
  2845. position: absolute;
  2846. right: 20px;
  2847. top: 9.5px;
  2848. width: 20px;
  2849. height: 20px;
  2850. background: url("../assets/map/eye_invisible.png") no-repeat center;
  2851. &.click {
  2852. background: url("../assets/map/eye_visible.png") no-repeat center;
  2853. }
  2854. }
  2855. }
  2856. .panel-footer {
  2857. border: none;
  2858. width: 100%;
  2859. height: 50px;
  2860. margin-top: 10px;
  2861. overflow-x: auto;
  2862. }
  2863. }
  2864. }
  2865. }
  2866. /* 侧边栏收缩动画效果 */
  2867. /* 左边 */
  2868. .fade-left-enter-from {
  2869. opacity: 0;
  2870. transform: translateX(-300px);
  2871. }
  2872. .fade-left-enter-to {
  2873. opacity: 1;
  2874. transform: translateX(0);
  2875. }
  2876. /* 主动输入控住过渡的持续时间和缓动曲线 */
  2877. .fade-left-enter-active {
  2878. transition: all 0.3s ease;
  2879. }
  2880. .fade-left-leave-from {
  2881. opacity: 1;
  2882. transform: translateX(0);
  2883. }
  2884. .fade-left-leave-to {
  2885. opacity: 0;
  2886. transform: translateX(-300px);
  2887. }
  2888. .fade-left-leave-active {
  2889. transition: all 0.3s ease;
  2890. }
  2891. /* 右边 */
  2892. .fade-right-enter-from {
  2893. opacity: 0;
  2894. transform: translateX(300px);
  2895. }
  2896. .fade-right-enter-to {
  2897. opacity: 1;
  2898. transform: translateX(0);
  2899. }
  2900. .fade-right-enter-active {
  2901. transition: all 0.3s ease;
  2902. }
  2903. .fade-right-leave-from {
  2904. opacity: 1;
  2905. transform: translateX(0);
  2906. }
  2907. .fade-right-leave-to {
  2908. opacity: 0;
  2909. transform: translateX(300px);
  2910. }
  2911. .fade-right-leave-active {
  2912. transition: all 0.3s ease;
  2913. }
  2914. }
  2915. </style>