Browse Source

fix:表格编辑时,从表数据重复问题/暂时屏蔽表格数据批量修改按钮

lph 1 year ago
parent
commit
74807d0673

+ 6 - 6
ruoyi-ui/src/views/tableMange/index.vue

@@ -216,7 +216,7 @@
                 :options="menus"
                 :normalizer="normalizer"
                 :show-count="true"
-                placeholder=""
+                placeholder="请选择父级路由"
               />
             </el-form-item>
             <el-form-item label="是否显示列表" v-if="false">
@@ -543,7 +543,7 @@ export default {
       // 右侧表单编辑
       formData: {
         menuName: "",
-        routePath: 1,
+        routePath: undefined,
         isShowList: true,
         timeFormate: "",
         orderByColumn: "",
@@ -718,7 +718,10 @@ export default {
     },
     // 关联类型变化回调
     relationTypeChangeHandler(row) {
-      this.tableFieldList = [...this.tableFieldList, ...row.relationFieldList];
+      let tempRelationFieldList = row.relationFieldList.filter((item) => {
+        return !this.tableFieldList.find((val) => val.id === item.id);
+      });
+      this.tableFieldList = [...this.tableFieldList, ...tempRelationFieldList];
     },
     // 关联字段回调
     relationFieldChange(row) {
@@ -889,11 +892,9 @@ export default {
         // }
       }
       // 如果主键不包含显示,则添加至sql语句中
-      console.log(this.primaryKeyList, this.formData.primaryKey);
       let isNotInclude = this.primaryKeyList.find(
         (val) => !val.isShow && val.fieldName == this.formData.primaryKey
       );
-      console.log(isNotInclude);
       if (isNotInclude) {
         fieldArr.push(isNotInclude.tableName + "." + isNotInclude.fieldName);
       }
@@ -930,7 +931,6 @@ export default {
       if (relaTypeArr.length) {
         sql += " " + relaTypeArr.join(" ");
       }
-      console.log("sql:", sql);
       return sql;
     },
     // 处理列表信息

+ 1 - 1
ruoyi-ui/src/views/tablelist/commonTable/listInfo.vue

@@ -65,7 +65,7 @@
           >新增
         </el-button>
       </el-col>
-      <el-col :span="1.5">
+      <el-col :span="1.5" v-if="false">
         <el-button
           type="success"
           plain