JeecgBoot 2.4.2 积木报表版本发布,基于SpringBoot的低代码平台

This commit is contained in:
zhangdaiscott
2021-01-23 23:59:31 +08:00
parent e9255f6bcc
commit df75998aae
238 changed files with 4660 additions and 35961 deletions

View File

@ -17,7 +17,8 @@ const FormTypes = {
radio:'radio',
checkbox_meta:"checkbox_meta",
input_pop:'input_pop',
sel_depart: 'sel_depart',
sel_user: 'sel_user',
slot: 'slot',
hidden: 'hidden'
}

View File

@ -206,6 +206,37 @@ export function getNoAuthCols(pre){
return cols;
}
/**
* 将Online的行编辑按钮权限添加至本地存储
*/
export function addOnlineBtAuth2Storage(pre, authList){
let allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || "[]");
let newAuthList = allAuthList.filter(item=>{
if(!item.action){
return true
}
return item.action.indexOf(pre)<0
})
if(authList && authList.length>0){
for(let item of authList){
newAuthList.push({
action: pre+item,
type:1,
status:1
})
}
let temp = JSON.parse(sessionStorage.getItem(USER_AUTH) || "[]");
let newArr = temp.filter(item=>{
if(!item.action){
return true
}
return item.action.indexOf(pre)<0 || authList.indexOf(item.action.replace(pre, ''))<0
})
sessionStorage.setItem(USER_AUTH, JSON.stringify(newArr))
}
sessionStorage.setItem(SYS_BUTTON_AUTH, JSON.stringify(newAuthList))
}
/**

View File

@ -108,6 +108,7 @@ export function filterGlobalPermission(el, binding, vnode) {
}
let permissions = [];
for (let item of permissionList) {
//权限策略1显示2禁用
if(item.type != '2'){
//update--begin--autor:wangshuai-----date:20200729------for按钮权限授权标识的提示信息是多个用逗号分隔逻辑处理 gitee#I1OUGU-------
if(item.action){

View File

@ -22,7 +22,6 @@ const service = axios.create({
const err = (error) => {
if (error.response) {
let that=this;
let data = error.response.data
const token = Vue.ls.get(ACCESS_TOKEN)
console.log("------异常响应------",token)

View File

@ -145,6 +145,7 @@ function generateChildRouters (data) {
component: componentPath,
//component: resolve => require(['@/' + component+'.vue'], resolve),
hidden:item.hidden,
//component:()=> import(`@/views/${item.component}.vue`),
meta: {
title:item.meta.title ,
icon: item.meta.icon,
@ -539,4 +540,24 @@ export function getVmParentByName(vm, name) {
*/
export function neverNull(value, def) {
return value == null ? (neverNull(def, '')) : value
}
/**
* 根据元素值移除数组中的一个元素
* @param array 数组
* @param prod 属性名
* @param value 属性值
* @returns {string}
*/
export function removeArrayElement(array, prod, value) {
let index = -1
for(let i = 0;i<array.length;i++){
if(array[i][prod] == value){
index = i;
break;
}
}
if(index>=0){
array.splice(index, 1);
}
}