|
@@ -78,7 +78,7 @@ import { Swiper, SwiperSlide } from "swiper/vue";
|
|
|
import "swiper/css";
|
|
|
// import { addCaseFile } from "@/store/caseFile";
|
|
|
import { addCaseImgFile } from "../quisk";
|
|
|
-import { saveCaseImgTagData } from "@/store/case";
|
|
|
+import { saveCaseImgTagData, getCaseImgTagData } from "@/store/case";
|
|
|
import Scene from "@/core/Scene.js";
|
|
|
import draggable from "./draggable.vue";
|
|
|
const props = defineProps({ caseId: Number });
|
|
@@ -111,7 +111,7 @@ function refresh() {
|
|
|
childRef.value.getList();
|
|
|
}
|
|
|
}
|
|
|
-const changeList = (list) => {
|
|
|
+const changeList = async (list) => {
|
|
|
let newList = [];
|
|
|
list.map((item, index) => {
|
|
|
if (sortType.value) {
|
|
@@ -127,14 +127,17 @@ const changeList = (list) => {
|
|
|
const arr = [];
|
|
|
newList.map((i) => arr.push(JSON.parse(JSON.stringify(i))));
|
|
|
const type = sortType.value ? 2 : 1;
|
|
|
+ const res = await getCaseImgTagData(caseId.value);
|
|
|
+
|
|
|
if (scene) {
|
|
|
- scene.load(arr, type);
|
|
|
- console.log("changeList", arr, type);
|
|
|
+ scene.load(arr, type, res.data.data || []);
|
|
|
+ console.log("changeList", arr, type, res.data.data);
|
|
|
}
|
|
|
};
|
|
|
const renderCanvas = () => {
|
|
|
const canvas = document.getElementById("canvas");
|
|
|
// console.log(canvas)
|
|
|
+
|
|
|
scene = new Scene(canvas);
|
|
|
scene.init();
|
|
|
window.scene = scene;
|