|
@@ -12,63 +12,43 @@
|
|
|
style="--n-body-padding: 0px"
|
|
|
>
|
|
|
<n-drawer-content title="专题导航">
|
|
|
- <div class="drawerContent m-5">
|
|
|
- <div class="text-lg my-2.5">专题导航</div>
|
|
|
- <div class="list" v-if="show">
|
|
|
- <div class="butlist text-center pb-2">
|
|
|
- <n-button type="primary" @click="handleShow">+ 添加</n-button>
|
|
|
- </div>
|
|
|
- <div class="list my-2">
|
|
|
- <div class="listItem">
|
|
|
- <div class="video flex justify-between justify-items-center">
|
|
|
- <span>
|
|
|
- <n-icon size="17" color="#000">
|
|
|
- <WalkSharp class="relative top-0.5" />
|
|
|
- </n-icon>
|
|
|
- 企业荣誉
|
|
|
- </span>
|
|
|
- <n-popover placement="bottom" trigger="click">
|
|
|
- <template #trigger>
|
|
|
- <n-icon size="17" color="#000">
|
|
|
- <EllipsisHorizontal />
|
|
|
- </n-icon>
|
|
|
- </template>
|
|
|
- <div class="butList w-12 pointer-events-auto">
|
|
|
- <div class="butItem">编辑</div>
|
|
|
- <div class="butItem">删除</div>
|
|
|
- </div>
|
|
|
- </n-popover>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div v-else class="showList">
|
|
|
- <div class="doclist">
|
|
|
- <div
|
|
|
- class="docItem flex justify-between py-1"
|
|
|
- v-for="(item, index) in doclist"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <n-radio
|
|
|
- :checked="item.checked"
|
|
|
- :value="item.name"
|
|
|
- :name="item.name"
|
|
|
- @click="handleChange(item)"
|
|
|
- >
|
|
|
- {{ item.name }}
|
|
|
- </n-radio>
|
|
|
- <n-icon @click="handleConfirm" size="17" color="red">
|
|
|
- <TrashOutline />
|
|
|
+ <div class="drawerContent m-5"></div>
|
|
|
+ <n-flex justify="center">
|
|
|
+ <n-button type="primary" @click="handleAdd">+ 添加</n-button>
|
|
|
+ </n-flex>
|
|
|
+
|
|
|
+ <n-list
|
|
|
+ hoverable
|
|
|
+ clickable
|
|
|
+ style="--n-color-modal: none; margin-top: 20px"
|
|
|
+ :show-divider="false"
|
|
|
+ @select="handleSelect"
|
|
|
+ >
|
|
|
+ <n-list-item v-for="(nav, index) in dataList" :key="index" style="">
|
|
|
+ <n-flex justify="space-between">
|
|
|
+ <n-flex align="center">
|
|
|
+ <n-icon size="20">
|
|
|
+ <WalkSharp />
|
|
|
+ </n-icon>
|
|
|
+ {{ nav.title }}
|
|
|
+ </n-flex>
|
|
|
+
|
|
|
+ <n-dropdown trigger="hover" :options="fullOptions">
|
|
|
+ <n-icon :size="20">
|
|
|
+ <svg
|
|
|
+ xmlns="http://www.w3.org/2000/svg"
|
|
|
+ xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
|
+ viewBox="0 0 32 32"
|
|
|
+ >
|
|
|
+ <circle cx="8" cy="16" r="2" fill="currentColor"></circle>
|
|
|
+ <circle cx="16" cy="16" r="2" fill="currentColor"></circle>
|
|
|
+ <circle cx="24" cy="16" r="2" fill="currentColor"></circle>
|
|
|
+ </svg>
|
|
|
</n-icon>
|
|
|
- </div>
|
|
|
- <div class="backBut text-center mt-2">
|
|
|
- <n-button type="primary" @click="handleShow"
|
|
|
- >确认并返回列表</n-button
|
|
|
- >
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ </n-dropdown>
|
|
|
+ </n-flex>
|
|
|
+ </n-list-item>
|
|
|
+ </n-list>
|
|
|
</n-drawer-content>
|
|
|
</n-drawer>
|
|
|
</div>
|
|
@@ -76,24 +56,60 @@
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import { ref } from 'vue'
|
|
|
-import { sdk,clearScreen } from '@/sdk'
|
|
|
+import { sdk, clearScreen } from '@/sdk'
|
|
|
import { onMounted, onUnmounted } from 'vue'
|
|
|
-import { NRadio, NPopover, useDialog, useMessage } from 'naive-ui'
|
|
|
+import {
|
|
|
+ NRadio,
|
|
|
+ NPopover,
|
|
|
+ useDialog,
|
|
|
+ useMessage,
|
|
|
+ NDropdown,
|
|
|
+ NList,
|
|
|
+ NListItem
|
|
|
+} from 'naive-ui'
|
|
|
import { WalkSharp, TrashOutline, EllipsisHorizontal } from '@vicons/ionicons5'
|
|
|
|
|
|
const panos = ref([])
|
|
|
+const isEditing = ref({
|
|
|
+ index: NaN
|
|
|
+})
|
|
|
+
|
|
|
+const dataList = ref<
|
|
|
+ {
|
|
|
+ title: string
|
|
|
+ panos: string[]
|
|
|
+ }[]
|
|
|
+>([])
|
|
|
|
|
|
sdk.then((sdk) => {
|
|
|
sdk.PanoCheckManager.on('changed', (list: any) => {
|
|
|
panos.value = list
|
|
|
- console.log(panos.value)
|
|
|
+ console.log('panos', panos.value)
|
|
|
})
|
|
|
})
|
|
|
|
|
|
+const handleAdd = () => {
|
|
|
+ sdk.then((sdk) => {
|
|
|
+ sdk.Scene.whenLoaded(() => {
|
|
|
+ sdk.PanoCheckManager.enter()
|
|
|
+ clearScreen(true)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ if (panos.value.length === 0) {
|
|
|
+ dataList.value.push({
|
|
|
+ title: '新增路线',
|
|
|
+ panos: []
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ // message.warning('请先保存数据!')
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
sdk.then((sdk) => {
|
|
|
sdk.Scene.whenLoaded(() => {
|
|
|
sdk.PanoCheckManager.enter()
|
|
|
+ // debugger
|
|
|
clearScreen(true)
|
|
|
})
|
|
|
})
|
|
@@ -107,39 +123,31 @@ onUnmounted(() => {
|
|
|
})
|
|
|
|
|
|
defineProps<{ msg: string }>()
|
|
|
+
|
|
|
const dialog = useDialog()
|
|
|
const message = useMessage()
|
|
|
+
|
|
|
const active = ref(true)
|
|
|
-const show = ref(true)
|
|
|
-const doclist = ref([
|
|
|
- { name: 'test1', checked: false },
|
|
|
- { name: 'test2', checked: false },
|
|
|
- { name: 'test3', checked: false },
|
|
|
- { name: 'test4', checked: false },
|
|
|
- { name: 'test5', checked: false },
|
|
|
- { name: 'test6', checked: false },
|
|
|
- { name: 'test7', checked: false }
|
|
|
+// const show = ref(true)
|
|
|
+
|
|
|
+const fullOptions = ref([
|
|
|
+ {
|
|
|
+ label: '编辑',
|
|
|
+ key: '1'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '删除',
|
|
|
+ key: '2'
|
|
|
+ }
|
|
|
])
|
|
|
-const handleShow = () => {
|
|
|
- show.value = !show.value
|
|
|
-}
|
|
|
-const handleConfirm = () => {
|
|
|
- dialog.warning({
|
|
|
- title: '提示',
|
|
|
- content: '确认删除此点位?',
|
|
|
- positiveText: '确定',
|
|
|
- negativeText: '取消',
|
|
|
- onPositiveClick: () => {
|
|
|
- message.success('确定')
|
|
|
- },
|
|
|
- onNegativeClick: () => {
|
|
|
- message.error('不确定')
|
|
|
- }
|
|
|
- })
|
|
|
-}
|
|
|
-const handleChange = (item) => {
|
|
|
- console.log(item, 'handleChange')
|
|
|
- item.checked = !item.checked
|
|
|
+
|
|
|
+const handleSelect = (key: string) => {
|
|
|
+ switch (key) {
|
|
|
+ case '1':
|
|
|
+ break
|
|
|
+ case '2':
|
|
|
+ break
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|