|
@@ -46,7 +46,11 @@
|
|
|
<el-button :icon="Refresh" :disabled="!hasBg"> 替换照片 </el-button>
|
|
<el-button :icon="Refresh" :disabled="!hasBg"> 替换照片 </el-button>
|
|
|
</el-upload>
|
|
</el-upload>
|
|
|
|
|
|
|
|
- <el-button @click="handleSave" style="margin-left: 40px" type="primary" :disabled="isSave"
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ @click="handleSave"
|
|
|
|
|
+ style="margin-left: 40px"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ :disabled="!isSave"
|
|
|
>保存为布局
|
|
>保存为布局
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</div>
|
|
</div>
|
|
@@ -166,7 +170,7 @@
|
|
|
const hasBg = ref(false);
|
|
const hasBg = ref(false);
|
|
|
|
|
|
|
|
//是否能够保存
|
|
//是否能够保存
|
|
|
- const isSave = computed(() => !(selectedShopCode.value && hasBg.value));
|
|
|
|
|
|
|
+ const isSave = computed(() => selectedShopCode.value && hasBg.value);
|
|
|
|
|
|
|
|
//单个相机时是否上传图片
|
|
//单个相机时是否上传图片
|
|
|
const isUploadBg = ref<boolean>(true);
|
|
const isUploadBg = ref<boolean>(true);
|
|
@@ -273,6 +277,11 @@
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const handleAddCamera = (cameraId: string) => {
|
|
const handleAddCamera = (cameraId: string) => {
|
|
|
|
|
+ if (isAddedCamera(cameraId)) {
|
|
|
|
|
+ const camera = konvaMap.value.findCamera(cameraId);
|
|
|
|
|
+ konvaMap.value.handleCameraClick(camera);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
if (!hasBg.value) {
|
|
if (!hasBg.value) {
|
|
|
ElMessage.warning({
|
|
ElMessage.warning({
|
|
|
message: '请先添加背景图片',
|
|
message: '请先添加背景图片',
|
|
@@ -309,7 +318,7 @@
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
onBeforeRouteLeave(async () => {
|
|
onBeforeRouteLeave(async () => {
|
|
|
- if (!isSave.value) {
|
|
|
|
|
|
|
+ if (isSave.value) {
|
|
|
await ElMessageBox.confirm('是否保存当前修改?', '提示', {
|
|
await ElMessageBox.confirm('是否保存当前修改?', '提示', {
|
|
|
confirmButtonText: '是',
|
|
confirmButtonText: '是',
|
|
|
cancelButtonText: '否',
|
|
cancelButtonText: '否',
|
|
@@ -399,7 +408,7 @@
|
|
|
}
|
|
}
|
|
|
.isAdded {
|
|
.isAdded {
|
|
|
color: #1890ff;
|
|
color: #1890ff;
|
|
|
- cursor: not-allowed;
|
|
|
|
|
|
|
+ //cursor: not-allowed;
|
|
|
}
|
|
}
|
|
|
.isActive {
|
|
.isActive {
|
|
|
background-color: #e6f7ff;
|
|
background-color: #e6f7ff;
|