|
@@ -108,6 +108,7 @@ const addCaseFileHandler = async () => {
|
|
|
};
|
|
|
function refresh() {
|
|
|
console.log("changeList", childRef.value);
|
|
|
+
|
|
|
if (childRef.value) {
|
|
|
childRef.value.getList();
|
|
|
}
|
|
@@ -127,13 +128,21 @@ const changeList = async (list) => {
|
|
|
newlist.value = newList;
|
|
|
const arr = [];
|
|
|
newList.map((i) => arr.push(JSON.parse(JSON.stringify(i))));
|
|
|
- const type = sortType.value ? 2 : 1;
|
|
|
|
|
|
if (!loadedDrawData.value) {
|
|
|
const res = await getCaseImgTagData(caseId.value);
|
|
|
- loadedDrawData.value = res.data ? res.data.data || [] : [];
|
|
|
+ if (res.data) {
|
|
|
+ if (res.data.data) {
|
|
|
+ loadedDrawData.value = res.data.data;
|
|
|
+ }
|
|
|
+ if ("isHorizontal" in res.data) {
|
|
|
+ sortType.value = !res.data.isHorizontal;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ loadedDrawData.value = [];
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
+ let type = sortType.value ? 2 : 1;
|
|
|
if (scene) {
|
|
|
scene.load(arr, type, loadedDrawData.value || []);
|
|
|
console.log("changeList", arr, type, loadedDrawData.value);
|