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

zhouweidong@lab.ibiz5.com 发布系统代码

上级 94b656de
...@@ -15,12 +15,12 @@ ...@@ -15,12 +15,12 @@
"disabled": false "disabled": false
} }
, { , {
"id": "webchart", "id": "wechat",
"label": "微信开放平台", "label": "微信开放平台",
"text": "微信开放平台", "text": "微信开放平台",
"data":"", "data":"",
"codename":"Webchart", "codename":"Wechat",
"value": "webchart", "value": "wechat",
"disabled": false "disabled": false
} }
...@@ -62,12 +62,22 @@ ...@@ -62,12 +62,22 @@
"disabled": false "disabled": false
} }
, { , {
"id": "webchart-msg", "id": "aliyun-email",
"label": "阿里云邮件",
"text": "阿里云邮件",
"data":"",
"codename":"Aliyun_SUB_email",
"value": "aliyun-email",
"disabled": false
}
, {
"id": "wechat-msg",
"label": "微信消息", "label": "微信消息",
"text": "微信消息", "text": "微信消息",
"data":"", "data":"",
"codename":"Webchart_SUB_msg", "codename":"Wechat_SUB_msg",
"value": "webchart-msg", "value": "wechat-msg",
"disabled": false "disabled": false
} }
......
...@@ -81,6 +81,7 @@ import AppDepartmentSelect from './components/app-department-select/app-departme ...@@ -81,6 +81,7 @@ import AppDepartmentSelect from './components/app-department-select/app-departme
import AppGroupSelect from './components/app-group-select/app-group-select.vue' import AppGroupSelect from './components/app-group-select/app-group-select.vue'
import UpdatePwd from './components/app-update-password/app-update-password.vue' import UpdatePwd from './components/app-update-password/app-update-password.vue'
import AppMenuItem from './components/app-menu-item/app-menu-item.vue' import AppMenuItem from './components/app-menu-item/app-menu-item.vue'
import AppFullScren from './components/app-full-scren/app-full-scren.vue'
// 全局挂载UI实体服务注册中心 // 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister; window['uiServiceRegister'] = uiServiceRegister;
// 全局挂载实体权限服务注册中心 // 全局挂载实体权限服务注册中心
...@@ -105,6 +106,7 @@ export const AppComponents = { ...@@ -105,6 +106,7 @@ export const AppComponents = {
v.prototype.$verify = Verify; v.prototype.$verify = Verify;
v.prototype.$viewTool = ViewTool; v.prototype.$viewTool = ViewTool;
v.prototype.$uiActionTool = UIActionTool; v.prototype.$uiActionTool = UIActionTool;
v.component('app-full-scren',AppFullScren);
v.component('input-box', InputBox); v.component('input-box', InputBox);
v.component('app-keep-alive',AppKeepAlive); v.component('app-keep-alive',AppKeepAlive);
v.component('tab-page-exp',TabPageExp); v.component('tab-page-exp',TabPageExp);
......
import { Store } from 'vuex'; import store from '@/store';
/** /**
* 实体权限服务 * 实体权限服务
* *
...@@ -15,7 +14,16 @@ export default class AuthService { ...@@ -15,7 +14,16 @@ export default class AuthService {
* @type {(any | null)} * @type {(any | null)}
* @memberof AuthService * @memberof AuthService
*/ */
public $store: Store<any> | null = null; public $store: any;
/**
* 系统操作标识映射统一资源Map
*
* @public
* @type {Map<string,any>}
* @memberof AuthService
*/
public sysOPPrivsMap:Map<string,any> = new Map();
/** /**
* 默认操作标识 * 默认操作标识
...@@ -24,7 +32,7 @@ export default class AuthService { ...@@ -24,7 +32,7 @@ export default class AuthService {
* @type {(any)} * @type {(any)}
* @memberof AuthService * @memberof AuthService
*/ */
public defaultOPPrivs: any = { UPDATE: 1, CREATE: 1, READ: 1, DELETE: 1, WFSTART:1,DENY:1,NONE:1 }; public defaultOPPrivs: any = {CREATE: 1,DELETE: 1,DENY: 1,NONE: 1,READ: 1,UPDATE: 1,WFSTART: 1};
/** /**
* Creates an instance of AuthService. * Creates an instance of AuthService.
...@@ -33,7 +41,8 @@ export default class AuthService { ...@@ -33,7 +41,8 @@ export default class AuthService {
* @memberof AuthService * @memberof AuthService
*/ */
constructor(opts: any = {}) { constructor(opts: any = {}) {
this.$store = opts.$store; this.$store = store;
this.registerSysOPPrivs();
} }
/** /**
...@@ -42,10 +51,27 @@ export default class AuthService { ...@@ -42,10 +51,27 @@ export default class AuthService {
* @returns {(any | null)} * @returns {(any | null)}
* @memberof AuthService * @memberof AuthService
*/ */
public getStore(): Store<any> | null { public getStore(): any {
return this.$store; return this.$store;
} }
/**
* 获取计算统一资源之后的系统操作标识
*
* @returns {}
* @memberof AuthService
*/
public getSysOPPrivs(){
let copySysOPPrivs:any = JSON.parse(JSON.stringify(this.defaultOPPrivs));
if(Object.keys(copySysOPPrivs).length === 0) return {};
Object.keys(copySysOPPrivs).forEach((name:any) =>{
if(this.sysOPPrivsMap.get(name)){
copySysOPPrivs[name] = this.getResourcePermission(this.sysOPPrivsMap.get(name))?1:0;
}
})
return copySysOPPrivs;
}
/** /**
* 获取实体权限服务 * 获取实体权限服务
* *
...@@ -57,6 +83,16 @@ export default class AuthService { ...@@ -57,6 +83,16 @@ export default class AuthService {
return (window as any)['authServiceRegister'].getService(name); return (window as any)['authServiceRegister'].getService(name);
} }
/**
* 注册系统操作标识统一资源
*
* @param {string} name 实体名称
* @returns {Promise<any>}
* @memberof AuthService
*/
public registerSysOPPrivs(){
}
/** /**
* 根据当前数据获取实体操作标识 * 根据当前数据获取实体操作标识
* *
...@@ -76,7 +112,7 @@ export default class AuthService { ...@@ -76,7 +112,7 @@ export default class AuthService {
* @memberof AuthService * @memberof AuthService
*/ */
public getMenusPermission(item: any): boolean { public getMenusPermission(item: any): boolean {
return true; return this.$store.getters['authresource/getAuthMenu'](item);
} }
/** /**
...@@ -87,7 +123,7 @@ export default class AuthService { ...@@ -87,7 +123,7 @@ export default class AuthService {
* @memberof AuthService * @memberof AuthService
*/ */
public getResourcePermission(tag: any): boolean { public getResourcePermission(tag: any): boolean {
return true; return this.$store.getters['authresource/getResourceData'](tag);
} }
} }
\ No newline at end of file
...@@ -27,7 +27,7 @@ export default class MsgOpenAccessAuthServiceBase extends AuthService { ...@@ -27,7 +27,7 @@ export default class MsgOpenAccessAuthServiceBase extends AuthService {
* @memberof MsgOpenAccessAuthServiceBase * @memberof MsgOpenAccessAuthServiceBase
*/ */
public getOPPrivs(mainSateOPPrivs:any):any{ public getOPPrivs(mainSateOPPrivs:any):any{
let curDefaultOPPrivs:any = JSON.parse(JSON.stringify(this.defaultOPPrivs)); let curDefaultOPPrivs:any = this.getSysOPPrivs();
if(mainSateOPPrivs){ if(mainSateOPPrivs){
Object.assign(curDefaultOPPrivs,mainSateOPPrivs); Object.assign(curDefaultOPPrivs,mainSateOPPrivs);
} }
......
...@@ -27,7 +27,7 @@ export default class MsgTemplateAuthServiceBase extends AuthService { ...@@ -27,7 +27,7 @@ export default class MsgTemplateAuthServiceBase extends AuthService {
* @memberof MsgTemplateAuthServiceBase * @memberof MsgTemplateAuthServiceBase
*/ */
public getOPPrivs(mainSateOPPrivs:any):any{ public getOPPrivs(mainSateOPPrivs:any):any{
let curDefaultOPPrivs:any = JSON.parse(JSON.stringify(this.defaultOPPrivs)); let curDefaultOPPrivs:any = this.getSysOPPrivs();
if(mainSateOPPrivs){ if(mainSateOPPrivs){
Object.assign(curDefaultOPPrivs,mainSateOPPrivs); Object.assign(curDefaultOPPrivs,mainSateOPPrivs);
} }
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
<div class="app-actionbar"> <div class="app-actionbar">
<div class="app-actionbar-item" v-for="(item,index) in items" :key="index"> <div class="app-actionbar-item" v-for="(item,index) in items" :key="index">
<Badge v-if="item.counterService&&item.counterService.counterData" v-show="item.visabled" :count="item.counterService.counterData[item.counterId]" type="primary"> <Badge v-if="item.counterService&&item.counterService.counterData" v-show="item.visabled" :count="item.counterService.counterData[item.counterId]" type="primary">
<i-button :style="{'pointer-events':item.disabled?'none':'auto'}" @click="handleClick(item, $event)"><i v-if="item.icon" style="margin-right: 5px;" :class="item.icon"></i>{{item.actionName}}</i-button> <i-button :disabled="item.disabled" @click="handleClick(item, $event)"><i v-if="item.icon" style="margin-right: 5px;" :class="item.icon"></i>{{item.actionName}}</i-button>
</Badge> </Badge>
<i-button v-show="item.visabled" :style="{'pointer-events':item.disabled?'none':'auto'}" v-else @click="handleClick(item, $event)">{{item.actionName}}</i-button> <i-button v-show="item.visabled" :disabled="item.disabled" v-else @click="handleClick(item, $event)">{{item.actionName}}</i-button>
</div> </div>
</div> </div>
</template> </template>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</div> </div>
<template v-if="placeholder"> <template v-if="placeholder">
<div v-if="value" class="app-embed-value"> <div v-if="value" class="app-embed-value">
<span v-for="(item,index) in value" :key="index"> <span v-for="(item,index) in value.split(',')" :key="index">
{{item}} {{item}}
</span> </span>
</div> </div>
...@@ -247,19 +247,21 @@ export default class AppEmbedPicker extends Vue { ...@@ -247,19 +247,21 @@ export default class AppEmbedPicker extends Vue {
* @memberof AppEmbedPicker * @memberof AppEmbedPicker
*/ */
public setValue(item: any) { public setValue(item: any) {
let selectsrfkey: Array<any> = []; let srfkey: string = '';
let selectsrfmajortext: Array<any> = []; let srfmajortext: string = '';
if(item && Array.isArray(item)){ if(item && Array.isArray(item)){
item.forEach((select: any)=>{ item.forEach((select: any)=>{
selectsrfkey.push(select.srfkey); srfkey += select.srfkey+",";
selectsrfmajortext.push(select.srfmajortext); srfmajortext += select.srfmajortext+',';
}) })
srfkey = srfkey.substring(0,srfkey.length-1);
srfmajortext = srfmajortext.substring(0,srfmajortext.length-1);
if (this.valueItem) { if (this.valueItem) {
let value = selectsrfkey.length > 0 ? selectsrfkey : ''; let value = srfkey;
this.$emit('formitemvaluechange', { name: this.valueItem, value: value }); this.$emit('formitemvaluechange', { name: this.valueItem, value: value });
} }
if (this.name) { if (this.name) {
let value = selectsrfmajortext.length > 0 ? selectsrfmajortext : ''; let value = srfmajortext;
this.$emit('formitemvaluechange', { name: this.name, value: value }); this.$emit('formitemvaluechange', { name: this.name, value: value });
} }
} }
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</a> </a>
<dropdown-menu slot='list' v-if="uiActionGroup.details && Array.isArray(uiActionGroup.details)"> <dropdown-menu slot='list' v-if="uiActionGroup.details && Array.isArray(uiActionGroup.details)">
<dropdown-item v-for="(detail,index) in (uiActionGroup.details)" :key="index" :name="detail.name"> <dropdown-item v-for="(detail,index) in (uiActionGroup.details)" :key="index" :name="detail.name">
<span class='item' v-show="detail.visabled" :style="{'pointer-events':detail.disabled?'none':'auto'}" @click="doUIAction($event, detail)"> <span class='item' v-show="detail.visabled" :style="{'pointer-events':detail.disabled?'none':'auto','color':detail.disabled?'#7b7979':'#2d8cf0'}" @click="doUIAction($event, detail)">
<template v-if="detail.isShowIcon"> <template v-if="detail.isShowIcon">
<template v-if="detail.icon && !Object.is(detail.icon, '')"> <template v-if="detail.icon && !Object.is(detail.icon, '')">
<i :class="detail.icon" ></i> <i :class="detail.icon" ></i>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<span class='item-extract-mode'> <span class='item-extract-mode'>
<template v-if="uiActionGroup.details && Array.isArray(uiActionGroup.details)"> <template v-if="uiActionGroup.details && Array.isArray(uiActionGroup.details)">
<div v-for="(detail,index) in uiActionGroup.details" :key="index"> <div v-for="(detail,index) in uiActionGroup.details" :key="index">
<span v-show="detail.visabled" :style="{'pointer-events':detail.disabled?'none':'auto'}" class='item' @click="doUIAction($event, detail)"> <span v-show="detail.visabled" :style="{'pointer-events':detail.disabled?'none':'auto','color':detail.disabled?'#7b7979':'#2d8cf0'}" class='item' @click="doUIAction($event, detail)">
<template v-if="detail.isShowIcon"> <template v-if="detail.isShowIcon">
<template v-if="detail.icon && !Object.is(detail.icon, '')"> <template v-if="detail.icon && !Object.is(detail.icon, '')">
<i :class="detail.icon" ></i> <i :class="detail.icon" ></i>
......
<template>
<div class="fullscren">
<Icon :type="fullScren == true ? 'ios-contract' : 'ios-expand'" color="#aaa" size="22" @click="handleScreen"/>
</div>
</template>
<script lang = 'ts'>
import { Vue, Component, Prop, Model, Watch } from 'vue-property-decorator';
@Component({})
export default class AppFullScren extends Vue{
public fullScren: boolean = false;
public handleScreen(){
if(this.fullscreenEnable()){
this.exitFullScreen();
}else{
this.reqFullScreen();
}
}
/**
* 监控全屏状态和键盘
*/
public created(){
let _this = this;
window.onresize = function(){
if(_this.fullscreenEnable()){
_this.fullScren = true;
}else{
_this.fullScren = false;
}
};
window.addEventListener("keydown", this.keyDown, true);
}
/**
* 监控F11
*/
public keyDown($event: any){
if ($event.keyCode == 122) {
$event.returnValue = false;
this.fullScren = !this.fullScren;
this.handleScreen();
}
}
/**
* 浏览器判断是否全屏
*/
public fullscreenEnable(){
const isFullscreen = (document as any).isFullScreen || (document as any).mozIsFullScreen || (document as any).webkitIsFullScreen;
return isFullscreen;
}
/**
* 浏览器全屏
*/
public reqFullScreen(){
if ((document as any).documentElement.requestFullScreen) {
(document as any).documentElement.requestFullScreen();
} else if ((document as any).documentElement.webkitRequestFullScreen) {
(document as any).documentElement.webkitRequestFullScreen();
} else if ((document as any).documentElement.mozRequestFullScreen) {
(document as any).documentElement.mozRequestFullScreen();
}
};
/**
* 浏览器退出全屏
*/
public exitFullScreen(){
if ((document as any).documentElement.requestFullScreen) {
(document as any).exitFullScreen();
} else if ((document as any).documentElement.webkitRequestFullScreen) {
(document as any).webkitCancelFullScreen();
} else if ((document as any).documentElement.mozRequestFullScreen) {
(document as any).mozCancelFullScreen();
}
}
}
</script>
<style lang='less'>
.fullscren{
cursor:pointer;
padding: 0 5px;
}
.ivu-icon-ios-expand{
font-weight: bolder;
}
.ivu-icon-ios-contract{
font-weight: bolder;
}
</style>
\ No newline at end of file
import MDViewEngine from './md-view-engine';
/**
* 视图引擎基础
*
* @export
* @class TreeGridExViewEngine
* @extends {MDViewEngine}
*/
export default class TreeGridExViewEngine extends MDViewEngine {
/**
* 表格部件
*
* @type {*}
* @memberof TreeGridExViewEngine
*/
protected treegridex: any;
/**
* Creates an instance of TreeGridExViewEngine.
* @memberof TreeGridExViewEngine
*/
constructor() {
super();
}
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof TreeGridExViewEngine
*/
public init(options: any = {}): void {
this.treegridex = options.treegridex;
super.init(options);
}
/**
* 引擎加载
*
* @param {*} [opts={}]
* @memberof TreeGridExViewEngine
*/
public load(opts: any = {},isnotify:boolean=false): void {
if(!this.view.isformDruipart){
super.load(opts);
}else{
if(isnotify){
super.load(opts);
}
}
}
/**
* 部件事件
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof TreeGridExViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
if (Object.is(ctrlName, 'treegridex')) {
this.MDCtrlEvent(eventName, args);
}
super.onCtrlEvent(ctrlName, eventName, args);
}
/**
* 获取多数据部件
*
* @returns {*}
* @memberof TreeGridExViewEngine
*/
public getMDCtrl(): any {
return this.treegridex;
}
/**
* 事件处理
*
* @param {string} eventName
* @param {*} args
* @memberof TreeGridExViewEngine
*/
public MDCtrlEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'rowdblclick') && this.gridRowAllowActive(2)) {
this.doEdit(args);
return;
}
if (Object.is(eventName, 'selectionchange')) {
this.selectionChange(args);
if (this.gridRowAllowActive(1)) {
this.doEdit(args);
}
return;
}
super.MDCtrlEvent(eventName, args);
}
/**
* 表格是否被允许激活
*
* @param {number} mode
* @returns {boolean}
* @memberof TreeGridExViewEngine
*/
public gridRowAllowActive(mode: number): boolean {
return this.view.gridRowActiveMode === mode ? true : false;
}
}
\ No newline at end of file
export default { export default {
OpenAccessType: { OpenAccessType: {
"aliyun": "阿里云", "aliyun": "阿里云",
"webchart": "微信开放平台", "wechat": "微信开放平台",
"qq": "QQ互联", "qq": "QQ互联",
"dingtalk": "钉钉开放平台", "dingtalk": "钉钉开放平台",
"empty": "" "empty": ""
}, },
TemplateType: { TemplateType: {
"aliyun-sms": "阿里云短信", "aliyun-sms": "阿里云短信",
"webchart-msg": "微信消息", "aliyun-email": "阿里云邮件",
"wechat-msg": "微信消息",
"dingtalk-msg": "钉钉通知", "dingtalk-msg": "钉钉通知",
"empty": "" "empty": ""
}, },
......
export default { export default {
OpenAccessType: { OpenAccessType: {
"aliyun": "阿里云", "aliyun": "阿里云",
"webchart": "微信开放平台", "wechat": "微信开放平台",
"qq": "QQ互联", "qq": "QQ互联",
"dingtalk": "钉钉开放平台", "dingtalk": "钉钉开放平台",
"empty": "", "empty": "",
}, },
TemplateType: { TemplateType: {
"aliyun-sms": "阿里云短信", "aliyun-sms": "阿里云短信",
"webchart-msg": "微信消息", "aliyun-email": "阿里云邮件",
"wechat-msg": "微信消息",
"dingtalk-msg": "钉钉通知", "dingtalk-msg": "钉钉通知",
"empty": "", "empty": "",
}, },
......
...@@ -23,12 +23,12 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => { ...@@ -23,12 +23,12 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
disabled: false, disabled: false,
}, },
{ {
id: "webchart", id: "wechat",
label: "微信开放平台", label: "微信开放平台",
text: "微信开放平台", text: "微信开放平台",
"data":"", "data":"",
"codename":"Webchart", "codename":"Wechat",
value: "webchart", value: "wechat",
disabled: false, disabled: false,
}, },
...@@ -70,12 +70,22 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => { ...@@ -70,12 +70,22 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
disabled: false, disabled: false,
}, },
{ {
id: "webchart-msg", id: "aliyun-email",
label: "阿里云邮件",
text: "阿里云邮件",
"data":"",
"codename":"Aliyun_SUB_email",
value: "aliyun-email",
disabled: false,
},
{
id: "wechat-msg",
label: "微信消息", label: "微信消息",
text: "微信消息", text: "微信消息",
"data":"", "data":"",
"codename":"Webchart_SUB_msg", "codename":"Wechat_SUB_msg",
value: "webchart-msg", value: "wechat-msg",
disabled: false, disabled: false,
}, },
......
...@@ -11,5 +11,24 @@ export class FormButtonModel extends FormDetailModel { ...@@ -11,5 +11,24 @@ export class FormButtonModel extends FormDetailModel {
constructor(opts: any = {}) { constructor(opts: any = {}) {
super(opts); super(opts);
this.disabled = opts.disabled;
this.uiaction = opts.uiaction;
} }
/**
* 是否禁用
*
* @type {boolean}
* @memberof FormButtonModel
*/
public disabled:boolean = false;
/**
* 按钮对应的界面行为
*
* @type {*}
* @memberof FormButtonModel
*/
public uiaction:any;
} }
\ No newline at end of file
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
<app-lang style='font-size: 15px;padding: 0 10px;'></app-lang> <app-lang style='font-size: 15px;padding: 0 10px;'></app-lang>
<app-orgsector></app-orgsector> <app-orgsector></app-orgsector>
<app-user></app-user> <app-user></app-user>
<app-full-scren />
<app-theme style="width:45px;display: flex;justify-content: center;"></app-theme> <app-theme style="width:45px;display: flex;justify-content: center;"></app-theme>
</div> </div>
</header> </header>
......
...@@ -38,6 +38,10 @@ ...@@ -38,6 +38,10 @@
.el-table th { .el-table th {
padding: 5px 0; padding: 5px 0;
} }
.el-table th.gutter:last-of-type {
display: block !important;
width: 10px !important;
}
.grid .el-table__body-wrapper .el-table__row td{ .grid .el-table__body-wrapper .el-table__row td{
border-left: 1px solid rgb(245,245,245); border-left: 1px solid rgb(245,245,245);
border-top: 1px solid rgb(245,245,245); border-top: 1px solid rgb(245,245,245);
......
...@@ -1174,6 +1174,26 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1174,6 +1174,26 @@ export default class MainBase extends Vue implements ControlInterface {
this.data[name] = value; this.data[name] = value;
} }
/**
* 计算表单按钮权限状态
*
* @param {*} [data] 传入数据
* @memberof MainBase
*/
public computeButtonState(data:any){
let targetData:any = this.transformData(data);
if(this.detailsModel && Object.keys(this.detailsModel).length >0){
Object.keys(this.detailsModel).forEach((name:any) =>{
if(this.detailsModel[name] && this.detailsModel[name].uiaction && this.detailsModel[name].uiaction.dataaccaction && Object.is(this.detailsModel[name].detailType,"BUTTON")){
let tempUIAction:any = JSON.parse(JSON.stringify(this.detailsModel[name].uiaction));
ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService);
this.detailsModel[name].visible = tempUIAction.visabled;
this.detailsModel[name].disabled = tempUIAction.disabled;
}
})
}
}
/** /**
...@@ -1348,6 +1368,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1348,6 +1368,7 @@ export default class MainBase extends Vue implements ControlInterface {
const data = response.data; const data = response.data;
this.onFormLoad(data,'load'); this.onFormLoad(data,'load');
this.$emit('load', data); this.$emit('load', data);
this.computeButtonState(data);
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'load', data: data }); this.formState.next({ type: 'load', data: data });
}); });
...@@ -1391,6 +1412,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1391,6 +1412,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.onFormLoad(data,'loadDraft'); this.onFormLoad(data,'loadDraft');
data.msgopenaccess = null; data.msgopenaccess = null;
this.$emit('load', data); this.$emit('load', data);
this.computeButtonState(data);
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'load', data: data }); this.formState.next({ type: 'load', data: data });
}); });
...@@ -1448,6 +1470,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1448,6 +1470,7 @@ export default class MainBase extends Vue implements ControlInterface {
const data = response.data; const data = response.data;
this.onFormLoad(data,'autoSave'); this.onFormLoad(data,'autoSave');
this.$emit('save', data); this.$emit('save', data);
this.computeButtonState(data);
AppCenterService.notifyMessage({name:"MsgOpenAccess",action:'appRefresh',data:data}); AppCenterService.notifyMessage({name:"MsgOpenAccess",action:'appRefresh',data:data});
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'save', data: data }); this.formState.next({ type: 'save', data: data });
...@@ -1526,6 +1549,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1526,6 +1549,7 @@ export default class MainBase extends Vue implements ControlInterface {
const data = response.data; const data = response.data;
this.onFormLoad(data,'save'); this.onFormLoad(data,'save');
this.$emit('save', data); this.$emit('save', data);
this.computeButtonState(data);
AppCenterService.notifyMessage({name:"MsgOpenAccess",action:'appRefresh',data:data}); AppCenterService.notifyMessage({name:"MsgOpenAccess",action:'appRefresh',data:data});
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'save', data: data }); this.formState.next({ type: 'save', data: data });
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
:highlight-current-row ="isSingleSelect" :highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName" :row-class-name="getRowClassName"
:cell-class-name="getCellClassName" :cell-class-name="getCellClassName"
:height="isEnablePagingBar && items.length > 0 ? 'calc(100% - 50px)' : '100%'" max-height="items.length > 0 ? 'calc(100%-50px)' : '100%'"
@row-click="rowClick($event)" @row-click="rowClick($event)"
@select-all="selectAll($event)" @select-all="selectAll($event)"
@select="select($event)" @select="select($event)"
......
...@@ -67,13 +67,14 @@ ...@@ -67,13 +67,14 @@
} }
} }
.el-table__header-wrapper{ .el-table__header-wrapper{
display: contents; min-height: 45px;
} max-height: 100px;
.el-table__body-wrapper{ height: auto;
height: auto !important;
} }
.el-table__footer-wrapper{ .el-table__footer-wrapper{
display: contents; min-height: 45px;
max-height: 100px;
height: auto;
} }
} }
.grid-pagination { .grid-pagination {
......
...@@ -1216,6 +1216,26 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1216,6 +1216,26 @@ export default class MainBase extends Vue implements ControlInterface {
this.data[name] = value; this.data[name] = value;
} }
/**
* 计算表单按钮权限状态
*
* @param {*} [data] 传入数据
* @memberof MainBase
*/
public computeButtonState(data:any){
let targetData:any = this.transformData(data);
if(this.detailsModel && Object.keys(this.detailsModel).length >0){
Object.keys(this.detailsModel).forEach((name:any) =>{
if(this.detailsModel[name] && this.detailsModel[name].uiaction && this.detailsModel[name].uiaction.dataaccaction && Object.is(this.detailsModel[name].detailType,"BUTTON")){
let tempUIAction:any = JSON.parse(JSON.stringify(this.detailsModel[name].uiaction));
ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService);
this.detailsModel[name].visible = tempUIAction.visabled;
this.detailsModel[name].disabled = tempUIAction.disabled;
}
})
}
}
/** /**
...@@ -1390,6 +1410,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1390,6 +1410,7 @@ export default class MainBase extends Vue implements ControlInterface {
const data = response.data; const data = response.data;
this.onFormLoad(data,'load'); this.onFormLoad(data,'load');
this.$emit('load', data); this.$emit('load', data);
this.computeButtonState(data);
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'load', data: data }); this.formState.next({ type: 'load', data: data });
}); });
...@@ -1433,6 +1454,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1433,6 +1454,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.onFormLoad(data,'loadDraft'); this.onFormLoad(data,'loadDraft');
data.msgtemplate = null; data.msgtemplate = null;
this.$emit('load', data); this.$emit('load', data);
this.computeButtonState(data);
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'load', data: data }); this.formState.next({ type: 'load', data: data });
}); });
...@@ -1490,6 +1512,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1490,6 +1512,7 @@ export default class MainBase extends Vue implements ControlInterface {
const data = response.data; const data = response.data;
this.onFormLoad(data,'autoSave'); this.onFormLoad(data,'autoSave');
this.$emit('save', data); this.$emit('save', data);
this.computeButtonState(data);
AppCenterService.notifyMessage({name:"MsgTemplate",action:'appRefresh',data:data}); AppCenterService.notifyMessage({name:"MsgTemplate",action:'appRefresh',data:data});
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'save', data: data }); this.formState.next({ type: 'save', data: data });
...@@ -1568,6 +1591,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1568,6 +1591,7 @@ export default class MainBase extends Vue implements ControlInterface {
const data = response.data; const data = response.data;
this.onFormLoad(data,'save'); this.onFormLoad(data,'save');
this.$emit('save', data); this.$emit('save', data);
this.computeButtonState(data);
AppCenterService.notifyMessage({name:"MsgTemplate",action:'appRefresh',data:data}); AppCenterService.notifyMessage({name:"MsgTemplate",action:'appRefresh',data:data});
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'save', data: data }); this.formState.next({ type: 'save', data: data });
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
:highlight-current-row ="isSingleSelect" :highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName" :row-class-name="getRowClassName"
:cell-class-name="getCellClassName" :cell-class-name="getCellClassName"
:height="isEnablePagingBar && items.length > 0 ? 'calc(100% - 50px)' : '100%'" max-height="items.length > 0 ? 'calc(100%-50px)' : '100%'"
@row-click="rowClick($event)" @row-click="rowClick($event)"
@select-all="selectAll($event)" @select-all="selectAll($event)"
@select="select($event)" @select="select($event)"
......
...@@ -67,13 +67,14 @@ ...@@ -67,13 +67,14 @@
} }
} }
.el-table__header-wrapper{ .el-table__header-wrapper{
display: contents; min-height: 45px;
} max-height: 100px;
.el-table__body-wrapper{ height: auto;
height: auto !important;
} }
.el-table__footer-wrapper{ .el-table__footer-wrapper{
display: contents; min-height: 45px;
max-height: 100px;
height: auto;
} }
} }
.grid-pagination { .grid-pagination {
......
<?xml version="1.1" encoding="UTF-8" standalone="no"?> !!!!模版产生代码错误:----
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
<!--输出实体[MSG_OPEN_ACCESS]数据结构 --> FTL stack trace ("~" means nesting-related):
<changeSet author="a_A_5d9d78509" id="tab-msg_open_access-28-1"> - Failed at: ${dbinst.getUserName()} [in template "CODETEMPL_zh_CN" at line 28, column 24]
<createTable tableName="IBZOPENACCESS"> ----
<column name="ACCESSID" remarks="" type="VARCHAR(100)"> \ No newline at end of file
<constraints primaryKey="true" primaryKeyName="PK_MSG_OPEN_ACCESS_ACCESSID"/>
</column>
<column name="ACCESSNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="OPEN_TYPE" remarks="" type="VARCHAR(100)">
</column>
<column name="ACCESS_KEY" remarks="" type="VARCHAR(100)">
</column>
<column name="SECRET_KEY" remarks="" type="VARCHAR(100)">
</column>
<column name="REGION_ID" remarks="" type="VARCHAR(100)">
</column>
<column name="ACCESS_TOKEN" remarks="" type="VARCHAR(1000)">
</column>
<column name="EXPIRES_TIME" remarks="" type="DATETIME">
</column>
<column name="DISABLED" remarks="" type="INT">
</column>
<column name="REDIRECT_URI" remarks="" type="VARCHAR(500)">
</column>
</createTable>
</changeSet>
<!--输出实体[MSG_TEMPLATE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-msg_template-97-2">
<createTable tableName="IBZMSGTEMPL">
<column name="TID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_MSG_TEMPLATE_TID"/>
</column>
<column name="TEMPLATE_NAME" remarks="" type="VARCHAR(100)">
</column>
<column name="TEMPLATE_TYPE" remarks="" type="VARCHAR(100)">
</column>
<column name="CONTENT" remarks="" type="VARCHAR(4000)">
</column>
<column name="TEMPLATE_ID" remarks="" type="VARCHAR(100)">
</column>
<column name="TEMPLATE_URL" remarks="" type="VARCHAR(1000)">
</column>
<column name="ACCESSID" remarks="" type="VARCHAR(100)">
</column>
<column name="ACCESSNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="OPEN_TYPE" remarks="" type="VARCHAR(100)">
</column>
</createTable>
</changeSet>
<!--输出实体[MSG_USER_ACCOUNT]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-msg_user_account-9-3">
<createTable tableName="IBZUSERAUTH">
<column name="AUTHID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_MSG_USER_ACCOUNT_AUTHID"/>
</column>
<column name="USERID" remarks="" type="VARCHAR(100)">
</column>
<column name="IDENTITY_TYPE" remarks="" type="VARCHAR(100)">
</column>
<column name="IDENTIFIER" remarks="" type="VARCHAR(200)">
</column>
<column name="CREDENTIAL" remarks="" type="VARCHAR(500)">
</column>
</createTable>
</changeSet>
<!--输出实体[MSG_OPEN_ACCESS]外键关系 -->
<!--输出实体[MSG_TEMPLATE]外键关系 -->
<!--输出实体[MSG_USER_ACCOUNT]外键关系 -->
</databaseChangeLog>
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
<select id="selectById" resultMap="MsgUserAccountResultMap" databaseId="mysql"> <select id="selectById" resultMap="MsgUserAccountResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`AUTHID`, t1.`CREDENTIAL`, t1.`IDENTIFIER`, t1.`IDENTITY_TYPE`, t1.`USERID` FROM `IBZUSERAUTH` t1 ) t1 where authid=#{id}]]> <![CDATA[select t1.* from (SELECT t1.`AUTHID`, t1.`CREDENTIAL`, t1.`IDENTIFIER`, t1.`IDENTITY_TYPE`, t1.`USERID` FROM `IBZUSERAUTH` t1 ) t1 where authid=#{id}]]>
</select> </select>
<select id="selectById" resultMap="MsgUserAccountResultMap" databaseId="oracle">
<![CDATA[select t1.* from (SELECT t1.AUTHID, t1.CREDENTIAL, t1.IDENTIFIER, t1.IDENTITY_TYPE, t1.USERID FROM IBZUSERAUTH t1 ) t1 where authid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 --> <!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="MsgUserAccountResultMap" type="cn.ibizlab.core.notify.domain.MsgUserAccount" autoMapping="true"> <resultMap id="MsgUserAccountResultMap" type="cn.ibizlab.core.notify.domain.MsgUserAccount" autoMapping="true">
...@@ -31,10 +34,20 @@ ...@@ -31,10 +34,20 @@
<![CDATA[ SELECT t1.`AUTHID`, t1.`CREDENTIAL`, t1.`IDENTIFIER`, t1.`IDENTITY_TYPE`, t1.`USERID` FROM `IBZUSERAUTH` t1 <![CDATA[ SELECT t1.`AUTHID`, t1.`CREDENTIAL`, t1.`IDENTIFIER`, t1.`IDENTITY_TYPE`, t1.`USERID` FROM `IBZUSERAUTH` t1
]]> ]]>
</sql> </sql>
<!--数据查询[Default]-->
<sql id="Default" databaseId="oracle">
<![CDATA[ SELECT t1.AUTHID, t1.CREDENTIAL, t1.IDENTIFIER, t1.IDENTITY_TYPE, t1.USERID FROM IBZUSERAUTH t1
]]>
</sql>
<!--数据查询[View]--> <!--数据查询[View]-->
<sql id="View" databaseId="mysql"> <sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`AUTHID`, t1.`CREDENTIAL`, t1.`IDENTIFIER`, t1.`IDENTITY_TYPE`, t1.`USERID` FROM `IBZUSERAUTH` t1 <![CDATA[ SELECT t1.`AUTHID`, t1.`CREDENTIAL`, t1.`IDENTIFIER`, t1.`IDENTITY_TYPE`, t1.`USERID` FROM `IBZUSERAUTH` t1
]]> ]]>
</sql> </sql>
<!--数据查询[View]-->
<sql id="View" databaseId="oracle">
<![CDATA[ SELECT t1.AUTHID, t1.CREDENTIAL, t1.IDENTIFIER, t1.IDENTITY_TYPE, t1.USERID FROM IBZUSERAUTH t1
]]>
</sql>
</mapper> </mapper>
...@@ -22,9 +22,9 @@ spring: ...@@ -22,9 +22,9 @@ spring:
max-file-size: 100MB max-file-size: 100MB
max-request-size: 100MB max-request-size: 100MB
datasource: datasource:
username: a_A_5d9d78509 username: root
password: '@6dEfb3@' password: 'root'
url: jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true url: jdbc:mysql://127.0.0.1:3306/ibznotify?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.jdbc.Driver
filters: stat,wall,log4j2 filters: stat,wall,log4j2
#配置初始化大小/最小/最大 #配置初始化大小/最小/最大
...@@ -45,7 +45,7 @@ spring: ...@@ -45,7 +45,7 @@ spring:
pool-prepared-statements: false pool-prepared-statements: false
max-pool-prepared-statement-per-connection-size: 20 max-pool-prepared-statement-per-connection-size: 20
isSyncDBSchema: false isSyncDBSchema: false
defaultSchema: a_A_5d9d78509 defaultSchema: root
conf: classpath:liquibase/master.xml conf: classpath:liquibase/master.xml
#Mybatis-plus配置 #Mybatis-plus配置
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册