tangning 3 дней назад
Родитель
Сommit
6d49ca0c9d
4 измененных файлов с 11 добавлено и 5 удалено
  1. 1 1
      package.json
  2. 0 2
      src/store/case.ts
  3. 5 0
      src/view/case/newphotos/index.vue
  4. 5 2
      src/view/newFireCase/newFireDetails/photoEdit.vue

+ 1 - 1
package.json

@@ -4,7 +4,7 @@
   "version": "0.0.0",
   "version": "0.0.0",
   "type": "module",
   "type": "module",
   "scripts": {
   "scripts": {
-    "dev": "vite --mode=criminal",
+    "dev": "vite --mode=fire",
     "devxm": "vite --mode=xmfire",
     "devxm": "vite --mode=xmfire",
     "devcjz": "vite --mode=cjzfire",
     "devcjz": "vite --mode=cjzfire",
     "dev-offline": "vite --mode=offline",
     "dev-offline": "vite --mode=offline",

+ 0 - 2
src/store/case.ts

@@ -207,9 +207,7 @@ export const saveCaseImgTagData = (params: any) =>
 // 获取照片卷标注信息:支持按案件ID与可选的图片ID查询
 // 获取照片卷标注信息:支持按案件ID与可选的图片ID查询
 export const getCaseImgTagData = async (caseId: number, imgId?: number) => {
 export const getCaseImgTagData = async (caseId: number, imgId?: number) => {
   let res = await axios.get(getCaseImgTag, { params: { caseId, imgId } });
   let res = await axios.get(getCaseImgTag, { params: { caseId, imgId } });
-  console.log("getCaseImgTagData11", res);
   res.data = res.data[0];
   res.data = res.data[0];
-  console.log("getCaseImgTagData22", res);
   return res
   return res
 
 
 }
 }

+ 5 - 0
src/view/case/newphotos/index.vue

@@ -85,6 +85,8 @@ import saveAs from "@/util/file-serve";
 import { ElMessage, ElMessageBox } from "element-plus";
 import { ElMessage, ElMessageBox } from "element-plus";
 
 
 const props = defineProps({ caseId: Number, title: String });
 const props = defineProps({ caseId: Number, title: String });
+const emit = defineEmits(["change"]);
+
 const route = useRoute();
 const route = useRoute();
 const vueRouter = useRouter();
 const vueRouter = useRouter();
 
 
@@ -154,6 +156,7 @@ const changeList = async (list) => {
       if (res.data && imgId) {
       if (res.data && imgId) {
         loadedDrawData.value = res.data?.data;
         loadedDrawData.value = res.data?.data;
       }
       }
+      console.log("getCaseImgTagData111", res.data);
       if ("isHorizontal" in res.data) {
       if ("isHorizontal" in res.data) {
         // console.error("sortType.value", sortType.value, !res.data.isHorizontal);
         // console.error("sortType.value", sortType.value, !res.data.isHorizontal);
         sortType.value = !res.data.isHorizontal;
         sortType.value = !res.data.isHorizontal;
@@ -344,6 +347,7 @@ const handleSwitchGrid = async () => {
   );
   );
   if (res) {
   if (res) {
     sortType.value = !sortType.value;
     sortType.value = !sortType.value;
+    emit("change", !sortType.value);
     window.scene.setMode(0);
     window.scene.setMode(0);
     window.scene.clearScene();
     window.scene.clearScene();
     handleClear();
     handleClear();
@@ -397,6 +401,7 @@ const handleSave = async () => {
 };
 };
 
 
 const handleAutoSave = async (id) => {
 const handleAutoSave = async (id) => {
+  alert("handleAutoSave");
   if (window.scene) {
   if (window.scene) {
     const data = scene.player.getDrawData();
     const data = scene.player.getDrawData();
     scene.player.syncDrawData();
     scene.player.syncDrawData();

+ 5 - 2
src/view/newFireCase/newFireDetails/photoEdit.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <div v-if="visible" class="photo-edit">
   <div v-if="visible" class="photo-edit">
     <!-- 复用案件照片编纂组件 -->
     <!-- 复用案件照片编纂组件 -->
-    <Photos :caseId="caseId" :title="title" />
+    <Photos :caseId="caseId" :title="title" @change="handleModle" />
   </div>
   </div>
 </template>
 </template>
 
 
@@ -26,16 +26,19 @@ const imgId = computed(() => {
 const tagId = ref<number | undefined>(undefined);
 const tagId = ref<number | undefined>(undefined);
 const isHorizontal = ref<boolean>(true);
 const isHorizontal = ref<boolean>(true);
 
 
+const handleModle = (val: any) => {
+  isHorizontal.value = val
+}
 const loadTagInfo = async () => {
 const loadTagInfo = async () => {
   if (!caseId.value) return;
   if (!caseId.value) return;
   try {
   try {
     const res: any = await getCaseImgTagData(caseId.value!, imgId.value);
     const res: any = await getCaseImgTagData(caseId.value!, imgId.value);
     const data = res.data || {};
     const data = res.data || {};
-    console.log("getCaseImgTagData3", res, data);
     tagId.value = (data?.id as number) || undefined;
     tagId.value = (data?.id as number) || undefined;
     if (typeof data?.isHorizontal === 'boolean') {
     if (typeof data?.isHorizontal === 'boolean') {
       isHorizontal.value = data.isHorizontal as boolean;
       isHorizontal.value = data.isHorizontal as boolean;
     }
     }
+    console.log("getCaseImgTagData3", res, data, isHorizontal.value);
   } catch (e) {
   } catch (e) {
     // 不影响编辑,仅用于获取初始 id/isHorizontal
     // 不影响编辑,仅用于获取初始 id/isHorizontal
     console.warn('获取照片卷标签信息失败', e);
     console.warn('获取照片卷标签信息失败', e);