Selaa lähdekoodia

增加区分日期控件及时间控件

skyzhou 4 vuotta sitten
vanhempi
commit
f4137d24fe

+ 236 - 234
ruoyi-ui/src/components/DynamicForms/index.vue

@@ -1,260 +1,262 @@
-<template>
-  <el-form-item label-width="120px" :label="formConfig.columnComment" style="display: inline-block;" :prop="formConfig.columnName">
-    <!-- 输入框 -->
-    <el-input v-if="formConfig.htmlType == 'input'" @change="iChange" v-model="config[formConfig.columnName]" :placeholder="'请输入'+formConfig.columnComment"
-      clearable @keyup.enter.native="handleQuery" :disabled="formConfig.disabshow" />
-    <!-- 多行输入框 -->
-    <el-input v-if="formConfig.htmlType == 'textarea'" @change="iChange" type="textarea" v-model="config[formConfig.columnName]"
-      :placeholder="'请输入'+formConfig.columnComment" clearable @keyup.enter.native="handleQuery" :disabled="formConfig.disabshow" />
-    <!-- 下拉框 -->
-    <el-select v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'select'&&(!formConfig.fkInfo)"
-      filterable :placeholder="'请输入'+formConfig.columnComment" :disabled="formConfig.disabshow">
-      <el-option v-for="itemChild in formConfig.sysDictData" :key="itemChild.dictValue" :label="itemChild.dictLabel"
-        :value="itemChild.dictValue">
-      </el-option>
-    </el-select>
-    <!-- 下拉框搜索 -->
-    <el-select :disabled="formConfig.disabshow" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'select'&&(formConfig.fkInfo)"
-      filterable remote :remote-method="remoteMethod" :loading="loading" :placeholder="'请输入'+formConfig.columnComment">
-      <el-option v-for="itemChild in filterList" :key="itemChild[formConfig.fkInfo.fkColumnName]" :label="itemChild[formConfig.fkInfo.dkColumnName]"
-        :value="itemChild[formConfig.fkInfo.fkColumnName]">
-      </el-option>
-    </el-select>
-    <!-- 复选框 -->
-    <el-checkbox-group :disabled="formConfig.disabshow" v-model="config" v-if="formConfig.htmlType == 'checkbox'">
-      <el-checkbox @change="handleCheckedCitiesChange" v-for="itemChild in formConfig.sysDictData" :label="itemChild.dictValue"
-        :key="itemChild.dictLabel">
-        {{itemChild.dictLabel}}
-      </el-checkbox>
-    </el-checkbox-group>
-    <!-- 单选框 -->
-    <el-radio-group :disabled="formConfig.disabshow" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'radio'">
-      <el-radio v-for="itemChild in formConfig.sysDictData" :key="itemChild.dictValue" :label="itemChild.dictValue">{{itemChild.dictLabel}}</el-radio>
-    </el-radio-group>
-    <!-- 时间控件 -->
-    <el-date-picker :disabled="formConfig.disabshow" @change="iChange" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'datetime'"
-      type="date" :placeholder="'请输入'+formConfig.columnComment">
-    </el-date-picker>
-    <!-- 上传图片 -->
-    <el-upload :disabled="formConfig.disabshow" v-if="formConfig.htmlType == 'imageUpload'" :headers="{Authorization: 'Bearer ' + getToken()}"
-      :action="process + '/boman-file/upload'" :file-list="config" list-type="picture-card" :on-preview="handlePictureCardPreview"
-      :on-success="upImageFn" :on-remove="reseImage">
-      <i class="el-icon-plus"></i>
-    </el-upload>
-    <el-dialog :disabled="formConfig.disabshow" :visible.sync="dialogVisible" v-if="formConfig.htmlType == 'imageUpload'">
-      <img :src="dialogImageUrl" alt="">
-    </el-dialog>
-    <!-- 上传文件 -->
-    <el-upload :disabled="formConfig.disabshow" class="upload-demo" :headers="{Authorization: 'Bearer ' + getToken()}"
-      v-if="formConfig.htmlType == 'fileUpload'" :action="process + '/boman-file/upload'" :on-change="handleChange"
-      :on-success="upImageFn" :on-remove="reseImage" :file-list="config">
-      <el-button size="small" type="primary">点击上传</el-button>
-      <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
-    </el-upload>
-    <!-- 富文本 -->
-    <editor :disabled="formConfig.disabshow" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'editor'"
-      :min-height="192" />
-  </el-form-item>
-</template>
-
-<script>
-  const defaultSettings = require('@/settings.js')
-  import Editor from '@/components/Editor';
-  import {
-    listIndexfou
-  } from "@/api/tool/gen";
-  import {
-    getToken
-  } from "@/utils/auth";
-  export default {
-    data() {
-      return {
-        fileList: [],
-        defaultSettings,
-        dialogImageUrl: '',
-        process: process.env.VUE_APP_BASE_API,
-        dialogVisible: false,
-        disabled: false,
-        loading: false,
-        filterList: [],
-        config: {},
-        aliemg: {
-          table: '',
-          orderBy: 'create_time desc',
-          pageNo: 1,
-          pageSize: 10,
-          fixedData: {
-            condition: {}
-          }
-        },
-      }
-    },
-    components: {
-      Editor
-    },
-    props: {
-      queryData: {
-        type: Object,
-        default: res => {
-          return {
-            showData: []
-          }
-        }
-      },
-      formConfig: {
-        type: Object,
-        required: true,
-        default: res => {
-          return {
-            sysDictData: []
-          }
-        }
-      },
-      type: {
-        type: Number,
-        default: 1
-      },
-    },
-    created() {
-      this.config = {}
-      if (this.type) {
-        if (this.formConfig.readonly == true) {
-          this.formConfig.disabshow = true
-        } else if (this.formConfig.mask.slice(3, 4) == '0' || this.formConfig.isonliy == true) {
-          this.formConfig.disabshow = true
-        } else {
-          this.formConfig.disabshow = false
-        }
-        if (this.formConfig.fkInfo == null) {
-          this.formConfig.fkInfo = false
-        }
-      }
+<template>
+  <el-form-item label-width="120px" :label="formConfig.columnComment" style="display: inline-block;" :prop="formConfig.columnName">
+    <!-- 输入框 -->
+    <el-input v-if="formConfig.htmlType == 'input'" @change="iChange" v-model="config[formConfig.columnName]" :placeholder="'请输入'+formConfig.columnComment"
+      clearable @keyup.enter.native="handleQuery" :disabled="formConfig.disabshow" />
+    <!-- 多行输入框 -->
+    <el-input v-if="formConfig.htmlType == 'textarea'" @change="iChange" type="textarea" v-model="config[formConfig.columnName]"
+      :placeholder="'请输入'+formConfig.columnComment" clearable @keyup.enter.native="handleQuery" :disabled="formConfig.disabshow" />
+    <!-- 下拉框 -->
+    <el-select v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'select'&&(!formConfig.fkInfo)"
+      filterable :placeholder="'请输入'+formConfig.columnComment" :disabled="formConfig.disabshow">
+      <el-option v-for="itemChild in formConfig.sysDictData" :key="itemChild.dictValue" :label="itemChild.dictLabel"
+        :value="itemChild.dictValue">
+      </el-option>
+    </el-select>
+    <!-- 下拉框搜索 -->
+    <el-select :disabled="formConfig.disabshow" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'select'&&(formConfig.fkInfo)"
+      filterable remote :remote-method="remoteMethod" :loading="loading" :placeholder="'请输入'+formConfig.columnComment">
+      <el-option v-for="itemChild in filterList" :key="itemChild[formConfig.fkInfo.fkColumnName]" :label="itemChild[formConfig.fkInfo.dkColumnName]"
+        :value="itemChild[formConfig.fkInfo.fkColumnName]">
+      </el-option>
+    </el-select>
+    <!-- 复选框 -->
+    <el-checkbox-group :disabled="formConfig.disabshow" v-model="config" v-if="formConfig.htmlType == 'checkbox'">
+      <el-checkbox @change="handleCheckedCitiesChange" v-for="itemChild in formConfig.sysDictData" :label="itemChild.dictValue"
+        :key="itemChild.dictLabel">
+        {{itemChild.dictLabel}}
+      </el-checkbox>
+    </el-checkbox-group>
+    <!-- 单选框 -->
+    <el-radio-group :disabled="formConfig.disabshow" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'radio'">
+      <el-radio v-for="itemChild in formConfig.sysDictData" :key="itemChild.dictValue" :label="itemChild.dictValue">{{itemChild.dictLabel}}</el-radio>
+    </el-radio-group>
+    <!-- 时间控件 -->
+    <el-date-picker :disabled="formConfig.disabshow" @change="iChange" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'datetime'"
+      type="date" :placeholder="'请输入'+formConfig.columnComment">
+    </el-date-picker>
+
+
+    <!-- 上传图片 -->
+    <el-upload :disabled="formConfig.disabshow" v-if="formConfig.htmlType == 'imageUpload'" :headers="{Authorization: 'Bearer ' + getToken()}"
+      :action="process + '/boman-file/upload'" :file-list="config" list-type="picture-card" :on-preview="handlePictureCardPreview"
+      :on-success="upImageFn" :on-remove="reseImage">
+      <i class="el-icon-plus"></i>
+    </el-upload>
+    <el-dialog :disabled="formConfig.disabshow" :visible.sync="dialogVisible" v-if="formConfig.htmlType == 'imageUpload'">
+      <img :src="dialogImageUrl" alt="">
+    </el-dialog>
+    <!-- 上传文件 -->
+    <el-upload :disabled="formConfig.disabshow" class="upload-demo" :headers="{Authorization: 'Bearer ' + getToken()}"
+      v-if="formConfig.htmlType == 'fileUpload'" :action="process + '/boman-file/upload'" :on-change="handleChange"
+      :on-success="upImageFn" :on-remove="reseImage" :file-list="config">
+      <el-button size="small" type="primary">点击上传</el-button>
+      <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
+    </el-upload>
+    <!-- 富文本 -->
+    <editor :disabled="formConfig.disabshow" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'editor'"
+      :min-height="192" />
+  </el-form-item>
+</template>
+
+<script>
+  const defaultSettings = require('@/settings.js')
+  import Editor from '@/components/Editor';
+  import {
+    listIndexfou
+  } from "@/api/tool/gen";
+  import {
+    getToken
+  } from "@/utils/auth";
+  export default {
+    data() {
+      return {
+        fileList: [],
+        defaultSettings,
+        dialogImageUrl: '',
+        process: process.env.VUE_APP_BASE_API,
+        dialogVisible: false,
+        disabled: false,
+        loading: false,
+        filterList: [],
+        config: {},
+        aliemg: {
+          table: '',
+          orderBy: 'create_time desc',
+          pageNo: 1,
+          pageSize: 10,
+          fixedData: {
+            condition: {}
+          }
+        },
+      }
+    },
+    components: {
+      Editor
+    },
+    props: {
+      queryData: {
+        type: Object,
+        default: res => {
+          return {
+            showData: []
+          }
+        }
+      },
+      formConfig: {
+        type: Object,
+        required: true,
+        default: res => {
+          return {
+            sysDictData: []
+          }
+        }
+      },
+      type: {
+        type: Number,
+        default: 1
+      },
+    },
+    created() {
+      this.config = {}
+      if (this.type) {
+        if (this.formConfig.readonly == true) {
+          this.formConfig.disabshow = true
+        } else if (this.formConfig.mask.slice(3, 4) == '0' || this.formConfig.isonliy == true) {
+          this.formConfig.disabshow = true
+        } else {
+          this.formConfig.disabshow = false
+        }
+        if (this.formConfig.fkInfo == null) {
+          this.formConfig.fkInfo = false
+        }
+      }
       this.init()
       if (this.formConfig.extendedAttributes) {
         let extend = JSON.parse(this.formConfig.extendedAttributes)
+//        this.formConfig.extend=extend
         this.extFn(extend.col, extend.comp)
-      }
-    },
-    watch: {
-      'config': {
-        handler: function() {
-          this.$emit('modelFn', this.formConfig.columnName, this.config[this.formConfig.columnName])
-        },
-        deep: true
+      }
+    },
+    watch: {
+      'config': {
+        handler: function() {
+          this.$emit('modelFn', this.formConfig.columnName, this.config[this.formConfig.columnName])
+        },
+        deep: true
       },
       'queryData': {
         handler: function() {
           if (this.formConfig.extendedAttributes) {
-            console.log(this.formConfig,222)
             let extend = JSON.parse(this.formConfig.extendedAttributes)
             this.extFn(extend.col, extend.comp)
           }
         },
         deep: true
-      },
-    },
-    mounted() {},
+      },
+    },
+    mounted() {},
     methods: {
       iChange(val){
         if(this.formConfig.isUseExtend){
           console.log(this.formConfig.columnName)
           this.$emit('iChange',this.formConfig.columnName,val)
         }
-      },
+      },
       extFn(col, comp) {
         let str = this.getDyn(col, this.queryData.showData,comp)
-        this.config[this.formConfig.columnName] = str
+        this.config[this.formConfig.columnName] = str
       },
       eval(code){
         let fun = new Function(`return ${code}`)();
         return fun
-      },
-      listIndexfouFn() {
-        listIndexfou(this.aliemg).then(response => {
-          if (response.data) {
-            this.filterList = response.data.rows
-          }
-          this.loading = false;
-        })
-      },
-      remoteMethod(query) {
-        if (query !== '') {
-          this.loading = true;
-          this.aliemg.fixedData.condition[this.formConfig.fkInfo.dkColumnName] = query
-          this.listIndexfouFn()
-        } else {
-          this.filterList = [];
-        }
-      },
-      upImageFn(res, file) {
-        this.config.push(res.data);
-      },
-      init() {
-        if (this.formConfig.htmlType == 'checkbox' || this.formConfig.htmlType == 'imageUpload' || this.formConfig.htmlType ==
-          'fileUpload') {
-          this.config = []
-        } else {
-          this.$set(this.config, this.formConfig.columnName, ((this.formConfig.columnValue ? this.formConfig.columnValue :
-            this.formConfig.defaultValue) || ''))
-        }
-
-        if (this.formConfig.fkInfo) {
-          this.aliemg.table = this.formConfig.fkInfo.fkTableName
-          if (this.formConfig.fkInfo.value) {
-            this.aliemg.fixedData.condition[this.formConfig.fkInfo.dkColumnName] = this.formConfig.fkInfo.value
-          }
-          this.listIndexfouFn()
-        }
-      },
-      handleChange(file, fileList) {
-        this.fileList = fileList.slice(-3);
-      },
-      getToken() {
-        return getToken()
-      },
-      reseImage(file, fileList) {
-        let urls = ""
-        if (file.response) {
-          urls = file.response.url
-        } else {
-          urls = file.url
-        }
-        for (let i = this.config.length - 1; i >= 0; i--) {
-          if (this.config[i].url == urls) {
-            this.config.splice(i, 1);
-          }
-        }
-      },
-      reseImage1(file, fileList) {
-        let urls = ""
-        if (file.response) {
-          urls = file.response.url
-        } else {
-          urls = file.url
-        }
-        for (let i = this.config.length - 1; i >= 0; i--) {
-          if (this.config[i].url == urls) {
-            this.config.splice(i, 1);
-          }
-        }
-      },
-      handlePictureCardPreview(file) {
-        console.log(file)
-        this.dialogImageUrl = file.url;
-        this.dialogVisible = true;
-      },
-      handleDownload(file) {
-        console.log(file);
-      },
-      handleQuery() {
-        this.$emit('btns')
-      },
-      handleCheckedCitiesChange(value) {
-        console.log(this.config)
-      }
-    }
-  }
-</script>
-
-<style>
+      },
+      listIndexfouFn() {
+        listIndexfou(this.aliemg).then(response => {
+          if (response.data) {
+            this.filterList = response.data.rows
+          }
+          this.loading = false;
+        })
+      },
+      remoteMethod(query) {
+        if (query !== '') {
+          this.loading = true;
+          this.aliemg.fixedData.condition[this.formConfig.fkInfo.dkColumnName] = query
+          this.listIndexfouFn()
+        } else {
+          this.filterList = [];
+        }
+      },
+      upImageFn(res, file) {
+        this.config.push(res.data);
+      },
+      init() {
+        if (this.formConfig.htmlType == 'checkbox' || this.formConfig.htmlType == 'imageUpload' || this.formConfig.htmlType ==
+          'fileUpload') {
+          this.config = []
+        } else {
+          this.$set(this.config, this.formConfig.columnName, ((this.formConfig.columnValue ? this.formConfig.columnValue :
+            this.formConfig.defaultValue) || ''))
+        }
+
+        if (this.formConfig.fkInfo) {
+          this.aliemg.table = this.formConfig.fkInfo.fkTableName
+          if (this.formConfig.fkInfo.value) {
+            this.aliemg.fixedData.condition[this.formConfig.fkInfo.dkColumnName] = this.formConfig.fkInfo.value
+          }
+          this.listIndexfouFn()
+        }
+      },
+      handleChange(file, fileList) {
+        this.fileList = fileList.slice(-3);
+      },
+      getToken() {
+        return getToken()
+      },
+      reseImage(file, fileList) {
+        let urls = ""
+        if (file.response) {
+          urls = file.response.url
+        } else {
+          urls = file.url
+        }
+        for (let i = this.config.length - 1; i >= 0; i--) {
+          if (this.config[i].url == urls) {
+            this.config.splice(i, 1);
+          }
+        }
+      },
+      reseImage1(file, fileList) {
+        let urls = ""
+        if (file.response) {
+          urls = file.response.url
+        } else {
+          urls = file.url
+        }
+        for (let i = this.config.length - 1; i >= 0; i--) {
+          if (this.config[i].url == urls) {
+            this.config.splice(i, 1);
+          }
+        }
+      },
+      handlePictureCardPreview(file) {
+        console.log(file)
+        this.dialogImageUrl = file.url;
+        this.dialogVisible = true;
+      },
+      handleDownload(file) {
+        console.log(file);
+      },
+      handleQuery() {
+        this.$emit('btns')
+      },
+      handleCheckedCitiesChange(value) {
+        console.log(this.config)
+      }
+    }
+  }
+</script>
+
+<style>
 </style>

+ 8 - 5
ruoyi-ui/src/components/DynamicFormsteo/index.vue

@@ -33,12 +33,13 @@
     <el-radio-group :disabled="formConfig.disabshow" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'radio'">
       <el-radio v-for="itemChild in formConfig.sysDictData" :key="itemChild.dictValue" :label="itemChild.dictValue">{{itemChild.dictLabel}}</el-radio>
     </el-radio-group>
-    <!-- 时间控件 -->
-    <el-date-picker :disabled="formConfig.disabshow" @change="iChange" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'datetime'"
+    <!-- 时间控件日期 -->
+    <el-date-picker :disabled="formConfig.disabshow" @change="iChange" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'datetime-date'"
       type="date" :placeholder="'请输入'+formConfig.columnComment">
     </el-date-picker>
-    <el-date-picker :disabled="formConfig.disabshow" @change="iChange" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'fulltime'"
-      type="datetime" :placeholder="'请输入'+formConfig.columnComment">
+    <!-- 时间控件小时分钟 -->
+    <el-date-picker :disabled="formConfig.disabshow" @change="iChange" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'datetime'"
+                    type="datetime" :placeholder="'请输入'+formConfig.columnComment">
     </el-date-picker>
     <!-- 上传图片 -->
     <el-upload :disabled="formConfig.disabshow" v-if="formConfig.htmlType == 'imageUpload'" :headers="{Authorization: 'Bearer ' + getToken()}"
@@ -172,8 +173,10 @@
      'queryData': {
        handler: function() {
          if (this.formConfig.extendedAttributes) {
-           console.log(this.formConfig,222)
+           console.log(this.formConfig,11111)
            let extend = JSON.parse(this.formConfig.extendedAttributes)
+           this.formConfig.extend=extend
+           console.log(this.formConfig.extend,11111)
            this.extFn(extend.col, extend.comp)
          }
        },

+ 389 - 381
ruoyi-ui/src/views/system/table/index.vue

@@ -1,212 +1,217 @@
-<template>
-  <div class="table_total">
-    <div class="table_header">
-      <!-- <p>单表</p>
+<template>
+  <div class="table_total">
+    <div class="table_header">
+      <!-- <p>单表</p>
       <el-divider></el-divider> -->
       <div class="imge_tab">
-        <img src="../../../assets/images/pic_sy_ytj.png" alt="" v-if="imgShoew == 2" >
-        <img src="../../../assets/images/pic_sy_shz.png" alt="" v-if="imgShoew == 4" >
-        <img src="../../../assets/images/pic_sy_ybh.png" alt="" v-if="imgShoew == 3" >
-      </div>
-      <div class="table_headerBtun table_headerBtuntwo" v-if="queryData.buttonList">
-        <el-button type="primary" size="mini" plain v-for="(item,index) in jeigneutwo" :key="index" @click="handleQuery(item)">{{item}}</el-button>
-      </div>
-    </div>
-    <!-- 内容 -->
-    <div class="table_nav headertable_nav table_forem" >
+        <img src="../../../assets/images/pic_sy_ytj.png" alt="" v-if="imgShoew == 2">
+        <img src="../../../assets/images/pic_sy_shz.png" alt="" v-if="imgShoew == 4">
+        <img src="../../../assets/images/pic_sy_ybh.png" alt="" v-if="imgShoew == 3">
+      </div>
+      <div class="table_headerBtun table_headerBtuntwo" v-if="queryData.buttonList">
+        <el-button type="primary" size="mini" plain v-for="(item,index) in jeigneutwo" :key="index"
+                   @click="handleQuery(item)">{{item}}
+        </el-button>
+      </div>
+    </div>
+    <!-- 内容 -->
+    <div class="table_nav headertable_nav table_forem">
       <el-collapse v-model="activeNames" @change="handleChange">
-        <el-form :model="queryParams" :rules="queryData.rules" ref="queryForm" :inline="true" :label-width="this.queryData.table_column == 6 ? '70px' :'110px'" >
-          <el-collapse-item :title="item.columnComment" :name="index" v-for="(item,index) in queryData.showData" :key="index">
-                <dynamic-formsteo @iChange="iChange" :queryData="queryData" @modelFn="modelFn" :ref="items.columnName" :config="queryParams" @inputs="changeFn" :formConfig="items" v-for="(items,indexs) in item.hrChildren"
-                  :key='indexs' />
+        <el-form :model="queryParams" :rules="queryData.rules" ref="queryForm" :inline="true"
+                 :label-width="this.queryData.table_column == 6 ? '70px' :'110px'">
+          <el-collapse-item :title="item.columnComment" :name="index" v-for="(item,index) in queryData.showData"
+                            :key="index">
+            <dynamic-formsteo @iChange="iChange" :queryData="queryData" @modelFn="modelFn" :ref="items.columnName"
+                              :config="queryParams" @inputs="changeFn" :formConfig="items"
+                              v-for="(items,indexs) in item.hrChildren"
+                              :key='indexs'/>
           </el-collapse-item>
         </el-form>
-      </el-collapse>
-    </div>
-  </div>
-</template>
-<script>
-  import {
-    getTableQuery,
-    getQueryList,
-    tableSubimt,
-    tableSubimtanit,
-    addbjectSave,
-    delMenutab
-  } from '@/api/system/table.js'
-  export default {
-    name: "index",
-    inject: ['reload'],
-    data() {
-      return {
-        // 显示搜索条件
-        showSearch: true,
-        activeNames: [0],
-        title: '单表1',
-        tabledeLise: {
-          table: '',
-          isUi: true
-        },
-        queryData: {},
-        // 查询参数
-        queryParams: {
-
-        },
+      </el-collapse>
+    </div>
+  </div>
+</template>
+<script>
+  import {
+    getTableQuery,
+    getQueryList,
+    tableSubimt,
+    tableSubimtanit,
+    addbjectSave,
+    delMenutab
+  } from '@/api/system/table.js'
+
+  export default {
+    name: "index",
+    inject: ['reload'],
+    data() {
+      return {
+        // 显示搜索条件
+        showSearch: true,
+        activeNames: [0],
+        title: '单表1',
+        tabledeLise: {
+          table: '',
+          isUi: true
+        },
+        queryData: {},
+        // 查询参数
+        queryParams: {},
         labletit: '查询参数1233',
-        tableZbie:{
-          table:'',
-          isUi:true,
-          fixedData:{
-            id:-1
+        tableZbie: {
+          table: '',
+          isUi: true,
+          fixedData: {
+            id: -1
           }
 
         },
-        taleLisst:[],
-        forme:{
-          table:'',
-          objId:-1,
-          fixedData:{}
+        taleLisst: [],
+        forme: {
+          table: '',
+          objId: -1,
+          fixedData: {}
         },
-        formeanti:{
-          table:'',
-          commitData:[],
+        formeanti: {
+          table: '',
+          commitData: [],
         },
-        formy:{
-          id:0,
-          status:1
+        formy: {
+          id: 0,
+          status: 1
         },
         // 删除参数
-        deledlid:{
-          table:'',
-          idList:[]
+        deledlid: {
+          table: '',
+          idList: []
         },
-        jeigneu:[],
-        jeigneutwo:[],
-        xidugje:0,
-        tijeq:0,
-        imgShoew:0,
-        tablees:-1,
-        juegkae:'',
-        tabdiese:'',
-        cielsshow:false,
-        oieufr:0,
-        ojeuduj:0
-      };
-    },
-    mounted() {
-      this.deledlid.idList = []
-      this.formeanti.table = this.$route.query.tables
-      this.forme.table = this.$route.query.tables
-      this.forme.objId = this.$route.query.id
-      this.tableZbie.table = this.$route.query.tables
-      this.tableZbie.fixedData.id = this.$route.query.id
-      this.formy.id = this.$route.query.id
+        jeigneu: [],
+        jeigneutwo: [],
+        xidugje: 0,
+        tijeq: 0,
+        imgShoew: 0,
+        tablees: -1,
+        juegkae: '',
+        tabdiese: '',
+        cielsshow: false,
+        oieufr: 0,
+        ojeuduj: 0
+      };
+    },
+    mounted() {
+      this.deledlid.idList = []
+      this.formeanti.table = this.$route.query.tables
+      this.forme.table = this.$route.query.tables
+      this.forme.objId = this.$route.query.id
+      this.tableZbie.table = this.$route.query.tables
+      this.tableZbie.fixedData.id = this.$route.query.id
+      this.formy.id = this.$route.query.id
       this.deledlid.table = this.$route.query.tables
-      this.ojeuduj = this.$route.query.id
+      this.ojeuduj = this.$route.query.id
       this.deledlid.idList.push(this.$route.query.id)
-      if(this.$route.query.tabfe){
-       this.tablees = this.$route.query.tabfe
-       this.juegkae = this.$route.query.tabik + '_id'
-       this.tabdiese = this.$route.query.tabik
-       console.log(this.juegkae)
-      }else{
+      if (this.$route.query.tabfe) {
+        this.tablees = this.$route.query.tabfe
+        this.juegkae = this.$route.query.tabik + '_id'
+        this.tabdiese = this.$route.query.tabik
+        console.log(this.juegkae)
+      } else {
         this.tablees = undefined
         this.juegkae = undefined
         this.tabdiese = this.$route.query.tabik
       }
-      this.init()
-      // this.tablsie()
-    },
+      this.init()
+      // this.tablsie()
+    },
     methods: {
-      iChange(name,val){
-        for(let item of this.queryData.showData){
-          for(let itemChild of item.hrChildren){
-            if(itemChild.columnName == name){
-              itemChild.columnValue = (val?val:null)
+      iChange(name, val) {
+        for (let item of this.queryData.showData) {
+          for (let itemChild of item.hrChildren) {
+            if (itemChild.columnName == name) {
+              itemChild.columnValue = (val ? val : null)
             }
           }
         }
       },
       modelFn(obj, cont) {
-        this.$set(this.queryParams,obj,cont)
-      },
-      changeFn(obj) {
-        for (let key in obj) {
-          this.queryParams[key] = obj[key]
-        }
-      },
-      resetQuery() {
-
-      },
-      /** 搜索按钮操作 */
-      handleQuery(index) {
-        for (let item of this.queryData.showData) {
-          for (var i = 0; i < item.hrChildren.length; i++) {
-            if (item.hrChildren[i].htmlType == 'checkbox') {
-              this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config
-            } else if (item.hrChildren[i].htmlType == 'imageUpload' || item.hrChildren[i].htmlType == 'fileUpload') {
-              if (this.$refs[item.hrChildren[i].columnName][0].config.length) {
-                this.queryParams[item.hrChildren[i].columnName] = JSON.stringify(this.$refs[item.hrChildren[i].columnName][0].config)
-              }
-            } else if (item.hrChildren[i].htmlType == 'datetime') {
-              if (this.$refs[item.hrChildren[i].columnName][0].config[item.hrChildren[i].columnName]) {
-                this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config[item.hrChildren[i].columnName]
-              }else{
+        this.$set(this.queryParams, obj, cont)
+      },
+      changeFn(obj) {
+        for (let key in obj) {
+          this.queryParams[key] = obj[key]
+        }
+      },
+      resetQuery() {
+
+      },
+      /** 搜索按钮操作 */
+      handleQuery(index) {
+        for (let item of this.queryData.showData) {
+          for (var i = 0; i < item.hrChildren.length; i++) {
+            if (item.hrChildren[i].htmlType == 'checkbox') {
+              this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config
+            } else if (item.hrChildren[i].htmlType == 'imageUpload' || item.hrChildren[i].htmlType == 'fileUpload') {
+              if (this.$refs[item.hrChildren[i].columnName][0].config.length) {
+                this.queryParams[item.hrChildren[i].columnName] = JSON.stringify(this.$refs[item.hrChildren[i].columnName][0].config)
+              }
+            } else if (item.hrChildren[i].htmlType == 'datetime') {
+              if (this.$refs[item.hrChildren[i].columnName][0].config[item.hrChildren[i].columnName]) {
+                this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config[item.hrChildren[i].columnName]
+              } else {
                 this.queryParams[item.hrChildren[i].columnName] = null
-              }
-            } else {
-              this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config[
-                item.hrChildren[i].columnName]
-            }
-          }
-        }
-        if (this.queryParams.pageNum !== undefined) {
-          this.queryParams.pageNum = undefined
-        }
-        if (this.queryParams.pageSize !== undefined) {
-          this.queryParams.pageSize = undefined
-        }
-
-        if (index == '删除') {
-          //删除
-          this.handleDelete(this.deledlid)
-        } else if (index == '提交') {
-          //提交  保存
-          this.formeanti.commitData = []
-          this.formy.status = 1
-          this.formeanti.commitData.push(this.formy)
-          this.antiSubmission()
-        } else if (index == '反提交') {
-          //反提交  保存
-          this.formeanti.commitData = []
-          this.formy.status = 2
-          this.formeanti.commitData.push(this.formy)
-          this.antiSubmission()
-        } else if (index == '保存') {
+              }
+            } else {
+              this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config[
+                item.hrChildren[i].columnName]
+            }
+          }
+        }
+        if (this.queryParams.pageNum !== undefined) {
+          this.queryParams.pageNum = undefined
+        }
+        if (this.queryParams.pageSize !== undefined) {
+          this.queryParams.pageSize = undefined
+        }
+
+        if (index == '删除') {
+          //删除
+          this.handleDelete(this.deledlid)
+        } else if (index == '提交') {
+          //提交  保存
+          this.formeanti.commitData = []
+          this.formy.status = 1
+          this.formeanti.commitData.push(this.formy)
+          this.antiSubmission()
+        } else if (index == '反提交') {
+          //反提交  保存
+          this.formeanti.commitData = []
+          this.formy.status = 2
+          this.formeanti.commitData.push(this.formy)
+          this.antiSubmission()
+        } else if (index == '保存') {
           // 修改
           this.forme.fixedData = this.queryParams
-          this.forme.fixedData[this.juegkae] =  this.tablees
-          this.submitForm()
-        } else if (index == '新增') {
-          //新增
-          this.xidugje = 0
-          this.reload()
+          this.forme.fixedData[this.juegkae] = this.tablees
+          this.submitForm()
+        } else if (index == '新增') {
+          //新增
+          this.xidugje = 0
+          this.reload()
         } else if (index == '返回') {
-          this.$store.dispatch("tagsView/delView", this.$route);
-          this.$router.go(-1)
-        } else if (index == '刷新') {
-          this.xidugje = 1
-          this.reload()
-        }
-        // this.getList();
-      },
-      getList() {
-
-      },
-      init() {
-        getTableQuery(
-          this.tableZbie
-        ).then(res => {
+          this.$store.dispatch("tagsView/delView", this.$route);
+          this.$router.go(-1)
+        } else if (index == '刷新') {
+          this.xidugje = 1
+          this.reload()
+        }
+        // this.getList();
+      },
+      getList() {
+
+      },
+      init() {
+        getTableQuery(
+          this.tableZbie
+        ).then(res => {
           let data = res.data
           this.queryData = {}
           this.queryData = data
@@ -216,41 +221,41 @@
           this.jeigneu = data.buttonList.split('')
           // console.log(data.buttonList)
           this.jeigneu.filter(route => {
-            if(route == 'A'){
-              if(this.formy.id == -1){
+            if (route == 'A') {
+              if (this.formy.id == -1) {
                 route = '保存'
                 this.jeigneutwo.push(route)
-              }else{
+              } else {
                 route = '新增'
               }
 
-            }else if(route == 'M'){
+            } else if (route == 'M') {
               route = '保存'
-              if(this.formy.id != -1){
+              if (this.formy.id != -1) {
                 this.jeigneutwo.push(route)
               }
-            }else if(route == 'D'){
+            } else if (route == 'D') {
               route = '删除'
-              if(this.formy.id != -1){
+              if (this.formy.id != -1) {
                 this.jeigneutwo.push(route)
               }
-            }else if(route == 'Q'){
+            } else if (route == 'Q') {
               route = '查询'
               this.jeigneutwo.push(route)
-            }else if(route == 'S'){
+            } else if (route == 'S') {
               route = '提交'
-              if(this.formy.id != -1){
+              if (this.formy.id != -1) {
                 this.jeigneutwo.push(route)
               }
-            }else if(route == 'U'){
+            } else if (route == 'U') {
               route = '反提交'
-              if(this.formy.id != -1){
+              if (this.formy.id != -1) {
                 this.jeigneutwo.push(route)
               }
-            }else if(route == 'I'){
+            } else if (route == 'I') {
               route = '导入'
               this.jeigneutwo.push(route)
-            }else if(route == 'E'){
+            } else if (route == 'E') {
               route = '导出'
               this.jeigneutwo.push(route)
             }
@@ -259,141 +264,143 @@
 
           this.jeigneutwo.push('刷新')
           this.jeigneutwo.push('返回')
-          if(this.xidugje == '刷新'){
-            if(res.code == 200){
+          if (this.xidugje == '刷新') {
+            if (res.code == 200) {
               this.msgSuccess("操作成功");
             }
           }
-         // 图片的显示隐藏
-         if(this.queryData.showData.length !==0){
-          this.queryData.showData.filter(route => {
-             route.hrChildren.filter(routerst =>{
-               if(this.queryData.table_column == undefined){
-                 this.queryData.table_column = null
-               }
-               routerst.tableColumnuy = this.queryData.table_column
+          // 图片的显示隐藏
+          if (this.queryData.showData.length !== 0) {
+            this.queryData.showData.filter(route => {
+              route.hrChildren.filter(routerst => {
+                if (this.queryData.table_column == undefined) {
+                  this.queryData.table_column = null
+                }
+                routerst.tableColumnuy = this.queryData.table_column
                 routerst.tableid = this.ojeuduj
-             })
-            if(route.cssClass !== null){
-              this.imgShoew = route.cssClass
-              if(route.cssClass == 2 || route.cssClass == 4){
-                route.hrChildren.filter(routers =>{
-                  routers.isonliy = true
-                })
-              }else{
-                route.hrChildren.filter(routers =>{
-                  routers.isonliy = false
-                })
+              })
+              if (route.cssClass !== null) {
+                this.imgShoew = route.cssClass
+                if (route.cssClass == 2 || route.cssClass == 4) {
+                  route.hrChildren.filter(routers => {
+                    routers.isonliy = true
+                  })
+                } else {
+                  route.hrChildren.filter(routers => {
+                    routers.isonliy = false
+                  })
+                }
               }
-            }
-          })
-         }
-        })
-      },
-      tablsie() {
-        getQueryList(
-          this.tabledeLise
-        ).then(res => {
-          let data = res.data
-          this.taleLisst = data
-        })
-      },
-      handleChange(val) {
-      },
-      // 按钮点击
-      delet(index) {
-        if (index == 'D') {
-          this.handleDelete(this.formy.id)
-        }
-      },
-      /** 新增 修改提交按钮 */
-      submitForm: function() {
-        this.$refs["queryForm"].validate(valid => {
+            })
+          }
+        })
+      },
+      tablsie() {
+        getQueryList(
+          this.tabledeLise
+        ).then(res => {
+          let data = res.data
+          this.taleLisst = data
+        })
+      },
+      handleChange(val) {
+      },
+      // 按钮点击
+      delet(index) {
+        if (index == 'D') {
+          this.handleDelete(this.formy.id)
+        }
+      },
+      /** 新增 修改提交按钮 */
+      submitForm: function () {
+        this.$refs["queryForm"].validate(valid => {
           if (valid) {
-            addbjectSave(this.forme).then(response => {
+            addbjectSave(this.forme).then(response => {
               this.msgSuccess("保存成功");
-              if(response.code == 200){
+              if (response.code == 200) {
                 this.cielsshow = true;
-              }else{
+              } else {
                 this.cielsshow = false;
               }
-              let query = Object.assign({'id':response.data,'tables': this.forme.table},{} )
+              let query = Object.assign({'id': response.data, 'tables': this.forme.table}, {})
               this.oieufr = response.data
-              this.$store.dispatch("tagsView/delView", this.$route);
-              this.$router.go(-1)
-            });
-          }
-        });
-      },
-      // 提交反提交
-      antiSubmission() {
-        this.$refs["queryForm"].validate(valid => {
-          if (valid) {
-            if (this.formy.status == 1) {
-              // 提交
-              tableSubimt(this.formeanti).then(response => {
+              this.$store.dispatch("tagsView/delView", this.$route);
+              this.$router.go(-1)
+            });
+          }
+        });
+      },
+      // 提交反提交
+      antiSubmission() {
+        this.$refs["queryForm"].validate(valid => {
+          if (valid) {
+            if (this.formy.status == 1) {
+              // 提交
+              tableSubimt(this.formeanti).then(response => {
                 this.msgSuccess("提交成功");
-                this.$store.dispatch("tagsView/delView", this.$route);
-                this.$router.go(-1)
-                // this.getList();
-              });
-            } else if (this.formy.status == 2) {
-              // 反提交
-              tableSubimtanit(this.formeanti).then(response => {
+                this.$store.dispatch("tagsView/delView", this.$route);
+                this.$router.go(-1)
+                // this.getList();
+              });
+            } else if (this.formy.status == 2) {
+              // 反提交
+              tableSubimtanit(this.formeanti).then(response => {
                 this.msgSuccess("反提交成功");
-                this.$store.dispatch("tagsView/delView", this.$route);
-                this.$router.go(-1)
-                // this.getList();
-              });
-            }
-          }
-        });
-      },
-      //删除
-      handleDelete(index) {
-        this.$confirm('是否确认删除', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delMenutab(index);
-        }).then(() => {
-          // this.getList();
+                this.$store.dispatch("tagsView/delView", this.$route);
+                this.$router.go(-1)
+                // this.getList();
+              });
+            }
+          }
+        });
+      },
+      //删除
+      handleDelete(index) {
+        this.$confirm('是否确认删除', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function () {
+          return delMenutab(index);
+        }).then(() => {
+          // this.getList();
           this.msgSuccess("删除成功");
-          this.$store.dispatch("tagsView/delView", this.$route);
-          this.$router.go(-1)
-        })
-      }
-    },
-  };
-</script>
-
-<style  lang="scss">
-  .table_header{
+          this.$store.dispatch("tagsView/delView", this.$route);
+          this.$router.go(-1)
+        })
+      }
+    },
+  };
+</script>
+
+<style lang="scss">
+  .table_header {
     position: relative;
-    .el-divider--horizontal{
+    .el-divider--horizontal {
       margin-top: 16px;
     }
   }
-  .table_forem{
-    .el-form--inline .el-form-item{
+
+  .table_forem {
+    .el-form--inline .el-form-item {
       width: 100% !important;
     }
-    .el-select{
+    .el-select {
       width: 100%;
     }
-    .el-date-editor.el-input{
+    .el-date-editor.el-input {
       width: 100% !important;
     }
-    .el-form-item--medium .el-form-item__content{
+    .el-form-item--medium .el-form-item__content {
       width: 70%;
     }
   }
-  .headertable_nav{
-    .el-collapse-item__wrap{
+
+  .headertable_nav {
+    .el-collapse-item__wrap {
       border-bottom: 0;
     }
-    .el-collapse-item__header{
+    .el-collapse-item__header {
       border-bottom: 0;
       font-size: 15px;
       font-family: PingFang SC;
@@ -404,7 +411,7 @@
     // .el-form-item__content{
     //   width: 55%;
     // }
-    .el-collapse{
+    .el-collapse {
       border-top: 0;
     }
   }
@@ -412,28 +419,28 @@
 </style>
 
 
-
 <style scoped lang="scss">
-  .app-main{
-     // background-color: #eef0ff !important;
+  .app-main {
+    // background-color: #eef0ff !important;
   }
-  .table_total{
-     background-color: #eef0ff;
-     height: 100%;
-     padding: 20px;
-     // 头部
-     .table_header{
-        background-color: #fff;
-        border-radius: 6px;
-        padding: 13px;
-        margin-bottom: 10px;
-      p{
-         font-size: 15px;
-         font-weight: bold;
-         color: #3C8DBC;
-         line-height: 36px;
-        }
-      p::before{
+
+  .table_total {
+    background-color: #eef0ff;
+    height: 100%;
+    padding: 20px;
+    // 头部
+    .table_header {
+      background-color: #fff;
+      border-radius: 6px;
+      padding: 13px;
+      margin-bottom: 10px;
+      p {
+        font-size: 15px;
+        font-weight: bold;
+        color: #3C8DBC;
+        line-height: 36px;
+      }
+      p::before {
         content: "";
         display: block;
         width: 18px;
@@ -442,76 +449,77 @@
         border-radius: 3px;
 
       }
-      .table_headerBtuntwo{
+      .table_headerBtuntwo {
         margin-bottom: 0 !important;
       }
-     }
-     // 内容
-     .headertable_nav{
-       background-color: #fff;
-       border-radius: 6px;
-       padding: 23px;
-     }
+    }
+    // 内容
+    .headertable_nav {
+      background-color: #fff;
+      border-radius: 6px;
+      padding: 23px;
+    }
   }
-  p{
+
+  p {
     margin: 0;
 
   }
-  .imge_tab{
+
+  .imge_tab {
     position: absolute;
     right: 0;
     top: 5px;
   }
-</style>
-
-
-
-<style scoped lang="scss">
-  .app-main {
-    // background-color: #eef0ff !important;
-  }
-
-  .table_total {
-    background-color: #eef0ff;
-    height: 100%;
-    padding: 20px;
-
-    // 头部
-    .table_header {
-      background-color: #fff;
-      border-radius: 6px;
-      padding: 13px;
-      margin-bottom: 10px;
-
-      p {
-        font-size: 15px;
-        font-weight: bold;
-        color: #3C8DBC;
-        line-height: 36px;
-      }
-
-      p::before {
-        content: "";
-        display: block;
-        width: 18px;
-        height: 8px;
-        background: #3C8DBC;
-        border-radius: 3px;
-
-      }
-    }
-
-    // 内容
-    .headertable_nav {
-      background-color: #fff;
-      border-radius: 6px;
+</style>
+
+
+<style scoped lang="scss">
+  .app-main {
+    // background-color: #eef0ff !important;
+  }
+
+  .table_total {
+    background-color: #eef0ff;
+    height: 100%;
+    padding: 20px;
+
+    // 头部
+    .table_header {
+      background-color: #fff;
+      border-radius: 6px;
+      padding: 13px;
+      margin-bottom: 10px;
+
+      p {
+        font-size: 15px;
+        font-weight: bold;
+        color: #3C8DBC;
+        line-height: 36px;
+      }
+
+      p::before {
+        content: "";
+        display: block;
+        width: 18px;
+        height: 8px;
+        background: #3C8DBC;
+        border-radius: 3px;
+
+      }
+    }
+
+    // 内容
+    .headertable_nav {
+      background-color: #fff;
+      border-radius: 6px;
       padding: 23px;
-      padding-top: 0;
-    }
-  }
-
-  p {
-    margin: 0;
-
-  }
+      padding-top: 0;
+    }
+  }
+
+  p {
+    margin: 0;
+
+  }
 </style>

+ 1035 - 1034
ruoyi-ui/src/views/tool/gen/editTable.vue

@@ -1,1034 +1,1035 @@
-<template>
-  <el-card>
-    <el-row type="flex" justify="space-between">
-      <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: 0 0 0 -100px;">
-            <el-button size="mini" type="primary" v-if="activeName=='basic' || activeName=='cloum'" @click="submitForm()">保存</el-button>
-            <el-button size="mini" @click="close()">返回</el-button>
-          </el-form-item>
-        </el-form>
-      </el-col>
-    </el-row>
-
-    <el-tabs v-model="activeName">
-      <el-tab-pane label="基本信息" name="basic">
-        <basic-info-form ref="basicInfo" :info="info" />
-      </el-tab-pane>
-      <el-tab-pane label="字段信息" name="cloum">
-        <el-row type="flex" style="margin-bottom: 20px;" v-if="activeName=='cloum'" :gutter="10" justify="end">
-          <el-col :span="1.5" style="display: flex; align-items: center;">
-            <el-button style="background-color: #FFE9ED;color: #E58481;border: 1px solid #E58481;" type="warning" plain
-              icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:post:add']">新增</el-button>
-          </el-col>
-          <el-col :span="1.5" style="display: flex; align-items: center;">
-            <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
-              v-hasPermi="['system:post:remove']" style="background-color: #FFD6B0;color: #EA551A;border: 1px solid #F4AD6B;">删除</el-button>
-          </el-col>
-          <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
-        </el-row>
-        <el-table ref="dragTable" @row-dblclick="dbSelectedZd" align="center" :data="cloumns" row-key="columnId"
-          :max-height="tableHeight" @selection-change="handleSelectionChange">
-          <el-table-column type="selection" width="55" align="center" />
-          <el-table-column label="序号" type="index" min-width="5%" class-name="allowDrag" align="center" />
-          <el-table-column label="字段列名" prop="columnName" min-width="10%" :show-overflow-tooltip="true" align="center" />
-          <el-table-column label="字段描述" min-width="10%" align="center">
-            <template slot-scope="scope">
-              <el-input v-model="scope.row.columnComment"></el-input>
-            </template>
-          </el-table-column>
-          <el-table-column label="物理类型" prop="columnType" align="center" min-width="10%" :show-overflow-tooltip="true" />
-          <el-table-column label="字段显示规则" align="center" prop="mask" min-width="13%" />
-          <el-table-column label="排序" min-width="8%" align="center" prop="sort" />
-          <el-table-column label="输入字段" min-width="10%" align="center">
-            <template slot-scope="scope">
-              <el-checkbox true-label="Y" false-label="N" v-model="scope.row.isIn"></el-checkbox>
-            </template>
-          </el-table-column>
-          <el-table-column label="显示字段" min-width="10%" align="center">
-            <template slot-scope="scope">
-              <el-checkbox true-label="Y" false-label="N" v-model="scope.row.isOut"></el-checkbox>
-            </template>
-          </el-table-column>
-          <el-table-column label="查询" min-width="8%" align="center">
-            <template slot-scope="scope">
-              <el-checkbox true-label="1" false-label="0" v-model="scope.row.isQuery"></el-checkbox>
-            </template>
-          </el-table-column>
-          <el-table-column label="关联HR字段" min-width="13%" align="center" prop="hrParentId">
-            <template slot-scope="scope">
-              <div>
-                {{scope.row.hrParentName}}
-              </div>
-            </template>
-          </el-table-column>
-          <el-table-column label="缺省值" min-width="10%" align="center" prop="defaultValue" />
-          <el-table-column label="外键" min-width="10%" align="center" prop="foreignKey">
-            <template slot-scope="scope">
-              <div>
-                {{scope.row.foreignKeyName}}
-              </div>
-            </template>
-          </el-table-column>
-          <el-table-column label="必填" min-width="8%" align="center">
-            <template slot-scope="scope">
-              <el-checkbox true-label="1" false-label="0" v-model="scope.row.isRequired"></el-checkbox>
-            </template>
-          </el-table-column>
-          <el-table-column label="显示类型" min-width="12%" align="center">
-            <template slot-scope="scope">
-              <el-select v-model="scope.row.htmlType">
-                <el-option label="文本框" value="input" />
-                <el-option label="文本域" value="textarea" />
-                <el-option label="下拉框" value="select" />
-                <el-option label="单选框" value="radio" />
-                <el-option label="复选框" value="checkbox" />
-                <el-option label="日期控件" value="datetime" />
-                <el-option label="图片上传" value="imageUpload" />
-                <el-option label="文件上传" value="fileUpload" />
-                <el-option label="富文本控件" value="editor" />
-                <el-option label="年月日时分秒控件" value="fulltime" />
-                <el-option label="hr" value="hr" />
-              </el-select>
-            </template>
-          </el-table-column>
-          <el-table-column label="字典类型" min-width="12%" align="center">
-            <template slot-scope="scope">
-              <el-select v-model="scope.row.dictType" clearable filterable placeholder="请选择">
-                <el-option v-for="dict in dictOptions" :key="dict.dictType" :label="dict.dictName" :value="dict.dictType">
-                  <span style="float: left">{{ dict.dictName }}</span>
-                  <span style="float: right; color: #8492a6; font-size: 13px">{{ dict.dictType }}</span>
-                </el-option>
-              </el-select>
-            </template>
-          </el-table-column>
-        </el-table>
-        <!-- 添加或修改岗位对话框 -->
-        <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="openZd" width="70vw" append-to-body>
-          <el-form ref="formZd" :model="formZd" :rules="rulesZd" label-width="120px">
-            <el-row>
-              <el-col :span="8">
-                <el-form-item label="字段名:" prop="columnName">
-                  <el-input :disabled="this.formZd.id" v-model="formZd.columnName" placeholder="请输入字段名" />
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="字段描述:" prop="columnComment">
-                  <el-input v-model="formZd.columnComment" placeholder="请输入字段描述" />
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="物理类型:" prop="columnType">
-                  <el-input v-model="formZd.columnType" placeholder="请输入物理类型" />
-                </el-form-item>
-              </el-col>
-            </el-row>
-            <el-row>
-              <el-col :span="8">
-                <el-form-item label="字段显示规则:" prop="mask">
-                  <el-input v-model="formZd.mask" placeholder="请输入字段显示规则" />
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="排序:" prop="sort">
-                  <el-input-number style="width: 100%;" v-model="formZd.sort" placeholder="请输入排序" />
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="正则表达式:" prop="regular">
-                  <el-input v-model="formZd.regular" placeholder="请输入正则表达式" />
-                </el-form-item>
-              </el-col>
-            </el-row>
-
-            <el-row>
-              <el-col :span="8">
-                <el-form-item label="外键(FK):" prop="foreignKey">
-                  <!-- <el-select style="width: 100%;" filterable v-model="formZd.foreignKey" placeholder="请选择外键(FK)" clearable size="small">
-                    <el-option v-for="dict in columList" :key="dict.columnId" :label="dict.columnName" :value="dict.columnId" />
-                  </el-select> -->
-                  <div style="cursor: pointer;" @click="fkzdFn">
-                    <el-input readonly style="width: 100%;" clearable v-model="ForeName" placeholder="请选择外键(FK)" />
-                  </div>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="关联HR字段:" prop="hrParentId">
-                  <el-select style="width: 100%;" v-model="formZd.hrParentId" placeholder="请选择关联HR字段" clearable>
-                    <el-option v-for="dict in columHRList" :key="dict.id" :label="dict.columnName" :value="dict.id" />
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="缺省值:" prop="defaultValue">
-                  <el-input v-model="formZd.defaultValue" placeholder="请输入缺省值" />
-                </el-form-item>
-              </el-col>
-            </el-row>
-            <el-row>
-              <el-col :span="8">
-                <el-form-item label="行数:" prop="numRows">
-                  <el-input-number style="width: 100%;" v-model="formZd.numRows" placeholder="请输入行数" />
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="列数:" prop="numColumns">
-                  <el-input-number style="width: 100%;" v-model="formZd.numColumns" placeholder="请输入列数" />
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="字段翻译器:" prop="fieldTranslator">
-                  <el-input v-model="formZd.fieldTranslator" placeholder="请输入字段翻译器" />
-                </el-form-item>
-              </el-col>
-            </el-row>
-            <el-row>
-              <el-col :span="8">
-                <el-form-item label="扩展属性:" prop="extendedAttributes">
-                  <el-input v-model="formZd.extendedAttributes" placeholder="请输入扩展属性" />
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="查询方式:" prop="queryType">
-                  <el-select style="width: 100%;" v-model="formZd.queryType">
-                    <el-option label="=" value="EQ" />
-                    <el-option label="!=" value="NE" />
-                    <el-option label=">" value="GT" />
-                    <el-option label=">=" value="GTE" />
-                    <el-option label="<" value="LT" />
-                    <el-option label="<=" value="LTE" />
-                    <el-option label="LIKE" value="LIKE" />
-                    <el-option label="BETWEEN" value="BETWEEN" />
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="显示类型:" prop="htmlType">
-                  <el-select style="width: 100%;" v-model="formZd.htmlType">
-                    <el-option label="文本框" value="input" />
-                    <el-option label="文本域" value="textarea" />
-                    <el-option label="下拉框" value="select" />
-                    <el-option label="单选框" value="radio" />
-                    <el-option label="复选框" value="checkbox" />
-                    <el-option label="日期控件" value="datetime" />
-                    <el-option label="图片上传" value="imageUpload" />
-                    <el-option label="文件上传" value="fileUpload" />
-                    <el-option label="富文本控件" value="editor" />
-                    <el-option label="hr" value="hr" />
-                  </el-select>
-                </el-form-item>
-              </el-col>
-            </el-row>
-            <el-row>
-              <el-col :span="8">
-                <el-form-item label="字典类型:" prop="dictType">
-                  <template slot-scope="scope">
-                    <el-select style="width: 100%;" v-model="formZd.dictType" clearable filterable placeholder="请选择">
-                      <el-option v-for="dict in dictOptions" :key="dict.dictType" :label="dict.dictName" :value="dict.dictType">
-                        <span style="float: left">{{ dict.dictName }}</span>
-                        <span style="float: right; color: #8492a6; font-size: 13px">{{ dict.dictType }}</span>
-                      </el-option>
-                    </el-select>
-                  </template>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="单据编号规则:" prop="seqName">
-                  <el-input v-model="formZd.seqName" placeholder="请输入单据编号规则" />
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="显示字段" prop="isOut">
-                  <el-checkbox true-label="Y" false-label="N" v-model="formZd.isOut"></el-checkbox>
-                </el-form-item>
-              </el-col>
-            </el-row>
-            <el-row>
-              <el-col :span="8">
-                <el-form-item label="输入字段" prop="isIn">
-                  <el-checkbox true-label="Y" false-label="N" v-model="formZd.isIn"></el-checkbox>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="查询条件" prop="isQuery">
-                  <el-checkbox true-label="1" false-label="0" v-model="formZd.isQuery"></el-checkbox>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="必填" prop="isRequired">
-                  <el-checkbox true-label="1" false-label="0" v-model="formZd.isRequired"></el-checkbox>
-                </el-form-item>
-              </el-col>
-            </el-row>
-          </el-form>
-          <div slot="footer" class="dialog-footer">
-            <el-button type="primary" @click="submitFormZd">确 定</el-button>
-            <el-button @click="cancel">取 消</el-button>
-          </div>
-        </el-dialog>
-      </el-tab-pane>
-      <!-- <el-tab-pane label="生成信息" name="genInfo">
-        <gen-info-form ref="genInfo" :info="info" :tables="tables" :menus="menus"/>
-      </el-tab-pane> -->
-      <el-tab-pane label="关联表" name="genInfo">
-        <el-row style="margin-bottom: 20px;" type="flex" :gutter="10" justify="end">
-          <el-col :span="1.5">
-            <el-button @click="handleAdd_gl" icon="el-icon-plus" size="mini" style="background-color: #FFE9ED;color: #E58481;border: 1px solid #E58481;">新增</el-button>
-          </el-col>
-          <el-col :span="1.5">
-            <el-button icon="el-icon-delete" @click="handleDel_gl" size="mini" style="background-color: #FFD6B0;color: #EA551A;border: 1px solid #F4AD6B;"
-              :disabled="multiple1">删除</el-button>
-          </el-col>
-        </el-row>
-        <el-table ref="dragTable" @row-dblclick="dbSelected" v-loading="loading" :data="postList" row-key="columnId"
-          align="center" :max-height="tableHeight" @selection-change="handleSelectionChange1">
-          <el-table-column type="selection" width="55" align="center" />
-          <el-table-column label="id" width="60" align="center" prop="id" />
-          <el-table-column label="可用" align="center" prop="isDel">
-            <template slot-scope="scope">
-              <el-checkbox true-label="Y" disabled false-label="N" v-model="scope.row.isDel"></el-checkbox>
-            </template>
-          </el-table-column>
-          <el-table-column label="序号" align="center" prop="sort" />
-          <el-table-column label="描述" align="center" prop="description" />
-          <el-table-column label="关联表" align="center" prop="tableName" />
-          <el-table-column label="字段(关联到主表PK)" width="160px" align="center" prop="columnName" />
-          <el-table-column label="显示条件" align="center" prop="displayConditions" />
-          <el-table-column label="关联方式" align="center" prop="relationType">
-            <template slot-scope="scope">
-              {{scope.row.relationType | relationTypeFn}}
-            </template>
-          </el-table-column>
-          <el-table-column label="内嵌编辑" align="center" prop="embedEdit">
-            <template slot-scope="scope">
-              {{scope.row.embedEdit | embedEditFn}}
-            </template>
-          </el-table-column>
-          <el-table-column label="修改人" align="center" prop="updateBy" />
-          <el-table-column label="修改时间" align="center" prop="updateTime" />
-        </el-table>
-        <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
-          @pagination="tabList" />
-      </el-tab-pane>
-      <el-tab-pane label="数据库SQL" name="genSql">
-        <el-row type="flex" justify="end">
-          <el-button @click="zxCreaBtn" size="mini" style="background-color: #FFE9ED;color: #E58481;border: 1px solid #E58481;">执行创建语句</el-button>
-          <el-button @click="sxCreaBtn" size="mini" style="background-color: #FFD6B0;color: #EA551A;border: 1px solid #F4AD6B;">刷新创建语句</el-button>
-        </el-row>
-        <el-form>
-          <el-form-item label="创建语句:" style="margin-top: 20px;">
-            <el-input class="resizeNone" v-model="tableSqlData.createSql" type="textarea" />
-          </el-form-item>
-          <el-form-item label="修改日志:">
-            <el-input class="resizeNone" v-model="tableSqlData.createLog" type="textarea" />
-          </el-form-item>
-        </el-form>
-      </el-tab-pane>
-    </el-tabs>
-    <!-- 添加或修改岗位对话框 -->
-    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
-        <el-form-item label="描述:" prop="postName">
-          <el-input v-model="form.description" placeholder="请输入描述" />
-        </el-form-item>
-        <el-form-item label="关联表:" prop="relationParentId">
-          <el-select style="width: 100%;" v-model="form.relationParentId" placeholder="请选择关联表" @change="relationFn"
-           >
-            <el-option v-for="item in tableList.rows" :key="item.id" :label="item.tableComment" :value="item.id">
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="字段:" prop="relationChildId">
-          <el-select style="width: 100%;" v-model="form.relationChildId" placeholder="请选择字段">
-            <el-option v-for="item in genList" v-if="item.foreignKey" :key="item.id" :label="item.columnName" :value="item.id">
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="显示条件:" prop="displayConditions">
-          <el-input v-model="form.displayConditions" controls-position="right" placeholder="请输入显示条件" />
-        </el-form-item>
-        <el-form-item label="关联方式:" prop="relationType">
-          <el-select style="width: 100%;" v-model="form.relationType" placeholder="请选择关联方式" clearable size="small">
-            <el-option v-for="dict in relationType" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
-          </el-select>
-        </el-form-item>
-        <el-form-item label="内嵌编辑:" prop="embedEdit">
-          <el-select style="width: 100%;" v-model="form.embedEdit" placeholder="岗位状态" clearable size="small">
-            <el-option v-for="dict in embedEdit" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
-          </el-select>
-        </el-form-item>
-        <el-form-item label="序号:" prop="sort">
-          <el-input-number style="width: 100%;" v-model="form.sort" controls-position="right" :min="0" />
-        </el-form-item>
-        <el-form-item label="是否可用:" prop="isDel">
-          <el-checkbox true-label="Y" false-label="N" v-model="form.isDel"></el-checkbox>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="addGlfn">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
-    </el-dialog>
-    <!-- 快速搜索对话框 -->
-    <el-dialog :close-on-click-modal="false" :title="titleopenquery" :visible.sync="openquery" width="1200px" append-to-body>
-      <el-form ref="formquery" @row-dblclick="dbSelectedZd" :model="formquery" :rules="rules" label-width="100px">
-          <dynamic-forms :type='0' :ref="item.columnName" :config="formquery.fixedData" @inputs = "changeFn" :formConfig="item" v-for="(item,index) in queryData.queryList" :key='index' />
-      <el-form-item style="display: inline-block;">
-        <el-button type="primary"   @click="handleQuery">搜索</el-button>
-        <el-button   @click="openquery = false">取消</el-button>
-      </el-form-item>
-      </el-form>
-      <el-table stripe @row-dblclick="tableBtn" :data="postListquery.rows" @selection-change="handleSelectionChange">
-        <el-table-column :label="item.columnComment" align="center" :prop="item.columnName" v-for="(item,index) in postListquery.tableHeadList" :key="index"  />
-      </el-table>
-      <pagination
-        v-show="totalquery>0"
-        :total="totalquery"
-        :page.sync="aliemg.pageNo"
-        :limit.sync="aliemg.pageSize"
-        @pagination="getLisail"
-      />
-    </el-dialog>
-  </el-card>
-</template>
-<script>
-  import {
-    getGenTable,
-    updateGenTable,
-    delPost,
-    tabList,
-    listTable,
-    addGenTable,
-    setGenTable,
-    delGenTable,
-    listAllColumnsByTableId,
-    genTableColumnList,
-    tableSql,
-    zxImplement,
-    getReload,
-    addGenTableColumn,
-    delGenTableColumn,
-    setGenTableColumn,
-    getGenTableColumn,
-    getByIdWithForeignKey,
-    listIndexfou,
-    tableQuery,
-    qurGenTable
-  } from "@/api/tool/gen";
-  import {
-    optionselect as getDictOptionselect
-  } from "@/api/system/dict/type";
-  import {
-    listMenu as getMenuTreeselect
-  } from "@/api/system/menu";
-  import basicInfoForm from "./basicInfoForm";
-  import genInfoForm from "./genInfoForm";
-  import Sortable from 'sortablejs'
-
-  let _this = ''
-  export default {
-    name: "GenEdit",
-    components: {
-      basicInfoForm,
-      genInfoForm
-    },
-    data() {
-      _this = this
-      return {
-        ForeName: '',
-        totalquery:0,
-        // 多行查询
-        titleopenquery:'快速查询',
-        // 获取输入框的参数
-        queryLisr:{
-          table:'gen_table_column'
-        },
-        aliemg:{
-          table:'gen_table_column',
-          orderBy:'create_time desc',
-          pageNo:1,
-          pageSize:10,
-          fixedData:{
-            condition:''
-          }
-        },
-        postListquery:{},
-        queryData: {},
-        openquery:false,
-        formquery:{},
-        // 字段信息
-        tableSqlData: [],
-        columList: [],
-        columHRList: [],
-        foreignKey: [],
-        openZd: false,
-        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: "",
-        loading: false,
-        open: false,
-        form: {},
-        rules: {
-          relationParentId: [{
-            required: true,
-            message: "请选择关联表",
-            trigger: "blur"
-          }],
-          relationChildId: [{
-            required: true,
-            message: "请选择字段",
-            trigger: "blur"
-          }],
-          relationType: [{
-            required: true,
-            message: "请选择关联条件",
-            trigger: "blur"
-          }],
-        },
-        postList: [],
-        total: 1,
-        tableList: {},
-        // 关联方式
-
-        // 内嵌编辑
-        genList: [],
-        glbParams: {
-          pageNum: 1,
-          pageSize: 10000000,
-        },
-        // 关联表查询参数
-        queryParams: {
-          relationParentId: this.$route.params && this.$route.params.tableId,
-          pageNum: 1,
-          pageSize: 10,
-        },
-        // 选中选项卡的 name
-        activeName: "basic",
-        // 表格的高度
-        tableHeight: document.documentElement.scrollHeight - 245 + "px",
-        // 表信息
-        tables: [],
-        // 表列信息
-        cloumns: [],
-        // 字典信息
-        dictOptions: [],
-        // 菜单信息
-        menus: [],
-        // 表详细信息
-        info: {},
-        // 选中数组
-        ids: [],
-        ids1: [],
-        // 非单个禁用
-        single: true,
-        single1: true,
-        // 非多个禁用
-        multiple: true,
-        multiple1: true,
-        // 关联方式
-        relationType: [],
-        // 内嵌编辑
-        embedEdit: [],
-      };
-    },
-    filters: {
-      zdFn(data) {
-        let is = ''
-        for (let item of _this.columList) {
-          if (item.columnId == data) {
-            is = item.columnName
-          }
-        }
-        return is
-      },
-      relationTypeFn(data) {
-        let is = ''
-        for (let item of _this.relationType) {
-          if (item.dictValue == data) {
-            is = item.dictLabel
-          }
-        }
-        return is
-      },
-      embedEditFn(data) {
-        let is = ''
-        for (let item of _this.embedEdit) {
-          if (item.dictValue == data) {
-            is = item.dictLabel
-          }
-        }
-        return is
-      },
-    },
-    created() {
-      const tableId = this.$route.params && this.$route.params.tableId;
-      if (tableId) {
-        // 获取表详细信息
-        getGenTable(tableId).then(res => {
-          this.cloumns = res.data.rows;
-          this.info = res.data.info;
-          console.log(this.info,33456)
-          this.tables = res.data.tables;
-        });
-        //查询数据库sql
-        tableSql(tableId).then(res => {
-          if (res.data) {
-            this.tableSqlData = res.data
-          }
-        })
-        /** 查询字典下拉列表 */
-        getDictOptionselect().then(response => {
-          this.dictOptions = response.data;
-        });
-        // 关联HR字段
-        genTableColumnList({
-          tableId,
-          htmlType: 'HR'
-        }).then(response => {
-          this.columHRList = response.rows;
-        });
-        // 关联字段
-        listAllColumnsByTableId({
-          id:tableId
-        }).then(response => {
-          this.columList = response.data;
-        });
-        // 关联表数据
-        listTable(this.glbParams).then(response => {
-          this.tableList = response;
-        });
-        /** 查询菜单下拉列表 */
-        // getMenuTreeselect().then(response => {
-        //   this.menus = this.handleTree(response.data, "menuId");
-        // });
-        // 关联方式
-        this.getDicts("relation_type").then(response => {
-          this.relationType = response.data;
-        });
-        // 内嵌编辑
-        this.getDicts("embed_edit").then(response => {
-          this.embedEdit = response.data;
-        });
-      }
-      this.tabList()
-
-    },
-    methods: {
-      tableBtn(row){
-        this.openquery = false
-        this.ForeName = row.column_name
-        this.formZd.foreignKey = row.id
-      },
-      fkzdFn() {
-        this.queryedit()
-        this.getLisail()
-        this.openquery = true
-      },
-      changeFn(obj) {
-        console.log(obj)
-        for(let key in obj){
-          this.formquery.fixedData[key] = obj[key]
-        }
-      },
-      // 快速查询
-      queryedit(){
-        this.loading = true;
-        tableQuery(this.queryLisr).then(response => {
-           let data = response.data
-           this.queryData = data
-            this.loading = false;
-          })
-      },
-      handleQuery(){
-        for(let item of this.queryData.queryList){
-          if(item.htmlType == 'checkbox' || item.htmlType == 'imageUpload' || item.htmlType == 'fileUpload'){
-            this.formquery[item.columnName] = this.$refs[item.columnName][0].config
-          } else{
-            this.formquery[item.columnName] = this.$refs[item.columnName][0].config[item.columnName]
-          }
-        }
-       this.aliemg.fixedData.condition = this.formquery
-       this.getLisail()
-      },
-      // 快速查询列表
-      getLisail() {
-        this.loading = true;
-        listIndexfou(this.aliemg).then(response => {
-            if(response.data){
-              // this.tableDataalid = response.data.tableHeadList;
-              this.postListquery = response.data
-              this.postListquery.rows.filter(route => {
-                if(route.table_id){
-                   route.table_id = route.table_id.name
-                }
-              })
-              this.totalquery = response.data.total;
-            }
-            this.loading = false;
-          }
-        );
-      },
-      submitFormZd() {
-        this.$refs["formZd"].validate(valid => {
-          if (valid) {
-            const tableId = this.$route.params && this.$route.params.tableId;
-            this.formZd.tableId = tableId
-            if (this.formZd.id != undefined) {
-              setGenTableColumn(this.formZd).then(response => {
-                this.msgSuccess("修改成功");
-                this.openZd = false;
-                // 获取表详细信息
-                getGenTable(tableId).then(res => {
-                  this.cloumns = res.data.rows;
-                  this.info = res.data.info;
-                  this.tables = res.data.tables;
-                });
-              });
-            } else {
-              addGenTableColumn(this.formZd).then(response => {
-                this.msgSuccess("新增成功");
-                this.openZd = false;
-                // 获取表详细信息
-                getGenTable(tableId).then(res => {
-                  this.cloumns = res.data.rows;
-                  this.info = res.data.info;
-                  this.tables = res.data.tables;
-                });
-              });
-            }
-
-          }
-        });
-      },
-      sxCreaBtn() {
-        const tableId = this.$route.params && this.$route.params.tableId
-        getReload({
-          tableId,
-          createSql: this.tableSqlData.createSql,
-          createLog: this.tableSqlData.createLog,
-          id: this.tableSqlData.id
-        }).then(res => {
-          this.msgSuccess('刷新成功')
-          //查询数据库sql
-          tableSql(tableId).then(res => {
-            if (res.data) {
-              this.tableSqlData = res.data
-            }
-          })
-        })
-      },
-      zxCreaBtn() {
-        const _this = this
-        this.$confirm('是否确认执行创建语句?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return zxImplement({
-            tableId: _this.$route.params && _this.$route.params.tableId,
-            createSql: _this.tableSqlData.createSql,
-            createLog: _this.tableSqlData.createLog,
-            id: _this.tableSqlData.id
-          })
-        }).then(res => {
-          _this.msgSuccess('执行成功')
-        })
-      },
-      dbSelectedZd(row) {
-        this.reset();
-        const id = row.id
-        getByIdWithForeignKey(id).then(response => {
-          let data = response.data
-          data.foreignKey = data.foreignKey ? data.foreignKey - 0 : ''
-          this.formZd = data;
-          if(data.fkInfo){
-            this.ForeName = data.fkInfo.value
-          }
-          this.openZd = true;
-          this.title = "修改字段信息";
-        });
-      },
-      dbSelected(row) {
-        this.reset();
-        const id = row.id
-        qurGenTable(id).then(response => {
-          let data = response.data
-          data.relationType = data.relationType + ""
-          data.embedEdit = data.embedEdit?(data.embedEdit + ""): data.embedEdit
-          getGenTable(data.relationParentId).then(res => {
-            this.genList = res.data.rows;
-            this.form = data;
-            this.open = true;
-            this.title = "修改关联表";
-          });
-        });
-      },
-      addGlfn() {
-        this.$refs["form"].validate(valid => {
-          if (valid) {
-            let datas = JSON.parse(JSON.stringify(this.form))
-            datas.relationParentId = this.info.id
-            console.log(datas,this.info.id,9998)
-            if (this.form.id != undefined) {
-              setGenTable(datas).then(response => {
-                this.msgSuccess("修改成功");
-                this.open = false;
-                this.tabList();
-              });
-            } else {
-              addGenTable(datas).then(response => {
-                this.msgSuccess("新增成功");
-                this.open = false;
-                this.tabList();
-              });
-            }
-          }
-        });
-      },
-      relationFn(data) {
-        getGenTable(data).then(res => {
-          this.genList = res.data.rows;
-        });
-      },
-      loadMore() {
-        const _this = this
-        let num = _this.tableList.total % 10 == 0 ? _this.tableList.total / 10 : ((_this.tableList.total - _this.tableList
-          .total % 10) / 10 + 1)
-        console.log(num, 1)
-        if (this.glbParams.pageNum < num) {
-          this.glbParams.pageNum++
-          // 关联表数据
-          listTable(this.glbParams).then(response => {
-            let data = response
-            data.rows = _this.tableList.rows.concat(data.rows)
-            _this.tableList = data;
-          });
-        }
-      },
-      // 取消按钮
-      cancel() {
-        this.open = false;
-        this.reset();
-        this.openZd = false;
-        this.resetZd();
-      },
-      // 关联表数据
-      tabList() {
-        this.loading = true;
-        tabList(this.queryParams).then(response => {
-          this.postList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        });
-      },
-      /** 新增按钮操作 */
-      handleAdd_gl() {
-        this.reset();
-        this.open = true;
-        console.log(this.form)
-        this.title = "新增关联表";
-      },
-      handleDel_gl(row) {
-        const ids = row.id || this.ids1;
-        this.$confirm('是否确认删除id为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delGenTable(ids);
-        }).then(() => {
-          this.tabList();
-          this.msgSuccess("删除成功");
-        })
-      },
-      // 表单重置
-      reset() {
-        this.form = {
-          isDel: 'N'
-        };
-        this.resetForm("form");
-      },
-      resetZd() {
-        this.formZd = {
-        };
-        this.resetForm("formZd");
-      },
-      /** 提交按钮 */
-      submitForm() {
-        let isInFlag = 0
-        let isOutFlag = 0
-
-        for(let item of this.cloumns){
-          if(item.isIn=='Y'){
-            isInFlag++
-          }
-          if(item.isOut=='Y'){
-            isOutFlag++
-          }
-        }
-        if(isInFlag>1){
-          this.msgError('"输入字段"最多只能选择一个!')
-          return
-        }
-        if(isOutFlag>1){
-          this.msgError('"显示字段"最多只能选择一个!')
-          return
-        }
-        const basicForm = this.$refs.basicInfo.$refs.basicInfoForm;
-        const tabnum = Object.assign({}, basicForm.model)
-        console.log(tabnum.tableColumn,234)
-        if(tabnum.tableColumn >4 ){
-           this.msgError('列数最大只能输入4')
-           return
-        }
-        if( tabnum.tableColumn <1){
-          this.msgError('最小只能输入1')
-          return
-        }
-
-
-        // const genForm = this.$refs.genInfo.$refs.genInfoForm;
-        Promise.all([basicForm].map(this.getFormPromise)).then(res => {
-          const validateResult = res.every(item => !!item);
-          if (validateResult) {
-            const genTable = Object.assign({}, basicForm.model);
-            genTable.columns = this.cloumns;
-            // genTable.params = {
-            //   treeCode: genTable.treeCode,
-            //   treeName: genTable.treeName,
-            //   treeParentCode: genTable.treeParentCode,
-            //   parentMenuId: genTable.parentMenuId
-            // };
-            console.log(genTable)
-            if(this.activeName=='basic'){
-              genTable.updateType ='1'
-            }
-            if(this.activeName=='cloum'){
-              genTable.updateType ='2'
-            }
-            updateGenTable(genTable).then(res => {
-              this.msgSuccess(res.msg);
-              if (res.code === 200) {
-                this.close();
-              }
-            });
-          } else {
-            this.msgError("表单校验未通过,请重新检查提交内容");
-          }
-        });
-      },
-      getFormPromise(form) {
-        return new Promise(resolve => {
-          form.validate(res => {
-            resolve(res);
-          });
-        });
-      },
-      /** 关闭按钮 */
-      close() {
-        this.$store.dispatch("tagsView/delView", this.$route);
-        this.$router.push({
-          path: "/tool/gen",
-          query: {
-            t: Date.now()
-          }
-        })
-      },
-      // 多选框选中数据
-      handleSelectionChange(selection) {
-        this.ids = selection.map(item => item.id)
-        this.single = selection.length != 1
-        this.multiple = !selection.length
-      },
-      // 多选框选中数据
-      handleSelectionChange1(selection) {
-        this.ids1 = selection.map(item => item.id)
-        this.single1 = selection.length != 1
-        this.multiple1 = !selection.length
-      },
-      /** 删除按钮操作 */
-      handleDelete(row) {
-        const ids = row.id || this.ids;
-        const tableId = this.$route.params && this.$route.params.tableId;
-        this.$confirm('是否确认删除字段编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delGenTableColumn(ids);
-        }).then(() => {
-          // 获取表详细信息
-          getGenTable(tableId).then(res => {
-            this.cloumns = res.data.rows;
-            this.info = res.data.info;
-            this.tables = res.data.tables;
-          });
-          this.msgSuccess("删除成功");
-        })
-      },
-      handleAdd() {
-        this.resetZd();
-        this.openZd = true;
-        this.title = "新增字段信息";
-      }
-    },
-    mounted() {
-      const el = this.$refs.dragTable.$el.querySelectorAll(".el-table__body-wrapper > table > tbody")[0];
-      const sortable = Sortable.create(el, {
-        handle: ".allowDrag",
-        onEnd: evt => {
-          const targetRow = this.cloumns.splice(evt.oldIndex, 1)[0];
-          this.cloumns.splice(evt.newIndex, 0, targetRow);
-          for (let index in this.cloumns) {
-            this.cloumns[index].sort = parseInt(index) + 1;
-          }
-        }
-      });
-    }
-  };
-</script>
-<style lang="scss">
-  .pagination-container {
-    height: 35px;
-  }
-
-  .resizeNone {
-    width: 60vw;
-    border-radius: 3px;
-
-    .el-textarea__inner {
-      //el_input中的隐藏属性
-      resize: none; //主要是这个样式
-      height: 200px;
-    }
-  }
-</style>
+<template>
+  <el-card>
+    <el-row type="flex" justify="space-between">
+      <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: 0 0 0 -100px;">
+            <el-button size="mini" type="primary" v-if="activeName=='basic' || activeName=='cloum'" @click="submitForm()">保存</el-button>
+            <el-button size="mini" @click="close()">返回</el-button>
+          </el-form-item>
+        </el-form>
+      </el-col>
+    </el-row>
+
+    <el-tabs v-model="activeName">
+      <el-tab-pane label="基本信息" name="basic">
+        <basic-info-form ref="basicInfo" :info="info" />
+      </el-tab-pane>
+      <el-tab-pane label="字段信息" name="cloum">
+        <el-row type="flex" style="margin-bottom: 20px;" v-if="activeName=='cloum'" :gutter="10" justify="end">
+          <el-col :span="1.5" style="display: flex; align-items: center;">
+            <el-button style="background-color: #FFE9ED;color: #E58481;border: 1px solid #E58481;" type="warning" plain
+              icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:post:add']">新增</el-button>
+          </el-col>
+          <el-col :span="1.5" style="display: flex; align-items: center;">
+            <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
+              v-hasPermi="['system:post:remove']" style="background-color: #FFD6B0;color: #EA551A;border: 1px solid #F4AD6B;">删除</el-button>
+          </el-col>
+          <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
+        </el-row>
+        <el-table ref="dragTable" @row-dblclick="dbSelectedZd" align="center" :data="cloumns" row-key="columnId"
+          :max-height="tableHeight" @selection-change="handleSelectionChange">
+          <el-table-column type="selection" width="55" align="center" />
+          <el-table-column label="序号" type="index" min-width="5%" class-name="allowDrag" align="center" />
+          <el-table-column label="字段列名" prop="columnName" min-width="10%" :show-overflow-tooltip="true" align="center" />
+          <el-table-column label="字段描述" min-width="10%" align="center">
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.columnComment"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column label="物理类型" prop="columnType" align="center" min-width="10%" :show-overflow-tooltip="true" />
+          <el-table-column label="字段显示规则" align="center" prop="mask" min-width="13%" />
+          <el-table-column label="排序" min-width="8%" align="center" prop="sort" />
+          <el-table-column label="输入字段" min-width="10%" align="center">
+            <template slot-scope="scope">
+              <el-checkbox true-label="Y" false-label="N" v-model="scope.row.isIn"></el-checkbox>
+            </template>
+          </el-table-column>
+          <el-table-column label="显示字段" min-width="10%" align="center">
+            <template slot-scope="scope">
+              <el-checkbox true-label="Y" false-label="N" v-model="scope.row.isOut"></el-checkbox>
+            </template>
+          </el-table-column>
+          <el-table-column label="查询" min-width="8%" align="center">
+            <template slot-scope="scope">
+              <el-checkbox true-label="1" false-label="0" v-model="scope.row.isQuery"></el-checkbox>
+            </template>
+          </el-table-column>
+          <el-table-column label="关联HR字段" min-width="13%" align="center" prop="hrParentId">
+            <template slot-scope="scope">
+              <div>
+                {{scope.row.hrParentName}}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="缺省值" min-width="10%" align="center" prop="defaultValue" />
+          <el-table-column label="外键" min-width="10%" align="center" prop="foreignKey">
+            <template slot-scope="scope">
+              <div>
+                {{scope.row.foreignKeyName}}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="必填" min-width="8%" align="center">
+            <template slot-scope="scope">
+              <el-checkbox true-label="1" false-label="0" v-model="scope.row.isRequired"></el-checkbox>
+            </template>
+          </el-table-column>
+          <el-table-column label="显示类型" min-width="12%" align="center">
+            <template slot-scope="scope">
+              <el-select v-model="scope.row.htmlType">
+                <el-option label="文本框" value="input" />
+                <el-option label="文本域" value="textarea" />
+                <el-option label="下拉框" value="select" />
+                <el-option label="单选框" value="radio" />
+                <el-option label="复选框" value="checkbox" />
+                <el-option label="时间控件" value="datetime" />
+                <el-option label="日期控件" value="datetime-date" />
+                <el-option label="图片上传" value="imageUpload" />
+                <el-option label="文件上传" value="fileUpload" />
+                <el-option label="富文本控件" value="editor" />
+                <el-option label="hr" value="hr" />
+              </el-select>
+            </template>
+          </el-table-column>
+          <el-table-column label="字典类型" min-width="12%" align="center">
+            <template slot-scope="scope">
+              <el-select v-model="scope.row.dictType" clearable filterable placeholder="请选择">
+                <el-option v-for="dict in dictOptions" :key="dict.dictType" :label="dict.dictName" :value="dict.dictType">
+                  <span style="float: left">{{ dict.dictName }}</span>
+                  <span style="float: right; color: #8492a6; font-size: 13px">{{ dict.dictType }}</span>
+                </el-option>
+              </el-select>
+            </template>
+          </el-table-column>
+        </el-table>
+        <!-- 添加或修改岗位对话框 -->
+        <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="openZd" width="70vw" append-to-body>
+          <el-form ref="formZd" :model="formZd" :rules="rulesZd" label-width="120px">
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="字段名:" prop="columnName">
+                  <el-input :disabled="this.formZd.id" v-model="formZd.columnName" placeholder="请输入字段名" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="字段描述:" prop="columnComment">
+                  <el-input v-model="formZd.columnComment" placeholder="请输入字段描述" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="物理类型:" prop="columnType">
+                  <el-input v-model="formZd.columnType" placeholder="请输入物理类型" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="字段显示规则:" prop="mask">
+                  <el-input v-model="formZd.mask" placeholder="请输入字段显示规则" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="排序:" prop="sort">
+                  <el-input-number style="width: 100%;" v-model="formZd.sort" placeholder="请输入排序" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="正则表达式:" prop="regular">
+                  <el-input v-model="formZd.regular" placeholder="请输入正则表达式" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="外键(FK):" prop="foreignKey">
+                  <!-- <el-select style="width: 100%;" filterable v-model="formZd.foreignKey" placeholder="请选择外键(FK)" clearable size="small">
+                    <el-option v-for="dict in columList" :key="dict.columnId" :label="dict.columnName" :value="dict.columnId" />
+                  </el-select> -->
+                  <div style="cursor: pointer;" @click="fkzdFn">
+                    <el-input readonly style="width: 100%;" clearable v-model="ForeName" placeholder="请选择外键(FK)" />
+                  </div>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="关联HR字段:" prop="hrParentId">
+                  <el-select style="width: 100%;" v-model="formZd.hrParentId" placeholder="请选择关联HR字段" clearable>
+                    <el-option v-for="dict in columHRList" :key="dict.id" :label="dict.columnName" :value="dict.id" />
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="缺省值:" prop="defaultValue">
+                  <el-input v-model="formZd.defaultValue" placeholder="请输入缺省值" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="行数:" prop="numRows">
+                  <el-input-number style="width: 100%;" v-model="formZd.numRows" placeholder="请输入行数" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="列数:" prop="numColumns">
+                  <el-input-number style="width: 100%;" v-model="formZd.numColumns" placeholder="请输入列数" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="字段翻译器:" prop="fieldTranslator">
+                  <el-input v-model="formZd.fieldTranslator" placeholder="请输入字段翻译器" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="扩展属性:" prop="extendedAttributes">
+                  <el-input v-model="formZd.extendedAttributes" placeholder="请输入扩展属性" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="查询方式:" prop="queryType">
+                  <el-select style="width: 100%;" v-model="formZd.queryType">
+                    <el-option label="=" value="EQ" />
+                    <el-option label="!=" value="NE" />
+                    <el-option label=">" value="GT" />
+                    <el-option label=">=" value="GTE" />
+                    <el-option label="<" value="LT" />
+                    <el-option label="<=" value="LTE" />
+                    <el-option label="LIKE" value="LIKE" />
+                    <el-option label="BETWEEN" value="BETWEEN" />
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="显示类型:" prop="htmlType">
+                  <el-select style="width: 100%;" v-model="formZd.htmlType">
+                    <el-option label="文本框" value="input" />
+                    <el-option label="文本域" value="textarea" />
+                    <el-option label="下拉框" value="select" />
+                    <el-option label="单选框" value="radio" />
+                    <el-option label="复选框" value="checkbox" />
+                    <el-option label="时间控件" value="datetime" />
+                    <el-option label="日期控件" value="datetime-date" />
+                    <el-option label="图片上传" value="imageUpload" />
+                    <el-option label="文件上传" value="fileUpload" />
+                    <el-option label="富文本控件" value="editor" />
+                    <el-option label="hr" value="hr" />
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="字典类型:" prop="dictType">
+                  <template slot-scope="scope">
+                    <el-select style="width: 100%;" v-model="formZd.dictType" clearable filterable placeholder="请选择">
+                      <el-option v-for="dict in dictOptions" :key="dict.dictType" :label="dict.dictName" :value="dict.dictType">
+                        <span style="float: left">{{ dict.dictName }}</span>
+                        <span style="float: right; color: #8492a6; font-size: 13px">{{ dict.dictType }}</span>
+                      </el-option>
+                    </el-select>
+                  </template>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="单据编号规则:" prop="seqName">
+                  <el-input v-model="formZd.seqName" placeholder="请输入单据编号规则" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="显示字段" prop="isOut">
+                  <el-checkbox true-label="Y" false-label="N" v-model="formZd.isOut"></el-checkbox>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="输入字段" prop="isIn">
+                  <el-checkbox true-label="Y" false-label="N" v-model="formZd.isIn"></el-checkbox>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="查询条件" prop="isQuery">
+                  <el-checkbox true-label="1" false-label="0" v-model="formZd.isQuery"></el-checkbox>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="必填" prop="isRequired">
+                  <el-checkbox true-label="1" false-label="0" v-model="formZd.isRequired"></el-checkbox>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+          <div slot="footer" class="dialog-footer">
+            <el-button type="primary" @click="submitFormZd">确 定</el-button>
+            <el-button @click="cancel">取 消</el-button>
+          </div>
+        </el-dialog>
+      </el-tab-pane>
+      <!-- <el-tab-pane label="生成信息" name="genInfo">
+        <gen-info-form ref="genInfo" :info="info" :tables="tables" :menus="menus"/>
+      </el-tab-pane> -->
+      <el-tab-pane label="关联表" name="genInfo">
+        <el-row style="margin-bottom: 20px;" type="flex" :gutter="10" justify="end">
+          <el-col :span="1.5">
+            <el-button @click="handleAdd_gl" icon="el-icon-plus" size="mini" style="background-color: #FFE9ED;color: #E58481;border: 1px solid #E58481;">新增</el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button icon="el-icon-delete" @click="handleDel_gl" size="mini" style="background-color: #FFD6B0;color: #EA551A;border: 1px solid #F4AD6B;"
+              :disabled="multiple1">删除</el-button>
+          </el-col>
+        </el-row>
+        <el-table ref="dragTable" @row-dblclick="dbSelected" v-loading="loading" :data="postList" row-key="columnId"
+          align="center" :max-height="tableHeight" @selection-change="handleSelectionChange1">
+          <el-table-column type="selection" width="55" align="center" />
+          <el-table-column label="id" width="60" align="center" prop="id" />
+          <el-table-column label="可用" align="center" prop="isDel">
+            <template slot-scope="scope">
+              <el-checkbox true-label="Y" disabled false-label="N" v-model="scope.row.isDel"></el-checkbox>
+            </template>
+          </el-table-column>
+          <el-table-column label="序号" align="center" prop="sort" />
+          <el-table-column label="描述" align="center" prop="description" />
+          <el-table-column label="关联表" align="center" prop="tableName" />
+          <el-table-column label="字段(关联到主表PK)" width="160px" align="center" prop="columnName" />
+          <el-table-column label="显示条件" align="center" prop="displayConditions" />
+          <el-table-column label="关联方式" align="center" prop="relationType">
+            <template slot-scope="scope">
+              {{scope.row.relationType | relationTypeFn}}
+            </template>
+          </el-table-column>
+          <el-table-column label="内嵌编辑" align="center" prop="embedEdit">
+            <template slot-scope="scope">
+              {{scope.row.embedEdit | embedEditFn}}
+            </template>
+          </el-table-column>
+          <el-table-column label="修改人" align="center" prop="updateBy" />
+          <el-table-column label="修改时间" align="center" prop="updateTime" />
+        </el-table>
+        <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
+          @pagination="tabList" />
+      </el-tab-pane>
+      <el-tab-pane label="数据库SQL" name="genSql">
+        <el-row type="flex" justify="end">
+          <el-button @click="zxCreaBtn" size="mini" style="background-color: #FFE9ED;color: #E58481;border: 1px solid #E58481;">执行创建语句</el-button>
+          <el-button @click="sxCreaBtn" size="mini" style="background-color: #FFD6B0;color: #EA551A;border: 1px solid #F4AD6B;">刷新创建语句</el-button>
+        </el-row>
+        <el-form>
+          <el-form-item label="创建语句:" style="margin-top: 20px;">
+            <el-input class="resizeNone" v-model="tableSqlData.createSql" type="textarea" />
+          </el-form-item>
+          <el-form-item label="修改日志:">
+            <el-input class="resizeNone" v-model="tableSqlData.createLog" type="textarea" />
+          </el-form-item>
+        </el-form>
+      </el-tab-pane>
+    </el-tabs>
+    <!-- 添加或修改岗位对话框 -->
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+        <el-form-item label="描述:" prop="postName">
+          <el-input v-model="form.description" placeholder="请输入描述" />
+        </el-form-item>
+        <el-form-item label="关联表:" prop="relationParentId">
+          <el-select style="width: 100%;" v-model="form.relationParentId" placeholder="请选择关联表" @change="relationFn"
+           >
+            <el-option v-for="item in tableList.rows" :key="item.id" :label="item.tableComment" :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="字段:" prop="relationChildId">
+          <el-select style="width: 100%;" v-model="form.relationChildId" placeholder="请选择字段">
+            <el-option v-for="item in genList" v-if="item.foreignKey" :key="item.id" :label="item.columnName" :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="显示条件:" prop="displayConditions">
+          <el-input v-model="form.displayConditions" controls-position="right" placeholder="请输入显示条件" />
+        </el-form-item>
+        <el-form-item label="关联方式:" prop="relationType">
+          <el-select style="width: 100%;" v-model="form.relationType" placeholder="请选择关联方式" clearable size="small">
+            <el-option v-for="dict in relationType" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="内嵌编辑:" prop="embedEdit">
+          <el-select style="width: 100%;" v-model="form.embedEdit" placeholder="岗位状态" clearable size="small">
+            <el-option v-for="dict in embedEdit" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="序号:" prop="sort">
+          <el-input-number style="width: 100%;" v-model="form.sort" controls-position="right" :min="0" />
+        </el-form-item>
+        <el-form-item label="是否可用:" prop="isDel">
+          <el-checkbox true-label="Y" false-label="N" v-model="form.isDel"></el-checkbox>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="addGlfn">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 快速搜索对话框 -->
+    <el-dialog :close-on-click-modal="false" :title="titleopenquery" :visible.sync="openquery" width="1200px" append-to-body>
+      <el-form ref="formquery" @row-dblclick="dbSelectedZd" :model="formquery" :rules="rules" label-width="100px">
+          <dynamic-forms :type='0' :ref="item.columnName" :config="formquery.fixedData" @inputs = "changeFn" :formConfig="item" v-for="(item,index) in queryData.queryList" :key='index' />
+      <el-form-item style="display: inline-block;">
+        <el-button type="primary"   @click="handleQuery">搜索</el-button>
+        <el-button   @click="openquery = false">取消</el-button>
+      </el-form-item>
+      </el-form>
+      <el-table stripe @row-dblclick="tableBtn" :data="postListquery.rows" @selection-change="handleSelectionChange">
+        <el-table-column :label="item.columnComment" align="center" :prop="item.columnName" v-for="(item,index) in postListquery.tableHeadList" :key="index"  />
+      </el-table>
+      <pagination
+        v-show="totalquery>0"
+        :total="totalquery"
+        :page.sync="aliemg.pageNo"
+        :limit.sync="aliemg.pageSize"
+        @pagination="getLisail"
+      />
+    </el-dialog>
+  </el-card>
+</template>
+<script>
+  import {
+    getGenTable,
+    updateGenTable,
+    delPost,
+    tabList,
+    listTable,
+    addGenTable,
+    setGenTable,
+    delGenTable,
+    listAllColumnsByTableId,
+    genTableColumnList,
+    tableSql,
+    zxImplement,
+    getReload,
+    addGenTableColumn,
+    delGenTableColumn,
+    setGenTableColumn,
+    getGenTableColumn,
+    getByIdWithForeignKey,
+    listIndexfou,
+    tableQuery,
+    qurGenTable
+  } from "@/api/tool/gen";
+  import {
+    optionselect as getDictOptionselect
+  } from "@/api/system/dict/type";
+  import {
+    listMenu as getMenuTreeselect
+  } from "@/api/system/menu";
+  import basicInfoForm from "./basicInfoForm";
+  import genInfoForm from "./genInfoForm";
+  import Sortable from 'sortablejs'
+
+  let _this = ''
+  export default {
+    name: "GenEdit",
+    components: {
+      basicInfoForm,
+      genInfoForm
+    },
+    data() {
+      _this = this
+      return {
+        ForeName: '',
+        totalquery:0,
+        // 多行查询
+        titleopenquery:'快速查询',
+        // 获取输入框的参数
+        queryLisr:{
+          table:'gen_table_column'
+        },
+        aliemg:{
+          table:'gen_table_column',
+          orderBy:'create_time desc',
+          pageNo:1,
+          pageSize:10,
+          fixedData:{
+            condition:''
+          }
+        },
+        postListquery:{},
+        queryData: {},
+        openquery:false,
+        formquery:{},
+        // 字段信息
+        tableSqlData: [],
+        columList: [],
+        columHRList: [],
+        foreignKey: [],
+        openZd: false,
+        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: "",
+        loading: false,
+        open: false,
+        form: {},
+        rules: {
+          relationParentId: [{
+            required: true,
+            message: "请选择关联表",
+            trigger: "blur"
+          }],
+          relationChildId: [{
+            required: true,
+            message: "请选择字段",
+            trigger: "blur"
+          }],
+          relationType: [{
+            required: true,
+            message: "请选择关联条件",
+            trigger: "blur"
+          }],
+        },
+        postList: [],
+        total: 1,
+        tableList: {},
+        // 关联方式
+
+        // 内嵌编辑
+        genList: [],
+        glbParams: {
+          pageNum: 1,
+          pageSize: 10000000,
+        },
+        // 关联表查询参数
+        queryParams: {
+          relationParentId: this.$route.params && this.$route.params.tableId,
+          pageNum: 1,
+          pageSize: 10,
+        },
+        // 选中选项卡的 name
+        activeName: "basic",
+        // 表格的高度
+        tableHeight: document.documentElement.scrollHeight - 245 + "px",
+        // 表信息
+        tables: [],
+        // 表列信息
+        cloumns: [],
+        // 字典信息
+        dictOptions: [],
+        // 菜单信息
+        menus: [],
+        // 表详细信息
+        info: {},
+        // 选中数组
+        ids: [],
+        ids1: [],
+        // 非单个禁用
+        single: true,
+        single1: true,
+        // 非多个禁用
+        multiple: true,
+        multiple1: true,
+        // 关联方式
+        relationType: [],
+        // 内嵌编辑
+        embedEdit: [],
+      };
+    },
+    filters: {
+      zdFn(data) {
+        let is = ''
+        for (let item of _this.columList) {
+          if (item.columnId == data) {
+            is = item.columnName
+          }
+        }
+        return is
+      },
+      relationTypeFn(data) {
+        let is = ''
+        for (let item of _this.relationType) {
+          if (item.dictValue == data) {
+            is = item.dictLabel
+          }
+        }
+        return is
+      },
+      embedEditFn(data) {
+        let is = ''
+        for (let item of _this.embedEdit) {
+          if (item.dictValue == data) {
+            is = item.dictLabel
+          }
+        }
+        return is
+      },
+    },
+    created() {
+      const tableId = this.$route.params && this.$route.params.tableId;
+      if (tableId) {
+        // 获取表详细信息
+        getGenTable(tableId).then(res => {
+          this.cloumns = res.data.rows;
+          this.info = res.data.info;
+          console.log(this.info,33456)
+          this.tables = res.data.tables;
+        });
+        //查询数据库sql
+        tableSql(tableId).then(res => {
+          if (res.data) {
+            this.tableSqlData = res.data
+          }
+        })
+        /** 查询字典下拉列表 */
+        getDictOptionselect().then(response => {
+          this.dictOptions = response.data;
+        });
+        // 关联HR字段
+        genTableColumnList({
+          tableId,
+          htmlType: 'HR'
+        }).then(response => {
+          this.columHRList = response.rows;
+        });
+        // 关联字段
+        listAllColumnsByTableId({
+          id:tableId
+        }).then(response => {
+          this.columList = response.data;
+        });
+        // 关联表数据
+        listTable(this.glbParams).then(response => {
+          this.tableList = response;
+        });
+        /** 查询菜单下拉列表 */
+        // getMenuTreeselect().then(response => {
+        //   this.menus = this.handleTree(response.data, "menuId");
+        // });
+        // 关联方式
+        this.getDicts("relation_type").then(response => {
+          this.relationType = response.data;
+        });
+        // 内嵌编辑
+        this.getDicts("embed_edit").then(response => {
+          this.embedEdit = response.data;
+        });
+      }
+      this.tabList()
+
+    },
+    methods: {
+      tableBtn(row){
+        this.openquery = false
+        this.ForeName = row.column_name
+        this.formZd.foreignKey = row.id
+      },
+      fkzdFn() {
+        this.queryedit()
+        this.getLisail()
+        this.openquery = true
+      },
+      changeFn(obj) {
+        console.log(obj)
+        for(let key in obj){
+          this.formquery.fixedData[key] = obj[key]
+        }
+      },
+      // 快速查询
+      queryedit(){
+        this.loading = true;
+        tableQuery(this.queryLisr).then(response => {
+           let data = response.data
+           this.queryData = data
+            this.loading = false;
+          })
+      },
+      handleQuery(){
+        for(let item of this.queryData.queryList){
+          if(item.htmlType == 'checkbox' || item.htmlType == 'imageUpload' || item.htmlType == 'fileUpload'){
+            this.formquery[item.columnName] = this.$refs[item.columnName][0].config
+          } else{
+            this.formquery[item.columnName] = this.$refs[item.columnName][0].config[item.columnName]
+          }
+        }
+       this.aliemg.fixedData.condition = this.formquery
+       this.getLisail()
+      },
+      // 快速查询列表
+      getLisail() {
+        this.loading = true;
+        listIndexfou(this.aliemg).then(response => {
+            if(response.data){
+              // this.tableDataalid = response.data.tableHeadList;
+              this.postListquery = response.data
+              this.postListquery.rows.filter(route => {
+                if(route.table_id){
+                   route.table_id = route.table_id.name
+                }
+              })
+              this.totalquery = response.data.total;
+            }
+            this.loading = false;
+          }
+        );
+      },
+      submitFormZd() {
+        this.$refs["formZd"].validate(valid => {
+          if (valid) {
+            const tableId = this.$route.params && this.$route.params.tableId;
+            this.formZd.tableId = tableId
+            if (this.formZd.id != undefined) {
+              setGenTableColumn(this.formZd).then(response => {
+                this.msgSuccess("修改成功");
+                this.openZd = false;
+                // 获取表详细信息
+                getGenTable(tableId).then(res => {
+                  this.cloumns = res.data.rows;
+                  this.info = res.data.info;
+                  this.tables = res.data.tables;
+                });
+              });
+            } else {
+              addGenTableColumn(this.formZd).then(response => {
+                this.msgSuccess("新增成功");
+                this.openZd = false;
+                // 获取表详细信息
+                getGenTable(tableId).then(res => {
+                  this.cloumns = res.data.rows;
+                  this.info = res.data.info;
+                  this.tables = res.data.tables;
+                });
+              });
+            }
+
+          }
+        });
+      },
+      sxCreaBtn() {
+        const tableId = this.$route.params && this.$route.params.tableId
+        getReload({
+          tableId,
+          createSql: this.tableSqlData.createSql,
+          createLog: this.tableSqlData.createLog,
+          id: this.tableSqlData.id
+        }).then(res => {
+          this.msgSuccess('刷新成功')
+          //查询数据库sql
+          tableSql(tableId).then(res => {
+            if (res.data) {
+              this.tableSqlData = res.data
+            }
+          })
+        })
+      },
+      zxCreaBtn() {
+        const _this = this
+        this.$confirm('是否确认执行创建语句?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return zxImplement({
+            tableId: _this.$route.params && _this.$route.params.tableId,
+            createSql: _this.tableSqlData.createSql,
+            createLog: _this.tableSqlData.createLog,
+            id: _this.tableSqlData.id
+          })
+        }).then(res => {
+          _this.msgSuccess('执行成功')
+        })
+      },
+      dbSelectedZd(row) {
+        this.reset();
+        const id = row.id
+        getByIdWithForeignKey(id).then(response => {
+          let data = response.data
+          data.foreignKey = data.foreignKey ? data.foreignKey - 0 : ''
+          this.formZd = data;
+          if(data.fkInfo){
+            this.ForeName = data.fkInfo.value
+          }
+          this.openZd = true;
+          this.title = "修改字段信息";
+        });
+      },
+      dbSelected(row) {
+        this.reset();
+        const id = row.id
+        qurGenTable(id).then(response => {
+          let data = response.data
+          data.relationType = data.relationType + ""
+          data.embedEdit = data.embedEdit?(data.embedEdit + ""): data.embedEdit
+          getGenTable(data.relationParentId).then(res => {
+            this.genList = res.data.rows;
+            this.form = data;
+            this.open = true;
+            this.title = "修改关联表";
+          });
+        });
+      },
+      addGlfn() {
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            let datas = JSON.parse(JSON.stringify(this.form))
+            datas.relationParentId = this.info.id
+            console.log(datas,this.info.id,9998)
+            if (this.form.id != undefined) {
+              setGenTable(datas).then(response => {
+                this.msgSuccess("修改成功");
+                this.open = false;
+                this.tabList();
+              });
+            } else {
+              addGenTable(datas).then(response => {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.tabList();
+              });
+            }
+          }
+        });
+      },
+      relationFn(data) {
+        getGenTable(data).then(res => {
+          this.genList = res.data.rows;
+        });
+      },
+      loadMore() {
+        const _this = this
+        let num = _this.tableList.total % 10 == 0 ? _this.tableList.total / 10 : ((_this.tableList.total - _this.tableList
+          .total % 10) / 10 + 1)
+        console.log(num, 1)
+        if (this.glbParams.pageNum < num) {
+          this.glbParams.pageNum++
+          // 关联表数据
+          listTable(this.glbParams).then(response => {
+            let data = response
+            data.rows = _this.tableList.rows.concat(data.rows)
+            _this.tableList = data;
+          });
+        }
+      },
+      // 取消按钮
+      cancel() {
+        this.open = false;
+        this.reset();
+        this.openZd = false;
+        this.resetZd();
+      },
+      // 关联表数据
+      tabList() {
+        this.loading = true;
+        tabList(this.queryParams).then(response => {
+          this.postList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        });
+      },
+      /** 新增按钮操作 */
+      handleAdd_gl() {
+        this.reset();
+        this.open = true;
+        console.log(this.form)
+        this.title = "新增关联表";
+      },
+      handleDel_gl(row) {
+        const ids = row.id || this.ids1;
+        this.$confirm('是否确认删除id为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delGenTable(ids);
+        }).then(() => {
+          this.tabList();
+          this.msgSuccess("删除成功");
+        })
+      },
+      // 表单重置
+      reset() {
+        this.form = {
+          isDel: 'N'
+        };
+        this.resetForm("form");
+      },
+      resetZd() {
+        this.formZd = {
+        };
+        this.resetForm("formZd");
+      },
+      /** 提交按钮 */
+      submitForm() {
+        let isInFlag = 0
+        let isOutFlag = 0
+
+        for(let item of this.cloumns){
+          if(item.isIn=='Y'){
+            isInFlag++
+          }
+          if(item.isOut=='Y'){
+            isOutFlag++
+          }
+        }
+        if(isInFlag>1){
+          this.msgError('"输入字段"最多只能选择一个!')
+          return
+        }
+        if(isOutFlag>1){
+          this.msgError('"显示字段"最多只能选择一个!')
+          return
+        }
+        const basicForm = this.$refs.basicInfo.$refs.basicInfoForm;
+        const tabnum = Object.assign({}, basicForm.model)
+        console.log(tabnum.tableColumn,234)
+        if(tabnum.tableColumn >4 ){
+           this.msgError('列数最大只能输入4')
+           return
+        }
+        if( tabnum.tableColumn <1){
+          this.msgError('最小只能输入1')
+          return
+        }
+
+
+        // const genForm = this.$refs.genInfo.$refs.genInfoForm;
+        Promise.all([basicForm].map(this.getFormPromise)).then(res => {
+          const validateResult = res.every(item => !!item);
+          if (validateResult) {
+            const genTable = Object.assign({}, basicForm.model);
+            genTable.columns = this.cloumns;
+            // genTable.params = {
+            //   treeCode: genTable.treeCode,
+            //   treeName: genTable.treeName,
+            //   treeParentCode: genTable.treeParentCode,
+            //   parentMenuId: genTable.parentMenuId
+            // };
+            console.log(genTable)
+            if(this.activeName=='basic'){
+              genTable.updateType ='1'
+            }
+            if(this.activeName=='cloum'){
+              genTable.updateType ='2'
+            }
+            updateGenTable(genTable).then(res => {
+              this.msgSuccess(res.msg);
+              if (res.code === 200) {
+                this.close();
+              }
+            });
+          } else {
+            this.msgError("表单校验未通过,请重新检查提交内容");
+          }
+        });
+      },
+      getFormPromise(form) {
+        return new Promise(resolve => {
+          form.validate(res => {
+            resolve(res);
+          });
+        });
+      },
+      /** 关闭按钮 */
+      close() {
+        this.$store.dispatch("tagsView/delView", this.$route);
+        this.$router.push({
+          path: "/tool/gen",
+          query: {
+            t: Date.now()
+          }
+        })
+      },
+      // 多选框选中数据
+      handleSelectionChange(selection) {
+        this.ids = selection.map(item => item.id)
+        this.single = selection.length != 1
+        this.multiple = !selection.length
+      },
+      // 多选框选中数据
+      handleSelectionChange1(selection) {
+        this.ids1 = selection.map(item => item.id)
+        this.single1 = selection.length != 1
+        this.multiple1 = !selection.length
+      },
+      /** 删除按钮操作 */
+      handleDelete(row) {
+        const ids = row.id || this.ids;
+        const tableId = this.$route.params && this.$route.params.tableId;
+        this.$confirm('是否确认删除字段编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delGenTableColumn(ids);
+        }).then(() => {
+          // 获取表详细信息
+          getGenTable(tableId).then(res => {
+            this.cloumns = res.data.rows;
+            this.info = res.data.info;
+            this.tables = res.data.tables;
+          });
+          this.msgSuccess("删除成功");
+        })
+      },
+      handleAdd() {
+        this.resetZd();
+        this.openZd = true;
+        this.title = "新增字段信息";
+      }
+    },
+    mounted() {
+      const el = this.$refs.dragTable.$el.querySelectorAll(".el-table__body-wrapper > table > tbody")[0];
+      const sortable = Sortable.create(el, {
+        handle: ".allowDrag",
+        onEnd: evt => {
+          const targetRow = this.cloumns.splice(evt.oldIndex, 1)[0];
+          this.cloumns.splice(evt.newIndex, 0, targetRow);
+          for (let index in this.cloumns) {
+            this.cloumns[index].sort = parseInt(index) + 1;
+          }
+        }
+      });
+    }
+  };
+</script>
+<style lang="scss">
+  .pagination-container {
+    height: 35px;
+  }
+
+  .resizeNone {
+    width: 60vw;
+    border-radius: 3px;
+
+    .el-textarea__inner {
+      //el_input中的隐藏属性
+      resize: none; //主要是这个样式
+      height: 200px;
+    }
+  }
+</style>