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

ibiz4j 发布系统代码

上级 05706856
...@@ -81,6 +81,8 @@ import AppDepartmentSelect from './components/app-department-select/app-departme ...@@ -81,6 +81,8 @@ 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'
import AppLockScren from './components/app-lock-scren/app-lock-scren.vue'
// 全局挂载UI实体服务注册中心 // 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister; window['uiServiceRegister'] = uiServiceRegister;
// 全局挂载实体权限服务注册中心 // 全局挂载实体权限服务注册中心
...@@ -105,6 +107,8 @@ export const AppComponents = { ...@@ -105,6 +107,8 @@ 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('app-lock-scren',AppLockScren);
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 WFGroupAuthServiceBase extends AuthService { ...@@ -27,7 +27,7 @@ export default class WFGroupAuthServiceBase extends AuthService {
* @memberof WFGroupAuthServiceBase * @memberof WFGroupAuthServiceBase
*/ */
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 WFMemberAuthServiceBase extends AuthService { ...@@ -27,7 +27,7 @@ export default class WFMemberAuthServiceBase extends AuthService {
* @memberof WFMemberAuthServiceBase * @memberof WFMemberAuthServiceBase
*/ */
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 WFProcessDefinitionAuthServiceBase extends AuthService { ...@@ -27,7 +27,7 @@ export default class WFProcessDefinitionAuthServiceBase extends AuthService {
* @memberof WFProcessDefinitionAuthServiceBase * @memberof WFProcessDefinitionAuthServiceBase
*/ */
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 WFREModelAuthServiceBase extends AuthService { ...@@ -27,7 +27,7 @@ export default class WFREModelAuthServiceBase extends AuthService {
* @memberof WFREModelAuthServiceBase * @memberof WFREModelAuthServiceBase
*/ */
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 WFSystemAuthServiceBase extends AuthService { ...@@ -27,7 +27,7 @@ export default class WFSystemAuthServiceBase extends AuthService {
* @memberof WFSystemAuthServiceBase * @memberof WFSystemAuthServiceBase
*/ */
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 WFTaskAuthServiceBase extends AuthService { ...@@ -27,7 +27,7 @@ export default class WFTaskAuthServiceBase extends AuthService {
* @memberof WFTaskAuthServiceBase * @memberof WFTaskAuthServiceBase
*/ */
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 WFUserAuthServiceBase extends AuthService { ...@@ -27,7 +27,7 @@ export default class WFUserAuthServiceBase extends AuthService {
* @memberof WFUserAuthServiceBase * @memberof WFUserAuthServiceBase
*/ */
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
<template>
<div class="lockscren">
<span>
<Icon type="md-lock" size="22" color="#aaa" @click="handleLock"/>
<el-dialog :title="this.$t('components.lockScren.title')"
:visible.sync="box"
width="30%"
append-to-body>
<el-form :model="form"
ref="form"
label-width="82px">
<el-form-item :label="this.$t('components.lockScren.label')"
prop="passwd"
:rules="[{ required: true, message: this.$t('components.lockScren.message')}]">
<el-input v-model="form.passwd"
:placeholder="this.$t('components.lockScren.placeholder')"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<el-button type="primary" @click="handleSetLock">{{this.$t('components.lockScren.confirmButtonText')}}</el-button>
</span>
</el-dialog>
</span>
</div>
</template>
<script lang = 'ts'>
import { Vue, Component, Prop, Model, Watch } from 'vue-property-decorator';
@Component({})
export default class AppLockScren extends Vue{
/**
* 对话框状态
*/
public box: boolean = false;
/**
* 锁屏密码
*/
public form: any = {passwd: ''};
/**
* 用户名
*/
public user: any = {name: ''};
/**
* 点击锁屏图表展示对话框
*/
public handleLock(){
this.box = true;
}
/**
* 锁屏确认
*/
public handleSetLock(){
(this.$refs["form"] as any).validate((valid: any )=> {
if (valid) {
const username = this.user.name == '' ? 'visitor' : this.user.name;
const password = window.btoa(this.form.passwd);
const routerPath = window.btoa(this.$route.path);
sessionStorage.setItem('lockPassword',password);
sessionStorage.setItem('lockState','true');
sessionStorage.setItem('userName',username);
sessionStorage.setItem('routerPath',routerPath);
this.$router.push({ path: "/lock" });
}
});
}
/**
* 获取当前用户名
*
* @memberof AppUser
*/
public mounted() {
let _user:any = {};
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context && this.$store.getters.getAppData().context.srfusername){
_user.name = this.$store.getters.getAppData().context.srfusername;
}
if(localStorage.getItem("user")){
let user:any = JSON.parse(localStorage.getItem("user") as string);
if(user && user.personname){
_user.name = user.personname;
}
}
Object.assign(this.user,_user);
}
}
</script>
<style lang='less'>
.lockscren{
cursor:pointer;
padding: 0 5px;
}
</style>
\ No newline at end of file
.lock-container {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
position: relative;
.title {
margin-bottom: 8px;
color: #333;
}
.el-icon-unlock{
font-size: 20px;
}
.el-icon-switch-button{
font-size: 20px;
}
}
.lock-container::before {
z-index: -999;
content: "";
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-image: url("/assets/img/lock_login.png");
background-size: cover;
}
.lock-form {
width: 300px;
}
\ No newline at end of file
<template>
<div class="lock-container">
<div class="lock-form animated bounceInDown">
<div class="animated">
<h3 class="title">{{username}}</h3>
<el-input :placeholder="this.$t('components.lockScren.placeholder1')"
type="password"
class="input-with-select animated"
v-model="passwd">
<el-button slot="append"
icon="el-icon-unlock"
size="25px"
@click="handleLogin"></el-button>
<el-button slot="append"
icon="el-icon-switch-button"
size="25px"
@click="handleLogout"></el-button>
</el-input>
</div>
</div>
</div>
</template>
<script lang = 'ts'>
import { Vue, Component, Prop, Model, Watch } from 'vue-property-decorator';
@Component({})
export default class AppLockIndex extends Vue{
/**
* 输入密码
*/
public passwd: string = '';
/**
* 保存的密码
*/
public lockpasswd: string = '';
/**
* 用户名
*/
public username: string = '';
/**
* 锁屏前的页面路由
*/
public path: string = '';
/**
* 获取锁屏相关信息
*
* @memberof AppLockIndex
*/
public mounted() {
this.username = (sessionStorage.getItem('userName') as string);
this.lockpasswd = window.atob(sessionStorage.getItem('lockPassword') as string);
this.path = window.atob(sessionStorage.getItem('routerPath') as string);
}
/**
* 解除锁屏
*
* @memberof AppLockIndex
*/
public handleLogin(){
if(this.lockpasswd != this.passwd){
this.passwd = '';
this.$message({
message: (this.$t('components.lockScren.message1') as string),
type: "error"
});
return;
}
this.clearSession();
this.$router.push({ path: this.path});
}
/**
* 登出
*
* @memberof AppLockIndex
*/
public handleLogout(){
this.$confirm((this.$t('components.lockScren.promptInformation') as string), (this.$t('components.lockScren.prompt') as string), {
confirmButtonText: (this.$t('components.lockScren.confirmButtonText') as string),
cancelButtonText: (this.$t('components.lockScren.cancelButtonText') as string),
type: "warning"
}).then(() => {
this.clearSession();
const get: Promise<any> = this.$http.get('/v7/logout');
get.then((response:any) =>{
if (response && response.status === 200) {
localStorage.removeItem('user');
localStorage.removeItem('token');
let leftTime = new Date();
leftTime.setTime(leftTime.getSeconds() - 1);
document.cookie = "ibzuaa-token=;expires=" + leftTime.toUTCString();
this.$router.push({ name: 'login' });
}
}).catch((error: any) =>{
console.error(error);
})
});
}
/**
* 清除锁屏时生成的session
*/
public clearSession(){
sessionStorage.removeItem('lockPassword');
sessionStorage.removeItem('lockState');
sessionStorage.removeItem('userName');
sessionStorage.removeItem('routerPath');
}
}
</script>
<style lang='less'>
@import './app-lock.less';
</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
...@@ -246,6 +246,18 @@ export default { ...@@ -246,6 +246,18 @@ export default {
localUpload:'Local upload', localUpload:'Local upload',
or:'Or', or:'Or',
imgMsg1:'Select from stock' imgMsg1:'Select from stock'
},
lockScren:{
title:'Set the password lock screen',
label:'password',
message:'The lock screen password cannot be empty',
placeholder:'Please enter the lock screen password',
placeholder1:'Please enter your login password',
message1: 'The unlock password is wrong. Please reenter it',
promptInformation:'Do you want to quit the system? Do you want to continue?',
prompt:'prompt',
confirmButtonText:'determine',
cancelButtonText:'cancel',
} }
}; };
\ No newline at end of file
...@@ -247,5 +247,17 @@ export default { ...@@ -247,5 +247,17 @@ export default {
localUpload:'本地上传', localUpload:'本地上传',
or:'或', or:'或',
imgMsg1:'从素材库选择' imgMsg1:'从素材库选择'
},
lockScren:{
title:'设置锁屏密码',
label:'锁屏密码',
message:'锁屏密码不能为空',
placeholder:'请输入锁屏密码',
placeholder1:'请输入登录密码',
message1: '解锁密码错误,请重新输入',
promptInformation:'是否退出系统, 是否继续?',
prompt:'提示',
confirmButtonText:'确定',
cancelButtonText:'取消',
} }
}; };
\ No newline at end of file
...@@ -9,6 +9,8 @@ export default { ...@@ -9,6 +9,8 @@ export default {
md5check: "校验", md5check: "校验",
bpmnfile: "BPMN", bpmnfile: "BPMN",
deploykey: "DeployKey", deploykey: "DeployKey",
webserviceids: "WebServiceIds",
mobileserviceids: "MobileServiceIds",
}, },
views: { views: {
editview: { editview: {
......
...@@ -8,6 +8,8 @@ export default { ...@@ -8,6 +8,8 @@ export default {
md5check: "校验", md5check: "校验",
bpmnfile: "BPMN", bpmnfile: "BPMN",
deploykey: "DeployKey", deploykey: "DeployKey",
webserviceids: "WebServiceIds",
mobileserviceids: "MobileServiceIds",
}, },
views: { views: {
editview: { editview: {
......
...@@ -33,6 +33,7 @@ mock.onGet('/appdata').reply((config: any) => { ...@@ -33,6 +33,7 @@ mock.onGet('/appdata').reply((config: any) => {
// 当前用户条线代码 // 当前用户条线代码
srfsectorbc:"" srfsectorbc:""
}, },
unires:["RESOURCE1","RESOURCE2"],
//当前用户所有组织部门标识 //当前用户所有组织部门标识
srforgsections:[{"srforgsectorid":"5bd1ecf4d3c31e31cb66373df56b852f","srforgsectorname":"项目一部"},{"srforgsectorid":"2ad1ecf4d3c31e31cb66373df56b852f","srforgsectorname":"项目二部"}] srforgsections:[{"srforgsectorid":"5bd1ecf4d3c31e31cb66373df56b852f","srforgsectorname":"项目一部"},{"srforgsectorid":"2ad1ecf4d3c31e31cb66373df56b852f","srforgsectorname":"项目二部"}]
}]; }];
......
...@@ -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
...@@ -50,10 +50,14 @@ Vue.use(UserComponent); ...@@ -50,10 +50,14 @@ Vue.use(UserComponent);
Vue.use(PortletComponent); Vue.use(PortletComponent);
router.beforeEach((to: any, from: any, next: any) => { router.beforeEach((to: any, from: any, next: any) => {
if(sessionStorage.getItem('lockState') && to.path != '/lock'){
next({ path: '/lock'});
}else{
if (to.meta && !to.meta.ignoreAddPage) { if (to.meta && !to.meta.ignoreAddPage) {
router.app.$store.commit('addPage', to); router.app.$store.commit('addPage', to);
} }
next(); next();
}
}); });
Interceptors.getInstance(router,store); Interceptors.getInstance(router,store);
......
...@@ -575,6 +575,20 @@ const router = new Router({ ...@@ -575,6 +575,20 @@ const router = new Router({
}, },
component: () => import('@components/login/login.vue'), component: () => import('@components/login/login.vue'),
}, },
{
path: '/lock',
name: 'lock',
meta: {
caption: '锁屏',
viewType: 'lock',
requireAuth: false,
ignoreAddPage: true,
},
beforeEnter: (to: any, from: any, next: any) => {
next();
},
component: () => import('@components/app-lock/app-lock.vue'),
},
{ {
path: '/404', path: '/404',
component: () => import('@components/404/404.vue') component: () => import('@components/404/404.vue')
......
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
<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-lock-scren />
<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);
......
...@@ -1032,6 +1032,26 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1032,6 +1032,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;
}
})
}
}
/** /**
...@@ -1206,6 +1226,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1206,6 +1226,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 });
}); });
...@@ -1249,6 +1270,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1249,6 +1270,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.onFormLoad(data,'loadDraft'); this.onFormLoad(data,'loadDraft');
data.wfgroup = null; data.wfgroup = 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 });
}); });
...@@ -1306,6 +1328,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1306,6 +1328,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:"WFGroup",action:'appRefresh',data:data}); AppCenterService.notifyMessage({name:"WFGroup",action:'appRefresh',data:data});
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'save', data: data }); this.formState.next({ type: 'save', data: data });
...@@ -1384,6 +1407,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1384,6 +1407,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:"WFGroup",action:'appRefresh',data:data}); AppCenterService.notifyMessage({name:"WFGroup",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 {
......
...@@ -1136,6 +1136,26 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1136,6 +1136,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;
}
})
}
}
/** /**
...@@ -1310,6 +1330,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1310,6 +1330,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 });
}); });
...@@ -1353,6 +1374,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1353,6 +1374,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.onFormLoad(data,'loadDraft'); this.onFormLoad(data,'loadDraft');
data.wfmember = null; data.wfmember = 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 });
}); });
...@@ -1410,6 +1432,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1410,6 +1432,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:"WFMember",action:'appRefresh',data:data}); AppCenterService.notifyMessage({name:"WFMember",action:'appRefresh',data:data});
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'save', data: data }); this.formState.next({ type: 'save', data: data });
...@@ -1488,6 +1511,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1488,6 +1511,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:"WFMember",action:'appRefresh',data:data}); AppCenterService.notifyMessage({name:"WFMember",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 {
......
...@@ -1182,6 +1182,26 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1182,6 +1182,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;
}
})
}
}
/** /**
...@@ -1356,6 +1376,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1356,6 +1376,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 });
}); });
...@@ -1399,6 +1420,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1399,6 +1420,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.onFormLoad(data,'loadDraft'); this.onFormLoad(data,'loadDraft');
data.wfprocessdefinition = null; data.wfprocessdefinition = 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 });
}); });
...@@ -1456,6 +1478,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1456,6 +1478,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:"WFProcessDefinition",action:'appRefresh',data:data}); AppCenterService.notifyMessage({name:"WFProcessDefinition",action:'appRefresh',data:data});
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'save', data: data }); this.formState.next({ type: 'save', data: data });
...@@ -1534,6 +1557,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1534,6 +1557,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:"WFProcessDefinition",action:'appRefresh',data:data}); AppCenterService.notifyMessage({name:"WFProcessDefinition",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 {
......
...@@ -959,6 +959,26 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -959,6 +959,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;
}
})
}
}
/** /**
...@@ -1133,6 +1153,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1133,6 +1153,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 });
}); });
...@@ -1176,6 +1197,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1176,6 +1197,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.onFormLoad(data,'loadDraft'); this.onFormLoad(data,'loadDraft');
data.wfremodel = null; data.wfremodel = 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 });
}); });
...@@ -1233,6 +1255,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1233,6 +1255,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:"WFREModel",action:'appRefresh',data:data}); AppCenterService.notifyMessage({name:"WFREModel",action:'appRefresh',data:data});
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'save', data: data }); this.formState.next({ type: 'save', data: data });
...@@ -1311,6 +1334,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1311,6 +1334,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:"WFREModel",action:'appRefresh',data:data}); AppCenterService.notifyMessage({name:"WFREModel",action:'appRefresh',data:data});
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'save', data: data }); this.formState.next({ type: 'save', data: data });
......
...@@ -969,6 +969,26 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -969,6 +969,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;
}
})
}
}
/** /**
...@@ -1143,6 +1163,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1143,6 +1163,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 });
}); });
...@@ -1186,6 +1207,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1186,6 +1207,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.onFormLoad(data,'loadDraft'); this.onFormLoad(data,'loadDraft');
data.wftask = null; data.wftask = 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 });
}); });
...@@ -1243,6 +1265,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1243,6 +1265,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:"WFTask",action:'appRefresh',data:data}); AppCenterService.notifyMessage({name:"WFTask",action:'appRefresh',data:data});
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'save', data: data }); this.formState.next({ type: 'save', data: data });
...@@ -1321,6 +1344,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1321,6 +1344,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:"WFTask",action:'appRefresh',data:data}); AppCenterService.notifyMessage({name:"WFTask",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 {
......
...@@ -1002,6 +1002,26 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1002,6 +1002,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;
}
})
}
}
/** /**
...@@ -1176,6 +1196,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1176,6 +1196,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 });
}); });
...@@ -1219,6 +1240,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1219,6 +1240,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.onFormLoad(data,'loadDraft'); this.onFormLoad(data,'loadDraft');
data.wfuser = null; data.wfuser = 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 });
}); });
...@@ -1276,6 +1298,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1276,6 +1298,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:"WFUser",action:'appRefresh',data:data}); AppCenterService.notifyMessage({name:"WFUser",action:'appRefresh',data:data});
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'save', data: data }); this.formState.next({ type: 'save', data: data });
...@@ -1354,6 +1377,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1354,6 +1377,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:"WFUser",action:'appRefresh',data:data}); AppCenterService.notifyMessage({name:"WFUser",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 {
......
...@@ -37,11 +37,6 @@ ...@@ -37,11 +37,6 @@
git clone -b master $para2 ibzwf/ git clone -b master $para2 ibzwf/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd ibzwf/ cd ibzwf/
mvn clean package -Papi
cd ibzwf-provider/ibzwf-provider-api
mvn -Papi docker:build
mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzwf-provider-api.yaml ibzlab-rt --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
...@@ -97,6 +97,20 @@ public class WFProcessDefinition extends EntityMP implements Serializable { ...@@ -97,6 +97,20 @@ public class WFProcessDefinition extends EntityMP implements Serializable {
@JSONField(name = "deploykey") @JSONField(name = "deploykey")
@JsonProperty("deploykey") @JsonProperty("deploykey")
private String deploykey; private String deploykey;
/**
* WebServiceIds
*/
@TableField(value = "webserviceids")
@JSONField(name = "webserviceids")
@JsonProperty("webserviceids")
private String webserviceids;
/**
* MobileServiceIds
*/
@TableField(value = "mobileserviceids")
@JSONField(name = "mobileserviceids")
@JsonProperty("mobileserviceids")
private String mobileserviceids;
...@@ -156,6 +170,22 @@ public class WFProcessDefinition extends EntityMP implements Serializable { ...@@ -156,6 +170,22 @@ public class WFProcessDefinition extends EntityMP implements Serializable {
this.modify("deploykey",deploykey); this.modify("deploykey",deploykey);
} }
/**
* 设置 [WebServiceIds]
*/
public void setWebserviceids(String webserviceids){
this.webserviceids = webserviceids ;
this.modify("webserviceids",webserviceids);
}
/**
* 设置 [MobileServiceIds]
*/
public void setMobileserviceids(String mobileserviceids){
this.mobileserviceids = mobileserviceids ;
this.modify("mobileserviceids",mobileserviceids);
}
} }
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<!--输出实体[WF_DEFINITION]数据结构 --> <!--输出实体[WF_DEFINITION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-wf_definition-58-3"> <changeSet author="a_A_5d9d78509" id="tab-wf_definition-60-3">
<createTable tableName="IBZWFDEFINITION"> <createTable tableName="IBZWFDEFINITION">
<column name="DEFINITIONKEY" remarks="" type="VARCHAR(100)"> <column name="DEFINITIONKEY" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_WF_DEFINITION_DEFINITIONKEY"/> <constraints primaryKey="true" primaryKeyName="PK_WF_DEFINITION_DEFINITIONKEY"/>
...@@ -55,6 +55,10 @@ ...@@ -55,6 +55,10 @@
</column> </column>
<column name="DEPLOYKEY" remarks="" type="VARCHAR(100)"> <column name="DEPLOYKEY" remarks="" type="VARCHAR(100)">
</column> </column>
<column name="WEBSERVICEIDS" remarks="" type="VARCHAR(200)">
</column>
<column name="MOBILESERVICEIDS" remarks="" type="VARCHAR(200)">
</column>
</createTable> </createTable>
</changeSet> </changeSet>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性--> <!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="WFProcessDefinitionResultMap" databaseId="mysql"> <select id="selectById" resultMap="WFProcessDefinitionResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`BPMNFILE`, t1.`DEFINITIONKEY`, t1.`DEFINITIONNAME`, t1.`DEPLOYKEY`, t1.`MD5CHECK`, t1.`MODELENABLE`, t1.`MODELVERSION`, t1.`PSSYSTEMID` FROM `IBZWFDEFINITION` t1 ) t1 where definitionkey=#{id}]]> <![CDATA[select t1.* from (SELECT t1.`BPMNFILE`, t1.`DEFINITIONKEY`, t1.`DEFINITIONNAME`, t1.`DEPLOYKEY`, t1.`MD5CHECK`, t1.`MOBILESERVICEIDS`, t1.`MODELENABLE`, t1.`MODELVERSION`, t1.`PSSYSTEMID`, t1.`WEBSERVICEIDS` FROM `IBZWFDEFINITION` t1 ) t1 where definitionkey=#{id}]]>
</select> </select>
<select id="selectById" resultMap="WFProcessDefinitionResultMap" databaseId="oracle"> <select id="selectById" resultMap="WFProcessDefinitionResultMap" databaseId="oracle">
<![CDATA[select t1.* from (SELECT t1.BPMNFILE, t1.DEFINITIONKEY, t1.DEFINITIONNAME, t1.DEPLOYKEY, t1.MD5CHECK, t1.MODELENABLE, t1.MODELVERSION, t1.PSSYSTEMID FROM IBZWFDEFINITION t1 ) t1 where definitionkey=#{id}]]> <![CDATA[select t1.* from (SELECT t1.BPMNFILE, t1.DEFINITIONKEY, t1.DEFINITIONNAME, t1.DEPLOYKEY, t1.MD5CHECK, t1.MODELENABLE, t1.MODELVERSION, t1.PSSYSTEMID FROM IBZWFDEFINITION t1 ) t1 where definitionkey=#{id}]]>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<!--数据查询[Default]--> <!--数据查询[Default]-->
<sql id="Default" databaseId="mysql"> <sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`BPMNFILE`, t1.`DEFINITIONKEY`, t1.`DEFINITIONNAME`, t1.`DEPLOYKEY`, t1.`MD5CHECK`, t1.`MODELENABLE`, t1.`MODELVERSION`, t1.`PSSYSTEMID` FROM `IBZWFDEFINITION` t1 <![CDATA[ SELECT t1.`BPMNFILE`, t1.`DEFINITIONKEY`, t1.`DEFINITIONNAME`, t1.`DEPLOYKEY`, t1.`MD5CHECK`, t1.`MOBILESERVICEIDS`, t1.`MODELENABLE`, t1.`MODELVERSION`, t1.`PSSYSTEMID`, t1.`WEBSERVICEIDS` FROM `IBZWFDEFINITION` t1
]]> ]]>
</sql> </sql>
<!--数据查询[Default]--> <!--数据查询[Default]-->
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</sql> </sql>
<!--数据查询[View]--> <!--数据查询[View]-->
<sql id="View" databaseId="mysql"> <sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`BPMNFILE`, t1.`DEFINITIONKEY`, t1.`DEFINITIONNAME`, t1.`DEPLOYKEY`, t1.`MD5CHECK`, t1.`MODELENABLE`, t1.`MODELVERSION`, t1.`PSSYSTEMID` FROM `IBZWFDEFINITION` t1 <![CDATA[ SELECT t1.`BPMNFILE`, t1.`DEFINITIONKEY`, t1.`DEFINITIONNAME`, t1.`DEPLOYKEY`, t1.`MD5CHECK`, t1.`MOBILESERVICEIDS`, t1.`MODELENABLE`, t1.`MODELVERSION`, t1.`PSSYSTEMID`, t1.`WEBSERVICEIDS` FROM `IBZWFDEFINITION` t1
]]> ]]>
</sql> </sql>
<!--数据查询[View]--> <!--数据查询[View]-->
......
...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \ ...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \ sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzwf-provider-api.jar java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzwf-provider-api.jar
EXPOSE 40003 EXPOSE 8081
ADD ibzwf-provider-api.jar /ibzwf-provider-api.jar ADD ibzwf-provider-api.jar /ibzwf-provider-api.jar
...@@ -3,22 +3,9 @@ services: ...@@ -3,22 +3,9 @@ services:
ibzwf-provider-api: ibzwf-provider-api:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzwf-provider-api:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzwf-provider-api:latest
ports: ports:
- "40003:40003" - "8081:8081"
networks: networks:
- agent_network - agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
- SERVER_PORT=40003
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211:8848
- SPRING_REDIS_HOST=172.16.100.243
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
- SPRING_DATASOURCE_PASSWORD=@6dEfb3@
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
- NACOS=172.16.102.211:8848
deploy: deploy:
resources: resources:
limits: limits:
......
...@@ -88,6 +88,22 @@ public class WFProcessDefinitionDTO extends DTOBase implements Serializable { ...@@ -88,6 +88,22 @@ public class WFProcessDefinitionDTO extends DTOBase implements Serializable {
@JsonProperty("deploykey") @JsonProperty("deploykey")
private String deploykey; private String deploykey;
/**
* 属性 [WEBSERVICEIDS]
*
*/
@JSONField(name = "webserviceids")
@JsonProperty("webserviceids")
private String webserviceids;
/**
* 属性 [MOBILESERVICEIDS]
*
*/
@JSONField(name = "mobileserviceids")
@JsonProperty("mobileserviceids")
private String mobileserviceids;
/** /**
* 设置 [DEFINITIONNAME] * 设置 [DEFINITIONNAME]
...@@ -145,6 +161,22 @@ public class WFProcessDefinitionDTO extends DTOBase implements Serializable { ...@@ -145,6 +161,22 @@ public class WFProcessDefinitionDTO extends DTOBase implements Serializable {
this.modify("deploykey",deploykey); this.modify("deploykey",deploykey);
} }
/**
* 设置 [WEBSERVICEIDS]
*/
public void setWebserviceids(String webserviceids){
this.webserviceids = webserviceids ;
this.modify("webserviceids",webserviceids);
}
/**
* 设置 [MOBILESERVICEIDS]
*/
public void setMobileserviceids(String mobileserviceids){
this.mobileserviceids = mobileserviceids ;
this.modify("mobileserviceids",mobileserviceids);
}
} }
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册