Parcourir la source

feat: 去抖动前端完善2

WANGKANG il y a 9 mois
Parent
commit
55fa732840

+ 0 - 1
src/api/modules/demo/videoStable.ts

@@ -1,5 +1,4 @@
 import http from '@/api'
-// @ts-expect-error
 import { VideoStableVO, VideoStableForm, VideoStableQuery } from '@/api/interface/demo/videoStable'
 
 /**

+ 7 - 2
src/components/ProForm/index.vue

@@ -25,11 +25,16 @@
               <SelectIcon v-model:icon-value="formModel[item.prop]" />
             </template>
             <template v-else-if="item.compOptions.elTagName === 'file-upload'">
-              <FileUpload v-model:model-value="formModel[item.prop]" v-bind="$attrs" />
+              <FileUpload
+                v-model:model-value="formModel[item.prop]"
+                :file-size="item.compOptions.fileSize"
+                :file-type="item.compOptions.fileType"
+                v-bind="$attrs"
+              />
             </template>
             <template v-else-if="item.compOptions.elTagName === 'img-upload'">
               <uploadImg v-model:image-url="formModel[item.prop]" />
-<!--              <el-button @click="() => {console.log(formModel[item.prop])}"/>-->
+              <!--              <el-button @click="() => {console.log(formModel[item.prop])}"/>-->
             </template>
 
             <template v-else-if="item.compOptions.elTagName === 'imgs-upload'">

+ 1 - 1
src/components/Upload/File.vue

@@ -65,7 +65,7 @@ interface UploadFileProps {
   text?: string // 按钮文字
   icon?: string
   fileType?: Array<string>
-  uploadApiPath: string // 上传文件服务器地址
+  uploadApiPath?: string // 上传文件服务器地址
 }
 
 // 默认值

+ 2 - 0
src/typings/ProForm.d.ts

@@ -101,6 +101,8 @@ declare namespace ProForm {
     multiple?: boolean
     disabled?: boolean
     elTagName?: ElTagName
+    fileSize?: number // 文件大小
+    fileType?: string[] // 文件类型
     type?: string
     rangeSeparator?: string // 时间范围分隔符
     startPlaceholder?: string // 开始时间Placeholder

+ 77 - 52
src/views/demo/videoStable/index.vue

@@ -212,22 +212,6 @@ const columns = reactive<ColumnProps<any>[]>([
     tag: true,
     enum: statusEnums
   },
-  {
-    prop: 'inPath',
-    label: '输入图片集路径',
-    search: {
-      el: 'input'
-    },
-    width: 120
-  },
-  {
-    prop: 'outPath',
-    label: '去抖动的图片集路径',
-    search: {
-      el: 'input'
-    },
-    width: 120
-  },
   {
     prop: 'startTime',
     label: '开始时间',
@@ -268,6 +252,56 @@ const columns = reactive<ColumnProps<any>[]>([
     },
     width: 120
   },
+
+  {
+    prop: 'block_size',
+    label: 'block_size',
+    search: {
+      el: 'input'
+    },
+    width: 120
+  },
+  {
+    prop: 'radius',
+    label: 'radius',
+    search: {
+      el: 'input'
+    },
+    width: 120
+  },
+  {
+    prop: 'cornerquality',
+    label: 'cornerquality',
+    search: {
+      el: 'input'
+    },
+    width: 130
+  },
+  {
+    prop: 'cornerminDistance',
+    label: 'cornerminDistance',
+    search: {
+      el: 'input'
+    },
+    width: 180
+  },
+  {
+    prop: 'lklevel',
+    label: 'lklevel',
+    search: {
+      el: 'input'
+    },
+    width: 120
+  },
+  {
+    prop: 'lkwinSiz',
+    label: 'lkwinSiz',
+    search: {
+      el: 'input'
+    },
+    width: 120
+  },
+
   {
     prop: 'remarks',
     label: '备注',
@@ -296,37 +330,14 @@ const setItemsOptions = () => {
       }
     },
     {
-      label: '输入路径',
-      prop: 'inPath',
-      rules: [{ required: true, message: '输入图片集路径不能为空', trigger: 'blur' }],
-      compOptions: {
-        type: 'block_size',
-        clearable: true,
-        placeholder: '请输入内容'
-      }
-    },
-    {
-      label: '输出路径',
-      prop: 'outPath',
-      rules: [{ required: true, message: '去抖动的图片集路径不能为空', trigger: 'blur' }],
-      compOptions: {
-        type: 'block_size',
-        clearable: true,
-        placeholder: '请输入内容'
-      }
-    },
-    {
-      label: '备注',
-      prop: 'remarks',
-      rules: [
-        {
-          required: false,
-          message: '备注不能为空',
-          trigger: 'blur'
-        }
-      ],
+      label: '图片集压缩包',
+      prop: 'inputOssId',
+      rules: [{ required: true, message: '图片集压缩包不能为空', trigger: 'blur' }],
       compOptions: {
-        placeholder: '请输入备注'
+        elTagName: 'file-upload',
+        fileSize: 4096,
+        fileType: ['zip'],
+        placeholder: '请输入视频名称'
       }
     },
     {
@@ -345,7 +356,7 @@ const setItemsOptions = () => {
       prop: 'radius',
       rules: [{ required: true, message: 'radius不能为空', trigger: 'blur' }],
       compOptions: {
-        type: 'block_size',
+        type: 'input',
         clearable: true,
         placeholder: '请输入内容',
         value: 500
@@ -356,7 +367,7 @@ const setItemsOptions = () => {
       prop: 'buffer_size',
       rules: [{ required: true, message: 'buffer_size不能为空', trigger: 'blur' }],
       compOptions: {
-        type: 'block_size',
+        type: 'input',
         clearable: true,
         placeholder: '请输入内容',
         value: 200
@@ -367,7 +378,7 @@ const setItemsOptions = () => {
       prop: 'cornerquality',
       rules: [{ required: true, message: 'cornerquality不能为空', trigger: 'blur' }],
       compOptions: {
-        type: 'block_size',
+        type: 'input',
         clearable: true,
         placeholder: '请输入内容',
         value: 0.2
@@ -378,7 +389,7 @@ const setItemsOptions = () => {
       prop: 'cornerminDistance',
       rules: [{ required: true, message: 'cornerminDistance不能为空', trigger: 'blur' }],
       compOptions: {
-        type: 'block_size',
+        type: 'input',
         clearable: true,
         placeholder: '请输入内容',
         value: 5
@@ -389,7 +400,7 @@ const setItemsOptions = () => {
       prop: 'lklevel',
       rules: [{ required: true, message: 'lklevel不能为空', trigger: 'blur' }],
       compOptions: {
-        type: 'block_size',
+        type: 'input',
         clearable: true,
         placeholder: '请输入内容',
         value: 3
@@ -400,11 +411,25 @@ const setItemsOptions = () => {
       prop: 'lkwinSiz',
       rules: [{ required: true, message: 'lkwinSiz不能为空', trigger: 'blur' }],
       compOptions: {
-        type: 'block_size',
+        type: 'input',
         clearable: true,
         placeholder: '请输入内容',
         value: 15
       }
+    },
+    {
+      label: '备注',
+      prop: 'remarks',
+      rules: [
+        {
+          required: false,
+          message: '备注不能为空',
+          trigger: 'blur'
+        }
+      ],
+      compOptions: {
+        placeholder: '请输入备注'
+      }
     }
   ]
 }