Tool.vue 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672
  1. <template>
  2. <div class="tool">
  3. <ul class="func">
  4. <li
  5. v-for="(item, index) in funcList"
  6. :key="index"
  7. :class="{ active: item.active }"
  8. @click="toolClickHandle(item)"
  9. >
  10. <p></p>
  11. <!-- {{ item.label }} -->
  12. </li>
  13. </ul>
  14. <div
  15. :class="{ help: true, active: helpActive }"
  16. v-show="false"
  17. @click="showHelp"
  18. ></div>
  19. <!-- 展示索引页面 -->
  20. <van-popup
  21. v-model:show="indexesShow"
  22. :class="'indexesListContent'"
  23. :style="{ background: 'transparent' }"
  24. :close-on-click-overlay="false"
  25. :closed="hideIndexesInfoDailog"
  26. >
  27. <!-- closeable
  28. close-icon="close" -->
  29. <div class="indexesList">
  30. <!-- <div class="header">
  31. <span>青浦行政服务中心</span>
  32. </div> -->
  33. <div class="listContent">
  34. <div class="header">
  35. <!-- <span>青浦行政服务中心</span> -->
  36. </div>
  37. <!-- <div class="title_container">
  38. <ul>
  39. <li
  40. v-for="(item, index) in cameraInfo"
  41. :key="index"
  42. :class="{ active: item.active }"
  43. @click="changeFloor(item)"
  44. >
  45. {{ item.name }}
  46. </li>
  47. </ul>
  48. </div> -->
  49. <div class="list_container">
  50. <div>
  51. <div
  52. class="first_content"
  53. v-for="(item, index) in cameraInfo"
  54. :key="index"
  55. >
  56. <div class="title">{{ item.name }}</div>
  57. <ul>
  58. <li
  59. v-for="(item_, index_) in item.children"
  60. :key="index_"
  61. :class="{ active: item_.active }"
  62. @click="changeView(item_)"
  63. >
  64. {{ item_.name }}
  65. </li>
  66. </ul>
  67. </div>
  68. </div>
  69. <!-- <ul>
  70. <li
  71. v-for="(item, index) in cameraInfoChildren"
  72. :key="index"
  73. :class="{ active: item.active }"
  74. @click="changeView(item)"
  75. >
  76. {{ item.name }}
  77. </li>
  78. </ul> -->
  79. </div>
  80. </div>
  81. </div>
  82. <div
  83. class="close"
  84. @click="hideIndexesInfoDailog"
  85. ></div>
  86. </van-popup>
  87. <!-- 展示点位文字信息 -->
  88. <van-popup
  89. v-model:show="pointShow"
  90. class="point_popup"
  91. :style="{ background: 'transparent' }"
  92. :close-on-click-overlay="false"
  93. :closed="hidePointInfoDailog"
  94. >
  95. <div class="pointInfoContent">
  96. <div v-html="pointInfos"></div>
  97. </div>
  98. <div
  99. class="close"
  100. @click="hidePointInfoDailog"
  101. ></div>
  102. </van-popup>
  103. <!-- 展示平面图 -->
  104. <van-popup
  105. v-model:show="planeShow"
  106. class="plane_popup"
  107. :style="{
  108. height: '460px',
  109. width: '100%',
  110. top: '55%',
  111. background: 'transparent'
  112. }"
  113. :close-on-click-overlay="false"
  114. :closed="hidePlaneInfoDailog"
  115. >
  116. <div class="plane_container">
  117. <div class="image_container">
  118. <ul>
  119. <li
  120. v-for="(item, index) in planeArr"
  121. :key="index"
  122. v-show="item.active"
  123. >
  124. <img
  125. :src="item.src"
  126. alt=""
  127. />
  128. </li>
  129. <div
  130. class="close"
  131. @click="hidePlaneInfoDailog"
  132. ></div>
  133. </ul>
  134. </div>
  135. <div class="image_header">
  136. <ul>
  137. <li
  138. v-for="(item, index) in planeArr"
  139. :key="index"
  140. :class="{ active: item.active }"
  141. @click="choosePlane(index)"
  142. >
  143. {{ item.name }}
  144. </li>
  145. </ul>
  146. </div>
  147. </div>
  148. </van-popup>
  149. <!-- 展示帮助 -->
  150. <van-popup
  151. v-model:show="helpShow"
  152. class="help_popup"
  153. :style="{
  154. height: '180px',
  155. width: '75%',
  156. top: '50%',
  157. background: 'transparent'
  158. }"
  159. :close-on-click-overlay="false"
  160. :closed="hideHelpInfoDailog"
  161. >
  162. <div class="help_container">
  163. <div class="header">提示</div>
  164. <div class="content">
  165. 1. 选择模型中“ <span></span> ”可以移动,支持360°旋转
  166. <div>2. 使用工具栏内“索引”功能,可快速切换场景</div>
  167. </div>
  168. </div>
  169. <div
  170. class="close"
  171. @click="hideHelpInfoDailog"
  172. ></div>
  173. </van-popup>
  174. <!-- 展示点位可办事项 -->
  175. <van-popup
  176. v-model:show="doThingShow"
  177. class="doThing_popup"
  178. :style="{ background: 'transparent' }"
  179. :close-on-click-overlay="false"
  180. :closed="hidePointInfoDailog"
  181. >
  182. <div class="content">
  183. <div
  184. class="doThingFirstContent"
  185. v-if="doThingFirst.length != 0 && Object.getOwnPropertyNames(doThingSecond).length == 0"
  186. >
  187. <div class="header">部门</div>
  188. <div class="list">
  189. <ul>
  190. <li
  191. v-for="(item, index) in doThingFirst"
  192. :key="index"
  193. @click="chooseDBSecond(item)"
  194. >
  195. <span>{{ item.unit }}</span><span v-if="item.chiles">({{ item.chiles.length }})</span>
  196. </li>
  197. </ul>
  198. </div>
  199. </div>
  200. <div
  201. class="doThingSecondContent"
  202. v-if="Object.getOwnPropertyNames(doThingSecond).length != 0"
  203. >
  204. <div class="header">青浦区{{ doThingSecond.unit }}</div>
  205. <div class="list">
  206. <van-collapse
  207. v-model="activeNames"
  208. accordion
  209. >
  210. <div
  211. v-for="(item, index) in doThingSecond.chiles"
  212. :key="index"
  213. >
  214. <van-collapse-item
  215. :title="item.name"
  216. :name="index + 1 + ''"
  217. v-if="item.chiles[0].name.length != 0"
  218. >
  219. <ul>
  220. <li
  221. v-for="(item_, index_) in item.chiles"
  222. :key="index_"
  223. >
  224. {{ item_.name }}
  225. </li>
  226. </ul>
  227. </van-collapse-item>
  228. <span
  229. class="item"
  230. v-else
  231. >
  232. {{ item.name }}
  233. </span>
  234. </div>
  235. </van-collapse>
  236. </div>
  237. </div>
  238. </div>
  239. <div
  240. class="close"
  241. @click="closeDoThingPopup"
  242. ></div>
  243. <!-- v-if="Object.getOwnPropertyNames(doThingSecond).length == 0" -->
  244. <div
  245. class="back"
  246. @click="backDoThingPopup"
  247. v-if="Object.getOwnPropertyNames(doThingSecond).length != 0"
  248. ></div>
  249. </van-popup>
  250. <!-- 事项库 -->
  251. <van-popup
  252. v-model:show="showEventState"
  253. class="plane_popup"
  254. :style="{
  255. height: '460px',
  256. width: '100%',
  257. background: 'transparent'
  258. }"
  259. :close-on-click-overlay="false"
  260. :closed="hideEventListDailog"
  261. >
  262. <div class="plane_container_event">
  263. <div
  264. class="close"
  265. @click="hideEventListDailog"
  266. ></div>
  267. <div class="paramsBox">
  268. <input
  269. type="text"
  270. v-model="eventData.params.where"
  271. /><span
  272. class="paramBtu"
  273. @click="reSetParam()"
  274. >重置</span>
  275. <span
  276. class="paramBtu"
  277. @click="getEventData()"
  278. >查询</span>
  279. </div>
  280. <div class="eventDataList">
  281. <div class="eventMessage">
  282. <span
  283. v-show="eventData.message"
  284. style="font-size: 1rem; color: #ccc"
  285. >{{ eventData.message }}</span>
  286. </div>
  287. <p
  288. v-for="(item, index) in eventData.data"
  289. :key="'event_' + index"
  290. >
  291. <span
  292. v-if="(item.link_ck || item.jsfs_ck) && (item.link_ws || item.jsfs_ws)"
  293. @click="windowOpenNewPage(item.link_ws || item.jsfs_ws)"
  294. >{{ item.link_ck || item.jsfs_ck }}</span>
  295. </p>
  296. </div>
  297. <div class="bottomToPageBox">
  298. <div
  299. :class="eventData.params.page > 1 ? 'toPageBtu' : 'unToPageBtu'"
  300. @click="changePage(-1)"
  301. >上一页</div>
  302. <div>第{{ eventData.params.page }}页</div>
  303. <div
  304. :class="!eventData.message ? 'toPageBtu' : 'unToPageBtu'"
  305. @click="changePage(1)"
  306. >下一页</div>
  307. </div>
  308. </div>
  309. </van-popup>
  310. </div>
  311. </template>
  312. <script>
  313. import { postform } from "../utils/request.js";
  314. export default {
  315. data() {
  316. return {
  317. indexesTitleShow: false,
  318. indexesTitleStr: "",
  319. funcList: [],
  320. viewClickHandle: null,
  321. indexesShow: false,
  322. pointShow: false,
  323. planeShow: false,
  324. showEventState: false, // 事项库弹窗显示状态
  325. eventData: {
  326. url: systemConfig.eventUrl,
  327. data: [],
  328. message: "",
  329. params: {
  330. tableName: "ywtb_auditfwzn",
  331. page: 1,
  332. pageSize: 20,
  333. where: "",
  334. },
  335. },
  336. helpShow: false,
  337. doThingShow: false,
  338. pointInfos: "",
  339. doThingFirst: [],
  340. doThingSecond: {},
  341. Exection: null,
  342. cameraInfo: systemConfig.pointInfo.camera,
  343. mark: systemConfig.pointInfo.mark,
  344. positionPoint: systemConfig.positionPoint,
  345. cameraInfoChildren: [],
  346. planeArr: [
  347. {
  348. name: "一层1F",
  349. src: "./static/images/plane/plane1.png",
  350. active: true,
  351. },
  352. {
  353. name: "二层2F",
  354. src: "./static/images/plane/plane2.png",
  355. active: false,
  356. },
  357. {
  358. name: "三层3F",
  359. src: "./static/images/plane/plane3.png",
  360. active: false,
  361. },
  362. ],
  363. activeNames: "0",
  364. helpActive: false,
  365. };
  366. },
  367. mounted() {
  368. let that = this;
  369. this.funcList = [
  370. {
  371. label: "热点",
  372. changeActive: true,
  373. active: true,
  374. clickFunc: this.loadPoint,
  375. },
  376. {
  377. label: "索引",
  378. changeActive: true,
  379. active: false,
  380. clickFunc: this.showIndexes,
  381. },
  382. {
  383. label: "漫游",
  384. changeActive: true,
  385. active: false,
  386. clickFunc: this.lookaround,
  387. },
  388. {
  389. label: "复位",
  390. changeActive: false,
  391. active: false,
  392. clickFunc: this.setViewDefaultlocation,
  393. },
  394. {
  395. label: "平面图",
  396. changeActive: true,
  397. active: false,
  398. clickFunc: this.showPlane,
  399. },
  400. {
  401. label: "事项库",
  402. changeActive: true,
  403. active: false,
  404. clickFunc: this.showEvent,
  405. },
  406. ];
  407. window.cancelLookAround = this.cancelLookAround;
  408. setTimeout(() => {
  409. that.loadPoint(that.funcList[0]);
  410. that.loadPositionPoint();
  411. }, 1000);
  412. },
  413. methods: {
  414. // 工具栏点击事件
  415. toolClickHandle(item) {
  416. if (item.changeActive) item.active = !item.active;
  417. item.clickFunc(item);
  418. },
  419. // 暂无功能的提示
  420. undefinedFunction() {
  421. this.$toast("功能暂未开通");
  422. },
  423. // 展示索引弹窗
  424. showIndexes() {
  425. this.cameraInfo = this.cameraInfo.map(function (tdd) {
  426. tdd.active = false;
  427. return tdd;
  428. });
  429. this.cameraInfo[0].active = true;
  430. this.cameraInfoChildren = this.cameraInfo[0].children;
  431. this.indexesShow = true;
  432. },
  433. // 索引页面关闭
  434. hideIndexesInfoDailog() {
  435. this.indexesShow = false;
  436. this.funcList[1].active = false;
  437. },
  438. // 展示平面图弹窗
  439. showPlane() {
  440. this.planeShow = true;
  441. },
  442. // 事项库跳转
  443. windowOpenNewPage(linkUrl) {
  444. if (linkUrl) {
  445. window.location.href = linkUrl;
  446. }
  447. },
  448. // 上一页,下一页
  449. changePage(num) {
  450. if (this.eventData.params.page + num > 0) {
  451. this.eventData.params.page += num;
  452. this.showEvent();
  453. }
  454. },
  455. // 事项库查询条件重置
  456. reSetParam() {
  457. this.eventData.params.where = "";
  458. this.eventData.params.page = 1;
  459. this.eventData.params.pageSize = 20;
  460. this.showEvent();
  461. },
  462. getEventData() {
  463. this.eventData.data = [];
  464. this.eventData.params.page = 1;
  465. this.eventData.params.pageSize = 20;
  466. this.showEvent();
  467. },
  468. // 展示事项库弹窗
  469. showEvent() {
  470. this.eventData.message = "";
  471. let params_ = Object.assign({}, this.eventData.params);
  472. if (params_.where) {
  473. params_.where =
  474. "link_ck like '%" +
  475. params_.where +
  476. "%' or jsfs_ck like '%" +
  477. params_.where +
  478. "%'";
  479. }
  480. if (params_.page > 0) {
  481. params_.page -= 1;
  482. }
  483. postform(this.eventData.url, params_).then((res) => {
  484. if (!this.showEventState) {
  485. this.showEventState = true;
  486. }
  487. if (res.code == 200) {
  488. this.eventData.data = [];
  489. res.content.forEach((item) => {
  490. if (
  491. (item.link_ck || item.jsfs_ck) &&
  492. (item.link_ws || item.jsfs_ws)
  493. ) {
  494. this.eventData.data.push(item);
  495. }
  496. });
  497. } else {
  498. this.eventData.message = res.message;
  499. }
  500. });
  501. },
  502. hideEventListDailog() {
  503. this.showEventState = false;
  504. this.funcList[5].active = false;
  505. },
  506. hidePlaneInfoDailog() {
  507. this.planeShow = false;
  508. this.funcList[4].active = false;
  509. },
  510. // 帮助弹窗
  511. showHelp() {
  512. this.helpShow = true;
  513. },
  514. hideHelpInfoDailog() {
  515. this.helpShow = false;
  516. },
  517. // 漫游
  518. lookaround(item) {
  519. let that = this;
  520. // 清除场景激活
  521. clearSceneActive();
  522. this.$store.commit("changeFenceng", true);
  523. hideTitle();
  524. // 关闭热点
  525. if (this.funcList[0].active == true) {
  526. this.funcList[0].active = false;
  527. this.funcList[0].clickFunc(this.funcList[0]);
  528. }
  529. closeHull(0);
  530. unbindLimitCameraFunc();
  531. if (!item.active) {
  532. this.cancelLookAround();
  533. return;
  534. }
  535. let options = {
  536. lng: 121.12275503870025,
  537. lat: 31.153914277622604,
  538. pitch: -35,
  539. height: 140,
  540. };
  541. // rotateCamera({lng:121.12275503870025, lat:31.153914277622604, pitch: -35, height: 140});
  542. // // 相机绕点环绕飞行
  543. // function rotateCamera(options){
  544. var position = Cesium.Cartesian3.fromDegrees(
  545. options.lng,
  546. options.lat,
  547. 0.0
  548. );
  549. // 相机看点的角度,如果大于0那么则是从地底往上看,所以要为负值,这里取-30度
  550. var pitch = Cesium.Math.toRadians(options.pitch);
  551. // 给定飞行一周所需时间,比如30s, 那么每秒转动度数
  552. var angle = 360 / systemConfig.roveTime;
  553. // 给定相机距离点多少距离飞行
  554. var distance = options.height;
  555. var startTime = Cesium.JulianDate.fromDate(new Date());
  556. var stopTime = Cesium.JulianDate.addSeconds(
  557. startTime,
  558. 30,
  559. new Cesium.JulianDate()
  560. );
  561. globalVariable.viewer.clock.startTime = startTime.clone(); // 开始时间
  562. globalVariable.viewer.clock.stopTime = stopTime.clone(); // 结速时间
  563. globalVariable.viewer.clock.currentTime = startTime.clone(); // 当前时间
  564. globalVariable.viewer.clock.clockRange = Cesium.ClockRange.CLAMPED; // 行为方式
  565. globalVariable.viewer.clock.clockStep = Cesium.ClockStep.SYSTEM_CLOCK; // 时钟设置为当前系统时间; 忽略所有其他设置。
  566. // 相机的当前heading
  567. var initialHeading = globalVariable.viewer.camera.heading;
  568. this.Exection = function TimeExecution() {
  569. // 当前已经过去的时间,单位s
  570. var delTime = Cesium.JulianDate.secondsDifference(
  571. globalVariable.viewer.clock.currentTime,
  572. globalVariable.viewer.clock.startTime
  573. );
  574. // 根据过去的时间,计算偏航角的变化
  575. var heading = Cesium.Math.toRadians(delTime * angle) + initialHeading;
  576. globalVariable.viewer.camera.lookAt(
  577. position,
  578. new Cesium.HeadingPitchRange(heading, pitch, distance)
  579. );
  580. if (
  581. Cesium.JulianDate.compare(
  582. globalVariable.viewer.clock.currentTime,
  583. globalVariable.viewer.clock.stopTime
  584. ) >= 0
  585. ) {
  586. that.cancelLookAround();
  587. }
  588. };
  589. globalVariable.viewer.clock.onTick.addEventListener(that.Exection);
  590. },
  591. cancelLookAround() {
  592. this.$store.commit("changeFenceng", false);
  593. returnDefault();
  594. if (this.Exection) {
  595. globalVariable.viewer.clock.onTick.removeEventListener(this.Exection);
  596. this.Exection = null;
  597. globalVariable.viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
  598. }
  599. bindLimitCameraFunc();
  600. this.funcList[2].active = false;
  601. },
  602. // 复位
  603. setViewDefaultlocation(time) {
  604. // 清除场景激活
  605. clearSceneActive();
  606. // 取消漫游
  607. this.cancelLookAround();
  608. showTitle("大门");
  609. return new Promise((resolve, reject) => {
  610. this.$flyTo({
  611. lon: systemConfig.mapDefault.center.lon,
  612. lat: systemConfig.mapDefault.center.lat,
  613. h: systemConfig.mapDefault.height,
  614. heading: systemConfig.mapDefault.heading,
  615. pitch: systemConfig.mapDefault.pitch,
  616. roll: systemConfig.mapDefault.roll,
  617. time: 1,
  618. pitchAdjustHeight: 1000,
  619. callback: function () {},
  620. }).then(() => {
  621. resolve();
  622. });
  623. });
  624. },
  625. // 加载点位
  626. loadPoint(param) {
  627. let that = this;
  628. // function getGuid() {
  629. // return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
  630. // /[xy]/g,
  631. // function (c) {
  632. // var r = (Math.random() * 16) | 0,
  633. // v = c == "x" ? r : (r & 0x3) | 0x8;
  634. // return v.toString(16);
  635. // }
  636. // );
  637. // }
  638. // return;
  639. if (param.active) {
  640. if (globalVariable.hotMarkerArr.length == 0) {
  641. this.mark.map(function (item, index) {
  642. // item.name;
  643. // item.param.lon;
  644. // item.param.lat;
  645. // item.param.h;
  646. // item.type;
  647. let position = Cesium.Cartesian3.fromDegrees(
  648. item.param.lon,
  649. item.param.lat,
  650. // item.param.lat,
  651. item.param.h
  652. );
  653. let id = "entity_" + index;
  654. if (item.img.indexOf("gif") > -1) {
  655. let entity = globalVariable.viewer.entities.add({
  656. id: id,
  657. position: position,
  658. // billboard: {
  659. // width: item.sizeW,
  660. // height: item.sizeH,
  661. // scale: 1.0,
  662. // horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
  663. // verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
  664. // pixelOffset: new Cesium.Cartesian2(0, 0),
  665. // scaleByDistance: new Cesium.NearFarScalar(20, 0.6, 30, 0.8),
  666. // },
  667. // point: {
  668. // show: true, //是否显示,默认显示
  669. // pixelSize: 15,
  670. // },
  671. label: {
  672. text: item.name,
  673. font: "10pt Source Han Sans CN", //字体样式
  674. fillColor: Cesium.Color.WHITE, //字体颜色
  675. backgroundColor: Cesium.Color.fromCssColorString("#00000066"), //背景颜色
  676. showBackground: true, //是否显示背景颜色
  677. style: Cesium.LabelStyle.FILL, //label样式
  678. outlineWidth: 2,
  679. outlineColor: Cesium.Color.fromCssColorString("#00000066"), //背景颜色
  680. verticalOrigin: Cesium.VerticalOrigin.BOTTOM, //垂直位置
  681. horizontalOrigin: Cesium.HorizontalOrigin.CENTER, //水平位置
  682. pixelOffset: new Cesium.Cartesian2(0, -20), //偏移
  683. },
  684. });
  685. entity.infos = item;
  686. entity.callback = that.pointClickHandle;
  687. globalVariable.point_positions[id] = entity;
  688. globalVariable.hotMarkerArr.push(entity);
  689. // that.analysisImage(item.img, entity);
  690. } else {
  691. let entity = globalVariable.viewer.entities.add({
  692. id: id,
  693. position: position,
  694. // billboard: {
  695. // image: item.img,
  696. // width: item.sizeW,
  697. // height: item.sizeH,
  698. // scale: 1.0,
  699. // horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
  700. // verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
  701. // pixelOffset: new Cesium.Cartesian2(0, 0),
  702. // },
  703. label: {
  704. text: item.name,
  705. font: "10pt Source Han Sans CN", //字体样式
  706. fillColor: Cesium.Color.WHITE, //字体颜色
  707. backgroundColor: Cesium.Color.fromCssColorString("#00000066"), //背景颜色
  708. showBackground: true, //是否显示背景颜色
  709. style: Cesium.LabelStyle.FILL, //label样式
  710. outlineWidth: 2,
  711. outlineColor: Cesium.Color.fromCssColorString("#00000066"), //背景颜色
  712. verticalOrigin: Cesium.VerticalOrigin.BOTTOM, //垂直位置
  713. horizontalOrigin: Cesium.HorizontalOrigin.CENTER, //水平位置
  714. pixelOffset: new Cesium.Cartesian2(0, 23), //偏移
  715. },
  716. });
  717. entity.infos = item;
  718. entity.callback = that.pointClickHandle;
  719. globalVariable.point_positions[id] = entity;
  720. globalVariable.hotMarkerArr.push(entity);
  721. }
  722. // that.addGIF2(item, position, id);
  723. });
  724. } else {
  725. if (globalVariable.hotMarkerArr.length > 0)
  726. globalVariable.hotMarkerArr.map(function (item) {
  727. item.show = true;
  728. });
  729. }
  730. } else {
  731. if (globalVariable.hotMarkerArr.length > 0)
  732. globalVariable.hotMarkerArr.map(function (item) {
  733. item.show = false;
  734. });
  735. }
  736. return;
  737. globalVariable.viewer.scene.postRender.addEventListener(function () {
  738. globalVariable.hotMarkerArr.map(function (item) {
  739. var canvasPosition =
  740. globalVariable.viewer.scene.cartesianToCanvasCoordinates(
  741. item._position._value,
  742. new Cesium.Cartesian2()
  743. );
  744. if (
  745. Cesium.defined(canvasPosition) &&
  746. !isNaN(canvasPosition.x) &&
  747. !isNaN(canvasPosition.y)
  748. ) {
  749. document.getElementsByClassName(item.id)[0].style.display = "block";
  750. if (!document.getElementsByClassName(item.id)) return;
  751. document.getElementsByClassName(item.id)[0].style.top = `${
  752. canvasPosition.y - 15
  753. }px`;
  754. document.getElementsByClassName(item.id)[0].style.left = `${
  755. canvasPosition.x - 15
  756. }px`;
  757. } else {
  758. document.getElementsByClassName(item.id)[0].style.display = "none";
  759. }
  760. });
  761. });
  762. },
  763. addGIF2(item, position, id) {
  764. let c = globalVariable.viewer.scene.cartesianToCanvasCoordinates(
  765. position,
  766. new Cesium.Cartesian2()
  767. );
  768. //创建一个div
  769. var div = document.createElement("div");
  770. //为div创建属性class = "test"
  771. var divattr = document.createAttribute("class");
  772. divattr.value = "hotpoint image " + id;
  773. //把属性class = "test"添加到div
  774. div.setAttributeNode(divattr);
  775. document.getElementById("cesiumContainer").appendChild(div);
  776. //创建一个值为test的按钮
  777. var img = document.createElement("img");
  778. var imgAttr = document.createAttribute("src");
  779. imgAttr.value = item.img;
  780. img.style.width = "100%";
  781. img.style.height = "100%";
  782. img.setAttributeNode(imgAttr);
  783. div.appendChild(img);
  784. div.style.position = "absolute";
  785. div.style.width = "30px";
  786. div.style.height = "30px";
  787. div.style.top = `${c.y - 15}px`;
  788. div.style.left = `${c.x - 15}px`;
  789. },
  790. // 关闭可办事项
  791. closeDoThingPopup() {
  792. this.doThingShow = false;
  793. this.doThingFirst = [];
  794. this.doThingSecond = {};
  795. },
  796. // 返回至可办事项一级菜单
  797. backDoThingPopup() {
  798. this.doThingSecond = {};
  799. },
  800. // 选择可办事项展示
  801. chooseDBSecond(item) {
  802. this.doThingSecond = item;
  803. },
  804. // 点位触发事件
  805. pointClickHandle(item) {
  806. let that = this;
  807. switch (item.type) {
  808. case 1:
  809. // 弹窗
  810. let strTo = ``;
  811. item.text.map(function (str) {
  812. strTo += str + "<br>";
  813. });
  814. this.pointInfos = strTo;
  815. this.pointShow = true;
  816. break;
  817. case 2:
  818. // 跳转
  819. window.location.href = item.url;
  820. break;
  821. case 3:
  822. break;
  823. case 4:
  824. // 点位触发camera转换
  825. this.$flyTo({
  826. lon: item.camera.lon,
  827. lat: item.camera.lat,
  828. h: item.camera.h,
  829. heading: item.camera.heading,
  830. pitch: item.camera.pitch,
  831. roll: item.camera.roll,
  832. time: 1,
  833. pitchAdjustHeight: 1000,
  834. details: item,
  835. callback: function (item) {
  836. // closeHull(item.camera.sceneType);
  837. showTitle(item.details.areaName);
  838. },
  839. }).then(() => {});
  840. break;
  841. case 5:
  842. $.getJSON(item.json, function (arr) {
  843. that.doThingFirst = arr;
  844. that.doThingShow = true;
  845. });
  846. break;
  847. default:
  848. break;
  849. }
  850. },
  851. // 加载跳转点位
  852. loadPositionPoint() {
  853. let that = this;
  854. this.positionPoint.map(function (item, index) {
  855. // console.log(
  856. // item.areaName +
  857. // ":" +
  858. // Cesium.Math.toDegrees(item.lon) +
  859. // ", " +
  860. // Cesium.Math.toDegrees(item.lat)
  861. // );
  862. let id = "jump_" + index;
  863. let entity = globalVariable.viewer.entities.add({
  864. id: id,
  865. position: Cesium.Cartesian3.fromRadians(item.lon, item.lat, item.h),
  866. billboard: {
  867. image: "./static/images/position_point.png",
  868. width: 36,
  869. height: 18,
  870. scale: 1.0,
  871. horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
  872. verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
  873. pixelOffset: new Cesium.Cartesian2(0, 0),
  874. distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
  875. 0,
  876. 15
  877. ),
  878. },
  879. // label: {
  880. // text: item.areaName != "" ? item.areaName : "" + (index + 1),
  881. // // text: "" + (index + 1),
  882. // font: "10pt Source Han Sans CN", //字体样式
  883. // fillColor: Cesium.Color.WHITE, //字体颜色
  884. // backgroundColor: Cesium.Color.fromCssColorString("#00000066"), //背景颜色
  885. // showBackground: false, //是否显示背景颜色
  886. // style: Cesium.LabelStyle.FILL, //label样式
  887. // outlineWidth: 2,
  888. // outlineColor: Cesium.Color.fromCssColorString("#00000066"), //背景颜色
  889. // verticalOrigin: Cesium.VerticalOrigin.BOTTOM, //垂直位置
  890. // horizontalOrigin: Cesium.HorizontalOrigin.CENTER, //水平位置
  891. // pixelOffset: new Cesium.Cartesian2(0, 0), //偏移
  892. // },
  893. });
  894. entity.infos = item;
  895. entity.callback = that.jumpPositionEvent;
  896. globalVariable.point_positions[id] = entity;
  897. globalVariable.jumpPointArr.push(entity);
  898. });
  899. },
  900. // 跳转事件触发
  901. jumpPositionEvent(item) {
  902. showTitle(item.areaName);
  903. this.$flyTo({
  904. lon: Cesium.Math.toDegrees(item.lon),
  905. lat: Cesium.Math.toDegrees(item.lat),
  906. h: item.viewH,
  907. heading: Cesium.Math.toDegrees(globalVariable.viewer.camera.heading),
  908. pitch: 0, // globalVariable.viewer.camera.pitch,
  909. roll: 0, // globalVariable.viewer.camera.roll,
  910. time: 1,
  911. pitchAdjustHeight: 1000,
  912. details: item,
  913. callback: function () {},
  914. }).then(() => {
  915. // resolve();
  916. });
  917. },
  918. // 解析图片
  919. analysisImage(src, entity) {
  920. // return new Promise((resolve, reject) => {
  921. // if (src.indexOf("gif") > -1) {
  922. let can = document.createElement("canvas");
  923. let gif = gifler(src);
  924. gif.animate(can);
  925. gif.frames(can, function (ctx, frame) {
  926. // console.log(frame.buffer.toDataURL());
  927. entity.billboard.image = new Cesium.CallbackProperty(() => {
  928. // console.log(frame.buffer.toDataURL());
  929. return frame.buffer.toDataURL();
  930. }, false);
  931. // resolve(d);
  932. });
  933. // } else {
  934. // resolve(src);
  935. // }
  936. // });
  937. },
  938. // 切换视角
  939. changeView(item) {
  940. // 清除场景激活
  941. clearSceneActive();
  942. this.cancelLookAround();
  943. if (item.lon == null) {
  944. this.$toast("暂无当前位置信息");
  945. return;
  946. }
  947. if (item.showTitle) {
  948. showTitle(item.name);
  949. }
  950. this.$flyTo({
  951. lon: item.lon,
  952. lat: item.lat,
  953. h: item.h,
  954. heading: item.heading,
  955. pitch: item.pitch,
  956. roll: item.roll,
  957. time: 1,
  958. pitchAdjustHeight: 1000,
  959. details: item,
  960. callback: function (item) {
  961. closeHull(item.details.sceneType);
  962. },
  963. });
  964. this.indexesShow = false;
  965. this.funcList[1].active = false;
  966. },
  967. // 切换索引楼层
  968. changeFloor(item) {
  969. this.cameraInfo = this.cameraInfo.map(function (tdd) {
  970. tdd.active = false;
  971. return tdd;
  972. });
  973. item.active = true;
  974. this.cameraInfoChildren = item.children;
  975. },
  976. hidePointInfoDailog() {
  977. this.pointShow = false;
  978. },
  979. // 切换楼层
  980. choosePlane(index) {
  981. this.planeArr = this.planeArr.map(function (item, ind) {
  982. if (index == ind) {
  983. item.active = true;
  984. } else {
  985. item.active = false;
  986. }
  987. return item;
  988. });
  989. },
  990. },
  991. watch: {
  992. helpShow: {
  993. handler(newVal, oldVal) {
  994. if (newVal) {
  995. this.helpActive = true;
  996. } else {
  997. this.helpActive = false;
  998. }
  999. },
  1000. },
  1001. },
  1002. };
  1003. </script>
  1004. <style lang="less" scoped>
  1005. @media screen and (orientation: landscape) {
  1006. .tool {
  1007. position: absolute;
  1008. right: 15px;
  1009. top: 20px !important;
  1010. z-index: 1;
  1011. }
  1012. }
  1013. .tool {
  1014. position: absolute;
  1015. right: 15px;
  1016. top: 35px;
  1017. z-index: 1;
  1018. .func {
  1019. // border-radius: 20px;
  1020. // background: #f3f3f1;
  1021. overflow: hidden;
  1022. li {
  1023. width: 50px;
  1024. height: 50px;
  1025. font-size: 14px;
  1026. line-height: 20px;
  1027. text-align: center;
  1028. overflow: hidden;
  1029. font-weight: bold;
  1030. position: relative;
  1031. margin-bottom: 10px;
  1032. // &::after {
  1033. // content: "";
  1034. // height: 2px;
  1035. // width: calc(100% - 8px);
  1036. // position: absolute;
  1037. // background: #ddd0ba;
  1038. // bottom: 1px;
  1039. // left: 4px;
  1040. // }
  1041. // &:first-child {
  1042. // }
  1043. // &:last-child {
  1044. // border-bottom: 0px solid #ddd0ba;
  1045. // &::after {
  1046. // display: none;
  1047. // }
  1048. // }
  1049. p {
  1050. // width: 30px;
  1051. // height: 30px;
  1052. // margin-left: 10px;
  1053. // margin-top: 10px;
  1054. width: 100%;
  1055. height: 100%;
  1056. }
  1057. &:nth-child(1) {
  1058. p {
  1059. background: url(~@/assets/img/tool/new_tb/hotpoint.png) center
  1060. center/100% 100% no-repeat;
  1061. }
  1062. &.active p {
  1063. background: url(~@/assets/img/tool/new_tb/hotpoint_active.png) center
  1064. center/100% 100% no-repeat;
  1065. }
  1066. }
  1067. &:nth-child(2) {
  1068. p {
  1069. background: url(~@/assets/img/tool/new_tb/indexes.png) center
  1070. center/100% 100% no-repeat;
  1071. }
  1072. &.active p {
  1073. background: url(~@/assets/img/tool/new_tb/indexes_active.png) center
  1074. center/100% 100% no-repeat;
  1075. }
  1076. }
  1077. &:nth-child(3) {
  1078. p {
  1079. background: url(~@/assets/img/tool/new_tb/pan.png) center center/100%
  1080. 100% no-repeat;
  1081. }
  1082. &.active p {
  1083. background: url(~@/assets/img/tool/new_tb/pan_active.png) center
  1084. center/100% 100% no-repeat;
  1085. }
  1086. }
  1087. &:nth-child(4) {
  1088. p {
  1089. background: url(~@/assets/img/tool/new_tb/reposition.png) center
  1090. center/100% 100% no-repeat;
  1091. }
  1092. &.active p {
  1093. background: url(~@/assets/img/tool/new_tb/reposition_active.png)
  1094. center center/100% 100% no-repeat;
  1095. }
  1096. }
  1097. &:nth-child(5) {
  1098. p {
  1099. background: url(~@/assets/img/tool/new_tb/plan.png) center center/100%
  1100. 100% no-repeat;
  1101. }
  1102. &.active p {
  1103. background: url(~@/assets/img/tool/new_tb/plan_active.png) center
  1104. center/100% 100% no-repeat;
  1105. }
  1106. }
  1107. &:nth-child(6) {
  1108. p {
  1109. background: url(~@/assets/img/tool/new_tb/event_library.png) center
  1110. center/100% 100% no-repeat;
  1111. }
  1112. &.active p {
  1113. background: url(~@/assets/img/tool/new_tb/event_library_active.png)
  1114. center center/100% 100% no-repeat;
  1115. }
  1116. }
  1117. }
  1118. }
  1119. .help {
  1120. width: 50px;
  1121. height: 50px;
  1122. background: url(~@/assets/img/tool/new_tb/help.png) center center / 100%
  1123. 100% no-repeat;
  1124. &.active {
  1125. background: url(~@/assets/img/tool/new_tb/help_active.png) center
  1126. center/100% 100% no-repeat;
  1127. }
  1128. }
  1129. :deep(.indexesListContent) {
  1130. width: 394px;
  1131. height: 500px;
  1132. .indexesList {
  1133. box-sizing: border-box;
  1134. width: 100%;
  1135. height: calc(100% - 34px);
  1136. // background: url(~@/assets/img/tool/indexes_background.png) center center /
  1137. // 100% 100% no-repeat;
  1138. background: #33333366;
  1139. border-radius: 2px;
  1140. .listContent {
  1141. padding: 5px 20px;
  1142. box-sizing: border-box;
  1143. width: 100%;
  1144. height: 100%;
  1145. overflow: hidden;
  1146. overflow-y: auto;
  1147. .header {
  1148. width: 265.2px;
  1149. height: 22.8px;
  1150. overflow: hidden;
  1151. position: relative;
  1152. text-align: center;
  1153. color: #ffffff;
  1154. margin: 21px auto;
  1155. background: url(~@/assets/img/tool/indexes_header.png) center center /
  1156. 100% 100% no-repeat;
  1157. }
  1158. // .title_container {
  1159. // height: 36px;
  1160. // width: 100%;
  1161. // ul {
  1162. // display: block;
  1163. // margin: 0 auto;
  1164. // height: 36px;
  1165. // width: fit-content;
  1166. // li {
  1167. // width: 75px;
  1168. // height: 30px;
  1169. // line-height: 30px;
  1170. // float: left;
  1171. // margin: 0 5px;
  1172. // text-align: center;
  1173. // font-size: 18px;
  1174. // border-radius: 5px;
  1175. // color: #c8b487;
  1176. // background: #f3f3f1;
  1177. // &.active {
  1178. // color: #ffffff;
  1179. // background: #c9b57d;
  1180. // }
  1181. // &:first-child {
  1182. // margin-left: 0px;
  1183. // }
  1184. // &:last-child {
  1185. // margin-right: 0px;
  1186. // }
  1187. // }
  1188. // }
  1189. // }
  1190. .list_container {
  1191. width: 100%;
  1192. // height: 50px;
  1193. height: calc(100% - 61px);
  1194. overflow: hidden;
  1195. overflow-y: auto;
  1196. .first_content {
  1197. overflow: hidden;
  1198. .title {
  1199. color: #ffffff;
  1200. font-size: 20px;
  1201. }
  1202. }
  1203. li {
  1204. width: 150px;
  1205. height: 50px;
  1206. margin: 5px calc(50% - 150px);
  1207. float: left;
  1208. line-height: 50px;
  1209. text-align: center;
  1210. font-size: 15px;
  1211. color: #fefeff;
  1212. position: relative;
  1213. background: #ffffff33;
  1214. border-radius: 2px;
  1215. // &::after {
  1216. // content: "";
  1217. // height: 2px;
  1218. // width: 120px;
  1219. // position: absolute;
  1220. // background: url(~@/assets/img/tool/indexes_point_bottom.png)
  1221. // center center / 100% 100% no-repeat;
  1222. // bottom: 0px;
  1223. // left: 15px;
  1224. // }
  1225. // &.active {
  1226. // color: #ffc44d;
  1227. // background: url(~@/assets/img/tool/indexes_point_active.png)
  1228. // center center / 100% 100% no-repeat;
  1229. // &::after {
  1230. // display: none;
  1231. // }
  1232. // }
  1233. &:nth-child(2n) {
  1234. margin-right: 0px;
  1235. }
  1236. &:nth-child(2n-1) {
  1237. margin-left: 0px;
  1238. }
  1239. }
  1240. }
  1241. }
  1242. }
  1243. .close {
  1244. width: 16px;
  1245. height: 16px;
  1246. margin: 4px 4px;
  1247. background: url(~@/assets/img/tool/close.png) center center / 100% 100%
  1248. no-repeat;
  1249. position: absolute;
  1250. top: 0px;
  1251. right: 0px;
  1252. }
  1253. }
  1254. :deep(.point_popup) {
  1255. width: 394px;
  1256. height: 380px;
  1257. .pointInfoContent {
  1258. width: 100%;
  1259. height: 100%;
  1260. font-size: 20px;
  1261. padding: 20px 25px;
  1262. box-sizing: border-box;
  1263. line-height: 30px;
  1264. color: #ffffff;
  1265. // background: url(~@/assets/img/tool/indexes_background.png) center center /
  1266. // 100% 100% no-repeat;
  1267. background: #33333366;
  1268. border-radius: 2px;
  1269. div {
  1270. width: 100%;
  1271. height: 100%;
  1272. overflow: hidden;
  1273. overflow-y: auto;
  1274. }
  1275. }
  1276. .close {
  1277. width: 16px;
  1278. height: 16px;
  1279. // margin: 4px 4px;
  1280. background: url(~@/assets/img/tool/close.png) center center / 100% 100%
  1281. no-repeat;
  1282. position: absolute;
  1283. top: 0px;
  1284. right: 0px;
  1285. }
  1286. }
  1287. :deep(.plane_popup) {
  1288. .plane_container_event {
  1289. padding: 1.5rem 1rem;
  1290. height: calc(100% - 3rem);
  1291. width: calc(100% - 3rem);
  1292. margin-left: 0.5rem;
  1293. background: rgba(0, 0, 0, 0.4);
  1294. // border-radius: 1rem;
  1295. position: absolute;
  1296. p {
  1297. color: #ffffff;
  1298. margin: 0.5rem 0;
  1299. font-size: 1rem;
  1300. font-weight: bold;
  1301. }
  1302. .paramsBox {
  1303. max-width: calc(100% - 20px);
  1304. font-size: 1rem;
  1305. color: #666;
  1306. position: relative;
  1307. display: flex;
  1308. align-self: center;
  1309. input {
  1310. color: #333;
  1311. }
  1312. .paramBtu {
  1313. margin: 0rem 0.3rem;
  1314. padding: 0.2rem 0.3rem;
  1315. color: #ffffff;
  1316. font-size: 1.2rem;
  1317. background: #1fb4ffaa;
  1318. border-radius: 0.3rem;
  1319. }
  1320. }
  1321. .eventDataList {
  1322. max-height: calc(100% - 3rem);
  1323. overflow-x: hidden;
  1324. p {
  1325. padding-bottom: 2px;
  1326. border-bottom: 1px solid #fff;
  1327. /* 1.设置宽度 */
  1328. // background-color: #ffffff32;
  1329. line-height: 30px;
  1330. /* 2.设置旧版弹性盒 */
  1331. display: -webkit-box;
  1332. /* 3. 控制行数*/
  1333. -webkit-line-clamp: 2;
  1334. /* 4. 设置子元素的排列方式 垂直排列*/
  1335. -webkit-box-orient: vertical;
  1336. /* 5.溢出隐藏 */
  1337. overflow: hidden;
  1338. }
  1339. .eventMessage {
  1340. width: 100%;
  1341. height: 100%;
  1342. display: flex;
  1343. justify-content: center;
  1344. align-content: center;
  1345. }
  1346. }
  1347. .bottomToPageBox {
  1348. width: calc(100% - 2rem);
  1349. position: absolute;
  1350. bottom: 0.5rem;
  1351. line-height: 1rem;
  1352. display: flex;
  1353. justify-content: space-between;
  1354. font-size: 0.75rem;
  1355. color: #dbdbdb;
  1356. div {
  1357. padding: 0.2rem 0.3rem;
  1358. border-radius: 0.1rem;
  1359. }
  1360. .toPageBtu {
  1361. color: #1fb4ff;
  1362. text-decoration: underline;
  1363. background-color: #1fb4ff64;
  1364. }
  1365. .unToPageBtu {
  1366. color: #ccc;
  1367. background-color: #cccccc64;
  1368. }
  1369. }
  1370. }
  1371. .image_header {
  1372. color: #dbdbdb;
  1373. font-size: 16px;
  1374. height: 32px;
  1375. background: rgba(0, 0, 0, 0.4);
  1376. margin-top: 10px;
  1377. ul {
  1378. display: block;
  1379. width: fit-content;
  1380. height: 32px;
  1381. margin: 0 auto;
  1382. li {
  1383. float: left;
  1384. padding: 5px 10px;
  1385. margin-right: 10px;
  1386. height: 32px;
  1387. box-sizing: border-box;
  1388. &.active {
  1389. border-bottom: 2px solid #ffc125;
  1390. color: #ffffff;
  1391. }
  1392. }
  1393. }
  1394. }
  1395. .image_container {
  1396. display: block;
  1397. // width: 394px;
  1398. height: 280px;
  1399. width: 100%;
  1400. // height: 100%;
  1401. margin: 0 auto;
  1402. position: relative;
  1403. // background: url(~@/assets/img/plane/plane_background.png) center center /
  1404. // 100% 100% no-repeat;
  1405. background: #33333366;
  1406. border-radius: 2px;
  1407. ul {
  1408. display: block;
  1409. width: 100%;
  1410. height: 100%;
  1411. li {
  1412. display: block;
  1413. width: 100%;
  1414. height: 100%;
  1415. padding: 10px 10px;
  1416. box-sizing: border-box;
  1417. img {
  1418. display: block;
  1419. width: 100%;
  1420. height: 100%;
  1421. margin: 0 auto;
  1422. object-fit: contain;
  1423. }
  1424. }
  1425. }
  1426. }
  1427. .close {
  1428. width: 16px;
  1429. height: 16px;
  1430. margin: 4px 4px;
  1431. // margin-right: 10px;
  1432. background: url(~@/assets/img/tool/close.png) center center / 100% 100%
  1433. no-repeat;
  1434. position: absolute;
  1435. top: 0px;
  1436. right: 0px;
  1437. }
  1438. }
  1439. :deep(.help_popup) {
  1440. .help_container {
  1441. box-sizing: border-box;
  1442. overflow: hidden;
  1443. overflow-y: auto;
  1444. width: 100%;
  1445. height: 100%;
  1446. // background: url(~@/assets/img/tool/indexes_background.png) center center /
  1447. // 100% 100% no-repeat;
  1448. background: #33333366;
  1449. border-radius: 2px;
  1450. .header {
  1451. // color: #c8b487;
  1452. color: #ffffff;
  1453. font-size: 18px;
  1454. margin-top: 10px;
  1455. text-align: center;
  1456. font-weight: bold;
  1457. }
  1458. .content {
  1459. color: #ffffff;
  1460. font-size: 16px;
  1461. line-height: 32px;
  1462. padding: 0 15px;
  1463. span {
  1464. display: inline-block;
  1465. background: #1fb4ff;
  1466. width: 16px;
  1467. height: 16px;
  1468. border-radius: 16px;
  1469. }
  1470. }
  1471. }
  1472. .close {
  1473. width: 16px;
  1474. height: 16px;
  1475. margin: 4px 4px;
  1476. background: url(~@/assets/img/tool/close.png) center center / 100% 100%
  1477. no-repeat;
  1478. position: absolute;
  1479. top: 0px;
  1480. right: 0px;
  1481. }
  1482. }
  1483. :deep(.doThing_popup) {
  1484. width: 394px;
  1485. height: 450px;
  1486. .content {
  1487. width: 100%;
  1488. height: 100%;
  1489. font-size: 20px;
  1490. padding: 25px 0px;
  1491. box-sizing: border-box;
  1492. line-height: 30px;
  1493. color: #ffffff;
  1494. // background: url(~@/assets/img/tool/indexes_background.png) center center /
  1495. // 100% 100% no-repeat;
  1496. background: #33333366;
  1497. border-radius: 2px;
  1498. .doThingFirstContent {
  1499. width: 100%;
  1500. height: 100%;
  1501. .header {
  1502. text-align: center;
  1503. height: 30px;
  1504. letter-spacing: 30px;
  1505. text-indent: 30px;
  1506. }
  1507. .list {
  1508. height: calc(100% - 30px);
  1509. overflow: hidden;
  1510. overflow-y: auto;
  1511. li {
  1512. width: 150px;
  1513. height: 50px;
  1514. margin: 5px calc(25% - 75px);
  1515. float: left;
  1516. line-height: 50px;
  1517. text-align: center;
  1518. font-size: 15px;
  1519. color: #fefeff;
  1520. position: relative;
  1521. &::after {
  1522. content: "";
  1523. height: 2px;
  1524. width: 120px;
  1525. position: absolute;
  1526. background: url(~@/assets/img/tool/indexes_point_bottom.png)
  1527. center center / 100% 100% no-repeat;
  1528. bottom: 0px;
  1529. left: 15px;
  1530. }
  1531. &.active {
  1532. color: #ffc44d;
  1533. background: url(~@/assets/img/tool/indexes_point_active.png)
  1534. center center / 100% 100% no-repeat;
  1535. &::after {
  1536. display: none;
  1537. }
  1538. }
  1539. // &:nth-child(2n) {
  1540. // margin-right: 0px;
  1541. // }
  1542. // &:nth-child(2n-1) {
  1543. // margin-left: 0px;
  1544. // }
  1545. }
  1546. }
  1547. }
  1548. .doThingSecondContent {
  1549. width: 100%;
  1550. height: 100%;
  1551. .header {
  1552. text-align: center;
  1553. height: 30px;
  1554. letter-spacing: 8px;
  1555. text-indent: 8px;
  1556. }
  1557. .list {
  1558. height: calc(100% - 30px);
  1559. overflow: hidden;
  1560. overflow-y: auto;
  1561. .van-collapse {
  1562. .item {
  1563. display: inline-block;
  1564. width: calc(100% - 32px);
  1565. height: 24px;
  1566. line-height: 24px;
  1567. padding: 10px 0px;
  1568. margin: 0px 16px;
  1569. font-size: 14px;
  1570. position: relative;
  1571. border-bottom: 1px solid #ffffff;
  1572. }
  1573. .van-collapse-item {
  1574. .van-cell {
  1575. background: transparent;
  1576. color: #ffffff;
  1577. margin: 0px 16px;
  1578. padding: 10px 0px;
  1579. width: calc(100% - 32px);
  1580. border-bottom: 1px solid #ffffff;
  1581. .van-cell__right-icon:before {
  1582. color: #ffffff;
  1583. }
  1584. }
  1585. .van-collapse-item__content {
  1586. background: transparent;
  1587. padding-top: 0px;
  1588. padding-bottom: 0px;
  1589. li {
  1590. height: 40px;
  1591. line-height: 40px;
  1592. color: #ffffff;
  1593. border-bottom: 1px solid rgba(235, 237, 240);
  1594. text-indent: 20px;
  1595. }
  1596. }
  1597. :deep(.van-collapse-item--border:after) {
  1598. border-top: 0px;
  1599. }
  1600. }
  1601. }
  1602. }
  1603. }
  1604. }
  1605. .close {
  1606. width: 16px;
  1607. height: 16px;
  1608. margin: 4px 4px;
  1609. background: url(~@/assets/img/tool/close.png) center center / 100% 100%
  1610. no-repeat;
  1611. position: absolute;
  1612. top: 0px;
  1613. right: 0px;
  1614. }
  1615. .back {
  1616. width: 24px;
  1617. height: 24px;
  1618. background: url(~@/assets/img/tool/back.png) center center / 100% 100%
  1619. no-repeat;
  1620. position: absolute;
  1621. top: 0px;
  1622. left: 0px;
  1623. border-radius: 50px;
  1624. }
  1625. }
  1626. }
  1627. :deep(.hotpoint) {
  1628. img {
  1629. width: 100%;
  1630. height: 100%;
  1631. }
  1632. }
  1633. </style>