Эх сурвалжийг харах

Merge remote-tracking branch 'origin/master'

Administrator 4 жил өмнө
parent
commit
d5fb52457b

+ 0 - 55
boman-jflows/pom.xml

@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>org.springframework.boot</groupId>
-		<artifactId>spring-boot-starter-parent</artifactId>
-		<version>2.4.4</version>
-		<relativePath/> <!-- lookup parent from repository -->
-	</parent>
-	<groupId>com.boman</groupId>
-	<artifactId>boman-jflow</artifactId>
-	<version>0.0.1-SNAPSHOT</version>
-	<name>boman-jflow</name>
-	<description>Demo project for Spring Boot</description>
-	<properties>
-		<java.version>1.8</java.version>
-	</properties>
-	<dependencies>
-		<dependency>
-			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-starter-web</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-starter-test</artifactId>
-			<scope>test</scope>
-		</dependency>
-	</dependencies>
-
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.springframework.boot</groupId>
-				<artifactId>spring-boot-maven-plugin</artifactId>
-			</plugin>
-		</plugins>
-	</build>
-	<repositories>
-		<repository>
-			<id>spring-milestones</id>
-			<name>Spring Milestones</name>
-			<url>https://repo.spring.io/milestone</url>
-		</repository>
-	</repositories>
-	<pluginRepositories>
-		<pluginRepository>
-			<id>spring-milestones</id>
-			<name>Spring Milestones</name>
-			<url>https://repo.spring.io/milestone</url>
-		</pluginRepository>
-	</pluginRepositories>
-
-</project>

+ 0 - 13
boman-jflows/src/main/java/com/boman/jflow/BomanJflowApplication.java

@@ -1,13 +0,0 @@
-package com.boman.jflow;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-public class BomanJflowApplication {
-
-	public static void main(String[] args) {
-		SpringApplication.run(BomanJflowApplication.class, args);
-	}
-
-}

+ 0 - 1
boman-jflows/src/main/resources/application.properties

@@ -1 +0,0 @@
-

+ 0 - 13
boman-jflows/src/test/java/com/boman/jflow/BomanJflowApplicationTests.java

@@ -1,13 +0,0 @@
-package com.boman.jflow;
-
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-
-@SpringBootTest
-class BomanJflowApplicationTests {
-
-	@Test
-	void contextLoads() {
-	}
-
-}

+ 26 - 2
boman-web-core/src/main/java/com/boman/web/core/mapper/StandardlyMapper.java

@@ -6,6 +6,7 @@ import com.boman.common.core.utils.obj.ObjectUtils;
 import com.boman.web.core.constant.FormDataConstant;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.ibatis.annotations.*;
+import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.jdbc.SQL;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -162,7 +163,15 @@ public interface StandardlyMapper {
             , @Param("condition") JSONObject condition
             , @Param("packCondition") JSONObject packCondition);
 
-
+    /**
+     * 功能描述: 根据tableName和map(属性名和属性值)进行查查
+     * {@link SqlProvider#selectByMap(java.util.Map)}
+     * @param tableName tableName
+     * @param param     属性名和属性值
+     * @return java.util.List<com.alibaba.fastjson.JSONObject>
+     */
+    @SelectProvider(type = SqlProvider.class, method = "selectByMap")
+    List<JSONObject> selectByMap(@Param("tableName") String tableName, @Param("param") Map<String, Object> param);
 
 
     public static class SqlProvider {
@@ -515,7 +524,7 @@ public interface StandardlyMapper {
             }
             wholeSql.append(StringUtils.substringBeforeLast(showDataSql.toString(), ","));
 //
-            wholeSql.append(showDataSql).append(" from ").append(tableName);
+            wholeSql.append(" from ").append(tableName);
             // 条件
             packCondition(packCondition, wholeSql);
 
@@ -529,6 +538,21 @@ public interface StandardlyMapper {
             return result;
         }
 
+        public String selectByMap(Map<String, Object> para) {
+            Map<String, Object> param = (Map<String, Object>) para.get("param");
+            String tableName = (String) para.get("tableName");
+
+            StringBuilder wholeSql = new StringBuilder();
+            wholeSql.append("select * from ").append(tableName).append(" where ");
+            for (Map.Entry<String, Object> entry : param.entrySet()) {
+                wholeSql.append(entry.getKey()).append(" = ").append(entry.getValue()).append(" and ");
+            }
+
+            String result = StringUtils.substringBeforeLast(wholeSql.toString(), "and");
+            LOGGER.info("查询拼出的sql语句为:{}", result);
+            return result;
+        }
+
         public String selectByIdList(Map<String, Object> para) {
             String tableName = (String) para.get("tableName");
             String pkName = (String) para.get("pkName");

+ 74 - 0
ruoyi-ui/src/api/system/editing.js

@@ -0,0 +1,74 @@
+import request from '@/utils/request'
+
+// 获取表单数据
+export function getQueryList(data) {
+  return request({
+    url: '/boman-web-core/p/cs/table/getByTableName',
+    method: 'POST',
+    data
+  })
+}
+// 获取表单查询字段、按钮、表头
+export function getTableQuery(data) {
+  return request({
+    url: '/boman-web-core/p/cs/getTableQuery',
+    method: 'POST',
+    data
+  })
+}
+
+// 保存
+export function addbjectSave(data) {
+  return request({
+    url: '/boman-web-core/p/cs/objectSave',
+    method: 'POST',
+    data
+  })
+}
+// 获取表单列表数据
+export function getObject(data) {
+  return request({
+    url: '/boman-web-core/p/cs/getObject',
+    method: 'POST',
+    data
+  })
+}
+// 根据表名获取表单信息
+export function getByTableName(data) {
+  return request({
+    url: '/boman-web-core/p/cs/table/getByTableName',
+    method: 'POST',
+    data
+  })
+}
+export function delMenu(id) {
+  return request({
+    url: 'boman-web-core/p/cs/objectDelete',
+    method: 'delete'
+  })
+}
+
+// 提交
+export function tableSubimt(data) {
+  return request({
+    url: '/boman-web-core/p/cs/objectSubmit',
+    method: 'POST',
+    data
+  })
+}
+ // 反提交
+ export function tableSubimtanit(data) {
+   return request({
+     url: '/boman-web-core/p/cs/objectUnSubmit',
+     method: 'POST',
+     data
+   })
+ }
+// 获取表单tab数据
+ export function geteditindeTab(data) {
+   return request({
+     url: '/boman-web-core/p/cs/objectTab',
+     method: 'POST',
+     data
+   })
+ }

+ 24 - 0
ruoyi-ui/src/api/system/table.js

@@ -48,3 +48,27 @@ export function delMenu(id) {
   })
 }
 
+// 提交
+export function tableSubimt(data) {
+  return request({
+    url: '/boman-web-core/p/cs/objectSubmit',
+    method: 'POST',
+    data
+  })
+}
+ // 反提交
+ export function tableSubimtanit(data) {
+   return request({
+     url: '/boman-web-core/p/cs/objectUnSubmit',
+     method: 'POST',
+     data
+   })
+ }
+// 获取表单tab数据
+ export function geteditindeTab(data) {
+   return request({
+     url: '/boman-web-core/p/cs/objectTab',
+     method: 'POST',
+     data
+   })
+ }

+ 8 - 0
ruoyi-ui/src/api/tool/gen.js

@@ -162,3 +162,11 @@ export function getReload(data) {
     data
   })
 }
+// 新增字段信息
+export function addGenTableColumn(data) {
+  return request({
+    url: '/boman-gen/genTableColumn',
+    method: 'POST',
+    data
+  })
+}

+ 1 - 1
ruoyi-ui/src/views/index.vue

@@ -42,7 +42,7 @@
                          <div v-if="num == 0">
                            <el-table :data="tableDataalid" style="width: 100%;margin-top: 10px;"  :stripe="true"   >
                                    <!-- <el-table-column type="selection" width="55" align="center" /> -->
-                                   <el-table-column label="序号" align="center" prop="noticeId" width="60" height="53" max-height="53" />
+                                  <el-table-column label="序号" align="center" prop="noticeId" width="60" height="53" max-height="53" />
                                   <el-table-column
                                     label="申请人"
                                     align="center"

+ 210 - 23
ruoyi-ui/src/views/system/editing/index.vue

@@ -4,39 +4,31 @@
     <div class="eniting_header">
       <p class="p">表编辑</p>
       <div class="ppl">
-        <p v-for="(item,index) in 6" :key="index" @click="enditTab(index)">
+       <p v-for="(item,index) in tabldie" :key="index" @click="enditTab(index)">
           <img src="../../../assets/images/icon_tbtab_normal.png" alt="" class="index_headerImg" v-if="num !== index">
           <img src="../../../assets/images/icon_tbtab_selected.png" alt="" class="index_headerImg" v-if="num == index">
-          <span :class="[index == num ? 'span' : '']">列表名称</span>
+          <span :class="[index == num ? 'span' : '']">{{item.tableComment}}</span>
         </p>
       </div>
       <el-divider></el-divider>
-      <div class="table_headerBtun">
-           <el-button type="primary" plain v-for="(item,index) in 7" :key="index">新增</el-button>
+      <div class="table_headerBtun" v-if="queryData.buttonList">
+           <el-button type="primary" plain v-for="(item,indexss) in queryData.buttonList.split('')" :key="keyname + indexss" @click="handleQuery(item)">{{item | btnConversion}}</el-button>
       </div>
     </div>
     <!-- 内容 -->
     <div class="eniting_nav">
      <el-collapse v-model="activeNames" @change="handleChange">
-       <el-collapse-item :title="title" :name="index" v-for="(item,index) in 1" :key="index" class="eitde">
-         <el-form :model="queryParams" ref="queryForm" :inline="true"  >
-           <el-row :gutter="0">
-             <el-col :span="6" v-for="(item,index) in 12" :key="index">
-               <el-form-item :label="labletit" prop="dictName">
-                <el-input
-               v-model="queryParams.dictName"
-               placeholder="请输入字典名称"
-               clearable
-               size="small"
-               @keyup.enter.native="handleQuery"
-               />
-              </el-form-item>
-           </el-col>
+       <el-collapse-item :title="item.columnComment" :name="index" v-for="(item,index) in taleLisst" :key="index" class="eitde">
+         <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="120px">
+           <el-row >
+             <el-col :span="24"  :key="index">
+                 <dynamic-forms :ref="items.columnName" :config="queryParams" @inputs = "changeFn" :formConfig="items" v-for="(items,indexs) in item.hrChildren" :key='items.id' />
+             </el-col>
            </el-row>
          </el-form>
        </el-collapse-item>
        <!-- 扩展功能 -->
-       <el-collapse-item :title="title" :name="index" v-for="(item,index) in 1" :key="index" class="eitde">
+       <!-- <el-collapse-item :title="title" :name="index" v-for="(item,index) in 1" :key="index" class="eitde">
          <el-form :model="queryParams" ref="queryForm" :inline="true"  >
            <el-row :gutter="0">
              <el-col :span="12" v-for="(item,index) in 2" :key="index">
@@ -65,9 +57,9 @@
            </el-col>
            </el-row>
          </el-form>
-       </el-collapse-item>
+       </el-collapse-item> -->
        <!-- 服务程序 -->
-       <el-collapse-item :title="title" :name="index" v-for="(item,index) in 1" :key="index" class="eitde">
+       <!-- <el-collapse-item :title="title" :name="index" v-for="(item,index) in 1" :key="index" class="eitde">
          <el-form :model="queryParams" ref="queryForm" :inline="true"  >
            <el-row :gutter="0">
             <el-col :span="12" v-for="(item,index) in 8" :key="index">
@@ -83,13 +75,16 @@
             </el-col>
            </el-row>
          </el-form>
-       </el-collapse-item>
+       </el-collapse-item> -->
+
      </el-collapse>
     </div>
   </div>
 </template>
 
 <script>
+ import { getTableQuery, getQueryList, geteditindeTab, tableSubimt, tableSubimtanit, addbjectSave} from '@/api/system/table.js';
+ // import { getTableQuery, getQueryList,geteditindeTab, tableSubimt, tableSubimtanit, addbjectSave } from '@/src/api/system/editing.js';
   export default {
       name: "index",
       data() {
@@ -105,17 +100,209 @@
              status: undefined
            },
            labletit:'查询参数1233',
-           num:0
+           num:0,
+           tabledeLise:{
+             table:'obj_test',
+             isUi:true
+           },
+           taleLisst:[]  ,//列表数据
+           // 按钮参数
+           tableZbie:{
+             table:'obj_test'
+           },
+           tableZbietabg:{
+             table:'sys_user'
+           },
+           queryData: {},
+            keyname:'nu',
+            tabldie:[],
+            forme:{
+              table:'',
+              objId:-1,
+              fixedData:{}
+            },
+            formeanti:{
+              table:'',
+              commitData:[],
+            },
+            formy:{
+              id:0,
+              status:1
+            }
         };
       },
+      mounted() {
+        this.edingelsie()
+        // button
+        this.init()
+        // tab
+        this.edingelsietab()
+      },
+      filters:{
+        btnConversion(val) {
+          switch(val){
+            case 'A':
+            return '保存';
+            case 'M':
+            return '保存';
+            case 'D':
+            return '删除';
+            case 'Q':
+            return '查询';
+            case 'S':
+            return '提交';
+            case 'U':
+            return '反提交';
+            case 'I':
+            return '导入';
+            case 'E':
+            return '导出';
+          }
+        }
+      },
       methods: {
         handleChange(val) {
                 console.log(val);
               },
         enditTab(index){
          this.num = index
+         // this.tabledeLise.table = this.tabldie[index].tableName
+         // this.formeanti.table = this.tabldie[index].tableName
+         // this.forme.table = this.tabldie[index].tableName
+         if(index == 0){
+          this.tabledeLise.table = 'obj_test'
+         }else if(index ==1){
+          this.tabledeLise.table = 'sys_config'
+         }
+         this.tableZbie.table = this.tabldie[index].tableName
+         this.edingelsie()
+         this.init()
+        },
+        // 按钮
+        init() {
+          getTableQuery(
+            this.tableZbie
+          ).then(res => {
+            let data = res.data
+            this.queryData = data
+            console.log(this.queryData,567)
+          })
+        },
+        // 数据信息
+        edingelsie(){
+          console.log(1234)
+          getQueryList(
+            this.tabledeLise
+          ).then(res => {
+            let data = res.data
+            this.taleLisst = data
+            // console.log(this.queryData.queryList)
+          })
+        },
+        // tab数据
+       edingelsietab(){
+         console.log(4566)
+         geteditindeTab(this.tableZbietabg).then(response => {
+           this.tabldie = response.data.ref
+           // this.msgSuccess("反提交成功");
+           // this.open = false;
+           // this.getList();
+         });
+       },
+       changeFn(obj) {
+         for(let key in obj){
+           this.queryParams[key] = obj[key]
+         }
+       },
+       handleQuery(index) {
+          console.log(index,4)
+          for(let item of this.taleLisst){
+            for(var i = 0 ; i < item.hrChildren.length ; i++){
+              if(item.hrChildren[i].htmlType == 'checkbox' || item.hrChildren[i].htmlType == 'imageUpload' || item.hrChildren[i].htmlType == 'fileUpload'){
+                this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config
+              } else{
+                this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config[item.hrChildren[i].columnName]
+              }
+            }
+          }
+          if(index == 'D'){
+            //删除
+            this.handleDelete(index)
+          }else if(index == 'S'){
+            //提交  保存
+             this.formeanti.table = 'obj_test'
+             this.formeanti.commitData = []
+             this.formy.status = 1
+             this.formy.id = 0
+             this.formeanti.commitData.push(this.formy)
+             console.log(this.formeanti)
+            // this.antiSubmission()
+          }else if(index == 'U'){
+            //反提交  保存
+             this.formeanti.table = 'obj_test'
+             this.formeanti.commitData = []
+             this.formy.status = 2
+             this.formy.id = 0
+             this.formeanti.commitData.push(this.formy)
+             console.log(this.formeanti)
+            // this.antiSubmission()
+          }else if(index == 'M'){
+            // 修改
+            this.forme.table = 'obj_test'
+            this.forme.objId = 1
+            this.forme.fixedData = this.queryParams
+            // this.submitForm()
+          }else if(index == 'A'){
+            //新增
+            this.forme.table = 'obj_test'
+            this.forme.objId = -1
+            this.forme.fixedData = this.queryParams
+            // this.submitForm()
+          }
+
+         console.log(this.forme)
+         // this.getList();
+       },
+      /** 新增 修改提交按钮 */
+      submitForm: function() {
+              addbjectSave(this.forme).then(response => {
+                this.msgSuccess("保存成功");
+                this.open = false;
+                // this.getList();
+              });
+      },
+      // 提交反提交
+      antiSubmission(){
+        if (this.formy.status == 1) {
+          // 提交
+          tableSubimt(this.formeanti).then(response => {
+            this.msgSuccess("提交成功");
+            // this.open = false;
+            // this.getList();
+          });
+        } else if(this.formy.status == 2){
+          // 反提交
+          tableSubimtanit(this.formeanti).then(response => {
+            this.msgSuccess("反提交成功");
+            // this.open = false;
+            // this.getList();
+          });
         }
       },
+      //删除
+      handleDelete(row) {
+        this.$confirm('是否确认删除名称为"' + row + '"的数据项?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+            // return delMenu(row.id);
+          }).then(() => {
+            // this.getList();
+            this.msgSuccess("删除成功");
+          })
+      }
+      },
     };
 
 </script>

+ 2 - 1
ruoyi-ui/src/views/system/surface/index.vue

@@ -64,6 +64,7 @@
         queryParams: {
           table: 'obj_test',
           pageNo: 1,
+          isUi:false,
           pageSize: 10,
           orderBy: 'create_time desc',
           fixedData: {}
@@ -179,7 +180,7 @@
       },
       init() {
         getTableQuery({
-          table: 'obj_test'
+          table: 'obj_test',
         }).then(res => {
           let data = res.data
           this.queryData = data

+ 61 - 25
ruoyi-ui/src/views/system/table/index.vue

@@ -10,7 +10,7 @@
     <!-- 内容 -->
     <div class="table_nav headertable_nav">
       <el-collapse v-model="activeNames" @change="handleChange">
-        <el-collapse-item :title="item.columnComment" :name="index" v-for="(item,index) in taleLisst" :key="index">
+        <el-collapse-item :title="item.columnComment" :name="index" v-for="(item,index) in taleLisst" :key="index" >
           <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="120px">
             <el-row :gutter="0">
               <el-col :span="24"  :key="index">
@@ -18,7 +18,7 @@
               </el-col>
             </el-row>
           </el-form>
-        </el-collapse-item>
+        </el-collapse-item> 
       </el-collapse>
     </div>
   </div>
@@ -26,7 +26,10 @@
 <script>
   import {
     getTableQuery,
-    getQueryList
+    getQueryList,
+    tableSubimt,
+    tableSubimtanit,
+    addbjectSave
   } from '@/api/system/table.js'
   export default {
     name: "index",
@@ -55,15 +58,23 @@
           objId:-1,
           fixedData:{}
         },
+        formeanti:{
+          table:'',
+          commitData:[],
+        },
+        formy:{
+          id:0,
+          status:1
+        }
       };
     },
     filters:{
       btnConversion(val) {
         switch(val){
           case 'A':
-          return '新增';
+          return '保存';
           case 'M':
-          return '修改';
+          return '保存';
           case 'D':
           return '删除';
           case 'Q':
@@ -107,17 +118,36 @@
          if(index == 'D'){
            //删除
            this.handleDelete(index)
-         }else if(index == 'S' || index == 'A'){
+         }else if(index == 'S'){
            //提交  保存
-           this.forme.table = 'obj_test'
-           this.forme.objId = -1
-           this.forme.fixedData = this.queryParams
-           // this.submitForm()
+            this.formeanti.table = 'obj_test'
+            this.formeanti.commitData = []
+            this.formy.status = 1
+            this.formy.id = 0
+            this.formeanti.commitData.push(this.formy)
+            console.log(this.formeanti)
+           this.antiSubmission()
+         }else if(index == 'U'){
+           //反提交  保存
+            this.formeanti.table = 'obj_test'
+            this.formeanti.commitData = []
+            this.formy.status = 2
+            this.formy.id = 0
+            this.formeanti.commitData.push(this.formy)
+            console.log(this.formeanti)
+           this.antiSubmission()
          }else if(index == 'M'){
+           // 修改
            this.forme.table = 'obj_test'
            this.forme.objId = 1
            this.forme.fixedData = this.queryParams
            this.submitForm()
+         }else if(index == 'A'){
+           //新增
+           this.forme.table = 'obj_test'
+           this.forme.objId = -1
+           this.forme.fixedData = this.queryParams
+           this.submitForm()
          }
 
         console.log(this.forme)
@@ -155,25 +185,31 @@
         this.handleDelete(index)
       }
       },
-      /** 提交按钮 */
+      /** 新增 修改提交按钮 */
       submitForm: function() {
-        // this.$refs["form"].validate(valid => {
-          // if (valid) {
-            if (this.forme.objId != -1) {
-              updateType(this.forme).then(response => {
-                this.msgSuccess("修改成功");
-                this.open = false;
-                // this.getList();
-              });
-            } else {
-              addType(this.forme).then(response => {
-                this.msgSuccess("新增成功");
+              addbjectSave(this.forme).then(response => {
+                this.msgSuccess("保存成功");
                 this.open = false;
                 // this.getList();
               });
-            }
-          // }
-        // });
+      },
+      // 提交反提交
+      antiSubmission(){
+        if (this.formy.status == 1) {
+          // 提交
+          tableSubimt(this.formeanti).then(response => {
+            this.msgSuccess("提交成功");
+            // this.open = false;
+            // this.getList();
+          });
+        } else if(this.formy.status == 2){
+          // 反提交
+          tableSubimtanit(this.formeanti).then(response => {
+            this.msgSuccess("反提交成功");
+            // this.open = false;
+            // this.getList();
+          });
+        }
       },
       //删除
       handleDelete(row) {

+ 41 - 5
ruoyi-ui/src/views/tool/gen/editTable.vue

@@ -1,6 +1,6 @@
 <template>
   <el-card>
-    <el-row type="flex" v-if="activeName=='cloum'" justify="space-between" style="margin: 10px 0;">
+    <el-row type="flex" v-if="activeName=='basic' || activeName=='cloum'" justify="space-between" style="margin: 10px 0;">
       <el-col :span="1.5" style="display: flex; align-items: center;">
         <el-form label-width="100px" style="display: flex; align-items: center;">
           <el-form-item style="text-align: center;margin-left:-100px;margin-top:0; margin-bottom: 0;">
@@ -89,7 +89,7 @@
         </el-table>
         <!-- 添加或修改岗位对话框 -->
         <el-dialog :title="title" :visible.sync="openZd" width="70vw" append-to-body>
-          <el-form ref="formZd" :model="formZd" :rules="rules" label-width="120px">
+          <el-form ref="formZd" :model="formZd" :rules="rulesZd" label-width="120px">
             <el-row>
               <el-col :span="8">
                 <el-form-item label="字段名:" prop="columnName">
@@ -354,6 +354,7 @@
     tableSql,
     zxImplement,
     getReload,
+    addGenTableColumn,
     qurGenTable
   } from "@/api/tool/gen";
   import {
@@ -380,8 +381,35 @@
         tableSqlData: [],
         columList: [],
         foreignKey: [],
-        openZd: false,
+        openZd: true,
         formZd: {},
+        rulesZd: {
+          columnName: [{
+            required: true,
+            message: "请输入字段名",
+            trigger: "blur"
+          }],
+          columnComment: [{
+            required: true,
+            message: "请输入字段描述",
+            trigger: "blur"
+          }],
+          columnType: [{
+            required: true,
+            message: "请输入物理类型",
+            trigger: "blur"
+          }],
+          mask: [{
+            required: true,
+            message: "请输入字段显示规则",
+            trigger: "blur"
+          }],
+          sort: [{
+            required: true,
+            message: "请输入序号",
+            trigger: "blur"
+          }],
+        },
         loadingZd: '',
         // 关联表
         title: "",
@@ -422,7 +450,7 @@
           pageSize: 10,
         },
         // 选中选项卡的 name
-        activeName: "cloum",
+        activeName: "basic",
         // 表格的高度
         tableHeight: document.documentElement.scrollHeight - 245 + "px",
         // 表信息
@@ -516,7 +544,15 @@
     },
     methods: {
       submitFormZd() {
-
+        this.$refs["formZd"].validate(valid => {
+          if (valid) {
+              addGenTableColumn(this.formZd).then(response => {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.tabList();
+              });
+          }
+        });
       },
       sxCreaBtn() {
         getReload({