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

ibizdev提交

上级 39925e43
...@@ -123,12 +123,12 @@ export default class AppMpicker extends Vue { ...@@ -123,12 +123,12 @@ export default class AppMpicker extends Vue {
* @param newVal * @param newVal
* @param val * @param val
*/ */
@Watch('curvalue', { deep: true }) @Watch('curvalue', {immediate:true, deep: true })
oncurvalueChange(newVal: any, val: any) { oncurvalueChange(newVal: any, val: any) {
this.value = []; this.value = [];
this.selectItems = []; this.selectItems = [];
if (newVal) { if (newVal) {
this.selectItems = JSON.parse(newVal); this.selectItems = this.parseValue(JSON.parse(newVal));
this.selectItems.forEach((item: any) => { this.selectItems.forEach((item: any) => {
this.value.push(item[this.deKeyField]); this.value.push(item[this.deKeyField]);
let index = this.items.findIndex((i) => Object.is(i[this.deKeyField], item[this.deKeyField])); let index = this.items.findIndex((i) => Object.is(i[this.deKeyField], item[this.deKeyField]));
...@@ -187,7 +187,7 @@ export default class AppMpicker extends Vue { ...@@ -187,7 +187,7 @@ export default class AppMpicker extends Vue {
let index = this.items.findIndex((item) => Object.is(item[this.deKeyField], select)); let index = this.items.findIndex((item) => Object.is(item[this.deKeyField], select));
if (index >= 0) { if (index >= 0) {
let item = this.items[index]; let item = this.items[index];
val.push({ [this.deKeyField]: item[this.deKeyField], [this.deMajorField]: item.text }); val.push({ [this.deKeyField]: item[this.deKeyField], [this.deMajorField]: item[this.deMajorField] });
} else { } else {
index = this.selectItems.findIndex((item: any) => Object.is(item[this.deKeyField], select)); index = this.selectItems.findIndex((item: any) => Object.is(item[this.deKeyField], select));
if (index >= 0) { if (index >= 0) {
...@@ -196,7 +196,7 @@ export default class AppMpicker extends Vue { ...@@ -196,7 +196,7 @@ export default class AppMpicker extends Vue {
} }
} }
}); });
let value = val.length > 0 ? JSON.stringify(val) : ''; let value = val.length > 0 ? JSON.stringify(this.formatValue(val)) : '';
this.$emit('formitemvaluechange', { name: this.name, value: value }); this.$emit('formitemvaluechange', { name: this.name, value: value });
} }
} }
...@@ -211,7 +211,7 @@ export default class AppMpicker extends Vue { ...@@ -211,7 +211,7 @@ export default class AppMpicker extends Vue {
let index = this.selectItems.findIndex((item: any) => Object.is(item[this.deKeyField], tag)); let index = this.selectItems.findIndex((item: any) => Object.is(item[this.deKeyField], tag));
if (index >= 0) { if (index >= 0) {
this.selectItems.splice(index, 1); this.selectItems.splice(index, 1);
let value = this.selectItems.length > 0 ? JSON.stringify(this.selectItems) : ''; let value = this.selectItems.length > 0 ? JSON.stringify(this.formatValue(this.selectItems)) : '';
this.$emit('formitemvaluechange', { name: this.name, value: value }); this.$emit('formitemvaluechange', { name: this.name, value: value });
} }
} }
...@@ -256,13 +256,50 @@ export default class AppMpicker extends Vue { ...@@ -256,13 +256,50 @@ export default class AppMpicker extends Vue {
}); });
} }
if (this.name && this.activeData) { if (this.name && this.activeData) {
let value = selects.length > 0 ? JSON.stringify(selects) : ''; let value = selects.length > 0 ? JSON.stringify(this.formatValue(selects)) : '';
this.$emit('formitemvaluechange', { name: this.name, value: value }); this.$emit('formitemvaluechange', { name: this.name, value: value });
} }
}) })
} }
} }
/**
* 解析值,把srfkey和srfmajortext解析成实体属性名
*
* @param {any[]} value 需要转换的数组
* @memberof AppMpicker
*/
public parseValue(value: any[]){
let result = [];
if(this.deKeyField !== "srfkey" || this.deMajorField !== "srfmajortext"){
value.forEach((item: any) => {
result.push({[this.deMajorField]: item.srfmajortext, [this.deKeyField]: item.srfkey});
});
}else{
result = value;
}
return result;
}
/**
* 格式化值,把实体属性名格式化成srfkey和srfmajortext
*
* @param {any[]} value 需要转换的数组
* @memberof AppMpicker
*/
public formatValue(value: any[]){
let result = [];
if(this.deKeyField !== "srfkey" || this.deMajorField !== "srfmajortext"){
value.forEach((item: any) => {
result.push({srfmajortext : item[this.deMajorField], srfkey : item[this.deKeyField]});
});
}else{
result = value;
}
return result;
}
} }
</script> </script>
<style lang="less"> <style lang="less">
......
...@@ -108,6 +108,11 @@ export default class AppSpan extends Vue { ...@@ -108,6 +108,11 @@ export default class AppSpan extends Vue {
public load(){ public load(){
if(!this.value || this.tag){ if(!this.value || this.tag){
return; //代码表走codelist组件 return; //代码表走codelist组件
}else if(this.editorType === "ADDRESSPICKUP"){
JSON.parse(this.value).forEach((item:any,index:number) => {
this.text += index === 0 ? item.srfmajortext : ","+item.srfmajortext;
});
}else{ }else{
this.text = this.value; this.text = this.value;
} }
......
...@@ -40,6 +40,11 @@ export default { ...@@ -40,6 +40,11 @@ export default {
main_form: { main_form: {
details: { details: {
group1: "角色表基本信息", group1: "角色表基本信息",
druipart1: "资源",
tabpage1: "权限",
druipart2: "用户",
tabpage2: "用户",
tabpanel1: "",
formpage1: "基本信息", formpage1: "基本信息",
srfupdatedate: "更新时间", srfupdatedate: "更新时间",
srforikey: "", srforikey: "",
......
...@@ -39,6 +39,11 @@ export default { ...@@ -39,6 +39,11 @@ export default {
main_form: { main_form: {
details: { details: {
group1: '角色表基本信息', group1: '角色表基本信息',
druipart1: '资源',
tabpage1: '权限',
druipart2: '用户',
tabpage2: '用户',
tabpanel1: '',
formpage1: '基本信息', formpage1: '基本信息',
srfupdatedate: '更新时间', srfupdatedate: '更新时间',
srforikey: '', srforikey: '',
......
...@@ -38,6 +38,7 @@ export default { ...@@ -38,6 +38,7 @@ export default {
}, },
main_form: { main_form: {
details: { details: {
druipart1: "",
formpage1: "基本信息", formpage1: "基本信息",
srforikey: "", srforikey: "",
srfkey: "用户标识", srfkey: "用户标识",
......
...@@ -37,6 +37,7 @@ export default { ...@@ -37,6 +37,7 @@ export default {
}, },
main_form: { main_form: {
details: { details: {
druipart1: '',
formpage1: '基本信息', formpage1: '基本信息',
srforikey: '', srforikey: '',
srfkey: '用户标识', srfkey: '用户标识',
......
...@@ -2,14 +2,17 @@ export const PageComponents = { ...@@ -2,14 +2,17 @@ export const PageComponents = {
install(Vue: any, opt: any) { install(Vue: any, opt: any) {
Vue.component('sys-permissionpickup-grid-view', () => import('@pages/uaa/sys-permissionpickup-grid-view/sys-permissionpickup-grid-view.vue')); Vue.component('sys-permissionpickup-grid-view', () => import('@pages/uaa/sys-permissionpickup-grid-view/sys-permissionpickup-grid-view.vue'));
Vue.component('sys-rolepickup-view', () => import('@pages/uaa/sys-rolepickup-view/sys-rolepickup-view.vue')); Vue.component('sys-rolepickup-view', () => import('@pages/uaa/sys-rolepickup-view/sys-rolepickup-view.vue'));
Vue.component('sys-usermpickup-view', () => import('@pages/uaa/sys-usermpickup-view/sys-usermpickup-view.vue'));
Vue.component('sys-userpickup-grid-view', () => import('@pages/uaa/sys-userpickup-grid-view/sys-userpickup-grid-view.vue')); Vue.component('sys-userpickup-grid-view', () => import('@pages/uaa/sys-userpickup-grid-view/sys-userpickup-grid-view.vue'));
Vue.component('sys-roleedit-view', () => import('@pages/uaa/sys-roleedit-view/sys-roleedit-view.vue')); Vue.component('sys-roleedit-view', () => import('@pages/uaa/sys-roleedit-view/sys-roleedit-view.vue'));
Vue.component('sys-user-roleedit-view', () => import('@pages/uaa/sys-user-roleedit-view/sys-user-roleedit-view.vue')); Vue.component('sys-user-roleedit-view', () => import('@pages/uaa/sys-user-roleedit-view/sys-user-roleedit-view.vue'));
Vue.component('sys-permissionpickup-view', () => import('@pages/uaa/sys-permissionpickup-view/sys-permissionpickup-view.vue')); Vue.component('sys-permissionpickup-view', () => import('@pages/uaa/sys-permissionpickup-view/sys-permissionpickup-view.vue'));
Vue.component('sys-rolempickup-view', () => import('@pages/uaa/sys-rolempickup-view/sys-rolempickup-view.vue'));
Vue.component('sys-permissionedit-view', () => import('@pages/uaa/sys-permissionedit-view/sys-permissionedit-view.vue')); Vue.component('sys-permissionedit-view', () => import('@pages/uaa/sys-permissionedit-view/sys-permissionedit-view.vue'));
Vue.component('sys-role-permissiongrid-view', () => import('@pages/uaa/sys-role-permissiongrid-view/sys-role-permissiongrid-view.vue')); Vue.component('sys-role-permissiongrid-view', () => import('@pages/uaa/sys-role-permissiongrid-view/sys-role-permissiongrid-view.vue'));
Vue.component('sys-userpickup-view', () => import('@pages/uaa/sys-userpickup-view/sys-userpickup-view.vue')); Vue.component('sys-userpickup-view', () => import('@pages/uaa/sys-userpickup-view/sys-userpickup-view.vue'));
Vue.component('sys-rolegrid-view', () => import('@pages/uaa/sys-rolegrid-view/sys-rolegrid-view.vue')); Vue.component('sys-rolegrid-view', () => import('@pages/uaa/sys-rolegrid-view/sys-rolegrid-view.vue'));
Vue.component('sys-permissionmpickup-view', () => import('@pages/uaa/sys-permissionmpickup-view/sys-permissionmpickup-view.vue'));
Vue.component('sys-useredit-view', () => import('@pages/uaa/sys-useredit-view/sys-useredit-view.vue')); Vue.component('sys-useredit-view', () => import('@pages/uaa/sys-useredit-view/sys-useredit-view.vue'));
Vue.component('sys-role-permissionedit-view', () => import('@pages/uaa/sys-role-permissionedit-view/sys-role-permissionedit-view.vue')); Vue.component('sys-role-permissionedit-view', () => import('@pages/uaa/sys-role-permissionedit-view/sys-role-permissionedit-view.vue'));
Vue.component('sys-user-rolegrid-view', () => import('@pages/uaa/sys-user-rolegrid-view/sys-user-rolegrid-view.vue')); Vue.component('sys-user-rolegrid-view', () => import('@pages/uaa/sys-user-rolegrid-view/sys-user-rolegrid-view.vue'));
......
...@@ -60,6 +60,19 @@ const router = new Router({ ...@@ -60,6 +60,19 @@ const router = new Router({
}, },
component: () => import('@pages/uaa/sys-rolepickup-view/sys-rolepickup-view.vue'), component: () => import('@pages/uaa/sys-rolepickup-view/sys-rolepickup-view.vue'),
}, },
{
path: 'sys_users/:sys_user?/mpickupview/:mpickupview?',
meta: {
caption: 'entities.sys_user.views.mpickupview.caption',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'sys_users', parameterName: 'sys_user' },
{ pathName: 'mpickupview', parameterName: 'mpickupview' },
],
requireAuth: true,
},
component: () => import('@pages/uaa/sys-usermpickup-view/sys-usermpickup-view.vue'),
},
{ {
path: 'sys_users/:sys_user?/pickupgridview/:pickupgridview?', path: 'sys_users/:sys_user?/pickupgridview/:pickupgridview?',
meta: { meta: {
...@@ -140,6 +153,19 @@ const router = new Router({ ...@@ -140,6 +153,19 @@ const router = new Router({
}, },
component: () => import('@pages/uaa/sys-permissionpickup-view/sys-permissionpickup-view.vue'), component: () => import('@pages/uaa/sys-permissionpickup-view/sys-permissionpickup-view.vue'),
}, },
{
path: 'sys_roles/:sys_role?/mpickupview/:mpickupview?',
meta: {
caption: 'entities.sys_role.views.mpickupview.caption',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'sys_roles', parameterName: 'sys_role' },
{ pathName: 'mpickupview', parameterName: 'mpickupview' },
],
requireAuth: true,
},
component: () => import('@pages/uaa/sys-rolempickup-view/sys-rolempickup-view.vue'),
},
{ {
path: 'sys_permissions/:sys_permission?/editview/:editview?', path: 'sys_permissions/:sys_permission?/editview/:editview?',
meta: { meta: {
...@@ -220,6 +246,19 @@ const router = new Router({ ...@@ -220,6 +246,19 @@ const router = new Router({
}, },
component: () => import('@pages/uaa/sys-rolegrid-view/sys-rolegrid-view.vue'), component: () => import('@pages/uaa/sys-rolegrid-view/sys-rolegrid-view.vue'),
}, },
{
path: 'sys_permissions/:sys_permission?/mpickupview/:mpickupview?',
meta: {
caption: 'entities.sys_permission.views.mpickupview.caption',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'sys_permissions', parameterName: 'sys_permission' },
{ pathName: 'mpickupview', parameterName: 'mpickupview' },
],
requireAuth: true,
},
component: () => import('@pages/uaa/sys-permissionmpickup-view/sys-permissionmpickup-view.vue'),
},
{ {
path: 'sys_users/:sys_user?/editview/:editview?', path: 'sys_users/:sys_user?/editview/:editview?',
meta: { meta: {
...@@ -462,6 +501,18 @@ const router = new Router({ ...@@ -462,6 +501,18 @@ const router = new Router({
}, },
component: () => import('@pages/uaa/sys-user-roleedit-view/sys-user-roleedit-view.vue'), component: () => import('@pages/uaa/sys-user-roleedit-view/sys-user-roleedit-view.vue'),
}, },
{
path: '/sys_users/:sys_user?/mpickupview/:mpickupview?',
meta: {
caption: 'entities.sys_user.views.mpickupview.caption',
parameters: [
{ pathName: 'sys_users', parameterName: 'sys_user' },
{ pathName: 'mpickupview', parameterName: 'mpickupview' },
],
requireAuth: true,
},
component: () => import('@pages/uaa/sys-usermpickup-view/sys-usermpickup-view.vue'),
},
{ {
path: '/sys_permissions/:sys_permission?/gridview/:gridview?', path: '/sys_permissions/:sys_permission?/gridview/:gridview?',
meta: { meta: {
...@@ -634,6 +685,18 @@ const router = new Router({ ...@@ -634,6 +685,18 @@ const router = new Router({
}, },
component: () => import('@pages/uaa/sys-rolegrid-view/sys-rolegrid-view.vue'), component: () => import('@pages/uaa/sys-rolegrid-view/sys-rolegrid-view.vue'),
}, },
{
path: '/sys_permissions/:sys_permission?/mpickupview/:mpickupview?',
meta: {
caption: 'entities.sys_permission.views.mpickupview.caption',
parameters: [
{ pathName: 'sys_permissions', parameterName: 'sys_permission' },
{ pathName: 'mpickupview', parameterName: 'mpickupview' },
],
requireAuth: true,
},
component: () => import('@pages/uaa/sys-permissionmpickup-view/sys-permissionmpickup-view.vue'),
},
{ {
path: '/sys_users/:sys_user?/gridview/:gridview?', path: '/sys_users/:sys_user?/gridview/:gridview?',
meta: { meta: {
...@@ -646,6 +709,18 @@ const router = new Router({ ...@@ -646,6 +709,18 @@ const router = new Router({
}, },
component: () => import('@pages/uaa/sys-usergrid-view/sys-usergrid-view.vue'), component: () => import('@pages/uaa/sys-usergrid-view/sys-usergrid-view.vue'),
}, },
{
path: '/sys_roles/:sys_role?/mpickupview/:mpickupview?',
meta: {
caption: 'entities.sys_role.views.mpickupview.caption',
parameters: [
{ pathName: 'sys_roles', parameterName: 'sys_role' },
{ pathName: 'mpickupview', parameterName: 'mpickupview' },
],
requireAuth: true,
},
component: () => import('@pages/uaa/sys-rolempickup-view/sys-rolempickup-view.vue'),
},
{ {
path: '/sys_users/:sys_user?/pickupview/:pickupview?', path: '/sys_users/:sys_user?/pickupview/:pickupview?',
meta: { meta: {
......
...@@ -1087,29 +1087,48 @@ export default class SYS_ROLE_PERMISSIONGridViewBase extends Vue { ...@@ -1087,29 +1087,48 @@ export default class SYS_ROLE_PERMISSIONGridViewBase extends Vue {
* @memberof SYS_ROLE_PERMISSIONGridView * @memberof SYS_ROLE_PERMISSIONGridView
*/ */
protected newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) { protected newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
const data: any = {}; const batchAddPSAppViews=[
let curViewParam = JSON.parse(JSON.stringify(this.context)); {view:{viewname:'sys-permissionmpickup-view',height: 0,width: 0,title: '权限表数据多项选择视图'},
if(args.length >0){ res:['SYS_PERMISSION'],'resAppKey':'sys_permissionid'},
Object.assign(curViewParam,args[0]); {view:{viewname:'sys-rolempickup-view',height: 0,width: 0,title: '角色数据多项选择视图'},
res:['SYS_ROLE'],'resAppKey':'sys_roleid'}
];
if(batchAddPSAppViews.length == 0 || !this.context.srfparentdename){
this.$Notice.warning({ title: '错误', desc: '批量添加需添加N:N关系' });
return;
} }
let deResParameters: any[] = []; let openViewModel:any = batchAddPSAppViews.find((item:any) =>{
if(curViewParam.sys_permission && true){ return (item.res && (item.res[0] !== this.context.srfparentdename));
deResParameters = [ })
{ pathName: 'sys_permissions', parameterName: 'sys_permission' }, let otherViewModel:any = batchAddPSAppViews.find((item:any) =>{
] return (item.res && (item.res[0] == this.context.srfparentdename));
})
let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, JSON.parse(JSON.stringify(this.context)), args[0]);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
} }
const parameters: any[] = [ if(result.datas && result.datas.length == 0){
{ pathName: 'sys_role_permissions', parameterName: 'sys_role_permission' }, return;
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, curViewParam, deResParameters, parameters, args, _data);
this.$router.push(routePath);
} }
openIndexViewTab(data); let requestParam:Array<any> = [];
result.datas.forEach((record:any) => {
let tempParam:any = {};
tempParam[otherViewModel.resAppKey] = this.context['srfparentkey'];
tempParam[openViewModel.resAppKey] = record.srfkey;
requestParam.push(tempParam);
});
this.appEntityService.createBatch(JSON.parse(JSON.stringify(this.context)),requestParam,true).then((response:any) =>{
if (!response || response.status !== 200) {
this.$Notice.error({ title: '错误', desc: '批处理操作失败' });
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
});
} }
......
...@@ -1087,29 +1087,48 @@ export default class SYS_USER_ROLEGridViewBase extends Vue { ...@@ -1087,29 +1087,48 @@ export default class SYS_USER_ROLEGridViewBase extends Vue {
* @memberof SYS_USER_ROLEGridView * @memberof SYS_USER_ROLEGridView
*/ */
protected newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) { protected newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
const data: any = {}; const batchAddPSAppViews=[
let curViewParam = JSON.parse(JSON.stringify(this.context)); {view:{viewname:'sys-rolempickup-view',height: 0,width: 0,title: '角色数据多项选择视图'},
if(args.length >0){ res:['SYS_ROLE'],'resAppKey':'sys_roleid'},
Object.assign(curViewParam,args[0]); {view:{viewname:'sys-usermpickup-view',height: 0,width: 0,title: '用户表数据多项选择视图'},
res:['SYS_USER'],'resAppKey':'userid'}
];
if(batchAddPSAppViews.length == 0 || !this.context.srfparentdename){
this.$Notice.warning({ title: '错误', desc: '批量添加需添加N:N关系' });
return;
} }
let deResParameters: any[] = []; let openViewModel:any = batchAddPSAppViews.find((item:any) =>{
if(curViewParam.sys_role && true){ return (item.res && (item.res[0] !== this.context.srfparentdename));
deResParameters = [ })
{ pathName: 'sys_roles', parameterName: 'sys_role' }, let otherViewModel:any = batchAddPSAppViews.find((item:any) =>{
] return (item.res && (item.res[0] == this.context.srfparentdename));
})
let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, JSON.parse(JSON.stringify(this.context)), args[0]);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
} }
const parameters: any[] = [ if(result.datas && result.datas.length == 0){
{ pathName: 'sys_user_roles', parameterName: 'sys_user_role' }, return;
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, curViewParam, deResParameters, parameters, args, _data);
this.$router.push(routePath);
} }
openIndexViewTab(data); let requestParam:Array<any> = [];
result.datas.forEach((record:any) => {
let tempParam:any = {};
tempParam[otherViewModel.resAppKey] = this.context['srfparentkey'];
tempParam[openViewModel.resAppKey] = record.srfkey;
requestParam.push(tempParam);
});
this.appEntityService.createBatch(JSON.parse(JSON.stringify(this.context)),requestParam,true).then((response:any) =>{
if (!response || response.status !== 200) {
this.$Notice.error({ title: '错误', desc: '批处理操作失败' });
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
});
} }
......
...@@ -64,6 +64,7 @@ export const viewstate: any = { ...@@ -64,6 +64,7 @@ export const viewstate: any = {
viewaction: '', viewaction: '',
viewdatachange: false, viewdatachange: false,
refviews: [ refviews: [
'fb89f9af95f2caf92ccc1249025c9a1b',
], ],
}, },
{ {
...@@ -102,6 +103,8 @@ export const viewstate: any = { ...@@ -102,6 +103,8 @@ export const viewstate: any = {
viewaction: '', viewaction: '',
viewdatachange: false, viewdatachange: false,
refviews: [ refviews: [
'61a949e3c23ebdda724888662ded1478',
'fb89f9af95f2caf92ccc1249025c9a1b',
], ],
}, },
{ {
...@@ -121,7 +124,9 @@ export const viewstate: any = { ...@@ -121,7 +124,9 @@ export const viewstate: any = {
viewaction: '', viewaction: '',
viewdatachange: false, viewdatachange: false,
refviews: [ refviews: [
'b8a97c1797a1b91fbb37f8c2d14b1fb6',
'812d0052dbbf9be1d9db9117d0988de5', '812d0052dbbf9be1d9db9117d0988de5',
'cdb0155128cac2c36012ae9692690e21',
], ],
}, },
{ {
...@@ -150,6 +155,8 @@ export const viewstate: any = { ...@@ -150,6 +155,8 @@ export const viewstate: any = {
viewaction: '', viewaction: '',
viewdatachange: false, viewdatachange: false,
refviews: [ refviews: [
'61a949e3c23ebdda724888662ded1478',
'fb89f9af95f2caf92ccc1249025c9a1b',
], ],
}, },
{ {
...@@ -239,6 +246,7 @@ export const viewstate: any = { ...@@ -239,6 +246,7 @@ export const viewstate: any = {
viewaction: '', viewaction: '',
viewdatachange: false, viewdatachange: false,
refviews: [ refviews: [
'fb89f9af95f2caf92ccc1249025c9a1b',
], ],
}, },
{ {
...@@ -357,7 +365,9 @@ export const viewstate: any = { ...@@ -357,7 +365,9 @@ export const viewstate: any = {
viewaction: '', viewaction: '',
viewdatachange: false, viewdatachange: false,
refviews: [ refviews: [
'2bc46dc8f156db2f024c1ad1b513768a',
'1ee68b6d5d4c5c9413f6874e0ccabc43', '1ee68b6d5d4c5c9413f6874e0ccabc43',
'cdb0155128cac2c36012ae9692690e21',
], ],
}, },
], ],
......
...@@ -29,6 +29,81 @@ ...@@ -29,6 +29,81 @@
</row> </row>
</app-form-group> </app-form-group>
</i-col>
<i-col v-show="detailsModel.tabpanel1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<tabs :animated="false" name='tabpanel1' v-show="detailsModel.tabpanel1.visible" class=''
:value="detailsModel.tabpanel1.activiedPage" @on-click="detailsModel.tabpanel1.clickPage($event)">
<tab-pane v-show="detailsModel.tabpage1.visible" name='tabpage1' :index="0" tab='tabpanel1' class=''
:label="(h) =>{
return h('span',{
class:'caption'
},[
$t('entities.sys_role.main_form.details.tabpage1')
])
}">
<i-col v-show="detailsModel.druipart1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-druipart
:formState="formState"
paramItem='sys_role'
:parentdata='{"srfparentdefname":"SYS_ROLEID","srfparentdename":"SYS_ROLE","SRFPARENTTYPE":"DER1N","srfparentmode":"DER1N_SYS_ROLE_PERMISSION_SYS_ROLE_SYS_ROLEID","SRFDER1NID":"DER1N_SYS_ROLE_PERMISSION_SYS_ROLE_SYS_ROLEID"}'
:parameters="[
{ pathName: 'sys_permissions', parameterName: 'sys_permission' },
]"
:context="context"
:viewparams="viewparams"
parameterName='sys_role'
parentName="SYS_ROLE"
refviewtype='DEGRIDVIEW'
refreshitems=''
:ignorefieldvaluechange="ignorefieldvaluechange"
viewname='sys-role-permissiongrid-view'
:data="JSON.stringify(this.data)"
@drdatasaved="drdatasaved($event)"
style=";overflow: auto;">
</app-form-druipart>
</i-col>
</tab-pane>
<tab-pane v-show="detailsModel.tabpage2.visible" name='tabpage2' :index="1" tab='tabpanel1' class=''
:label="(h) =>{
return h('span',{
class:'caption'
},[
$t('entities.sys_role.main_form.details.tabpage2')
])
}">
<i-col v-show="detailsModel.druipart2.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-druipart
:formState="formState"
paramItem='sys_role'
:parentdata='{"srfparentdefname":"SYS_ROLEID","srfparentdename":"SYS_ROLE","SRFPARENTTYPE":"DER1N","srfparentmode":"DER1N_SYS_USER_ROLE_SYS_ROLE_SYS_ROLEID","SRFDER1NID":"DER1N_SYS_USER_ROLE_SYS_ROLE_SYS_ROLEID"}'
:parameters="[
{ pathName: 'sys_roles', parameterName: 'sys_role' },
]"
:context="context"
:viewparams="viewparams"
parameterName='sys_role'
parentName="SYS_ROLE"
refviewtype='DEGRIDVIEW'
refreshitems=''
:ignorefieldvaluechange="ignorefieldvaluechange"
viewname='sys-user-rolegrid-view'
:data="JSON.stringify(this.data)"
@drdatasaved="drdatasaved($event)"
style=";overflow: auto;">
</app-form-druipart>
</i-col>
</tab-pane>
</tabs>
</i-col> </i-col>
...@@ -451,6 +526,16 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -451,6 +526,16 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
protected detailsModel: any = { protected detailsModel: any = {
group1: new FormGroupPanelModel({ caption: '角色表基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '', langbase: 'entities.sys_role.main_form', extractMode: 'ITEM', details: [] } }) group1: new FormGroupPanelModel({ caption: '角色表基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '', langbase: 'entities.sys_role.main_form', extractMode: 'ITEM', details: [] } })
,
druipart1: new FormDRUIPartModel({ caption: '资源', detailType: 'DRUIPART', name: 'druipart1', visible: true, isShowCaption: true, form: this })
,
tabpage1: new FormTabPageModel({ caption: '权限', detailType: 'TABPAGE', name: 'tabpage1', visible: true, isShowCaption: true, form: this })
,
druipart2: new FormDRUIPartModel({ caption: '用户', detailType: 'DRUIPART', name: 'druipart2', visible: true, isShowCaption: true, form: this })
,
tabpage2: new FormTabPageModel({ caption: '用户', detailType: 'TABPAGE', name: 'tabpage2', visible: true, isShowCaption: true, form: this })
,
tabpanel1: new FormTabPanelModel({ caption: '', detailType: 'TABPANEL', name: 'tabpanel1', visible: true, isShowCaption: false, form: this, tabPages: [{ name: 'tabpage1', index: 0, visible: true }, { name: 'tabpage2', index: 1, visible: true }] })
, ,
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this }) formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this })
, ,
...@@ -659,6 +744,11 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -659,6 +744,11 @@ export default class MainBase extends Vue implements ControlInterface {
} }
/** /**
...@@ -1168,7 +1258,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1168,7 +1258,7 @@ export default class MainBase extends Vue implements ControlInterface {
Object.assign(arg, data); Object.assign(arg, data);
Object.assign(arg, this.context); Object.assign(arg, this.context);
if (ifStateNext) { if (ifStateNext) {
this.drcounter = 0; this.drcounter = 2;
if(this.drcounter !== 0){ if(this.drcounter !== 0){
this.drsaveopt = opt; this.drsaveopt = opt;
this.formState.next({ type: 'beforesave', data: arg });//先通知关系界面保存 this.formState.next({ type: 'beforesave', data: arg });//先通知关系界面保存
......
...@@ -20,6 +20,29 @@ ...@@ -20,6 +20,29 @@
<input-box v-model="data.personname" @enter="onEnter($event)" unit="" :disabled="detailsModel.personname.disabled" type='text' style=""></input-box> <input-box v-model="data.personname" @enter="onEnter($event)" unit="" :disabled="detailsModel.personname.disabled" type='text' style=""></input-box>
</app-form-item> </app-form-item>
</i-col>
<i-col v-show="detailsModel.druipart1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-druipart
:formState="formState"
paramItem='sys_user'
:parentdata='{"srfparentdefname":"SYS_USERID","srfparentdename":"SYS_USER","SRFPARENTTYPE":"DER1N","srfparentmode":"DER1N_SYS_USER_ROLE_SYS_USER_SYS_USERID","SRFDER1NID":"DER1N_SYS_USER_ROLE_SYS_USER_SYS_USERID"}'
:parameters="[
{ pathName: 'sys_roles', parameterName: 'sys_role' },
]"
:context="context"
:viewparams="viewparams"
parameterName='sys_user'
parentName="SYS_USER"
refviewtype='DEGRIDVIEW'
refreshitems=''
:ignorefieldvaluechange="ignorefieldvaluechange"
viewname='sys-user-rolegrid-view'
:data="JSON.stringify(this.data)"
@drdatasaved="drdatasaved($event)"
style=";overflow: auto;">
</app-form-druipart>
</i-col> </i-col>
...@@ -434,6 +457,8 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -434,6 +457,8 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof Main * @memberof Main
*/ */
protected detailsModel: any = { protected detailsModel: any = {
druipart1: new FormDRUIPartModel({ caption: '', detailType: 'DRUIPART', name: 'druipart1', visible: true, isShowCaption: true, form: this })
,
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this }) formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this })
, ,
srforikey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }) srforikey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 })
...@@ -625,6 +650,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -625,6 +650,7 @@ export default class MainBase extends Vue implements ControlInterface {
} }
/** /**
...@@ -1134,7 +1160,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1134,7 +1160,7 @@ export default class MainBase extends Vue implements ControlInterface {
Object.assign(arg, data); Object.assign(arg, data);
Object.assign(arg, this.context); Object.assign(arg, this.context);
if (ifStateNext) { if (ifStateNext) {
this.drcounter = 0; this.drcounter = 1;
if(this.drcounter !== 0){ if(this.drcounter !== 0){
this.drsaveopt = opt; this.drsaveopt = opt;
this.formState.next({ type: 'beforesave', data: arg });//先通知关系界面保存 this.formState.next({ type: 'beforesave', data: arg });//先通知关系界面保存
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</createTable> </createTable>
</changeSet> </changeSet>
<!--输出实体[SYS_ROLE_PERMISSION]数据结构 --> <!--输出实体[SYS_ROLE_PERMISSION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_role_permission-44-2"> <changeSet author="a_A_5d9d78509" id="tab-sys_role_permission-48-2">
<createTable tableName="IBZROLE_PERMISSION"> <createTable tableName="IBZROLE_PERMISSION">
<column name="SYS_ROLE_PERMISSIONID" remarks="" type="VARCHAR(100)"> <column name="SYS_ROLE_PERMISSIONID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_ROLE_PERMISSION_SYS_ROL"/> <constraints primaryKey="true" primaryKeyName="PK_SYS_ROLE_PERMISSION_SYS_ROL"/>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</createTable> </createTable>
</changeSet> </changeSet>
<!--输出实体[SYS_USER]数据结构 --> <!--输出实体[SYS_USER]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_user-39-3"> <changeSet author="a_A_5d9d78509" id="tab-sys_user-42-3">
<createTable tableName="IBZUSER"> <createTable tableName="IBZUSER">
<column name="USERID" remarks="" type="VARCHAR(100)"> <column name="USERID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_USER_USERID"/> <constraints primaryKey="true" primaryKeyName="PK_SYS_USER_USERID"/>
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
</createTable> </createTable>
</changeSet> </changeSet>
<!--输出实体[SYS_USER_ROLE]数据结构 --> <!--输出实体[SYS_USER_ROLE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_user_role-33-5"> <changeSet author="a_A_5d9d78509" id="tab-sys_user_role-37-5">
<createTable tableName="IBZUSER_ROLE"> <createTable tableName="IBZUSER_ROLE">
<column name="SYS_USER_ROLEID" remarks="" type="VARCHAR(100)"> <column name="SYS_USER_ROLEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_USER_ROLE_SYS_USER_ROLE"/> <constraints primaryKey="true" primaryKeyName="PK_SYS_USER_ROLE_SYS_USER_ROLE"/>
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
</createTable> </createTable>
</changeSet> </changeSet>
<!--输出实体[SYS_PERMISSION]数据结构 --> <!--输出实体[SYS_PERMISSION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_permission-164-6"> <changeSet author="a_A_5d9d78509" id="tab-sys_permission-165-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"/>
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
</createTable> </createTable>
</changeSet> </changeSet>
<!--输出实体[SYS_ROLE]数据结构 --> <!--输出实体[SYS_ROLE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_role-47-7"> <changeSet author="a_A_5d9d78509" id="tab-sys_role-56-7">
<createTable tableName="IBZROLE"> <createTable tableName="IBZROLE">
<column name="SYS_ROLEID" remarks="" type="VARCHAR(100)"> <column name="SYS_ROLEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_ROLE_SYS_ROLEID"/> <constraints primaryKey="true" primaryKeyName="PK_SYS_ROLE_SYS_ROLEID"/>
...@@ -194,16 +194,16 @@ ...@@ -194,16 +194,16 @@
<!--输出实体[SYS_PSDEOPPRIV]外键关系 --> <!--输出实体[SYS_PSDEOPPRIV]外键关系 -->
<!--输出实体[SYS_ROLE_PERMISSION]外键关系 --> <!--输出实体[SYS_ROLE_PERMISSION]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-sys_role_permission-44-10"> <changeSet author="a_A_5d9d78509" id="fk-sys_role_permission-48-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"/> <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> </changeSet>
<!--输出实体[SYS_USER]外键关系 --> <!--输出实体[SYS_USER]外键关系 -->
<!--输出实体[SYS_PSSYSUNIRES]外键关系 --> <!--输出实体[SYS_PSSYSUNIRES]外键关系 -->
<!--输出实体[SYS_USER_ROLE]外键关系 --> <!--输出实体[SYS_USER_ROLE]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-sys_user_role-33-12"> <changeSet author="a_A_5d9d78509" id="fk-sys_user_role-37-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"/> <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> </changeSet>
<changeSet author="a_A_5d9d78509" id="fk-sys_user_role-33-13"> <changeSet author="a_A_5d9d78509" id="fk-sys_user_role-37-13">
<addForeignKeyConstraint baseColumnNames="SYS_USERID" baseTableName="IBZUSER_ROLE" constraintName="DER1N_SYS_USER_ROLE_SYS_USER_S" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="USERID" referencedTableName="IBZUSER" validate="true"/> <addForeignKeyConstraint baseColumnNames="SYS_USERID" baseTableName="IBZUSER_ROLE" constraintName="DER1N_SYS_USER_ROLE_SYS_USER_S" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="USERID" referencedTableName="IBZUSER" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[SYS_PERMISSION]外键关系 --> <!--输出实体[SYS_PERMISSION]外键关系 -->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册