ComprehensiveAnalysis.vue 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736
  1. <template>
  2. <div class="comprehensive-analysis">
  3. <LawPopup class="comprehensive-analysis-law-popup" />
  4. <LabelCasePopup
  5. class="comprehensive-analysis-label-popup"
  6. style="left: 40%"
  7. v-if="updateCasePopupShow"
  8. ref="updateLabelRef"
  9. @close="closeLabelEvent"
  10. @save="modifyLabelEvent"
  11. />
  12. <div
  13. class="comprehensive-analysis-backbtn"
  14. @click="backEvent"
  15. v-if="$store.state.backMenu.index && $store.state.backMenu.subIndex"
  16. >
  17. <div class="left-arrow"></div>
  18. <div class="title">返回上级</div>
  19. </div>
  20. <div class="comprehensive-analysis-searchbox">
  21. <el-input placeholder="请输入地名地址" v-model="addressInput">
  22. <el-button
  23. type="primary"
  24. slot="append"
  25. icon="el-icon-search"
  26. style="vertical-align: bottom"
  27. ></el-button>
  28. </el-input>
  29. </div>
  30. <!-- 属性弹窗 -->
  31. <AttributePopup
  32. v-drag
  33. class="comprehensive-analysis-popup"
  34. v-if="attrTableShow"
  35. :boxWidth="boxWidth"
  36. :boxHeight="boxHeight"
  37. :tableType="tableType"
  38. :tableData="tableData"
  39. @close="closeEvent"
  40. />
  41. <!-- 图例 -->
  42. <Legend
  43. v-show="legendShow"
  44. class="comprehensive-analysis-legendbox"
  45. :legendData="{
  46. boxWidth: '230',
  47. boxHeight: legendHeight,
  48. menuIndex: '3',
  49. legendIcon: legendIcon,
  50. legendTitle: legendTitle,
  51. leftWidth: '30%',
  52. rightWidth: '70%',
  53. rightItemWidth: '120',
  54. }"
  55. />
  56. <!-- 开启左边面板的控制按钮 -->
  57. <div class="comprehensive-analysis-leftopenbox" v-show="leftBoxBtn">
  58. <div @click="leftPanelDisplay('show')"><div></div></div>
  59. </div>
  60. <!-- 开启右边面板的控制按钮 -->
  61. <div class="comprehensive-analysis-rightopenbox" v-show="rightBoxBtn">
  62. <div @click="rightPanelDisplay('show')"><div></div></div>
  63. </div>
  64. <!-- 左侧面板的显示与隐藏 -->
  65. <transition name="fade-left">
  66. <div class="comprehensive-analysis-left" v-show="showLeftBox">
  67. <div class="close-btnbox">
  68. <div @click="leftPanelDisplay('hide')"><div></div></div>
  69. </div>
  70. <div class="control-container">
  71. <el-input
  72. class="control-container-input"
  73. v-model="filterText"
  74. placeholder="请输入搜索内容"
  75. ></el-input>
  76. <el-tooltip
  77. effect="light"
  78. :content="isLeftLock ? '解锁面板' : '锁定面板'"
  79. placement="bottom-end"
  80. >
  81. <div
  82. :class="{ 'lock-style': isLeftLock }"
  83. class="control-container-pin-btn"
  84. @click="leftPanelLock"
  85. ></div>
  86. </el-tooltip>
  87. </div>
  88. <div class="contant-container">
  89. <div class="contant-container-innerbox">
  90. <el-tree
  91. :data="modelData"
  92. :props="defaultProps"
  93. @check-change="handleCheckChange"
  94. node-key="id"
  95. ref="tree"
  96. :filter-node-method="filterNode"
  97. >
  98. <span class="custom-tree-node" slot-scope="{ node }">
  99. <template
  100. v-if="
  101. node.data.mainType === '所有图层' ||
  102. node.data.mainType === '我的模型' ||
  103. node.data.mainType === '预设模型'
  104. "
  105. >
  106. <el-checkbox v-model="node.checked" style="position: relative"
  107. >{{ node.label
  108. }}<span
  109. ><el-button
  110. size="normal"
  111. type="text"
  112. icon="el-icon-location"
  113. @click="locateEvent(node)"
  114. style="position: absolute; right: -30px; top: -12px"
  115. ></el-button
  116. ></span>
  117. <span style="position: absolute; right: -80px; top: -9px">
  118. <el-button
  119. v-if="node.parent.label === '我的模型'"
  120. size="small"
  121. type="text"
  122. icon="el-icon-edit"
  123. @click="handleUpdate(node)"
  124. ></el-button>
  125. <el-button
  126. v-if="node.parent.label === '我的模型'"
  127. size="small"
  128. type="text"
  129. icon="el-icon-delete"
  130. @click="handleDelete(node)"
  131. ></el-button>
  132. </span>
  133. </el-checkbox>
  134. </template>
  135. <template v-else>
  136. <div
  137. :class="{
  138. 'tree-arrow': !node.expanded,
  139. 'tree-arrow-expanded': node.expanded,
  140. }"
  141. ></div>
  142. <span>{{ node.label }}</span>
  143. </template>
  144. </span>
  145. </el-tree>
  146. </div>
  147. </div>
  148. </div>
  149. </transition>
  150. <!-- 右侧面板的显示与隐藏 -->
  151. <transition name="fade-right">
  152. <div class="comprehensive-analysis-right" v-show="showRightBox">
  153. <div class="close-btnbox">
  154. <div @click="rightPanelDisplay('hide')"><div></div></div>
  155. </div>
  156. <div class="control-container">
  157. <el-tooltip
  158. effect="light"
  159. :content="isRightLock ? '解锁面板' : '锁定面板'"
  160. placement="bottom-start"
  161. >
  162. <div
  163. :class="{ 'lock-style': isRightLock }"
  164. @click="rightPanelLock"
  165. ></div>
  166. </el-tooltip>
  167. </div>
  168. <div class="contant-container">
  169. <div class="contant-container-innerbox">
  170. <el-collapse v-model="activeNames">
  171. <el-collapse-item
  172. v-for="key in Object.keys(originalData)"
  173. :key="key"
  174. :title="key"
  175. :name="key"
  176. >
  177. <div
  178. class="panel-list-item"
  179. v-for="(v, i) in originalData[key]"
  180. :key="v.id"
  181. @click.stop="listItemClick('default', v)"
  182. >
  183. <!-- {{ v.column_name + "_" + (i + 1) }} -->
  184. {{ v.title + "_" + (i + 1) }}
  185. </div>
  186. <div class="panel-footer" @mouseenter="mouseenter(key)">
  187. <Pagination :paginationData="paginationData" />
  188. </div>
  189. </el-collapse-item>
  190. <el-collapse-item title="我的标记" name="myLabel">
  191. <div
  192. class="panel-list-item"
  193. v-for="item in rightLabelData"
  194. :key="item.id"
  195. >
  196. <div @click="listItemClick('new', item)">
  197. {{ item.name }}
  198. </div>
  199. <span class="operation-icon"
  200. ><el-button
  201. size="normal"
  202. type="text"
  203. icon="el-icon-edit"
  204. @click="updateLabel(item)"
  205. ></el-button
  206. ><el-button
  207. size="normal"
  208. type="text"
  209. icon="el-icon-delete"
  210. @click="deleteLabel(item.id)"
  211. ></el-button
  212. ></span>
  213. <span
  214. class="visible-icon"
  215. :class="{ click: item.geometryChecked }"
  216. @click="controlLabel(item)"
  217. ></span>
  218. </div>
  219. </el-collapse-item>
  220. </el-collapse>
  221. </div>
  222. </div>
  223. </div>
  224. </transition>
  225. </div>
  226. </template>
  227. <script>
  228. // 综合分析 this.$store.state.leftMenuTitle
  229. import MenuCard from "@/components/layout/MenuCard.vue";
  230. import Legend from "@/components/map/Legend.vue";
  231. import Pagination from "@/components/common/Pagination.vue";
  232. import publicFun from "@/utils/publicFunction.js";
  233. import { treeModel, defaultLayers } from "@/config/common";
  234. import AttributePopup from "@/components/popup/AttributePopup.vue";
  235. import LabelCasePopup from "@/components/popup/LabelCasePopup.vue";
  236. import LawPopup from "@/components/popup/LawPopup.vue";
  237. import { nextTick } from "vue";
  238. export default {
  239. name: "ComprehensiveAnalysis",
  240. components: {
  241. MenuCard,
  242. Legend,
  243. AttributePopup,
  244. LawPopup,
  245. LabelCasePopup,
  246. Pagination,
  247. },
  248. data() {
  249. return {
  250. enteredPanelId: "",
  251. enteredColumnId: "",
  252. uploadBaseUrl: "/dms",
  253. classTextToIndex: {},
  254. addressInput: "",
  255. legendShow: false,
  256. tableType: "normal",
  257. tableData: [],
  258. legendHeight: "0",
  259. boxWidth: "600",
  260. boxHeight: "600",
  261. activeNames: ["myLabel"],
  262. rightPanelTitle: "",
  263. rightPanelDataMap: new Map(),
  264. originalData: {},
  265. rightLabelData: [],
  266. showLeftBox: true,
  267. showRightBox: true,
  268. leftBoxBtn: false,
  269. rightBoxBtn: false,
  270. modelData: [],
  271. defaultProps: {
  272. children: "children",
  273. label: "label",
  274. },
  275. legendIcon: [],
  276. legendTitle: [],
  277. // 我的模型相关数据
  278. myModel: null,
  279. filterText: "",
  280. // 存放对应图层的坐标
  281. treeCoordMap: new Map(),
  282. layerIdMap: new Map(),
  283. randomColor: new Map(),
  284. isLeftLock: true,
  285. isRightLock: true,
  286. currentPage: 1,
  287. currentPageSize: 10,
  288. paginationData: {
  289. pageSize: 10,
  290. pagerCount: 5,
  291. currentPage: 1,
  292. pageSizes: [5, 10, 20, 30],
  293. total: 50,
  294. currentChange: (val) => {
  295. let columnId = this.enteredColumnId;
  296. let panelId = this.enteredPanelId;
  297. this.changeSingleLayer(columnId, panelId, val);
  298. },
  299. handleSizeChange: (val) => {
  300. this.handleSizeChange(val);
  301. },
  302. },
  303. };
  304. },
  305. computed: {
  306. getCustomModel() {
  307. return this.$store.state.customModelsArr;
  308. },
  309. getLeftMenuTitle() {
  310. return this.$store.state.leftMenuTitle;
  311. },
  312. getMyLabelData() {
  313. return this.$store.getters.myLabelPointsArr;
  314. },
  315. getMyPoints() {
  316. return map2DViewer.myLabels;
  317. },
  318. attrTableShow: {
  319. get() {
  320. return this.$store.state.attrTableShow;
  321. },
  322. set(val) {
  323. this.$store.state.attrTableShow = val;
  324. },
  325. },
  326. updateCasePopupShow: {
  327. get() {
  328. return this.$store.state.updateCasePopupShow;
  329. },
  330. set(val) {
  331. this.$store.state.updateCasePopupShow = val;
  332. },
  333. },
  334. uploadDataArr() {
  335. return uploadDataIdArr;
  336. },
  337. },
  338. watch: {
  339. uploadDataArr: {
  340. handler(val) {
  341. if (val.length > 0) {
  342. // console.log(val, "uploadDataIdArr");
  343. }
  344. },
  345. immediate: true,
  346. deep: true,
  347. // console.log(val,"uploadDataIdArr");
  348. },
  349. getLeftMenuTitle: {
  350. handler(val) {
  351. this.$nextTick(() => {
  352. if (treeIdMap.has(val)) {
  353. // console.log(val, "678");
  354. // 设置默认勾选项
  355. this.$refs.tree.setCheckedKeys([treeIdMap.get(val)]);
  356. }
  357. });
  358. },
  359. immediate: true,
  360. },
  361. legendTitle(val) {
  362. // console.log(val, "监听当前图例item数量");
  363. if (val.length === 0) {
  364. this.legendShow = false;
  365. }
  366. if (val.length > 0 && val.length <= 10) {
  367. this.legendShow = true;
  368. this.legendHeight = 50 * val.length + 50 + "";
  369. }
  370. },
  371. filterText(val) {
  372. this.$refs.tree.filter(val);
  373. },
  374. getCustomModel: {
  375. handler(val) {
  376. // console.log(val, "目前存在的自定义模型");
  377. this.getMyModelData();
  378. },
  379. deep: true,
  380. },
  381. getMyLabelData: {
  382. handler(val) {
  383. // console.log("标记点保存事件成功,允许开始定位");
  384. this.rightLabelData = [];
  385. if (val.length > 0) {
  386. this.rightLabelData = val.map((v, i) => {
  387. let data = JSON.parse(v.geojson);
  388. return {
  389. id: v.id,
  390. name: `疑点 ${v.id}`,
  391. coord: data.geometry.coordinates[0][0],
  392. type: data.properties.title,
  393. des: data.properties.desc,
  394. geojson: v.geojson,
  395. geometryChecked: false,
  396. featureType: data.properties.featureType,
  397. };
  398. });
  399. // console.log(this.rightLabelData, "rightLabelData");
  400. }
  401. },
  402. deep: true,
  403. // immediate: true,
  404. },
  405. },
  406. created() {
  407. this.getColumnList();
  408. this.classDictQuery("0", "c_task_type", "任务类型");
  409. this.classDictQuery("0", "浦东新区行政区划", "浦东新区行政区划");
  410. //获取我的标记数据
  411. this.getUserMarkers();
  412. },
  413. mounted() {
  414. map2DViewer.map.on("move", (e) => {
  415. if (!this.isLeftLock) {
  416. this.showLeftBox = false;
  417. this.leftBoxBtn = true;
  418. }
  419. if (!this.isRightLock) {
  420. this.showRightBox = false;
  421. this.rightBoxBtn = true;
  422. }
  423. });
  424. },
  425. beforeDestroy() {
  426. treeIdMap.clear();
  427. uploadDataIdArr = [];
  428. this.treeCoordMap.clear();
  429. map2DViewer.map.off("move");
  430. if (Object.getOwnPropertyNames(map2DViewer.analysisGroups).length > 0) {
  431. for (let group in map2DViewer.analysisGroups) {
  432. this.$store.state.mapMethodsCollection
  433. .get("RENDER")
  434. .deleteGroupFromMap(group);
  435. map2DViewer.analysisGroups[group].remove();
  436. }
  437. }
  438. if (Object.getOwnPropertyNames(map2DViewer.myLabels).length > 0) {
  439. for (let label in map2DViewer.myLabels) {
  440. this.$store.state.mapMethodsCollection
  441. .get("RENDER")
  442. .deleteGeometry(map2DViewer.myLabels[label]);
  443. }
  444. }
  445. map2DViewer.analysisGroups = {};
  446. map2DViewer.polygons = {};
  447. map2DViewer.myLabels = {};
  448. this.attrTableShow = false;
  449. this.updateCasePopupShow = false;
  450. },
  451. methods: {
  452. mouseenter(val) {
  453. if (this.rightPanelDataMap.has(val)) {
  454. // 方便获取
  455. this.enteredPanelId = val;
  456. this.enteredColumnId = this.rightPanelDataMap.get(val);
  457. // console.log("当前的columnId", this.enteredColumnId);
  458. }
  459. },
  460. handleSizeChange(val) {
  461. console.log(`每页 ${val} 条`);
  462. this.currentPageSize = val;
  463. this.changeSingleLayer(
  464. this.enteredColumnId,
  465. this.enteredPanelId,
  466. this.currentPage
  467. );
  468. // this.getTableData(this.currentPage);
  469. },
  470. getTableData() {},
  471. /**
  472. * 获取图层信息 -- 所有模型和预设模型
  473. */
  474. displaySingleLayer(columnId, id) {
  475. // console.log(columnId, "columnId");
  476. let layerParams = new FormData();
  477. layerParams = {
  478. columnId: columnId,
  479. states: "0,1,2,3",
  480. pageSize: 10,
  481. page: 0,
  482. };
  483. this.$Post(this.urlsCollection.selectContentList, layerParams).then(
  484. (res) => {
  485. if (res.code === 202 && res.content === "数据不存在") {
  486. this.$message.info("暂无数据!");
  487. }
  488. if (res.code === 200 && res.content.data.length > 0) {
  489. this.paginationData.currentPage = 1
  490. this.paginationData.total = res.content.count
  491. let uniqueId = id;
  492. map2DViewer.analysisGroups[uniqueId] = L.featureGroup();
  493. map2DViewer.analysisGroups[uniqueId].addTo(map2DViewer.map);
  494. this.legendTitle.push({
  495. name: uniqueId,
  496. info: uniqueId,
  497. });
  498. this.legendIcon.push({
  499. name: uniqueId,
  500. background: "transparent",
  501. border: `1px solid ${this.randomColor.get(uniqueId)}`,
  502. });
  503. this.originalData[uniqueId] = res.content.data.map((ele) => {
  504. let cid = ele.id;
  505. let geometry = ele.c_content;
  506. this.layerIdMap.set(uniqueId, uniqueId);
  507. // 激活当前展开面板
  508. this.activeNames = ["myLabel", uniqueId];
  509. this.$store.state.mapMethodsCollection
  510. .get("RENDER")
  511. .addSinglePolygon(
  512. geometry,
  513. cid,
  514. this.randomColor.get(uniqueId),
  515. uniqueId
  516. );
  517. return {
  518. id: ele.id,
  519. // "垃圾堆放点"
  520. column_name: ele.column_name,
  521. // 是否疑点
  522. c_boolean: ele.c_boolean ? "是" : "否",
  523. // 行政区划
  524. c_xzqh: ele.c_xzqh,
  525. // 空间信息
  526. c_content: ele.c_content,
  527. // 疑点修改时间
  528. c_date_time: ele.c_date_time,
  529. // 修改人员名称
  530. // c_editor_name: ele.c_editor_name,
  531. // 标题
  532. title: ele.title,
  533. column_id: ele.column_id,
  534. content: ele.content,
  535. secret_level: ele.secret_level,
  536. };
  537. });
  538. }
  539. }
  540. );
  541. },
  542. /**
  543. * 切换页时改变图层数据
  544. */
  545. changeSingleLayer(columnId, id, val) {
  546. let layerParams = new FormData();
  547. layerParams = {
  548. columnId: columnId,
  549. states: "0,1,2,3",
  550. pageSize: 10,
  551. page: val - 1,
  552. };
  553. this.$Post(this.urlsCollection.selectContentList, layerParams).then(
  554. (res) => {
  555. // console.log(res, "changeSingeLayer");
  556. if (res.code === 200 && res.content.data.length > 0) {
  557. this.paginationData.currentPage = val;
  558. this.paginationData.total = res.content.count;
  559. let uniqueId = id;
  560. if (map2DViewer.analysisGroups[uniqueId]) {
  561. // console.log("当前的analysisGroups有数据");
  562. // map2DViewer.analysisGroups[uniqueId].remove()
  563. map2DViewer.analysisGroups[uniqueId].clearLayers();
  564. this.originalData[uniqueId] = res.content.data.map((ele) => {
  565. let cid = ele.id;
  566. let geometry = ele.c_content;
  567. this.layerIdMap.set(uniqueId, uniqueId);
  568. this.activeNames = ["myLabel", uniqueId];
  569. this.$store.state.mapMethodsCollection
  570. .get("RENDER")
  571. .addSinglePolygon(
  572. geometry,
  573. cid,
  574. this.randomColor.get(uniqueId),
  575. uniqueId
  576. );
  577. return {
  578. id: ele.id,
  579. // "垃圾堆放点"
  580. column_name: ele.column_name,
  581. // 是否疑点
  582. c_boolean: ele.c_boolean ? "是" : "否",
  583. // 行政区划
  584. c_xzqh: ele.c_xzqh,
  585. // 空间信息
  586. c_content: ele.c_content,
  587. // 疑点修改时间
  588. c_date_time: ele.c_date_time,
  589. // 修改人员名称
  590. // c_editor_name: ele.c_editor_name,
  591. // 标题
  592. title: ele.title,
  593. column_id: ele.column_id,
  594. content: ele.content,
  595. secret_level: ele.secret_level,
  596. };
  597. });
  598. }
  599. }
  600. }
  601. );
  602. },
  603. // 数据字典查询 -- 根据内容获取对应的index
  604. // this.classTextToIndex["任务类型"]
  605. classDictQuery(type, cName, keyName) {
  606. let params = new FormData();
  607. params = {
  608. type: type,
  609. cName: cName,
  610. };
  611. this.$Post(this.urlsCollection.selectByCNameAType, params).then((res) => {
  612. if (res.code === 200 && res.content.length > 0) {
  613. this.classTextToIndex[keyName] = new Map();
  614. res.content.forEach((v) => {
  615. this.classTextToIndex[keyName].set(v.name, v.index + "");
  616. });
  617. }
  618. });
  619. },
  620. // 获取分级栏目列表
  621. getColumnList() {
  622. this.modelData = [];
  623. this.$Post(this.urlsCollection.getColumnList).then((res) => {
  624. if (res.code === 200 && res.content.length > 0) {
  625. let data = res.content.map((item1) => {
  626. if (item1.title === "所有图层" && item1.columnList.length > 0) {
  627. treeIdMap.set(
  628. `${item1.title}_${item1.id}`,
  629. `${item1.title}_${item1.id}`
  630. );
  631. return {
  632. id: `${item1.title}_${item1.id}`,
  633. label: item1.title,
  634. // 镇
  635. children:
  636. item1.columnList.length === 0
  637. ? []
  638. : item1.columnList.map((item2) => {
  639. treeIdMap.set(
  640. `${item2.title}_${item2.id}`,
  641. `${item2.title}_${item2.id}`
  642. );
  643. return {
  644. id: `${item2.title}_${item2.id}`,
  645. label: item2.title,
  646. // 水资源,土地资源,林地资源
  647. children:
  648. item2.columnList.length === 0
  649. ? []
  650. : item2.columnList.map((item3) => {
  651. treeIdMap.set(
  652. `${item3.title}_${item3.id}`,
  653. `${item3.title}_${item3.id}`
  654. );
  655. return {
  656. id: `${item3.title}_${item3.id}`,
  657. label: item3.title,
  658. tag: item3.tag,
  659. children:
  660. item3.columnList &&
  661. item3.columnList.length === 0
  662. ? []
  663. : item3.columnList.map((item4) => {
  664. treeIdMap.set(
  665. `${item4.title}_${item4.id}`,
  666. `${item4.title}_${item4.id}`
  667. );
  668. this.rightPanelDataMap.set(
  669. `${item4.title}_${item4.id}`,
  670. item4.id
  671. );
  672. this.randomColor.set(
  673. `${item4.title}_${item4.id}`,
  674. publicFun.getRandomColor()
  675. );
  676. return {
  677. id: `${item4.title}_${item4.id}`,
  678. label: item4.title,
  679. children: [],
  680. columnId: item4.id,
  681. modelName: item4.modelName,
  682. modelId: item4.modelId,
  683. tag: item4.tag,
  684. type: item3.title,
  685. town: item2.title,
  686. mainType: item1.title,
  687. color: publicFun.getRandomColor(),
  688. };
  689. }),
  690. };
  691. }),
  692. };
  693. }),
  694. };
  695. }
  696. if (item1.title === "预设模型" && item1.columnList.length > 0) {
  697. treeIdMap.set(
  698. `${item1.title}_${item1.id}`,
  699. `${item1.title}_${item1.id}`
  700. );
  701. return {
  702. id: `${item1.title}_${item1.id}`,
  703. label: item1.title,
  704. children:
  705. item1.columnList.length === 0
  706. ? []
  707. : item1.columnList.map((item2) => {
  708. treeIdMap.set(
  709. `${item2.title}_${item2.id}`,
  710. `${item2.title}_${item2.id}`
  711. );
  712. return {
  713. id: `${item2.title}_${item2.id}`,
  714. label: item2.title,
  715. children:
  716. item2.columnList.length === 0
  717. ? []
  718. : item2.columnList.map((item3) => {
  719. treeIdMap.set(
  720. `${item3.title}_${item3.id}`,
  721. `${item3.title}_${item3.id}`
  722. );
  723. this.rightPanelDataMap.set(
  724. `${item3.title}_${item3.id}`,
  725. item3.id
  726. );
  727. this.randomColor.set(
  728. `${item3.title}_${item3.id}`,
  729. publicFun.getRandomColor()
  730. );
  731. return {
  732. id: `${item3.title}_${item3.id}`,
  733. label: item3.title,
  734. children: [],
  735. mainType: item1.title,
  736. columnId: item3.id,
  737. };
  738. }),
  739. };
  740. }),
  741. };
  742. }
  743. if (item1.title === "我的模型") {
  744. // treeIdMap.set(item1.title, `${item1.title}_${item1.id}`);
  745. treeIdMap.set(
  746. `${item1.title}_${item1.id}`,
  747. `${item1.title}_${item1.id}`
  748. );
  749. return {
  750. id: `${item1.title}_${item1.id}`,
  751. children: [],
  752. label: item1.title,
  753. };
  754. }
  755. });
  756. data.forEach((v) => {
  757. if (v) {
  758. this.modelData.unshift(v);
  759. }
  760. });
  761. this.modelData.push({
  762. id: "我的图层",
  763. label: "我的图层",
  764. children: [],
  765. });
  766. this.getMyModelData();
  767. }
  768. });
  769. },
  770. getMyModelData() {
  771. // 我的模型栏目信息
  772. // {
  773. // "level": 0,
  774. // "modelId": 94,
  775. // "updateTime": 1671432804228,
  776. // "authorId": 4,
  777. // "title": "我的模型",
  778. // "type": 1,
  779. // "content": "浦东审计-我的模型",
  780. // "parentId": -1,
  781. // "modelName": "pdsj_wdmx_m_ysmx_wdmx",
  782. // "createTime": 1671432804228,
  783. // "authorName": "user001",
  784. // "id": 89,
  785. // "state": 0,
  786. // "tag": "pdsj_wdmx"
  787. // },
  788. let params = new FormData();
  789. params = {
  790. columnId: 49,
  791. states: "0,1,2,3",
  792. pageSize: 10,
  793. page: 0,
  794. };
  795. this.$Post(this.urlsCollection.selectContentList, params)
  796. .then((res) => {
  797. // console.log(res, "判断是否有");
  798. if (res.code === 200 && res.content.data.length > 0) {
  799. // console.log(res.content.data, "我的模型 - 最终数据");
  800. let children = res.content.data.map((ele) => {
  801. customModelIdMap.set(ele.title, {
  802. column_id: ele.column_id,
  803. id: ele.id,
  804. });
  805. return {
  806. id: ele.id,
  807. label: ele.title,
  808. children: [],
  809. column_id: ele.column_id,
  810. model_name: ele.model_name,
  811. model_id: ele.model_id,
  812. state: ele.state,
  813. mainType: "我的模型",
  814. c_bind_layer: ele.c_bind_layer,
  815. c_dzfx_file: ele.c_dzfx_file || "",
  816. };
  817. });
  818. if (this.modelData.length > 0) {
  819. this.modelData.forEach((ele) => {
  820. if (ele.label == "我的模型") {
  821. // console.log(ele, "我的模型");
  822. ele.children = children;
  823. }
  824. });
  825. }
  826. }
  827. })
  828. .catch((err) => {
  829. console.log(err, "getMyModelData");
  830. });
  831. },
  832. // 调用我的标记接口
  833. getUserMarkers() {
  834. if (localStorage.getItem("USER_ID")) {
  835. let paramData = new FormData();
  836. paramData = {
  837. userId: Number(localStorage.getItem("USER_ID")),
  838. sourceId: 0,
  839. pageSize: 10,
  840. };
  841. this.$Post(this.urlsCollection.selectByUser, paramData).then((res) => {
  842. if (res.code === 200 && res.content.length >= 1) {
  843. // console.log(res);
  844. this.$store.state.myLabelPointsArr = [];
  845. this.$store.state.myLabelPointsArr = res.content.map((v) => {
  846. return {
  847. id: v.id,
  848. geojson: v.geojson,
  849. type: v.type,
  850. };
  851. });
  852. }
  853. // res.content 返回数据为空
  854. if (res.code === 205) {
  855. this.$store.state.myLabelPointsArr = [];
  856. }
  857. });
  858. }
  859. },
  860. // 回退事件
  861. backEvent() {
  862. if (
  863. this.$store.state.backMenu.index &&
  864. this.$store.state.backMenu.subIndex
  865. ) {
  866. this.$store.commit("changeNavSelect", {
  867. index: this.$store.state.backMenu.index,
  868. subIndex: this.$store.state.backMenu.subIndex,
  869. name: this.$store.state.backMenu.name
  870. ? this.$store.state.backMenu.name
  871. : "",
  872. });
  873. }
  874. },
  875. // 左侧面板的显示与隐藏
  876. leftPanelDisplay(val) {
  877. if (val === "show") {
  878. this.showLeftBox = true;
  879. this.leftBoxBtn = false;
  880. }
  881. if (val === "hide") {
  882. this.showLeftBox = false;
  883. this.leftBoxBtn = true;
  884. }
  885. },
  886. // 右侧面板的显示与隐藏
  887. rightPanelDisplay(val) {
  888. if (val === "show") {
  889. this.showRightBox = true;
  890. this.rightBoxBtn = false;
  891. }
  892. if (val === "hide") {
  893. this.showRightBox = false;
  894. this.rightBoxBtn = true;
  895. }
  896. },
  897. leftPanelLock() {
  898. this.isLeftLock = !this.isLeftLock;
  899. },
  900. rightPanelLock() {
  901. this.isRightLock = !this.isRightLock;
  902. },
  903. // 节点过滤事件
  904. filterNode(value, data) {
  905. if (!value) return true;
  906. return data.label.indexOf(value) !== -1;
  907. },
  908. locateEvent(node) {
  909. if (this.layerIdMap.has(node.data.id)) {
  910. let layer = this.layerIdMap.get(node.data.id);
  911. // console.log(layer, "layer");
  912. map2DViewer.map.fitBounds(
  913. map2DViewer.analysisGroups[node.data.id].getBounds()
  914. );
  915. }
  916. },
  917. handleUpdate(node) {
  918. this.$bus.$emit("updateModel", node);
  919. },
  920. handleDelete(node) {
  921. debugger;
  922. // console.log(node, "删除节点");
  923. let deleteParams = {
  924. id: customModelIdMap.get(node.data.label).id,
  925. columnId: 49,
  926. state: 4,
  927. };
  928. this.$Post(this.urlsCollection.updateAudit, deleteParams).then((res) => {
  929. if (res.code === 200) {
  930. this.$message.info("模型已删除!");
  931. this.$store.state.customModelsArr =
  932. this.$store.state.customModelsArr =
  933. this.$store.state.customModelsArr.filter((v) => {
  934. return v.name !== node.data.label;
  935. });
  936. // this.getMyModelData();
  937. }
  938. });
  939. },
  940. // 节点change事件
  941. handleCheckChange(data, checked) {
  942. if (data.mainType && data.mainType !== "我的模型") {
  943. if (checked) {
  944. this.showRightBox = true;
  945. // 第一级菜单是所有图层
  946. if (data.mainType === "所有图层") {
  947. this.rightPanelTitle = data.id;
  948. let searchParam = [];
  949. let targetTown = this.classTextToIndex["浦东新区行政区划"].get(
  950. data.town
  951. );
  952. let targetType = this.classTextToIndex["任务类型"].get(
  953. data.type + "审计"
  954. );
  955. let paramUser = {
  956. field: "c_user_id",
  957. searchType: "2",
  958. content: {
  959. value: localStorage.getItem("USER_ID"),
  960. },
  961. };
  962. searchParam.push(paramUser);
  963. let paramTown = {
  964. field: "c_area_code",
  965. searchType: "1",
  966. content: {
  967. value: targetTown,
  968. },
  969. };
  970. searchParam.push(paramTown);
  971. let paramType = {
  972. field: "c_task_type",
  973. searchType: "1",
  974. content: {
  975. value: targetType,
  976. },
  977. };
  978. searchParam.push(paramType);
  979. let params = new FormData();
  980. params = {
  981. columnId: 48,
  982. states: "2,3",
  983. pageSize: 10,
  984. page: 0,
  985. search: JSON.stringify(searchParam),
  986. };
  987. this.$Post(this.urlsCollection.selectContentList, params).then(
  988. (res) => {
  989. if (res.code === 202 && res.content === "数据不存在") {
  990. this.$message.info("当前用户无权限!");
  991. layerAuthorityMap.set(data.id, "无权限");
  992. }
  993. if (res.code === 200 && res.content.data.length > 0) {
  994. layerAuthorityMap.set(data.id, "有权限");
  995. this.$store.state.treeDataCollection.set(data.id, {
  996. mainType: data.mainType,
  997. });
  998. this.displaySingleLayer(data.columnId, data.id);
  999. }
  1000. }
  1001. );
  1002. }
  1003. // 第一级菜单是预设模型
  1004. if (data.mainType === "预设模型") {
  1005. layerAuthorityMap.set(data.id, "有权限");
  1006. this.rightPanelTitle = data.id;
  1007. this.$store.state.treeDataCollection.set(data.id, {
  1008. mainType: data.mainType,
  1009. // town: data.town,
  1010. // type: data.type,
  1011. });
  1012. this.displaySingleLayer(data.columnId, data.id);
  1013. }
  1014. } else {
  1015. delete this.originalData[data.id];
  1016. map2DViewer.map.closePopup();
  1017. // 移除图例
  1018. if (this.legendTitle.length > 0) {
  1019. this.legendTitle = this.legendTitle.filter((v) => {
  1020. return v.name !== data.id;
  1021. });
  1022. this.legendIcon = this.legendIcon.filter((v) => {
  1023. return v.name !== data.id;
  1024. });
  1025. }
  1026. this.layerIdMap.delete(data.id);
  1027. //关联自定义模型
  1028. this.$store.state.treeDataCollection.delete(data.id);
  1029. // 只激活我的标记
  1030. this.activeNames = ["myLabel"];
  1031. this.$store.state.mapMethodsCollection
  1032. .get("RENDER")
  1033. .deleteGroupFromMap(data.id);
  1034. }
  1035. }
  1036. // 第一级菜单是我的模型
  1037. if (data.mainType && data.mainType === "我的模型") {
  1038. // 显示叠置分析的数据
  1039. checked ? this.displayOverlayData(data) : this.deleteOverlayData(data);
  1040. }
  1041. },
  1042. displayOverlayData(data) {
  1043. if (data.c_dzfx_file) {
  1044. this.$Get(this.uploadBaseUrl + data.c_dzfx_file, "").then(
  1045. (response) => {
  1046. if (response.features.length > 0) {
  1047. response.features.forEach((v) => {
  1048. let geojson = publicFun.standardGeojson(v.geometry.coordinates);
  1049. // console.log(geojson, "geojson")
  1050. this.readGeojson(geojson, data.id);
  1051. });
  1052. }
  1053. }
  1054. );
  1055. }
  1056. },
  1057. readGeojson(geojson, id) {
  1058. map2DViewer.overlay[id] = [];
  1059. let states = [];
  1060. states.push(geojson);
  1061. let geojsonData = L.geoJSON(states, {
  1062. style: function (feature) {
  1063. // console.log(feature);
  1064. },
  1065. }).addTo(map2DViewer.map);
  1066. map2DViewer.overlay[id] = geojsonData;
  1067. },
  1068. deleteOverlayData(data) {
  1069. if (map2DViewer.overlay[data.id]) {
  1070. map2DViewer.map.removeLayer(map2DViewer.overlay[data.id]);
  1071. }
  1072. },
  1073. // 右侧面板项点击事件
  1074. listItemClick(type, data) {
  1075. this.$store.state.bottomMenuIndexs.index = -1;
  1076. this.$store.state.bottomMenuIndexs.subIndex = -1;
  1077. this.updateCasePopupShow = false;
  1078. this.tableData = [];
  1079. if (type === "default") {
  1080. this.tableType = "normal";
  1081. this.boxWidth = "400";
  1082. this.boxHeight = "250";
  1083. if (data.c_content) {
  1084. let obj = JSON.parse(data.c_content).properties;
  1085. console.log(obj);
  1086. this.tableData.push(obj);
  1087. }
  1088. }
  1089. if (type === "new") {
  1090. this.rightLabelData.forEach((item) => {
  1091. if (item.id == data.id) {
  1092. item.geometryChecked = false;
  1093. this.controlLabel(item);
  1094. }
  1095. });
  1096. let geoType = JSON.parse(data.geojson).properties.featureType;
  1097. this.$store.state.mapMethodsCollection
  1098. .get("RENDER")
  1099. .drawGeometry(geoType, data);
  1100. this.tableType = "personal";
  1101. this.boxWidth = "300";
  1102. this.boxHeight = "300";
  1103. this.tableData.push({
  1104. name: data.name,
  1105. type: data.type,
  1106. des: data.des,
  1107. });
  1108. }
  1109. this.attrTableShow = true;
  1110. },
  1111. closeEvent() {
  1112. this.attrTableShow = false;
  1113. },
  1114. // 关闭修改标记弹窗
  1115. closeLabelEvent() {
  1116. this.updateCasePopupShow = false;
  1117. },
  1118. modifyLabelEvent() {
  1119. this.$nextTick(() => {
  1120. let selectType = this.$refs.updateLabelRef.selectVal;
  1121. let desContent = this.$refs.updateLabelRef.textContent;
  1122. let id = this.$refs.updateLabelRef.id;
  1123. let params = new FormData();
  1124. let geojson = JSON.parse(this.$refs.updateLabelRef.geojson);
  1125. let geometryType = geojson.properties.featureTypeIndex;
  1126. // 修改标题和描述
  1127. geojson.properties.title = selectType;
  1128. geojson.properties.desc = desContent;
  1129. console.log(geojson, "修改后的geojson数据");
  1130. params = {
  1131. userId: Number(localStorage.getItem("USER_ID")),
  1132. sourceId: 0,
  1133. type: geometryType,
  1134. geojson: JSON.stringify(geojson),
  1135. id: id,
  1136. };
  1137. this.$Post(this.urlsCollection.updateConllection, params).then(
  1138. (res) => {
  1139. if (res.code === 200) {
  1140. // console.log("修改成功", res);
  1141. this.updateCasePopupShow = false;
  1142. this.getUserMarkers();
  1143. }
  1144. },
  1145. (error) => {
  1146. this.$message.error("保存失败");
  1147. console.log(error);
  1148. }
  1149. );
  1150. });
  1151. },
  1152. // 修改标记 -- 仅支持修改类型和描述
  1153. updateLabel(val) {
  1154. // console.log("修改标记", val);
  1155. this.$store.state.bottomMenuIndexs.index = -1;
  1156. this.$store.state.bottomMenuIndexs.subIndex = -1;
  1157. this.updateCasePopupShow = true;
  1158. this.attrTableShow = false;
  1159. if (this.updateCasePopupShow) {
  1160. this.$nextTick(() => {
  1161. // console.log(this.$refs.updateLabelRef, "updateLabelRef");
  1162. this.$refs.updateLabelRef.selectVal = val.type;
  1163. this.$refs.updateLabelRef.textContent = val.des;
  1164. this.$refs.updateLabelRef.id = val.id;
  1165. this.$refs.updateLabelRef.geojson = val.geojson;
  1166. });
  1167. }
  1168. },
  1169. // 删除标记
  1170. deleteLabel(id) {
  1171. if (localStorage.getItem("USER_ID")) {
  1172. // console.log("删除标记");
  1173. let params = new FormData();
  1174. this.$store.state.mapMethodsCollection
  1175. .get("RENDER")
  1176. .deleteGeometry(map2DViewer.myLabels[`label_${id}`]);
  1177. map2DViewer.myLabels[`label_${id}`] = null;
  1178. params = {
  1179. userId: Number(localStorage.getItem("USER_ID")),
  1180. sourceId: 0,
  1181. id: id,
  1182. };
  1183. this.$Post(this.urlsCollection.deleteConllection, params).then(
  1184. (res) => {
  1185. if (res.code === 200) {
  1186. // console.log("疑点删除成功");
  1187. this.getUserMarkers();
  1188. }
  1189. }
  1190. );
  1191. }
  1192. },
  1193. // 控制标记的显示与隐藏
  1194. controlLabel(val) {
  1195. val.geometryChecked = !val.geometryChecked;
  1196. // 已经绘制了几何体
  1197. if (map2DViewer.myLabels[`label_${val.id}`]) {
  1198. if (val.featureType === "点") {
  1199. map2DViewer.myLabels[`label_${val.id}`].setOpacity(
  1200. val.geometryChecked ? 1 : 0
  1201. );
  1202. }
  1203. if (val.featureType !== "点") {
  1204. map2DViewer.myLabels[`label_${val.id}`].setStyle(
  1205. val.geometryChecked
  1206. ? {
  1207. opacity: 1,
  1208. fillOpacity: 0.4,
  1209. }
  1210. : {
  1211. opacity: 0,
  1212. fillOpacity: 0,
  1213. }
  1214. );
  1215. }
  1216. } else {
  1217. // 未绘制几何体
  1218. // console.log(val, "未绘制几何体");
  1219. if (val.geometryChecked) {
  1220. let geoType = JSON.parse(val.geojson).properties.featureType;
  1221. this.$store.state.mapMethodsCollection
  1222. .get("RENDER")
  1223. .drawGeometry(geoType, val);
  1224. }
  1225. }
  1226. },
  1227. },
  1228. };
  1229. </script>
  1230. <style lang="less" scoped>
  1231. @commonBorderColor: rgb(0, 170, 255);
  1232. .comprehensive-analysis {
  1233. &-law-popup {
  1234. position: absolute;
  1235. top: 15%;
  1236. left: 33%;
  1237. pointer-events: auto;
  1238. z-index: 99;
  1239. }
  1240. &-label-popup {
  1241. position: absolute;
  1242. top: 15%;
  1243. left: 35%;
  1244. pointer-events: auto;
  1245. z-index: 99;
  1246. }
  1247. .el-checkbox {
  1248. color: #fff;
  1249. /deep/.el-checkbox__input.is-checked + .el-checkbox__label {
  1250. color: rgba(116, 255, 255, 1);
  1251. }
  1252. /deep/.el-checkbox__input.is-checked .el-checkbox__inner::after {
  1253. width: 70%;
  1254. height: 70%;
  1255. background: #74ffff;
  1256. border-radius: 0;
  1257. transform: rotate(0deg) scaleY(1);
  1258. position: static;
  1259. }
  1260. /deep/.el-checkbox__inner {
  1261. border: 1px solid #dcdfe6;
  1262. background: rgba(0, 170, 255, 0);
  1263. display: flex;
  1264. align-items: center;
  1265. justify-content: center;
  1266. position: static;
  1267. &::after {
  1268. transition: 0ms;
  1269. }
  1270. }
  1271. /deep/.el-checkbox__label {
  1272. padding-left: 0;
  1273. font-size: 15px;
  1274. position: absolute;
  1275. top: 1px;
  1276. left: 25px;
  1277. }
  1278. }
  1279. &-searchbox {
  1280. width: 300px;
  1281. height: 40px;
  1282. display: flex;
  1283. align-items: center;
  1284. justify-content: center;
  1285. position: absolute;
  1286. left: 21%;
  1287. top: 30px;
  1288. pointer-events: auto;
  1289. /deep/.el-input-group__append,
  1290. .el-input-group__prepend {
  1291. background-color: transparent;
  1292. color: #fff;
  1293. border-left: none;
  1294. }
  1295. /deep/.el-input-group--append .el-input__inner,
  1296. .el-input-group__prepend {
  1297. border-right: none;
  1298. }
  1299. }
  1300. &-backbtn {
  1301. width: 120px;
  1302. height: 35px;
  1303. background: @commonBorderColor;
  1304. color: #fff;
  1305. border-radius: 3px;
  1306. position: absolute;
  1307. left: 30px;
  1308. top: 15px;
  1309. pointer-events: auto;
  1310. cursor: pointer;
  1311. .left-arrow {
  1312. width: 7px;
  1313. height: 7px;
  1314. border-top: 2px solid #ffffff;
  1315. border-right: 2px solid #ffffff;
  1316. transform: translate(-50%, -50%) rotate(225deg);
  1317. position: absolute;
  1318. top: 16.5px;
  1319. left: 25px;
  1320. }
  1321. .title {
  1322. width: 80px;
  1323. height: 35px;
  1324. line-height: 35px;
  1325. position: absolute;
  1326. left: 34px;
  1327. }
  1328. }
  1329. &-legendbox {
  1330. position: absolute;
  1331. right: 410px;
  1332. top: 30px;
  1333. z-index: 1;
  1334. }
  1335. /* 弹窗 */
  1336. &-popup {
  1337. // background: red;
  1338. position: absolute;
  1339. top: 10%;
  1340. left: 35%;
  1341. pointer-events: auto;
  1342. z-index: 99;
  1343. }
  1344. /* 左侧面板开启按钮 */
  1345. &-leftopenbox {
  1346. position: absolute;
  1347. left: 5px;
  1348. width: 50px;
  1349. height: 100%;
  1350. display: flex;
  1351. flex-direction: column;
  1352. justify-content: center;
  1353. & > div {
  1354. pointer-events: auto;
  1355. width: 40px;
  1356. height: 40px;
  1357. border-radius: 50%;
  1358. background: rgba(102, 203, 255, 1);
  1359. position: relative;
  1360. cursor: pointer;
  1361. & > div {
  1362. position: absolute;
  1363. top: 8px;
  1364. left: 16px;
  1365. display: inline-block;
  1366. width: 0px;
  1367. height: 0px;
  1368. border: 12px solid transparent;
  1369. border-left-color: #fff;
  1370. }
  1371. }
  1372. }
  1373. /* 右侧面板开启按钮 */
  1374. &-rightopenbox {
  1375. position: absolute;
  1376. right: 0;
  1377. width: 50px;
  1378. height: 100%;
  1379. display: flex;
  1380. flex-direction: column;
  1381. justify-content: center;
  1382. & > div {
  1383. pointer-events: auto;
  1384. width: 40px;
  1385. height: 40px;
  1386. border-radius: 50%;
  1387. cursor: pointer;
  1388. position: relative;
  1389. background: rgba(102, 203, 255, 1);
  1390. & > div {
  1391. position: absolute;
  1392. top: 8px;
  1393. right: 16px;
  1394. display: inline-block;
  1395. width: 0px;
  1396. height: 0px;
  1397. border: 12px solid transparent;
  1398. border-right-color: #fff;
  1399. }
  1400. }
  1401. }
  1402. /* 左边树状面板 */
  1403. &-left {
  1404. width: 400px;
  1405. height: 85%;
  1406. position: absolute;
  1407. top: 60px;
  1408. left: 0;
  1409. background: url("../assets/image/tree_background.png") no-repeat center;
  1410. background-size: 100% 100%;
  1411. pointer-events: auto;
  1412. .close-btnbox {
  1413. position: absolute;
  1414. right: -20px;
  1415. height: 100%;
  1416. width: 40px;
  1417. display: flex;
  1418. flex-direction: column;
  1419. justify-content: center;
  1420. & > div {
  1421. pointer-events: auto;
  1422. width: 40px;
  1423. height: 40px;
  1424. border-radius: 50%;
  1425. cursor: pointer;
  1426. position: relative;
  1427. background: rgba(102, 203, 255, 1);
  1428. & > div {
  1429. position: absolute;
  1430. top: 8px;
  1431. right: 16px;
  1432. display: inline-block;
  1433. width: 0px;
  1434. height: 0px;
  1435. border: 12px solid transparent;
  1436. border-right-color: #fff;
  1437. }
  1438. }
  1439. }
  1440. .control-container {
  1441. width: 100%;
  1442. height: 8%;
  1443. display: flex;
  1444. justify-content: flex-end;
  1445. align-items: center;
  1446. position: relative;
  1447. &-pin-btn {
  1448. width: 30px;
  1449. height: 30px;
  1450. background: url("../assets/image/panel_unlock.png") no-repeat center;
  1451. position: absolute;
  1452. top: 0;
  1453. right: 3px;
  1454. cursor: pointer;
  1455. &.lock-style {
  1456. background: url("../assets/image/panel_lock.png") no-repeat center;
  1457. }
  1458. }
  1459. &-input {
  1460. width: 320px;
  1461. position: absolute;
  1462. bottom: 5px;
  1463. left: 30px;
  1464. /deep/.el-input__inner {
  1465. font-size: 15px;
  1466. height: 35px;
  1467. }
  1468. }
  1469. }
  1470. .contant-container {
  1471. width: 100%;
  1472. height: 92%;
  1473. overflow: auto;
  1474. display: flex;
  1475. align-items: center;
  1476. justify-content: center;
  1477. &-innerbox {
  1478. width: 90%;
  1479. height: 98%;
  1480. .tree-arrow {
  1481. position: relative;
  1482. top: 0;
  1483. left: 0;
  1484. display: inline-block;
  1485. width: 0px;
  1486. height: 0px;
  1487. border: 7px solid transparent;
  1488. border-left-color: #fff;
  1489. }
  1490. .tree-arrow-expanded {
  1491. position: relative;
  1492. top: 4px;
  1493. left: -3px;
  1494. display: inline-block;
  1495. width: 0px;
  1496. height: 0px;
  1497. border: 7px solid transparent;
  1498. border-top-color: #fff;
  1499. }
  1500. .custom-tree-node {
  1501. position: relative;
  1502. width: 250px;
  1503. .el-checkbox {
  1504. width: 50%;
  1505. }
  1506. }
  1507. }
  1508. }
  1509. }
  1510. /* 右面板 -- 显示标记疑点 */
  1511. &-right {
  1512. width: 400px;
  1513. height: 85%;
  1514. position: absolute;
  1515. top: 60px;
  1516. right: 0;
  1517. background: url("../assets/image/tree_background.png") no-repeat center;
  1518. background-size: 100% 100%;
  1519. pointer-events: auto;
  1520. z-index: 2;
  1521. // 关闭折叠面板
  1522. .close-btnbox {
  1523. position: absolute;
  1524. left: -20px;
  1525. height: 100%;
  1526. width: 40px;
  1527. display: flex;
  1528. flex-direction: column;
  1529. justify-content: center;
  1530. & > div {
  1531. pointer-events: auto;
  1532. width: 40px;
  1533. height: 40px;
  1534. border-radius: 50%;
  1535. background: rgba(102, 203, 255, 1);
  1536. position: relative;
  1537. cursor: pointer;
  1538. & > div {
  1539. position: absolute;
  1540. top: 8px;
  1541. left: 16px;
  1542. display: inline-block;
  1543. width: 0px;
  1544. height: 0px;
  1545. border: 12px solid transparent;
  1546. border-left-color: #fff;
  1547. }
  1548. }
  1549. }
  1550. .control-container {
  1551. width: 100%;
  1552. height: 5%;
  1553. position: relative;
  1554. & > div {
  1555. width: 30px;
  1556. height: 30px;
  1557. background: url("../assets/image/panel_unlock.png") no-repeat center;
  1558. position: absolute;
  1559. top: 0;
  1560. left: 3px;
  1561. cursor: pointer;
  1562. &.lock-style {
  1563. background: url("../assets/image/panel_lock.png") no-repeat center;
  1564. }
  1565. }
  1566. }
  1567. .contant-container {
  1568. width: 100%;
  1569. height: 95%;
  1570. overflow: auto;
  1571. display: flex;
  1572. align-items: center;
  1573. justify-content: center;
  1574. &-innerbox {
  1575. width: 90%;
  1576. height: 98%;
  1577. // /deep/.el-icon-arrow-right:before {
  1578. // content: "";
  1579. // }
  1580. // /deep/.el-icon-arrow-right:after {
  1581. // content: "";
  1582. // }
  1583. .panel-list-item {
  1584. position: relative;
  1585. margin: 0 auto;
  1586. width: 80%;
  1587. height: auto;
  1588. background: #00aaff;
  1589. font-family: "PingFangSC SC";
  1590. font-weight: 400;
  1591. font-size: 18px;
  1592. line-height: 40px;
  1593. background: rgba(0, 47, 86, 0.3);
  1594. color: #fff;
  1595. padding-left: 20px;
  1596. border-left: 1px solid rgba(207, 222, 255, 0.2);
  1597. border-right: 1px solid rgba(207, 222, 255, 0.2);
  1598. border-bottom: 1px solid rgba(207, 222, 255, 0.2);
  1599. cursor: pointer;
  1600. .operation-icon {
  1601. position: absolute;
  1602. right: 100px;
  1603. top: 0;
  1604. display: flex;
  1605. align-items: center;
  1606. justify-content: space-around;
  1607. width: 75px;
  1608. // background: red;
  1609. }
  1610. .visible-icon {
  1611. position: absolute;
  1612. right: 60px;
  1613. top: 9.5px;
  1614. width: 20px;
  1615. height: 20px;
  1616. background: url("../assets/map/eye_invisible.png") no-repeat center;
  1617. &.click {
  1618. background: url("../assets/map/eye_visible.png") no-repeat center;
  1619. }
  1620. }
  1621. }
  1622. .panel-footer {
  1623. border: none;
  1624. width: 100%;
  1625. height: 50px;
  1626. margin-top: 10px;
  1627. overflow-x: auto;
  1628. }
  1629. }
  1630. }
  1631. }
  1632. /* 侧边栏收缩动画效果 */
  1633. /* 左边 */
  1634. .fade-left-enter-from {
  1635. opacity: 0;
  1636. transform: translateX(-300px);
  1637. }
  1638. .fade-left-enter-to {
  1639. opacity: 1;
  1640. transform: translateX(0);
  1641. }
  1642. /* 主动输入控住过渡的持续时间和缓动曲线 */
  1643. .fade-left-enter-active {
  1644. transition: all 0.3s ease;
  1645. }
  1646. .fade-left-leave-from {
  1647. opacity: 1;
  1648. transform: translateX(0);
  1649. }
  1650. .fade-left-leave-to {
  1651. opacity: 0;
  1652. transform: translateX(-300px);
  1653. }
  1654. .fade-left-leave-active {
  1655. transition: all 0.3s ease;
  1656. }
  1657. /* 右边 */
  1658. .fade-right-enter-from {
  1659. opacity: 0;
  1660. transform: translateX(300px);
  1661. }
  1662. .fade-right-enter-to {
  1663. opacity: 1;
  1664. transform: translateX(0);
  1665. }
  1666. .fade-right-enter-active {
  1667. transition: all 0.3s ease;
  1668. }
  1669. .fade-right-leave-from {
  1670. opacity: 1;
  1671. transform: translateX(0);
  1672. }
  1673. .fade-right-leave-to {
  1674. opacity: 0;
  1675. transform: translateX(300px);
  1676. }
  1677. .fade-right-leave-active {
  1678. transition: all 0.3s ease;
  1679. }
  1680. }
  1681. </style>