Explorar o código

Merge remote-tracking branch 'origin/master'

gt %!s(int64=2) %!d(string=hai) anos
pai
achega
b871181bed
Modificáronse 31 ficheiros con 695 adicións e 202 borrados
  1. 9 0
      chuanyi-admin/src/App.vue
  2. 8 2
      chuanyi-admin/src/layout/components/Navbar.vue
  3. 5 1
      chuanyi-admin/src/styles/sidebar.scss
  4. 1 1
      chuanyi-admin/src/utils/request.js
  5. 7 0
      chuanyi-admin/src/views/login/index.vue
  6. 2 2
      chuanyi-admin/src/views/system/auth/index.vue
  7. 16 9
      chuanyi-admin/src/views/system/dept/index.vue
  8. 29 17
      chuanyi-admin/src/views/system/dict/dict-detail.vue
  9. 16 9
      chuanyi-admin/src/views/system/dict/index.vue
  10. 3 3
      chuanyi-admin/src/views/system/log/index.vue
  11. 16 2
      chuanyi-admin/src/views/system/menu/index.vue
  12. 13 51
      chuanyi-admin/src/views/system/menu/menu-auth.vue
  13. 19 5
      chuanyi-admin/src/views/system/role/index.vue
  14. 22 86
      chuanyi-admin/src/views/system/role/user-auth.vue
  15. 16 4
      chuanyi-admin/src/views/system/role/user-menu.vue
  16. 9 1
      chuanyi-admin/src/views/system/role/user-select.vue
  17. 22 6
      chuanyi-admin/src/views/system/user/index.vue
  18. 1 0
      chuanyi_client2/src/assets/icons/svg/bar_chart.svg
  19. 1 0
      chuanyi_client2/src/assets/icons/svg/line_chart.svg
  20. 1 0
      chuanyi_client2/src/assets/icons/svg/pie_chart.svg
  21. BIN=BIN
      chuanyi_client2/src/assets/images/cytxt.png
  22. 25 0
      chuanyi_client2/src/components/LeftMenu/index.vue
  23. 183 0
      chuanyi_client2/src/components/RulerView/index.vue
  24. 10 0
      chuanyi_client2/src/permission.js
  25. 0 1
      chuanyi_client2/src/views/group_item/index.vue
  26. 118 1
      chuanyi_client2/src/views/report_template/index.vue
  27. 51 0
      chuanyi_server/src/main/java/com/judong/chuanyiserver/controller/MenuController.java
  28. 14 1
      chuanyi_server/src/main/java/com/judong/chuanyiserver/dao/MenuDao.java
  29. 20 0
      chuanyi_server/src/main/java/com/judong/chuanyiserver/service/MenuService.java
  30. 32 0
      chuanyi_server/src/main/java/com/judong/chuanyiserver/service/impl/MenuServiceImpl.java
  31. 26 0
      chuanyi_server/src/main/resources/mapper/MenuDao.xml

+ 9 - 0
chuanyi-admin/src/App.vue

@@ -69,6 +69,15 @@ export default {
   color: #1890ff;
 }
 
+.headBackground th {
+  background-color: #e9e9e9;
+  color: rgb(103, 102, 102);
+}
+
+.czBtns{
+  margin-bottom:20px;
+}
+
 .scrollbar-wrapper::-webkit-scrollbar {
   display: none;
   /* Chrome Safari */

+ 8 - 2
chuanyi-admin/src/layout/components/Navbar.vue

@@ -38,7 +38,7 @@
         </el-dropdown-menu>
       </el-dropdown>
 
-      <el-dialog title="修改密码" :visible.sync="dialogVisible" width="500px" :close-on-click-modal="false">
+      <el-dialog title="修改密码" :visible.sync="dialogVisible" width="500px" :close-on-click-modal="false" @close="close">
         <el-form ref="psdForm" :model="form" :rules="rules" label-width="80px">
           <el-form-item label="旧密码" prop="password">
             <el-input
@@ -112,7 +112,7 @@ export default {
     const validatePass = (rule, value, callback) => {
       var reg = /(?!^[0-9]+$)(?!^[A-z]+$)(?!^[^A-z0-9]+$)^[^\s\u4e00-\u9fa5][^\s]{5,20}$/
       if (!(reg.test(value))) {
-        callback(new Error('密码需至少包含数字、字母、符号中的2种 5-20个字符 不能有中文、空格'))
+        callback(new Error('密码必须为5-20位的字母、数字或符号任意两种的组合,不能有中文、空格'))
       }
       callback()
     }
@@ -241,6 +241,12 @@ export default {
       this.$nextTick(() => {
         this.$refs[btn].focus()
       })
+    },
+    /** 弹框关闭 */
+    close() {
+      this.passwordType1 = 'password'
+      this.passwordType2 = 'password'
+      this.passwordType3 = 'password'
     }
   }
 }

+ 5 - 1
chuanyi-admin/src/styles/sidebar.scss

@@ -30,7 +30,11 @@
     }
 
     .scrollbar-wrapper {
-      margin-right: 0px !important;
+      // margin-right: 0px !important;
+    }
+    
+    .el-submenu__icon-arrow{
+      right:36px;
     }
 
     .el-scrollbar__bar.is-vertical {

+ 1 - 1
chuanyi-admin/src/utils/request.js

@@ -16,7 +16,7 @@ export const isRelogin = {
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 // create an axios instance
 const service = axios.create({
-  baseURL: 'http://182.92.7.210:8081', // url = base url + request url
+  baseURL: 'http://192.168.1.226:8081', // url = base url + request url
   // withCredentials: true, // send cookies when cross-domain requests
   timeout: 30000 // request timeout
 })

+ 7 - 0
chuanyi-admin/src/views/login/index.vue

@@ -133,6 +133,12 @@ export default {
   },
   methods: {
     getCode() {
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
       getCode(true).then(res => {
         this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
         if (this.captchaEnabled) {
@@ -141,6 +147,7 @@ export default {
           this.loginForm.publicKey = data.publicKey
           this.codeUrl = 'data:image/gif;base64,' + data.verifyCode
         }
+        loading.close()
       })
     },
     checkCapslock(e) {

+ 2 - 2
chuanyi-admin/src/views/system/auth/index.vue

@@ -13,10 +13,10 @@
           </el-form-item>
         </el-form>
 
-        <el-button size="mini" icon="el-icon-plus" type="primary" plain @click="handelAdd">新增</el-button>
+        <el-button size="mini" icon="el-icon-plus" type="primary" class="czBtns" plain @click="handelAdd">新增</el-button>
 
         <!-- 表格数据信息 -->
-        <el-table v-loading="loading" :data="authList">
+        <el-table v-loading="loading" :data="authList" border stripe header-row-class-name="headBackground">
           <el-table-column type="index" width="50" align="center" label="序号" />
           <el-table-column key="permissionName" label="权限名称" align="center" prop="permissionName" />
           <el-table-column key="permissionUrl" label="权限路径" align="center" prop="permissionUrl" />

+ 16 - 9
chuanyi-admin/src/views/system/dept/index.vue

@@ -13,15 +13,19 @@
           </el-form-item>
         </el-form>
 
-        <el-button size="mini" icon="el-icon-plus" type="primary" plain @click="handelAdd">新增</el-button>
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-circle-close"
-          size="mini"
-          :disabled="multiple"
-          @click="handelDelAll"
-        >批量删除</el-button>
+        <el-row class="czBtns">
+          <el-col>
+            <el-button size="mini" icon="el-icon-plus" type="primary" plain @click="handelAdd">新增</el-button>
+            <el-button
+              type="danger"
+              plain
+              icon="el-icon-delete-solid"
+              size="mini"
+              :disabled="multiple"
+              @click="handelDelAll"
+            >批量删除</el-button>
+          </el-col>
+        </el-row>
 
         <!-- 表格数据信息 -->
         <el-table
@@ -29,6 +33,9 @@
           v-loading="loading"
           :data="deptList"
           row-key="id"
+          border
+          stripe
+          header-row-class-name="headBackground"
           @selection-change="handleSelectionChange"
         >
           <el-table-column type="selection" width="50" align="center" />

+ 29 - 17
chuanyi-admin/src/views/system/dict/dict-detail.vue

@@ -16,25 +16,37 @@
           </el-form-item>
         </el-form>
 
-        <el-button size="mini" icon="el-icon-plus" type="primary" plain @click="handelAdd">新增</el-button>
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-circle-close"
-          size="mini"
-          :disabled="multiple"
-          @click="handelDelAll"
-        >批量删除</el-button>
-        <el-button
-          size="mini"
-          icon="el-icon-back"
-          type="warning"
-          plain
-          @click="(() => { this.$router.push('/system/dict') })"
-        >返回</el-button>
+        <el-row class="czBtns">
+          <el-col>
+            <el-button size="mini" icon="el-icon-plus" type="primary" plain @click="handelAdd">新增</el-button>
+            <el-button
+              type="danger"
+              plain
+              icon="el-icon-delete-solid"
+              size="mini"
+              :disabled="multiple"
+              @click="handelDelAll"
+            >批量删除</el-button>
+            <el-button
+              size="mini"
+              icon="el-icon-back"
+              type="warning"
+              plain
+              @click="(() => { this.$router.push('/system/dict') })"
+            >返回</el-button>
+          </el-col>
+        </el-row>
 
         <!-- 表格数据信息 -->
-        <el-table v-loading="loading" :data="dictList" row-key="id" @selection-change="handleSelectionChange">
+        <el-table
+          v-loading="loading"
+          :data="dictList"
+          row-key="id"
+          border
+          stripe
+          header-row-class-name="headBackground"
+          @selection-change="handleSelectionChange"
+        >
           <el-table-column type="selection" width="50" align="center" />
           <el-table-column key="dictKey" label="字典名称" align="center" prop="dictKey" />
           <el-table-column key="dictValue" label="字典值" align="center" prop="dictValue" />

+ 16 - 9
chuanyi-admin/src/views/system/dict/index.vue

@@ -16,15 +16,19 @@
           </el-form-item>
         </el-form>
 
-        <el-button size="mini" icon="el-icon-plus" type="primary" plain @click="handelAdd">新增</el-button>
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-circle-close"
-          size="mini"
-          :disabled="multiple"
-          @click="handelDelAll"
-        >批量删除</el-button>
+        <el-row class="czBtns">
+          <el-col>
+            <el-button size="mini" icon="el-icon-plus" type="primary" plain @click="handelAdd">新增</el-button>
+            <el-button
+              type="danger"
+              plain
+              icon="el-icon-delete-solid"
+              size="mini"
+              :disabled="multiple"
+              @click="handelDelAll"
+            >批量删除</el-button>
+          </el-col>
+        </el-row>
 
         <!-- 表格数据信息 -->
         <el-table
@@ -32,6 +36,9 @@
           v-loading="loading"
           :data="dictList"
           row-key="id"
+          border
+          stripe
+          header-row-class-name="headBackground"
           @selection-change="handleSelectionChange"
         >
           <el-table-column type="selection" width="50" align="center" />

+ 3 - 3
chuanyi-admin/src/views/system/log/index.vue

@@ -38,7 +38,7 @@
               range-separator="至"
               start-placeholder="开始日期"
               end-placeholder="结束日期"
-              :default-time="['00:00:00','23:59:59']"
+              :default-time="['00:00:00', '23:59:59']"
               @change="getTime"
             />
           </el-form-item>
@@ -48,14 +48,14 @@
           </el-form-item>
         </el-form>
         <!-- 操作按钮 -->
-        <el-row>
+        <el-row class="czBtns">
           <el-col :span="1.5">
             <el-button type="danger" plain size="mini" class="el-icon-delete" @click="handelClear">清空
             </el-button>
           </el-col>
         </el-row>
         <!-- 表格数据信息 -->
-        <el-table v-loading="loading" :data="logList">
+        <el-table v-loading="loading" :data="logList" border stripe header-row-class-name="headBackground">
           <el-table-column type="index" width="50" align="center" label="序号" />
           <el-table-column key="serverName" label="服务名称" align="center" prop="serverName" />
           <el-table-column key="modelName" label="系统模块" align="center" prop="modelName" :show-overflow-tooltip="true" />

+ 16 - 2
chuanyi-admin/src/views/system/menu/index.vue

@@ -13,10 +13,24 @@
           </el-form-item>
         </el-form>
 
-        <el-button size="mini" icon="el-icon-plus" type="primary" plain @click="handelAdd">新增</el-button>
+        <el-button
+          size="mini"
+          icon="el-icon-plus"
+          type="primary"
+          plain
+          style="margin-bottom:20px"
+          @click="handelAdd"
+        >新增</el-button>
 
         <!-- 表格数据信息 -->
-        <el-table v-loading="loading" :data="menuList" row-key="id">
+        <el-table
+          v-loading="loading"
+          :data="menuList"
+          row-key="id"
+          border
+          stripe
+          header-row-class-name="headBackground"
+        >
           <el-table-column type="index" width="50" label="序号" align="center" />
           <el-table-column key="menuName" label="菜单名称" align="center" prop="menuName" />
           <el-table-column key="menuIcon" label="菜单图标" align="center" prop="menuIcon" />

+ 13 - 51
chuanyi-admin/src/views/system/menu/menu-auth.vue

@@ -1,36 +1,21 @@
 <template>
   <div class="app-container">
-    <el-row
-      :gutter="10"
-      class="mb8"
-    >
+    <el-row :gutter="10" class="mb8 czBtns">
       <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handelAdd"
-        >添加菜单接口权限</el-button>
+        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handelAdd">添加菜单接口权限</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
           type="danger"
           plain
-          icon="el-icon-circle-close"
+          icon="el-icon-delete-solid"
           size="mini"
           :disabled="multiple"
           @click="cancelAuthMenus"
         >批量取消分配</el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-back"
-          size="mini"
-          @click="handleClose"
-        >返回</el-button>
+        <el-button type="warning" plain icon="el-icon-back" size="mini" @click="handleClose">返回</el-button>
       </el-col>
     </el-row>
 
@@ -38,36 +23,16 @@
       ref="authTable"
       v-loading="loading"
       :data="authList"
+      border
+      stripe
+      header-row-class-name="headBackground"
       @selection-change="handleSelectionChange"
     >
-      <el-table-column
-        type="selection"
-        width="55"
-        align="center"
-      />
-      <el-table-column
-        label="接口名称"
-        prop="permissionUrl"
-        :show-overflow-tooltip="true"
-        align="center"
-      />
-      <el-table-column
-        label="备注"
-        prop="permissionName"
-        :show-overflow-tooltip="true"
-        align="center"
-      />
-      <el-table-column
-        label="来源"
-        prop="menuName"
-        :show-overflow-tooltip="true"
-        align="center"
-      />
-      <el-table-column
-        label="操作"
-        align="center"
-        class-name="small-padding fixed-width"
-      >
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="接口名称" prop="permissionUrl" :show-overflow-tooltip="true" align="center" />
+      <el-table-column label="备注" prop="permissionName" :show-overflow-tooltip="true" align="center" />
+      <el-table-column label="来源" prop="menuName" :show-overflow-tooltip="true" align="center" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
             type="text"
@@ -90,10 +55,7 @@
       @pagination="getTreeMenuList"
     />
 
-    <menuDist
-      ref="dialog"
-      @handelUpdate="getTreeMenuList"
-    />
+    <menuDist ref="dialog" @handelUpdate="getTreeMenuList" />
   </div>
 </template>
 

+ 19 - 5
chuanyi-admin/src/views/system/role/index.vue

@@ -35,25 +35,33 @@
           </el-form-item>
         </el-form>
         <!-- 操作按钮 -->
-        <el-row>
+        <el-row class="czBtns">
           <el-col :span="1.5">
             <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
           </el-col>
           <el-col :span="1.5" style="margin-left: 15px;">
             <el-button
               type="danger"
-              plain
               size="mini"
+              plain
               :disabled="multiple"
-              icon="el-icon-circle-close"
+              icon="el-icon-delete-solid"
               @click="handleDelete"
             >
-              删除
+              批量删除
             </el-button>
           </el-col>
         </el-row>
         <!-- 表格数据信息 -->
-        <el-table ref="roleTable" v-loading="loading" :data="roleList" @selection-change="handleSelectionChange">
+        <el-table
+          ref="roleTable"
+          v-loading="loading"
+          :data="roleList"
+          border
+          stripe
+          header-row-class-name="headBackground"
+          @selection-change="handleSelectionChange"
+        >
           <el-table-column type="selection" width="50" align="center" />
           <el-table-column v-if="false" key="id" label="角色编号" align="center" prop="id" />
           <el-table-column key="roleName" label="角色名称" align="center" prop="roleName" :show-overflow-tooltip="true" />
@@ -220,6 +228,9 @@ export default {
           cancelButtonClass: 'btn_custom_cancel',
           type: 'warning'
         }).then(() => {
+          if (this.roleList.length === roleIdList.length) {
+            this.queryParams.page -= 1
+          }
           this.delRolesById(roleIdList)
         }).catch(() => {
           this.$refs.roleTable.clearSelection()
@@ -232,6 +243,9 @@ export default {
         cancelButtonClass: 'btn_custom_cancel',
         type: 'warning'
       }).then(() => {
+        if (this.roleList.length === 1) {
+          this.queryParams.page -= 1
+        }
         this.delRolesById([roleId])
       }).catch(() => {
       })

+ 22 - 86
chuanyi-admin/src/views/system/role/user-auth.vue

@@ -1,15 +1,7 @@
 <template>
   <div class="app-container">
-    <el-form
-      ref="queryForm"
-      :model="queryParams"
-      size="small"
-      :inline="true"
-    >
-      <el-form-item
-        label="用户名称"
-        prop="userName"
-      >
+    <el-form ref="queryForm" :model="queryParams" size="small" :inline="true">
+      <el-form-item label="用户名称" prop="userName">
         <el-input
           v-model="queryParams.userName"
           placeholder="请输入用户名称"
@@ -19,51 +11,27 @@
         />
       </el-form-item>
       <el-form-item>
-        <el-button
-          type="primary"
-          icon="el-icon-search"
-          size="mini"
-          @click="handleQuery"
-        >搜索</el-button>
-        <el-button
-          icon="el-icon-refresh"
-          size="mini"
-          @click="resetQuery"
-        >重置</el-button>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
-    <el-row
-      :gutter="10"
-      class="mb8"
-    >
+    <el-row :gutter="10" class="mb8 czBtns">
       <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="openSelectUser"
-        >添加用户</el-button>
+        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openSelectUser">添加用户</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
           type="danger"
           plain
-          icon="el-icon-circle-close"
+          icon="el-icon-delete-solid"
           size="mini"
           :disabled="multiple"
           @click="cancelAuthUserAll"
         >批量取消授权</el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-back"
-          size="mini"
-          @click="handleClose"
-        >返回</el-button>
+        <el-button type="warning" plain icon="el-icon-back" size="mini" @click="handleClose">返回</el-button>
       </el-col>
     </el-row>
 
@@ -71,58 +39,30 @@
       ref="roleTable"
       v-loading="loading"
       :data="userList"
+      border
+      stripe
+      header-row-class-name="headBackground"
       @selection-change="handleSelectionChange"
     >
-      <el-table-column
-        type="selection"
-        width="55"
-        align="center"
-      />
-      <el-table-column
-        label="用户名称"
-        prop="userName"
-        :show-overflow-tooltip="true"
-      />
-      <el-table-column
-        label="用户状态"
-        prop="state"
-        :show-overflow-tooltip="true"
-      >
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="用户名称" prop="userName" :show-overflow-tooltip="true" />
+      <el-table-column label="用户状态" prop="state" :show-overflow-tooltip="true">
         <template slot-scope="scope">
           <span>{{ convertUserStatus(scope.row.state) }}</span>
         </template>
       </el-table-column>
-      <el-table-column
-        label="用户类型"
-        prop="userType"
-        :show-overflow-tooltip="true"
-      >
+      <el-table-column label="用户类型" prop="userType" :show-overflow-tooltip="true">
         <template slot-scope="scope">
           <span>{{ convertUserType(scope.row.userType) }}</span>
         </template>
       </el-table-column>
-      <el-table-column
-        label="最后登录时间"
-        prop="lastLoginTime"
-        width="160"
-      />
-      <el-table-column
-        label="创建时间"
-        prop="createTime"
-        width="160"
-      />
-      <el-table-column
-        label="操作"
-        align="center"
-        class-name="small-padding fixed-width"
-      >
+      <el-table-column label="最后登录时间" prop="lastLoginTime" width="160" />
+      <el-table-column label="创建时间" prop="createTime" width="160" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            :disabled="!multiple"
-            @click="cancelAuthUser(scope.row)"
-          ><i class="el-icon-circle-close celBtn" /><span>取消授权</span>
+          <el-button size="mini" type="text" :disabled="!multiple" @click="cancelAuthUser(scope.row)"><i
+            class="el-icon-circle-close celBtn"
+          /><span>取消授权</span>
           </el-button>
         </template>
       </el-table-column>
@@ -136,11 +76,7 @@
       align="right"
       @pagination="getList"
     />
-    <select-user
-      ref="select"
-      :role-id="queryParams.roleId"
-      @updateUserList="getList()"
-    />
+    <select-user ref="select" :role-id="queryParams.roleId" @updateUserList="getList()" />
   </div>
 </template>
 

+ 16 - 4
chuanyi-admin/src/views/system/role/user-menu.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-row :gutter="10" class="mb8">
+    <el-row :gutter="10" class="mb8 czBtns">
       <el-col :span="1.5">
         <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handelAdd">添加菜单</el-button>
       </el-col>
@@ -8,7 +8,7 @@
         <el-button
           type="danger"
           plain
-          icon="el-icon-circle-close"
+          icon="el-icon-delete-solid"
           size="mini"
           :disabled="celDistribution"
           @click="handleDelMenus"
@@ -20,7 +20,16 @@
       </el-col>
     </el-row>
 
-    <el-table ref="roleTable" v-loading="loading" :data="menuList" row-key="id" @selection-change="handelDelDist">
+    <el-table
+      ref="roleTable"
+      v-loading="loading"
+      :data="menuList"
+      row-key="id"
+      border
+      stripe
+      header-row-class-name="headBackground"
+      @selection-change="handelDelDist"
+    >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="菜单名称" prop="menuName" :show-overflow-tooltip="true" />
       <el-table-column label="菜单图标" prop="menuIcon" :show-overflow-tooltip="true" />
@@ -38,7 +47,7 @@
     </el-table>
 
     <el-dialog title="分配菜单" :visible.sync="dialogVisible" width="800px" :close-on-click-modal="false">
-      <el-row>
+      <el-row class="czBtns">
         <el-col>
           <el-button type="primary" plain icon="el-icon-plus" size="mini" :disabled="distribution" @click="handleDel">
             批量分配</el-button>
@@ -49,6 +58,9 @@
         v-loading="distLoading"
         :data="addMenuList"
         row-key="id"
+        border
+        stripe
+        header-row-class-name="headBackground"
         @selection-change="handelAddDist"
         @select="select"
         @select-all="selectAll"

+ 9 - 1
chuanyi-admin/src/views/system/role/user-select.vue

@@ -11,7 +11,15 @@
       </el-form-item>
     </el-form>
     <el-row>
-      <el-table ref="table" :data="userList" @row-click="clickRow" @selection-change="handleSelectionChange">
+      <el-table
+        ref="table"
+        :data="userList"
+        border
+        stripe
+        header-row-class-name="headBackground"
+        @row-click="clickRow"
+        @selection-change="handleSelectionChange"
+      >
         <el-table-column type="selection" width="55" />
         <el-table-column label="用户名称" prop="userName" :show-overflow-tooltip="true" />
         <el-table-column label="用户状态" prop="state" :show-overflow-tooltip="true">

+ 22 - 6
chuanyi-admin/src/views/system/user/index.vue

@@ -36,7 +36,7 @@
           </el-form-item>
         </el-form>
         <!-- 操作按钮 -->
-        <el-row>
+        <el-row class="czBtns">
           <el-col :span="1.5">
             <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
           </el-col>
@@ -46,7 +46,7 @@
               size="mini"
               plain
               :disabled="multiple"
-              icon="el-icon-circle-close"
+              icon="el-icon-delete-solid"
               @click="handleDelete"
             >
               批量删除
@@ -54,7 +54,15 @@
           </el-col>
         </el-row>
         <!-- 表格数据信息 -->
-        <el-table ref="userTable" v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
+        <el-table
+          ref="userTable"
+          v-loading="loading"
+          :data="userList"
+          stripe
+          border
+          header-row-class-name="headBackground"
+          @selection-change="handleSelectionChange"
+        >
           <el-table-column type="selection" width="50" align="center" />
           <el-table-column v-if="false" key="userId" label="用户编号" align="center" prop="userId" />
           <el-table-column key="userName" label="用户名称" align="center" prop="userName" :show-overflow-tooltip="true" />
@@ -97,7 +105,14 @@
     </el-row>
 
     <!-- 添加或修改用户配置对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body :close-on-click-modal="false">
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="600px"
+      style="margin-top:15vh"
+      append-to-body
+      :close-on-click-modal="false"
+    >
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-row>
           <el-col :span="12">
@@ -165,7 +180,7 @@ export default {
     const validatePass = (rule, value, callback) => {
       var reg = /(?!^[0-9]+$)(?!^[A-z]+$)(?!^[^A-z0-9]+$)^[^\s\u4e00-\u9fa5][^\s]{5,20}$/
       if (!(reg.test(value))) {
-        callback(new Error('密码需至少包含数字、字母、符号中的2种 5-20个字符 不能有中文、空格'))
+        callback(new Error('密码必须为5-20位的字母、数字或符号任意两种的组合,不能有中文、空格'))
       }
       callback()
     }
@@ -383,7 +398,7 @@ export default {
           if (res.code === 200) {
             this.$message({
               type: 'success',
-              message: '重置成功'
+              message: '密码重置成功'
             })
             if (userId === uid) {
               await this.$store.dispatch('user/Logout')
@@ -497,4 +512,5 @@ export default {
   cursor: pointer;
   user-select: none;
 }
+
 </style>

+ 1 - 0
chuanyi_client2/src/assets/icons/svg/bar_chart.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1670810286293" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5233" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M382.6 805H242.2c-6.7 0-12.2-5.5-12.2-12.2V434.3c0-6.7 5.5-12.2 12.2-12.2h140.4c6.7 0 12.2 5.5 12.2 12.2v358.6c0 6.6-5.4 12.1-12.2 12.1z" fill="#1E88E5" p-id="5234"></path><path d="M591.1 805H450.7c-6.7 0-12.2-5.5-12.2-12.2V254.9c0-6.7 5.5-12.2 12.2-12.2h140.4c6.7 0 12.2 5.5 12.2 12.2v537.9c0 6.7-5.5 12.2-12.2 12.2z" fill="#64B5F6" p-id="5235"></path><path d="M804.4 805H663.9c-6.7 0-12.2-5.5-12.2-12.2v-281c0-6.7 5.5-12.2 12.2-12.2h140.4c6.7 0 12.2 5.5 12.2 12.2v281c0.1 6.7-5.4 12.2-12.1 12.2z" fill="#1E88E5" p-id="5236"></path></svg>

+ 1 - 0
chuanyi_client2/src/assets/icons/svg/line_chart.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1670810506264" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="19191" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M640 501.44a32 32 0 0 1-22.72-9.6L384 258.56l-233.28 233.28a32 32 0 0 1-45.44 0 32 32 0 0 1 0-45.12l256-256a32 32 0 0 1 45.44 0L640 424 873.28 192a32 32 0 0 1 45.44 0 32 32 0 0 1 0 45.12l-256 256a32 32 0 0 1-22.72 8.32z" fill="#4A8BFE" p-id="19192"></path><path d="M640 842.56a32 32 0 0 1-22.72-9.28L384 600 150.72 832a32 32 0 0 1-45.44 0 32 32 0 0 1 0-45.12l256-256a32 32 0 0 1 45.44 0L640 765.44l233.28-233.28a32 32 0 0 1 45.44 0 32 32 0 0 1 0 45.12l-256 256a32 32 0 0 1-22.72 9.28z" fill="#3BD5B3" p-id="19193"></path></svg>

+ 1 - 0
chuanyi_client2/src/assets/icons/svg/pie_chart.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1670810530018" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21721" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M512 128C300.8 128 128 300.8 128 512s172.8 384 384 384c110.933333 0 211.2-46.933333 279.466667-121.6L512 512V128z" fill="#00BCD4" p-id="21722"></path><path d="M896 512c0-211.2-172.8-384-384-384v384h384z" fill="#448AFF" p-id="21723"></path><path d="M512 512l279.466667 262.4c64-68.266667 104.533333-160 104.533333-262.4H512z" fill="#3F51B5" p-id="21724"></path></svg>

BIN=BIN
chuanyi_client2/src/assets/images/cytxt.png


+ 25 - 0
chuanyi_client2/src/components/LeftMenu/index.vue

@@ -1,5 +1,9 @@
 <template>
   <el-row>
+    <el-col class="cy-conn cy-logo" @click.native="goHome">
+      <el-image :src="require('@/assets/images/logo.png')" fit="contain" class="c-logo"></el-image>
+      <el-image :src="require('@/assets/images/cytxt.png')" fit="contain" class="c-logo-txt"></el-image>
+    </el-col>
     <el-col class="cy-conn" @click.native="createDatasourceEvent">
       <el-image :src="require('@/assets/images/datasource.png')" fit="contain"></el-image>
       <span>数据源配置</span>
@@ -249,6 +253,9 @@ export default {
         callback()
       }
     },
+    goHome() {
+      this.changeNavType(0)
+    },
     /** 添加数据源配置 */
     createDatasourceEvent() {
       this.changeNavType(0)
@@ -663,4 +670,22 @@ export default {
     }
   }
 }
+
+.cy-logo {
+  display: flex;
+  flex-direction: column;
+
+  .el-image {
+    display: flex;
+  }
+
+  .c-logo-txt img {
+    width: 50px;
+  }
+
+  .c-logo img {
+    width: 40px;
+    margin-bottom: 5px;
+  }
+}
 </style>

+ 183 - 0
chuanyi_client2/src/components/RulerView/index.vue

@@ -0,0 +1,183 @@
+<template>
+  <div :class="rulerPosition == 'horizontal' ? 'jd-ruler' : 'jd-ruler-left'">
+    <template v-if="rulerPosition == 'horizontal'">
+      <div class="ruler-top-txt">
+        <template v-for="i in rulerWidth">
+          <div v-if="i == 1" class="txt-item">0</div>
+          <div v-else-if="i % 10 == 0" class="txt-item">{{ i }}</div>
+        </template>
+      </div>
+      <div class="ruler-top">
+        <template v-for="i in rulerWidth">
+          <div v-if="(i - 1) % 10 == 0 || i == rulerWidth" class="ruler-group"></div>
+          <div v-else-if="(i - 1) % 5 == 0" class="ruler-middle"></div>
+          <div v-else class="ruler-item"></div>
+        </template>
+      </div>
+    </template>
+    <template v-if="rulerPosition == 'vertical'">
+      <div class="ruler-left-txt">
+        <template v-for="i in rulerHeight">
+          <div v-if="i == 1" class="txt-item-left">0</div>
+          <div v-else-if="i % 10 == 0" class="txt-item-left">{{ i }}</div>
+        </template>
+      </div>
+      <div class="ruler-left">
+        <template v-for="i in rulerHeight">
+          <div v-if="(i - 1) % 10 == 0" class="ruler-group-left"></div>
+          <div v-else-if="(i - 1) % 5 == 0" class="ruler-middle-left"></div>
+          <div v-else class="ruler-item-left"></div>
+        </template>
+      </div>
+    </template>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "RulerView",
+  data() {
+    return {
+      rulerWidth: 210,
+      rulerHeight: 297
+    }
+  },
+  props: ["rulerPosition"],
+  created() {
+  },
+  methods: {}
+}
+</script>
+
+<style rel="stylesheet/scss" lang="scss">
+.jd-ruler-left {
+  padding: 0 10px;
+  width: 100%;
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-content: center;
+  justify-content: center;
+  align-items: center;
+}
+
+.jd-ruler {
+  padding: 0 10px;
+  width: 100%;
+}
+
+.ruler-top {
+  width: 21cm;
+  height: 23px;
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+}
+
+.ruler-left {
+  margin-top: 10px;
+  margin-right: 8px;
+  height: 29.7cm;
+}
+
+.ruler-top-txt {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  position: absolute;
+  font-size: 12px;
+  margin-top: 3px;
+  color: #bebebe;
+}
+
+.ruler-left-txt {
+  display: flex;
+  flex-direction: column;
+  flex-wrap: nowrap;
+  font-size: 12px;
+  margin-top: 10px;
+  margin-left: -8px;
+  color: #bebebe;
+}
+
+.txt-item:first-child {
+  margin-left: -5mm;
+}
+
+.txt-item {
+  width: 1cm;
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: center;
+}
+
+.txt-item-left {
+  height: 1cm;
+  margin-right: 3px;
+  transform: rotate(-90deg);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: flex-end;
+}
+
+.txt-item-left:first-child {
+  margin-top: -6mm;
+}
+
+.ruler-group {
+  width: 1mm;
+  height: 6px;
+  margin-top: 17px;
+  border-left: 1px solid #2c3e50;
+  border-bottom: 1px solid #2c3e50;
+}
+
+.ruler-group-left {
+  width: 6px;
+  height: 1mm;
+  margin-left: 7px;
+  border-right: 1px solid #2c3e50;
+  border-top: 1px solid #2c3e50;
+}
+
+.ruler-group:last-child {
+  width: 1mm;
+  height: 6px;
+  margin-top: 17px;
+  border-left: 1px solid #2c3e50;
+  border-bottom: none;
+}
+
+.ruler-middle {
+  width: 1mm;
+  height: 4px;
+  margin-top: 19px;
+  border-left: 1px solid #2c3e50;
+  border-bottom: 1px solid #2c3e50;
+}
+
+.ruler-middle-left {
+  width: 4px;
+  height: 1mm;
+  margin-left: 9px;
+  border-right: 1px solid #2c3e50;
+  border-top: 1px solid #2c3e50;
+}
+
+.ruler-item {
+  width: 1mm;
+  height: 2px;
+  margin-top: 21px;
+  border-left: 1px solid #2c3e50;
+  border-bottom: 1px solid #2c3e50;
+}
+
+.ruler-item-left {
+  width: 2px;
+  height: 1mm;
+  margin-left: 11px;
+  border-right: 1px solid #2c3e50;
+  border-top: 1px solid #2c3e50;
+}
+</style>

+ 10 - 0
chuanyi_client2/src/permission.js

@@ -3,6 +3,7 @@ import store from './store'
 import NProgress from 'nprogress'
 import 'nprogress/nprogress.css'
 import {getToken} from '@/utils/auth'
+import {Message} from "element-ui";
 
 // NProgress.configure({showSpinner: false})
 
@@ -26,6 +27,15 @@ router.beforeEach(async (to, from, next) => {
                 try {
                     // 获取用户角色信息
                     const {roleList} = await store.dispatch('user/getInfo')
+                    if (roleList && roleList.length == 0) {
+                        Message({
+                            message: '您还没有设置角色,请联系管理员!',
+                            type: 'warning'
+                        })
+                        await store.dispatch('user/resetToken')
+                        next(`/login?redirect=${to.fullPath}`)
+                        return
+                    }
                     // 循环判断角色
                     next({...to, replace: true})
                 } catch (error) {

+ 0 - 1
chuanyi_client2/src/views/group_item/index.vue

@@ -102,7 +102,6 @@ export default {
     },
     /** 获取组详细信息 */
     getGroupById(id) {
-      console.log(this.timeInterval)
       if (this.timeInterval) {
         clearInterval(this.timeInterval)
         this.timeInterval = null

+ 118 - 1
chuanyi_client2/src/views/report_template/index.vue

@@ -1,11 +1,46 @@
 <template>
-
+  <div style="width: 100%; height: calc(100% - 70px);" v-if="false">
+    <div class="cy-report-content">
+      <div class="cy-div0">
+        <div class="cy-report-ruler-unit">mm</div>
+      </div>
+      <div class="cy-div1">
+        <div class="cy-ruler-top">
+          <ruler-view ruler-position="horizontal"></ruler-view>
+        </div>
+        <div class="cy-box">
+          <div class="cy-ruler-left">
+            <ruler-view ruler-position="vertical"></ruler-view>
+          </div>
+          <div class="cy-box-main"></div>
+        </div>
+      </div>
+      <div class="cy-div2">
+        <div class="cy-chart-div">
+          <svg-icon icon-class="bar_chart"/>
+          <span>柱状图</span>
+        </div>
+        <div class="cy-chart-div">
+          <svg-icon icon-class="line_chart"/>
+          <span>折线图</span>
+        </div>
+        <div class="cy-chart-div">
+          <svg-icon icon-class="pie_chart"/>
+          <span>饼状图</span>
+        </div>
+      </div>
+    </div>
+  </div>
 </template>
 
 <script>
+import RulerView from '@/components/RulerView'
 
 export default {
   name: 'index',
+  components: {
+    RulerView
+  },
   data() {
     return {
     }
@@ -20,4 +55,86 @@ export default {
 </script>
 
 <style rel="stylesheet/scss" lang="scss">
+.cy-report-content {
+  width: 100%;
+  height: 100%;
+  padding-left: 6px;
+  color: #FFFFFF;
+  font-size: 14px;
+  background-color: #2c3e50;
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+}
+
+.cy-div0 {
+  width: 30px;
+  height: 30px;
+  background: #767676;
+}
+
+.cy-div1 {
+  width: calc(100% - 90px);
+  height: 100%;
+}
+
+.cy-div2 {
+  width: 60px;
+  height: 100%;
+}
+
+.cy-report-ruler-unit {
+  width: 30px;
+  height: 30px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  float: left;
+  border-right: 1px solid #2c3e50;
+  border-bottom: 1px solid #2c3e50;
+}
+
+.cy-ruler-top {
+  background: #767676;
+  width: 100%;
+  height: 30px;
+}
+
+.cy-box {
+  height: calc(100% - 50px);
+  display: flex;
+  margin-left: -30px;
+  overflow: auto;
+
+  .cy-ruler-left {
+    background: #767676;
+    width: 30px;
+    height: calc(297mm + 20px);
+  }
+
+  .cy-box-main {
+    width: 209mm;
+    height: 297mm;
+    margin: 10px;
+    background: #FFFFFF;
+  }
+}
+
+.cy-chart-div {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  cursor: pointer;
+  margin-bottom: 15px;
+
+  .svg-icon {
+    width: 50px;
+    height: 50px;
+  }
+
+  span {
+    font-size: 12px;
+    margin-top: -5px;
+  }
+}
 </style>

+ 51 - 0
chuanyi_server/src/main/java/com/judong/chuanyiserver/controller/MenuController.java

@@ -169,4 +169,55 @@ public class MenuController {
         }
         return menuService.assignMenuAndPermission(menu);
     }
+
+    /**
+     * 查询菜单未拥有的权限
+     */
+    @GetMapping("queryNotPermission")
+    @WebLog(ServerEnum = ServerEnum.SERVER, ModelEnum = ModelEnum.MENU, OperationEnum = OperationEnum.SELECT)
+    public Result queryNotPermission(Integer menuId,Integer page,Integer num){
+        if (Blank.isEmpty(menuId,page,num)){
+            return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), ResultEnum.REQUEST_WRONGPARAMS.getRespMsg());
+        }
+        return menuService.queryNotPermission(menuId, page, num);
+    }
+
+    /**
+     * 查询菜单已拥有的权限
+     */
+    @GetMapping("queryPermission")
+    @WebLog(ServerEnum = ServerEnum.SERVER, ModelEnum = ModelEnum.MENU, OperationEnum = OperationEnum.SELECT)
+    public Result queryPermission(Integer menuId,Integer page,Integer num){
+        if (Blank.isEmpty(menuId,page,num)){
+            return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), ResultEnum.REQUEST_WRONGPARAMS.getRespMsg());
+        }
+        return menuService.queryPermission(menuId, page, num);
+    }
+
+    /**
+     * 批量新增菜单权限
+     */
+    @PostMapping("addMenuAndPermission")
+    @PermissionControl
+    @WebLog(ServerEnum = ServerEnum.SERVER, ModelEnum = ModelEnum.MENU, OperationEnum = OperationEnum.SELECT)
+    public Result addMenuAndPermission(@RequestBody Menu menu){
+        if (Blank.isEmpty(menu.getId(),menu.getPermissionList())){
+            return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), ResultEnum.REQUEST_WRONGPARAMS.getRespMsg());
+        }
+        return menuService.addMenuAndPermission(menu);
+    }
+
+    /**
+     *批量取消菜单权限
+     */
+    @PostMapping("deleteMenuAndPermission")
+    @PermissionControl
+    @WebLog(ServerEnum = ServerEnum.SERVER, ModelEnum = ModelEnum.MENU, OperationEnum = OperationEnum.SELECT)
+    public Result deleteMenuAndPermission(@RequestBody Menu menu){
+        if (Blank.isEmpty(menu.getId(),menu.getPermissionList())){
+            return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), ResultEnum.REQUEST_WRONGPARAMS.getRespMsg());
+        }
+        return menuService.deleteMenuAndPermission(menu);
+    }
+
 }

+ 14 - 1
chuanyi_server/src/main/java/com/judong/chuanyiserver/dao/MenuDao.java

@@ -71,9 +71,22 @@ public interface MenuDao {
     Integer addMenuAndPermission(@Param("menu") Menu menu);
 
     /**
-     *批量取消角色菜单
+     *批量取消菜单权限
      */
     Integer deleteMenuAndPermission(@Param("menu") Menu menu);
 
+    /**
+     * 查询菜单未拥有的权限
+     */
+    List<Permission> queryNotPermission(Integer menuId,Integer page,Integer num);
+
+    Integer queryNotPermissionNum(Integer menuId);
+
+    /**
+     * 查询菜单已拥有的权限
+     */
+    List<Permission> queryPermission(Integer menuId,Integer page,Integer num);
+
+    Integer queryPermissionNum(Integer menuId);
 
 }

+ 20 - 0
chuanyi_server/src/main/java/com/judong/chuanyiserver/service/MenuService.java

@@ -36,4 +36,24 @@ public interface MenuService {
 
     Result assignMenuAndPermission(Menu menu);
 
+    /**
+     * 查询菜单未拥有的权限
+     */
+    Result queryNotPermission(Integer menuId,Integer page,Integer num);
+
+    /**
+     * 查询菜单已拥有的权限
+     */
+    Result queryPermission(Integer menuId,Integer page,Integer num);
+
+    /**
+     * 批量新增菜单权限
+     */
+    Result addMenuAndPermission( Menu menu);
+
+    /**
+     *批量取消菜单权限
+     */
+    Result deleteMenuAndPermission( Menu menu);
+
 }

+ 32 - 0
chuanyi_server/src/main/java/com/judong/chuanyiserver/service/impl/MenuServiceImpl.java

@@ -239,6 +239,38 @@ public class MenuServiceImpl implements MenuService {
         return Result.ok(jsonObject);
     }
 
+    @Override
+    public Result queryNotPermission(Integer menuId, Integer page, Integer num) {
+        JSONObject jsonObject = new JSONObject();
+        Integer count = menuDao.queryNotPermissionNum(menuId);
+        Integer startNum=(page-1)*num;
+        List<Permission> permissionList = menuDao.queryNotPermission(menuId, startNum, num);
+        jsonObject.put("count",count);
+        jsonObject.put("permissionList",permissionList);
+        return Result.ok(jsonObject);
+    }
+
+    @Override
+    public Result queryPermission(Integer menuId, Integer page, Integer num) {
+        JSONObject jsonObject = new JSONObject();
+        Integer count = menuDao.queryPermissionNum(menuId);
+        Integer startNum=(page-1)*num;
+        List<Permission> permissionList = menuDao.queryPermission(menuId, startNum, num);
+        jsonObject.put("count",count);
+        jsonObject.put("permissionList",permissionList);
+        return Result.ok(jsonObject);
+    }
+
+    @Override
+    public Result addMenuAndPermission(Menu menu) {
+        return Result.ok(menuDao.addMenuAndPermission(menu));
+    }
+
+    @Override
+    public Result deleteMenuAndPermission(Menu menu) {
+        return Result.ok(menuDao.deleteMenuAndPermission(menu));
+    }
+
 
     public List<Menu> getChildMenu(List<Menu> menuList, List<Menu> newMenuList, Integer parentId) {
         if (Blank.isEmpty(menuList)) {

+ 26 - 0
chuanyi_server/src/main/resources/mapper/MenuDao.xml

@@ -295,4 +295,30 @@
         </foreach>)
     </delete>
 
+    <select id="queryNotPermission" resultType="com.judong.chuanyiserver.entity.Permission">
+        SELECT id,permission_url,permission_name FROM sys_permission
+        WHERE id NOT IN
+        (SELECT permission_id FROM sys_menu_permission WHERE menu_id=#{menuId})
+        LIMIT #{page},#{num}
+    </select>
+
+    <select id="queryNotPermissionNum" resultType="java.lang.Integer">
+        SELECT count(*) FROM sys_permission
+        WHERE id NOT IN
+        (SELECT permission_id FROM sys_menu_permission WHERE menu_id=#{menuId})
+    </select>
+
+    <select id="queryPermission" resultType="com.judong.chuanyiserver.entity.Permission">
+        SELECT id,permission_url,permission_name FROM sys_permission
+        WHERE id  IN
+        (SELECT permission_id FROM sys_menu_permission WHERE menu_id=#{menuId})
+        LIMIT #{page},#{num}
+    </select>
+
+    <select id="queryPermissionNum" resultType="java.lang.Integer">
+        SELECT count(*) FROM sys_permission
+        WHERE id  IN
+        (SELECT permission_id FROM sys_menu_permission WHERE menu_id=#{menuId})
+    </select>
+
 </mapper>