|
|
@@ -43,7 +43,7 @@
|
|
|
<span class="oper-span" v-if="pagging.state.query.searchType != '1'" v-pdpath="['copy']" @click="copySceneHandler(row)">
|
|
|
复制
|
|
|
</span>
|
|
|
- <span class="oper-span" v-pdpath="['edit']" @click="openSceneUrl(row, OpenType.edit)">
|
|
|
+ <span class="oper-span" v-pdpath="['edit']" @click="openSceneEdit(row, 0)">
|
|
|
编辑
|
|
|
</span>
|
|
|
<span v-pdpath="['gen']" v-if="pagging.state.query.searchType != '1'" class="oper-span" @click="genMeshScene(row)">
|
|
|
@@ -75,12 +75,13 @@ import {
|
|
|
} from "@/store/scene";
|
|
|
import { ScenePagging } from "./pagging";
|
|
|
import { QuoteSceneStatusDesc } from "@/constant/scene";
|
|
|
-import { OpenType, openSceneUrl } from "../../case/help";
|
|
|
+import { OpenType, openSceneUrl } from "@/view/case/help";
|
|
|
import { confirm } from "@/helper/message";
|
|
|
import { sceneDownload } from "./quisk";
|
|
|
import { sceneShare as openSceneShare } from "@/view/case/quisk";
|
|
|
import { downSceneHash } from "@/request";
|
|
|
import { SceneTypeDesc } from '@/constant/scene';
|
|
|
+import { transformSWToken } from "@/store/user";
|
|
|
|
|
|
const props = defineProps<{ pagging: ScenePagging }>();
|
|
|
const delSceneHandler = async (scene: QuoteScene) => {
|
|
|
@@ -100,6 +101,14 @@ const sceneDownloadHandler = (scene: QuoteScene) => {
|
|
|
sceneDownload({ scene });
|
|
|
};
|
|
|
|
|
|
+const openSceneEdit = async (scene: QuoteScene, type: any) => {
|
|
|
+ const token = await transformSWToken(scene, type);
|
|
|
+ if (!token) return;
|
|
|
+ const isTest = window.location.host.includes("localhost") || window.location.host.includes("test");
|
|
|
+ const base = isTest ? "https://test.4dkankan.com" : "https://4dkankan.com";
|
|
|
+ window.open(`${base}/epg.html?m=${scene.num}&token=${token}`, "_blank");
|
|
|
+};
|
|
|
+
|
|
|
// 权限弹窗:与 mesh 列表一致,传入 num 与 isObj
|
|
|
const openSceneShareDialog = async (scene: QuoteScene) => {
|
|
|
const isObj = (scene as any).isObj ?? Number(![SceneType.SWSS, SceneType.SWYDSS].includes(scene.type as any));
|