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

ibiz4j 发布系统代码

上级 52d398e9
<template>
<el-breadcrumb class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb">
<template v-if="Object.is(this.navModel,'route')">
<el-breadcrumb-item v-for="(item, index) in breadcrumbs" :key="item.id">
<span v-if="index === breadcrumbs.length-1" class="no-redirect">{{ item.title }}
<span v-if="item.isselected === true">
......@@ -18,6 +19,13 @@
</span>
<a v-else @click.prevent="handleLink(item)">{{ item.title }}</a>
</el-breadcrumb-item>
</template>
<template v-if="!Object.is(this.navModel,'route')">
<el-breadcrumb-item v-for="(item, index) in breadcrumbs" :key="item.path">
<span v-if="index === breadcrumbs.length-1" class="no-redirect" >{{ $t(item.meta.caption)}}</span>
<a v-else @click.prevent="handleLink(item)" >{{ $t(item.meta.caption) }}</a>
</el-breadcrumb-item>
</template>
</transition-group>
</el-breadcrumb>
</template>
......@@ -54,6 +62,24 @@ export default class Breadcrumb extends Vue {
*/
@Prop() public indexViewTag!: string;
/**
* 导航模式
*
* @memberof Breadcrumb
*/
@Prop({default:'tab'}) public navModel?:string;
/**
* 监听路由
*
* @memberof Breadcrumb
*/
@Watch('$route')
private onRouteChange(route: Route) {
this.getBreadcrumb()
}
/**
* 导航服务事件
*
......@@ -70,12 +96,14 @@ export default class Breadcrumb extends Vue {
*/
created() {
this.getBreadcrumb();
if(Object.is(this.navModel,"route")){
this.serviceStateEvent = this.navDataService.serviceState.subscribe(({ action,name, data }:{ action:string,name:any,data:any }) => {
if (Object.is(action, 'datarefresh')) {
this.getBreadcrumb();
}
});
}
}
/**
* 获取面包屑数据
......@@ -83,8 +111,14 @@ export default class Breadcrumb extends Vue {
* @memberof Breadcrumb
*/
private getBreadcrumb() {
if(Object.is(this.navModel,"route")){
this.breadcrumbs = this.navDataService.getNavData();
this.$forceUpdate();
}else{
this.breadcrumbs = this.$route.matched.filter((item) => {
return item.meta && item.meta.caption
})
}
}
/**
......@@ -112,6 +146,7 @@ export default class Breadcrumb extends Vue {
* @memberof Breadcrumb
*/
private handleLink(item: any) {
if(Object.is(this.navModel,"route")){
// 首页
if(Object.is(item.id,this.indexViewTag)){
this.$router.push((window.sessionStorage.getItem(Environment.AppName))as string);
......@@ -122,6 +157,20 @@ export default class Breadcrumb extends Vue {
});
}
this.navDataService.removeNavData(item.id);
}else{
if(item && item.meta && item.meta.viewType && Object.is(item.meta.viewType,"APPINDEX")){
let path: string | null = window.sessionStorage.getItem(Environment.AppName);
if (path) {
this.$router.push({ path: path });
} else {
this.$router.push("/");
}
}else{
this.$router.push(item).catch(err => {
console.warn(err);
});
}
}
}
/**
......
......@@ -34,7 +34,7 @@
<div class="page-logo">
<i v-show="!collapseChange" class="ivu-icon el-icon-s-fold" @click="handleClick"></i>
<i v-show="collapseChange" class="ivu-icon el-icon-s-unfold" @click="handleClick"></i>
<app-breadcrumb v-if="Object.is(navModel,'route')" indexViewTag="index"></app-breadcrumb>
<app-breadcrumb :navModel="navModel" indexViewTag="index"></app-breadcrumb>
</div>
</div>
<div class="header-right" style="display: flex;align-items: center;justify-content: space-between;">
......@@ -511,7 +511,7 @@ export default class IndexBase extends Vue {
* @type {string}
* @memberof IndexBase
*/
public navModel:string = "route";
public navModel:string = "tab";
/**
* 抽屉状态
......
......@@ -228,6 +228,24 @@ export default class NavDataService {
}
}
/**
* 从导航数据栈中删除指定数据上层数据(不清除页面缓存)
*
* @memberof NavDataService
*/
public removeNavDataWithoutCache(id:string){
if(this.navDataStack.length >0){
let tempIndex:number = this.navDataStack.findIndex((element:NavDataElement) =>{
return Object.is(element.id,id);
})
let removeNavData = this.navDataStack.splice(tempIndex+1);
this.sessionStore.setItem('srfnavdata',JSON.stringify(this.navDataStack));
return removeNavData;
}else{
return null;
}
}
/**
* 从导航数据栈中获取指定数据
*
......
......@@ -498,7 +498,11 @@ export default class IndexBase extends Vue implements ControlInterface {
public click(item: any) {
if (item) {
let navDataService = NavDataService.getInstance(this.$store);
if(Object.is(this.navModel,"route")){
navDataService.removeNavData(this.viewtag);
}else{
navDataService.removeNavDataWithoutCache(this.viewtag);
}
switch (item.appfunctag) {
case 'Auto3':
this.clickAuto3(item);
......@@ -546,7 +550,7 @@ export default class IndexBase extends Vue implements ControlInterface {
{ pathName: 'gridview', parameterName: 'gridview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.path,path)){
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
......@@ -569,7 +573,7 @@ export default class IndexBase extends Vue implements ControlInterface {
{ pathName: 'gridview', parameterName: 'gridview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.path,path)){
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
......@@ -592,7 +596,7 @@ export default class IndexBase extends Vue implements ControlInterface {
{ pathName: 'treeexpview', parameterName: 'treeexpview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.path,path)){
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
......@@ -615,7 +619,7 @@ export default class IndexBase extends Vue implements ControlInterface {
{ pathName: 'gridview', parameterName: 'gridview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.path,path)){
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
......@@ -638,7 +642,7 @@ export default class IndexBase extends Vue implements ControlInterface {
{ pathName: 'gridview', parameterName: 'gridview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.path,path)){
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
......@@ -661,7 +665,7 @@ export default class IndexBase extends Vue implements ControlInterface {
{ pathName: 'gridview', parameterName: 'gridview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.path,path)){
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
......@@ -684,7 +688,7 @@ export default class IndexBase extends Vue implements ControlInterface {
{ pathName: 'editview', parameterName: 'editview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.path,path)){
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
......@@ -707,7 +711,7 @@ export default class IndexBase extends Vue implements ControlInterface {
{ pathName: 'treeexpview', parameterName: 'treeexpview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.path,path)){
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
......
......@@ -281,10 +281,6 @@ export default class DefaultService extends ControlService {
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.deptid = PrimaryKey;
Data.ibzdepartment = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
......@@ -294,7 +290,6 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.deptid = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
......
......@@ -46,6 +46,12 @@
margin-bottom: unset !important;
}
}
.el-table__body td{
padding:0;
}
.app-form-item{
margin-top: 20px;
}
}
.grid-pagination {
height: 50px;
......
......@@ -46,6 +46,12 @@
margin-bottom: unset !important;
}
}
.el-table__body td{
padding:0;
}
.app-form-item{
margin-top: 20px;
}
}
.grid-pagination {
height: 50px;
......
......@@ -281,10 +281,6 @@ export default class DefaultService extends ControlService {
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.userid = PrimaryKey;
Data.ibzemployee = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
......@@ -294,7 +290,6 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.userid = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
......
......@@ -46,6 +46,12 @@
margin-bottom: unset !important;
}
}
.el-table__body td{
padding:0;
}
.app-form-item{
margin-top: 20px;
}
}
.grid-pagination {
height: 50px;
......
......@@ -284,10 +284,6 @@ export default class DefaultService extends ControlService {
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.orgid = PrimaryKey;
Data.ibzorganization = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
......@@ -297,7 +293,6 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.orgid = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
......
......@@ -46,6 +46,12 @@
margin-bottom: unset !important;
}
}
.el-table__body td{
padding:0;
}
.app-form-item{
margin-top: 20px;
}
}
.grid-pagination {
height: 50px;
......
......@@ -281,10 +281,6 @@ export default class DefaultService extends ControlService {
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.logid = PrimaryKey;
Data.sysauthlog = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
......@@ -294,7 +290,6 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.logid = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
......
......@@ -46,6 +46,12 @@
margin-bottom: unset !important;
}
}
.el-table__body td{
padding:0;
}
.app-form-item{
margin-top: 20px;
}
}
.grid-pagination {
height: 50px;
......
......@@ -281,10 +281,6 @@ export default class DefaultService extends ControlService {
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.permissionid = PrimaryKey;
Data.syspermission = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
......@@ -294,7 +290,6 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.permissionid = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
......
......@@ -46,6 +46,12 @@
margin-bottom: unset !important;
}
}
.el-table__body td{
padding:0;
}
.app-form-item{
margin-top: 20px;
}
}
.grid-pagination {
height: 50px;
......
......@@ -281,10 +281,6 @@ export default class DefaultService extends ControlService {
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.roleid = PrimaryKey;
Data.sysrole = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
......@@ -294,7 +290,6 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.roleid = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
......
......@@ -46,6 +46,12 @@
margin-bottom: unset !important;
}
}
.el-table__body td{
padding:0;
}
.app-form-item{
margin-top: 20px;
}
}
.grid-pagination {
height: 50px;
......
......@@ -281,10 +281,6 @@ export default class DefaultService extends ControlService {
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.userroleid = PrimaryKey;
Data.sysuserrole = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
......@@ -294,7 +290,6 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.userroleid = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
......
......@@ -46,6 +46,12 @@
margin-bottom: unset !important;
}
}
.el-table__body td{
padding:0;
}
.app-form-item{
margin-top: 20px;
}
}
.grid-pagination {
height: 50px;
......
......@@ -281,10 +281,6 @@ export default class DefaultService extends ControlService {
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.userid = PrimaryKey;
Data.sysuser = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
......@@ -294,7 +290,6 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.userid = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
......
......@@ -46,6 +46,12 @@
margin-bottom: unset !important;
}
}
.el-table__body td{
padding:0;
}
.app-form-item{
margin-top: 20px;
}
}
.grid-pagination {
height: 50px;
......
......@@ -281,10 +281,6 @@ export default class DefaultService extends ControlService {
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.id = PrimaryKey;
Data.wfgroup = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
......@@ -294,7 +290,6 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.id = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
......
......@@ -46,6 +46,12 @@
margin-bottom: unset !important;
}
}
.el-table__body td{
padding:0;
}
.app-form-item{
margin-top: 20px;
}
}
.grid-pagination {
height: 50px;
......
......@@ -281,10 +281,6 @@ export default class DefaultService extends ControlService {
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.memberid = PrimaryKey;
Data.wfmember = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
......@@ -294,7 +290,6 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.memberid = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
......
......@@ -46,6 +46,12 @@
margin-bottom: unset !important;
}
}
.el-table__body td{
padding:0;
}
.app-form-item{
margin-top: 20px;
}
}
.grid-pagination {
height: 50px;
......
......@@ -281,10 +281,6 @@ export default class DefaultService extends ControlService {
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.definitionkey = PrimaryKey;
Data.wfprocessdefinition = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
......@@ -294,7 +290,6 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.definitionkey = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
......
......@@ -46,6 +46,12 @@
margin-bottom: unset !important;
}
}
.el-table__body td{
padding:0;
}
.app-form-item{
margin-top: 20px;
}
}
.grid-pagination {
height: 50px;
......
......@@ -281,10 +281,6 @@ export default class DefaultService extends ControlService {
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.id = PrimaryKey;
Data.wfuser = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
......@@ -294,7 +290,6 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.id = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
......
......@@ -46,6 +46,12 @@
margin-bottom: unset !important;
}
}
.el-table__body td{
padding:0;
}
.app-form-item{
margin-top: 20px;
}
}
.grid-pagination {
height: 50px;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册