Viewer.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947
  1. <template>
  2. <Rules v-if="showRules" @close="closeRules" />
  3. <AppHeader v-show="!fscChecked" :project="project" @getUserId="getUserId" :show-adjust="showAdjust" @update="onPointsUpdate" />
  4. <article>
  5. <main>
  6. <div class="split">
  7. <iframe ref="sourceFrame" v-if="sourceURL" :src="sourceURL" frameborder="0" @load="onLoadSource"></iframe>
  8. <div class="tools" v-if="source && !showRules && !ruleChecked" v-show="showWidget && !showAdjust && !fscChecked && (dbsChecked || (!target && !bimChecked))">
  9. <div class="item-date">
  10. <calendar
  11. name="source"
  12. :count="scenes.length"
  13. :controls="controls"
  14. :value="sourceDate"
  15. :highlighted="sourceDays"
  16. @selected="onSelected"
  17. @pick="onPickDate"
  18. @prev="onPrevDate"
  19. @next="onNextDate"
  20. ></calendar>
  21. </div>
  22. <div class="item-mode" v-if="source.type == 2">
  23. <div class="iconfont icon-show_roaming" :class="{ active: mode == 0 }" @click="onModeChange(0)"></div>
  24. <div class="iconfont icon-show_plane" :class="{ active: mode == 1 }" @click="onModeChange(1)"></div>
  25. </div>
  26. <div class="item-density" v-if="source.type == 2 && mode == 1" :class="{ active: showDensity }" @click="showDensity = !showDensity">
  27. <span>{{ densityType.text }}</span>
  28. <i class="iconfont icon-arrows_down"></i>
  29. <ul>
  30. <li v-for="density in densityTypes" @click="onDensityChange(density)">{{ density.text }}</li>
  31. </ul>
  32. </div>
  33. </div>
  34. <div class="points" v-if="showAdjust">
  35. <div :class="{ active: points.p1 }" @click="onP1Click('left')">
  36. <i class="iconfont" :class="[points.p1 ? 'icon-positioning01' : 'icon-positioning02']"></i>
  37. <span>P1</span>
  38. </div>
  39. <div :class="{ active: points.p2 }" @click="onP2Click('left')">
  40. <i class="iconfont" :class="[points.p2 ? 'icon-positioning01' : 'icon-positioning02']"></i>
  41. <span>P2</span>
  42. </div>
  43. </div>
  44. </div>
  45. <div class="split" v-if="target">
  46. <iframe ref="targetFrame" :src="targetURL" frameborder="0" @load="onLoadTarget"></iframe>
  47. <div class="tools" v-show="!fscChecked && !bimChecked">
  48. <div class="item-date target">
  49. <calendar
  50. name="target"
  51. :count="scenes.length"
  52. :controls="controls"
  53. :value="targetDate"
  54. :highlighted="targetDays"
  55. @selected="onSelected"
  56. @pick="onPickDate"
  57. @prev="onPrevDate"
  58. @next="onNextDate"
  59. ></calendar>
  60. </div>
  61. </div>
  62. <div class="points" v-if="showAdjust">
  63. <div :class="{ active: points.p1 }" @click="onP1Click('right')">
  64. <i class="iconfont" :class="[points.p1 ? 'icon-positioning01' : 'icon-positioning02']"></i>
  65. <span>P1</span>
  66. </div>
  67. <div :class="{ active: points.p2 }" @click="onP2Click('right')">
  68. <i class="iconfont" :class="[points.p2 ? 'icon-positioning01' : 'icon-positioning02']"></i>
  69. <span>P2</span>
  70. </div>
  71. </div>
  72. </div>
  73. <div class="model" v-show="showWidget && !showAdjust && !showRules">
  74. <div v-if="isLogin" class="file" :class="{ active: fileChecked, disable: fileDisable }" v-show="!fscChecked && !showBim && !dbsChecked && !bimChecked && !ruleChecked">
  75. <div @click="onFileChecked">
  76. <i class="iconfont icon-note1"></i>
  77. <span>{{ $t('home.tag') }}</span>
  78. </div>
  79. </div>
  80. <div class="rule" :class="{ active: ruleChecked, disable: fileDisable }" v-show="!fscChecked && !showBim && !dbsChecked && !bimChecked">
  81. <div @click="onRuleChecked">
  82. <i class="iconfont icon-measurement"></i>
  83. <span>{{ $t('common.measure') }}</span>
  84. </div>
  85. </div>
  86. <div class="bim" :class="{ active: bimChecked, disable: bimDisable }" v-show="!fscChecked && !showBim && !ruleChecked">
  87. <div @click="onBimChecked">
  88. <i class="iconfont icon-BIM"></i>
  89. <span>BIM</span>
  90. </div>
  91. </div>
  92. <div class="dbs" :class="{ active: dbsChecked, disable: dbsDisable }" v-show="!fscChecked && !showBim && !ruleChecked">
  93. <div @click="onDbsChecked">
  94. <i class="iconfont icon-split_screen"></i>
  95. <span>{{ $t('home.splitScreen') }}</span>
  96. </div>
  97. </div>
  98. <div class="fsc" :class="{ active: fscChecked }" @click="onFscChecked">
  99. <i class="iconfont" :class="[fscChecked ? 'icon-full_screen_selected' : 'icon-full_screen_normal']"></i>
  100. <span>{{ $t('home.fullScreen') }}</span>
  101. </div>
  102. </div>
  103. <TagManager />
  104. </main>
  105. </article>
  106. <Toast v-if="showTips" type="warn" :content="showTips" :close="() => (showTips = null)" />
  107. <Files :show="fileChecked" @exit="() => (fileChecked = false)" />
  108. </template>
  109. <script setup>
  110. import { ref, onMounted, computed, nextTick, provide, watch } from 'vue'
  111. import { http } from '@/utils/request'
  112. import browser from '@/utils/browser'
  113. import Toast from '@/components/dialog/Toast'
  114. import AppHeader from '@/components/header'
  115. import Calendar from '@/components/calendar'
  116. import Files from '@/components/files'
  117. import TagManager from '@/components/files/TagManager'
  118. import sync, { beforeChangeURL, loadSourceScene, loadTargetScene, setPanoWithBim, flyToP1P2 } from '@/utils/sync'
  119. import i18n from '@/i18n'
  120. import Rules from './Rules'
  121. const { t } = i18n.global
  122. const isDev = process.env.VUE_APP_TEST == 1
  123. const rules = []
  124. const tags = ref([])
  125. const notify = ref(null)
  126. const isEdit = ref(false)
  127. const isLogin = ref(false)
  128. const isFlying = ref(false)
  129. provide('tags', tags)
  130. provide('notify', notify)
  131. provide('isEdit', isEdit)
  132. provide('isLogin', isLogin)
  133. provide('isFlying', isFlying)
  134. const userId = ref(localStorage.getItem('userId') || null)
  135. const getUserId = id => {
  136. userId.value = id
  137. }
  138. const showRules = ref(false)
  139. const closeRules = () => {
  140. showRules.value = false
  141. window.kankan.TagManager.cancelMeasure()
  142. }
  143. // 是否BIM模式
  144. const showBim = ref(browser.urlHasValue('bim'))
  145. // 是否校准模式
  146. const showSplit = ref(browser.urlHasValue('split'))
  147. const showAdjust = ref(browser.urlHasValue('adjust'))
  148. const bimChecked = ref()
  149. const dbsChecked = ref(null)
  150. const fscChecked = ref(null)
  151. const fileChecked = ref(false)
  152. const ruleChecked = ref(false)
  153. const datepickName = ref(null)
  154. const sourceFrame = ref(null)
  155. const targetFrame = ref(null)
  156. const mode = ref(0)
  157. const source = ref(null)
  158. const target = ref(null)
  159. const project = ref(null)
  160. const points = ref({ p1: null, p2: null })
  161. const densityTypes = ref([
  162. { type: 'high', text: t('common.high') },
  163. { type: 'middle', text: t('common.middle') },
  164. { type: 'low', text: t('common.low') },
  165. ])
  166. const densityType = ref(densityTypes.value[0])
  167. const showTips = ref(null)
  168. const showDensity = ref(false)
  169. const showWidget = computed(() => {
  170. if (fileChecked.value) {
  171. return false
  172. }
  173. return true
  174. })
  175. const scenes = computed(() => {
  176. if (!project.value) {
  177. return []
  178. }
  179. return project.value.sceneList.map(item => {
  180. return {
  181. num: item.num,
  182. type: item.type,
  183. createTime: item.createTime,
  184. }
  185. })
  186. })
  187. const controls = computed(() => {
  188. if (bimChecked.value) {
  189. return scenes.value.length > 1
  190. }
  191. return dbsChecked.value ? scenes.value.length > 2 : scenes.value.length > 1
  192. })
  193. const sourceURL = computed(() => {
  194. beforeChangeURL('source')
  195. if (bimChecked.value && !dbsChecked.value) {
  196. return `smart-bim.html?m=${project.value.bimData.bimOssFilePath}`
  197. }
  198. if (!source.value) {
  199. return
  200. }
  201. if (source.value.type < 2) {
  202. // 看看、看见场景
  203. return `smart-kankan.html?m=${source.value.num}${isDev ? '&dev' : ''}`
  204. } else {
  205. // 深时场景
  206. return `smart-laser.html?m=${source.value.num}${isDev ? '&dev' : ''}`
  207. }
  208. })
  209. const targetURL = computed(() => {
  210. if (bimChecked.value) {
  211. return `smart-bim.html?m=${project.value.bimData.bimOssFilePath}`
  212. }
  213. if (target.value.type < 2) {
  214. // 看看、看见场景
  215. return `smart-kankan.html?m=${target.value.num}${isDev ? '&dev' : ''}`
  216. } else {
  217. // 深时场景
  218. return `smart-laser.html?m=${target.value.num}${isDev ? '&dev' : ''}`
  219. }
  220. })
  221. const sourceDate = computed(() => {
  222. if (source.value) {
  223. return source.value.createTime.toDate()
  224. }
  225. })
  226. const targetDate = computed(() => {
  227. if (target.value) {
  228. return target.value.createTime.toDate()
  229. }
  230. })
  231. const sourceDays = computed(() => {
  232. let dates = []
  233. if (datepickName.value == 'source') {
  234. if (dbsChecked.value) {
  235. // 分屏模式
  236. if (bimChecked.value) {
  237. // BIM模式
  238. dates = scenes.value.map(item => item.createTime.toDate())
  239. } else {
  240. // 非BIM模式
  241. dates = scenes.value.filter(item => item.createTime != target.value.createTime).map(item => item.createTime.toDate())
  242. }
  243. } else {
  244. // 非分屏模式
  245. dates = scenes.value.map(item => item.createTime.toDate())
  246. }
  247. }
  248. return {
  249. dates: dates,
  250. }
  251. })
  252. const targetDays = computed(() => {
  253. let dates = []
  254. if (datepickName.value == 'target') {
  255. dates = scenes.value.filter(item => item.createTime != source.value.createTime).map(item => item.createTime.toDate())
  256. }
  257. return {
  258. dates: dates,
  259. }
  260. })
  261. const fileDisable = computed(() => {
  262. return false
  263. })
  264. const bimDisable = computed(() => {
  265. if (!project.value || !project.value.bimData) {
  266. return true
  267. }
  268. })
  269. const dbsDisable = computed(() => {
  270. if (scenes.value.length == 0) {
  271. // 没有场景的情况
  272. return 1
  273. }
  274. if (!bimChecked.value && scenes.value.length == 1) {
  275. // 只有1个场景的情况
  276. return 2
  277. }
  278. })
  279. const onLoadSource = () => {
  280. if (bimChecked.value && !dbsChecked.value) {
  281. // BIM单屏模式
  282. return
  283. }
  284. if (source.value.type < 2) {
  285. window['kankan'] = sourceFrame.value.contentWindow.app
  286. window['kankan'].TagManager.load(tags.value)
  287. window['kankan'].Camera.on('flying.started', pano => {
  288. isFlying.value = true
  289. })
  290. window['kankan'].Camera.on('flying.ended', pano => {
  291. isFlying.value = false
  292. })
  293. } else {
  294. window['laser'] = sourceFrame.value.contentWindow.loaded
  295. window.laser.then(sdk => {
  296. console.error(window[0].viewer)
  297. window[0].viewer.images360.addEventListener('flyToPano',()=>{
  298. isFlying.value = true
  299. })
  300. window[0].viewer.images360.addEventListener('flyToPanoDone',()=>{
  301. isFlying.value = false
  302. })
  303. })
  304. }
  305. loadSourceScene(sourceFrame, source.value.type < 2 ? 'kankan' : 'laser', mode.value)
  306. }
  307. const onLoadTarget = () => {
  308. if (bimChecked.value) {
  309. loadTargetScene(targetFrame, 'bim')
  310. } else {
  311. loadTargetScene(targetFrame, target.value.type < 2 ? 'kankan' : 'laser', mode.value)
  312. }
  313. }
  314. const onModeChange = targetMode => {
  315. window.Log('changeMode:' + targetMode, '#3cffff')
  316. if (sync.sourceInst) {
  317. sync.sourceInst.loaded.then(sdk => sdk.scene.changeMode(targetMode))
  318. mode.value = targetMode
  319. sync.views.laserChangeMode(mode.value)
  320. }
  321. }
  322. const onDensityChange = density => {
  323. if (sync.sourceInst) {
  324. sync.sourceInst.loaded.then(sdk => {
  325. let data = sdk.scene.changePointDensity(density.type)
  326. sdk.scene.changeDensityPercent(data.percent)
  327. })
  328. densityType.value = density
  329. }
  330. }
  331. const onPickDate = name => {
  332. datepickName.value = name
  333. }
  334. const onSelected = data => {
  335. if (!data.payload) {
  336. return
  337. }
  338. let { name, payload } = data
  339. let date = payload.format('YYYY-mm-dd')
  340. let dates = (name == 'source' ? sourceDays : targetDays).value.dates.map(item => item.format('YYYY-mm-dd'))
  341. if (dates.indexOf(date) != -1) {
  342. let time = payload.format('YYYY-mm-dd HH:MM')
  343. let find = scenes.value.find(c => c.createTime.indexOf(time) != -1)
  344. if (find) {
  345. if (name == 'source') {
  346. if (find.num != source.value.num) {
  347. source.value = find
  348. }
  349. } else {
  350. if (find.num != target.value.num) {
  351. target.value = find
  352. }
  353. }
  354. }
  355. } else {
  356. showTips.value = t('home.dateScene')
  357. }
  358. datepickName.value = null
  359. }
  360. const onPrevDate = name => {
  361. let scene = null
  362. if (name == 'source') {
  363. scene = source
  364. } else {
  365. scene = target
  366. }
  367. let index = scenes.value.findIndex(item => item.num == scene.value.num)
  368. if (index == -1) {
  369. return
  370. }
  371. if (--index == -1) {
  372. index = scenes.value.length - 1
  373. }
  374. if (target.value && !bimChecked.value) {
  375. // 分屏模式判断
  376. if (name == 'source') {
  377. if (scenes.value[index].createTime == target.value.createTime) {
  378. index--
  379. }
  380. } else {
  381. if (scenes.value[index].createTime == source.value.createTime) {
  382. index--
  383. }
  384. }
  385. if (index == -1) {
  386. index = scenes.value.length - 1
  387. }
  388. }
  389. scene.value = scenes.value[index]
  390. }
  391. const onNextDate = name => {
  392. let scene = null
  393. if (name == 'source') {
  394. scene = source
  395. } else {
  396. scene = target
  397. }
  398. let index = scenes.value.findIndex(item => item.num == scene.value.num)
  399. if (index == -1) {
  400. return
  401. }
  402. if (++index > scenes.value.length - 1) {
  403. index = 0
  404. }
  405. if (target.value && !bimChecked.value) {
  406. // 分屏模式判断
  407. if (name == 'source') {
  408. if (scenes.value[index].createTime == target.value.createTime) {
  409. index++
  410. }
  411. } else {
  412. if (scenes.value[index].createTime == source.value.createTime) {
  413. index++
  414. }
  415. }
  416. if (index > scenes.value.length - 1) {
  417. index = 0
  418. }
  419. }
  420. scene.value = scenes.value[index]
  421. }
  422. const onFileChecked = () => {
  423. fileChecked.value = !fileChecked.value
  424. }
  425. // bim点击
  426. const onBimChecked = () => {
  427. if (bimDisable.value) {
  428. return (showTips.value = t('home.notFindFile'))
  429. }
  430. if (bimChecked.value) {
  431. bimChecked.value = false
  432. if (dbsChecked.value) {
  433. // 如果没有多场景数据,取消分屏
  434. if (scenes.value.length < 2) {
  435. onDbsChecked()
  436. return
  437. }
  438. // 判断是否分屏状态
  439. let index = scenes.value.findIndex(item => item.num == source.value.num)
  440. if (index == -1) {
  441. return
  442. }
  443. if (++index > scenes.value.length - 1) {
  444. index = 0
  445. }
  446. target.value = scenes.value[index]
  447. }
  448. } else {
  449. bimChecked.value = true
  450. }
  451. }
  452. // 分屏点击
  453. const onDbsChecked = () => {
  454. if (dbsDisable.value && !dbsChecked.value) {
  455. return (showTips.value = t('home.notFindScene'))
  456. }
  457. dbsChecked.value = !dbsChecked.value
  458. if (dbsChecked.value) {
  459. if (bimChecked.value) {
  460. // BIM分屏
  461. source.value = scenes.value[scenes.value.length - 1]
  462. target.value = project.value.bimData
  463. } else {
  464. // 四维看看、激光场景分屏
  465. let index = scenes.value.findIndex(item => item.num == source.value.num)
  466. if (index == -1) {
  467. return
  468. }
  469. if (++index > scenes.value.length - 1) {
  470. index = 0
  471. }
  472. target.value = scenes.value[index]
  473. }
  474. } else {
  475. target.value = null
  476. }
  477. }
  478. // 全屏点击
  479. const onFscChecked = () => {
  480. let element = document.documentElement
  481. fscChecked.value = !fscChecked.value
  482. if (fscChecked.value) {
  483. if (element.requestFullscreen) {
  484. element.requestFullscreen()
  485. } else if (element.webkitRequestFullScreen) {
  486. element.webkitRequestFullScreen()
  487. } else if (element.mozRequestFullScreen) {
  488. element.mozRequestFullScreen()
  489. } else if (element.msRequestFullscreen) {
  490. element.msRequestFullscreen()
  491. }
  492. } else {
  493. if (document.exitFullscreen) {
  494. document.exitFullscreen()
  495. } else if (document.webkitCancelFullScreen) {
  496. document.webkitCancelFullScreen()
  497. } else if (document.mozCancelFullScreen) {
  498. document.mozCancelFullScreen()
  499. } else if (document.msExitFullscreen) {
  500. document.msExitFullscreen()
  501. }
  502. }
  503. }
  504. const onPointsUpdate = (type, data) => {
  505. points.value[type] = data
  506. }
  507. const onP1Click = type => {
  508. if (!points.value.p1) {
  509. showTips.value = t('home.notChoosePoint')
  510. return
  511. }
  512. console.log(points.value.p1)
  513. // todo 定位
  514. flyToP1P2(points.value.p1)
  515. }
  516. const onP2Click = type => {
  517. if (!points.value.p2) {
  518. showTips.value = t('home.notChoosePoint')
  519. return
  520. }
  521. // todo 定位
  522. flyToP1P2(points.value.p2)
  523. }
  524. const onRuleChecked = () => {
  525. if (ruleChecked.value) {
  526. ruleChecked.value = false
  527. rules.forEach(rule => {
  528. rule.clear()
  529. })
  530. return
  531. }
  532. if (source.value.type < 2) {
  533. showRules.value = true
  534. window.kankan.TagManager.startMeasure()
  535. } else {
  536. sync.sourceInst.loaded.then(sdk => {
  537. const rule = sdk.startMeasure()
  538. rules.push(rule)
  539. })
  540. ruleChecked.value = true
  541. }
  542. }
  543. onMounted(() => {
  544. const num = browser.valueFromUrl('m') || ''
  545. const projectId = browser.valueFromUrl('projectId') || 1
  546. http.get(`smart-site/project/info?projectId=${projectId}&sceneOrder=asc`)
  547. .then(response => {
  548. if (response.success) {
  549. if (response.data) {
  550. document.title = response.data.projectName
  551. if (response.data.panos) {
  552. try {
  553. response.data.panos = JSON.parse(response.data.panos)
  554. points.value.p1 = response.data.panos.p1
  555. points.value.p2 = response.data.panos.p2
  556. setPanoWithBim(response.data.panos)
  557. } catch (error) {
  558. console.error(error)
  559. }
  560. }
  561. project.value = response.data
  562. if (showBim.value) {
  563. onBimChecked()
  564. } else if (project.value.sceneList.length) {
  565. if (num) {
  566. source.value = project.value.sceneList.find(c => c.num == num)
  567. } else {
  568. source.value = project.value.sceneList[project.value.sceneList.length - 1]
  569. }
  570. if (!source.value) {
  571. return (showTips.value = t('home.sceneDelete'))
  572. }
  573. if (showAdjust.value || showSplit.value) {
  574. onBimChecked()
  575. nextTick(() => onDbsChecked())
  576. }
  577. } else {
  578. return (showTips.value = t('home.sceneDelete'))
  579. }
  580. }
  581. } else {
  582. if (response.code == 4008) {
  583. // 未登录
  584. localStorage.removeItem('token')
  585. } else {
  586. showTips.value = response.message
  587. }
  588. }
  589. })
  590. .catch(() => {
  591. showTips.value = t('code.failed')
  592. })
  593. http.post(`smart-site/marking/list`, {
  594. projectId: projectId,
  595. pageNum: 1,
  596. pageSize: 200,
  597. num: browser.getURLParam('m'),
  598. }).then(response => {
  599. if (response.data && response.data.list) {
  600. tags.value = response.data.list.map(item => {
  601. item.hotData.visible = false
  602. item.hotData.id = item.markingId
  603. item.hotData.createTime = item.createTime
  604. item.hotData.lastCreateBy = item.lastCreateBy
  605. return item.hotData
  606. })
  607. }
  608. })
  609. })
  610. </script>
  611. <style lang="scss" scoped>
  612. article {
  613. display: flex;
  614. width: 100%;
  615. height: 100%;
  616. overflow: hidden;
  617. }
  618. aside {
  619. width: 160px;
  620. height: 100%;
  621. background-color: rgba(0, 0, 0, 0.8);
  622. h4 {
  623. font-size: 16px;
  624. text-align: center;
  625. }
  626. ul {
  627. margin-top: 20px;
  628. }
  629. li {
  630. margin: 0;
  631. padding: 0;
  632. font-size: 16px;
  633. margin-left: 20px;
  634. cursor: pointer;
  635. &:hover,
  636. &.active {
  637. color: #00c8af;
  638. }
  639. }
  640. }
  641. main {
  642. flex: 1;
  643. width: 100%;
  644. height: 100%;
  645. position: relative;
  646. display: flex;
  647. &.full {
  648. .split {
  649. width: 50%;
  650. }
  651. }
  652. iframe {
  653. position: absolute;
  654. left: 0;
  655. top: 0;
  656. z-index: 1000;
  657. width: 100%;
  658. height: 100%;
  659. border: none;
  660. outline: none;
  661. }
  662. .split {
  663. margin-left: 2px;
  664. width: 100%;
  665. height: 100%;
  666. overflow: hidden;
  667. position: relative;
  668. &:first-child,
  669. &:last-child {
  670. margin-left: 0;
  671. }
  672. .points {
  673. position: absolute;
  674. left: 50%;
  675. top: 64px;
  676. z-index: 9999;
  677. display: flex;
  678. transform: translateX(-50%);
  679. div {
  680. cursor: pointer;
  681. margin-left: 20px;
  682. width: 70px;
  683. height: 88px;
  684. background: rgba(27, 27, 28, 0.8);
  685. box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25), inset 0px 0px 0px 2px rgba(255, 255, 255, 0.1);
  686. border-radius: 8px 8px 8px 8px;
  687. opacity: 1;
  688. border: 1px solid #000000;
  689. display: flex;
  690. flex-direction: column;
  691. align-items: center;
  692. justify-content: center;
  693. &.active {
  694. color: #0076f6;
  695. }
  696. i {
  697. font-size: 24px;
  698. }
  699. span {
  700. font-size: 16px;
  701. margin-top: 10px;
  702. }
  703. }
  704. }
  705. }
  706. .model {
  707. position: absolute;
  708. left: 50px;
  709. bottom: 40px;
  710. z-index: 1000;
  711. display: flex;
  712. flex-direction: column;
  713. > div {
  714. cursor: pointer;
  715. width: 50px;
  716. height: 50px;
  717. margin-top: 16px;
  718. background: rgba(27, 27, 28, 0.8);
  719. box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  720. border-radius: 47px 47px 47px 47px;
  721. border: 1px solid #000000;
  722. display: flex;
  723. flex-direction: column;
  724. align-items: center;
  725. justify-content: center;
  726. > div {
  727. width: 100%;
  728. height: 100%;
  729. display: flex;
  730. flex-direction: column;
  731. align-items: center;
  732. justify-content: center;
  733. }
  734. &.active {
  735. color: #0076f6;
  736. }
  737. &.disable {
  738. opacity: 0.5;
  739. }
  740. span {
  741. font-size: 12px;
  742. padding-top: 1px;
  743. transform: scale(0.8);
  744. }
  745. }
  746. }
  747. .tools {
  748. position: absolute;
  749. width: 100%;
  750. bottom: 40px;
  751. z-index: 2000;
  752. display: flex;
  753. justify-content: center;
  754. align-items: center;
  755. color: #fff;
  756. pointer-events: none;
  757. > div {
  758. pointer-events: all;
  759. }
  760. .item-mode {
  761. height: 50px;
  762. background: rgba(27, 27, 28, 0.8);
  763. box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  764. border-radius: 47px 47px 47px 47px;
  765. border: 1px solid #000000;
  766. display: flex;
  767. justify-content: center;
  768. align-items: center;
  769. margin-left: 10px;
  770. margin-right: 10px;
  771. font-size: 16px;
  772. padding: 0 16px;
  773. div {
  774. cursor: pointer;
  775. font-size: 18px;
  776. }
  777. div:last-child {
  778. margin-left: 20px;
  779. }
  780. div.active {
  781. color: #0076f6;
  782. }
  783. }
  784. .item-density {
  785. position: relative;
  786. cursor: pointer;
  787. height: 50px;
  788. width: 68px;
  789. background: rgba(27, 27, 28, 0.8);
  790. box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  791. border-radius: 47px 47px 47px 47px;
  792. border: 1px solid #000000;
  793. display: flex;
  794. justify-content: center;
  795. align-items: center;
  796. margin-left: 10px;
  797. margin-right: 10px;
  798. font-size: 16px;
  799. padding: 0 16px;
  800. &.active {
  801. ul {
  802. display: block;
  803. }
  804. i {
  805. transform: scale(0.8) rotate(180deg);
  806. }
  807. }
  808. span {
  809. margin-right: 4px;
  810. }
  811. i {
  812. transform: scale(0.8);
  813. font-size: 14px;
  814. }
  815. ul {
  816. display: none;
  817. position: absolute;
  818. left: 0;
  819. bottom: calc(100% + 10px);
  820. width: 68px;
  821. padding: 10px 0;
  822. border-radius: 12px;
  823. text-align: center;
  824. background: rgba(27, 27, 28, 0.8);
  825. box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  826. border: 1px solid #000000;
  827. list-style: none;
  828. li {
  829. padding: 5px 0;
  830. &:hover {
  831. color: #0076f6;
  832. }
  833. }
  834. }
  835. }
  836. }
  837. }
  838. </style>
  839. <style lang="scss">
  840. #app {
  841. background-color: rgba(0, 0, 0, 0.8);
  842. display: flex;
  843. flex-direction: column;
  844. }
  845. .vuejs3-datepicker__calendar {
  846. background: rgba(27, 27, 28, 0.8);
  847. box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  848. border-radius: 4px 4px 4px 4px;
  849. opacity: 1;
  850. border: 1px solid #000000;
  851. filter: blur(undefinedpx);
  852. color: #fff;
  853. }
  854. .vuejs3-datepicker__calendar-topbar {
  855. display: none !important;
  856. }
  857. .vuejs3-datepicker__calendar header .up:not(.disabled):hover {
  858. background: rgba(0, 0, 0, 0.3);
  859. color: #fff;
  860. }
  861. .vuejs3-datepicker__calendar header .prev:after {
  862. border-left: 1px solid #fff;
  863. border-bottom: 1px solid #fff;
  864. }
  865. .vuejs3-datepicker__calendar header .prev:not(.disabled):hover {
  866. background: rgba(0, 0, 0, 0.3);
  867. }
  868. .vuejs3-datepicker__calendar header .next:after {
  869. border-top: 1px solid #fff;
  870. border-right: 1px solid #fff;
  871. }
  872. .vuejs3-datepicker__calendar header .next:not(.disabled):hover {
  873. background: rgba(0, 0, 0, 0.3);
  874. }
  875. .vuejs3-datepicker__calendar .cell {
  876. font-size: 16px !important;
  877. border-radius: 4px;
  878. }
  879. .highlighted {
  880. color: #076ede !important;
  881. background: transparent !important;
  882. }
  883. .selected {
  884. color: #fff !important;
  885. background: #0076f6 !important;
  886. }
  887. </style>