소스 검색

Merge branch 'analysis' of http://git.jihengcc.cn/sendy/KM-Front-Milestone2 into analysis

Zhang Li, BBF-411-2(Neusoft) 1 년 전
부모
커밋
083fd39cd0
3개의 변경된 파일7개의 추가작업 그리고 26개의 파일을 삭제
  1. 0 6
      src/store/modules/appSetting.js
  2. 0 1
      src/utils/routerUtil.js
  3. 7 19
      src/views/modules/knowledge/warehouse/auditManageList.vue

+ 0 - 6
src/store/modules/appSetting.js

@@ -10,7 +10,6 @@ const appSetting = {
         breadlist: [],
         buttons: {},
         allButtons: {},
-        menusBase:[],
         appKey: ["webApp"],
         appUse:false,//是否选中应用
         idKey: '',//权限的key
@@ -87,9 +86,6 @@ const appSetting = {
         setAllButtons: (state, allButtons) => {
             state.allButtons = allButtons;
         },
-        setMenusBase: (state, menusBase) => {
-            state.menusBase = menusBase;
-        },
         setAppKey: (state, appKey) => {
             state.appKey = [appKey];
         },
@@ -150,7 +146,6 @@ const appSetting = {
                 generatorDynamicRouter().then(res => {
                     var routers = res.routers;
                     var menus = res.menus;
-                    var menusBase = res.menusBase;
                     var menuMap = res.menuMap;
                     var buttons = res.buttons;
                     var allButtons = res.allButtons;
@@ -158,7 +153,6 @@ const appSetting = {
                     commit('setMenuMap', menuMap);
                     commit('setMenus', menus);
                     commit('setButtons', buttons);
-                    commit('setMenusBase', menusBase);
                     commit('setAllButtons', allButtons);
                     commit('setUser', user);
                     commit('setLogined', true);

+ 0 - 1
src/utils/routerUtil.js

@@ -58,7 +58,6 @@ export const generatorDynamicRouter = () => {
                 routers: routers,
                 menuMap: menuMap,
                 buttons: buttons,
-                menusBase: res.data.menus,
                 user: res.data.user,
                 allButtons: res.data.allMenuButtons
             };

+ 7 - 19
src/views/modules/knowledge/warehouse/auditManageList.vue

@@ -74,8 +74,8 @@
                     <a-button type="primary" @click="handleSearchClick">查询</a-button>
                   </div>
                 </a-form>
-                <a-button v-if="checkButton('processEdit')" alias="processEdit" :butn-icon="'false'" @click="$router.push('/knowledge/auditProcessMaintain')">维护审核流程</a-button>
-                <a-button v-if="checkButton('processBatch')" alias="processBatch" :butn-icon="'false'" @click="handldAuditClick('batch')">批量审核</a-button>
+                <rx-button alias="processEdit" :butn-icon="'false'" @click="$router.push('/knowledge/auditProcessMaintain')">维护审核流程</rx-button>
+                <rx-button alias="processBatch" :butn-icon="'false'" @click="handldAuditClick('batch')">批量审核</rx-button>
               </div>
             </div>
           </div>
@@ -97,7 +97,7 @@
           idField="pkId"
         > 
           <template slot="pkId" slot-scope="{text,record}">
-            <div style="white-space: pre-line">{{ $route.query.showUnchecked ? record.approvalsFirst.pkId : text }}</div>
+            <div>{{ $route.query.showUnchecked ? record.approvalsFirst.pkId : text }}</div>
           </template>
            <template slot="titles" slot-scope="{text}">
             <div style="white-space: pre-line">{{ text }}</div>
@@ -115,11 +115,11 @@
              <!-- isAudit 0能审核 1不能审核 -->
             <template v-if="($route.query.showUnchecked ? true : record.isAudit == 0) && (record.approvalStatus == 1 || record.approvalStatus == 3)" >
             <!-- <template v-if="(record.approvalStatus == 1 || record.approvalStatus == 3) && record.approverId == $store.state.appSetting.user.userId" > -->
-              <a-button v-if="checkButton('processDo')" class="clearBtn" alias="processDo" :butn-icon="'none'" @click="handleJumpUpdateClick(record)">审核</a-button>
-              <a-button v-if="checkButton('processFast')" class="clearBtn" alias="processFast" :butn-icon="'none'" @click="handldAuditClick('fast',record)">快速审核</a-button>
+              <rx-button class="clearBtn" alias="processDo" :butn-icon="'none'" @click="handleJumpUpdateClick(record)">审核</rx-button>
+              <rx-button class="clearBtn" alias="processFast" :butn-icon="'none'" @click="handldAuditClick('fast',record)">快速审核</rx-button>
             </template>
             <template v-else>
-              <a-button v-if="checkButton('processLook')" class="clearBtn" alias="processLook" :butn-icon="'none'" @click="handleJumpUpdateClick(record,true)">查看</a-button>
+              <rx-button class="clearBtn" alias="processLook" :butn-icon="'none'" @click="handleJumpUpdateClick(record,true)">查看</rx-button>
             </template>
           </template>
         </rx-grid>
@@ -172,7 +172,6 @@ import classApi from '@/api/knowledge/classify'
 import { getCategory } from '../aJs/getClassifyTree'
 import mixin from "../aMixin/mixin"
 import initMixin from "../aMixin/initMixin"
-import {mapState} from "vuex";
 const auditMixin = new mixin('audit')
 export default {
   name: 'auditManageList',
@@ -361,6 +360,7 @@ export default {
   },
   mounted() {
     let innerWidth = window.innerWidth
+
     // 计算
     setTimeout(() => {
       let offsetWidth = document.querySelector('.scroll-ckunk').getBoundingClientRect().left
@@ -381,9 +381,6 @@ export default {
    
   },
   computed: {
-    ...mapState({
-      menusBase: state => state.appSetting.menusBase,
-    }),
     getApprovalStatus(){
       return function(arg) {
         switch(arg) {
@@ -413,15 +410,6 @@ export default {
       }
       this.reloadTable()
     },
-    //判断按钮权限
-    checkButton(menuKey){
-      let btnLength = this.menusBase.filter(item => item.menuKey == menuKey)
-      if(btnLength.length>0){
-        return true;
-      }else{
-        return false;
-      }
-    },
     // 审核
     handleJumpUpdateClick(record,arg) {
       // 从知识管理跳转