Browse Source

Merge branch 'tl' of www/taais-web into develop

www 4 months ago
parent
commit
47bc38f8c7

+ 2 - 2
src/api/modules/demo/dataAugmentation.ts

@@ -5,8 +5,8 @@ import { DataAugmentationVO, DataAugmentationForm, DataAugmentationQuery } from
  * @name 查询任务字典数据
  * @returns 返回列表
  */
-export const getTaskDictData = () => {
-  return http.get<any>('/demo/dataAugmentation/getTaskDictData', { loading: true })
+export const getTaskDictData = module => {
+  return http.post<any>('/demo/dataAugmentation/getTaskDictData', module, { loading: true })
 }
 /**
  * @name 查询视频去抖动列表

+ 18 - 18
src/components/DataAugmentationFormDialog/index.vue

@@ -132,24 +132,24 @@ const handleSubmit = () => {
         // data = { ...formModel, ...parameter.value.model }
         data = mergeWithCondition(formModel, parameter.value.model)
       }
-      let excludedKeys = ['name', 'taskType', 'inputOssId', 'remarks', 'modelAddress', 'yolo_model', 'tracking_method']
-      for (let key in data) {
-        if (data.hasOwnProperty(key) && !excludedKeys.includes(key)) {
-          if (!isFloat(data[key])) {
-            ElMessage.error(key + '参数设置不合理!')
-            butLoading.value = false
-            return
-          } else {
-            let num = parseFloat(data[key])
-            if (key == 's_v' && Number.isInteger(num) && num % 2 == 0) {
-              ElMessage.error(key + '参数只能为奇数!')
-              butLoading.value = false
-              return
-            }
-          }
-        }
-      }
-      excludedKeys = ['name', 'taskType', 'inputOssId', 'remarks', 'modelAddress']
+      // let excludedKeys = ['name', 'taskType', 'inputOssId', 'remarks', 'modelAddress', 'yolo_model', 'tracking_method']
+      // for (let key in data) {
+      //   if (data.hasOwnProperty(key) && !excludedKeys.includes(key)) {
+      //     if (!isFloat(data[key])) {
+      //       ElMessage.error(key + '参数设置不合理!')
+      //       butLoading.value = false
+      //       return
+      //     } else {
+      //       let num = parseFloat(data[key])
+      //       if (key == 's_v' && Number.isInteger(num) && num % 2 == 0) {
+      //         ElMessage.error(key + '参数只能为奇数!')
+      //         butLoading.value = false
+      //         return
+      //       }
+      //     }
+      //   }
+      // }
+      let excludedKeys = ['name', 'taskType', 'inputOssId', 'remarks', 'modelAddress']
       // 使用 Object.fromEntries 从指定的键值对创建新的对象
       let hyperparameters = Object.fromEntries(Object.entries(data).filter(([key, _]) => !excludedKeys.includes(key)))
       // 将 hyperparameters 对象转换为 JSON 字符串

+ 15 - 0
src/components/ProForm/index.scss

@@ -0,0 +1,15 @@
+.label-span {
+  display: inline-block;
+  max-width: 150px;
+
+  /* 防止文本换行 */
+  overflow: hidden;
+
+  /* 超出部分隐藏 */
+  text-overflow: ellipsis;
+
+  /* 你可以根据需求调整这个宽度 */
+  white-space: nowrap;
+
+  /* 超出部分用省略号表示 */
+}

+ 171 - 160
src/views/demo/dataAugmentation/index.vue

@@ -124,8 +124,8 @@ import {
   getCompareImageApiNew
 } from '@/api/modules/demo/dataAugmentation'
 // import {  } from '@/api/modules/system/dictData'
-import { S } from 'vite/dist/node/types.d-aGj9QkWt'
-import { servicesVersion } from 'typescript'
+// import { S } from 'vite/dist/node/types.d-aGj9QkWt'
+// import { servicesVersion } from 'typescript'
 
 const previewCompareImagesRef = ref()
 const preview = async row => {
@@ -183,32 +183,27 @@ const openLogDialog = async (id: string | number) => {
   logDialogVisible.value = true
 }
 const getTaskType = async () => {
-  const res: any = await getTaskDictData()
+  const res: any = await getTaskDictData('数据增强')
+  console.log(res.data)
   if (res.data.length != 0) {
     taskType.value = res.data
       .map(item => {
-        if (item.taskType === '图像逆光' || item.taskType === '图像增强') {
-          return {
-            label: item.taskType,
-            value: item.taskType
-          }
-        } else {
-          return null
+        return {
+          label: item.taskType,
+          value: item.taskType
         }
       })
       .filter(item => item !== null)
     res.data.forEach(item => {
-      if (item.taskType === '图像增强' || item.taskType === '图像逆光') {
-        taskTypeEnums.push({
-          label: item.taskType,
-          value: item.taskType,
-          disabled: false,
-          tagType: 'default'
-        })
-        let obj = {}
-        obj[item.taskType] = item.hyperparameterConfiguration
-        hyperparameterConfiguration.push(obj)
-      }
+      taskTypeEnums.push({
+        label: item.taskType,
+        value: item.taskType,
+        disabled: false,
+        tagType: 'default'
+      })
+      let obj = {}
+      obj[item.taskType] = item.hyperparameterConfiguration
+      hyperparameterConfiguration.push(obj)
     })
   }
 }
@@ -553,148 +548,164 @@ const addParams = params => {
   }
   let validJsonString = params.replace(/'/g, '"')
   try {
-    const obj: { [key: string]: number } = JSON.parse(validJsonString)
-    Object.keys(obj).forEach(key => {
-      model.value[key] = obj[key]
-      if (key === 'ratio_mix' || key === 'alpha') {
-        itemsOptions.push({
-          label: key,
-          prop: key,
-          rules: [
-            {
-              trigger: 'change',
-              validator: (rule, value, callback) => {
-                if (value === '' || value === undefined) {
-                  return callback()
-                }
-                if (!value) {
-                  return callback(new Error('请输入一个0到1之间的浮点数'))
-                }
-                const regex = /^(0(\.\d+)?|1(\.0+)?)$/
-                if (!regex.test(value)) {
-                  return callback(new Error('请输入一个0到1之间的浮点数'))
-                }
-                callback()
-              }
-            }
-          ],
-          compOptions: {
-            type: 'input',
-            clearable: true,
-            placeholder: '默认值为' + obj[key]
-          }
-        })
-      } else if (key === 'light') {
-        itemsOptions.push({
-          label: key,
-          prop: key,
-          rules: [
-            {
-              trigger: 'change',
-              validator: (rule, value, callback) => {
-                if (value === '' || value === undefined) {
-                  return callback()
-                }
-                const minValue = 40
-                const maxValue = 60
+    const obj = JSON.parse(validJsonString)
+    obj.forEach(param => {
+      model.value[param.agName] = param.defaultValue
+      itemsOptions.push({
+        // hideLabelSuffix: false,
+        label: param.name,
+        tooltip: param.prompt,
+        prop: param.agName,
+        rules: [],
+        compOptions: {
+          type: 'input',
+          clearable: true,
+          placeholder: '默认值为' + param.defaultValue
+        }
+      })
+    })
+    //console.log(obj)
+    // Object.keys(obj).forEach(key => {
+    //   model.value[key] = obj[key]
+    //   if (key === 'ratio_mix' || key === 'alpha') {
+    //     itemsOptions.push({
+    //       label: key,
+    //       prop: key,
+    //       rules: [
+    //         {
+    //           trigger: 'change',
+    //           validator: (rule, value, callback) => {
+    //             if (value === '' || value === undefined) {
+    //               return callback()
+    //             }
+    //             if (!value) {
+    //               return callback(new Error('请输入一个0到1之间的浮点数'))
+    //             }
+    //             const regex = /^(0(\.\d+)?|1(\.0+)?)$/
+    //             if (!regex.test(value)) {
+    //               return callback(new Error('请输入一个0到1之间的浮点数'))
+    //             }
+    //             callback()
+    //           }
+    //         }
+    //       ],
+    //       compOptions: {
+    //         type: 'input',
+    //         clearable: true,
+    //         placeholder: '默认值为' + obj[key]
+    //       }
+    //     })
+    //   } else if (key === 'light') {
+    //     itemsOptions.push({
+    //       label: key,
+    //       prop: key,
+    //       rules: [
+    //         {
+    //           trigger: 'change',
+    //           validator: (rule, value, callback) => {
+    //             if (value === '' || value === undefined) {
+    //               return callback()
+    //             }
+    //             const minValue = 40
+    //             const maxValue = 60
 
-                const intValue = parseInt(value, 10)
-                if (isNaN(intValue) || intValue < minValue || intValue > maxValue) {
-                  return callback(new Error('请输入一个40到60之间的整数'))
-                }
-                callback()
-              }
-            }
-          ],
-          compOptions: {
-            type: 'input',
-            clearable: true,
-            placeholder: '默认值为' + obj[key]
-          }
-        })
-      } else if (key === 'beta') {
-        itemsOptions.push({
-          label: key,
-          prop: key,
-          rules: [
-            {
-              trigger: 'change',
-              validator: (rule, value, callback) => {
-                if (value === '' || value === undefined) {
-                  return callback()
-                }
-                const minValue = -30
-                const maxValue = -10
+    //             const intValue = parseInt(value, 10)
+    //             if (isNaN(intValue) || intValue < minValue || intValue > maxValue) {
+    //               return callback(new Error('请输入一个40到60之间的整数'))
+    //             }
+    //             callback()
+    //           }
+    //         }
+    //       ],
+    //       compOptions: {
+    //         type: 'input',
+    //         clearable: true,
+    //         placeholder: '默认值为' + obj[key]
+    //       }
+    //     })
+    //   } else if (key === 'beta') {
+    //     itemsOptions.push({
+    //       label: key,
+    //       prop: key,
+    //       rules: [
+    //         {
+    //           trigger: 'change',
+    //           validator: (rule, value, callback) => {
+    //             if (value === '' || value === undefined) {
+    //               return callback()
+    //             }
+    //             const minValue = -30
+    //             const maxValue = -10
 
-                const intValue = parseInt(value, 10)
-                if (isNaN(intValue) || intValue < minValue || intValue > maxValue) {
-                  return callback(new Error('请输入一个-30到-10之间的负整数'))
-                }
-                callback()
-              }
-            }
-          ],
-          compOptions: {
-            type: 'input',
-            clearable: true,
-            placeholder: '默认值为' + obj[key]
-          }
-        })
-      } else if (key === 'beta') {
-        itemsOptions.push({
-          label: key,
-          prop: key,
-          rules: [
-            {
-              trigger: 'change',
-              validator: (rule, value, callback) => {
-                if (value === '' || value === undefined) {
-                  return callback()
-                }
-                const minValue = -30
-                const maxValue = -10
+    //             const intValue = parseInt(value, 10)
+    //             if (isNaN(intValue) || intValue < minValue || intValue > maxValue) {
+    //               return callback(new Error('请输入一个-30到-10之间的负整数'))
+    //             }
+    //             callback()
+    //           }
+    //         }
+    //       ],
+    //       compOptions: {
+    //         type: 'input',
+    //         clearable: true,
+    //         placeholder: '默认值为' + obj[key]
+    //       }
+    //     })
+    //   } else if (key === 'beta') {
+    //     itemsOptions.push({
+    //       label: key,
+    //       prop: key,
+    //       rules: [
+    //         {
+    //           trigger: 'change',
+    //           validator: (rule, value, callback) => {
+    //             if (value === '' || value === undefined) {
+    //               return callback()
+    //             }
+    //             const minValue = -30
+    //             const maxValue = -10
 
-                const intValue = parseInt(value, 10)
-                if (isNaN(intValue) || intValue < minValue || intValue > maxValue) {
-                  return callback(new Error('请输入一个-30到-10之间的负整数'))
-                }
-                callback()
-              }
-            }
-          ],
-          compOptions: {
-            type: 'input',
-            clearable: true,
-            placeholder: '默认值为' + obj[key]
-          }
-        })
-      } else if (key === 's_v') {
-        itemsOptions.push({
-          label: key,
-          prop: key,
-          rules: [
-            {
-              trigger: 'change',
-              validator: (rule, value, callback) => {
-                if (value === '' || value === undefined) {
-                  return callback()
-                }
-                const intValue = parseInt(value, 10)
-                if (isNaN(intValue) || intValue <= 0 || intValue % 2 === 0) {
-                  return callback(new Error('请输入一个大于0的奇整数'))
-                }
-                callback()
-              }
-            }
-          ],
-          compOptions: {
-            type: 'input',
-            clearable: true,
-            placeholder: '默认值为' + obj[key]
-          }
-        })
-      }
-    })
+    //             const intValue = parseInt(value, 10)
+    //             if (isNaN(intValue) || intValue < minValue || intValue > maxValue) {
+    //               return callback(new Error('请输入一个-30到-10之间的负整数'))
+    //             }
+    //             callback()
+    //           }
+    //         }
+    //       ],
+    //       compOptions: {
+    //         type: 'input',
+    //         clearable: true,
+    //         placeholder: '默认值为' + obj[key]
+    //       }
+    //     })
+    //   } else if (key === 's_v') {
+    //     itemsOptions.push({
+    //       label: key,
+    //       prop: key,
+    //       rules: [
+    //         {
+    //           trigger: 'change',
+    //           validator: (rule, value, callback) => {
+    //             if (value === '' || value === undefined) {
+    //               return callback()
+    //             }
+    //             const intValue = parseInt(value, 10)
+    //             if (isNaN(intValue) || intValue <= 0 || intValue % 2 === 0) {
+    //               return callback(new Error('请输入一个大于0的奇整数'))
+    //             }
+    //             callback()
+    //           }
+    //         }
+    //       ],
+    //       compOptions: {
+    //         type: 'input',
+    //         clearable: true,
+    //         placeholder: '默认值为' + obj[key]
+    //       }
+    //     })
+    //   }
+    // })
   } catch (error) {
     console.error('解析 JSON 字符串时出错:', error)
   }

+ 24 - 9
src/views/demo/imageMosaic/index.vue

@@ -165,7 +165,7 @@ const openLogDialog = async (id: string | number) => {
   logDialogVisible.value = true
 }
 const getTaskType = async () => {
-  const res: any = await getTaskDictData()
+  const res: any = await getTaskDictData('图像拼接')
   if (res.data.length != 0) {
     taskType.value = res.data
       .map(item => {
@@ -535,21 +535,36 @@ const addParams = params => {
   }
   let validJsonString = params.replace(/'/g, '"')
   try {
-    const obj: { [key: string]: number } = JSON.parse(validJsonString)
-    Object.keys(obj).forEach(key => {
-      model.value[key] = obj[key]
-
+    const obj = JSON.parse(validJsonString)
+    obj.forEach(param => {
+      model.value[param.agName] = param.defaultValue
       itemsOptions.push({
-        label: key,
-        prop: key,
-        rules: [{ trigger: 'blur' }],
+        tooltip: param.prompt,
+        label: param.name,
+        prop: param.agName,
+        rules: [],
         compOptions: {
           type: 'input',
           clearable: true,
-          placeholder: '默认值为' + obj[key]
+          placeholder: '默认值为' + param.defaultValue
         }
       })
     })
+    // const obj: { [key: string]: number } = JSON.parse(validJsonString)
+    // Object.keys(obj).forEach(key => {
+    //   model.value[key] = obj[key]
+
+    //   itemsOptions.push({
+    //     label: key,
+    //     prop: key,
+    //     rules: [{ trigger: 'blur' }],
+    //     compOptions: {
+    //       type: 'input',
+    //       clearable: true,
+    //       placeholder: '默认值为' + obj[key]
+    //     }
+    //   })
+    // })
   } catch (error) {
     console.error('解析 JSON 字符串时出错:', error)
   }

+ 36 - 27
src/views/demo/targetDamageAcess/index.vue

@@ -173,32 +173,26 @@ const openLogDialog = async (id: string | number) => {
   logDialogVisible.value = true
 }
 const getTaskType = async () => {
-  const res: any = await getTaskDictData()
+  const res: any = await getTaskDictData('目标毁伤模块')
   if (res.data.length != 0) {
     taskType.value = res.data
       .map(item => {
-        if (item.taskType === '目标毁伤评估') {
-          return {
-            label: item.taskType,
-            value: item.taskType
-          }
-        } else {
-          return null
+        return {
+          label: item.taskType,
+          value: item.taskType
         }
       })
       .filter(item => item !== null)
     res.data.forEach(item => {
-      if (item.taskType === '目标毁伤评估') {
-        taskTypeEnums.push({
-          label: item.taskType,
-          value: item.taskType,
-          disabled: false,
-          tagType: 'default'
-        })
-        let obj = {}
-        obj[item.taskType] = item.hyperparameterConfiguration
-        hyperparameterConfiguration.push(obj)
-      }
+      taskTypeEnums.push({
+        label: item.taskType,
+        value: item.taskType,
+        disabled: false,
+        tagType: 'default'
+      })
+      let obj = {}
+      obj[item.taskType] = item.hyperparameterConfiguration
+      hyperparameterConfiguration.push(obj)
     })
   }
 }
@@ -542,21 +536,36 @@ const addParams = params => {
   }
   let validJsonString = params.replace(/'/g, '"')
   try {
-    const obj: { [key: string]: number } = JSON.parse(validJsonString)
-    Object.keys(obj).forEach(key => {
-      model.value[key] = obj[key]
-
+    const obj = JSON.parse(validJsonString)
+    obj.forEach(param => {
+      model.value[param.agName] = param.defaultValue
       itemsOptions.push({
-        label: key,
-        prop: key,
-        rules: [{ trigger: 'blur' }],
+        tooltip: param.prompt,
+        label: param.name,
+        prop: param.agName,
+        rules: [],
         compOptions: {
           type: 'input',
           clearable: true,
-          placeholder: '默认值为' + obj[key]
+          placeholder: '默认值为' + param.defaultValue
         }
       })
     })
+    // const obj: { [key: string]: number } = JSON.parse(validJsonString)
+    // Object.keys(obj).forEach(key => {
+    //   model.value[key] = obj[key]
+
+    //   itemsOptions.push({
+    //     label: key,
+    //     prop: key,
+    //     rules: [{ trigger: 'blur' }],
+    //     compOptions: {
+    //       type: 'input',
+    //       clearable: true,
+    //       placeholder: '默认值为' + obj[key]
+    //     }
+    //   })
+    // })
   } catch (error) {
     console.error('解析 JSON 字符串时出错:', error)
   }

+ 113 - 104
src/views/demo/targetTrack/index.vue

@@ -350,32 +350,26 @@ const hyperparameterConfiguration = []
 const viewLogRef = ref()
 
 const getTaskType = async () => {
-  const res: any = await getTaskDictData()
+  const res: any = await getTaskDictData('多目标跟踪')
   if (res.data.length != 0) {
     taskType.value = res.data
       .map(item => {
-        if (item.taskType === '多目标跟踪') {
-          return {
-            label: item.taskType,
-            value: item.taskType
-          }
-        } else {
-          return null
+        return {
+          label: item.taskType,
+          value: item.taskType
         }
       })
       .filter(item => item !== null)
     res.data.forEach(item => {
-      if (item.taskType === '多目标跟踪') {
-        taskTypeEnums.push({
-          label: item.taskType,
-          value: item.taskType,
-          disabled: false,
-          tagType: 'default'
-        })
-        let obj = {}
-        obj[item.taskType] = item.hyperparameterConfiguration
-        hyperparameterConfiguration.push(obj)
-      }
+      taskTypeEnums.push({
+        label: item.taskType,
+        value: item.taskType,
+        disabled: false,
+        tagType: 'default'
+      })
+      let obj = {}
+      obj[item.taskType] = item.hyperparameterConfiguration
+      hyperparameterConfiguration.push(obj)
     })
   }
 }
@@ -647,94 +641,109 @@ const addParams = (params, task_Type) => {
     return
   }
   let validJsonString = params.replace(/'/g, '"')
-  if (task_Type === '多目标跟踪') {
-    itemsOptions.push({
-      label: '模型',
-      prop: 'yolo_model',
-      rules: [{ trigger: 'blur' }],
-      compOptions: {
-        elTagName: 'select',
-        enum: modelType,
-        placeholder: '默认值为' + 'yolov8__best.pt'
-      }
-    })
-    itemsOptions.push({
-      label: '跟踪方法',
-      prop: 'tracking_method',
-      rules: [{ trigger: 'blur' }],
-
-      compOptions: {
-        elTagName: 'select',
-        enum: trackingMethod,
-        placeholder: '默认值为' + 'bytetrack'
-      }
-    })
-  }
-  model.value['tracking_method'] = 'bytetrack'
+  // if (task_Type === '多目标跟踪') {
+  //   itemsOptions.push({
+  //     label: '模型',
+  //     prop: 'yolo_model',
+  //     rules: [{ trigger: 'blur' }],
+  //     compOptions: {
+  //       elTagName: 'select',
+  //       enum: modelType,
+  //       placeholder: '默认值为' + 'yolov8__best.pt'
+  //     }
+  //   })
+  //   itemsOptions.push({
+  //     label: '跟踪方法',
+  //     prop: 'tracking_method',
+  //     rules: [{ trigger: 'blur' }],
+
+  //     compOptions: {
+  //       elTagName: 'select',
+  //       enum: trackingMethod,
+  //       placeholder: '默认值为' + 'bytetrack'
+  //     }
+  //   })
+  // }
+  // model.value['tracking_method'] = 'bytetrack'
   model.value['yolo_model'] = 'yolov8__best.pt'
   try {
-    const obj: { [key: string]: number } = JSON.parse(validJsonString)
-    Object.keys(obj).forEach(key => {
-      model.value[key] = obj[key]
-      if (key === 'conf' || key === 'iou') {
-        itemsOptions.push({
-          label: key,
-          prop: key,
-          rules: [
-            {
-              trigger: 'change',
-              validator: (rule, value, callback) => {
-                if (value === '' || value === undefined) {
-                  return callback()
-                }
-                if (!value) {
-                  return callback(new Error('请输入一个0到1之间的浮点数'))
-                }
-                const regex = /^(0(\.\d+)?|1(\.0+)?)$/
-                if (!regex.test(value)) {
-                  return callback(new Error('请输入一个0到1之间的浮点数'))
-                }
-                callback()
-              }
-            }
-          ],
-          compOptions: {
-            type: 'input',
-            clearable: true,
-            placeholder: '默认值为' + obj[key]
-          }
-        })
-      } else if (key === 'imgsz') {
-        itemsOptions.push({
-          label: key,
-          prop: key,
-          rules: [
-            {
-              trigger: 'change',
-              validator: (rule, value, callback) => {
-                //console.log(value)
-                if (value === '' || value === undefined) {
-                  return callback()
-                }
-                if (!value) {
-                  return callback(new Error('请输入一个大于0的整数'))
-                }
-                const regex = /^[1-9]\d*$/
-                if (!regex.test(value)) {
-                  return callback(new Error('请输入一个大于0的整数'))
-                }
-                callback()
-              }
-            }
-          ],
-          compOptions: {
-            type: 'input',
-            clearable: true,
-            placeholder: '默认值为' + obj[key]
-          }
-        })
-      }
+    const obj = JSON.parse(validJsonString)
+    obj.forEach(param => {
+      model.value[param.agName] = param.defaultValue
+      itemsOptions.push({
+        tooltip: param.prompt,
+        label: param.name,
+        prop: param.agName,
+        rules: [],
+        compOptions: {
+          type: 'input',
+          clearable: true,
+          placeholder: '默认值为' + param.defaultValue
+        }
+      })
     })
+    // const obj: { [key: string]: number } = JSON.parse(validJsonString)
+    // Object.keys(obj).forEach(key => {
+    //   model.value[key] = obj[key]
+    //   if (key === 'conf' || key === 'iou') {
+    //     itemsOptions.push({
+    //       label: key,
+    //       prop: key,
+    //       rules: [
+    //         {
+    //           trigger: 'change',
+    //           validator: (rule, value, callback) => {
+    //             if (value === '' || value === undefined) {
+    //               return callback()
+    //             }
+    //             if (!value) {
+    //               return callback(new Error('请输入一个0到1之间的浮点数'))
+    //             }
+    //             const regex = /^(0(\.\d+)?|1(\.0+)?)$/
+    //             if (!regex.test(value)) {
+    //               return callback(new Error('请输入一个0到1之间的浮点数'))
+    //             }
+    //             callback()
+    //           }
+    //         }
+    //       ],
+    //       compOptions: {
+    //         type: 'input',
+    //         clearable: true,
+    //         placeholder: '默认值为' + obj[key]
+    //       }
+    //     })
+    //   } else if (key === 'imgsz') {
+    //     itemsOptions.push({
+    //       label: key,
+    //       prop: key,
+    //       rules: [
+    //         {
+    //           trigger: 'change',
+    //           validator: (rule, value, callback) => {
+    //             //console.log(value)
+    //             if (value === '' || value === undefined) {
+    //               return callback()
+    //             }
+    //             if (!value) {
+    //               return callback(new Error('请输入一个大于0的整数'))
+    //             }
+    //             const regex = /^[1-9]\d*$/
+    //             if (!regex.test(value)) {
+    //               return callback(new Error('请输入一个大于0的整数'))
+    //             }
+    //             callback()
+    //           }
+    //         }
+    //       ],
+    //       compOptions: {
+    //         type: 'input',
+    //         clearable: true,
+    //         placeholder: '默认值为' + obj[key]
+    //       }
+    //     })
+    //   }
+    // })
   } catch (error) {
     console.error('解析 JSON 字符串时出错:', error)
   }