提交 dd51a217 编写于 作者: ibizdev's avatar ibizdev

zoo457790531 发布系统代码 [ibiz-uaa,UAA鉴权]

上级 9b4a6db6
......@@ -53,10 +53,8 @@
"@types/mockjs": "^1.0.2",
"@types/qs": "^6.9.0",
"@vue/cli-plugin-babel": "^4.1.0",
"@vue/cli-plugin-e2e-cypress": "^4.1.0",
"@vue/cli-plugin-router": "^4.1.0",
"@vue/cli-plugin-typescript": "^4.1.0",
"@vue/cli-plugin-unit-jest": "^4.1.0",
"@vue/cli-plugin-vuex": "^4.1.0",
"@vue/cli-service": "^4.1.0",
"@vue/test-utils": "1.0.0-beta.29",
......
......@@ -103,6 +103,14 @@
"viewname": "SYS_USERPickupView",
"viewtag": "32fe9ab4a9e1b8d62b9ee802e4746965"
},
"sysrolepickupgridview_norepeat": {
"title": "角色选择表格视图",
"caption": "系统角色",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "uaa",
"viewname": "SysRolePickupGridView_norepeat",
"viewtag": "33f07a06a447590e710527a19d5f02c7"
},
"sysopenaccesseditview": {
"title": "第三方认证平台",
"caption": "第三方认证平台",
......@@ -287,6 +295,14 @@
"viewname": "SYS_ROLE_PERMISSIONEditView",
"viewtag": "a93a129850b81c3c921aa1911ec9eb8c"
},
"sysrolepickupview_norepeat": {
"title": "角色数据选择视图",
"caption": "系统角色",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "uaa",
"viewname": "SysRolePickupView_norepeat",
"viewtag": "ba8e31e716b14bba81cdf1281fc76197"
},
"sys_permissionredirectview": {
"title": "权限表数据重定向视图",
"caption": "权限/资源",
......
......@@ -3,7 +3,7 @@
<span v-if="color" :style="{ color:textColor }">{{ text ? text : '---' }}</span>
<template v-else>
<template v-if="dataValue && dataValue.length > 0">
<span v-for="(textItem,index) of dataValue" :key="index" class="text-color" :style="{ backgroundColor:textItem.color }">
<span v-for="(textItem,index) of dataValue" :key="index" class="text-color" :style="{ backgroundColor: textItem.color, borderColor: textItem.color}">
{{ textItem.srfmajortext ? textItem.srfmajortext : '---'}}
</span>
</template>
......@@ -58,7 +58,7 @@ export default class AppColorSpan extends Vue {
* @type {any}
* @memberof AppColorSpan
*/
@Prop() public localContext!: any;
@Prop() public localContext?: any;
/**
* 局部导航参数
......@@ -66,7 +66,7 @@ export default class AppColorSpan extends Vue {
* @type {any}
* @memberof AppColorSpan
*/
@Prop() public localParam!: any;
@Prop() public localParam?: any;
/**
* 视图上下文
......@@ -74,7 +74,7 @@ export default class AppColorSpan extends Vue {
* @type {*}
* @memberof AppColorSpan
*/
@Prop() public context!: any;
@Prop() public context?: any;
/**
* 视图参数
......@@ -82,8 +82,7 @@ export default class AppColorSpan extends Vue {
* @type {*}
* @memberof AppColorSpan
*/
@Prop() public viewparams!: any;
@Prop() public viewparams?: any;
/**
* 颜色标识
......@@ -91,8 +90,7 @@ export default class AppColorSpan extends Vue {
* @type {*}
* @memberof AppColorSpan
*/
@Prop() color:any;
@Prop() color?:any;
/**
* 颜色
......@@ -156,8 +154,10 @@ export default class AppColorSpan extends Vue {
<style lang="less">
.text-color{
padding: 2px;
margin: 6px;
border-radius: 4px;
padding: 2px 8px;
margin: 6px 6px 6px 0px;
border-radius: 12px;
font-size: 13px;
border: 2px solid rgb(170, 167, 167);
}
</style>
\ No newline at end of file
......@@ -170,10 +170,20 @@ export default class DropDownList extends Vue {
/**
* 属性类型
* @type {string}
*
* @type {'string' | 'number'}
* @memberof DropDownList
*/
@Prop({ default: 'string' })
public valueType!: 'string' | 'number';
/**
* 选择实际值
*
* @type {*}
* @memberof DropDownList
*/
@Prop() public valueType?: string;
public value: any = null;
/**
* 计算属性(当前值)
......@@ -204,7 +214,7 @@ export default class DropDownList extends Vue {
})
return JSON.stringify([result]);
}
return this.itemValue;
return this.value;
}
/**
......@@ -263,10 +273,12 @@ export default class DropDownList extends Vue {
this.formStateEvent = this.formState.subscribe(({ type, data }) => {
if (Object.is('load', type)) {
this.loadData();
this.readyValue();
}
});
}
this.loadData();
this.readyValue();
}
/**
......@@ -298,6 +310,29 @@ export default class DropDownList extends Vue {
});
}
}
/**
* 准备值
*
* @memberof DropDownList
*/
public readyValue() {
if (this.itemValue == null) {
this.value = null;
return;
}
if (this.$util.typeOf(this.itemValue) === this.valueType) {
this.value = this.itemValue;
} else if (this.valueType === 'number') {
if (this.itemValue.indexOf('.') === -1) {
this.value = parseInt(this.itemValue);
} else {
this.value = parseFloat(this.itemValue);
}
} else {
this.value = this.itemValue.toString();
}
}
/**
* 下拉点击事件
......@@ -331,32 +366,29 @@ export default class DropDownList extends Vue {
* @memberof DropDownList
*/
public formatCodeList(items: Array<any>){
let matching: boolean = true;
let matching: boolean = false;
this.items = [];
try{
if(this.valueType){
items.forEach((item: any)=>{
const type = this.$util.typeOf(item.value);
if(type != this.valueType){
matching = false;
if(type == 'number'){
item.value = item.value.toString();
items.forEach((item: any)=>{
const type = this.$util.typeOf(item.value);
if(type != this.valueType){
matching = true;
if(type === 'number'){
item.value = item.value.toString();
}else{
if(item.value.indexOf('.') == -1){
item.value = parseInt(item.value);
}else{
if(item.value.indexOf('.') == -1){
item.value = parseInt(item.value);
}else{
item.value = parseFloat(item.value);
}
item.value = parseFloat(item.value);
}
}
this.items.push(item);
});
if(!matching){
console.warn(`代码表 ${ this.tag } 值类型和属性类型不匹配,已自动强制转换,请修正代码表值类型和属性类型匹配`);
}
}else{
this.items = items;
this.items.push(item);
});
if(matching){
console.warn(`代码表 ${ this.tag } 值类型和属性类型不匹配,已自动强制转换,请修正代码表值类型和属性类型匹配`);
}
}catch(error){
console.warn('代码表值类型和属性类型不匹配,自动强制转换异常,请修正代码表值类型和属性类型匹配');
}
......
......@@ -389,5 +389,5 @@ export default {
dayAgo: 'days ago',
monthsAgo: 'months ago',
yearsAgo: 'years ago'
}
}
};
\ No newline at end of file
......@@ -390,5 +390,5 @@ export default {
dayAgo: '天前',
monthsAgo: '月前',
yearsAgo: '年前'
}
}
};
\ No newline at end of file
......@@ -20,6 +20,10 @@ export default {
caption: "系统角色",
title: "角色数据选择视图",
},
pickupgridview_norepeat: {
caption: "系统角色",
title: "角色选择表格视图",
},
redirectview: {
caption: "系统角色",
title: "角色数据重定向视图",
......@@ -40,6 +44,10 @@ export default {
caption: "系统角色",
title: "角色数据多项选择视图",
},
pickupview_norepeat: {
caption: "系统角色",
title: "角色数据选择视图",
},
},
main_form: {
details: {
......
......@@ -19,6 +19,10 @@ export default {
caption: "系统角色",
title: "角色数据选择视图",
},
pickupgridview_norepeat: {
caption: "系统角色",
title: "角色选择表格视图",
},
redirectview: {
caption: "系统角色",
title: "角色数据重定向视图",
......@@ -39,6 +43,10 @@ export default {
caption: "系统角色",
title: "角色数据多项选择视图",
},
pickupview_norepeat: {
caption: "系统角色",
title: "角色数据选择视图",
},
},
main_form: {
details: {
......
......@@ -314,6 +314,50 @@ mock.onGet(new RegExp(/^\/sysroles\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((co
console.groupEnd();
return [status, records ? records : []];
});
// FetchNoRepeat
mock.onGet(new RegExp(/^\/sysroles\/fetchnorepeat$/)).reply((config: any) => {
console.groupCollapsed("实体:sysrole 方法: FetchNoRepeat");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas);
console.groupEnd();
console.groupEnd();
return [status, mockDatas ? mockDatas : []];
});
// FetchNoRepeat
mock.onGet(new RegExp(/^\/sysroles\/fetchnorepeat(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:sysrole 方法: FetchNoRepeat");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
let url = config.url.split('?')[1];
let params = qs.parse(url);
Object.assign(config, params);
}
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
let total = mockDatas.length;
let records: Array<any> = [];
if(!config.page || !config.size){
records = mockDatas;
}else{
if((config.page-1)*config.size < total){
records = mockDatas.slice(config.page,config.size);
}
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(records ? records : []);
console.groupEnd();
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
......
......@@ -111,6 +111,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "SYS_USERPickupView",
"viewtag": "32fe9ab4a9e1b8d62b9ee802e4746965"
},
"sysrolepickupgridview_norepeat": {
"title": "角色选择表格视图",
"caption": "系统角色",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "uaa",
"viewname": "SysRolePickupGridView_norepeat",
"viewtag": "33f07a06a447590e710527a19d5f02c7"
},
"sysopenaccesseditview": {
"title": "第三方认证平台",
"caption": "第三方认证平台",
......@@ -295,6 +303,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "SYS_ROLE_PERMISSIONEditView",
"viewtag": "a93a129850b81c3c921aa1911ec9eb8c"
},
"sysrolepickupview_norepeat": {
"title": "角色数据选择视图",
"caption": "系统角色",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "uaa",
"viewname": "SysRolePickupView_norepeat",
"viewtag": "ba8e31e716b14bba81cdf1281fc76197"
},
"sys_permissionredirectview": {
"title": "权限表数据重定向视图",
"caption": "权限/资源",
......
......@@ -13,6 +13,8 @@ export const PageComponents = {
Vue.component('sys-usermpickup-view', () => import('@pages/uaa/sys-usermpickup-view/sys-usermpickup-view.vue'));
Vue.component('sys-open-access-edit-view', () => import('@pages/uaa/sys-open-access-edit-view/sys-open-access-edit-view.vue'));
Vue.component('sys-user-rolegrid-view', () => import('@pages/uaa/sys-user-rolegrid-view/sys-user-rolegrid-view.vue'));
Vue.component('sys-role-pickup-grid-view-norepeat', () => import('@pages/uaa/sys-role-pickup-grid-view-norepeat/sys-role-pickup-grid-view-norepeat.vue'));
Vue.component('sys-role-pickup-view-norepeat', () => import('@pages/uaa/sys-role-pickup-view-norepeat/sys-role-pickup-view-norepeat.vue'));
Vue.component('sys-rolepickup-view', () => import('@pages/uaa/sys-rolepickup-view/sys-rolepickup-view.vue'));
Vue.component('sys-role-grid-view', () => import('@pages/uaa/sys-role-grid-view/sys-role-grid-view.vue'));
Vue.component('sys-app-edit-view', () => import('@pages/uaa/sys-app-edit-view/sys-app-edit-view.vue'));
......
......@@ -307,6 +307,34 @@ const router = new Router({
},
component: () => import('@pages/uaa/sys-user-rolegrid-view/sys-user-rolegrid-view.vue'),
},
{
path: 'sysroles/:sysrole?/pickupgridview_norepeat/:pickupgridview_norepeat?',
meta: {
caption: 'entities.sysrole.views.pickupgridview_norepeat.caption',
info:'',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'sysroles', parameterName: 'sysrole' },
{ pathName: 'pickupgridview_norepeat', parameterName: 'pickupgridview_norepeat' },
],
requireAuth: true,
},
component: () => import('@pages/uaa/sys-role-pickup-grid-view-norepeat/sys-role-pickup-grid-view-norepeat.vue'),
},
{
path: 'sysroles/:sysrole?/pickupview_norepeat/:pickupview_norepeat?',
meta: {
caption: 'entities.sysrole.views.pickupview_norepeat.caption',
info:'',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'sysroles', parameterName: 'sysrole' },
{ pathName: 'pickupview_norepeat', parameterName: 'pickupview_norepeat' },
],
requireAuth: true,
},
component: () => import('@pages/uaa/sys-role-pickup-view-norepeat/sys-role-pickup-view-norepeat.vue'),
},
{
path: 'sysroles/:sysrole?/pickupview/:pickupview?',
meta: {
......@@ -559,6 +587,19 @@ const router = new Router({
},
component: () => import('@pages/uaa/sys-userpickup-view/sys-userpickup-view.vue'),
},
{
path: '/sysroles/:sysrole?/pickupgridview_norepeat/:pickupgridview_norepeat?',
meta: {
caption: 'entities.sysrole.views.pickupgridview_norepeat.caption',
info:'',
parameters: [
{ pathName: 'sysroles', parameterName: 'sysrole' },
{ pathName: 'pickupgridview_norepeat', parameterName: 'pickupgridview_norepeat' },
],
requireAuth: true,
},
component: () => import('@pages/uaa/sys-role-pickup-grid-view-norepeat/sys-role-pickup-grid-view-norepeat.vue'),
},
{
path: '/sysopenaccesses/:sysopenaccess?/editview/:editview?',
meta: {
......@@ -732,6 +773,19 @@ const router = new Router({
},
component: () => import('@pages/uaa/sys-rolempickup-view/sys-rolempickup-view.vue'),
},
{
path: '/sysroles/:sysrole?/pickupview_norepeat/:pickupview_norepeat?',
meta: {
caption: 'entities.sysrole.views.pickupview_norepeat.caption',
info:'',
parameters: [
{ pathName: 'sysroles', parameterName: 'sysrole' },
{ pathName: 'pickupview_norepeat', parameterName: 'pickupview_norepeat' },
],
requireAuth: true,
},
component: () => import('@pages/uaa/sys-role-pickup-view-norepeat/sys-role-pickup-view-norepeat.vue'),
},
{
path: '/sysusers/:sysuser?/sysuserroles/:sysuserrole?/editview/:editview?',
meta: {
......
.sys-role-pickup-grid-view-norepeat{
position: relative;
}
.sys-role-pickup-grid-view-norepeat{
display: block;
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import SysRolePickupGridView_norepeatBase from './sys-role-pickup-grid-view-norepeat-base.vue';
import view_grid from '@widgets/sys-role/main-grid/main-grid.vue';
import view_searchform from '@widgets/sys-role/default-searchform/default-searchform.vue';
@Component({
components: {
view_grid,
view_searchform,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
if(!Object.is(vm.navModel,"route")){
vm.initNavDataWithTab(vm.viewCacheData);
}
vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag });
});
},
})
export default class SysRolePickupGridView_norepeat extends SysRolePickupGridView_norepeatBase {
}
</script>
\ No newline at end of file
.sys-role-pickup-view-norepeat{
position: relative;
}
.pickup-view {
>.pickupviewpanel {
flex-grow: 1;
display: flex;
justify-content: flex-end;
height: calc(100% - 64px);
}
>.footer {
height: 64px;
}
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import SysRolePickupView_norepeatBase from './sys-role-pickup-view-norepeat-base.vue';
import view_pickupviewpanel from '@widgets/sys-role/pickup-view-norepeatpickupviewpanel-pickupviewpanel/pickup-view-norepeatpickupviewpanel-pickupviewpanel.vue';
@Component({
components: {
view_pickupviewpanel,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
if(!Object.is(vm.navModel,"route")){
vm.initNavDataWithTab(vm.viewCacheData);
}
vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag });
});
},
})
export default class SysRolePickupView_norepeat extends SysRolePickupView_norepeatBase {
}
</script>
\ No newline at end of file
......@@ -200,4 +200,33 @@ export default class SysRoleServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/sysroles/searchdefault`,tempData,isloading);
}
/**
* FetchNoRepeat接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public async FetchNoRepeat(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/sysroles/fetchnorepeat`,tempData,isloading);
return res;
}
/**
* searchNoRepeat接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public async searchNoRepeat(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/sysroles/searchnorepeat`,tempData,isloading);
}
}
\ No newline at end of file
......@@ -133,6 +133,15 @@ export const viewstate: any = {
'6869875c7409bd1dddd3d0fc62c502db',
],
},
{
viewtag: '33f07a06a447590e710527a19d5f02c7',
viewmodule: 'uaa',
viewname: 'SysRolePickupGridView_norepeat',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '349cda61e4dc5e38045ef7c77321d1c7',
viewmodule: 'uaa',
......@@ -255,7 +264,7 @@ export const viewstate: any = {
viewdatachange: false,
refviews: [
'6736591aca71edc23df760e278378566',
'26cc2d5c69f1525eaa415b7de1a0d4a6',
'ba8e31e716b14bba81cdf1281fc76197',
'983f3ae1533a5cd62619dedb79bb4b28',
],
},
......@@ -314,7 +323,7 @@ export const viewstate: any = {
viewdatachange: false,
refviews: [
'6736591aca71edc23df760e278378566',
'26cc2d5c69f1525eaa415b7de1a0d4a6',
'ba8e31e716b14bba81cdf1281fc76197',
'983f3ae1533a5cd62619dedb79bb4b28',
],
},
......@@ -367,6 +376,16 @@ export const viewstate: any = {
'53385c6effc6ba778dbccf82286fbe4f',
],
},
{
viewtag: 'ba8e31e716b14bba81cdf1281fc76197',
viewmodule: 'uaa',
viewname: 'SysRolePickupView_norepeat',
viewaction: '',
viewdatachange: false,
refviews: [
'33f07a06a447590e710527a19d5f02c7',
],
},
{
viewtag: 'd818f976305327fde2c09de9064ebefb',
viewmodule: 'uaa',
......
......@@ -98,11 +98,13 @@ export default class SysRoleUIServiceBase extends UIService {
public initViewMap(){
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'sysroles',component:'sys-role-grid-view'});
this.allViewMap.set('PICKUPVIEW:',{viewname:'pickupview',srfappde:'sysroles',component:'sys-rolepickup-view'});
this.allViewMap.set(':',{viewname:'pickupgridview_norepeat',srfappde:'sysroles',component:'sys-role-pickup-grid-view-norepeat'});
this.allViewMap.set('REDIRECTVIEW:',{viewname:'redirectview',srfappde:'sysroles',component:'sys-roleredirect-view'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'sysroles',component:'sys-role-edit-view'});
this.allViewMap.set(':',{viewname:'pickupgridview',srfappde:'sysroles',component:'sys-role-pickup-grid-view'});
this.allViewMap.set(':',{viewname:'editview2',srfappde:'sysroles',component:'sys-role-edit-view2'});
this.allViewMap.set('MPICKUPVIEW:',{viewname:'mpickupview',srfappde:'sysroles',component:'sys-rolempickup-view'});
this.allViewMap.set(':',{viewname:'pickupview_norepeat',srfappde:'sysroles',component:'sys-role-pickup-view-norepeat'});
}
/**
......
......@@ -452,7 +452,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @memberof MainBase
*/
public ActionModel:any ={
public actionModel:any ={
};
/**
......@@ -948,7 +948,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public getActionState(data:any){
let tempActionModel:any = JSON.parse(JSON.stringify(this.ActionModel));
let tempActionModel:any = JSON.parse(JSON.stringify(this.actionModel));
let targetData:any = this.transformData(data);
ViewTool.calcActionItemAuthState(targetData,tempActionModel,this.appUIService);
return tempActionModel;
......@@ -1550,6 +1550,10 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......@@ -1668,6 +1672,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
return codelist;
}
/**
* 根据分组代码表绘制分组列表
*
......@@ -1688,13 +1693,12 @@ export default class MainBase extends Vue implements ControlInterface {
let children:Array<any> = [];
this.items.forEach((item: any,j: number)=>{
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
if(Object.is(group.label,arr[0].label)){
if(Object.is(group.label,item[this.groupAppField])){
item.groupById = Number((i+1) * 100 + (j+1) * 1);
item.group = '';
children.push(item);
}
}else if(Object.is(group.label,item[this.groupAppField])){
}else if(Object.is(group.value,item[this.groupAppField])){
item.groupById = Number((i+1) * 100 + (j+1) * 1);
item.group = '';
children.push(item);
......@@ -1720,10 +1724,9 @@ export default class MainBase extends Vue implements ControlInterface {
this.items.forEach((item: any,index: number)=>{
let i: number = 0;
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
i = allGroup.findIndex((group: any)=>Object.is(group.label,arr[0].label));
}else{
i = allGroup.findIndex((group: any)=>Object.is(group.label,item[this.groupAppField]));
}else{
i = allGroup.findIndex((group: any)=>Object.is(group.value,item[this.groupAppField]));
}
if(i < 0){
item.groupById = Number((allGroup.length+1) * 100 + (index+1) * 1);
......@@ -1770,16 +1773,9 @@ export default class MainBase extends Vue implements ControlInterface {
if(!this.isEnableGroup) return;
// 分组
let allGroup: Array<any> = [];
let allGroupField: Array<any> =[];
allGroupField = this.getGroupCodelist(this.groupAppFieldCodelistType,this.groupAppFieldCodelistTag);
this.items.forEach((item: any)=>{
if(item.hasOwnProperty(this.groupAppField)){
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
allGroup.push(arr[0].label);
}else{
allGroup.push(item[this.groupAppField]);
}
allGroup.push(item[this.groupAppField]);
}
});
let groupTree:Array<any> = [];
......@@ -1791,14 +1787,7 @@ export default class MainBase extends Vue implements ControlInterface {
allGroup.forEach((group: any, groupIndex: number)=>{
let children:Array<any> = [];
this.items.forEach((item: any,itemIndex: number)=>{
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
if(Object.is(group,arr[0].label)){
item.groupById = Number((groupIndex+1) * 100 + (itemIndex+1) * 1);
item.group = '';
children.push(item);
}
}else if(Object.is(group,item[this.groupAppField])){
if(Object.is(group,item[this.groupAppField])){
item.groupById = Number((groupIndex+1) * 100 + (itemIndex+1) * 1);
item.group = '';
children.push(item);
......
......@@ -333,7 +333,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @memberof MainBase
*/
public ActionModel:any ={
public actionModel:any ={
};
/**
......@@ -820,7 +820,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public getActionState(data:any){
let tempActionModel:any = JSON.parse(JSON.stringify(this.ActionModel));
let tempActionModel:any = JSON.parse(JSON.stringify(this.actionModel));
let targetData:any = this.transformData(data);
ViewTool.calcActionItemAuthState(targetData,tempActionModel,this.appUIService);
return tempActionModel;
......@@ -1369,6 +1369,10 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......@@ -1487,6 +1491,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
return codelist;
}
/**
* 根据分组代码表绘制分组列表
*
......@@ -1507,13 +1512,12 @@ export default class MainBase extends Vue implements ControlInterface {
let children:Array<any> = [];
this.items.forEach((item: any,j: number)=>{
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
if(Object.is(group.label,arr[0].label)){
if(Object.is(group.label,item[this.groupAppField])){
item.groupById = Number((i+1) * 100 + (j+1) * 1);
item.group = '';
children.push(item);
}
}else if(Object.is(group.label,item[this.groupAppField])){
}else if(Object.is(group.value,item[this.groupAppField])){
item.groupById = Number((i+1) * 100 + (j+1) * 1);
item.group = '';
children.push(item);
......@@ -1538,10 +1542,9 @@ export default class MainBase extends Vue implements ControlInterface {
this.items.forEach((item: any,index: number)=>{
let i: number = 0;
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
i = allGroup.findIndex((group: any)=>Object.is(group.label,arr[0].label));
}else{
i = allGroup.findIndex((group: any)=>Object.is(group.label,item[this.groupAppField]));
}else{
i = allGroup.findIndex((group: any)=>Object.is(group.value,item[this.groupAppField]));
}
if(i < 0){
item.groupById = Number((allGroup.length+1) * 100 + (index+1) * 1);
......@@ -1587,16 +1590,9 @@ export default class MainBase extends Vue implements ControlInterface {
if(!this.isEnableGroup) return;
// 分组
let allGroup: Array<any> = [];
let allGroupField: Array<any> =[];
allGroupField = this.getGroupCodelist(this.groupAppFieldCodelistType,this.groupAppFieldCodelistTag);
this.items.forEach((item: any)=>{
if(item.hasOwnProperty(this.groupAppField)){
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
allGroup.push(arr[0].label);
}else{
allGroup.push(item[this.groupAppField]);
}
allGroup.push(item[this.groupAppField]);
}
});
let groupTree:Array<any> = [];
......@@ -1608,14 +1604,7 @@ export default class MainBase extends Vue implements ControlInterface {
allGroup.forEach((group: any, groupIndex: number)=>{
let children:Array<any> = [];
this.items.forEach((item: any,itemIndex: number)=>{
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
if(Object.is(group,arr[0].label)){
item.groupById = Number((groupIndex+1) * 100 + (itemIndex+1) * 1);
item.group = '';
children.push(item);
}
}else if(Object.is(group,item[this.groupAppField])){
if(Object.is(group,item[this.groupAppField])){
item.groupById = Number((groupIndex+1) * 100 + (itemIndex+1) * 1);
item.group = '';
children.push(item);
......
......@@ -323,7 +323,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @memberof MainBase
*/
public ActionModel:any ={
public actionModel:any ={
};
/**
......@@ -801,7 +801,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public getActionState(data:any){
let tempActionModel:any = JSON.parse(JSON.stringify(this.ActionModel));
let tempActionModel:any = JSON.parse(JSON.stringify(this.actionModel));
let targetData:any = this.transformData(data);
ViewTool.calcActionItemAuthState(targetData,tempActionModel,this.appUIService);
return tempActionModel;
......@@ -1358,6 +1358,10 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......@@ -1476,6 +1480,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
return codelist;
}
/**
* 根据分组代码表绘制分组列表
*
......@@ -1496,13 +1501,12 @@ export default class MainBase extends Vue implements ControlInterface {
let children:Array<any> = [];
this.items.forEach((item: any,j: number)=>{
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
if(Object.is(group.label,arr[0].label)){
if(Object.is(group.label,item[this.groupAppField])){
item.groupById = Number((i+1) * 100 + (j+1) * 1);
item.group = '';
children.push(item);
}
}else if(Object.is(group.label,item[this.groupAppField])){
}else if(Object.is(group.value,item[this.groupAppField])){
item.groupById = Number((i+1) * 100 + (j+1) * 1);
item.group = '';
children.push(item);
......@@ -1526,10 +1530,9 @@ export default class MainBase extends Vue implements ControlInterface {
this.items.forEach((item: any,index: number)=>{
let i: number = 0;
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
i = allGroup.findIndex((group: any)=>Object.is(group.label,arr[0].label));
}else{
i = allGroup.findIndex((group: any)=>Object.is(group.label,item[this.groupAppField]));
}else{
i = allGroup.findIndex((group: any)=>Object.is(group.value,item[this.groupAppField]));
}
if(i < 0){
item.groupById = Number((allGroup.length+1) * 100 + (index+1) * 1);
......@@ -1574,16 +1577,9 @@ export default class MainBase extends Vue implements ControlInterface {
if(!this.isEnableGroup) return;
// 分组
let allGroup: Array<any> = [];
let allGroupField: Array<any> =[];
allGroupField = this.getGroupCodelist(this.groupAppFieldCodelistType,this.groupAppFieldCodelistTag);
this.items.forEach((item: any)=>{
if(item.hasOwnProperty(this.groupAppField)){
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
allGroup.push(arr[0].label);
}else{
allGroup.push(item[this.groupAppField]);
}
allGroup.push(item[this.groupAppField]);
}
});
let groupTree:Array<any> = [];
......@@ -1595,14 +1591,7 @@ export default class MainBase extends Vue implements ControlInterface {
allGroup.forEach((group: any, groupIndex: number)=>{
let children:Array<any> = [];
this.items.forEach((item: any,itemIndex: number)=>{
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
if(Object.is(group,arr[0].label)){
item.groupById = Number((groupIndex+1) * 100 + (itemIndex+1) * 1);
item.group = '';
children.push(item);
}
}else if(Object.is(group,item[this.groupAppField])){
if(Object.is(group,item[this.groupAppField])){
item.groupById = Number((groupIndex+1) * 100 + (itemIndex+1) * 1);
item.group = '';
children.push(item);
......
......@@ -259,7 +259,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @memberof MainBase
*/
public ActionModel:any ={
public actionModel:any ={
};
/**
......@@ -678,7 +678,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public getActionState(data:any){
let tempActionModel:any = JSON.parse(JSON.stringify(this.ActionModel));
let tempActionModel:any = JSON.parse(JSON.stringify(this.actionModel));
let targetData:any = this.transformData(data);
ViewTool.calcActionItemAuthState(targetData,tempActionModel,this.appUIService);
return tempActionModel;
......@@ -1219,6 +1219,10 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......@@ -1337,6 +1341,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
return codelist;
}
/**
* 根据分组代码表绘制分组列表
*
......@@ -1357,13 +1362,12 @@ export default class MainBase extends Vue implements ControlInterface {
let children:Array<any> = [];
this.items.forEach((item: any,j: number)=>{
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
if(Object.is(group.label,arr[0].label)){
if(Object.is(group.label,item[this.groupAppField])){
item.groupById = Number((i+1) * 100 + (j+1) * 1);
item.group = '';
children.push(item);
}
}else if(Object.is(group.label,item[this.groupAppField])){
}else if(Object.is(group.value,item[this.groupAppField])){
item.groupById = Number((i+1) * 100 + (j+1) * 1);
item.group = '';
children.push(item);
......@@ -1382,10 +1386,9 @@ export default class MainBase extends Vue implements ControlInterface {
this.items.forEach((item: any,index: number)=>{
let i: number = 0;
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
i = allGroup.findIndex((group: any)=>Object.is(group.label,arr[0].label));
}else{
i = allGroup.findIndex((group: any)=>Object.is(group.label,item[this.groupAppField]));
}else{
i = allGroup.findIndex((group: any)=>Object.is(group.value,item[this.groupAppField]));
}
if(i < 0){
item.groupById = Number((allGroup.length+1) * 100 + (index+1) * 1);
......@@ -1425,16 +1428,9 @@ export default class MainBase extends Vue implements ControlInterface {
if(!this.isEnableGroup) return;
// 分组
let allGroup: Array<any> = [];
let allGroupField: Array<any> =[];
allGroupField = this.getGroupCodelist(this.groupAppFieldCodelistType,this.groupAppFieldCodelistTag);
this.items.forEach((item: any)=>{
if(item.hasOwnProperty(this.groupAppField)){
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
allGroup.push(arr[0].label);
}else{
allGroup.push(item[this.groupAppField]);
}
allGroup.push(item[this.groupAppField]);
}
});
let groupTree:Array<any> = [];
......@@ -1446,14 +1442,7 @@ export default class MainBase extends Vue implements ControlInterface {
allGroup.forEach((group: any, groupIndex: number)=>{
let children:Array<any> = [];
this.items.forEach((item: any,itemIndex: number)=>{
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
if(Object.is(group,arr[0].label)){
item.groupById = Number((groupIndex+1) * 100 + (itemIndex+1) * 1);
item.group = '';
children.push(item);
}
}else if(Object.is(group,item[this.groupAppField])){
if(Object.is(group,item[this.groupAppField])){
item.groupById = Number((groupIndex+1) * 100 + (itemIndex+1) * 1);
item.group = '';
children.push(item);
......
......@@ -285,7 +285,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @memberof MainBase
*/
public ActionModel:any ={
public actionModel:any ={
};
/**
......@@ -713,7 +713,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public getActionState(data:any){
let tempActionModel:any = JSON.parse(JSON.stringify(this.ActionModel));
let tempActionModel:any = JSON.parse(JSON.stringify(this.actionModel));
let targetData:any = this.transformData(data);
ViewTool.calcActionItemAuthState(targetData,tempActionModel,this.appUIService);
return tempActionModel;
......@@ -1254,6 +1254,10 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......@@ -1372,6 +1376,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
return codelist;
}
/**
* 根据分组代码表绘制分组列表
*
......@@ -1392,13 +1397,12 @@ export default class MainBase extends Vue implements ControlInterface {
let children:Array<any> = [];
this.items.forEach((item: any,j: number)=>{
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
if(Object.is(group.label,arr[0].label)){
if(Object.is(group.label,item[this.groupAppField])){
item.groupById = Number((i+1) * 100 + (j+1) * 1);
item.group = '';
children.push(item);
}
}else if(Object.is(group.label,item[this.groupAppField])){
}else if(Object.is(group.value,item[this.groupAppField])){
item.groupById = Number((i+1) * 100 + (j+1) * 1);
item.group = '';
children.push(item);
......@@ -1418,10 +1422,9 @@ export default class MainBase extends Vue implements ControlInterface {
this.items.forEach((item: any,index: number)=>{
let i: number = 0;
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
i = allGroup.findIndex((group: any)=>Object.is(group.label,arr[0].label));
}else{
i = allGroup.findIndex((group: any)=>Object.is(group.label,item[this.groupAppField]));
}else{
i = allGroup.findIndex((group: any)=>Object.is(group.value,item[this.groupAppField]));
}
if(i < 0){
item.groupById = Number((allGroup.length+1) * 100 + (index+1) * 1);
......@@ -1462,16 +1465,9 @@ export default class MainBase extends Vue implements ControlInterface {
if(!this.isEnableGroup) return;
// 分组
let allGroup: Array<any> = [];
let allGroupField: Array<any> =[];
allGroupField = this.getGroupCodelist(this.groupAppFieldCodelistType,this.groupAppFieldCodelistTag);
this.items.forEach((item: any)=>{
if(item.hasOwnProperty(this.groupAppField)){
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
allGroup.push(arr[0].label);
}else{
allGroup.push(item[this.groupAppField]);
}
allGroup.push(item[this.groupAppField]);
}
});
let groupTree:Array<any> = [];
......@@ -1483,14 +1479,7 @@ export default class MainBase extends Vue implements ControlInterface {
allGroup.forEach((group: any, groupIndex: number)=>{
let children:Array<any> = [];
this.items.forEach((item: any,itemIndex: number)=>{
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
if(Object.is(group,arr[0].label)){
item.groupById = Number((groupIndex+1) * 100 + (itemIndex+1) * 1);
item.group = '';
children.push(item);
}
}else if(Object.is(group,item[this.groupAppField])){
if(Object.is(group,item[this.groupAppField])){
item.groupById = Number((groupIndex+1) * 100 + (itemIndex+1) * 1);
item.group = '';
children.push(item);
......
......@@ -90,8 +90,8 @@ export default class MainService extends ControlService {
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
if (Object.is(serviceName, 'SysRoleService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.appEntityService.FetchDefault(JSON.parse(JSON.stringify(context)), data, isloading), 'roleid', 'sysrole');
if (Object.is(serviceName, 'SysRoleService') && Object.is(interfaceName, 'FetchNoRepeat')) {
return this.doItems(this.appEntityService.FetchNoRepeat(JSON.parse(JSON.stringify(context)), data, isloading), 'roleid', 'sysrole');
}
return Promise.reject([])
......
......@@ -314,7 +314,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @memberof MainBase
*/
public ActionModel:any ={
public actionModel:any ={
};
/**
......@@ -769,7 +769,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public getActionState(data:any){
let tempActionModel:any = JSON.parse(JSON.stringify(this.ActionModel));
let tempActionModel:any = JSON.parse(JSON.stringify(this.actionModel));
let targetData:any = this.transformData(data);
ViewTool.calcActionItemAuthState(targetData,tempActionModel,this.appUIService);
return tempActionModel;
......@@ -1310,6 +1310,10 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......@@ -1428,6 +1432,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
return codelist;
}
/**
* 根据分组代码表绘制分组列表
*
......@@ -1448,13 +1453,12 @@ export default class MainBase extends Vue implements ControlInterface {
let children:Array<any> = [];
this.items.forEach((item: any,j: number)=>{
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
if(Object.is(group.label,arr[0].label)){
if(Object.is(group.label,item[this.groupAppField])){
item.groupById = Number((i+1) * 100 + (j+1) * 1);
item.group = '';
children.push(item);
}
}else if(Object.is(group.label,item[this.groupAppField])){
}else if(Object.is(group.value,item[this.groupAppField])){
item.groupById = Number((i+1) * 100 + (j+1) * 1);
item.group = '';
children.push(item);
......@@ -1477,10 +1481,9 @@ export default class MainBase extends Vue implements ControlInterface {
this.items.forEach((item: any,index: number)=>{
let i: number = 0;
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
i = allGroup.findIndex((group: any)=>Object.is(group.label,arr[0].label));
}else{
i = allGroup.findIndex((group: any)=>Object.is(group.label,item[this.groupAppField]));
}else{
i = allGroup.findIndex((group: any)=>Object.is(group.value,item[this.groupAppField]));
}
if(i < 0){
item.groupById = Number((allGroup.length+1) * 100 + (index+1) * 1);
......@@ -1524,16 +1527,9 @@ export default class MainBase extends Vue implements ControlInterface {
if(!this.isEnableGroup) return;
// 分组
let allGroup: Array<any> = [];
let allGroupField: Array<any> =[];
allGroupField = this.getGroupCodelist(this.groupAppFieldCodelistType,this.groupAppFieldCodelistTag);
this.items.forEach((item: any)=>{
if(item.hasOwnProperty(this.groupAppField)){
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
allGroup.push(arr[0].label);
}else{
allGroup.push(item[this.groupAppField]);
}
allGroup.push(item[this.groupAppField]);
}
});
let groupTree:Array<any> = [];
......@@ -1545,14 +1541,7 @@ export default class MainBase extends Vue implements ControlInterface {
allGroup.forEach((group: any, groupIndex: number)=>{
let children:Array<any> = [];
this.items.forEach((item: any,itemIndex: number)=>{
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
if(Object.is(group,arr[0].label)){
item.groupById = Number((groupIndex+1) * 100 + (itemIndex+1) * 1);
item.group = '';
children.push(item);
}
}else if(Object.is(group,item[this.groupAppField])){
if(Object.is(group,item[this.groupAppField])){
item.groupById = Number((groupIndex+1) * 100 + (itemIndex+1) * 1);
item.group = '';
children.push(item);
......
<template>
<div class='pickupviewpanel'>
<component
v-if="inited && view.viewname && !Object.is(view.viewname, '')"
:is="view.viewname"
class="viewcontainer3"
:viewdata="viewdata"
:viewparam="viewparam"
:viewDefaultUsage="false"
:isSingleSelect="isSingleSelect"
:selectedData="selectedData"
:isShowButton="isShowButton"
@viewdataschange="onViewDatasChange"
@viewdatasactivated="viewDatasActivated"
@viewload="onViewLoad">
</component>
</div>
</template>
<script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch, Model,Inject } from 'vue-property-decorator';
import { CreateElement } from 'vue';
import { Subject, Subscription } from 'rxjs';
import { ControlInterface } from '@/interface/control';
import { UIActionTool,Util,ViewTool } from '@/utils';
import NavDataService from '@/service/app/navdata-service';
import AppCenterService from "@service/app/app-center-service";
import SysRoleService from '@/service/sys-role/sys-role-service';
import PickupView_norepeatpickupviewpanelService from './pickup-view-norepeatpickupviewpanel-pickupviewpanel-service';
import SysRoleUIService from '@/uiservice/sys-role/sys-role-ui-service';
import PickupView_norepeatpickupviewpanelModel from './pickup-view-norepeatpickupviewpanel-pickupviewpanel-model';
@Component({
components: {
}
})
export default class PickupView_norepeatpickupviewpanelBase extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
@Prop() public viewparams!: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public getControlType(): string {
return 'PICKUPVIEWPANEL'
}
/**
* 建构部件服务对象
*
* @type {PickupView_norepeatpickupviewpanelService}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public service: PickupView_norepeatpickupviewpanelService = new PickupView_norepeatpickupviewpanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {SysRoleService}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public appEntityService: SysRoleService = new SysRoleService({ $store: this.$store });
/**
* 转化数据
*
* @param {any} args
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public transformData(args: any) {
let _this: any = this;
if(_this.service && _this.service.handleRequestData instanceof Function && _this.service.handleRequestData('transform',_this.context,args)){
return _this.service.handleRequestData('transform',_this.context,args)['data'];
}
}
/**
* 关闭视图
*
* @param {any} args
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public counterRefresh(){
const _this:any =this;
if(_this.counterServiceArray && _this.counterServiceArray.length >0){
_this.counterServiceArray.forEach((item:any) =>{
if(item.refreshData && item.refreshData instanceof Function){
item.refreshData();
}
})
}
}
/**
* 选中数据字符串
*
* @type {string}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
@Prop() public selectedData?: string;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public getData(): any {
return {};
}
/**
* 视图名称
*
* @type {*}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public view: any = {
viewname: 'sys-role-pickup-grid-view-norepeat',
data: {},
}
/**
* 局部上下文
*
* @type {*}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public localViewParam: any = null;
/**
* 视图数据
*
* @type {*}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
@Prop({default: true}) public isShowButton!: boolean;
/**
* 是否单选
*
* @type {boolean}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
@Prop() public isSingleSelect?: boolean;
/**
* 初始化完成
*
* @type {boolean}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public inited: boolean = false;
/**
* 视图数据变化
*
* @param {*} $event
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public onViewDatasChange($event: any): void {
if($event.length>0){
$event.forEach((item:any,index:any) => {
let srfmajortext = item.srfmajortext?item.srfmajortext:item['rolename'];
if(srfmajortext){
Object.assign($event[index],{srfmajortext: srfmajortext});
}
});
}
this.$emit('selectionchange', $event);
}
/**
* 视图数据被激活
*
* @param {*} $event
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public viewDatasActivated($event: any): void {
this.$emit('activated', $event);
}
/**
* 视图加载完成
*
* @param {*} $event
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public onViewLoad($event: any): void {
this.$emit('load', $event);
}
/**
* vue 生命周期
*
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('load', action)) {
this.viewdata = JSON.stringify(this.context);
this.viewparam = JSON.stringify(Object.assign(data, this.viewparams));
this.inited = true;
}
});
}
}
/**
* 初始化导航参数
*
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public initNavParam(){
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata = JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
* vue 生命周期
*
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
</script>
<style lang='less'>
@import './pickup-view-norepeatpickupviewpanel-pickupviewpanel.less';
</style>
\ No newline at end of file
/**
* PickupView_norepeatpickupviewpanel 部件模型
*
* @export
* @class PickupView_norepeatpickupviewpanelModel
*/
export default class PickupView_norepeatpickupviewpanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof PickupView_norepeatpickupviewpanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'sysrole',
prop: 'roleid',
},
{
name: 'rolename',
},
{
name: 'memo',
},
{
name: 'proleid',
},
{
name: 'prolename',
},
{
name: 'createdate',
},
{
name: 'updatedate',
},
{
name: 'createman',
},
{
name: 'updateman',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* PickupView_norepeatpickupviewpanel 部件服务对象
*
* @export
* @class PickupView_norepeatpickupviewpanelService
*/
export default class PickupView_norepeatpickupviewpanelService extends ControlService {
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import PickupView_norepeatpickupviewpanelBase from './pickup-view-norepeatpickupviewpanel-pickupviewpanel-base.vue';
@Component({
components: {
}
})
export default class PickupView_norepeatpickupviewpanel extends PickupView_norepeatpickupviewpanelBase {
}
</script>
\ No newline at end of file
......@@ -309,7 +309,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @memberof MainBase
*/
public ActionModel:any ={
public actionModel:any ={
};
/**
......@@ -755,7 +755,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public getActionState(data:any){
let tempActionModel:any = JSON.parse(JSON.stringify(this.ActionModel));
let tempActionModel:any = JSON.parse(JSON.stringify(this.actionModel));
let targetData:any = this.transformData(data);
ViewTool.calcActionItemAuthState(targetData,tempActionModel,this.appUIService);
return tempActionModel;
......@@ -1296,6 +1296,10 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......@@ -1414,6 +1418,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
return codelist;
}
/**
* 根据分组代码表绘制分组列表
*
......@@ -1434,13 +1439,12 @@ export default class MainBase extends Vue implements ControlInterface {
let children:Array<any> = [];
this.items.forEach((item: any,j: number)=>{
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
if(Object.is(group.label,arr[0].label)){
if(Object.is(group.label,item[this.groupAppField])){
item.groupById = Number((i+1) * 100 + (j+1) * 1);
item.group = '';
children.push(item);
}
}else if(Object.is(group.label,item[this.groupAppField])){
}else if(Object.is(group.value,item[this.groupAppField])){
item.groupById = Number((i+1) * 100 + (j+1) * 1);
item.group = '';
children.push(item);
......@@ -1462,10 +1466,9 @@ export default class MainBase extends Vue implements ControlInterface {
this.items.forEach((item: any,index: number)=>{
let i: number = 0;
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
i = allGroup.findIndex((group: any)=>Object.is(group.label,arr[0].label));
}else{
i = allGroup.findIndex((group: any)=>Object.is(group.label,item[this.groupAppField]));
}else{
i = allGroup.findIndex((group: any)=>Object.is(group.value,item[this.groupAppField]));
}
if(i < 0){
item.groupById = Number((allGroup.length+1) * 100 + (index+1) * 1);
......@@ -1508,16 +1511,9 @@ export default class MainBase extends Vue implements ControlInterface {
if(!this.isEnableGroup) return;
// 分组
let allGroup: Array<any> = [];
let allGroupField: Array<any> =[];
allGroupField = this.getGroupCodelist(this.groupAppFieldCodelistType,this.groupAppFieldCodelistTag);
this.items.forEach((item: any)=>{
if(item.hasOwnProperty(this.groupAppField)){
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
allGroup.push(arr[0].label);
}else{
allGroup.push(item[this.groupAppField]);
}
allGroup.push(item[this.groupAppField]);
}
});
let groupTree:Array<any> = [];
......@@ -1529,14 +1525,7 @@ export default class MainBase extends Vue implements ControlInterface {
allGroup.forEach((group: any, groupIndex: number)=>{
let children:Array<any> = [];
this.items.forEach((item: any,itemIndex: number)=>{
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
if(Object.is(group,arr[0].label)){
item.groupById = Number((groupIndex+1) * 100 + (itemIndex+1) * 1);
item.group = '';
children.push(item);
}
}else if(Object.is(group,item[this.groupAppField])){
if(Object.is(group,item[this.groupAppField])){
item.groupById = Number((groupIndex+1) * 100 + (itemIndex+1) * 1);
item.group = '';
children.push(item);
......
......@@ -307,7 +307,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @memberof MainBase
*/
public ActionModel:any ={
public actionModel:any ={
};
/**
......@@ -762,7 +762,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public getActionState(data:any){
let tempActionModel:any = JSON.parse(JSON.stringify(this.ActionModel));
let tempActionModel:any = JSON.parse(JSON.stringify(this.actionModel));
let targetData:any = this.transformData(data);
ViewTool.calcActionItemAuthState(targetData,tempActionModel,this.appUIService);
return tempActionModel;
......@@ -1303,6 +1303,10 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......@@ -1421,6 +1425,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
return codelist;
}
/**
* 根据分组代码表绘制分组列表
*
......@@ -1441,13 +1446,12 @@ export default class MainBase extends Vue implements ControlInterface {
let children:Array<any> = [];
this.items.forEach((item: any,j: number)=>{
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
if(Object.is(group.label,arr[0].label)){
if(Object.is(group.label,item[this.groupAppField])){
item.groupById = Number((i+1) * 100 + (j+1) * 1);
item.group = '';
children.push(item);
}
}else if(Object.is(group.label,item[this.groupAppField])){
}else if(Object.is(group.value,item[this.groupAppField])){
item.groupById = Number((i+1) * 100 + (j+1) * 1);
item.group = '';
children.push(item);
......@@ -1470,10 +1474,9 @@ export default class MainBase extends Vue implements ControlInterface {
this.items.forEach((item: any,index: number)=>{
let i: number = 0;
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
i = allGroup.findIndex((group: any)=>Object.is(group.label,arr[0].label));
}else{
i = allGroup.findIndex((group: any)=>Object.is(group.label,item[this.groupAppField]));
}else{
i = allGroup.findIndex((group: any)=>Object.is(group.value,item[this.groupAppField]));
}
if(i < 0){
item.groupById = Number((allGroup.length+1) * 100 + (index+1) * 1);
......@@ -1517,16 +1520,9 @@ export default class MainBase extends Vue implements ControlInterface {
if(!this.isEnableGroup) return;
// 分组
let allGroup: Array<any> = [];
let allGroupField: Array<any> =[];
allGroupField = this.getGroupCodelist(this.groupAppFieldCodelistType,this.groupAppFieldCodelistTag);
this.items.forEach((item: any)=>{
if(item.hasOwnProperty(this.groupAppField)){
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
allGroup.push(arr[0].label);
}else{
allGroup.push(item[this.groupAppField]);
}
allGroup.push(item[this.groupAppField]);
}
});
let groupTree:Array<any> = [];
......@@ -1538,14 +1534,7 @@ export default class MainBase extends Vue implements ControlInterface {
allGroup.forEach((group: any, groupIndex: number)=>{
let children:Array<any> = [];
this.items.forEach((item: any,itemIndex: number)=>{
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
if(Object.is(group,arr[0].label)){
item.groupById = Number((groupIndex+1) * 100 + (itemIndex+1) * 1);
item.group = '';
children.push(item);
}
}else if(Object.is(group,item[this.groupAppField])){
if(Object.is(group,item[this.groupAppField])){
item.groupById = Number((groupIndex+1) * 100 + (itemIndex+1) * 1);
item.group = '';
children.push(item);
......
此差异已折叠。
......@@ -20,6 +20,7 @@ import com.alibaba.fastjson.JSONObject;
public interface SysRoleMapper extends BaseMapper<SysRole> {
Page<SysRole> searchDefault(IPage page, @Param("srf") SysRoleSearchContext context, @Param("ew") Wrapper<SysRole> wrapper);
Page<SysRole> searchNoRepeat(IPage page, @Param("srf") SysRoleSearchContext context, @Param("ew") Wrapper<SysRole> wrapper);
@Override
@Cacheable(value ="sysrole", key = "'row:'+#p0")
SysRole selectById(Serializable id);
......
......@@ -41,6 +41,7 @@ public interface ISysRoleService extends IService<SysRole> {
@CacheEvict(value = "sysrole",allEntries = true)
void saveBatch(List<SysRole> list);
Page<SysRole> searchDefault(SysRoleSearchContext context);
Page<SysRole> searchNoRepeat(SysRoleSearchContext context);
List<SysRole> selectByProleid(String roleid);
@CacheEvict(value = "sysrole", allEntries = true)
void removeByProleid(String roleid);
......
......@@ -189,6 +189,15 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
return new PageImpl<SysRole>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 数据查询
*/
@Override
public Page<SysRole> searchNoRepeat(SysRoleSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<SysRole> pages=baseMapper.searchNoRepeat(context.getPages(),context,context.getSelectCond());
return new PageImpl<SysRole>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
......
......@@ -6,7 +6,7 @@
<!--输出实体[SYS_AUTHLOG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_authlog-1-1">
<changeSet author="root" id="tab-sys_authlog-1-1">
<createTable tableName="IBZAUTHLOG">
<column name="LOGID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_AUTHLOG_LOGID"/>
......@@ -32,7 +32,7 @@
<!--输出实体[SYS_OPEN_ACCESS]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_open_access-35-2">
<changeSet author="root" id="tab-sys_open_access-35-2">
<createTable tableName="IBZOPENACCESS">
<column name="ACCESSID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_OPEN_ACCESS_ACCESSID"/>
......@@ -64,7 +64,7 @@
<!--输出实体[SYS_PSSYSTEM]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_pssystem-1-3">
<changeSet author="root" id="tab-sys_pssystem-1-3">
<createTable tableName="IBZPSSYSTEM">
<column name="PSSYSTEMID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_PSSYSTEM_PSSYSTEMID"/>
......@@ -84,7 +84,7 @@
<!--输出实体[SYS_PERMISSION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_permission-1-4">
<changeSet author="root" id="tab-sys_permission-1-4">
<createTable tableName="IBZPERMISSION">
<column name="SYS_PERMISSIONID" remarks="" type="VARCHAR(200)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_PERMISSION_SYS_PERMISSI"/>
......@@ -106,7 +106,7 @@
<!--输出实体[SYS_ROLE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_role-4-5">
<changeSet author="root" id="tab-sys_role-4-5">
<createTable tableName="IBZROLE">
<column name="SYS_ROLEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_ROLE_SYS_ROLEID"/>
......@@ -130,7 +130,7 @@
<!--输出实体[SYS_ROLE_PERMISSION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_role_permission-3-6">
<changeSet author="root" id="tab-sys_role_permission-3-6">
<createTable tableName="IBZROLE_PERMISSION">
<column name="SYS_ROLE_PERMISSIONID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_ROLE_PERMISSION_SYS_ROL"/>
......@@ -150,7 +150,7 @@
<!--输出实体[SYS_USER_AUTH]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_user_auth-20-7">
<changeSet author="root" id="tab-sys_user_auth-20-7">
<createTable tableName="IBZUSERAUTH">
<column name="AUTHID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_USER_AUTH_AUTHID"/>
......@@ -168,7 +168,7 @@
<!--输出实体[SYS_USER_ROLE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_user_role-7-8">
<changeSet author="root" id="tab-sys_user_role-7-8">
<createTable tableName="IBZUSER_ROLE">
<column name="SYS_USER_ROLEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_USER_ROLE_SYS_USER_ROLE"/>
......@@ -189,16 +189,16 @@
<!--输出实体[SYS_PSSYSTEM]外键关系 -->
<!--输出实体[SYS_PERMISSION]外键关系 -->
<!--输出实体[SYS_ROLE]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-sys_role-4-9">
<changeSet author="root" id="fk-sys_role-4-9">
<addForeignKeyConstraint baseColumnNames="PROLEID" baseTableName="IBZROLE" constraintName="DER1N_SYS_ROLE_SYS_ROLE_PROLEI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SYS_ROLEID" referencedTableName="IBZROLE" validate="true"/>
</changeSet>
<!--输出实体[SYS_ROLE_PERMISSION]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-sys_role_permission-3-10">
<changeSet author="root" id="fk-sys_role_permission-3-10">
<addForeignKeyConstraint baseColumnNames="SYS_PERMISSIONID" baseTableName="IBZROLE_PERMISSION" constraintName="DER1N_SYS_ROLE_PERMISSION_SYS_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SYS_PERMISSIONID" referencedTableName="IBZPERMISSION" validate="true"/>
</changeSet>
<!--输出实体[SYS_USER_AUTH]外键关系 -->
<!--输出实体[SYS_USER_ROLE]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-sys_user_role-7-12">
<changeSet author="root" id="fk-sys_user_role-7-12">
<addForeignKeyConstraint baseColumnNames="SYS_ROLEID" baseTableName="IBZUSER_ROLE" constraintName="DER1N_SYS_USER_ROLE_SYS_ROLE_S" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SYS_ROLEID" referencedTableName="IBZROLE" validate="true"/>
</changeSet>
......
......@@ -42,6 +42,15 @@
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据集合[NoRepeat]-->
<select id="searchNoRepeat" parameterType="cn.ibizlab.core.uaa.filter.SysRoleSearchContext" resultMap="SysRoleResultMap">
select t1.* from (
<include refid="NoRepeat" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`MEMO`, t1.`PROLEID`, t11.`SYS_ROLENAME` AS `PROLENAME`, t1.`SYS_ROLEID`, t1.`SYS_ROLENAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `IBZROLE` t1 LEFT JOIN IBZROLE t11 ON t1.PROLEID = t11.SYS_ROLEID
......@@ -57,6 +66,21 @@
<![CDATA[ SELECT t1.CREATEDATE, t1.CREATEMAN, t1.MEMO, t1.PROLEID, t11.SYS_ROLENAME AS PROLENAME, t1.SYS_ROLEID, t1.SYS_ROLENAME, t1.UPDATEDATE, t1.UPDATEMAN FROM IBZROLE t1 LEFT JOIN IBZROLE t11 ON t1.PROLEID = t11.SYS_ROLEID
]]>
</sql>
<!--数据查询[NoRepeat]-->
<sql id="NoRepeat" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`MEMO`, t1.`PROLEID`, t11.`SYS_ROLENAME` AS `PROLENAME`, t1.`SYS_ROLEID`, t1.`SYS_ROLENAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `IBZROLE` t1 LEFT JOIN IBZROLE t11 ON t1.PROLEID = t11.SYS_ROLEID
]]>
</sql>
<!--数据查询[NoRepeat]-->
<sql id="NoRepeat" databaseId="oracle">
<![CDATA[ SELECT t1.CREATEDATE, t1.CREATEMAN, t1.MEMO, t1.PROLEID, t11.SYS_ROLENAME AS PROLENAME, t1.SYS_ROLEID, t1.SYS_ROLENAME, t1.UPDATEDATE, t1.UPDATEMAN FROM IBZROLE t1 LEFT JOIN IBZROLE t11 ON t1.PROLEID = t11.SYS_ROLEID
]]>
</sql>
<!--数据查询[NoRepeat]-->
<sql id="NoRepeat" databaseId="postgresql">
<![CDATA[ SELECT t1.CREATEDATE, t1.CREATEMAN, t1.MEMO, t1.PROLEID, t11.SYS_ROLENAME AS PROLENAME, t1.SYS_ROLEID, t1.SYS_ROLENAME, t1.UPDATEDATE, t1.UPDATEMAN FROM IBZROLE t1 LEFT JOIN IBZROLE t11 ON t1.PROLEID = t11.SYS_ROLEID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`MEMO`, t1.`PROLEID`, t11.`SYS_ROLENAME` AS `PROLENAME`, t1.`SYS_ROLEID`, t1.`SYS_ROLENAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `IBZROLE` t1 LEFT JOIN IBZROLE t11 ON t1.PROLEID = t11.SYS_ROLEID
......
......@@ -47,7 +47,7 @@
"dename":"SysRole",
"delogicname":"系统角色",
"sysmoudle":{"id":"UAA","name":"uaa"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"dedataset":[{"id":"Default" , "name":"DEFAULT"},{"id":"NoRepeat" , "name":"数据查询"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
......
......@@ -158,6 +158,28 @@ public class SysRoleResource {
.body(new PageImpl(sysroleMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRole-searchNoRepeat-all') and hasPermission(#context,'ibzuaa-SysRole-Get')")
@ApiOperation(value = "获取数据查询", tags = {"系统角色" } ,notes = "获取数据查询")
@RequestMapping(method= RequestMethod.GET , value="/sysroles/fetchnorepeat")
public ResponseEntity<List<SysRoleDTO>> fetchNoRepeat(SysRoleSearchContext context) {
Page<SysRole> domains = sysroleService.searchNoRepeat(context) ;
List<SysRoleDTO> list = sysroleMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRole-searchNoRepeat-all') and hasPermission(#context,'ibzuaa-SysRole-Get')")
@ApiOperation(value = "查询数据查询", tags = {"系统角色" } ,notes = "查询数据查询")
@RequestMapping(method= RequestMethod.POST , value="/sysroles/searchnorepeat")
public ResponseEntity<Page<SysRoleDTO>> searchNoRepeat(@RequestBody SysRoleSearchContext context) {
Page<SysRole> domains = sysroleService.searchNoRepeat(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(sysroleMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册