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

ibiz4j 发布系统代码

上级 bba74664
......@@ -86,9 +86,6 @@ import AppLockScren from './components/app-lock-scren/app-lock-scren.vue'
import ActionTimeline from './components/action-timeline/action-timeline.vue'
import CronEditor from './components/cron-editor/cron-editor.vue'
import AppMessagePopover from './components/app-message-popover/app-message-popover.vue'
import AppPanelField from './components/app-panel-field/app-panel-field.vue'
import AppPanelItem from './components/app-panel-item/app-panel-item.vue'
// 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister;
......@@ -114,8 +111,6 @@ export const AppComponents = {
v.prototype.$verify = Verify;
v.prototype.$viewTool = ViewTool;
v.prototype.$uiActionTool = UIActionTool;
v.component('app-panel-item',AppPanelItem);
v.component('app-panel-field',AppPanelField);
v.component('app-full-scren',AppFullScren);
v.component('app-lock-scren',AppLockScren);
v.component('input-box', InputBox);
......
......@@ -112,9 +112,6 @@ export default class AuthService {
* @memberof AuthService
*/
public getMenusPermission(item: any): boolean {
if(!this.$store.getters['authresource/getEnablePermissionValid']) {
return true;
}
return this.$store.getters['authresource/getAuthMenu'](item);
}
......@@ -126,9 +123,6 @@ export default class AuthService {
* @memberof AuthService
*/
public getResourcePermission(tag: any): boolean {
if(!this.$store.getters['authresource/getEnablePermissionValid']) {
return true;
}
return this.$store.getters['authresource/getResourceData'](tag);
}
......
......@@ -18,7 +18,4 @@
font-family: '微软雅黑','黑体','宋体';
font-size: 16px;
}
.progress {
margin-top: -15px;
}
}
\ No newline at end of file
<template>
<div class="app-data-upload-view" v-loading.fullscreen="isUploading" element-loading-background="rgba(57, 57, 57, 0.2)">
<div class="app-data-upload-view">
<el-row style="margin-top:24px" :gutter="20">
<el-col :span="4">
<el-button type="primary" @click="handleUpLoad">{{$t('components.appDataUploadView.selectfile')}}</el-button>
......@@ -13,7 +13,6 @@
</el-col>
</el-row>
<el-divider></el-divider>
<el-progress class="progress" v-show="isUploading" :text-inside="true" :stroke-width="14" :percentage="uploadProgress"></el-progress>
<el-row style="height:480px;padding: 0px 12px;">
<div class="data-info-content" >
<template v-if="importDataArray.length >0 && isUploading === false">
......@@ -51,7 +50,6 @@ import XLSX from 'xlsx';
import CodeListService from "@service/app/codelist-service";
import EntityService from '@/service/entity-service';
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { Environment } from '@/environments/environment';
@Component({
})
......@@ -193,22 +191,6 @@ export default class AppDataUploadView extends Vue {
* @memberof AppDataUploadView
*/
public allFieldMap:Map<string,any> = new Map();
/**
* 上传服务器数据切片数
*
* @type {number}
* @memberof AppDataUploadView
*/
public sliceUploadCnt: number = Environment.sliceUploadCnt;
/**
* 上传服务器进度条百分比
*
* @type {number}
* @memberof AppDataUploadView
*/
public uploadProgress: number = 0;
/**
* 视图参数变化
......@@ -300,29 +282,10 @@ export default class AppDataUploadView extends Vue {
this.transformData(this.importDataArray,tempDataArray);
this.hasImported = true;
this.isUploading = true;
this.uploadProgress = 0;
this.importDataArray = [];
this.sliceUploadService(tempDataArray, 0);
}
/**
* 数据切片上传
*
* @memberof AppDataUploadView
*/
public sliceUploadService(dataArray: Array<any>, cnt: number) {
if(cnt > dataArray.length) {
this.isUploading = false;
this.uploadProgress = 100;
return;
}
let sliceArray: Array<any> = [];
if(dataArray) {
sliceArray = dataArray.slice(cnt, cnt+this.sliceUploadCnt);
}
try{
this.entityService.getService(this.viewparams.serviceName).then((service:any) =>{
service.ImportData(this.viewdata,{name:this.importId,importData:sliceArray}).then((res:any) =>{
service.ImportData(this.viewdata,{name:this.importId,importData:tempDataArray}).then((res:any) =>{
const result:any = res.data;
if(result && result.rst !== 0){
this.promptInfo = (this.$t('components.appDataUploadView.importfailed') as string);
......@@ -331,8 +294,7 @@ export default class AppDataUploadView extends Vue {
}
this.importSuccessData = result.data;
this.promptInfo = (this.$t('components.appDataUploadView.completed') as string);
this.uploadProgress = Number((cnt / dataArray.length * 100).toFixed(2));
this.sliceUploadService(dataArray, cnt + this.sliceUploadCnt);
this.isUploading = false;
}).catch((error:any) =>{
this.isUploading = false;
this.promptInfo = (this.$t('components.appDataUploadView.importfailed') as string);
......@@ -349,6 +311,7 @@ export default class AppDataUploadView extends Vue {
console.error(error);
};
}
/**
* 导出excel
*
......
......@@ -41,7 +41,7 @@ export default class AppHeaderMenus extends Vue {
{
name: "ibizstudio",
title: "components.appHeaderMenus.ibizstudio.title",
url: `${Environment.StudioUrl}?#/common_mosindex/srfkeys=${Environment.SysId}`,
url: `${Environment.StudioUrl}?#/common_slnindex/srfkeys=${Environment.SlnId}/sysdesign_psdevslnsysmodeltreeexpview`,
iconcls: 'fa fa-wrench',
},
{
......
......@@ -149,7 +149,7 @@
this.getMyMsgs();
}
}).catch((error: any) => {
console.warn("加载数据错误");
this.$Notice.error({title: '错误', desc: error});
})
}
......
......@@ -65,6 +65,7 @@ export default class AppQuickGroup extends Vue {
*/
get renderArray(){
if(this.items && this.items.length >0){
this.selectedUiItem = this.items[0];
this.handleClick(this.items[0]);
return this.handleDataSet(this.items)
}else{
......@@ -144,9 +145,6 @@ export default class AppQuickGroup extends Vue {
* @memberof AppQuickGroup
*/
public handleClick($event:any,isswitch:boolean = true){
if(this.selectedUiItem && (this.selectedUiItem.id === $event.id)){
return;
}
this.$emit('valuechange',$event);
if(isswitch){
this.selectedUiItem = $event;
......
......@@ -214,8 +214,7 @@ export default class AppSpan extends Vue {
this.text = Number(number.toFixed(this.precision)).toLocaleString('en-US')+ ' '+ this.unitName;
}else if(Object.is(this.dataType,"FLOAT") || Object.is(this.dataType,"DECIMAL")){
let number:any = Number(this.value);
const decimalCnt:number = this.value.toString().split('.').length > 1 ? this.value.toString().split('.')[1].length : 0;
this.text = (Number(this.precision) === 0 && decimalCnt !== 0) ? number.toFixed(decimalCnt) : number.toFixed(this.precision);
this.text = number.toFixed(this.precision);
}else {
this.text = this.value;
}
......
......@@ -293,13 +293,12 @@ export default class ContextMenuDrag extends Vue {
mounted() {
let that: any = this;
const get: Promise<any> = this.entityService.getAllApp(null,{});
get.then((response: any) => {
get
.then((response: any) => {
if (response) {
that.list = response.data.model;
that.listFilter();
}
}).catch((error:any) =>{
console.warn("加载数据错误")
});
}
}
......
......@@ -92,14 +92,6 @@ export default class ContextMenu extends Vue {
*/
@Prop()
public menus?: any[]
/**
* 是否阻止默认绘制上下文菜单
*
* @type {any}
* @memberof ContextMenu
*/
@Prop({default:false})
public isBlocked?:any;
/**
* 显示右键菜单
......@@ -203,10 +195,7 @@ export default class ContextMenu extends Vue {
if (contextRef) {
contextRef.oncontextmenu = (event: MouseEvent) => {
event.preventDefault();
if(!this.isBlocked){
this.showContextMenu(event.clientX, event.clientY);
}
this.$emit("showContext",event);
this.showContextMenu(event.clientX, event.clientY);
};
}
}
......
import { Store } from 'vuex';
import EntityService from '@/service/entity-service';
/**
* 计数器服务基类
......@@ -18,51 +16,6 @@ export default class CounterService {
* @memberof CounterService
*/
private $store: Store<any> | null = null;
/**
* 当前计数器数据
*
* @protected
* @type {*}
* @memberof CounterService
*/
protected counterData:any ={};
/**
* 应用实体数据服务
*
* @protected
* @type {EntityService}
* @memberof CounterService
*/
protected appEntityService:EntityService = new EntityService();
/**
* 当前计数器导航上下文
*
* @protected
* @type {*}
* @memberof CounterService
*/
protected context:any ={};
/**
* 当前计数器导航参数
*
* @protected
* @type {*}
* @memberof CounterService
*/
protected viewparams:any ={};
/**
* 当前计数器定时器对象
*
* @protected
* @type {*}
* @memberof CounterService
*/
protected timer:any;
/**
* Creates an instance of CounterService.
......@@ -72,8 +25,6 @@ export default class CounterService {
*/
constructor(opts: any = {}) {
this.$store = opts.$store;
this.context = opts.context?opts.context:{};
this.viewparams = opts.viewparams?opts.viewparams:{};
}
/**
......@@ -98,13 +49,5 @@ export default class CounterService {
return (window as any)['counterServiceRegister'].getService(name);
}
/**
* 销毁计数器
*
* @memberof ActionCounterCounterServiceBase
*/
public destroyCounter(){
if(this.timer) clearInterval(this.timer);
}
}
\ No newline at end of file
......@@ -49,7 +49,6 @@ export default class WFDynaExpGridViewEngine extends GridViewEngine {
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
if (Object.is(ctrlName, 'grid')) {
this.GridEvent(eventName, args);
return;
}
super.onCtrlEvent(ctrlName, eventName, args);
}
......
......@@ -33,7 +33,6 @@ mock.onGet('/appdata').reply((config: any) => {
// 当前用户条线代码
srfsectorbc:""
},
enablepermissionvalid:false,
unires:["RESOURCE1","RESOURCE2"],
//当前用户所有组织部门标识
srforgsections:[{"srforgsectorid":"5bd1ecf4d3c31e31cb66373df56b852f","srforgsectorname":"项目一部"},{"srforgsectorid":"2ad1ecf4d3c31e31cb66373df56b852f","srforgsectorname":"项目二部"}]
......
......@@ -23,7 +23,7 @@
:filter-node-method="filterNode"
>
<template slot-scope="{ node, data }">
<context-menu :ref='data.id' :isBlocked="true" :contextMenuStyle="{width: '100%'}" :data="node" :renderContent="renderContextMenu" @showContext="showContext(data,$event)">
<context-menu :contextMenuStyle="{width: '100%'}" :data="node" :renderContent="renderContextMenu">
<tooltip transfer style="width: 100%;" max-width="2000" placement="right">
<div class="tree-node" @dblclick="doDefaultAction(node)">
<span class="icon">
......@@ -58,8 +58,6 @@ import AppCenterService from "@service/app/app-center-service";
import IBZDepartmentService from '@/service/ibzdepartment/ibzdepartment-service';
import DeptTreeService from './dept-tree-treeview-service';
import IBZDepartmentUIService from '@/uiservice/ibzdepartment/ibzdepartment-ui-service';
import { Environment } from '@/environments/environment';
import UIService from '@/uiservice/ui-service';
@Component({
......@@ -379,24 +377,6 @@ export default class DeptTreeBase extends Vue implements ControlInterface {
*/
public appStateEvent: Subscription | undefined;
/**
* 树节点上下文菜单集合
*
* @type {string[]}
* @memberof DeptTreeBase
*/
public actionModel: any = {
}
/**
* 备份树节点上下文菜单
*
* @type any
* @memberof MainTreeBase
*/
public copyActionModel:any;
/**
* 选中数据变更事件
*
......@@ -767,77 +747,14 @@ export default class DeptTreeBase extends Vue implements ControlInterface {
*/
public renderContextMenu(node: any) {
let content;
if (node && node.data) {
const data: any = JSON.parse(JSON.stringify(node.data));
this.currentselectedNode = { ...data };
const tags: string[] = data.id.split(';');
let copyActionModel:any =Util.deepCopy(this.actionModel);
}
return content;
}
/**
* 显示上下文菜单
*
* @param data 节点数据
* @param event 事件源
* @memberof DeptTreeBase
*/
public showContext(data:any,event:any){
let _this:any = this;
this.copyActionModel = {};
const tags: string[] = data.id.split(';');
Object.values(this.actionModel).forEach((item:any) =>{
if(Object.is(item.nodeOwner,tags[0])){
this.copyActionModel[item.name] = item;
}
})
if(Object.keys(this.copyActionModel).length === 0){
return;
}
this.computeNodeState(data,data.nodeType,data.appEntityName).then((result:any) => {
let flag:boolean = false;
if(Object.values(result).length>0){
flag =Object.values(result).some((item:any) =>{
return item.visabled === true;
})
}
if(flag){
(_this.$refs[data.id] as any).showContextMenu(event.clientX, event.clientY);
}
});
}
/**
* 计算节点右键权限
*
* @param {*} node 节点数据
* @param {*} nodeType 节点类型
* @param {*} appEntityName 应用实体名称
* @returns
* @memberof DeptTreeBase
*/
public async computeNodeState(node:any,nodeType:string,appEntityName:string) {
if(Object.is(nodeType,"STATIC")){
return this.copyActionModel;
}
let service:any = await this.appEntityService.getService(appEntityName);
if(this.copyActionModel && Object.keys(this.copyActionModel).length > 0) {
if(service['Get'] && service['Get'] instanceof Function){
let tempContext:any = Util.deepCopy(this.context);
tempContext[appEntityName] = node.srfkey;
let targetData = await service.Get(tempContext,{}, false);
let uiservice:any = await new UIService().getService(appEntityName);
let result: any[] = ViewTool.calcActionItemAuthState(targetData.data,this.copyActionModel,uiservice);
return this.copyActionModel;
}else{
console.warn("获取数据异常");
return this.copyActionModel;
}
}
}
/**
* 设置选中高亮
*
......
......@@ -212,7 +212,6 @@ export default class DeptTreeService extends ControlService {
Object.assign(treeNode, { curData: entity });
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
Object.assign(treeNode, { nodeType: "DE",appEntityName:"ibzdepartment" });
list.push(treeNode);
resolve(list);
bFirst = false;
......@@ -334,7 +333,6 @@ export default class DeptTreeService extends ControlService {
Object.assign(treeNode, { leaf: false });
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
Object.assign(treeNode, { nodeType: "STATIC" });
list.push(treeNode);
resolve(list);
});
......
......@@ -23,7 +23,7 @@
:filter-node-method="filterNode"
>
<template slot-scope="{ node, data }">
<context-menu :ref='data.id' :isBlocked="true" :contextMenuStyle="{width: '100%'}" :data="node" :renderContent="renderContextMenu" @showContext="showContext(data,$event)">
<context-menu :contextMenuStyle="{width: '100%'}" :data="node" :renderContent="renderContextMenu">
<tooltip transfer style="width: 100%;" max-width="2000" placement="right">
<div class="tree-node" @dblclick="doDefaultAction(node)">
<span class="icon">
......@@ -58,8 +58,6 @@ import AppCenterService from "@service/app/app-center-service";
import IBZOrganizationService from '@/service/ibzorganization/ibzorganization-service';
import OrgTreeService from './org-tree-treeview-service';
import IBZOrganizationUIService from '@/uiservice/ibzorganization/ibzorganization-ui-service';
import { Environment } from '@/environments/environment';
import UIService from '@/uiservice/ui-service';
@Component({
......@@ -379,24 +377,6 @@ export default class OrgTreeBase extends Vue implements ControlInterface {
*/
public appStateEvent: Subscription | undefined;
/**
* 树节点上下文菜单集合
*
* @type {string[]}
* @memberof OrgTreeBase
*/
public actionModel: any = {
}
/**
* 备份树节点上下文菜单
*
* @type any
* @memberof MainTreeBase
*/
public copyActionModel:any;
/**
* 选中数据变更事件
*
......@@ -767,77 +747,14 @@ export default class OrgTreeBase extends Vue implements ControlInterface {
*/
public renderContextMenu(node: any) {
let content;
if (node && node.data) {
const data: any = JSON.parse(JSON.stringify(node.data));
this.currentselectedNode = { ...data };
const tags: string[] = data.id.split(';');
let copyActionModel:any =Util.deepCopy(this.actionModel);
}
return content;
}
/**
* 显示上下文菜单
*
* @param data 节点数据
* @param event 事件源
* @memberof OrgTreeBase
*/
public showContext(data:any,event:any){
let _this:any = this;
this.copyActionModel = {};
const tags: string[] = data.id.split(';');
Object.values(this.actionModel).forEach((item:any) =>{
if(Object.is(item.nodeOwner,tags[0])){
this.copyActionModel[item.name] = item;
}
})
if(Object.keys(this.copyActionModel).length === 0){
return;
}
this.computeNodeState(data,data.nodeType,data.appEntityName).then((result:any) => {
let flag:boolean = false;
if(Object.values(result).length>0){
flag =Object.values(result).some((item:any) =>{
return item.visabled === true;
})
}
if(flag){
(_this.$refs[data.id] as any).showContextMenu(event.clientX, event.clientY);
}
});
}
/**
* 计算节点右键权限
*
* @param {*} node 节点数据
* @param {*} nodeType 节点类型
* @param {*} appEntityName 应用实体名称
* @returns
* @memberof OrgTreeBase
*/
public async computeNodeState(node:any,nodeType:string,appEntityName:string) {
if(Object.is(nodeType,"STATIC")){
return this.copyActionModel;
}
let service:any = await this.appEntityService.getService(appEntityName);
if(this.copyActionModel && Object.keys(this.copyActionModel).length > 0) {
if(service['Get'] && service['Get'] instanceof Function){
let tempContext:any = Util.deepCopy(this.context);
tempContext[appEntityName] = node.srfkey;
let targetData = await service.Get(tempContext,{}, false);
let uiservice:any = await new UIService().getService(appEntityName);
let result: any[] = ViewTool.calcActionItemAuthState(targetData.data,this.copyActionModel,uiservice);
return this.copyActionModel;
}else{
console.warn("获取数据异常");
return this.copyActionModel;
}
}
}
/**
* 设置选中高亮
*
......
......@@ -200,7 +200,6 @@ export default class OrgTreeService extends ControlService {
Object.assign(treeNode, { leaf: false });
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
Object.assign(treeNode, { nodeType: "STATIC" });
list.push(treeNode);
resolve(list);
});
......@@ -280,7 +279,6 @@ export default class OrgTreeService extends ControlService {
Object.assign(treeNode, { curData: entity });
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
Object.assign(treeNode, { nodeType: "DE",appEntityName:"ibzorganization" });
list.push(treeNode);
resolve(list);
bFirst = false;
......
......@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzou-app-web.jar
EXPOSE 30001
EXPOSE 8080
ADD ibzou-app-web.jar /ibzou-app-web.jar
......@@ -3,22 +3,9 @@ services:
ibzou-app-web:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-app-web:latest
ports:
- "30001:30001"
- "8080:8080"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
- SERVER_PORT=30001
- 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:
resources:
limits:
......
......@@ -18,6 +18,9 @@ import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import java.lang.reflect.Field;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;
/**
......@@ -109,7 +112,8 @@ public class VersionCheckAspect
*/
@SneakyThrows
private Object getDBVersion(VersionCheck versionCheck,Object service,Object id){
Object dbVersion=null;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Timestamp dbVersion=null;
String versionField=versionCheck.versionfield();
if(!ObjectUtils.isEmpty(service)){
EvaluationContext oldContext = new StandardEvaluationContext();
......@@ -117,7 +121,12 @@ public class VersionCheckAspect
oldContext.setVariable("id",id);
Expression oldExp = parser.parseExpression("#service.get(#id)");
EntityBase oldEntity =oldExp.getValue(oldContext, EntityBase.class);
return oldEntity.get(versionField);
Object oldDate=oldEntity.get(versionField);
if(oldDate!=null && oldDate instanceof Timestamp){
Timestamp db_time= (Timestamp) oldDate;
Date db_date = sdf.parse(sdf.format(db_time));
dbVersion=new Timestamp(db_date.getTime());
}
}
return dbVersion;
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册