sr 4 lat temu
rodzic
commit
5bfed2c40a

+ 1 - 1
ruoyi-ui/.env.development

@@ -1,7 +1,7 @@
 # 开发环境配置
 ENV = 'development'
 
-# 博曼办公协作/开发环境
+# 潜山市云数据中心/开发环境
 VUE_APP_BASE_API = '/dev-api'
 
 # 路由懒加载

+ 1 - 1
ruoyi-ui/.env.production

@@ -1,5 +1,5 @@
 # 生产环境配置
 ENV = 'production'
 
-# 博曼办公协作/生产环境
+# 潜山市云数据中心/生产环境
 VUE_APP_BASE_API = '/prod-api'

+ 1 - 1
ruoyi-ui/.env.staging

@@ -3,5 +3,5 @@ NODE_ENV = production
 # 测试环境配置
 ENV = 'staging'
 
-# 博曼办公协作/测试环境
+# 潜山市云数据中心/测试环境
 VUE_APP_BASE_API = '/stage-api'

+ 1 - 1
ruoyi-ui/package.json

@@ -1,7 +1,7 @@
 {
   "name": "ruoyi",
   "version": "2.5.0",
-  "description": "博曼办公协作",
+  "description": "潜山市云数据中心",
   "author": "若依",
   "license": "MIT",
   "scripts": {

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

@@ -170,3 +170,25 @@ export function addGenTableColumn(data) {
     data
   })
 }
+// 删除字段信息
+export function delGenTableColumn(id) {
+  return request({
+    url: '/boman-gen/genTableColumn/' + id,
+    method: 'delete',
+  })
+}
+// 修改字段信息
+export function setGenTableColumn(data) {
+  return request({
+    url: '/boman-gen/genTableColumn',
+    method: 'put',
+    data
+  })
+}
+// 获取字段信息
+export function getGenTableColumn(tableId) {
+  return request({
+    url: '/boman-gen/genTableColumn/getColumnInfo/' + tableId,
+    method: 'get',
+  })
+}

+ 1 - 1
ruoyi-ui/src/layout/components/Sidebar/Logo.vue

@@ -36,7 +36,7 @@ export default {
   },
   data() {
     return {
-      title: '博曼办公协作',
+      title: '潜山市云数据中心',
       logo: logoImg
     }
   }

+ 1 - 1
ruoyi-ui/src/settings.js

@@ -1,5 +1,5 @@
 module.exports = {
-  title: '博曼办公协作',
+  title: '潜山市云数据中心',
   urls: `http://192.168.101.11:8090`,
   // urls: `http://192.168.101.110:8080`,
   // urls: `http://192.168.101.49:8080`,

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

@@ -1,7 +1,7 @@
 <template>
   <div class="login">
     <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
-      <h3 class="title">博曼办公协作</h3>
+      <h3 class="title"> 潜山市云数据中心</h3>
       <el-form-item prop="username">
         <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
           <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />

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

@@ -9,7 +9,7 @@
           </el-form-item>
         </el-form>
       </el-col>
-      <el-row type="flex" :gutter="10" justify="end">
+      <el-row type="flex" v-if="activeName=='cloum'" :gutter="10" justify="end">
         <el-col :span="1.5" style="display: flex; align-items: center;">
           <el-button type="warning" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:post:add']">新增</el-button>
         </el-col>
@@ -26,7 +26,7 @@
         <basic-info-form ref="basicInfo" :info="info" />
       </el-tab-pane>
       <el-tab-pane label="字段信息" name="cloum">
-        <el-table ref="dragTable" :data="cloumns" row-key="columnId" :max-height="tableHeight" @selection-change="handleSelectionChange">
+        <el-table ref="dragTable" @row-dblclick="dbSelectedZd" :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" />
@@ -40,7 +40,7 @@
           <el-table-column label="排序" min-width="8%" align="center" prop="sort" />
           <el-table-column label="输入字段" min-width="10%">
             <template slot-scope="scope">
-              <el-checkbox true-label="1" v-model="scope.row.isIn"></el-checkbox>
+              <el-checkbox true-label="Y" v-model="scope.row.isIn"></el-checkbox>
             </template>
           </el-table-column>
           <el-table-column label="显示字段" min-width="10%">
@@ -53,9 +53,21 @@
               <el-checkbox true-label="1" 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="10%" align="center" prop="hrParentId" >
+            <template slot-scope="scope">
+                <div>
+                  {{scope.row.hrParentId | zdFn}}
+                </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" />
+          <el-table-column label="外键" min-width="10%" align="center" prop="foreignKey">
+            <template slot-scope="scope">
+                <div>
+                  {{scope.row.foreignKey | zdFn}}
+                </div>
+              </template>
+            </el-table-column>
           <el-table-column label="必填" min-width="8%">
             <template slot-scope="scope">
               <el-checkbox true-label="1" v-model="scope.row.isRequired"></el-checkbox>
@@ -115,19 +127,19 @@
               </el-col>
               <el-col :span="8">
                 <el-form-item label="排序:" prop="sort">
-                  <el-input v-model="formZd.sort" placeholder="请输入排序" />
+                  <el-input-number v-model="formZd.sort" placeholder="请输入排序" />
                 </el-form-item>
               </el-col>
               <el-col :span="8">
                 <el-form-item label="查询条件" prop="isQuery">
-                  <el-checkbox true-label="Y" false-label="N" v-model="formZd.isQuery"></el-checkbox>
+                  <el-checkbox true-label="1" false-label="0" v-model="formZd.isQuery"></el-checkbox>
                 </el-form-item>
               </el-col>
             </el-row>
             <el-row>
               <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-checkbox true-label="1" false-label="0" v-model="formZd.isOut"></el-checkbox>
                 </el-form-item>
               </el-col>
               <el-col :span="8">
@@ -355,6 +367,9 @@
     zxImplement,
     getReload,
     addGenTableColumn,
+    delGenTableColumn,
+    setGenTableColumn,
+    getGenTableColumn,
     qurGenTable
   } from "@/api/tool/gen";
   import {
@@ -381,7 +396,7 @@
         tableSqlData: [],
         columList: [],
         foreignKey: [],
-        openZd: true,
+        openZd: false,
         formZd: {},
         rulesZd: {
           columnName: [{
@@ -450,7 +465,7 @@
           pageSize: 10,
         },
         // 选中选项卡的 name
-        activeName: "cloum",
+        activeName: "basic",
         // 表格的高度
         tableHeight: document.documentElement.scrollHeight - 245 + "px",
         // 表信息
@@ -479,6 +494,15 @@
       };
     },
     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) {
@@ -521,7 +545,7 @@
         listAllColumnsByTableId({
           tableId
         }).then(response => {
-          this.columList = response;
+          this.columList = response.data;
         });
         // 关联表数据
         listTable(this.glbParams).then(response => {
@@ -546,6 +570,20 @@
       submitFormZd() {
         this.$refs["formZd"].validate(valid => {
           if (valid) {
+            const tableId = this.$route.params && this.$route.params.tableId;
+            this.formZd.tableId = tableId
+            if (this.formZd.columnId != 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;
@@ -556,6 +594,8 @@
                   this.tables = res.data.tables;
                 });
               });
+            }
+
           }
         });
       },
@@ -579,8 +619,18 @@
           this.msgSuccess('执行成功')
         })
       },
+      dbSelectedZd(row) {
+        this.reset();
+        const id = row.columnId
+        getGenTableColumn(id).then(response => {
+          let data = response.data
+          data.foreignKey = data.foreignKey-0
+          this.formZd = data;
+          this.openZd = true;
+          this.title = "修改字段信息";
+        });
+      },
       dbSelected(row) {
-        console.log(row, 133)
         this.reset();
         const id = row.id
         qurGenTable(id).then(response => {
@@ -742,14 +792,20 @@
       /** 删除按钮操作 */
       handleDelete(row) {
         const ids = row.id || this.ids;
-        this.$confirm('是否确认删除岗位编号为"' + ids + '"的数据项?', "警告", {
+        const tableId = this.$route.params && this.$route.params.tableId;
+        this.$confirm('是否确认删除字段编号为"' + ids + '"的数据项?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
         }).then(function() {
-          return delPost(ids);
+          return delGenTableColumn(ids);
         }).then(() => {
-          this.getlist();
+          // 获取表详细信息
+          getGenTable(tableId).then(res => {
+            this.cloumns = res.data.rows;
+            this.info = res.data.info;
+            this.tables = res.data.tables;
+          });
           this.msgSuccess("删除成功");
         })
       },

+ 1 - 1
ruoyi-ui/vue.config.js

@@ -6,7 +6,7 @@ function resolve(dir) {
   return path.join(__dirname, dir)
 }
 
-const name = defaultSettings.title || '博曼办公协作' // 标题
+const name = defaultSettings.title || '潜山市云数据中心' // 标题
 
 const port = process.env.port || process.env.npm_config_port || 80 // 端口