|
@@ -20,23 +20,31 @@
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-if="selectedCompany" style="display: flex">
|
|
<div v-if="selectedCompany" style="display: flex">
|
|
|
- <div class="label-workshop">选择标签:</div>
|
|
|
|
|
- <div>
|
|
|
|
|
- <el-radio-group
|
|
|
|
|
- v-model="label"
|
|
|
|
|
- :border="true"
|
|
|
|
|
- style="display: flex"
|
|
|
|
|
- @change="changeShop"
|
|
|
|
|
- >
|
|
|
|
|
- <el-radio-button
|
|
|
|
|
- v-for="item in labelList"
|
|
|
|
|
- :key="item.id"
|
|
|
|
|
- :label="item.id!"
|
|
|
|
|
- class="label-select"
|
|
|
|
|
- >{{ item.name }}</el-radio-button
|
|
|
|
|
|
|
+ <div style="display: flex">
|
|
|
|
|
+ <div class="label-workshop" style="margin-left: 0px">选择标签:</div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <el-radio-group
|
|
|
|
|
+ v-model="label"
|
|
|
|
|
+ :border="true"
|
|
|
|
|
+ style="display: flex"
|
|
|
|
|
+ @change="changeShop"
|
|
|
>
|
|
>
|
|
|
- </el-radio-group></div
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-radio-button
|
|
|
|
|
+ v-for="item in labelList"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ :label="item.id!"
|
|
|
|
|
+ class="label-select"
|
|
|
|
|
+ >{{ item.name }}</el-radio-button
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-radio-group></div
|
|
|
|
|
+ >
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-if="label" style="display: flex">
|
|
|
|
|
+ <div class="label-workshop" style="margin-left: 10px">是否开启移动端视角</div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <el-switch v-model="isMobileView" style="margin-left: 10px" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="flex">
|
|
<div class="flex">
|
|
|
<!-- <el-button @click="toJson">tojson</el-button> -->
|
|
<!-- <el-button @click="toJson">tojson</el-button> -->
|
|
@@ -96,7 +104,12 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div ref="drawContainer" id="drawContainer" class="draw-container">
|
|
<div ref="drawContainer" id="drawContainer" class="draw-container">
|
|
|
<div id="shopEditContainer" v-moveable:1>
|
|
<div id="shopEditContainer" v-moveable:1>
|
|
|
- <MapContainer ref="mapContainerRef" @on-open="openConfig" />
|
|
|
|
|
|
|
+ <MapContainer
|
|
|
|
|
+ ref="mapContainerRef"
|
|
|
|
|
+ :is-mobile-view="isMobileView"
|
|
|
|
|
+ :module-code="labelMouduleCode"
|
|
|
|
|
+ @on-open="openConfig"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
<el-upload
|
|
<el-upload
|
|
|
v-if="!hasBg"
|
|
v-if="!hasBg"
|
|
@@ -122,7 +135,7 @@
|
|
|
placement="left"
|
|
placement="left"
|
|
|
>
|
|
>
|
|
|
<div
|
|
<div
|
|
|
- v-if="leftShow && activeShopId && activeShopId != -1"
|
|
|
|
|
|
|
+ v-if="leftShow && activeShopId && !isMobileView && activeShopId != -1"
|
|
|
class="circle-rectangle"
|
|
class="circle-rectangle"
|
|
|
:class="{ 'shape-shadow': shadow }"
|
|
:class="{ 'shape-shadow': shadow }"
|
|
|
@mouseover="shadowAdd"
|
|
@mouseover="shadowAdd"
|
|
@@ -135,6 +148,7 @@
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
|
|
|
|
|
<ConfigDialog
|
|
<ConfigDialog
|
|
|
|
|
+ v-if="!isMobileView"
|
|
|
ref="configDrawer"
|
|
ref="configDrawer"
|
|
|
@on-close="onClose"
|
|
@on-close="onClose"
|
|
|
@transformer-change="transformChange"
|
|
@transformer-change="transformChange"
|
|
@@ -154,7 +168,7 @@
|
|
|
import ConfigDialog from './component/ConfigDrawer.vue';
|
|
import ConfigDialog from './component/ConfigDrawer.vue';
|
|
|
import ConfigFinish from './component/ConfigFinish.vue';
|
|
import ConfigFinish from './component/ConfigFinish.vue';
|
|
|
import { storeToRefs } from 'pinia';
|
|
import { storeToRefs } from 'pinia';
|
|
|
- import { ElMessage, ElInput } from 'element-plus';
|
|
|
|
|
|
|
+ import { ElMessage, ElInput, ElSwitch } from 'element-plus';
|
|
|
import { onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
|
import { onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
|
|
import { WorkShopInfoItem } from '@/api/scene/scene';
|
|
import { WorkShopInfoItem } from '@/api/scene/scene';
|
|
|
import { computed } from 'vue';
|
|
import { computed } from 'vue';
|
|
@@ -185,6 +199,9 @@
|
|
|
// 是否已有背景图
|
|
// 是否已有背景图
|
|
|
const hasBg = ref(false);
|
|
const hasBg = ref(false);
|
|
|
|
|
|
|
|
|
|
+ // 是否开启移动端视图
|
|
|
|
|
+ const isMobileView = ref(false);
|
|
|
|
|
+
|
|
|
const handleBeforeUpload = (rawFile) => {
|
|
const handleBeforeUpload = (rawFile) => {
|
|
|
if (!selectedCompany.value || !label.value) {
|
|
if (!selectedCompany.value || !label.value) {
|
|
|
ElMessage.error({
|
|
ElMessage.error({
|
|
@@ -261,6 +278,15 @@
|
|
|
addBg();
|
|
addBg();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ const labelMouduleCode = computed(() => {
|
|
|
|
|
+ return (
|
|
|
|
|
+ scenesInfos.value
|
|
|
|
|
+ .find((item) => item.id === selectedCompany.value)
|
|
|
|
|
+ ?.labelModuleList.find((item) => item.sceneLabel.id === label.value)?.sceneModule.code ||
|
|
|
|
|
+ 'default'
|
|
|
|
|
+ );
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
const changeShop = () => {
|
|
const changeShop = () => {
|
|
|
hasBg.value = false;
|
|
hasBg.value = false;
|
|
|
resetMap();
|
|
resetMap();
|