Browse Source

fix: 修改bug

bill 1 year ago
parent
commit
b90056730d

+ 3 - 1
src/components/dialog/index.vue

@@ -34,9 +34,11 @@ const props = withDefaults(defineProps<DialogProps>(), {
   show: false,
   hideFloor: false,
   showClose: true,
+  notSubmit: false,
   enterText: "保 存",
 });
 
+
 const emit = defineEmits<{
   (e: "update:show", show: boolean): void;
   (e: "quit"): void;
@@ -58,7 +60,7 @@ const deleteHandle = () => {
   emit("delete");
 };
 
-if (!showFloor.value) {
+if (!showFloor.value && !props.notSubmit) {
   nextTick(() => enterHandle());
 }
 

+ 2 - 0
src/components/dialog/type.ts

@@ -2,6 +2,7 @@ export type DialogProps = {
   show?: boolean;
   title: string;
   hideFloor?: boolean;
+  notSubmit?: boolean,
   enterText?: string;
   width?: number;
   power?: string;
@@ -14,6 +15,7 @@ export const dialogPropsKeys: (keyof DialogProps)[] = [
   "show",
   "title",
   "hideFloor",
+  "notSubmit",
   "enterText",
   "width",
   "power",

+ 2 - 0
src/helper/mount.ts

@@ -104,6 +104,7 @@ export const quiskMountFactory =
           } else {
             resolve(false as any);
           }
+          console.error('?')
           destroy();
         },
         onSubmit: async () => {
@@ -113,6 +114,7 @@ export const quiskMountFactory =
           } else {
             resolve(true as any);
           }
+          console.error('?')
           destroy();
         },
       };

+ 1 - 1
src/view/case/draw/board/editCAD/Renderer/Draw.js

@@ -1095,7 +1095,7 @@ export default class Draw {
 
         this.context.save()
         this.context.font = 12*coordinate.ratio+`px Microsoft YaHei`
-        let value = '角度:'+geometry.angle
+        let value = '角度:'+geometry.angle + '°';
         let fontWidth = this.context.measureText(value).width
         this.context.fillText(value, (geometry.center.x*coordinate.ratio-fontWidth/5), (geometry.center.y+70)*coordinate.ratio)
         this.context.restore()

+ 2 - 0
src/view/case/draw/edit-shape/compass.vue

@@ -3,6 +3,7 @@
     <el-slider
       style="width: 100px"
       :model-value="value"
+      :format-tooltip="val => `${val}°`"
       @update:model-value="val => setRotate(val as number, false)"
       :min="0"
       @change="() => setRotate(value as number, true)"
@@ -18,6 +19,7 @@ import { ElSlider } from "element-plus";
 const props = defineProps<{ shape: BoardShape }>();
 const emit = defineEmits<{ (e: "blur"): void }>();
 const value = ref<number>(props.shape.data.rotate);
+console.log(props.shape)
 const setRotate = (edg: number, save: boolean) => {
   value.value = edg;
   props.shape.setRotate(edg, save);

+ 2 - 1
src/view/case/draw/index.vue

@@ -124,7 +124,7 @@ const saveHandler = async () => {
   const body: SaveCaseFileImageInfo = {
     caseId: args.caseId,
     imgType: args.type,
-    file: new File([blob], `${args.type}_${args.fileId}.png`),
+    file: new File([blob], `${args.type}_${args.fileId}.jpg`),
     filesTitle: titleShape?.text || `${args.caseId}_${BoardTypeDesc[args.type]}`,
     content: store,
   };
@@ -132,6 +132,7 @@ const saveHandler = async () => {
   args.inAdd || (body.filesId = props.value!.fileId);
 
   const data = await saveCaseFileImageInfo(body);
+  console.log(body)
   if (args.inAdd) {
     router.replace({
       name: RouteName.drawCaseFile,

+ 1 - 0
src/view/case/quisk.ts

@@ -33,6 +33,7 @@ export const editEshapeTable = (
 export const showCaseScenes = quiskMountFactory(SceneList, {
   title: "案件场景管理",
   width: 900,
+  notSubmit: true,
   hideFloor: true,
 });