小宝贝 2 lat temu
rodzic
commit
294f30949b

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

@@ -10,4 +10,4 @@ VUE_APP_BASE_API = '/dev-api'
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true
 
-VUE_APP_BASE_API2 = 'http://192.168.110.52:8081/'
+VUE_APP_BASE_API2 = 'http:// 192.168.110.52:8081/'

+ 13 - 0
ruoyi-ui/src/api/system/PortalEngine.js

@@ -0,0 +1,13 @@
+import request from '@/utils/request'
+import { parseStrEmpty } from "@/utils/ruoyi";
+
+
+//  这里的名称,需要和引入的地方,进行对应,就是一样的,
+export function getTenant(data) {
+    return request({
+      url: 'system/tenant/list',
+      method: 'get',
+      params: data,
+    //   baseURL:process.env.VUE_APP_BASE_API2
+    })
+  }

+ 1 - 0
ruoyi-ui/src/assets/styles/sidebar.scss

@@ -131,6 +131,7 @@
 
     .el-submenu {
       overflow: hidden;
+      position: fixed;
 
       &>.el-submenu__title {
         padding: 0 !important;

+ 8 - 3
ruoyi-ui/src/components/TopNav/index.vue

@@ -3,6 +3,7 @@
     :default-active="activeMenu"
     mode="horizontal"
     @select="handleSelect"
+    @open="handleOpen"
   >
     <template v-for="(item, index) in topMenus">
       <el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber"
@@ -59,6 +60,7 @@ export default {
           }
         }
       });
+      console.log(topMenus)
       return topMenus;
     },
     // 所有的路由信息
@@ -121,6 +123,7 @@ export default {
     // 菜单选择事件
     handleSelect(key, keyPath) {
       this.currentIndex = key;
+      console.log(key)
       const route = this.routers.find(item => item.path === key);
       if (this.ishttp(key)) {
         // http(s):// 路径新窗口打开
@@ -159,6 +162,9 @@ export default {
     },
     ishttp(url) {
       return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1
+    },
+    handleOpen(){
+      console.log(123)
     }
   },
 };
@@ -250,9 +256,8 @@ element.style {
     padding-left: 60px !important;
 }
 
-::v-deep.el-submenu.is-active > .el-submenu__title {
-  color: red !important;
-}
+
+
 
 
 </style>

+ 34 - 26
ruoyi-ui/src/layout/index.vue

@@ -1,9 +1,9 @@
 <template>
-  <div class="combarr" >
-    <div class="combar" >
+  <div class="combarr">
+    <div class="combar">
       <div class="bar">
-        <span >
-          <img src="../assets/images/comlo.png" alt="" class="imgg" /> 
+        <span>
+          <img src="../assets/images/comlo.png" alt="" class="imgg" />
         </span>
         <span class="spann">智能制造平台</span>
 
@@ -34,7 +34,7 @@
         </span>
       </div>
     </div>
-    <div style="height: 100px;"></div>
+    <div style="height: 100px"></div>
     <div
       :class="classObj"
       class="app-wrapper"
@@ -45,7 +45,11 @@
         class="drawer-bg"
         @click="handleClickOutside"
       />
-      <sidebar v-if="!sidebar.hide" class="sidebar-container" style="background-color: #222653;border-top-left-radius: 15px;"/>
+      <sidebar
+        v-if="!sidebar.hide"
+        class="sidebar-container"
+        style="background-color: #222653; border-top-left-radius: 15px"
+      />
       <div
         :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }"
         class="main-container"
@@ -105,32 +109,32 @@ export default {
     },
     setting: {
       get() {
-        return this.$store.state.settings.showSettings
+        return this.$store.state.settings.showSettings;
       },
       set(val) {
-        this.$store.dispatch('settings/changeSetting', {
-          key: 'showSettings',
-          value: val
-        })
-      }
+        this.$store.dispatch("settings/changeSetting", {
+          key: "showSettings",
+          value: val,
+        });
+      },
     },
   },
   methods: {
-    
     async logout() {
-      this.$confirm('确定注销并退出系统吗?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.$store.dispatch('LogOut').then(() => {
-          location.href = '/index';
+      this.$confirm("确定注销并退出系统吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$store.dispatch("LogOut").then(() => {
+            location.href = "/index";
+          });
         })
-      }).catch(() => { });
+        .catch(() => {});
     },
     handleClickOutside() {
       this.$store.dispatch("app/closeSideBar", { withoutAnimation: false });
-      
     },
   },
 };
@@ -146,11 +150,13 @@ export default {
 .navbar{
   position:sticky !important;
 } */
-.combar{
-  position:fixed;
-  display:block;
+.combar {
+  position: fixed;
+  display: block;
   width: 100%;
-} 
+  z-index: 999999;
+  background: #fff;
+}
 .jianbiase {
   width: 80px;
   height: 25px;
@@ -254,4 +260,6 @@ export default {
 .mobile .fixed-header {
   width: 100%;
 }
+
+
 </style>

+ 112 - 49
ruoyi-ui/src/views/system/PortalEngine/index.vue

@@ -7,69 +7,127 @@
         <el-button type="primary" round>+新建租户</el-button>
       </div>
     </div>
-  
+
     <div class="portalcon">
       <div class="portalconTop">
-        <el-input
-          placeholder="搜索您的客户..."
-          prefix-icon="el-icon-search"
-          v-model="input2"
-          style="width: 300px;"
-        >
-        </el-input>
-        <el-select v-model="value" placeholder="筛选">
-          <el-option
-            v-for="item in options"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
+        <div class="left">
+          <el-input
+            placeholder="搜索您的客户..."
+            prefix-icon="el-icon-search"
+            v-model="input2"
+            style="width: 200px; margin-right: 15px"
+          >
+          </el-input>
+          <el-input
+            placeholder="筛选"
+            v-model="input2"
+            style="width: 200px; margin-right: 15px"
           >
-          </el-option>
-        </el-select>
-        <el-date-picker
-      v-model="value1"
-      type="date"
-      placeholder="选择日期">
-    </el-date-picker>
+          </el-input>
+          <el-date-picker v-model="value1" type="date" placeholder="选择日期">
+          </el-date-picker>
+        </div>
+        <div class="right">
+          <el-col :span="1.5">
+            <el-button
+              plain
+              @click="handleAdd"
+              v-hasPermi="['system:user:add']"
+              style="
+                border-radius: 15px;
+                margin-right: 20px;
+                border: 0px solid #fff;
+              "
+              >新增</el-button
+            >
+          </el-col>
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              plain
+              icon="el-icon-delete"
+              size="mini"
+              :disabled="multiple"
+              @click="handleDelete"
+              v-hasPermi="['system:user:remove']"
+            ></el-button>
+          </el-col>
+        </div>
+      </div>
+      <div class="portalconBottom">
+        <el-table :data="tableData" stripe style="width: 100%">
+          <el-table-column type="selection" width="55"> 
+          </el-table-column>
+          <el-table-column prop="tenantName" label="租户" width="180">
+          </el-table-column>
+          <el-table-column prop="tenantCode" label="租户编号" width="180">
+          </el-table-column>
+          <el-table-column prop="owner" label="负责人"> 
+          </el-table-column>
+          <el-table-column prop="contactInfo" label="联系方式" width="180">
+          </el-table-column>
+          <el-table-column prop="address" label="地址" width="180">
+          </el-table-column>
+          <el-table-column prop="createTime" label="有效期" width="180">
+          </el-table-column>
+          <el-table-column label="状态" width="180">
+          </el-table-column>
+          <el-table-column label="操作" width="180">
+          </el-table-column>
+        </el-table>
       </div>
-      <div class="portalconBottom"></div>
     </div>
   </div>
 </template>
 
 <script>
+
+// 引入请求方法
+import { getTenant } from "@/api/system/PortalEngine";
+
+// 我把步骤写在这里,然后你按照流程,自己写一边
+// 1.创建api。js文件,引入相应的请求方法
+// 2.引入后,在页面创建后调用方法,传递参数,
+// 3.在请求方法响应后,编辑自己的业务逻辑
 export default {
-    data() {
-      return {
-        options: [{
-          value: '选项1',
-          label: '黄金糕'
-        }, {
-          value: '选项2',
-          label: '双皮奶'
-        }, {
-          value: '选项3',
-          label: '蚵仔煎'
-        }, {
-          value: '选项4',
-          label: '龙须面'
-        }, {
-          value: '选项5',
-          label: '北京烤鸭'
-        }],
-        value: ''
-      }
-    }
-  }
+  data() {
+    return {
+      tableData: [],
+    };
+  },
+  // 页面创建后调用
+  mounted() {
+    // 调用请求的方法,.then是什么方法,一会儿自己百度。
+    getTenant({
+      // 参数
+      tenantName:'',
+      createTime:'',
+      tenantName:'',
+      tenantName:'',
+    }).then((res) => {
+      console.log(res);
+      this.tableData = res.rows;
+      // this.tableData = 后端返回的数据,就是最大的那个数据,赋值给前面的就可以了。
+      //  前面  =    后面
+    });
+  },
+  // 方法调用
+  methods: {
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+  },
+};
 </script>
+
 <style lang="scss" scoped>
-.engine-container{
+.engine-container {
   background-color: #f5f5fa;
   padding: 40px 60px 40px 40px;
-} 
+}
 .portal {
   width: 1200px;
-  height:30px;
+  height: 30px;
   margin-bottom: 20px;
   /* background-color: #f0f811; */
   /* float: left; */
@@ -78,7 +136,6 @@ export default {
   font-size: 26px;
   font-weight: bolder;
   float: left;
- 
 }
 .portalexp {
   float: right;
@@ -86,8 +143,14 @@ export default {
 .export {
   margin-right: 20px;
 }
-.portalcon{
+.portalcon {
   height: 800px;
   background-color: #fff;
 }
+.left {
+  float: left;
+}
+.right {
+  float: right;
+}
 </style>

+ 28 - 16
ruoyi-ui/src/views/system/data/index.vue

@@ -71,18 +71,18 @@
 <script>
 import { getList, addSave } from "@/api/system/data";
 import { scrollTo } from "@/utils/scroll-to";
-import {
-  listUser,
-  getUser,
-  delUser,
-  addUser,
-  updateUser,
-  resetUserPwd,
-  changeUserStatus,
-  deptTreeSelect,
-} from "@/api/system/user";
-import { getToken } from "@/utils/auth";
-import Treeselect from "@riophae/vue-treeselect";
+// import {
+//   listUser,
+//   getUser,
+//   delUser,
+//   addUser,
+//   updateUser,
+//   resetUserPwd,
+//   changeUserStatus,
+//   deptTreeSelect,
+// } from "@/api/system/user";
+// import { getToken } from "@/utils/auth";
+// import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 export default {
   name: "Pagination",
@@ -212,10 +212,6 @@ export default {
   font-size: 26px;
   margin: 20px 0px 0px 20px;
 }
-.datadate {
-  margin: 0px 0px 0px 0px !important;
-}
-
 .title {
   margin: 15px 0px 20px 0px;
 }
@@ -236,4 +232,20 @@ export default {
   color: #3366ff;
   font-size: 28px;
 }
+el-form-item .datatype .datadate .el-form-item--medium>.el-form-item__label{
+  padding: 10px 0px 0px 0px !important;
+}
+/* .el-form-item{
+  padding: 10px 0 0px 0 !important;
+} */
+
+/* .el-form-item--medium .el-form-item__label {
+    line-height: 36px !important;
+}
+.el-form--label-top .el-form-item__label {
+    float: none;
+    display: inline-block;
+    text-align: left;
+    padding: 10px 0 0px 0 !important;
+} */
 </style>

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

@@ -113,8 +113,8 @@
           <el-table-column label="操作" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
           <el-table-column label="用户名" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
           <el-table-column label="名字" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
-          <el-table-column label="姓氏" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
-          <el-table-column label="角色" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
+          <el-table-column label="姓氏" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true"  />
+          <el-table-column label="角色" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="150" />
           <el-table-column label="邮箱地址" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" width="200" />
           <el-table-column label="激活" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
           <el-table-column label="上次登录时间" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="150" >