28968 hace 6 meses
padre
commit
f28e462cca

+ 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;
+
+  /* 超出部分用省略号表示 */
+}

+ 1 - 0
src/components/ProForm/index.vue

@@ -7,6 +7,7 @@
             <template #label>
               <el-space :size="4">
                 <span class="label-span">{{ `${item.label}` }}</span>
+
                 <!-- <el-tooltip :content="item.formItem.label" placement="top" :disabled="isShowTooltip">
                   <span class="label-span" @mouseenter="visibleTooltip">{{ `${item.formItem.label}` }}</span>
                 </el-tooltip> -->

+ 1 - 0
src/views/demo/dataAugmentation/index.vue

@@ -553,6 +553,7 @@ const addParams = params => {
       model.value[param.agName] = param.defaultValue
       itemsOptions.push({
         label: param.name,
+        tooltip: param.prompt,
         prop: param.agName,
         rules: [],
         compOptions: {

+ 1 - 0
src/views/demo/imageMosaic/index.vue

@@ -539,6 +539,7 @@ const addParams = params => {
     obj.forEach(param => {
       model.value[param.agName] = param.defaultValue
       itemsOptions.push({
+        tooltip: param.prompt,
         label: param.name,
         prop: param.agName,
         rules: [],

+ 1 - 0
src/views/demo/targetDamageAcess/index.vue

@@ -540,6 +540,7 @@ const addParams = params => {
     obj.forEach(param => {
       model.value[param.agName] = param.defaultValue
       itemsOptions.push({
+        tooltip: param.prompt,
         label: param.name,
         prop: param.agName,
         rules: [],

+ 1 - 0
src/views/demo/targetTrack/index.vue

@@ -671,6 +671,7 @@ const addParams = (params, task_Type) => {
     obj.forEach(param => {
       model.value[param.agName] = param.defaultValue
       itemsOptions.push({
+        tooltip: param.prompt,
         label: param.name,
         prop: param.agName,
         rules: [],