提交 06e7b2c1 编写于 作者: lzlhxj's avatar lzlhxj

Merge remote-tracking branch 'remotes/origin/master'

...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
"label": "数据对象能力", "label": "数据对象能力",
"text": "数据对象能力", "text": "数据对象能力",
"data":"", "data":"",
"codename":"Oppriv",
"value": "OPPRIV", "value": "OPPRIV",
"disabled": false "disabled": false
...@@ -18,6 +19,7 @@ ...@@ -18,6 +19,7 @@
"label": "统一资源", "label": "统一资源",
"text": "统一资源", "text": "统一资源",
"data":"", "data":"",
"codename":"Unires",
"value": "UNIRES", "value": "UNIRES",
"disabled": false "disabled": false
...@@ -34,6 +36,7 @@ ...@@ -34,6 +36,7 @@
"label": "实体行为", "label": "实体行为",
"text": "实体行为", "text": "实体行为",
"data":"", "data":"",
"codename":"Deaction",
"value": "DEACTION", "value": "DEACTION",
"disabled": false "disabled": false
...@@ -43,6 +46,7 @@ ...@@ -43,6 +46,7 @@
"label": "数据集合", "label": "数据集合",
"text": "数据集合", "text": "数据集合",
"data":"", "data":"",
"codename":"Dataset",
"value": "DATASET", "value": "DATASET",
"disabled": false "disabled": false
......
...@@ -70,6 +70,7 @@ import AppFormatData from './components/app-format-data/app-format-data.vue' ...@@ -70,6 +70,7 @@ import AppFormatData from './components/app-format-data/app-format-data.vue'
import AppUploadFileInfo from './components/app-upload-file-info/app-upload-file-info.vue' import AppUploadFileInfo from './components/app-upload-file-info/app-upload-file-info.vue'
import ContextMenu from './components/context-menu/context-menu' import ContextMenu from './components/context-menu/context-menu'
import AppColumnFormat from './components/app-column-format/app-column-format.vue' import AppColumnFormat from './components/app-column-format/app-column-format.vue'
import AppQuickGroup from './components/app-quick-group/app-quick-group.vue'
// 全局挂载UI实体服务注册中心 // 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister; window['uiServiceRegister'] = uiServiceRegister;
...@@ -149,5 +150,6 @@ export const AppComponents = { ...@@ -149,5 +150,6 @@ export const AppComponents = {
v.component('app-upload-file-info', AppUploadFileInfo); v.component('app-upload-file-info', AppUploadFileInfo);
v.component('context-menu',ContextMenu); v.component('context-menu',ContextMenu);
v.component('app-column-format',AppColumnFormat); v.component('app-column-format',AppColumnFormat);
v.component('app-quick-group',AppQuickGroup);
}, },
}; };
\ No newline at end of file
.app-quick-group{
padding: 4px;
background-color: #F1F1F1;
.app-quick-item{
margin-right: 8px;
padding: 8px;
cursor: pointer;
.app-quick-item-label{
margin-left:4px;
}
.app-seleted-item{
display: inline-block;
font-weight: 700;
color: #0c64eb !important;
padding: 4px;
border-bottom: 2px solid;
}
.app-seleted-item:focus {
outline: none;
}
.app-quick-item-counter{
border-radius: 12px;
padding-left: 4px;
font-size: 12px;
font-weight: 400;
vertical-align: middle;
display: inline-block;
width: 18px;
height: 18px;
margin-left: 4px;
background-color: #ddd;
}
}
.app-quick-item :hover{
color: #0c64eb !important;
}
}
\ No newline at end of file
<template>
<div class="app-quick-group">
<span class="app-quick-item" v-for="item in renderArray" :key="item.id" @click="handleClick(item)">
<span v-if="!item.children" :style="{color:item.color}" :class="{'app-seleted-item':isSelectedItem(item)}">
<i v-if=" item.iconcls && !Object.is(item.iconcls, '')" :class="item.iconcls"></i>
<img v-else-if="item.icon && !Object.is(item.icon, '')" :src="item.icon" />
<span class="app-quick-item-label">{{item.label}}</span>
<span v-show="isSelectedItem(item) && counterService && counterService.counterData && counterService.counterData[item.codename]" class="app-quick-item-counter">{{itemTag(item)}}</span>
</span>
<el-dropdown v-if="item.children" style="outline: none !important;" trigger="click" @command="handleCommand($event,item)">
<span :style="{color:item.color}" :class="{'app-seleted-item':isSelectedItem(item)}">
<i v-if=" item.iconcls && !Object.is(item.iconcls, '')" :class="item.iconcls"></i>
<img v-else-if="item.icon && !Object.is(item.icon, '')" :src="item.icon" />
<span class="app-quick-item-label">{{item.label}}</span>
<span v-show="isSelectedItem(item) && counterService && counterService.counterData && counterService.counterData[item.codename]" class="app-quick-item-counter">{{itemTag(item)}}</span>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="childitem in item.children" :command="childitem" :key="childitem.id">
<span :style="{color:childitem.color}">
<i v-if=" childitem.iconcls && !Object.is(childitem.iconcls, '')" :class="childitem.iconcls"></i>
<img v-else-if="childitem.icon && !Object.is(childitem.icon, '')" :src="childitem.icon" />
<span :style="{color:(childitem.label == item.label)?'#0c64eb':''}">{{childitem.label}}</span>
</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</span>
</div>
</template>
<script lang="ts">
import { Vue, Component, Prop, Model, Emit } from "vue-property-decorator";
@Component({})
export default class AppQuickGroup extends Vue {
/**
* 传入渲染项
*
* @type {Array<any>}
* @memberof AppQuickGroup
*/
@Prop() public items!:Array<any>;
/**
* 计数器服务名
*
* @type {string}
* @memberof AppQuickGroup
*/
@Prop() public counterService?:any;
/**
* UI选中项
*
* @type {*}
* @memberof AppQuickGroup
*/
public selectedUiItem:any;
/**
* 传入渲染项
*
* @type {Array<any>}
* @memberof AppQuickGroup
*/
get renderArray(){
if(this.items && this.items.length >0){
this.selectedUiItem = this.items[0];
this.handleClick(this.items[0]);
return this.handleDataSet(this.items)
}else{
return [];
}
}
public itemTag(item:any){
if(this.counterService && this.counterService.counterData && item.codename){
return this.counterService.counterData[item.codename];
}else{
return "";
}
}
/**
* 是否选中当前项
*
* @param item 传入当前项
* @memberof AppQuickGroup
*/
public isSelectedItem(item:any){
if(this.selectedUiItem && (this.selectedUiItem.id === item.id)){
return true;
}else{
return false;
}
}
/**
* 处理代码表返回数据(树状结构)
*
* @param result 返回数组
* @memberof AppQuickGroup
*/
public handleDataSet(result:Array<any>){
let list:Array<any> = [];
if(result.length === 0){
return list;
}
result.forEach((codeItem:any) =>{
if(!codeItem.pvalue){
let valueField:string = codeItem.value;
this.setChildCodeItems(valueField,result,codeItem);
list.push(codeItem);
}
})
return list;
}
/**
* 处理非根节点数据
*
* @param pValue 父值
* @param result 返回数组
* @param codeItem 代码项
* @memberof AppQuickGroup
*/
public setChildCodeItems(pValue:string,result:Array<any>,codeItem:any){
result.forEach((item:any) =>{
if(item.pvalue == pValue){
let valueField:string = item.value;
this.setChildCodeItems(valueField,result,item);
if(!codeItem.children){
codeItem.children = [];
}
codeItem.children.push(item);
}
})
}
/**
* 处理点击事件
*
* @param $event 值
* @param isswitch 是否切换UI选中项
* @memberof AppQuickGroup
*/
public handleClick($event:any,isswitch:boolean = true){
this.$emit('valuechange',$event);
if(isswitch){
this.selectedUiItem = $event;
}
this.$forceUpdate();
}
/**
* 处理子项点击事件
*
* @param $event 值
* @param item 父值
* @memberof AppQuickGroup
*/
public handleCommand($event:any,item:any){
item.label = $event.label;
item.codename = $event.codename;
this.handleClick($event,false);
}
}
</script>
<style lang='less'>
@import "./app-quick-group.less";
</style>
\ No newline at end of file
...@@ -117,6 +117,9 @@ export default class MDViewEngine extends ViewEngine { ...@@ -117,6 +117,9 @@ export default class MDViewEngine extends ViewEngine {
if (Object.is(eventName, 'load')) { if (Object.is(eventName, 'load')) {
this.onSearchFormLoad(args); this.onSearchFormLoad(args);
} }
if (Object.is(eventName, 'search')) {
this.onSearchFormLoad(args);
}
} }
/** /**
...@@ -157,6 +160,20 @@ export default class MDViewEngine extends ViewEngine { ...@@ -157,6 +160,20 @@ export default class MDViewEngine extends ViewEngine {
this.isLoadDefault = true; this.isLoadDefault = true;
} }
/**
* 搜索表单搜索
*
* @param {*} [args={}]
* @memberof MDViewEngine
*/
public onSearchFormSearch(args: any = {}): void {
if (this.getMDCtrl() && this.isLoadDefault) {
const tag = this.getMDCtrl().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.viewparams });
}
this.isLoadDefault = true;
}
/** /**
* 处理实体界面行为 * 处理实体界面行为
* *
...@@ -372,6 +389,15 @@ export default class MDViewEngine extends ViewEngine { ...@@ -372,6 +389,15 @@ export default class MDViewEngine extends ViewEngine {
if (this.view && !this.view.isExpandSearchForm) { if (this.view && !this.view.isExpandSearchForm) {
Object.assign(arg, { query: this.view.query }); Object.assign(arg, { query: this.view.query });
} }
// 快速分组和快速搜索栏
let otherQueryParam:any = {};
if(this.view && this.view.qucikGroupData){
Object.assign(otherQueryParam,this.view.qucikGroupData);
}
if(this.view && this.view.qucikFormData){
Object.assign(otherQueryParam,this.view.qucikFormData);
}
Object.assign(arg,{viewparams:otherQueryParam});
} }
/** /**
......
...@@ -17,6 +17,7 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => { ...@@ -17,6 +17,7 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
label: '数据对象能力', label: '数据对象能力',
text: '数据对象能力', text: '数据对象能力',
"data":"", "data":"",
"codename":"Oppriv",
value: 'OPPRIV', value: 'OPPRIV',
disabled: false, disabled: false,
...@@ -26,6 +27,7 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => { ...@@ -26,6 +27,7 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
label: '统一资源', label: '统一资源',
text: '统一资源', text: '统一资源',
"data":"", "data":"",
"codename":"Unires",
value: 'UNIRES', value: 'UNIRES',
disabled: false, disabled: false,
...@@ -42,6 +44,7 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => { ...@@ -42,6 +44,7 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
label: '实体行为', label: '实体行为',
text: '实体行为', text: '实体行为',
"data":"", "data":"",
"codename":"Deaction",
value: 'DEACTION', value: 'DEACTION',
disabled: false, disabled: false,
...@@ -51,6 +54,7 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => { ...@@ -51,6 +54,7 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
label: '数据集合', label: '数据集合',
text: '数据集合', text: '数据集合',
"data":"", "data":"",
"codename":"Dataset",
value: 'DATASET', value: 'DATASET',
disabled: false, disabled: false,
......
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
v-show="isExpandSearchForm" v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft" loaddraftAction="FilterGetDraft"
loadAction="FilterGet" loadAction="FilterGet"
name="searchform" name="searchform"
ref='searchform' ref='searchform'
@save="searchform_save($event)" @save="searchform_save($event)"
...@@ -102,6 +103,7 @@ ...@@ -102,6 +103,7 @@
</div> </div>
</template> </template>
<script lang='tsx'> <script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator'; import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils'; import { UIActionTool,Util } from '@/utils';
...@@ -111,6 +113,8 @@ import SYS_PERMISSIONService from '@/service/sys-permission/sys-permission-servi ...@@ -111,6 +113,8 @@ import SYS_PERMISSIONService from '@/service/sys-permission/sys-permission-servi
import GridViewEngine from '@engine/view/grid-view-engine'; import GridViewEngine from '@engine/view/grid-view-engine';
import CodeListService from "@service/app/codelist-service";
@Component({ @Component({
components: { components: {
...@@ -1266,6 +1270,7 @@ export default class SYS_PERMISSIONGridViewBase extends Vue { ...@@ -1266,6 +1270,7 @@ export default class SYS_PERMISSIONGridViewBase extends Vue {
*/ */
public isSingleSelect: boolean = false; public isSingleSelect: boolean = false;
/** /**
* 是否嵌入关系界面 * 是否嵌入关系界面
* *
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
v-show="isExpandSearchForm" v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft" loaddraftAction="FilterGetDraft"
loadAction="FilterGet" loadAction="FilterGet"
name="searchform" name="searchform"
ref='searchform' ref='searchform'
@save="searchform_save($event)" @save="searchform_save($event)"
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
v-show="isExpandSearchForm" v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft" loaddraftAction="FilterGetDraft"
loadAction="FilterGet" loadAction="FilterGet"
name="searchform" name="searchform"
ref='searchform' ref='searchform'
@save="searchform_save($event)" @save="searchform_save($event)"
...@@ -99,6 +100,7 @@ ...@@ -99,6 +100,7 @@
</div> </div>
</template> </template>
<script lang='tsx'> <script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator'; import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils'; import { UIActionTool,Util } from '@/utils';
...@@ -108,6 +110,8 @@ import SYS_ROLE_PERMISSIONService from '@/service/sys-role-permission/sys-role-p ...@@ -108,6 +110,8 @@ import SYS_ROLE_PERMISSIONService from '@/service/sys-role-permission/sys-role-p
import GridViewEngine from '@engine/view/grid-view-engine'; import GridViewEngine from '@engine/view/grid-view-engine';
import CodeListService from "@service/app/codelist-service";
@Component({ @Component({
components: { components: {
...@@ -1294,6 +1298,7 @@ export default class SYS_ROLE_PERMISSIONGridViewBase extends Vue { ...@@ -1294,6 +1298,7 @@ export default class SYS_ROLE_PERMISSIONGridViewBase extends Vue {
*/ */
public isSingleSelect: boolean = false; public isSingleSelect: boolean = false;
/** /**
* 是否嵌入关系界面 * 是否嵌入关系界面
* *
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
v-show="isExpandSearchForm" v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft" loaddraftAction="FilterGetDraft"
loadAction="FilterGet" loadAction="FilterGet"
name="searchform" name="searchform"
ref='searchform' ref='searchform'
@save="searchform_save($event)" @save="searchform_save($event)"
......
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
v-show="isExpandSearchForm" v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft" loaddraftAction="FilterGetDraft"
loadAction="FilterGet" loadAction="FilterGet"
name="searchform" name="searchform"
ref='searchform' ref='searchform'
@save="searchform_save($event)" @save="searchform_save($event)"
...@@ -102,6 +103,7 @@ ...@@ -102,6 +103,7 @@
</div> </div>
</template> </template>
<script lang='tsx'> <script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator'; import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils'; import { UIActionTool,Util } from '@/utils';
...@@ -111,6 +113,8 @@ import SYS_ROLEService from '@/service/sys-role/sys-role-service'; ...@@ -111,6 +113,8 @@ import SYS_ROLEService from '@/service/sys-role/sys-role-service';
import GridViewEngine from '@engine/view/grid-view-engine'; import GridViewEngine from '@engine/view/grid-view-engine';
import CodeListService from "@service/app/codelist-service";
@Component({ @Component({
components: { components: {
...@@ -1266,6 +1270,7 @@ export default class SYS_ROLEGridViewBase extends Vue { ...@@ -1266,6 +1270,7 @@ export default class SYS_ROLEGridViewBase extends Vue {
*/ */
public isSingleSelect: boolean = false; public isSingleSelect: boolean = false;
/** /**
* 是否嵌入关系界面 * 是否嵌入关系界面
* *
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
v-show="isExpandSearchForm" v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft" loaddraftAction="FilterGetDraft"
loadAction="FilterGet" loadAction="FilterGet"
name="searchform" name="searchform"
ref='searchform' ref='searchform'
@save="searchform_save($event)" @save="searchform_save($event)"
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
v-show="isExpandSearchForm" v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft" loaddraftAction="FilterGetDraft"
loadAction="FilterGet" loadAction="FilterGet"
name="searchform" name="searchform"
ref='searchform' ref='searchform'
@save="searchform_save($event)" @save="searchform_save($event)"
...@@ -99,6 +100,7 @@ ...@@ -99,6 +100,7 @@
</div> </div>
</template> </template>
<script lang='tsx'> <script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator'; import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils'; import { UIActionTool,Util } from '@/utils';
...@@ -108,6 +110,8 @@ import SYS_USER_ROLEService from '@/service/sys-user-role/sys-user-role-service' ...@@ -108,6 +110,8 @@ import SYS_USER_ROLEService from '@/service/sys-user-role/sys-user-role-service'
import GridViewEngine from '@engine/view/grid-view-engine'; import GridViewEngine from '@engine/view/grid-view-engine';
import CodeListService from "@service/app/codelist-service";
@Component({ @Component({
components: { components: {
...@@ -1294,6 +1298,7 @@ export default class SYS_USER_ROLEGridViewBase extends Vue { ...@@ -1294,6 +1298,7 @@ export default class SYS_USER_ROLEGridViewBase extends Vue {
*/ */
public isSingleSelect: boolean = false; public isSingleSelect: boolean = false;
/** /**
* 是否嵌入关系界面 * 是否嵌入关系界面
* *
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
v-show="isExpandSearchForm" v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft" loaddraftAction="FilterGetDraft"
loadAction="FilterGet" loadAction="FilterGet"
name="searchform" name="searchform"
ref='searchform' ref='searchform'
@save="searchform_save($event)" @save="searchform_save($event)"
......
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
v-show="isExpandSearchForm" v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft" loaddraftAction="FilterGetDraft"
loadAction="FilterGet" loadAction="FilterGet"
name="searchform" name="searchform"
ref='searchform' ref='searchform'
@save="searchform_save($event)" @save="searchform_save($event)"
...@@ -102,6 +103,7 @@ ...@@ -102,6 +103,7 @@
</div> </div>
</template> </template>
<script lang='tsx'> <script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator'; import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils'; import { UIActionTool,Util } from '@/utils';
...@@ -111,6 +113,8 @@ import SYS_USERService from '@/service/sys-user/sys-user-service'; ...@@ -111,6 +113,8 @@ import SYS_USERService from '@/service/sys-user/sys-user-service';
import GridViewEngine from '@engine/view/grid-view-engine'; import GridViewEngine from '@engine/view/grid-view-engine';
import CodeListService from "@service/app/codelist-service";
@Component({ @Component({
components: { components: {
...@@ -1266,6 +1270,7 @@ export default class SYS_USERGridViewBase extends Vue { ...@@ -1266,6 +1270,7 @@ export default class SYS_USERGridViewBase extends Vue {
*/ */
public isSingleSelect: boolean = false; public isSingleSelect: boolean = false;
/** /**
* 是否嵌入关系界面 * 是否嵌入关系界面
* *
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
v-show="isExpandSearchForm" v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft" loaddraftAction="FilterGetDraft"
loadAction="FilterGet" loadAction="FilterGet"
name="searchform" name="searchform"
ref='searchform' ref='searchform'
@save="searchform_save($event)" @save="searchform_save($event)"
......
...@@ -216,11 +216,16 @@ ...@@ -216,11 +216,16 @@
>.view-card{ >.view-card{
>.ivu-card-body{ >.ivu-card-body{
>.content-container{ >.content-container{
.quick-group-container,.quick-search-container,.quick-search-input{ .quick-group-container,.quick-search-input{
float: left; float: left;
margin-top: 6px; margin-top: 6px;
margin-bottom: 6px; margin-bottom: 6px;
} }
.quick-search-container{
float: left;
margin-top: -2px;
margin-bottom: 6px;
}
} }
} }
} }
......
...@@ -784,7 +784,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -784,7 +784,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
if (!this.formValidateStatus()) { if (!this.formValidateStatus()) {
return; return;
} }
this.$emit('load', this.data); this.$emit('search', this.data);
} }
/** /**
...@@ -796,7 +796,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -796,7 +796,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
if (!this.formValidateStatus()) { if (!this.formValidateStatus()) {
return; return;
} }
this.$emit('load', this.data); this.$emit('search', this.data);
} }
/** /**
......
...@@ -583,7 +583,9 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -583,7 +583,9 @@ export default class MainBase extends Vue implements ControlInterface {
const parentdata: any = {}; const parentdata: any = {};
this.$emit('beforeload', parentdata); this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata); Object.assign(arg, parentdata);
Object.assign(arg,{viewparams:this.viewparams}); let tempViewParams:any = parentdata.viewparams?parentdata.viewparams:{};
Object.assign(tempViewParams,JSON.parse(JSON.stringify(this.viewparams)));
Object.assign(arg,{viewparams:tempViewParams});
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator); const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
......
...@@ -31,6 +31,11 @@ ...@@ -31,6 +31,11 @@
.el-table { .el-table {
.quick-toolbar{ .quick-toolbar{
display: inline-block; display: inline-block;
button{
background: #ebf3fb;
color: #2575ca;
border: 0;
}
} }
.el-tooltip{ .el-tooltip{
.ivu-form-item{ .ivu-form-item{
...@@ -72,9 +77,6 @@ ...@@ -72,9 +77,6 @@
.el-table__body-wrapper{ .el-table__body-wrapper{
height: calc(100% - 45px) !important; height: calc(100% - 45px) !important;
} }
.el-table__empty-block{
height: auto !important;
}
} }
.ivu-modal-content{ .ivu-modal-content{
.footer{ .footer{
...@@ -85,4 +87,5 @@ ...@@ -85,4 +87,5 @@
} }
// this is less // this is less
...@@ -672,7 +672,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -672,7 +672,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
if (!this.formValidateStatus()) { if (!this.formValidateStatus()) {
return; return;
} }
this.$emit('load', this.data); this.$emit('search', this.data);
} }
/** /**
...@@ -684,7 +684,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -684,7 +684,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
if (!this.formValidateStatus()) { if (!this.formValidateStatus()) {
return; return;
} }
this.$emit('load', this.data); this.$emit('search', this.data);
} }
/** /**
......
...@@ -581,7 +581,9 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -581,7 +581,9 @@ export default class MainBase extends Vue implements ControlInterface {
const parentdata: any = {}; const parentdata: any = {};
this.$emit('beforeload', parentdata); this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata); Object.assign(arg, parentdata);
Object.assign(arg,{viewparams:this.viewparams}); let tempViewParams:any = parentdata.viewparams?parentdata.viewparams:{};
Object.assign(tempViewParams,JSON.parse(JSON.stringify(this.viewparams)));
Object.assign(arg,{viewparams:tempViewParams});
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator); const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
......
...@@ -31,6 +31,11 @@ ...@@ -31,6 +31,11 @@
.el-table { .el-table {
.quick-toolbar{ .quick-toolbar{
display: inline-block; display: inline-block;
button{
background: #ebf3fb;
color: #2575ca;
border: 0;
}
} }
.el-tooltip{ .el-tooltip{
.ivu-form-item{ .ivu-form-item{
...@@ -72,9 +77,6 @@ ...@@ -72,9 +77,6 @@
.el-table__body-wrapper{ .el-table__body-wrapper{
height: calc(100% - 45px) !important; height: calc(100% - 45px) !important;
} }
.el-table__empty-block{
height: auto !important;
}
} }
.ivu-modal-content{ .ivu-modal-content{
.footer{ .footer{
...@@ -85,4 +87,5 @@ ...@@ -85,4 +87,5 @@
} }
// this is less // this is less
...@@ -756,7 +756,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -756,7 +756,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
if (!this.formValidateStatus()) { if (!this.formValidateStatus()) {
return; return;
} }
this.$emit('load', this.data); this.$emit('search', this.data);
} }
/** /**
...@@ -768,7 +768,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -768,7 +768,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
if (!this.formValidateStatus()) { if (!this.formValidateStatus()) {
return; return;
} }
this.$emit('load', this.data); this.$emit('search', this.data);
} }
/** /**
......
...@@ -595,7 +595,9 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -595,7 +595,9 @@ export default class MainBase extends Vue implements ControlInterface {
const parentdata: any = {}; const parentdata: any = {};
this.$emit('beforeload', parentdata); this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata); Object.assign(arg, parentdata);
Object.assign(arg,{viewparams:this.viewparams}); let tempViewParams:any = parentdata.viewparams?parentdata.viewparams:{};
Object.assign(tempViewParams,JSON.parse(JSON.stringify(this.viewparams)));
Object.assign(arg,{viewparams:tempViewParams});
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator); const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
......
...@@ -31,6 +31,11 @@ ...@@ -31,6 +31,11 @@
.el-table { .el-table {
.quick-toolbar{ .quick-toolbar{
display: inline-block; display: inline-block;
button{
background: #ebf3fb;
color: #2575ca;
border: 0;
}
} }
.el-tooltip{ .el-tooltip{
.ivu-form-item{ .ivu-form-item{
...@@ -72,9 +77,6 @@ ...@@ -72,9 +77,6 @@
.el-table__body-wrapper{ .el-table__body-wrapper{
height: calc(100% - 45px) !important; height: calc(100% - 45px) !important;
} }
.el-table__empty-block{
height: auto !important;
}
} }
.ivu-modal-content{ .ivu-modal-content{
.footer{ .footer{
...@@ -85,4 +87,5 @@ ...@@ -85,4 +87,5 @@
} }
// this is less // this is less
...@@ -672,7 +672,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -672,7 +672,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
if (!this.formValidateStatus()) { if (!this.formValidateStatus()) {
return; return;
} }
this.$emit('load', this.data); this.$emit('search', this.data);
} }
/** /**
...@@ -684,7 +684,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -684,7 +684,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
if (!this.formValidateStatus()) { if (!this.formValidateStatus()) {
return; return;
} }
this.$emit('load', this.data); this.$emit('search', this.data);
} }
/** /**
......
...@@ -595,7 +595,9 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -595,7 +595,9 @@ export default class MainBase extends Vue implements ControlInterface {
const parentdata: any = {}; const parentdata: any = {};
this.$emit('beforeload', parentdata); this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata); Object.assign(arg, parentdata);
Object.assign(arg,{viewparams:this.viewparams}); let tempViewParams:any = parentdata.viewparams?parentdata.viewparams:{};
Object.assign(tempViewParams,JSON.parse(JSON.stringify(this.viewparams)));
Object.assign(arg,{viewparams:tempViewParams});
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator); const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
......
...@@ -31,6 +31,11 @@ ...@@ -31,6 +31,11 @@
.el-table { .el-table {
.quick-toolbar{ .quick-toolbar{
display: inline-block; display: inline-block;
button{
background: #ebf3fb;
color: #2575ca;
border: 0;
}
} }
.el-tooltip{ .el-tooltip{
.ivu-form-item{ .ivu-form-item{
...@@ -72,9 +77,6 @@ ...@@ -72,9 +77,6 @@
.el-table__body-wrapper{ .el-table__body-wrapper{
height: calc(100% - 45px) !important; height: calc(100% - 45px) !important;
} }
.el-table__empty-block{
height: auto !important;
}
} }
.ivu-modal-content{ .ivu-modal-content{
.footer{ .footer{
...@@ -85,4 +87,5 @@ ...@@ -85,4 +87,5 @@
} }
// this is less // this is less
...@@ -672,7 +672,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -672,7 +672,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
if (!this.formValidateStatus()) { if (!this.formValidateStatus()) {
return; return;
} }
this.$emit('load', this.data); this.$emit('search', this.data);
} }
/** /**
...@@ -684,7 +684,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -684,7 +684,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
if (!this.formValidateStatus()) { if (!this.formValidateStatus()) {
return; return;
} }
this.$emit('load', this.data); this.$emit('search', this.data);
} }
/** /**
......
...@@ -581,7 +581,9 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -581,7 +581,9 @@ export default class MainBase extends Vue implements ControlInterface {
const parentdata: any = {}; const parentdata: any = {};
this.$emit('beforeload', parentdata); this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata); Object.assign(arg, parentdata);
Object.assign(arg,{viewparams:this.viewparams}); let tempViewParams:any = parentdata.viewparams?parentdata.viewparams:{};
Object.assign(tempViewParams,JSON.parse(JSON.stringify(this.viewparams)));
Object.assign(arg,{viewparams:tempViewParams});
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator); const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
......
...@@ -31,6 +31,11 @@ ...@@ -31,6 +31,11 @@
.el-table { .el-table {
.quick-toolbar{ .quick-toolbar{
display: inline-block; display: inline-block;
button{
background: #ebf3fb;
color: #2575ca;
border: 0;
}
} }
.el-tooltip{ .el-tooltip{
.ivu-form-item{ .ivu-form-item{
...@@ -72,9 +77,6 @@ ...@@ -72,9 +77,6 @@
.el-table__body-wrapper{ .el-table__body-wrapper{
height: calc(100% - 45px) !important; height: calc(100% - 45px) !important;
} }
.el-table__empty-block{
height: auto !important;
}
} }
.ivu-modal-content{ .ivu-modal-content{
.footer{ .footer{
...@@ -85,4 +87,5 @@ ...@@ -85,4 +87,5 @@
} }
// this is less // this is less
...@@ -27,6 +27,7 @@ import java.util.List; ...@@ -27,6 +27,7 @@ import java.util.List;
@MapperScan("cn.ibizlab.*.mapper") @MapperScan("cn.ibizlab.*.mapper")
@SpringBootApplication(exclude = { @SpringBootApplication(exclude = {
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class, org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class,
org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration.class,
}) })
public class webApplication extends WebMvcConfigurerAdapter{ public class webApplication extends WebMvcConfigurerAdapter{
......
...@@ -32,9 +32,5 @@ zuul: ...@@ -32,9 +32,5 @@ zuul:
path: /sys_psdeopprivs/** path: /sys_psdeopprivs/**
serviceId: ibzuaa-api serviceId: ibzuaa-api
stripPrefix: false stripPrefix: false
wfcore:
path: /wfcore/**
serviceId: ibzwf-api
stripPrefix: true
sensitive-headers: sensitive-headers:
- Cookie,Set-Cookie,Authorization - Cookie,Set-Cookie,Authorization
...@@ -8,4 +8,4 @@ zuul: ...@@ -8,4 +8,4 @@ zuul:
loginv7: loginv7:
path: /v7/login path: /v7/login
serviceId: ibzuaa-api serviceId: ibzuaa-api
stripPrefix: true stripPrefix: false
\ No newline at end of file \ No newline at end of file
...@@ -15,8 +15,10 @@ import java.util.List; ...@@ -15,8 +15,10 @@ import java.util.List;
@EnableDiscoveryClient @EnableDiscoveryClient
@Configuration @Configuration
@EnableTransactionManagement @EnableTransactionManagement
@SpringBootApplication
@EnableFeignClients(basePackages = {"cn.ibizlab" }) @EnableFeignClients(basePackages = {"cn.ibizlab" })
@SpringBootApplication(exclude = {
org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration.class,
})
public class DevBootApplication extends WebMvcConfigurerAdapter{ public class DevBootApplication extends WebMvcConfigurerAdapter{
public static void main(String[] args) { public static void main(String[] args) {
......
...@@ -4,4 +4,10 @@ spring: ...@@ -4,4 +4,10 @@ spring:
application: application:
name: ibzuaa name: ibzuaa
main: main:
allow-bean-definition-overriding: true allow-bean-definition-overriding: true
\ No newline at end of file zuul:
routes:
loginv7:
path: /v7/login
serviceId: ibzuaa-api
stripPrefix: false
\ No newline at end of file
...@@ -3,55 +3,6 @@ ...@@ -3,55 +3,6 @@
], ],
"predefineddatarange":[{"id":"ALL","name":"全部数据"},{"id":"CURORG","name":"当前单位"},{"id":"PORG","name":"上级单位"},{"id":"SORG","name":"下级单位"},{"id":"CURORGDEPT","name":"当前部门"},{"id":"PORGDEPT","name":"上级部门"},{"id":"SORGDEPT","name":"下级部门"}], "predefineddatarange":[{"id":"ALL","name":"全部数据"},{"id":"CURORG","name":"当前单位"},{"id":"PORG","name":"上级单位"},{"id":"SORG","name":"下级单位"},{"id":"CURORGDEPT","name":"当前部门"},{"id":"PORGDEPT","name":"上级部门"},{"id":"SORGDEPT","name":"下级部门"}],
"entities":[ "entities":[
{
"dename":"SYS_ROLE_PERMISSION",
"delogicname":"角色权限关系",
"sysmoudle":{"id":"UAA","name":"uaa"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" }]
}
, {
"dename":"SYS_PERMISSION",
"delogicname":"权限/资源",
"sysmoudle":{"id":"UAA","name":"uaa"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" }]
}
, {
"dename":"SYS_USER_ROLE",
"delogicname":"用户角色关系",
"sysmoudle":{"id":"UAA","name":"uaa"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }]
}
, {
"dename":"SYS_USER",
"delogicname":"系统用户",
"sysmoudle":{"id":"UAA","name":"uaa"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" }]
}
, {
"dename":"SYS_ROLE",
"delogicname":"系统角色",
"sysmoudle":{"id":"UAA","name":"uaa"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" }]
}
, {
"dename":"SYS_PSAPPMENUITEM",
"delogicname":"系统菜单项",
"sysmoudle":{"id":"UAA","name":"uaa"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" }]
}
, {
"dename":"SYS_PSDEOPPRIV",
"delogicname":"实体数据能力",
"sysmoudle":{"id":"UAA","name":"uaa"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }]
}
] ]
} }
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
</createTable> </createTable>
</changeSet> </changeSet>
<!--输出实体[SYS_PERMISSION]数据结构 --> <!--输出实体[SYS_PERMISSION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_permission-175-6"> <changeSet author="a_A_5d9d78509" id="tab-sys_permission-179-6">
<createTable tableName="IBZPERMISSION"> <createTable tableName="IBZPERMISSION">
<column name="SYS_PERMISSIONID" remarks="" type="VARCHAR(200)"> <column name="SYS_PERMISSIONID" remarks="" type="VARCHAR(200)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_PERMISSION_SYS_PERMISSI"/> <constraints primaryKey="true" primaryKeyName="PK_SYS_PERMISSION_SYS_PERMISSI"/>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<!--数据查询[Default]--> <!--数据查询[Default]-->
<sql id="Default" databaseId="mysql"> <sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.CREATEDATE, t1.ENABLE, t1.SYSTEMID, t1.SYS_PERMISSIONID, t1.SYS_PERMISSIONNAME, t1.PERMISSIONTYPE, t1.UPDATEDATE, t2.PSSOURCETYPE, t2.PSSOURCENAME FROM IBZPERMISSION t1 LEFT JOIN ibzpsdeoppriv t2 on t1.SYS_PERMISSIONID=t2.SYS_PSDEOPPRIVID LEFT JOIN ibzpsappmenuitem t3 on t1.SYS_PERMISSIONID =t3.PSAPPMENUID <![CDATA[ SELECT t1.* FROM ( SELECT t1.CREATEDATE, t1.ENABLE, t1.SYSTEMID, t1.SYS_PERMISSIONID, t1.SYS_PERMISSIONNAME, t1.PERMISSIONTYPE, t1.UPDATEDATE, t2.PSSOURCETYPE, t2.PSSOURCENAME FROM IBZPERMISSION t1 LEFT JOIN ibzpsdeoppriv t2 on t1.SYS_PERMISSIONID=t2.SYS_PSDEOPPRIVID LEFT JOIN ibzpsappmenuitem t3 on t1.SYS_PERMISSIONID =t3.PSAPPMENUID WHERE T1.ENABLE=1 ) t1
]]> ]]>
</sql> </sql>
......
...@@ -23,6 +23,7 @@ import java.util.List; ...@@ -23,6 +23,7 @@ import java.util.List;
@MapperScan("cn.ibizlab.*.mapper") @MapperScan("cn.ibizlab.*.mapper")
@SpringBootApplication(exclude = { @SpringBootApplication(exclude = {
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class, org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class,
org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration.class,
}) })
@EnableFeignClients(basePackages = {"cn.ibizlab" }) @EnableFeignClients(basePackages = {"cn.ibizlab" })
public class ibzuaaapiApplication extends WebMvcConfigurerAdapter{ public class ibzuaaapiApplication extends WebMvcConfigurerAdapter{
......
...@@ -32,7 +32,7 @@ public class PermissionSyncJob implements ApplicationRunner { ...@@ -32,7 +32,7 @@ public class PermissionSyncJob implements ApplicationRunner {
@Value("${ibiz.enablePermissionValid:false}") @Value("${ibiz.enablePermissionValid:false}")
boolean enablePermissionValid; //是否开启权限校验 boolean enablePermissionValid; //是否开启权限校验
@Value("${ibiz.systemid:EB948A46-DF8C-4BE3-8020-0ADA23440D31}") @Value("${ibiz.systemid:ibzuaa}")
private String systemId; private String systemId;
@Override @Override
......
...@@ -12,6 +12,7 @@ import cn.ibizlab.util.filter.QueryBuildContext; ...@@ -12,6 +12,7 @@ import cn.ibizlab.util.filter.QueryBuildContext;
import cn.ibizlab.util.filter.QueryWrapperContext; import cn.ibizlab.util.filter.QueryWrapperContext;
import cn.ibizlab.util.helper.DEFieldCacheMap; import cn.ibizlab.util.helper.DEFieldCacheMap;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.BasicQuery; import org.springframework.data.mongodb.core.query.BasicQuery;
import org.springframework.data.mongodb.core.query.Query; import org.springframework.data.mongodb.core.query.Query;
...@@ -48,6 +49,7 @@ public class AuthPermissionEvaluator implements PermissionEvaluator { ...@@ -48,6 +49,7 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
private String keyFieldTag="keyfield"; private String keyFieldTag="keyfield";
@Resource @Resource
@Lazy
private MongoTemplate mongoTemplate; private MongoTemplate mongoTemplate;
/** /**
...@@ -115,8 +117,6 @@ public class AuthPermissionEvaluator implements PermissionEvaluator { ...@@ -115,8 +117,6 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
if(!validDataSetHasPermission(permissionList,entityName,dataSetName)){ if(!validDataSetHasPermission(permissionList,entityName,dataSetName)){
return false; return false;
} }
//拼接权限条件
deDataSetFillPermissionSQLRouter(deStorageMode, searchContext, entity , dataSetName , permissionList);
} }
return true; return true;
} }
...@@ -344,80 +344,6 @@ public class AuthPermissionEvaluator implements PermissionEvaluator { ...@@ -344,80 +344,6 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
} }
} }
/**
* 根据实体存储类型,拼接权限条件
* @param deStorageMode
* @param searchContext
* @param entity
* @param dataSetName
* @param permissionList
*/
private void deDataSetFillPermissionSQLRouter(String deStorageMode , Object searchContext, EntityBase entity ,String dataSetName ,JSONObject permissionList){
//检查是否有数据权限[单行删除]
if(deStorageMode.equalsIgnoreCase("sql")){
sqlPermissionBuilder(searchContext, entity , dataSetName, permissionList);
}
else if(deStorageMode.equalsIgnoreCase("nosql")){
noSqlPermissionBuilder(searchContext, entity , dataSetName, permissionList);
}
else if(deStorageMode.equalsIgnoreCase("serviceapi")){
}
else {
throw new RuntimeException(String.format("未能识别[%s]实体对应存储模式[%s]",entity.getClass().getSimpleName(),deStorageMode));
}
}
/**
* 为NoSQL存储模式的表格查询填充权限条件
* @param searchContext
* @param entity
* @param dataSetName
* @param permissionList
*/
private void noSqlPermissionBuilder(Object searchContext, EntityBase entity, String dataSetName, JSONObject permissionList) {
if(searchContext instanceof QueryBuildContext){
//获取权限表达式[全部数据、本单位、本部门等]
String entityName=entity.getClass().getSimpleName();
JSONObject entityObj=permissionList.getJSONObject(entityName);
JSONObject permissionType=entityObj.getJSONObject(DataSetTag);
JSONArray dataRange=permissionType.getJSONArray(dataSetName);
if(dataRange.size()==0)
return ;
//根据权限表达式生成查询条件,并将查询条件设置到SearchContext中
fillNoSqlPermissionCond(dataRange,entity,((QueryBuildContext) searchContext).getSelectCond());
}
}
/**
* 为SQL存储模式的表格查询填充权限条件
* @param searchContext
* @param entity
* @param dataSetName
* @param permissionList
*/
private void sqlPermissionBuilder(Object searchContext, EntityBase entity, String dataSetName, JSONObject permissionList){
//获取权限表达式[全部数据、本单位、本部门等]
String entityName=entity.getClass().getSimpleName();
JSONObject entityObj=permissionList.getJSONObject(entityName);//获取实体
JSONObject permissionType=entityObj.getJSONObject(DataSetTag);
JSONArray dataRange=permissionType.getJSONArray(dataSetName);//获取实体数据集
if(dataRange.size()==0)
return ;
//根据权限条件获取SQL
String permissionSQL=getPermissionSQL(entity,dataRange);
//将SQL拼接到SearchContext中
if(searchContext instanceof QueryWrapperContext){
QueryWrapperContext queryWrapperContext = (QueryWrapperContext) searchContext;
QueryWrapper queryWrapper = queryWrapperContext.getSelectCond();
queryWrapper.apply(permissionSQL);
}
}
/** /**
* 为NoSQL存储模式的表格查询填充权限条件 * 为NoSQL存储模式的表格查询填充权限条件
......
...@@ -27,7 +27,7 @@ public class AuthorizationTokenFilter extends OncePerRequestFilter { ...@@ -27,7 +27,7 @@ public class AuthorizationTokenFilter extends OncePerRequestFilter {
private final AuthTokenUtil authTokenUtil; private final AuthTokenUtil authTokenUtil;
private final String tokenHeader; private final String tokenHeader;
public AuthorizationTokenFilter( AuthenticationUserService userDetailsService, AuthTokenUtil authTokenUtil, @Value("${ibiz.jwt.header:Authorization}") String tokenHeader) { public AuthorizationTokenFilter(AuthenticationUserService userDetailsService, AuthTokenUtil authTokenUtil, @Value("${ibiz.jwt.header:Authorization}") String tokenHeader) {
this.userDetailsService = userDetailsService; this.userDetailsService = userDetailsService;
this.authTokenUtil = authTokenUtil; this.authTokenUtil = authTokenUtil;
this.tokenHeader = tokenHeader; this.tokenHeader = tokenHeader;
......
...@@ -12,11 +12,13 @@ import org.springframework.context.annotation.Primary; ...@@ -12,11 +12,13 @@ import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.DigestUtils; import org.springframework.util.DigestUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
/** /**
* 实体[IBZUSER] 服务对象接口实现 * 实体[IBZUSER] 服务对象接口实现
*/ */
@Service("IBZUAAUserService") @Service("IBZUAAUserService")
@ConditionalOnExpression("${ibiz.enablePermissionValid:false}||'${ibiz.auth.service:SimpleUserService}'.equals('IBZUAAUserService')")
public class IBZUAAUserService implements AuthenticationUserService{ public class IBZUAAUserService implements AuthenticationUserService{
@Autowired @Autowired
......
...@@ -13,6 +13,7 @@ import cn.ibizlab.util.mapper.IBZUSERMapper; ...@@ -13,6 +13,7 @@ import cn.ibizlab.util.mapper.IBZUSERMapper;
import cn.ibizlab.util.domain.IBZUSER; import cn.ibizlab.util.domain.IBZUSER;
import org.springframework.util.DigestUtils; import org.springframework.util.DigestUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
/** /**
* 实体[IBZUSER] 服务对象接口实现 * 实体[IBZUSER] 服务对象接口实现
......
...@@ -11,12 +11,14 @@ import org.springframework.util.StringUtils; ...@@ -11,12 +11,14 @@ import org.springframework.util.StringUtils;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
/** /**
* 实体[IBZUSER] 服务对象接口实现 * 实体[IBZUSER] 服务对象接口实现
*/ */
@Primary @Primary
@Service("SimpleUserService") @Service("SimpleUserService")
@ConditionalOnExpression("(!${ibiz.enablePermissionValid:false})&&'${ibiz.auth.service:SimpleUserService}'.equals('SimpleUserService')")
public class SimpleUserService implements AuthenticationUserService{ public class SimpleUserService implements AuthenticationUserService{
@Override @Override
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册