Viewer.vue 28 KB

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