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

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

上级 3ec9b83a
......@@ -581,6 +581,10 @@ export default {
usr2gridviewtoolbar_toolbar: {
},
listviewtoolbar_toolbar: {
deuiaction1: {
caption: "New",
tip: "New",
},
deuiaction3: {
caption: "Edit",
tip: "Edit {0}",
......
......@@ -580,6 +580,10 @@ export default {
usr2gridviewtoolbar_toolbar: {
},
listviewtoolbar_toolbar: {
deuiaction1: {
caption: "新建",
tip: "新建",
},
deuiaction3: {
caption: "编辑",
tip: "编辑",
......
......@@ -28,7 +28,7 @@ export default class ViewMsg9MessageServiceBase extends ViewMessageService {
this.name = "列表内置功能视图消息";
this.codename = "ViewMsg9";
this.title = "";
this.content = "此视图展示列表内置功能,包含快速搜索表单部件、快速分组、搜索栏、搜索表单部件、加载更多。";
this.content = "此视图展示列表内置功能,包含快速搜索表单部件、快速分组、搜索栏、搜索表单部件、加载更多。具体需求参数参考文档。";
this.closeMode = 0;
this.position = "TOP";
this.type = "error";
......
......@@ -34,6 +34,13 @@
<i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='pull-left' placeholder="图书名称" style='max-width: 400px;margin-top:6px;padding-left: 24px' />
<div class='pull-right'>
<div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.deuiaction1.visabled" :disabled="toolBarModels.deuiaction1.disabled" class='' @click="toolbar_click({ tag: 'deuiaction1' }, $event)">
<i class='fa fa-file-text-o'></i>
<span class='caption'>{{$t('entities.ibizbook.listviewtoolbar_toolbar.deuiaction1.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizbook.listviewtoolbar_toolbar.deuiaction1.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.deuiaction3.visabled" :disabled="toolBarModels.deuiaction3.disabled" class='' @click="toolbar_click({ tag: 'deuiaction3' }, $event)">
<i class='fa fa-edit'></i>
......@@ -323,6 +330,8 @@ export default class IBIZBOOKListViewBase extends Vue {
* @memberof IBIZBOOKListView
*/
public toolBarModels: any = {
deuiaction1: { name: 'deuiaction1', actiontarget: 'NONE', caption: '新建', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'New', target: '' } },
deuiaction3: { name: 'deuiaction3', actiontarget: 'NONE', caption: '编辑', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' } },
deuiaction2: { name: 'deuiaction2', actiontarget: 'NONE', caption: '删除', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Remove', target: 'MULTIKEY' } },
......@@ -668,6 +677,9 @@ export default class IBIZBOOKListViewBase extends Vue {
* @memberof IBIZBOOKListViewBase
*/
public toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'deuiaction1')) {
this.toolbar_deuiaction1_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction3')) {
this.toolbar_deuiaction3_click(null, '', $event2);
}
......@@ -777,6 +789,34 @@ export default class IBIZBOOKListViewBase extends Vue {
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_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.list;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"IBIZBOOK");
}
/**
* 逻辑事件
*
......@@ -941,6 +981,26 @@ export default class IBIZBOOKListViewBase extends Vue {
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZBOOKListViewBase
*/
public New(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
_this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 编辑
*
......
......@@ -9,8 +9,15 @@
<Icon type="md-arrow-dropdown" />
</span>
</i-col>
<i-col :class="getsortClass('ibizbookname')" @click.native="sortClick('ibizbookname')">
<span class="sort-field-text">{{$t('entities.ibizbook.fields.ibizbookname')}}</span>
<i-col :class="getsortClass('icon')" @click.native="sortClick('icon')">
<span class="sort-field-text">{{$t('entities.ibizbook.fields.icon')}}</span>
<span class="caret-wrapper">
<Icon type="md-arrow-dropup" />
<Icon type="md-arrow-dropdown" />
</span>
</i-col>
<i-col :class="getsortClass('subtext')" @click.native="sortClick('subtext')">
<span class="sort-field-text">{{$t('entities.ibizbook.fields.subtext')}}</span>
<span class="caret-wrapper">
<Icon type="md-arrow-dropup" />
<Icon type="md-arrow-dropdown" />
......
......@@ -20,18 +20,18 @@ export default class UsrModel {
dataType: 'TEXT',
},
{
name: 'ibizbookname',
prop: 'ibizbookname',
name: 'srficon',
prop: 'icon',
dataType: 'TEXT',
},
{
name: 'type',
prop: 'type',
name: 'srfdescription',
prop: 'subtext',
dataType: 'TEXT',
},
{
name: 'srfmajortext',
prop: 'ibizbookname',
name: 'type',
prop: 'type',
dataType: 'TEXT',
},
{
......@@ -39,6 +39,11 @@ export default class UsrModel {
prop: 'ibizbookid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'ibizbookname',
dataType: 'TEXT',
},
{
name: 'ibizbook',
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册