Przeglądaj źródła

解决文件上传无法手动输入名称的bug

twzydn20000928 1 rok temu
rodzic
commit
dac4555186
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3 3
      pdaaphm-ui/src/views/algoManager/file/index.vue

+ 3 - 3
pdaaphm-ui/src/views/algoManager/file/index.vue

@@ -107,7 +107,7 @@
     <!-- 添加或修改文件对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="数据类型" prop="type">
+        <el-form-item label="数据类型" prop="dataType">
           <el-select v-model="form.dataType" placeholder="请选择数据类型" clearable filterable>
             <el-option
               v-for="dict in dict.type.data_type"
@@ -179,7 +179,7 @@ export default {
         pageSize: 10,
         name: null,
         path: null,
-        type: null,
+        dataType: null,
       },
       // 表单参数
       form: {},
@@ -272,8 +272,8 @@ export default {
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
+          this.form.type = "1";
           if(this.form.name == null) {
-            this.form.type = "1";
             this.form.name = this.getFileName(this.form.path);
           }
           if (this.form.id != null) {