sr 4 gadi atpakaļ
vecāks
revīzija
16466a03c0

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

@@ -10,6 +10,14 @@ export function getQueryList(data) {
 }
 // 获取表单查询字段、按钮、表头
 export function getTableQuery(data) {
+  return request({
+    url: '/boman-web-core/p/cs/objectTab',
+    method: 'POST',
+    data
+  })
+}
+// 获取表单查询字段、按钮、表头
+export function tableQuery(data) {
   return request({
     url: '/boman-web-core/p/cs/getTableQuery',
     method: 'POST',

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

@@ -32,7 +32,7 @@
 
 <script>
   import {
-    getTableQuery,
+    tableQuery,
     getQueryList,
     addbjectSave,
     getByTableName,
@@ -55,7 +55,7 @@
         // 显示搜索条件
         showSearch: true,
         activeNames: ['1'],
-        title: '单表1',
+        title: '',
         queryData: {},
         form: {
           table: 'obj_test',
@@ -233,7 +233,7 @@
         });
       },
       init() {
-        getTableQuery({
+        tableQuery({
           table: 'obj_test',
         }).then(res => {
           let data = res.data

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

@@ -1,11 +1,11 @@
 <template>
   <el-card>
-    <el-row type="flex" justify="space-between" style="margin: 10px 0;">
+    <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-left:-100px;margin-top:0; margin-bottom: 0;">
-            <el-button type="primary" v-if="activeName=='basic' || activeName=='cloum'" @click="submitForm()">保存</el-button>
-            <el-button @click="close()">返回</el-button>
+          <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>
@@ -27,34 +27,34 @@
           </el-col>
           <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
         </el-row>
-        <el-table ref="dragTable" @row-dblclick="dbSelectedZd" :data="cloumns" row-key="columnId" :max-height="tableHeight" @selection-change="handleSelectionChange">
+        <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" />
-          <el-table-column label="字段列名" prop="columnName" min-width="10%" :show-overflow-tooltip="true" />
-          <el-table-column label="字段描述" min-width="10%">
+          <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" min-width="10%" :show-overflow-tooltip="true" />
-          <el-table-column label="字段显示规则" align="center" prop="mask" min-width="11%" />
+          <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%">
+          <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%">
+          <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%">
+          <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="10%" align="center" prop="hrParentId" >
+          <el-table-column label="关联HR字段" min-width="13%" align="center" prop="hrParentId" >
             <template slot-scope="scope">
                 <div>
                   {{scope.row.hrParentId | zdFn}}
@@ -69,12 +69,12 @@
                 </div>
               </template>
             </el-table-column>
-          <el-table-column label="必填" min-width="8%">
+          <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%">
+          <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" />
@@ -90,7 +90,7 @@
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column label="字典类型" min-width="12%">
+          <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">
@@ -107,7 +107,7 @@
             <el-row>
               <el-col :span="8">
                 <el-form-item label="字段名:" prop="columnName">
-                  <el-input v-model="formZd.columnName" placeholder="请输入字段名" />
+                  <el-input :disabled="this.formZd.columnId" v-model="formZd.columnName" placeholder="请输入字段名" />
                 </el-form-item>
               </el-col>
               <el-col :span="8">
@@ -269,7 +269,7 @@
         <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" align="center" prop="id" />
+          <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>
@@ -278,7 +278,7 @@
           <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)" align="center" prop="columnName" />
+          <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">

+ 4 - 4
ruoyi-ui/src/views/tool/gen/index.vue

@@ -105,7 +105,7 @@
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
+    <el-table v-loading="loading" style="max-height: calc(100vh - 288px);overflow-y: auto;" :data="tableList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" align="center" width="55"></el-table-column>
       <el-table-column label="序号" type="index" width="50" align="center">
         <template slot-scope="scope">
@@ -136,8 +136,8 @@
         </template>
       </el-table-column>
       <el-table-column label="菜单权限" align="center" prop="menuRole" />
-      <el-table-column label="创建时间" align="center" prop="createTime" />
-      <el-table-column label="更新时间" align="center" prop="updateTime" />
+     <!-- <el-table-column label="创建时间" align="center" prop="createTime" />
+      <el-table-column label="更新时间" align="center" prop="updateTime" /> -->
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <!-- <el-button
@@ -319,7 +319,7 @@ export default {
       // 查询参数
       queryParams: {
         pageNum: 1,
-        pageSize: 10,
+        pageSize: 20,
         tableName: undefined,
         tableComment: undefined
       },