|
@@ -14,11 +14,11 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="points" v-if="showAdjust">
|
|
<div class="points" v-if="showAdjust">
|
|
- <div :class="{ active: points.p1 }">
|
|
|
|
|
|
+ <div :class="{ active: points.p1 }" @click="onP1Click('left')">
|
|
<i class="iconfont" :class="[points.p1 ? 'icon-positioning01' : 'icon-positioning02']"></i>
|
|
<i class="iconfont" :class="[points.p1 ? 'icon-positioning01' : 'icon-positioning02']"></i>
|
|
<span>P1</span>
|
|
<span>P1</span>
|
|
</div>
|
|
</div>
|
|
- <div :class="{ active: points.p2 }">
|
|
|
|
|
|
+ <div :class="{ active: points.p2 }" @click="onP2Click('left')">
|
|
<i class="iconfont" :class="[points.p2 ? 'icon-positioning01' : 'icon-positioning02']"></i>
|
|
<i class="iconfont" :class="[points.p2 ? 'icon-positioning01' : 'icon-positioning02']"></i>
|
|
<span>P2</span>
|
|
<span>P2</span>
|
|
</div>
|
|
</div>
|
|
@@ -32,11 +32,11 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="points" v-if="showAdjust">
|
|
<div class="points" v-if="showAdjust">
|
|
- <div :class="{ active: points.p1 }">
|
|
|
|
|
|
+ <div :class="{ active: points.p1 }" @click="onP1Click('right')">
|
|
<i class="iconfont" :class="[points.p1 ? 'icon-positioning01' : 'icon-positioning02']"></i>
|
|
<i class="iconfont" :class="[points.p1 ? 'icon-positioning01' : 'icon-positioning02']"></i>
|
|
<span>P1</span>
|
|
<span>P1</span>
|
|
</div>
|
|
</div>
|
|
- <div :class="{ active: points.p2 }">
|
|
|
|
|
|
+ <div :class="{ active: points.p2 }" @click="onP1Click('right')">
|
|
<i class="iconfont" :class="[points.p2 ? 'icon-positioning01' : 'icon-positioning02']"></i>
|
|
<i class="iconfont" :class="[points.p2 ? 'icon-positioning01' : 'icon-positioning02']"></i>
|
|
<span>P2</span>
|
|
<span>P2</span>
|
|
</div>
|
|
</div>
|
|
@@ -59,8 +59,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
</main>
|
|
- <Toast v-if="showBimTips" type="warn" content="未发现BIM文件" :close="() => (showBimTips = false)" />
|
|
|
|
- <Toast v-if="showDbsTips" type="warn" content="未发现对比场景" :close="() => (showDbsTips = false)" />
|
|
|
|
|
|
+ <Toast v-if="showTips" type="warn" :content="showTips" :close="() => (showTips = null)" />
|
|
</article>
|
|
</article>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -94,8 +93,7 @@ const target = ref(null)
|
|
const project = ref(null)
|
|
const project = ref(null)
|
|
const points = ref({ p1: false, p2: false })
|
|
const points = ref({ p1: false, p2: false })
|
|
|
|
|
|
-const showBimTips = ref(false)
|
|
|
|
-const showDbsTips = ref(false)
|
|
|
|
|
|
+const showTips = ref(null)
|
|
|
|
|
|
const scenes = computed(() => {
|
|
const scenes = computed(() => {
|
|
if (!project.value) {
|
|
if (!project.value) {
|
|
@@ -305,7 +303,7 @@ const onNextDate = name => {
|
|
// bim点击
|
|
// bim点击
|
|
const onBimChecked = () => {
|
|
const onBimChecked = () => {
|
|
if (!project.value || !project.value.bimData) {
|
|
if (!project.value || !project.value.bimData) {
|
|
- showBimTips.value = true
|
|
|
|
|
|
+ showTips.value = '未发现BIM文件'
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if (bimChecked.value) {
|
|
if (bimChecked.value) {
|
|
@@ -335,7 +333,7 @@ const onBimChecked = () => {
|
|
// 分屏点击
|
|
// 分屏点击
|
|
const onDbsChecked = () => {
|
|
const onDbsChecked = () => {
|
|
if (!dbsChecked.value && scenes.value.length < 2 && !bimChecked.value) {
|
|
if (!dbsChecked.value && scenes.value.length < 2 && !bimChecked.value) {
|
|
- showDbsTips.value = true
|
|
|
|
|
|
+ showTips.value = '未发现对比场景'
|
|
return
|
|
return
|
|
}
|
|
}
|
|
dbsChecked.value = !dbsChecked.value
|
|
dbsChecked.value = !dbsChecked.value
|
|
@@ -395,6 +393,24 @@ const onPointsUpdate = type => {
|
|
points.value[type] = true
|
|
points.value[type] = true
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const onP1Click = (type) =>{
|
|
|
|
+ if(!points.value.p1){
|
|
|
|
+ showTips.value = '您还未选择关联位置'
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ // todo 定位
|
|
|
|
+ alert(type)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const onP2Click = (type) =>{
|
|
|
|
+ if(!points.value.p2){
|
|
|
|
+ showTips.value = '您还未选择关联位置'
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ // todo 定位
|
|
|
|
+ alert(type)
|
|
|
|
+}
|
|
|
|
+
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
const num = browser.valueFromUrl('m') || ''
|
|
const num = browser.valueFromUrl('m') || ''
|
|
const projectId = browser.valueFromUrl('projectId') || 1
|
|
const projectId = browser.valueFromUrl('projectId') || 1
|
|
@@ -407,7 +423,6 @@ onMounted(() => {
|
|
response.data.panos = JSON.parse(response.data.panos)
|
|
response.data.panos = JSON.parse(response.data.panos)
|
|
points.value.p1 = true
|
|
points.value.p1 = true
|
|
points.value.p2 = true
|
|
points.value.p2 = true
|
|
-
|
|
|
|
setPanoWithBim(response.data.panos)
|
|
setPanoWithBim(response.data.panos)
|
|
|
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
@@ -432,11 +447,11 @@ onMounted(() => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- alert('获取数据失败')
|
|
|
|
|
|
+ showTips.value = response.message
|
|
}
|
|
}
|
|
})
|
|
})
|
|
.catch(() => {
|
|
.catch(() => {
|
|
- alert('服务器连接失败')
|
|
|
|
|
|
+ showTips.value = '服务器连接失败'
|
|
})
|
|
})
|
|
})
|
|
})
|
|
</script>
|
|
</script>
|
|
@@ -510,6 +525,7 @@ main {
|
|
transform: translateX(-50%);
|
|
transform: translateX(-50%);
|
|
|
|
|
|
div {
|
|
div {
|
|
|
|
+ cursor:pointer;
|
|
margin-left: 20px;
|
|
margin-left: 20px;
|
|
width: 70px;
|
|
width: 70px;
|
|
height: 88px;
|
|
height: 88px;
|