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

xignzi006 发布系统代码

上级 b0b8a3d7
......@@ -287,6 +287,14 @@ export default {
},
},
gridviewtoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
......
......@@ -286,6 +286,14 @@ export default {
},
},
gridviewtoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: '新建',
tip: '新建',
},
tbitem2: {
caption: '-',
tip: '',
},
tbitem4: {
caption: '编辑',
tip: '编辑',
......
<template>
<studio-view viewName="accountinfo" viewTitle="客户信息" class='detabexpview account-info'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<view_tabexppanel
:viewState="viewState"
:viewparams="viewparams"
......
<template>
<studio-view viewName="contactgridview" viewTitle="contact表格视图" class='degridview contact-grid-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" search @on-search="onSearch($event)"/>
<template slot="toolbar">
<div class='toolbar-container'>
<i-button :title="$t('entities.contact.gridviewtoolbar_toolbar.tbitem4.tip')" v-show="toolBarModels.tbitem4.visabled" :disabled="toolBarModels.tbitem4.disabled" class='' @click="toolbar_click({ tag: 'tbitem4' }, $event)">
<i-button :title="$t('entities.contact.gridviewtoolbar_toolbar.tbitem1_openquickcreateview.tip')" v-show="toolBarModels.tbitem1_openquickcreateview.visabled" :disabled="toolBarModels.tbitem1_openquickcreateview.disabled" class='' @click="toolbar_click({ tag: 'tbitem1_openquickcreateview' }, $event)">
<i class='fa fa-file-text-o'></i>
<span class='caption'>{{$t('entities.contact.gridviewtoolbar_toolbar.tbitem1_openquickcreateview.caption')}}</span>
</i-button>
<span class='seperator'>|</span> <i-button :title="$t('entities.contact.gridviewtoolbar_toolbar.tbitem4.tip')" v-show="toolBarModels.tbitem4.visabled" :disabled="toolBarModels.tbitem4.disabled" class='' @click="toolbar_click({ tag: 'tbitem4' }, $event)">
<i class='fa fa-edit'></i>
<span class='caption'>{{$t('entities.contact.gridviewtoolbar_toolbar.tbitem4.caption')}}</span>
</i-button>
......@@ -82,6 +83,7 @@ import ContactService from '@/service/contact/contact-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import ContactUIService from '@/uiservice/contact/contact-ui-service';
import CodeListService from "@service/app/codelist-service";
......@@ -263,6 +265,9 @@ export default class ContactGridViewBase extends Vue {
* @memberof ContactGridView
*/
public toolBarModels: any = {
tbitem1_openquickcreateview: { name: 'tbitem1_openquickcreateview', caption: '新建', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenQuickCreateView', target: 'NONE' } },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem4: { name: 'tbitem4', caption: '编辑', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' } },
tbitem6: { name: 'tbitem6', caption: '拷贝', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' } },
......@@ -526,6 +531,9 @@ export default class ContactGridViewBase extends Vue {
* @memberof ContactGridViewBase
*/
public toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'tbitem1_openquickcreateview')) {
this.toolbar_tbitem1_openquickcreateview_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
......@@ -644,6 +652,35 @@ export default class ContactGridViewBase extends Vue {
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem1_openquickcreateview_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:ContactUIService = new ContactUIService();
curUIService.Contact_OpenQuickCreateView(datas,contextJO, paramJO, $event, xData,this,"Contact");
}
/**
* 逻辑事件
*
......
......@@ -92,6 +92,51 @@ export default class ContactUIServiceBase extends UIService {
public initDeMainStateMap(){
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async Contact_OpenQuickCreateView(args: any[], context:any = {} ,params: any={}, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let data: any = {};
let parentContext:any = {};
let parentViewParam:any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'NONE';
if(_this.context){
parentContext = _this.context;
}
if(_this.viewparams){
parentViewParam = _this.viewparams;
}
context = UIActionTool.handleContextParam(actionTarget,_args,parentContext,parentViewParam,context);
data = UIActionTool.handleActionParam(actionTarget,_args,parentContext,parentViewParam,params);
context = Object.assign({},actionContext.context,context);
let parentObj:any = {srfparentdename:srfParentDeName?srfParentDeName:null,srfparentkey:srfParentDeName?context[srfParentDeName.toLowerCase()]:null};
Object.assign(data,parentObj);
Object.assign(context,parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'contacts', parameterName: 'contact' },
{ pathName: 'optionview', parameterName: 'optionview' },
];
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
return null;
}
openIndexViewTab(data);
}
/**
* 获取指定数据的重定向页面
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册