AiZtzsDetail.vue 69 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512
  1. <template>
  2. <div class="industria-land-detail">
  3. <div class="left-content">
  4. <Tree :data="data4" show-checkbox multiple></Tree>
  5. </div>
  6. <div class="map-content">
  7. <div class="content">
  8. <div :id="id" class="map">
  9. <div
  10. class="radar-scan-an"
  11. v-show="radarShow"
  12. :style="`width: ${radarScanStyle.width}; heigth: ${radarScanStyle.height}; top: ${radarScanStyle.top};left: ${radarScanStyle.left};`"
  13. ></div>
  14. </div>
  15. <div class="right-tool">
  16. <div class="layer-container">
  17. <div
  18. class="layer-panel"
  19. :class="{ checked: showLayerControl }"
  20. @click="toggleLayerControl"
  21. >
  22. <img
  23. src="~@/assets/image/icon-layer-checked.png"
  24. class="img"
  25. v-if="showLayerControl"
  26. />
  27. <img src="~@/assets/image/icon-layer.png" class="img" v-else />
  28. <span :class="{ c: showLayerControl }">图层控制</span>
  29. </div>
  30. <div class="layer-content-border" v-if="showLayerControl">
  31. <vue-perfect-scrollbar class="layer-content" :settings="settings">
  32. <div
  33. class="item"
  34. v-for="(item, index) in layers"
  35. :key="index + '-13'"
  36. >
  37. <div class="name">
  38. {{ item.name }}
  39. </div>
  40. <div
  41. class="item"
  42. v-for="(_item, _index) in item.layers"
  43. :key="_index + '-14'"
  44. style="margin: 5px 0"
  45. >
  46. <Checkbox
  47. v-model="_item.checked"
  48. class="checkbox"
  49. @click.native.stop=""
  50. @on-change="switchMapLayer(_item)"
  51. >{{ _item.name }}
  52. </Checkbox>
  53. </div>
  54. </div>
  55. </vue-perfect-scrollbar>
  56. </div>
  57. </div>
  58. </div>
  59. <div v-if="!showQuery" class="topdiv">
  60. <div class="m-textarea-panel">
  61. <textarea
  62. v-model="inputText"
  63. type="text"
  64. autocapitalize="off"
  65. autocomplete="off"
  66. spellcheck="false"
  67. autocorrect="off"
  68. placeholder="您可以试着这样问我,如“请帮我查一下萧山区永久基本农田面积大于100亩的地块”"
  69. autofocus=""
  70. >
  71. </textarea>
  72. <AIBtn @send="hotQuestionReset()" />
  73. </div>
  74. </div>
  75. <vue-perfect-scrollbar
  76. :settings="settings"
  77. class="left-panel"
  78. v-if="showQuery"
  79. >
  80. <div class="left-panel-content">
  81. <div v-for="(item, index) in hzData" :key="index">
  82. <div class="title" @click="resetAnswer(index)">
  83. {{ item.name }}
  84. </div>
  85. <div class="jsz" v-if="item.loading && !showResult">
  86. <Spin />
  87. {{ hintText }}
  88. </div>
  89. <div class="tab-content" v-if="!showResult">
  90. <div class="summary-content">
  91. <div class="summary-icon">
  92. <img src="~@/assets/image/cyyd/summary-icon.png" />
  93. </div>
  94. <vue-markdown-it
  95. :source="item.summary"
  96. :options="{
  97. html: true,
  98. linkify: true,
  99. }"
  100. />
  101. </div>
  102. </div>
  103. </div>
  104. <template v-if="showResult">
  105. <div class="xg-title">
  106. <img src="~@/assets/image/cyyd/fk.png" />
  107. <div class="name">回答</div>
  108. </div>
  109. <p class="xg-des">
  110. 为您找到以下{{ xgdk ? xgdk.length : 0 }}个地块
  111. </p>
  112. <div class="table-panel">
  113. <template v-if="xgdk && xgdk.length > 0">
  114. <div
  115. class="dkitem1"
  116. :class="{ dkitemchecked1: i == dkIndex }"
  117. @mouseover="mouseover(i)"
  118. @mouseout="mouseout(i)"
  119. @click="showDetailModal(citem, i)"
  120. v-for="(citem, i) in xgdk"
  121. :key="i"
  122. >
  123. <div class="number">{{ i + 1 }}</div>
  124. <div class="content">
  125. <h3>
  126. {{ citem.dlmc }}
  127. </h3>
  128. <p>
  129. <span class="content-item"
  130. >行政区名称:{{
  131. citem.xzqmc ? citem.xzqmc : "-"
  132. }}</span
  133. >
  134. <span class="content-item"
  135. >面积:{{
  136. citem.yjjbnttbmj
  137. ? (citem.yjjbnttbmj * 0.0015).toFixed(2)
  138. : 0
  139. }}亩</span
  140. >
  141. </p>
  142. </div>
  143. </div>
  144. </template>
  145. <div v-else class="hintText">未查询到相关地块数据!</div>
  146. </div>
  147. <div class="xg-title" v-if="false">
  148. <img src="~@/assets/image/cyyd/xgdk.png" />
  149. <div class="name">相关组织</div>
  150. <img src="~@/assets/image/cyyd/xs.png" />
  151. </div>
  152. <div class="table-panel" v-if="false">
  153. <div class="th" v-if="xgzz.length > 0">
  154. <div class="it xh">序号</div>
  155. <div class="it">组织名称</div>
  156. <div class="it">组织描述</div>
  157. </div>
  158. <div v-else>暂无数据</div>
  159. <div class="tr" v-for="(item, i) in xgzz" :key="i">
  160. <div class="it xh">{{ i + 1 }}</div>
  161. <div class="it">
  162. {{ item.name }}
  163. </div>
  164. <div class="it">{{ item.zzms }}</div>
  165. </div>
  166. </div>
  167. </template>
  168. <Spin size="large" class="span" fix v-if="loading"></Spin>
  169. </div>
  170. <div class="textarea-panel">
  171. <textarea
  172. v-model="zwinputText"
  173. type="text"
  174. autocapitalize="off"
  175. autocomplete="off"
  176. spellcheck="false"
  177. autocorrect="off"
  178. maxlength="1000"
  179. placeholder="请提问"
  180. autofocus=""
  181. >
  182. </textarea>
  183. <AIBtn @send="zwsend" :disabled="btnSendDisabled" />
  184. </div>
  185. </vue-perfect-scrollbar>
  186. <!-- <feek-back
  187. ref="feek"
  188. @close="hideFeekBackModal"
  189. :question="querQuestion"
  190. :answer="answer"
  191. ></feek-back> -->
  192. </div>
  193. </div>
  194. <Modal
  195. class="info-modal"
  196. footer-hide
  197. v-model="questionModal"
  198. :styles="{ top: '200px' }"
  199. width="40%"
  200. >
  201. <textarea
  202. class="input"
  203. v-model="input"
  204. type="text"
  205. autocapitalize="off"
  206. autocomplete="off"
  207. spellcheck="false"
  208. enterkeyhint="reset"
  209. autocorrect="off"
  210. placeholder="请输入,Enter发送"
  211. autofocus=""
  212. @keyup.enter.stop="reset()"
  213. ></textarea>
  214. <div class="bottom">
  215. <div class="name" @click="input = ''">清空</div>
  216. <div class="send-btn" @click="reset">发送</div>
  217. </div>
  218. </Modal>
  219. </div>
  220. </template>
  221. <script>
  222. import industrialTop from "@/components/IndustrialTop";
  223. import L from "leaflet";
  224. import Proj from "proj4leaflet";
  225. import ArrayQueue from "@/struct/ArrayQueue";
  226. import axios from "axios";
  227. import { arcgisToGeoJSON } from "@terraformer/arcgis";
  228. import loginMethods from "@/api/login";
  229. import { v4 as uuid } from "uuid";
  230. import { fetchEventSource } from "@microsoft/fetch-event-source";
  231. import dynamicMapLayer from "esri-leaflet/src/Layers/DynamicMapLayer";
  232. import * as turf from "@turf/turf";
  233. import { getWmtsLayer } from "@/util/leaflet";
  234. import wkt from "wellknown";
  235. import VueMarkdownIt from "vue-markdown-it";
  236. import landMethods from "@/api/land";
  237. import AIBtn from "@/components/AIBtn.vue";
  238. import LC from "@/assets/layerConfig.js";
  239. export default {
  240. components: {
  241. industrialTop,
  242. VueMarkdownIt,
  243. AIBtn,
  244. },
  245. data() {
  246. return {
  247. data4: [
  248. {
  249. title: "parent 1",
  250. expand: true,
  251. selected: true,
  252. children: [
  253. {
  254. title: "parent 1-1",
  255. expand: true,
  256. children: [
  257. {
  258. title: "leaf 1-1-1",
  259. disabled: true,
  260. },
  261. {
  262. title: "leaf 1-1-2",
  263. },
  264. ],
  265. },
  266. {
  267. title: "parent 1-2",
  268. expand: true,
  269. children: [
  270. {
  271. title: "leaf 1-2-1",
  272. checked: true,
  273. },
  274. {
  275. title: "leaf 1-2-1",
  276. },
  277. ],
  278. },
  279. ],
  280. },
  281. ],
  282. geoLayer: null,
  283. nearMarkerList: [],
  284. radarScanStyle: {
  285. width: "100%",
  286. height: "100%",
  287. left: 0,
  288. top: 0,
  289. },
  290. hzData: [],
  291. showQuery: false,
  292. radarShow: false,
  293. btnSendDisabled: false,
  294. input: "",
  295. inputText: "",
  296. shwoCompare: false,
  297. shwoCollect: false,
  298. answer: "",
  299. markerLayer: null,
  300. questionModal: false,
  301. showLegend: true,
  302. hintText: "思考中...",
  303. dkIndex: -1,
  304. hoverDkIndex: -1,
  305. summary: "",
  306. wt: null,
  307. count: 0,
  308. activeItem: { id: 1 },
  309. id: "industriaMap" + new Date().getTime(),
  310. layers: [],
  311. mContentVisabled: true,
  312. showResult: false,
  313. showDetail: false,
  314. zoomLevel: 8,
  315. zhuiwen: false,
  316. dkGeo: null,
  317. dkGeoJson: null,
  318. activeIndex: 0,
  319. tabIndex: 0,
  320. map: null,
  321. xgzz: [],
  322. zoom: 0,
  323. xgdk: [],
  324. interval: null,
  325. zwinputText: "",
  326. loading: false,
  327. ctrlAbout: null,
  328. eventSource: null,
  329. messages: [],
  330. gInterval: 3 * 1000 * 60,
  331. checkInterval: null,
  332. histories: new ArrayQueue(5),
  333. tabs: ["全部建设用地", "新建建设用地", "存量建设用地"],
  334. steps: [
  335. {
  336. name: "问题分析",
  337. },
  338. {
  339. name: "地块搜索",
  340. },
  341. {
  342. name: "整理答案",
  343. },
  344. {
  345. name: "回答完成",
  346. },
  347. ],
  348. querQuestion: "",
  349. settings: {
  350. maxScrollbarLength: 60,
  351. },
  352. geojsonLayer: null,
  353. wktToGeojsonLayer: null,
  354. identifyGeojsonLayer: null,
  355. type: null,
  356. modal: false,
  357. showTableModal: true,
  358. showLayerControl: false,
  359. polyline: null,
  360. dkMarkerLayer: [],
  361. startTime: 0,
  362. showIndentify: false,
  363. detailData: null,
  364. cyyqLayer: null,
  365. legend: [
  366. {
  367. name: "可利用资源",
  368. children: [
  369. {
  370. name: "公告地块",
  371. fill: "green",
  372. border: "green",
  373. },
  374. {
  375. name: "计划地块",
  376. fill: "blue",
  377. border: "blue",
  378. },
  379. ],
  380. },
  381. ],
  382. mockInterval: null,
  383. };
  384. },
  385. mounted() {
  386. this.mapExtend();
  387. this.$nextTick(() => {
  388. this.activeIndex = 0;
  389. this.initMap();
  390. // this.showResult = true;
  391. // this.showQuery = true;
  392. // this.xgdk = [
  393. // {
  394. // objectid: 1898278,
  395. // xzqmc: "萧山区",
  396. // xzqdm: 330109,
  397. // dymc: "",
  398. // yddm: "M1",
  399. // ydxz: "一类工业用地",
  400. // ydmj: 4.11,
  401. // rjlsx: 3,
  402. // rjlxx: 1,
  403. // jzmdsx: 1,
  404. // jzmdxx: 1,
  405. // jzgdsx: 1,
  406. // jzgdxx: 1,
  407. // ldlsx: 1,
  408. // ldlxx: 1,
  409. // center_wkt: "POINT(120.532207502681 30.1664883620282)",
  410. // geom: "POLYGON((120.530131556 30.168314732,120.530525256 30.168215047,120.530878871 30.168123523,120.531632501 30.16792846,120.531631828 30.167926322,120.531631117 30.167924192,120.531630373 30.167922072,120.531629593 30.16791996,120.531544007 30.167693986,120.531364964 30.167155818,120.531320061 30.167020849,120.530246946 30.167281865,120.530103254 30.166849934,120.529762626 30.165826014,120.52896681 30.166024878,120.528937662 30.166031967,120.528908402 30.166038698,120.528879035 30.166045068,120.528849567 30.166051076,120.528820004 30.166056722,120.528833696 30.166089628,120.52889148 30.166213522,120.528920385 30.166204896,120.528934816 30.166238378,120.529183192 30.166165913,120.529253176 30.1663749,120.529253546 30.16637481,120.529253601 30.166374968,120.52926568 30.166371977,120.529271071 30.166384946,120.529000619 30.166485071,120.5290278 30.166544188,120.529126001 30.16671611,120.529200817 30.166846306,120.529267328 30.166968542,120.529310181 30.167048353,120.529381231 30.167243535,120.529403943 30.167305507,120.529514176 30.167606297,120.529609137 30.16787516,120.529736109 30.168180701,120.529812571 30.168370639,120.529820607 30.168391677,120.530131556 30.168314732))",
  411. // },
  412. // {
  413. // objectid: 2091,
  414. // xzqmc: "萧山区",
  415. // xzqdm: 330109,
  416. // dymc: "",
  417. // yddm: "M1",
  418. // ydxz: "一类工业用地",
  419. // ydmj: 4.01,
  420. // rjlsx: 3,
  421. // rjlxx: 1,
  422. // jzmdsx: 1,
  423. // jzmdxx: 1,
  424. // jzgdsx: 1,
  425. // jzgdxx: 1,
  426. // ldlsx: 1,
  427. // ldlxx: 1,
  428. // center_wkt: "POINT(120.527286218151 30.1681019850924)",
  429. // geom: "POLYGON((120.537755625 30.180120155,120.538096026 30.180016897,120.538130112 30.180101238,120.53840443 30.180038604,120.538635688 30.179985801,120.538690742 30.179973231,120.538668558 30.179921898,120.538503023 30.179568443,120.538319597 30.179176783,120.538294432 30.179132302,120.538240693 30.179138349,120.537922455 30.179225031,120.537918655 30.17921591,120.537917661 30.179213054,120.537557113 30.178312381,120.537309966 30.177721942,120.536887458 30.177806658,120.536126249 30.178008438,120.53612485 30.178011462,120.536106701 30.178054671,120.53611147 30.178067168,120.536192522 30.178279549,120.536845675 30.179858098,120.536847251 30.179861474,120.537580483 30.179665201,120.537724753 30.180063279,120.537726707 30.18006447,120.537726917 30.180065118,120.537735187 30.180062925,120.537755625 30.180120155))",
  430. // },
  431. // {
  432. // objectid: 1924,
  433. // xzqmc: "萧山区",
  434. // xzqdm: 330109,
  435. // dymc: "物流产业单元",
  436. // yddm: "M1",
  437. // ydxz: "一类兼容二类工业用地",
  438. // ydmj: 3.95,
  439. // rjlsx: 3,
  440. // rjlxx: 1,
  441. // jzmdsx: 1,
  442. // jzmdxx: 1,
  443. // jzgdsx: 1,
  444. // jzgdxx: 1,
  445. // ldlsx: 1,
  446. // ldlxx: 1,
  447. // center_wkt: "POINT(120.485180194156 30.2474354153549)",
  448. // geom: "POLYGON((120.502129268 30.168593076,120.501546244 30.167333288,120.501537309 30.167317156,120.501526002 30.167302191,120.500703524 30.167926949,120.499290933 30.168947797,120.499089718 30.169139869,120.499102336 30.169156599,120.499478655 30.169583076,120.499495744 30.169599471,120.499515679 30.169613228,120.499537927 30.169623978,120.499561893 30.169631437,120.499586937 30.169635401,120.499612391 30.169635768,120.499637573 30.169632527,120.49966181 30.169625764,120.500722401 30.169244194,120.502044364 30.168768574,120.502068293 30.168757769,120.502089718 30.168743538,120.502107997 30.168726308,120.50212258 30.168706597,120.50213303 30.168684996,120.502139035 30.168662151,120.502140414 30.16863875,120.502137126 30.168615492,120.502129268 30.168593076))",
  449. // },
  450. // ];
  451. // this.addGdLayer(this.xgdk);
  452. // this.detailData = {
  453. // id: 48668,
  454. // dkid: "1895353609416212480",
  455. // xzqmc: "萧山区",
  456. // dkmc: "湘湖国家旅游度假区建设工矿仓储项目",
  457. // address: "位于萧山区义桥镇,东至空地,南至空地,西至空地,北至云临路。",
  458. // dkmj: 60.714,
  459. // tdyt: "工业用地",
  460. // tax: "100",
  461. // center_wkt: "POINT(120.912063 29.486802)",
  462. // };
  463. // this.showDetail = true;
  464. });
  465. },
  466. created() {
  467. if (this.$route.params && this.$route.params.keyword) {
  468. this.inputText = this.$route.params.keyword;
  469. }
  470. this.zwinputText = "";
  471. this.type = this.$route.params.type;
  472. },
  473. methods: {
  474. toggleContentVisabledAll() {
  475. this.mContentVisabled = !this.mContentVisabled;
  476. this.xgdk.forEach((item) => {
  477. item["show"] = this.mContentVisabled;
  478. });
  479. },
  480. toggleContentVisabled(item) {
  481. item["show"] = item["show"] ? false : true;
  482. this.mContentVisabled = item["show"];
  483. },
  484. mapExtend() {
  485. // 18级的地图
  486. L.TileLayer.MyTileLayer2 = L.TileLayer.extend({
  487. getTileUrl: function (coords) {
  488. return L.Util.template(this._url, {
  489. x: coords.x,
  490. y: coords.y,
  491. z: coords.z - 1,
  492. });
  493. },
  494. });
  495. },
  496. addGdLayer(dklist) {
  497. if (this.geoLayer) {
  498. this.map.removeLayer(this.geoLayer);
  499. this.geoLayer = null;
  500. }
  501. let that = this;
  502. if (dklist && dklist.length) {
  503. let idGroup = dklist.map((item) => item.objectid);
  504. let sql = "(" + idGroup.join(",") + ")";
  505. let queryGeometryUrl = window.ApplicationConfig.queryGeometryListUrl;
  506. axios.get(queryGeometryUrl, { params: { items: sql } }).then((data) => {
  507. if (data && data.data && data.data.length) {
  508. let geojsonList = data.data.map((ele) => JSON.parse(ele.geom));
  509. that.geoLayer = L.geoJSON(geojsonList, {
  510. style: function (feature) {
  511. return { color: "blue" };
  512. },
  513. });
  514. that.geoLayer.addTo(that.map);
  515. }
  516. });
  517. }
  518. },
  519. toggleLayerControl() {
  520. this.showLayerControl = !this.showLayerControl;
  521. if (!this.showLegend) {
  522. this.showLegend = true;
  523. }
  524. },
  525. toggleIdentity() {
  526. this.showIndentify = !this.showIndentify;
  527. if (this.showIndentify) {
  528. this.map.on("click", this.mapClick);
  529. } else {
  530. this.map.off("click", this.mapClick);
  531. if (this.showDetail) {
  532. this.hideDetail();
  533. }
  534. if (this.identifyGeojsonLayer) {
  535. this.map.removeLayer(this.identifyGeojsonLayer);
  536. }
  537. }
  538. },
  539. back() {
  540. this.showDetail = false;
  541. this.showQuery = false;
  542. this.radarShow = false;
  543. if (this.dkMarkerLayer) {
  544. this.dkMarkerLayer.forEach((item) => {
  545. this.map.removeLayer(item);
  546. });
  547. this.dkMarkerLayer = [];
  548. }
  549. if (this.ctrlAbout) {
  550. this.ctrlAbout.abort();
  551. }
  552. this.loading = false;
  553. if (this.interval) {
  554. clearInterval(this.interval);
  555. }
  556. if (this.mockInterval) {
  557. clearInterval(this.mockInterval);
  558. }
  559. this.inputText = "";
  560. },
  561. checkPermision() {
  562. let that = this;
  563. loginMethods
  564. .permission()
  565. .then((res) => {
  566. if (res && res.code == 200) {
  567. that.permission = res.data;
  568. if (that.permission) {
  569. that.activeIndex = 0;
  570. }
  571. }
  572. })
  573. .finally(() => {
  574. if (!this.permission) {
  575. this.$Message.error("用户信息验证失败,请重新登录!");
  576. setTimeout(() => {
  577. this.logout();
  578. }, 1000);
  579. }
  580. });
  581. },
  582. fullInput(item) {
  583. if (!this.loading) {
  584. this.activeIndex = 0;
  585. this.inputText = item.name;
  586. this.showQuery = false;
  587. } else {
  588. this.$Messages.info("正在请求中,请稍后!");
  589. }
  590. },
  591. logout() {
  592. this.$store.dispatch("LogOut").then(() => {
  593. this.$router.push({ name: "login" });
  594. });
  595. },
  596. reset() {
  597. if (this.input == "" || this.input == null) {
  598. this.$Message.info("请输入");
  599. return;
  600. }
  601. // this.inputText = this.input;
  602. // this.zwinputText = "";
  603. // this.questionModal = false;
  604. // this.histories = new ArrayQueue(5);
  605. // // this.hzData = [];
  606. // // var item = { name: this.inputText, loading: true };
  607. // // this.hzData.push(item);
  608. // this.toggleTab(0);
  609. this.inputText = this.input;
  610. this.hotQuestionReset();
  611. },
  612. hotQuestionReset() {
  613. if (this.inputText == "" || this.inputText == null) {
  614. // this.$Message.info("请输入");
  615. // return;
  616. this.inputText = "请帮我查一下萧山区永久基本农田面积大于100亩的地块";
  617. }
  618. this.hideDetail();
  619. this.zwinputText = "";
  620. this.questionModal = false;
  621. this.histories = new ArrayQueue(5);
  622. if (this.geoLayer) {
  623. this.map.removeLayer(this.geoLayer);
  624. this.geoLayer = null;
  625. }
  626. if (this.geojsonLayer) {
  627. this.map.removeLayer(this.geojsonLayer);
  628. this.geojsonLayer = null;
  629. }
  630. this.toggleInfoTab();
  631. this.toggleTab(0);
  632. },
  633. zwsend() {
  634. if (!this.zwinputText) {
  635. this.zwinputText = "请帮我查一下萧山区永久基本农田面积大于100亩的地块";
  636. }
  637. // var item = { name: this.zwinputText, loading: true };
  638. // // this.hzData = [item]
  639. // this.hzData.push(item);
  640. // this.activeIndex = 0;
  641. // this.toggleInfoTab();
  642. // this.send();
  643. this.inputText = this.zwinputText;
  644. this.hotQuestionReset();
  645. },
  646. //ai超时超过3.5分钟 或者报错处理,结束请求提示未查询到信息
  647. checkTimeOut() {
  648. if (this.loading) {
  649. this.xgdk = [];
  650. this.activeIndex = 0;
  651. if (this.ctrlAbout) {
  652. this.ctrlAbout.abort();
  653. }
  654. this.loading = false;
  655. if (this.interval) {
  656. clearInterval(this.interval);
  657. }
  658. this.hzData.forEach((item, index) => {
  659. if (index == this.hzData.length - 1) {
  660. this.hzData[index].summary = "未查询到相关信息";
  661. this.hzData[index].loading = false;
  662. this.zwinputText = "";
  663. }
  664. });
  665. if (this.checkInterval) {
  666. clearInterval(this.checkInterval);
  667. }
  668. this.showResult = true;
  669. this.radarShow = false;
  670. }
  671. },
  672. resetAnswer(index) {
  673. if (index == 0) {
  674. this.input = this.inputText;
  675. this.questionModal = true;
  676. }
  677. },
  678. showFlowChart() {
  679. this.modal = true;
  680. this.$nextTick(() => {
  681. this.$refs.flow.open();
  682. });
  683. },
  684. hideModal() {
  685. this.modal = false;
  686. },
  687. hideFeekBackModal() {},
  688. showTableInfo() {
  689. this.showTableModal = true;
  690. this.$nextTick(() => {
  691. this.$refs.table.open();
  692. });
  693. },
  694. hideTableModal() {
  695. this.showTableModal = false;
  696. },
  697. //图层控制
  698. switchMapLayer(item) {
  699. if (item.checked) {
  700. if (item.layer === undefined || item.layer == null) {
  701. if (item.type == "dynamic") {
  702. item.layer = dynamicMapLayer({
  703. layers: [0],
  704. url: item.url,
  705. f: "image",
  706. });
  707. } else if (item.type == "geoserver") {
  708. item.layer = L.tileLayer.wms(item.url, {
  709. // 链接要改对应的
  710. layers: item.layername,
  711. format: "image/png",
  712. layerID: Math.random(),
  713. transparent: true,
  714. });
  715. item.layer.setZIndex(item.zindex);
  716. } else if (item.type == "wmts") {
  717. item.layer = getWmtsLayer(item);
  718. item.layer.setZIndex(item.zindex);
  719. } else if (item.type == "tile2") {
  720. item.layer = new L.TileLayer.MyTileLayer2(
  721. item.url + "/tile/{z}/{y}/{x}"
  722. );
  723. item.layer.setZIndex(item.zindex);
  724. }
  725. }
  726. this.map.addLayer(item.layer);
  727. } else {
  728. if (item.layer != undefined || item.layer != null) {
  729. this.map.removeLayer(item.layer);
  730. }
  731. }
  732. },
  733. initMap() {
  734. let CRS_4490 = new Proj.CRS(
  735. "EPSG:4490",
  736. "+proj=longlat +ellps=GRS80 +no_defs",
  737. {
  738. resolutions: [
  739. 1.4062500262315807, 0.7031249999891485, 0.35156249999999994,
  740. 0.17578124999999997, 0.08789062500000012, 0.04394531250000006,
  741. 0.021972656250000007, 0.01098632812500002, 0.00549316406250001,
  742. 0.0027465820312500017, 0.0013732910156250009, 6.866455078124991e-4,
  743. 3.4332275390624957e-4, 1.7166137695312503e-4, 8.583068847656251e-5,
  744. 4.291534423828141e-5, 2.1457672119140645e-5, 1.0728836059570307e-5,
  745. 5.364418029785169e-6, 2.6822090642902305e-6, 1.3411045333348457e-6,
  746. ],
  747. origin: [-180, 90],
  748. }
  749. );
  750. this.layers = LC;
  751. this.layers.forEach((item, index) => {
  752. if (index == 0) {
  753. item.checked = true;
  754. } else {
  755. item.checked = false;
  756. }
  757. });
  758. this.map = L.map(this.id, {
  759. zoom: window.ApplicationConfig.mapOptions["zoom"],
  760. center: window.ApplicationConfig.mapOptions["center"],
  761. zoomControl: false,
  762. crs: CRS_4490,
  763. attributionControl: false, //去掉右下角的logo
  764. });
  765. //默认加载所有选中图层
  766. this.layers.forEach((layerGroup) => {
  767. layerGroup.layers.forEach((oneLayer) => {
  768. this.switchMapLayer(oneLayer);
  769. });
  770. });
  771. },
  772. //属性识别
  773. mapClick(e) {
  774. if (this.identifyGeojsonLayer) {
  775. this.map.removeLayer(this.identifyGeojsonLayer);
  776. }
  777. // debugger
  778. let query =
  779. window.ApplicationConfig.landUrl +
  780. "/0/query?where=&text=&objectIds=&time=&geometry=" +
  781. e.latlng.lng +
  782. "," +
  783. e.latlng.lat +
  784. "&" +
  785. "geometryType=esriGeometryPoint&inSR=4490&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&" +
  786. "maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&" +
  787. "outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&f=json";
  788. axios.get(query).then((data) => {
  789. console.log(data);
  790. if (data.data.features.length < 1) {
  791. this.$Message.info("未查询到数据");
  792. return;
  793. }
  794. var land = data.data.features[0].attributes;
  795. var geojson = arcgisToGeoJSON(data.data.features[0].geometry);
  796. console.log(turf.getGeom(geojson));
  797. land.area = turf.area(turf.getGeom(geojson)).toFixed(2) + "平方米";
  798. var geos = L.geoJSON(geojson, {
  799. style: function (feature) {
  800. return { color: "#3BA5FF" };
  801. },
  802. });
  803. this.dkGeo = geos;
  804. this.dkGeoJson = geojson;
  805. this.identifyGeojsonLayer = geos.addTo(this.map);
  806. this.map.fitBounds(geos.getBounds());
  807. this.showDetailModal(land, -1);
  808. });
  809. },
  810. location(geo) {
  811. let t = L.geoJSON(geo, {
  812. style: function (feature) {
  813. return { color: "yellow" };
  814. },
  815. });
  816. this.map.fitBounds(t.getBounds());
  817. },
  818. //高亮marker
  819. hightMarker(i) {
  820. this.dkMarkerLayer.forEach((item, index) => {
  821. var className = "point-div-icon";
  822. if (item.options.properties.p == i && index == i) {
  823. className = "highlight-div-icon";
  824. }
  825. if (index == this.hoverDkIndex) {
  826. className = "highlight-div-icon";
  827. }
  828. if (index == this.dkIndex) {
  829. className = "highlight-div-icon";
  830. }
  831. var myIcon = L.divIcon({
  832. html: index > -1 ? "<div>" + (index + 1) + "<div>" : "<div><div>",
  833. className: className,
  834. iconSize: [32, 32],
  835. });
  836. item.setIcon(myIcon);
  837. });
  838. },
  839. //地块Item hover 和marker 高亮交互
  840. mouseover(i) {
  841. this.hoverDkIndex = i;
  842. this.hightMarker(i);
  843. },
  844. mouseout(i) {
  845. this.hoverDkIndex = -1;
  846. this.hightMarker(-1);
  847. },
  848. //显示地块详情,先获取地块图斑,定位、路线、和地类分析需要叠加获取相交地块
  849. showDetailModal(item, index) {
  850. console.log("item:" + item);
  851. console.log(item);
  852. this.clearMark();
  853. this.activeItem = item;
  854. //高亮marker
  855. this.hightMarker(index);
  856. this.showDetail = true;
  857. this.dkIndex = index;
  858. this.goLocation(item, index);
  859. },
  860. //地块收藏点击查看详情
  861. dkInfo(item) {
  862. this.dkGeo = null;
  863. this.dkGeoJson = null;
  864. item.id = item.dk_id ? item.dk_id : item.id;
  865. this.goLocation(item);
  866. this.showDetail = true;
  867. this.activeItem = item;
  868. },
  869. //隐藏详情
  870. hideDetail() {
  871. this.showDetail = false;
  872. },
  873. //收藏
  874. doCollect(collect) {
  875. this.shwoCollect = collect;
  876. this.shwoCompare = false;
  877. if (collect) {
  878. this.hideDetail();
  879. }
  880. try {
  881. this.$refs.compre.remove();
  882. } catch (e) {}
  883. },
  884. //对比
  885. doCompare(compare) {
  886. this.shwoCompare = compare;
  887. this.shwoCollect = false;
  888. if (compare) {
  889. this.hideDetail();
  890. } else {
  891. try {
  892. this.$refs.compre.remove();
  893. } catch (e) {}
  894. }
  895. },
  896. toggle(index) {
  897. this.activeIndex = index;
  898. this.hideDetail();
  899. },
  900. toggleTab(index) {
  901. if (this.loading) {
  902. return;
  903. }
  904. this.tabIndex = index;
  905. if (this.inputText) {
  906. this.wt = this.inputText;
  907. this.hzData = [];
  908. var item = { name: this.wt, loading: true };
  909. this.hzData = [item];
  910. this.count = 0;
  911. this.zwinputText = "";
  912. this.zhuiwen = false;
  913. this.showQuery = true;
  914. this.send();
  915. } else {
  916. this.$Message.info("请输入!");
  917. }
  918. },
  919. toggleZw() {
  920. this.zhuiwen = !this.zhuiwen;
  921. },
  922. showFeek() {
  923. this.$nextTick(() => {
  924. this.$refs.feek.open();
  925. });
  926. },
  927. //地块图斑定位
  928. goLocation(item, index) {
  929. if (this.geojsonLayer) {
  930. this.map.removeLayer(this.geojsonLayer);
  931. this.geojsonLayer = null;
  932. }
  933. if (this.identifyGeojsonLayer) {
  934. this.map.removeLayer(this.identifyGeojsonLayer);
  935. }
  936. let queryGeometryUrl = window.ApplicationConfig.queryYjjbntGeometryUrl;
  937. let that = this;
  938. axios
  939. .get(queryGeometryUrl, { params: { id: item.objectid } })
  940. .then((data) => {
  941. if (data && data.data && data.data.length) {
  942. that.detailData = data.data[0];
  943. let geojson = wkt.parse(data.data[0].geom);
  944. var geos = L.geoJSON(geojson, {
  945. style: function (feature) {
  946. return { color: "red", fillOpacity: 0 };
  947. },
  948. });
  949. that.geojsonLayer = geos.addTo(that.map);
  950. that.map.fitBounds(geos.getBounds(), { padding: [200, 200] });
  951. }
  952. });
  953. },
  954. locationByGeojson(geojson, name) {
  955. if (this.cyyqLayer) {
  956. this.map.removeLayer(this.cyyqLayer);
  957. this.cyyqLayer = null;
  958. }
  959. var layer = L.geoJSON(geojson, {
  960. style: function (feature) {
  961. return { color: "yellow", fillOpacity: 0 };
  962. },
  963. });
  964. this.cyyqLayer = layer.addTo(this.map);
  965. layer.bindPopup(name).openPopup();
  966. this.map.fitBounds(layer.getBounds(), { padding: [200, 200] });
  967. },
  968. //获取地块信息
  969. async getActiveItemGeometry(item) {
  970. return new Promise((resolve, reject) => {
  971. let query =
  972. window.ApplicationConfig.geoserverUrl +
  973. "?service=WFS&version=1.0.0&request=GetFeature&typeName=" +
  974. window.ApplicationConfig.gdLayerName +
  975. "&maxFeatures=50&outputFormat=application%2Fjson&cql_filter=dkmc='" +
  976. item.dkmc +
  977. "'";
  978. axios.get(query).then((data) => {
  979. if (data.data.features.length < 1) {
  980. this.$Message.info("未查询到数据");
  981. return;
  982. }
  983. this.detailData = data.data.features[0].properties;
  984. var geojson = data.data.features[0].geometry;
  985. var geos = L.geoJSON(geojson, {
  986. style: function (feature) {
  987. return { color: "#3BA5FF" };
  988. },
  989. });
  990. this.dkGeo = geos;
  991. this.dkGeoJson = geojson;
  992. resolve();
  993. });
  994. });
  995. },
  996. //地图绘制清空
  997. clearMark() {
  998. if (this.markerLayer) {
  999. this.map.removeLayer(this.markerLayer);
  1000. this.markerLayer = null;
  1001. }
  1002. if (this.polyline) {
  1003. this.map.removeLayer(this.polyline);
  1004. this.polylines = null;
  1005. }
  1006. if (this.wktToGeojsonLayer) {
  1007. this.wktToGeojsonLayer.forEach((item) => {
  1008. this.map.removeLayer(item);
  1009. });
  1010. this.wktToGeojsonLayer = null;
  1011. }
  1012. this.dkIndex = -1;
  1013. this.hoverDkIndex = -1;
  1014. this.hightMarker(-1);
  1015. this.zoom = 0;
  1016. this.activeItem = null;
  1017. },
  1018. //地类分析-图斑定位-叠加出相交地块
  1019. goWkt(wkts) {
  1020. if (this.wktToGeojsonLayer) {
  1021. this.wktToGeojsonLayer.forEach((item) => {
  1022. this.map.removeLayer(item);
  1023. });
  1024. }
  1025. this.wktToGeojsonLayer = [];
  1026. var originGeom = this.dkGeoJson;
  1027. //当前地块ID
  1028. if (this.geojsonLayer == null) {
  1029. this.goLocation(this.activeItem, this.dkIndex);
  1030. }
  1031. const bounds = L.latLngBounds();
  1032. wkts.forEach((t) => {
  1033. var geojson = wkt.parse(t);
  1034. //定位
  1035. var geos = L.geoJSON(geojson, {
  1036. style: function (feature) {
  1037. return { color: "#ffff00" };
  1038. },
  1039. });
  1040. var layer = geos.addTo(this.map);
  1041. this.wktToGeojsonLayer.push(layer);
  1042. //相交
  1043. let intersectGeo = turf.intersect(originGeom, geojson);
  1044. if (intersectGeo) {
  1045. var inner = L.geoJSON(intersectGeo, {
  1046. style: function (feature) {
  1047. return { color: "#ff0000" };
  1048. },
  1049. });
  1050. var innnerlayer = inner.addTo(this.map);
  1051. this.wktToGeojsonLayer.push(innnerlayer);
  1052. }
  1053. bounds.extend(geos.getBounds());
  1054. });
  1055. try {
  1056. this.map.fitBounds(bounds);
  1057. } catch (e) {
  1058. console.log("fitBounds error: ", e);
  1059. }
  1060. },
  1061. //详情页tab切换地图绘制相关清空
  1062. toggleInfoTab(type, index) {
  1063. console.log(type, index);
  1064. if (this.markerLayer) {
  1065. this.map.removeLayer(this.markerLayer);
  1066. this.markerLayer = null;
  1067. }
  1068. if (this.polyline) {
  1069. this.map.removeLayer(this.polyline);
  1070. this.polylines = null;
  1071. }
  1072. if (this.wktToGeojsonLayer) {
  1073. this.wktToGeojsonLayer.forEach((item) => {
  1074. this.map.removeLayer(item);
  1075. });
  1076. this.wktToGeojsonLayer = null;
  1077. }
  1078. if (this.nearMarkerList && this.nearMarkerList.length > 0) {
  1079. this.nearMarkerList.forEach((ele) => {
  1080. this.map.removeLayer(ele);
  1081. });
  1082. }
  1083. if (this.cyyqLayer) {
  1084. this.map.removeLayer(this.cyyqLayer);
  1085. this.cyyqLayer = null;
  1086. }
  1087. if (type == "jbxx") {
  1088. //现状分析
  1089. if (index == 1) {
  1090. this.checkedJbxxLayers(3, 4, 5);
  1091. } else if (index == 2) {
  1092. this.checkedJbxxLayers(4, 3, 5);
  1093. } else if (index == 3) {
  1094. this.checkedJbxxLayers(5, 3, 4);
  1095. }
  1096. } else if (type == "qyts") {
  1097. this.checkedQysLayers(index);
  1098. } else if (type == "zhjt") {
  1099. this.checkedOtherLayers();
  1100. } else if (type == "ggss") {
  1101. this.checkedOtherLayers();
  1102. }
  1103. },
  1104. checkedOtherLayers() {
  1105. this.layers[2].layers.forEach((item) => {
  1106. if (item.checked) {
  1107. item.checked = false;
  1108. this.switchMapLayer(item);
  1109. }
  1110. });
  1111. this.layers[3].layers.forEach((item) => {
  1112. if (item.checked) {
  1113. item.checked = false;
  1114. this.switchMapLayer(item);
  1115. }
  1116. });
  1117. this.layers[4].layers.forEach((item) => {
  1118. if (item.checked) {
  1119. item.checked = false;
  1120. this.switchMapLayer(item);
  1121. }
  1122. });
  1123. this.layers[5].layers.forEach((item) => {
  1124. if (item.checked) {
  1125. item.checked = false;
  1126. this.switchMapLayer(item);
  1127. }
  1128. });
  1129. },
  1130. checkedQysLayers(selectIndex) {
  1131. this.layers[2].layers.forEach((item, index) => {
  1132. if (index == selectIndex && !item.checked) {
  1133. item.checked = true;
  1134. this.switchMapLayer(item);
  1135. } else {
  1136. item.checked = false;
  1137. this.switchMapLayer(item);
  1138. }
  1139. });
  1140. this.layers[3].layers.forEach((item) => {
  1141. if (item.checked) {
  1142. item.checked = false;
  1143. this.switchMapLayer(item);
  1144. }
  1145. });
  1146. this.layers[4].layers.forEach((item) => {
  1147. if (item.checked) {
  1148. item.checked = false;
  1149. this.switchMapLayer(item);
  1150. }
  1151. });
  1152. this.layers[5].layers.forEach((item) => {
  1153. if (item.checked) {
  1154. item.checked = false;
  1155. this.switchMapLayer(item);
  1156. }
  1157. });
  1158. },
  1159. checkedJbxxLayers(index1, index2, index3) {
  1160. this.layers[index1].layers.forEach((item) => {
  1161. if (!item.checked) {
  1162. item.checked = true;
  1163. this.switchMapLayer(item);
  1164. }
  1165. });
  1166. this.layers[index2].layers.forEach((item) => {
  1167. if (item.checked) {
  1168. item.checked = false;
  1169. this.switchMapLayer(item);
  1170. }
  1171. });
  1172. this.layers[index3].layers.forEach((item) => {
  1173. if (item.checked) {
  1174. item.checked = false;
  1175. this.switchMapLayer(item);
  1176. }
  1177. });
  1178. this.layers[2].layers.forEach((item) => {
  1179. if (item.checked) {
  1180. item.checked = false;
  1181. this.switchMapLayer(item);
  1182. }
  1183. });
  1184. },
  1185. addClusterLayer(points) {
  1186. this.nearMarkerList.forEach((ele) => {
  1187. this.map.removeLayer(ele);
  1188. });
  1189. this.nearMarkerList = [];
  1190. points.forEach((ele) => {
  1191. var className = "point-yellow-icon";
  1192. let ll = String.fromCharCode(65 + ele.letter);
  1193. var myIcon = L.divIcon({
  1194. html: "<div>" + ll + "<div>",
  1195. className: className,
  1196. //图标大小
  1197. iconSize: [28, 28],
  1198. properties: ll,
  1199. });
  1200. var marker = L.marker([ele.latitude, ele.longitude], {
  1201. icon: myIcon,
  1202. }).addTo(this.map);
  1203. // marker.bindPopup(ele.letter, {
  1204. // closeButton: false,
  1205. // });
  1206. this.nearMarkerList.push(marker);
  1207. });
  1208. },
  1209. //路线绘制
  1210. goPointMark(item) {
  1211. var center = item.center;
  1212. var cp = item.cp;
  1213. if (this.markerLayer) {
  1214. this.map.removeLayer(this.markerLayer);
  1215. this.markerLayer = null;
  1216. }
  1217. if (center != "") {
  1218. var centerList = cp.split(",");
  1219. var className = "point-end-icon";
  1220. var myIcon = L.divIcon({
  1221. className: className,
  1222. //图标大小
  1223. iconSize: [32, 32],
  1224. });
  1225. this.map.flyTo([centerList[1], centerList[0]], 17);
  1226. }
  1227. },
  1228. //所有地块仿百度地图绘制
  1229. showXgdkCenterPoint() {
  1230. if (this.dkMarkerLayer) {
  1231. this.dkMarkerLayer.forEach((item) => {
  1232. this.map.removeLayer(item);
  1233. });
  1234. this.dkMarkerLayer = [];
  1235. }
  1236. const bounds = L.latLngBounds();
  1237. this.xgdk.forEach((item, i) => {
  1238. if (item.center_wkt) {
  1239. var center = item.center_wkt
  1240. .substring(6, item.center_wkt.length - 1)
  1241. .replace(" ", ",");
  1242. var centerList = center.split(",");
  1243. var className = "point-div-icon";
  1244. var myIcon = L.divIcon({
  1245. html: i > -1 ? "<div>" + (i + 1) + "<div>" : "<div><div>",
  1246. className: className,
  1247. //图标大小
  1248. iconSize: [32, 32],
  1249. });
  1250. var marker = L.marker([centerList[1], centerList[0]], {
  1251. icon: myIcon,
  1252. properties: { p: i },
  1253. }).addTo(this.map);
  1254. let that = this;
  1255. marker.on("mouseover", function (e) {
  1256. that.hoverDkIndex = i;
  1257. });
  1258. marker.on("mouseout", function (e) {
  1259. that.hoverDkIndex = -1;
  1260. });
  1261. marker.on("click", function (e) {
  1262. that.showDetailModal(that.xgdk[i], i);
  1263. });
  1264. this.dkMarkerLayer.push(marker);
  1265. var pointLng = L.latLngBounds([[centerList[1], centerList[0]]]);
  1266. bounds.extend(pointLng);
  1267. }
  1268. });
  1269. this.map.fitBounds(bounds);
  1270. },
  1271. //埋点
  1272. async burialPoint() {
  1273. let p = {
  1274. question: this.querQuestion,
  1275. answer: this.answer,
  1276. };
  1277. landMethods.burialPoint(p).then((res) => {
  1278. if (res.code == 200) {
  1279. console.log("问答--burialPoint");
  1280. }
  1281. });
  1282. },
  1283. //ai大模型请求
  1284. send: _.debounce(async function () {
  1285. let that = this;
  1286. this.showResult = false;
  1287. //不显示查询时地图上的雷达扫描效果
  1288. this.radarShow = false;
  1289. this.zhuiwen = false;
  1290. if (this.eventSource) {
  1291. this.eventSource.close();
  1292. this.loading = false;
  1293. this.eventSource = null;
  1294. }
  1295. if (this.ctrlAbout) {
  1296. this.ctrlAbout.abort();
  1297. }
  1298. if (this.dkMarkerLayer) {
  1299. this.dkMarkerLayer.forEach((item) => {
  1300. this.map.removeLayer(item);
  1301. });
  1302. this.dkMarkerLayer = [];
  1303. }
  1304. if (this.interval) {
  1305. clearInterval(this.interval);
  1306. }
  1307. this.activeIndex = 0;
  1308. var question = this.wt.trim();
  1309. if (this.zwinputText != "") {
  1310. //追问的时候,暂时不用历史数据
  1311. // question = question + ",其中" + this.zwinputText.trim();
  1312. question = this.zwinputText.trim();
  1313. }
  1314. let mock = false;
  1315. if (question === "帮我在萧山区推荐三宗31亩左右的工业用地") {
  1316. mock = true;
  1317. }
  1318. this.interval = setInterval(
  1319. () => {
  1320. if (this.activeIndex < this.steps.length - 1) {
  1321. this.activeIndex = this.activeIndex + 1;
  1322. }
  1323. },
  1324. mock ? 1000 : 5000
  1325. );
  1326. this.querQuestion = question;
  1327. this.summary = "";
  1328. this.xgdk = [];
  1329. this.activeIndex = 0;
  1330. this.hintText = "思考中...";
  1331. this.messages.push({
  1332. id: uuid(),
  1333. content: question,
  1334. source: "user",
  1335. timestamp: new Date().getTime(),
  1336. });
  1337. //清空输入框文字
  1338. // this.inputText = "";
  1339. //发送请求
  1340. //建立SSE连接
  1341. this.loading = true;
  1342. this.startTime = new Date().getTime();
  1343. this.checkInterval = setInterval(() => {
  1344. this.checkTimeOut();
  1345. }, this.gInterval);
  1346. // 建立连接
  1347. // let eventSource = new EventSource(
  1348. // `${window.ApplicationConfig.subscribeUrl}${this.inputText.trim()}`
  1349. // );
  1350. if (!this.ctrlAbout) {
  1351. this.ctrlAbout = new AbortController();
  1352. }
  1353. this.btnSendDisabled = true;
  1354. //todo
  1355. const signal = this.ctrlAbout.signal;
  1356. await fetchEventSource(window.ApplicationConfig.subscribeUrl, {
  1357. method: "POST",
  1358. openWhenHidden: true,
  1359. headers: {
  1360. "Content-Type": "application/json",
  1361. },
  1362. body: JSON.stringify({
  1363. data: question,
  1364. history: this.histories.toArray().flat() || [],
  1365. }),
  1366. signal: signal,
  1367. async onmessage(msg) {
  1368. const { data } = msg;
  1369. if (data) {
  1370. that.handleData({ data: data }, question);
  1371. }
  1372. },
  1373. onerror(err) {
  1374. console.log("请求报错--");
  1375. that.checkTimeOut();
  1376. },
  1377. }).catch((err) => {
  1378. console.log(err);
  1379. console.log("请求报错:" + err);
  1380. that.checkTimeOut();
  1381. });
  1382. }, 500),
  1383. handleData(e, question) {
  1384. let T = this;
  1385. if (e.data != "[FINISH]" && e.data != "[DONE]") {
  1386. const responseData = JSON.parse(e.data);
  1387. const responses = responseData["agent_responses"];
  1388. // console.log("responses: ", responses);
  1389. const lastRes = responses[responses.length - 1];
  1390. var lastUpRes = null;
  1391. responses.forEach((item, index) => {
  1392. if (
  1393. item.exec_res &&
  1394. typeof item.exec_res === "string" &&
  1395. item.exec_res.indexOf("\n```json\n") > -1
  1396. ) {
  1397. lastUpRes = responses[index];
  1398. // console.log("lastUpRes: ", lastUpRes);
  1399. }
  1400. });
  1401. const user_request = responseData.user_request;
  1402. const conversationId = lastRes["agent_id"];
  1403. let message = T.messages.find(({ id }) => id === conversationId);
  1404. const executed = lastRes["executed"];
  1405. const agentName = lastRes["agent_name"];
  1406. const agentNameCn = lastRes["agent_name_cn"];
  1407. const execRes = lastRes["exec_res"];
  1408. const lastChoice = lastRes.choices[lastRes.choices.length - 1];
  1409. const choiceId = lastChoice["choice_id"];
  1410. let choiceMessage = T.messages.find(({ id }) => id === choiceId);
  1411. if (window.ApplicationConfig.aiAgent.indexOf(agentName) >= 0) {
  1412. if (message) {
  1413. if (lastChoice.role === "assistant" && !lastChoice.history) {
  1414. }
  1415. if (
  1416. agentName != "summary" &&
  1417. lastChoice.role === "assistant" &&
  1418. !executed
  1419. ) {
  1420. T.loading = false;
  1421. T.hzData.forEach((item, index) => {
  1422. if (index == T.hzData.length - 1) {
  1423. T.hzData[index].summary = lastChoice.content
  1424. .replaceAll("\n```json\n", "")
  1425. .replaceAll("```json\n", "")
  1426. .replaceAll("\n```\n", "");
  1427. T.$forceUpdate();
  1428. }
  1429. });
  1430. }
  1431. if (agentName === "summary") {
  1432. if (!executed) {
  1433. T.loading = false;
  1434. this.hintText = "结果整理中...";
  1435. } else if (execRes) {
  1436. // T.summary = execRes;
  1437. T.showResult = true;
  1438. T.radarShow = false;
  1439. T.loading = false;
  1440. if (lastUpRes) {
  1441. var exec_res = lastUpRes.exec_res
  1442. .replaceAll("\n```json\n", "")
  1443. .replaceAll("```json\n", "")
  1444. .replaceAll("\n```\n", "");
  1445. exec_res = JSON.parse(exec_res);
  1446. var dk = exec_res;
  1447. console.log("dk: ", dk);
  1448. T.xgdk = dk;
  1449. T.clearMark();
  1450. T.showXgdkCenterPoint();
  1451. T.addGdLayer(T.xgdk);
  1452. T.answer = e.data;
  1453. // T.burialPoint();
  1454. } else {
  1455. T.xgdk = [];
  1456. T.clearMark();
  1457. }
  1458. T.activeIndex = T.steps.length - 1;
  1459. // T.hintText = "检索完成";
  1460. T.hzData.forEach((item, index) => {
  1461. if (index == T.hzData.length - 1) {
  1462. T.hzData[index].summary = execRes;
  1463. T.hzData[index].loading = false;
  1464. T.zwinputText = "";
  1465. }
  1466. });
  1467. clearInterval(T.checkInterval);
  1468. }
  1469. }
  1470. } else {
  1471. T.messages.push({
  1472. id: conversationId,
  1473. content: "",
  1474. source: "ai",
  1475. loading: true,
  1476. timestamp: new Date().getTime(),
  1477. });
  1478. }
  1479. }
  1480. } else {
  1481. if (e.data == "[FINISH]") {
  1482. console.log("SSE连接关闭");
  1483. T.btnSendDisabled = false;
  1484. T.loading = false;
  1485. T.count = 0;
  1486. if (T.eventSource) {
  1487. T.eventSource.close();
  1488. }
  1489. if (T.interval) {
  1490. clearInterval(T.interval);
  1491. }
  1492. T.messages.forEach((item, index) => {
  1493. if (item.loading) {
  1494. T.messages.splice(index, 1);
  1495. }
  1496. });
  1497. T.loading = false;
  1498. T.addHistory(question, T.messages[T.messages.length - 1].content);
  1499. }
  1500. }
  1501. },
  1502. /**
  1503. * 添加多轮对话效果
  1504. * @param question
  1505. * @param ans
  1506. */
  1507. addHistory(question, ans) {
  1508. this.histories.enqueue([
  1509. {
  1510. type: 1,
  1511. data: question,
  1512. },
  1513. {
  1514. type: 2,
  1515. data: ans,
  1516. },
  1517. ]);
  1518. },
  1519. },
  1520. };
  1521. </script>
  1522. <style lang="scss" scoped>
  1523. .ivu-spin-fix {
  1524. border-radius: 10px;
  1525. position: relative;
  1526. height: 200px;
  1527. }
  1528. .industria-land-detail {
  1529. width: 100%;
  1530. position: relative;
  1531. height: 100%;
  1532. .left-content {
  1533. width: 20%;
  1534. top: 0px;
  1535. left: 0px;
  1536. height: calc(100% - 0px);
  1537. float: left;
  1538. }
  1539. .map-content {
  1540. width: 80%;
  1541. top: 0px;
  1542. height: calc(100% - 0px);
  1543. float: right;
  1544. .content {
  1545. width: 100%;
  1546. height: 100%;
  1547. position: relative;
  1548. .map {
  1549. width: 100%;
  1550. z-index: 10;
  1551. height: 100%;
  1552. }
  1553. .right-tool {
  1554. display: flex;
  1555. position: absolute;
  1556. top: 20px;
  1557. right: 20px;
  1558. z-index: 21;
  1559. .layer-container {
  1560. .layer-panel {
  1561. height: 100%;
  1562. cursor: pointer;
  1563. width: 130px;
  1564. height: 38px;
  1565. background: #ffffff;
  1566. border-radius: 8px;
  1567. display: flex;
  1568. justify-content: center;
  1569. align-items: center;
  1570. .img {
  1571. width: 25px;
  1572. margin-right: 8px;
  1573. height: 25px;
  1574. }
  1575. span {
  1576. font-family: Alibaba PuHuiTi 2;
  1577. font-weight: normal;
  1578. font-size: 16px;
  1579. color: #333333;
  1580. }
  1581. .c {
  1582. color: #fff;
  1583. }
  1584. }
  1585. .checked {
  1586. background: #2879e7;
  1587. }
  1588. }
  1589. .c {
  1590. margin-right: 20px;
  1591. }
  1592. .layer-content-border {
  1593. position: absolute;
  1594. right: 135px;
  1595. top: 0px;
  1596. padding: 0px 10px;
  1597. overflow-y: auto;
  1598. z-index: 99;
  1599. .layer-content {
  1600. z-index: 99;
  1601. background: #ffffff;
  1602. border: 1px solid #e4e7ea;
  1603. border-radius: 8px;
  1604. padding: 10px 20px;
  1605. max-height: 755px;
  1606. box-shadow: 0px 6px 5px 0px rgba(194, 210, 237, 0.3);
  1607. cursor: pointer;
  1608. width: 320px;
  1609. border-radius: 5px;
  1610. z-index: 1;
  1611. .item {
  1612. width: 100%;
  1613. .name {
  1614. color: #333;
  1615. font-size: 18px;
  1616. font-weight: bold;
  1617. }
  1618. .checkbox {
  1619. // color:#6dcff6;
  1620. color: #333;
  1621. margin-left: 35px;
  1622. font-size: 16px;
  1623. cursor: pointer;
  1624. }
  1625. .ivu-checkbox-inner {
  1626. margin-right: 8px;
  1627. cursor: pointer;
  1628. background-color: transparent;
  1629. border: 1px solid #2879e7;
  1630. }
  1631. }
  1632. }
  1633. }
  1634. }
  1635. .legend-panel {
  1636. position: absolute;
  1637. right: 17px;
  1638. width: 168px;
  1639. // height: 360px;
  1640. background: #ffffff;
  1641. border-radius: 10px;
  1642. cursor: pointer;
  1643. padding: 0px 12px 14px 10px;
  1644. border-radius: 10px;
  1645. background: rgba(255, 255, 255, 1);
  1646. bottom: 21px;
  1647. z-index: 19;
  1648. .name-panel {
  1649. padding: 10px 0;
  1650. display: flex;
  1651. align-items: center;
  1652. justify-content: space-between;
  1653. //border-bottom: 1px solid #eceef1;
  1654. .name {
  1655. font-family: Microsoft YaHei;
  1656. font-weight: bold;
  1657. color: #000;
  1658. font-size: 16px;
  1659. }
  1660. .img {
  1661. width: 16px;
  1662. height: 16px;
  1663. }
  1664. }
  1665. .layer-legend {
  1666. width: 100%;
  1667. height: calc(100% - 62px);
  1668. .item {
  1669. list-style: none;
  1670. display: flex;
  1671. flex-direction: column;
  1672. align-items: center;
  1673. font-family: Microsoft YaHei;
  1674. font-weight: 400;
  1675. font-size: 14px;
  1676. color: #333333;
  1677. margin-bottom: 10px;
  1678. i {
  1679. display: inline-block;
  1680. border: 1px solid transparent;
  1681. width: 20px;
  1682. height: 16px;
  1683. margin-top: 2px;
  1684. border-radius: 2px;
  1685. margin-right: 8px;
  1686. }
  1687. .label {
  1688. width: 100%;
  1689. font-size: 14px;
  1690. font-family: Microsoft YaHei;
  1691. font-weight: 400;
  1692. color: #333333;
  1693. display: flex;
  1694. }
  1695. .c {
  1696. font-weight: bold;
  1697. flex-direction: column;
  1698. }
  1699. .zl {
  1700. display: flex;
  1701. flex-direction: row;
  1702. width: 100%;
  1703. margin-top: 10px;
  1704. }
  1705. }
  1706. .item:last-child {
  1707. margin-bottom: 0px;
  1708. }
  1709. }
  1710. }
  1711. .topdiv {
  1712. position: absolute;
  1713. top: 10px;
  1714. z-index: 100;
  1715. left: 13px;
  1716. width: 35%;
  1717. .m-textarea-panel {
  1718. width: 100%;
  1719. height: 150px;
  1720. background: #ffffff;
  1721. position: relative;
  1722. padding: 17px 0px 0px 19px;
  1723. box-shadow: 0px 8px 16px 1px rgba(0, 57, 124, 0.2);
  1724. border-radius: 16px 16px 16px 16px;
  1725. border: 1px solid #4e69ff;
  1726. textarea {
  1727. border: none;
  1728. resize: none;
  1729. width: calc(100% - 60px);
  1730. font-weight: normal;
  1731. font-size: 18px;
  1732. height: 100%;
  1733. &:focus-visible {
  1734. outline: none;
  1735. }
  1736. &::placeholder {
  1737. font-family: Microsoft YaHei;
  1738. font-weight: bold;
  1739. font-size: 18px;
  1740. color: #6a7177;
  1741. }
  1742. }
  1743. }
  1744. }
  1745. .left-panel {
  1746. width: 486px;
  1747. padding: 26px 29px 32px 31px;
  1748. z-index: 11;
  1749. height: 100%;
  1750. position: absolute;
  1751. left: 0;
  1752. top: 0;
  1753. // background: linear-gradient(-30deg, #d6e8fb, #ffffff);
  1754. background-color: #fff;
  1755. .left-panel-content {
  1756. width: 100%;
  1757. height: calc(100% - 90px);
  1758. overflow-x: hidden;
  1759. overflow-y: auto;
  1760. }
  1761. .logo {
  1762. font-family: REEJI-FlashSansN95;
  1763. font-weight: 900;
  1764. font-size: 28px;
  1765. color: #333333;
  1766. line-height: 36px;
  1767. margin-bottom: 31px;
  1768. height: 30px;
  1769. }
  1770. .desc {
  1771. font-family: Microsoft YaHei;
  1772. font-weight: 400;
  1773. font-size: 16px;
  1774. color: #333333;
  1775. }
  1776. .hint {
  1777. font-family: Microsoft YaHei;
  1778. font-weight: 400;
  1779. font-size: 16px;
  1780. color: #2879e7;
  1781. margin-bottom: 30px;
  1782. margin-top: 40px;
  1783. }
  1784. .hot-question-item {
  1785. display: flex;
  1786. margin-bottom: 20px;
  1787. img {
  1788. width: 32px;
  1789. height: 32px;
  1790. margin-right: 11px;
  1791. }
  1792. .right-nr {
  1793. width: calc(100% - 43px);
  1794. cursor: pointer;
  1795. padding: 17px 32px 16px 20px;
  1796. background: linear-gradient(90deg, #c7dcf8, #e8eafd);
  1797. border-radius: 10px;
  1798. font-family: PingFang SC;
  1799. font-weight: 500;
  1800. font-size: 14px;
  1801. color: #333333;
  1802. }
  1803. .right-nr:hover {
  1804. border: 1px solid #2879e7;
  1805. }
  1806. }
  1807. .diver44 {
  1808. height: 44px;
  1809. }
  1810. .m-textarea-panel {
  1811. width: 100%;
  1812. height: 105px;
  1813. background: #ffffff;
  1814. border-radius: 10px;
  1815. position: relative;
  1816. padding: 17px 0px 0px 19px;
  1817. textarea {
  1818. border: none;
  1819. resize: none;
  1820. width: calc(100% - 60px);
  1821. font-weight: normal;
  1822. font-size: 16px;
  1823. height: 100%;
  1824. &:focus-visible {
  1825. outline: none;
  1826. }
  1827. &::placeholder {
  1828. font-family: Microsoft YaHei;
  1829. font-weight: 400;
  1830. font-size: 14px;
  1831. color: #999999;
  1832. }
  1833. }
  1834. .btn {
  1835. width: 40px;
  1836. height: 40px;
  1837. position: absolute;
  1838. right: 17px;
  1839. cursor: pointer;
  1840. bottom: 14px;
  1841. display: flex;
  1842. align-items: center;
  1843. justify-content: center;
  1844. background: linear-gradient(90deg, #5c62ea, #517de2);
  1845. border-radius: 20px;
  1846. img {
  1847. width: 20px;
  1848. height: 20px;
  1849. }
  1850. }
  1851. }
  1852. .back-icon {
  1853. position: absolute;
  1854. top: 26px;
  1855. right: 2px;
  1856. width: 28px;
  1857. height: 28px;
  1858. background: url("~@/assets/image/back-icon.png") no-repeat center;
  1859. background-size: 100% 100%;
  1860. cursor: pointer;
  1861. }
  1862. .title {
  1863. // height: 59px;
  1864. font-family: REEJI-FlashSansN95;
  1865. font-weight: bold;
  1866. font-size: 20px;
  1867. color: #212121;
  1868. cursor: pointer;
  1869. line-height: 36px;
  1870. margin-bottom: 36px;
  1871. }
  1872. .jsz {
  1873. margin: 0 0px 17px 0px;
  1874. display: flex;
  1875. height: 32px;
  1876. align-items: center;
  1877. img {
  1878. width: 32px;
  1879. margin-right: 14px;
  1880. height: 32px;
  1881. }
  1882. font-family: Microsoft YaHei;
  1883. font-weight: bold;
  1884. font-size: 18px;
  1885. color: #2879e7;
  1886. }
  1887. .steps {
  1888. display: flex;
  1889. margin-bottom: 41px;
  1890. padding-left: 7px;
  1891. .item {
  1892. display: flex;
  1893. cursor: pointer;
  1894. .name-panel {
  1895. display: flex;
  1896. flex-direction: column;
  1897. .icon {
  1898. height: 36px;
  1899. width: 36px;
  1900. margin: 0px 12px;
  1901. margin-bottom: 12px;
  1902. }
  1903. .name {
  1904. width: 64px;
  1905. font-family: Microsoft YaHei;
  1906. font-weight: bold;
  1907. font-size: 16px;
  1908. color: #333333;
  1909. }
  1910. .c {
  1911. color: #666666;
  1912. }
  1913. }
  1914. .line {
  1915. width: 60px;
  1916. height: 2px;
  1917. margin-top: 17px;
  1918. background: #bbd4f0;
  1919. }
  1920. .checked {
  1921. background: #10d295;
  1922. }
  1923. }
  1924. }
  1925. .tab-panel {
  1926. padding-left: 3px;
  1927. display: flex;
  1928. .item {
  1929. display: flex;
  1930. margin-right: 48px;
  1931. cursor: pointer;
  1932. flex-direction: column;
  1933. .name {
  1934. width: 120px;
  1935. height: 20px;
  1936. font-family: Microsoft YaHei;
  1937. font-weight: 400;
  1938. font-size: 20px;
  1939. color: #465d7c;
  1940. line-height: 36px;
  1941. }
  1942. .selected {
  1943. font-weight: bold;
  1944. color: #333333;
  1945. }
  1946. .line {
  1947. margin-top: 20px;
  1948. width: 116px;
  1949. height: 6px;
  1950. background: url("~@/assets/image/cyyd/tab-select.png") no-repeat
  1951. center;
  1952. background-size: 100% 100%;
  1953. }
  1954. }
  1955. }
  1956. .summary-content {
  1957. display: flex;
  1958. .summary-icon {
  1959. display: inline-block;
  1960. width: 32px;
  1961. height: 32px;
  1962. background: #ffffff;
  1963. border: 1px solid #d5e3ff;
  1964. border-radius: 50%;
  1965. margin-right: 5px;
  1966. flex-shrink: 0;
  1967. img {
  1968. width: 100%;
  1969. height: 100%;
  1970. }
  1971. }
  1972. }
  1973. .tab-content {
  1974. width: 100%;
  1975. height: calc(100% - 260px);
  1976. position: relative;
  1977. margin: 31px 0px 28px 5px;
  1978. font-family: Microsoft YaHei;
  1979. font-weight: 400;
  1980. line-height: 30px;
  1981. font-size: 16px;
  1982. color: #666666;
  1983. .spin {
  1984. margin: 31px 0px 28px 5px;
  1985. font-family: Microsoft YaHei;
  1986. font-weight: 400;
  1987. line-height: 30px;
  1988. height: 100px;
  1989. display: flex;
  1990. font-size: 16px;
  1991. justify-content: center;
  1992. align-items: center;
  1993. color: #666666;
  1994. }
  1995. .btns-panel {
  1996. display: flex;
  1997. justify-content: flex-end;
  1998. height: 28px;
  1999. align-items: center;
  2000. padding-left: 2px;
  2001. margin: 10px 0;
  2002. .left-btn {
  2003. display: flex;
  2004. height: 28px;
  2005. display: none;
  2006. align-items: center;
  2007. .icon {
  2008. width: 20px;
  2009. height: 20px;
  2010. }
  2011. .diver {
  2012. width: 11px;
  2013. height: 28px;
  2014. }
  2015. .alias {
  2016. font-family: Microsoft YaHei;
  2017. font-weight: 400;
  2018. font-size: 16px;
  2019. color: #465d7c;
  2020. margin-right: 32px;
  2021. }
  2022. }
  2023. .right-btn {
  2024. display: flex;
  2025. height: 28px;
  2026. align-items: center;
  2027. .zw {
  2028. width: 64px;
  2029. height: 28px;
  2030. cursor: pointer;
  2031. text-align: center;
  2032. line-height: 28px;
  2033. background: rgba(255, 255, 255, 0.5);
  2034. border-radius: 5px;
  2035. font-family: Microsoft YaHei;
  2036. font-weight: 400;
  2037. font-size: 16px;
  2038. margin-right: 7px;
  2039. color: #4e8de2;
  2040. }
  2041. .zw:hover {
  2042. border: 1px solid #4e8de2;
  2043. }
  2044. .checked {
  2045. border: 1px solid #4e8de2;
  2046. }
  2047. .feek {
  2048. width: 100px;
  2049. background: #be0d0a;
  2050. margin-right: 20px;
  2051. border: 1px solid #be0d0a;
  2052. color: white;
  2053. }
  2054. .feek:hover {
  2055. border: 1px solid #be0d0a;
  2056. }
  2057. .icon {
  2058. width: 20px;
  2059. height: 20px;
  2060. }
  2061. }
  2062. }
  2063. }
  2064. .textarea-panel {
  2065. margin: 28px 3px 0px 3px;
  2066. width: 424px;
  2067. height: 90px;
  2068. background: #ffffff;
  2069. position: absolute;
  2070. bottom: 26px;
  2071. padding: 18px 0px 0px 19px;
  2072. box-shadow: 0px 6px 12px 1px rgba(11, 53, 103, 0.08);
  2073. border-radius: 16px 16px 16px 16px;
  2074. border: 1px solid #e5e6ea;
  2075. textarea {
  2076. border: none;
  2077. resize: none;
  2078. width: calc(100% - 60px);
  2079. font-weight: normal;
  2080. font-size: 18px;
  2081. &:focus-visible {
  2082. outline: none;
  2083. }
  2084. &::placeholder {
  2085. font-family: Microsoft YaHei;
  2086. font-size: 20px;
  2087. color: #a7aeb4;
  2088. }
  2089. }
  2090. .btn {
  2091. width: 40px;
  2092. height: 40px;
  2093. position: absolute;
  2094. right: 17px;
  2095. cursor: pointer;
  2096. bottom: 14px;
  2097. display: flex;
  2098. align-items: center;
  2099. justify-content: center;
  2100. background: linear-gradient(124deg, #505dff 0%, #418cff 100%);
  2101. border-radius: 10px 10px 10px 10px;
  2102. img {
  2103. width: 20px;
  2104. height: 20px;
  2105. }
  2106. }
  2107. }
  2108. .xg-title {
  2109. height: 20px;
  2110. margin-top: 28px;
  2111. display: flex;
  2112. align-items: center;
  2113. margin-bottom: 22px;
  2114. img {
  2115. width: 20px;
  2116. margin-right: 11px;
  2117. height: 20px;
  2118. cursor: pointer;
  2119. }
  2120. .name {
  2121. font-family: Microsoft YaHei;
  2122. font-weight: bold;
  2123. font-size: 18px;
  2124. margin-right: 17px;
  2125. color: #333333;
  2126. }
  2127. }
  2128. .xg-des {
  2129. margin-bottom: 10px;
  2130. }
  2131. .table-panel {
  2132. padding-bottom: 20px;
  2133. .th {
  2134. height: 40px;
  2135. background: #ffffff;
  2136. border-radius: 10px;
  2137. margin-bottom: 10px;
  2138. display: flex;
  2139. .it {
  2140. flex: 1.2;
  2141. font-family: Microsoft YaHei;
  2142. font-weight: 400;
  2143. font-size: 14px;
  2144. cursor: pointer;
  2145. color: #465d7c;
  2146. padding: 0px 3px;
  2147. height: 40px;
  2148. text-align: center;
  2149. line-height: 40px;
  2150. }
  2151. .blue {
  2152. font-family: Microsoft YaHei;
  2153. font-weight: 400;
  2154. font-size: 14px;
  2155. color: #2879e7;
  2156. }
  2157. .xh {
  2158. flex: 0.8;
  2159. }
  2160. .text {
  2161. flex: 1.5;
  2162. }
  2163. }
  2164. .hintText {
  2165. margin-top: 18px;
  2166. }
  2167. .tr {
  2168. display: flex;
  2169. border-radius: 2px;
  2170. cursor: pointer;
  2171. padding: 21px 0px 19px 0px;
  2172. border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  2173. align-items: center;
  2174. .it {
  2175. flex: 1.2;
  2176. text-align: center;
  2177. padding: 0px 3px;
  2178. font-family: Microsoft YaHei;
  2179. font-weight: 400;
  2180. font-size: 14px;
  2181. color: #465d7c;
  2182. display: flex;
  2183. justify-content: center;
  2184. align-items: center;
  2185. .info {
  2186. cursor: pointer;
  2187. display: flex;
  2188. justify-content: center;
  2189. // padding: 6px 0px;
  2190. width: 20px;
  2191. height: 20px;
  2192. font-family: Microsoft YaHei;
  2193. font-weight: 400;
  2194. font-size: 14px;
  2195. color: #2879e7;
  2196. }
  2197. }
  2198. .c:hover {
  2199. cursor: pointer;
  2200. color: #2879e7;
  2201. }
  2202. .xh {
  2203. flex: 0.8;
  2204. }
  2205. .text {
  2206. flex: 1.5;
  2207. }
  2208. }
  2209. .tr:hover {
  2210. background: white;
  2211. border-radius: 10px;
  2212. }
  2213. .checked {
  2214. background: white;
  2215. border-radius: 5px;
  2216. }
  2217. }
  2218. }
  2219. }
  2220. }
  2221. }
  2222. </style>
  2223. <style>
  2224. @import "~leaflet/dist/leaflet.css";
  2225. @import "~leaflet.markercluster/dist/MarkerCluster.css";
  2226. @import "~leaflet.markercluster/dist/MarkerCluster.Default.css";
  2227. .leaflet-control-attribution {
  2228. margin: 10px !important;
  2229. border-radius: 8px;
  2230. height: 30%;
  2231. padding: 5px;
  2232. }
  2233. </style>
  2234. <style lang="scss">
  2235. .info-modal {
  2236. .ivu-modal-content {
  2237. overflow: hidden;
  2238. width: 100%;
  2239. height: 200px;
  2240. .ivu-modal-close .ivu-icon-ios-close {
  2241. display: none;
  2242. }
  2243. .ivu-modal-header {
  2244. display: none;
  2245. }
  2246. .ivu-modal-body {
  2247. width: 100%;
  2248. height: 100%;
  2249. padding: 20px;
  2250. display: flex;
  2251. flex-direction: column;
  2252. .input {
  2253. width: 100%;
  2254. height: calc(100% - 40px);
  2255. border-color: transparent;
  2256. }
  2257. textarea {
  2258. width: 100%;
  2259. border: none;
  2260. resize: none;
  2261. font-weight: normal;
  2262. line-height: 26px;
  2263. height: 100%;
  2264. background: transparent;
  2265. font-size: 18px;
  2266. &:focus-visible {
  2267. outline: none;
  2268. }
  2269. &::placeholder {
  2270. font-family: Alibaba PuHuiTi 2;
  2271. font-weight: normal;
  2272. font-size: 18px;
  2273. color: #acb1c1;
  2274. }
  2275. }
  2276. .bottom {
  2277. height: 40px;
  2278. display: flex;
  2279. justify-content: space-between;
  2280. .name {
  2281. color: #666;
  2282. cursor: pointer;
  2283. font-size: 16px;
  2284. }
  2285. .send-btn {
  2286. cursor: pointer;
  2287. width: 110px;
  2288. position: absolute;
  2289. right: 33px;
  2290. bottom: 20px;
  2291. display: flex;
  2292. align-items: center;
  2293. justify-content: center;
  2294. height: 40px;
  2295. background: linear-gradient(90deg, #5c62ea, #517de2);
  2296. border-radius: 20px;
  2297. .icon {
  2298. width: 20px;
  2299. height: 20px;
  2300. margin-right: 6px;
  2301. }
  2302. font-family: Alibaba PuHuiTi 2;
  2303. font-weight: normal;
  2304. font-size: 16px;
  2305. color: #ffffff;
  2306. }
  2307. .send-btn:hover {
  2308. background: #5c62ea;
  2309. }
  2310. }
  2311. }
  2312. }
  2313. }
  2314. .dkitemchecked1 {
  2315. border: 1px solid #007bff;
  2316. }
  2317. .dkitem1 {
  2318. display: flex;
  2319. align-items: center;
  2320. margin-bottom: 20px;
  2321. padding: 10px;
  2322. background-color: #f8f9fd;
  2323. border-radius: 8px;
  2324. .number {
  2325. width: 30px;
  2326. height: 30px;
  2327. background-color: #007bff;
  2328. color: #fff;
  2329. display: flex;
  2330. justify-content: center;
  2331. align-items: center;
  2332. border-radius: 50%;
  2333. margin-right: 10px;
  2334. }
  2335. .content {
  2336. flex: 1;
  2337. }
  2338. .content h3 {
  2339. margin: 0;
  2340. font-size: 16px;
  2341. margin-bottom: 10px;
  2342. }
  2343. .content p {
  2344. margin: 5px 0 0;
  2345. font-size: 14px;
  2346. color: #666;
  2347. }
  2348. .content p .content-item {
  2349. margin-right: 5px;
  2350. }
  2351. }
  2352. </style>
  2353. <style>
  2354. </style>