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

tony001 发布系统代码 [后台服务,演示应用]

上级 31192118
此差异已折叠。
此差异已折叠。
......@@ -171,12 +171,22 @@ export default class AppMessagePopover extends Vue {
* 点击标签事件
*/
public handleTag(data: any) {
if (!data) return this.$message.error("未获取到标签内容");
// 拼接要打开的窗口地址
const baseUrl:any = Environment.BaseUrl;
const openUrl:any = baseUrl + `/wfcore/mytasks/${data.processDefinitionKey}/web/${data.processInstanceBusinessKey}/usertasks/${data.taskDefinitionKey}`;
// 打开新窗口
window.open(openUrl,'_blank');
if (!data) return;
const baseUrl: any = Environment.BaseUrl;
this.$http.get(baseUrl + `/wfcore/mytasks/${data.processDefinitionKey}/web/${data.processInstanceBusinessKey}/usertasks/${data.taskDefinitionKey}`).then((response: any) => {
const { status, data } = response;
if (status && status == 200) {
const url = data.substr(data.indexOf("#") + 1);
const indexPath = this.$viewTool.getIndexRoutePath(this.$route);
this.$router.push({ path: `${indexPath}${url}` });
} else {
const message = data.message ? data.message : '跳转失败';
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: message });
}
}).catch((error: any) => {
const message = error.message ? error.message : '跳转失败';
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: message });
})
}
/**
......@@ -223,5 +233,5 @@ export default class AppMessagePopover extends Vue {
</script>
<style lang='less'>
@import "app-message-popover.less";
@import "app-message-popover.less";
</style>
\ No newline at end of file
......@@ -51,7 +51,8 @@ export default class AppTodoList extends Vue {
}
}
}).catch((error: any) => {
console.warn("加载数据错误");
const message = error.message ? error.message : '加载数据错误';
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: message });
})
}
......@@ -61,11 +62,21 @@ export default class AppTodoList extends Vue {
*/
public handleClick(data: any) {
if (!data) return;
// 拼接要打开的窗口地址
const baseUrl: any = Environment.BaseUrl;
const openUrl: any = baseUrl + `/wfcore/mytasks/${data.processDefinitionKey}/web/${data.processInstanceBusinessKey}/usertasks/${data.taskDefinitionKey}`;
// 打开新窗口
window.open(openUrl, '_blank');
this.$http.get(baseUrl + `/wfcore/mytasks/${data.processDefinitionKey}/web/${data.processInstanceBusinessKey}/usertasks/${data.taskDefinitionKey}`).then((response: any) => {
const { status, data } = response;
if (status && status == 200) {
const url = data.substr(data.indexOf("#") + 1);
const indexPath = this.$viewTool.getIndexRoutePath(this.$route);
this.$router.push({ path: `${indexPath}${url}` });
} else {
const message = data.message ? data.message : '跳转失败';
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: message });
}
}).catch((error: any) => {
const message = error.message ? error.message : '跳转失败';
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: message });
})
}
}
......
......@@ -785,7 +785,7 @@ export default class IBIZSample0021Usr1114433946WFDynaEditViewBase extends Vue {
*/
public getWFLinkModel():Promise<any>{
return new Promise((resolve:any, reject:any) =>{
let datas: any[] = [];
let datas: {} = {};
if (Object.keys(this.viewparams).length > 0) {
Object.assign(datas, { 'processDefinitionKey': this.viewparams.processDefinitionKey });
Object.assign(datas, { 'taskDefinitionKey': this.viewparams.taskDefinitionKey || this.viewparams.userTaskId });
......
......@@ -968,7 +968,7 @@ export default class IBIZSample0021WFDynaEditViewBase extends Vue {
*/
public getWFLinkModel():Promise<any>{
return new Promise((resolve:any, reject:any) =>{
let datas: any[] = [];
let datas: {} = {};
if (Object.keys(this.viewparams).length > 0) {
Object.assign(datas, { 'processDefinitionKey': this.viewparams.processDefinitionKey });
Object.assign(datas, { 'taskDefinitionKey': this.viewparams.taskDefinitionKey || this.viewparams.userTaskId });
......
<template>
<div class="app-wfredirect-view app-wfredirect-view">
<div class="view-container app-wfredirect-view">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="appwfredirectview"></app-studioaction>
<card class='view-card ' :dis-hover="true" :bordered="false">
<img src="@/assets/img/redirect.svg" />
<div class="context">页面跳转中~</div>
</card>
</div>
</template>
// 基于 @VIEW/@MACRO/VIEW-BASE.vue.ftl 生成
......@@ -16,6 +20,7 @@ import { Subject,Subscription } from 'rxjs';
import UIService from '@/uiservice/ui-service';
import qs from 'qs';
@Component({
......@@ -584,23 +589,24 @@ export default class AppWFRedirectViewBase extends Vue {
*/
public isEnableWorkflow:boolean = true;
/**
* 初始化视图
*
* @memberof AppWFRedirectViewBase
*/
public async viewInit(){
const {srfkey:srfkey,srfappde:srfappde,srfworklist:srfworklist} = this.viewparams;
const uiService:UIService = new UIService();
const targetService:any = await uiService.getService(srfappde.toLowerCase());
targetService.getRDAppView(srfkey,this.isEnableWorkflow).then((res:any) =>{
if(res && res.viewname && res.srfappde){
// ?worklist=${srfworklist}
console.log('重定向之后的视图'+res.viewname);
const path:string =`/${res.srfappde}/${srfkey}/${res.viewname}`;
this.$router.push({path:path});
}else{
let { srfappkey, srfappde, userTaskId } = this.viewparams;
const uiService: UIService = new UIService();
const targetService: any = await uiService.getService(srfappde.toLowerCase());
targetService.getRDAppView(srfappkey, this.isEnableWorkflow).then((res: any) => {
if (res && res.viewname && res.srfappde) {
const indexPath = this.$viewTool.getIndexRoutePath(this.$route);
let routePath: string = `${indexPath}/${res.srfappde}/${srfappkey}/${res.viewname}`;
if (userTaskId) {
routePath = `${routePath}?${qs.stringify({ taskDefinitionKey: userTaskId }, { delimiter: ';' })}`;
}
this.$router.push({ path: routePath });
} else {
console.error("未查找到重定向视图")
}
})
......
......@@ -5,5 +5,22 @@
.app-wfredirect-view{
width:100%;
width: 100%;
height: 100%;
.view-card {
.ivu-card-body {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.context {
padding-top: 26px;
margin-left: 1em;
font-size: 24px;
font-family: ui-monospace;
}
}
}
}
......@@ -13,18 +13,34 @@ export default class UIService {
/**
* Vue 状态管理器
*
* @private
* @protected
* @type {(any | null)}
* @memberof UIService
*/
private $store: Store<any> | null = null;
protected $store: Store<any> | null = null;
/**
* 所有关联视图
*
* @memberof IBIZSample0021UIServiceBase
*/
protected allViewMap: Map<string, Object> = new Map();
/**
* 流程状态数组
*
* @protected
* @type {Array<string>}
* @memberof UIService
*/
protected InWorkflowArray: Array<string> = ['todo', 'toread'];
/**
* 所依赖权限服务
*
* @memberof UIService
*/
public authService:any;
public authService: any;
/**
* Creates an instance of UIService.
......@@ -64,13 +80,31 @@ export default class UIService {
* @param tag 资源标识
* @memberof UIService
*/
public getResourceOPPrivs(tag:any){
if(!this.authService) {
public getResourceOPPrivs(tag: any) {
if (!this.authService) {
this.authService = new AuthService(this.getStore());
}
return this.authService.getResourcePermission(this.authService.sysOPPrivsMap.get(tag))?1:0;
return this.authService.getResourcePermission(this.authService.sysOPPrivsMap.get(tag)) ? 1 : 0;
}
/**
* 获取工作流视图
*
* @memberof UIService
*/
public getWFView() {
let result = this.allViewMap.get("WFEDITVIEW:");
if (!result) {
const allViews:any = this.allViewMap.values();
for (let value of allViews) {
if(value.viewType === 'DEWFDYNAEDITVIEW'){
return value;
}
}
}else{
return result;
}
}
}
\ No newline at end of file
......@@ -1344,7 +1344,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface
*/
public async load(opt: any = {}): Promise<any> {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loadaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.loadaction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -1391,7 +1391,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface
*/
public async loadDraft(opt: any = {}): Promise<any> {
if (!this.loaddraftAction) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
return;
}
const arg: any = { ...opt } ;
......@@ -1461,7 +1461,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg,{viewparams:this.viewparams});
......@@ -1569,7 +1569,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg, { viewparams: this.viewparams });
......@@ -1661,7 +1661,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface
public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> {
return new Promise((resolve: any, reject: any) => {
if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.removeaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.removeaction') as string) });
return;
}
const arg: any = opt[0];
......
......@@ -1447,7 +1447,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
*/
public async load(opt: any = {}): Promise<any> {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loadaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.loadaction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -1494,7 +1494,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
*/
public async loadDraft(opt: any = {}): Promise<any> {
if (!this.loaddraftAction) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
return;
}
const arg: any = { ...opt } ;
......@@ -1564,7 +1564,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg,{viewparams:this.viewparams});
......@@ -1672,7 +1672,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg, { viewparams: this.viewparams });
......@@ -1764,7 +1764,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> {
return new Promise((resolve: any, reject: any) => {
if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.removeaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.removeaction') as string) });
return;
}
const arg: any = opt[0];
......
......@@ -11,51 +11,51 @@
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
},
"getPSDETreeColumns" : [ {
"caption" : "归还日期",
"codeName" : "returntime",
"caption" : "作者",
"codeName" : "author",
"columnType" : "DEFGRIDCOLUMN",
"dataItemName" : "returntime",
"name" : "returntime",
"dataItemName" : "author",
"name" : "author",
"width" : 200,
"widthUnit" : "px",
"enableExpand" : false,
"enableSort" : false
}, {
"caption" : "出版社",
"codeName" : "press",
"caption" : "图书名称",
"codeName" : "ibizbookname",
"columnType" : "DEFGRIDCOLUMN",
"dataItemName" : "press",
"name" : "press",
"dataItemName" : "ibizbookname",
"name" : "ibizbookname",
"width" : 200,
"widthUnit" : "px",
"enableExpand" : false,
"enableSort" : false
}, {
"caption" : "借出日期",
"codeName" : "lendouttime",
"caption" : "归还日期",
"codeName" : "returntime",
"columnType" : "DEFGRIDCOLUMN",
"dataItemName" : "lendouttime",
"name" : "lendouttime",
"dataItemName" : "returntime",
"name" : "returntime",
"width" : 200,
"widthUnit" : "px",
"enableExpand" : false,
"enableSort" : false
}, {
"caption" : "作者",
"codeName" : "author",
"caption" : "出版社",
"codeName" : "press",
"columnType" : "DEFGRIDCOLUMN",
"dataItemName" : "author",
"name" : "author",
"dataItemName" : "press",
"name" : "press",
"width" : 200,
"widthUnit" : "px",
"enableExpand" : false,
"enableSort" : false
}, {
"caption" : "图书名称",
"codeName" : "ibizbookname",
"caption" : "借出日期",
"codeName" : "lendouttime",
"columnType" : "DEFGRIDCOLUMN",
"dataItemName" : "ibizbookname",
"name" : "ibizbookname",
"dataItemName" : "lendouttime",
"name" : "lendouttime",
"width" : 200,
"widthUnit" : "px",
"enableExpand" : false,
......
......@@ -19,6 +19,16 @@
}
} ],
"getPSDETreeColumns" : [ {
"caption" : "图书描述",
"codeName" : "subtext",
"columnType" : "DEFGRIDCOLUMN",
"dataItemName" : "subtext",
"name" : "subtext",
"width" : 50,
"widthUnit" : "px",
"enableExpand" : false,
"enableSort" : false
}, {
"caption" : "图书名称",
"codeName" : "ibizbookname",
"columnType" : "DEFGRIDCOLUMN",
......@@ -38,16 +48,6 @@
"widthUnit" : "px",
"enableExpand" : false,
"enableSort" : false
}, {
"caption" : "图书描述",
"codeName" : "subtext",
"columnType" : "DEFGRIDCOLUMN",
"dataItemName" : "subtext",
"name" : "subtext",
"width" : 50,
"widthUnit" : "px",
"enableExpand" : false,
"enableSort" : false
} ],
"getPSDETreeNodeRSs" : [ {
"getChildPSDETreeNode" : {
......
......@@ -34,51 +34,51 @@
"id" : "GANTT"
},
"getPSDETreeColumns" : [ {
"caption" : "归还日期",
"codeName" : "returntime",
"caption" : "作者",
"codeName" : "author",
"columnType" : "DEFGRIDCOLUMN",
"dataItemName" : "returntime",
"name" : "returntime",
"dataItemName" : "author",
"name" : "author",
"width" : 200,
"widthUnit" : "px",
"enableExpand" : false,
"enableSort" : false
}, {
"caption" : "出版社",
"codeName" : "press",
"caption" : "图书名称",
"codeName" : "ibizbookname",
"columnType" : "DEFGRIDCOLUMN",
"dataItemName" : "press",
"name" : "press",
"dataItemName" : "ibizbookname",
"name" : "ibizbookname",
"width" : 200,
"widthUnit" : "px",
"enableExpand" : false,
"enableSort" : false
}, {
"caption" : "借出日期",
"codeName" : "lendouttime",
"caption" : "归还日期",
"codeName" : "returntime",
"columnType" : "DEFGRIDCOLUMN",
"dataItemName" : "lendouttime",
"name" : "lendouttime",
"dataItemName" : "returntime",
"name" : "returntime",
"width" : 200,
"widthUnit" : "px",
"enableExpand" : false,
"enableSort" : false
}, {
"caption" : "作者",
"codeName" : "author",
"caption" : "出版社",
"codeName" : "press",
"columnType" : "DEFGRIDCOLUMN",
"dataItemName" : "author",
"name" : "author",
"dataItemName" : "press",
"name" : "press",
"width" : 200,
"widthUnit" : "px",
"enableExpand" : false,
"enableSort" : false
}, {
"caption" : "图书名称",
"codeName" : "ibizbookname",
"caption" : "借出日期",
"codeName" : "lendouttime",
"columnType" : "DEFGRIDCOLUMN",
"dataItemName" : "ibizbookname",
"name" : "ibizbookname",
"dataItemName" : "lendouttime",
"name" : "lendouttime",
"width" : 200,
"widthUnit" : "px",
"enableExpand" : false,
......
......@@ -75,6 +75,16 @@
"id" : "TREEGRIDEX"
},
"getPSDETreeColumns" : [ {
"caption" : "图书描述",
"codeName" : "subtext",
"columnType" : "DEFGRIDCOLUMN",
"dataItemName" : "subtext",
"name" : "subtext",
"width" : 50,
"widthUnit" : "px",
"enableExpand" : false,
"enableSort" : false
}, {
"caption" : "图书名称",
"codeName" : "ibizbookname",
"columnType" : "DEFGRIDCOLUMN",
......@@ -94,16 +104,6 @@
"widthUnit" : "px",
"enableExpand" : false,
"enableSort" : false
}, {
"caption" : "图书描述",
"codeName" : "subtext",
"columnType" : "DEFGRIDCOLUMN",
"dataItemName" : "subtext",
"name" : "subtext",
"width" : 50,
"widthUnit" : "px",
"enableExpand" : false,
"enableSort" : false
} ],
"getPSDETreeNodeRSs" : [ {
"getChildPSDETreeNode" : {
......
......@@ -172,7 +172,7 @@
<!--输出实体[IBIZBOOK]数据结构 -->
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizbook-845-7">
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizbook-847-7">
<createTable tableName="T_IBIZBOOK">
<column name="CREATEMAN" remarks="" type="VARCHAR(60)">
</column>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册