Bladeren bron

Merge remote-tracking branch 'origin/master'

Administrator 4 jaren geleden
bovenliggende
commit
db0c296e27

+ 7 - 0
boman-modules/boman-system/src/main/java/com/boman/system/mapper/SysMenuMapper.java

@@ -66,6 +66,13 @@ public interface SysMenuMapper
      */
     List<SysMenu> listBtnByUserId(Long userId);
 
+    /**
+     * 查询所有按钮
+     *
+     * @return 菜单列表
+     */
+    List<SysMenu> listAllBtn();
+
     /**
      * 根据角色ID查询菜单树信息
      * 

+ 4 - 0
boman-modules/boman-system/src/main/java/com/boman/system/service/impl/SysMenuServiceImpl.java

@@ -755,6 +755,10 @@ public class SysMenuServiceImpl implements ISysMenuService {
      */
     @Override
     public List<SysMenu> listBtnByUserId(Long userId) {
+        if (SysUser.isAdmin(userId)) {
+            return menuMapper.listAllBtn();
+        }
+
         return menuMapper.listBtnByUserId(userId);
     }
 

+ 22 - 2
boman-modules/boman-system/src/main/resources/mapper/system/SysMenuMapper.xml

@@ -78,7 +78,7 @@
 		</if>
 		order by m.parent_id, m.order_num
 	</select>
-    
+
     <select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
 		select distinct m.id, m.parent_id, m.menu_name, m.path, m.component, m.visible, m.status, ifnull(m.perms,'') as perms
 		              , m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time, m.create_by, m.update_by
@@ -88,7 +88,17 @@
 			 left join sys_user_role ur on rm.role_id = ur.role_id
 			 left join sys_role ro on ur.role_id = ro.id
 			 left join sys_user u on ur.user_id = u.id
-		where (u.id = #{userId} and m.menu_type in ('M', 'C') and m.status = 0  AND ro.status = 0) or m.visible = 1
+		where u.id = #{userId} and m.menu_type in ('M', 'C') and m.status = 0  AND ro.status = 0
+	    union
+		select distinct m.id, m.parent_id, m.menu_name, m.path, m.component, m.visible, m.status, ifnull(m.perms,'') as perms
+					  , m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time, m.create_by, m.update_by
+					  , m.update_time, m.remark, m.sys_table_name
+		from sys_menu m
+				 left join sys_role_menu rm on m.id = rm.menu_id
+				 left join sys_user_role ur on rm.role_id = ur.role_id
+				 left join sys_role ro on ur.role_id = ro.id
+				 left join sys_user u on ur.user_id = u.id
+		where m.visible = 1
 	</select>
 
 	<select id="listBtnByUserId" parameterType="Long" resultMap="SysMenuResult">
@@ -108,6 +118,16 @@
 		order by m.parent_id, m.order_num
 	</select>
 
+	<select id="listAllBtn" parameterType="Long" resultMap="SysMenuResult">
+		select distinct m.id, m.parent_id, m.menu_name, m.path, m.component, m.visible, m.status, ifnull(m.perms,'') as
+			perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time, m.create_by, m.update_by,
+			m.update_time, m.remark, m.sys_table_name
+		from sys_menu m
+		where m.menu_type = 'F'
+		  and m.status = 0
+		order by m.parent_id, m.order_num
+	</select>
+
 	<select id="selectMenuListByRoleId" resultType="java.lang.Integer">
 		select m.id
 		from sys_menu m

+ 1 - 2
ruoyi-ui/src/store/modules/permission.js

@@ -34,12 +34,11 @@ const permission = {
     GenerateRoutes({ commit }) {
       return new Promise(resolve => {
         // 向后端请求路由数据
-        getRouters().then(res => {
+        getRouters().then(res => {
           const sdata = JSON.parse(JSON.stringify(res.data))
           const rdata = JSON.parse(JSON.stringify(res.data))
           const sidebarRoutes = filterAsyncRouter(sdata)
           const rewriteRoutes = filterAsyncRouter(rdata, false, true)
-          console.log(sdata,sidebarRoutes,9998888)
           rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
           commit('SET_ROUTES', rewriteRoutes)
           commit('SET_SIDEBAR_ROUTERS', sidebarRoutes)

+ 3 - 6
ruoyi-ui/src/views/activiti/TemplateManagementNew/index.vue

@@ -178,9 +178,9 @@ export default {
   },
   watch:{
     currentSteps (val) {
-      if(this.readOnly){
-        return
-      }
+      // if(this.readOnly){
+      //   return
+      // }
       let componentName = `component_${val}`
       if(Vue.component(componentName) === undefined){
         if(val === 0 ){
@@ -212,17 +212,14 @@ export default {
           this.data = res.data
           this.data.guiStyle = JSON.parse(res.data.guiStyle)
           this.data.moduleId = res.data.id
-
           this.$nextTick(() => {
             if(this.readOnly){
               this.currentSteps = 2
               this.noFreshFlag = false
-              this.$refs[this.currentComponent].activated()
             }else{
               this.$refs.component_1.init()
               this.noFreshFlag = false
             }
-
           })
         }else{
           this.$Modal.fcWarning({

+ 31 - 9
ruoyi-ui/src/views/index.vue

@@ -11,8 +11,8 @@
                   <ul class="index_headerUl">
                     <li v-for="(item,index) in configList" :key="index" @click="headerCld(item)">
                         <img src="../assets/images/icon_list_sj.png" alt="">
-                        <p>{{item.notice_title}}</p>
-                        <span>{{item.create_time}}</span>
+                        <p v-html="item.notice_title"></p>
+                        <span v-html="item.create_time"></span>
                     </li>
                   </ul>
                   <div class="index_haderPagin">
@@ -112,8 +112,8 @@
                  <el-tab-pane label="用户管理" name="first"> -->
                    <div style="height: 84%;">
                         <div style="height: 85%;">
-                          <h3 style="text-align: center; margin: 35px 0;">{{tieku}}</h3>
-                                        <p class="index_profilep" > {{comg}}	</p>
+                          <h3 style="text-align: center; margin: 35px 0;" v-html="tieku"></h3>
+                          <p class="index_profilep"  v-html="comg"> 	</p>
                         </div>
                                       <!-- {{getLisprofileone[0].info_content}} -->
                                       <div class="index_haderPagin">
@@ -241,9 +241,9 @@
             </div>
   </el-dialog>
   <!-- 通知公告弹窗 -->
-  <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="openety" width="980px" append-to-body>
+  <el-dialog class="index_ese" :close-on-click-modal="false" :title="title" :visible.sync="openety" width="980px" append-to-body>
            <div class="index_headertan" >
-               <p>{{actingk.notice_title == undefined? '暂无数据' : actingk.notice_title}}</p>
+               <p v-html="actingk.notice_title == undefined? '暂无数据' : actingk.notice_title"></p>
                <p>{{actingk.create_time == undefined? '暂无数据' : actingk.create_time}} 发布人:{{actingk.create_by}}</p>
                <p v-html="actingk.notice_content"></p>
            </div>
@@ -848,6 +848,12 @@ export default {
 </script>
 
 <style lang="scss">
+  .index_ese{
+    .el-dialog__body{
+      padding-top: 10px !important;
+    }
+
+  }
   .home{
     .el-tabs__header{
      margin-bottom: 5px !important;
@@ -930,7 +936,8 @@ export default {
     padding-bottom: 10px;
    span{
      cursor:pointer;
-     width: 70px;
+     width: 80px;
+     // flex: 1;
      text-align: center;
      line-height: 55px;
      height: 55px;
@@ -939,6 +946,9 @@ export default {
      font-weight: bold;
      color: #666;
      position: relative;
+     overflow: hidden;
+     white-space: nowrap;
+     text-overflow: ellipsis;
      // flex: 1;
      // border-bottom: ;
    }
@@ -1123,12 +1133,12 @@ export default {
     margin-bottom: 20px;
     height: 590px;
     .index_profilep{
-
       font-size: 12px;
       font-family: PingFang SC;
       font-weight: bold;
       color: #343434;
       line-height: 27px;
+       text-indent:2em;
     }
     .index_haderPagin{
       margin-top: 25px;
@@ -1275,15 +1285,17 @@ export default {
   margin: 0 30px;
   p{
     margin: 0;
+    text-indent:2em;
   }
   p:nth-child(1){
     font-size: 24px;
     font-family: PingFang SC;
     font-weight: bold;
     color: #343434;
-    line-height: 24px;
+    line-height: 42px;
     text-align: center;
     margin-bottom: 10px;
+    text-indent:0em;
   }
   p:nth-child(2){
     font-size: 16px;
@@ -1293,6 +1305,16 @@ export default {
     line-height: 24px;
     text-align: center;
     margin-bottom: 20px;
+    text-indent:0em;
+
+  }
+  p:nth-child(3){
+    font-size: 16px;
+    font-family: PingFang SC;
+    font-weight: 400;
+    color: #343434;
+    line-height: 24px;
+
   }
 }
 

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

@@ -31,7 +31,7 @@
     </div>
     <!-- 内容 -->
     <div class="eniting_nav">
-      <el-collapse v-model="activeNames" @change="handleChange">
+      <el-collapse v-model="activeNames" @change="handleChange" >
        <el-form v-show="num == 0" :rules="queryData.rules" :model="queryParams" ref="queryForm" :inline="true" label-width="120px">
           <el-collapse-item :title="item.columnComment" :name="index" v-for="(item,index) in queryData.showData" :key="index"
             class="eitde">
@@ -276,9 +276,11 @@
            this.queryData.showData.filter(route => {
                if(route.cssClass !== null){
                  this.imgShoew = route.cssClass
-                 if(route.cssClass == 2 || route.cssClass == 4 || route.mask.slice(3,4) == '0'){
+                 if(route.cssClass == 2 || route.cssClass == 4 ){
                    console.log(34)
+                   // || route.mask.slice(3,4) == '0'
                    route.hrChildren.filter(routers =>{
+                     
                      routers.isonliy = true
                    })
                    // route.routers = true

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

@@ -43,7 +43,7 @@
           </div>
         </div>
         <pagination sty v-show="total>0" :total="total" layout="prev, pager, next" :page.sync="queryParams.pageNum"
-          :limit.sync="queryParams.pageSize" :pager-count="2" />
+          :limit.sync="queryParams.pageSize"  />
       </el-col>
       <el-col :span="19" class="roleContr">
         <div class="roleContrBox">
@@ -59,7 +59,7 @@
                 <div class="searName">
                   功能
                 </div>
-                <div class="searItem" v-for="item in menusList.heads">
+                <div class="searItem" v-for="item in menusList.heads" :key="item">
                   {{item.name}}
                 </div>
               </div>

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

@@ -8,7 +8,7 @@
           :key="index">{{item | btnConversion}}</el-button>
       </div>
       <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
-        <dynamic-forms :type="1" :ref="item.columnName" :config="queryParams" @inputs="changeFn" :formConfig="item"
+        <dynamic-forms :type="0" :ref="item.columnName" :config="queryParams" @inputs="changeFn" :formConfig="item"
           v-for="(item,index) in queryData.queryList" :key='index' />
         <el-form-item>
           <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -27,7 +27,10 @@
                 :src="JSON.parse(scope.row[scope.column.property])[0].url" alt="">
               <!-- :style="scope.row.list_class" scope.row[scope.column.property] -->
               <span  :style="scope.row.list_class" v-else-if="item.columnName == 'status' " >{{ scope.row[scope.column.property] }}</span>
-              <span  v-else>{{ scope.row[scope.column.property] }}</span>
+              <div v-else>
+                <span v-if="item.fkInfo">{{scope.row[scope.column.property].value}}</span>
+                <span v-else>{{scope.row[scope.column.property]}}</span>
+              </div>
             </template>
           </el-table-column>
         </template>