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

xignzi006 发布系统代码

上级 a86df867
<studio-view-style2 viewName="metriceditview" viewTitle="目标度量信息" class='deeditview metric-edit-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<view_form
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="true"
updateAction="Update"
removeAction="Remove"
loaddraftAction="GetDraft"
loadAction="Get"
createAction="Create"
WFSubmitAction=""
WFStartAction=""
style=''
name="form"
ref='form'
@save="form_save($event)"
@remove="form_remove($event)"
@load="form_load($event)"
@closeview="closeView($event)">
</view_form>
</studio-view-style2>
\ No newline at end of file
<template src="./metric-edit-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { MetricEditViewBase } from './metric-edit-view-base';
import view_form from '@widgets/metric/main-form/main-form.vue';
/**
* 目标度量信息视图
*
* @export
* @class MetricEditView
* @extends {MetricEditViewBase}
*/
@Component({
components: {
view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class MetricEditView extends MetricEditViewBase { }
</script>
<studio-view-style2 viewName="metricgridview" viewTitle="目标度量信息" class='degridview metric-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">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<template slot="searchForm">
<view_searchform
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
name="searchform"
ref='searchform'
@save="searchform_save($event)"
@search="searchform_search($event)"
@load="searchform_load($event)"
@closeview="closeView($event)">
</view_searchform>
</template>
<view_grid
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:isSingleSelect="isSingleSelect"
:showBusyIndicator="true"
:isOpenEdit="false"
:gridRowActiveMode="gridRowActiveMode"
@save="onSave"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchDefault"
:newdata="newdata"
:opendata="opendata"
name="grid"
ref='grid'
@selectionchange="grid_selectionchange($event)"
@beforeload="grid_beforeload($event)"
@rowdblclick="grid_rowdblclick($event)"
@remove="grid_remove($event)"
@load="grid_load($event)"
@closeview="closeView($event)">
</view_grid>
</studio-view-style2>
\ No newline at end of file
<template src="./metric-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { MetricGridViewBase } from './metric-grid-view-base';
import view_grid from '@widgets/metric/main-grid/main-grid.vue';
import view_searchform from '@widgets/metric/default-searchform/default-searchform.vue';
/**
* 目标度量信息视图
*
* @export
* @class MetricGridView
* @extends {MetricGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class MetricGridView extends MetricGridViewBase { }
</script>
......@@ -150,7 +150,6 @@ export const PageComponents = {
Vue.component('goal-summary-view', () => import('@pages/sales/goal-summary-view/goal-summary-view.vue'));
Vue.component('account-info', () => import('@pages/base/account-info/account-info.vue'));
Vue.component('lead-info-detail', () => import('@pages/sales/lead-info-detail/lead-info-detail.vue'));
Vue.component('metric-grid-view', () => import('@pages/base/metric-grid-view/metric-grid-view.vue'));
Vue.component('sales-order-detail-soproduct-grid-view', () => import('@pages/sales/sales-order-detail-soproduct-grid-view/sales-order-detail-soproduct-grid-view.vue'));
Vue.component('account-info-all', () => import('@pages/base/account-info-all/account-info-all.vue'));
Vue.component('opportunity-competitor-edit-view', () => import('@pages/sales/opportunity-competitor-edit-view/opportunity-competitor-edit-view.vue'));
......@@ -184,6 +183,7 @@ export const PageComponents = {
Vue.component('campaign-response-quick-create', () => import('@pages/marketing/campaign-response-quick-create/campaign-response-quick-create.vue'));
Vue.component('activity-pointer-redirect-view', () => import('@pages/base/activity-pointer-redirect-view/activity-pointer-redirect-view.vue'));
Vue.component('account-edit-introduction', () => import('@pages/base/account-edit-introduction/account-edit-introduction.vue'));
Vue.component('metric-grid-view', () => import('@pages/base/metric-grid-view/metric-grid-view.vue'));
Vue.component('contact-edit-book', () => import('@pages/base/contact-edit-book/contact-edit-book.vue'));
Vue.component('campaign-summary', () => import('@pages/marketing/campaign-summary/campaign-summary.vue'));
Vue.component('contact-pickup-view', () => import('@pages/base/contact-pickup-view/contact-pickup-view.vue'));
......
......@@ -1106,6 +1106,15 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '8764cc6860a8981a549fcf693bbc44f6',
viewmodule: 'Base',
viewname: 'MetricEditView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '893e62d6fbdc4580de7e3e802aec9108',
viewmodule: 'Base',
......@@ -1307,6 +1316,16 @@ export const viewstate: any = {
'6debde861c6e6f91eeb442cb869e9737',
],
},
{
viewtag: '9af073dea1ea05903d52e8bdc5a03dd5',
viewmodule: 'Base',
viewname: 'MetricGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'8764cc6860a8981a549fcf693bbc44f6',
],
},
{
viewtag: '9be8eab621377b4bb8432a48a3f3f785',
viewmodule: 'Sales',
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, EditFormControlBase } from '@/studio-core';
import MetricService from '@/service/metric/metric-service';
import MainService from './main-form-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
/**
* form部件基类
*
* @export
* @class EditFormControlBase
* @extends {MainEditFormBase}
*/
export class MainEditFormBase extends EditFormControlBase {
/**
* 建构部件服务对象
*
* @type {MainService}
* @memberof MainEditFormBase
*/
public service: MainService = new MainService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {MetricService}
* @memberof MainEditFormBase
*/
public appEntityService: MetricService = new MetricService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainEditFormBase
*/
protected appDeName: string = 'metric';
/**
* 表单数据对象
*
* @type {*}
* @memberof MainEditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
metricname: null,
amount: null,
amountdatatype: null,
stretchtracked: null,
description: null,
metricid: null,
metric:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof MainEditFormBase
*/
public rules: any = {
metricname: [
{ required: true, type: 'string', message: '公制名称 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '公制名称 值不能为空', trigger: 'blur' },
],
amount: [
{ required: true, type: 'number', message: '度量类型 值不能为空', trigger: 'change' },
{ required: true, type: 'number', message: '度量类型 值不能为空', trigger: 'blur' },
],
}
/**
* 详情模型集合
*
* @type {*}
* @memberof MainEditFormBase
*/
public detailsModel: any = {
group1: new FormGroupPanelModel({ caption: 'metric基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: false, form: this, uiActionGroup: { caption: '', langbase: 'entities.metric.main_form', extractMode: 'ITEM', details: [] } }),
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this }),
srfupdatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 0 }),
srforikey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfkey: new FormItemModel({ caption: '目标度量', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
srfmajortext: new FormItemModel({ caption: '公制名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srftempmode: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srftempmode', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfuf: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfuf', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfdeid: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfdeid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
metricname: new FormItemModel({ caption: '公制名称', detailType: 'FORMITEM', name: 'metricname', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
amount: new FormItemModel({ caption: '度量类型', detailType: 'FORMITEM', name: 'amount', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
amountdatatype: new FormItemModel({ caption: '金额数据类型', detailType: 'FORMITEM', name: 'amountdatatype', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
stretchtracked: new FormItemModel({ caption: '跟踪扩展目标值', detailType: 'FORMITEM', name: 'stretchtracked', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
description: new FormItemModel({ caption: '说明', detailType: 'FORMITEM', name: 'description', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
metricid: new FormItemModel({ caption: '目标度量', detailType: 'FORMITEM', name: 'metricid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
};
}
\ No newline at end of file
/**
* Main 部件模型
*
* @export
* @class MainModel
*/
export default class MainModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof MainModel
*/
public getDataItems(): any[] {
return [
{
name: 'srfwfmemo',
prop: 'srfwfmemo',
dataType: 'TEXT',
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
{
name: 'srfupdatedate',
prop: 'updatedate',
dataType: 'DATETIME',
},
{
name: 'srforikey',
},
{
name: 'srfkey',
prop: 'metricid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'metricname',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'metricname',
prop: 'metricname',
dataType: 'TEXT',
},
{
name: 'amount',
prop: 'amount',
dataType: 'YESNO',
},
{
name: 'amountdatatype',
prop: 'amountdatatype',
dataType: 'SSCODELIST',
},
{
name: 'stretchtracked',
prop: 'stretchtracked',
dataType: 'YESNO',
},
{
name: 'description',
prop: 'description',
dataType: 'TEXT',
},
{
name: 'metricid',
prop: 'metricid',
dataType: 'GUID',
},
{
name: 'metric',
prop: 'metricid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-form' ref='form' id='metric_main' style="">
<input style="display:none;" />
<row >
<i-col v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.metric.main_form.details.group1')" :isShowCaption="false" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<row>
<i-col v-show="detailsModel.metricname.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='metricname' :itemRules="this.rules.metricname" class='' :caption="$t('entities.metric.main_form.details.metricname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.metricname.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.metricname" @enter="onEnter($event)" unit="" :disabled="detailsModel.metricname.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.amount.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='amount' :itemRules="this.rules.amount" class='' :caption="$t('entities.metric.main_form.details.amount')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.amount.error" :isEmptyCaption="false" labelPos="LEFT">
<dropdown-list
v-model="data.amount"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.amount.disabled"
style="width:100px;width: 100px;"
tag='YesNo'
codelistType='STATIC'
placeholder='请选择...'>
</dropdown-list>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.amountdatatype.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='amountdatatype' :itemRules="this.rules.amountdatatype" class='' :caption="$t('entities.metric.main_form.details.amountdatatype')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.amountdatatype.error" :isEmptyCaption="false" labelPos="LEFT">
<dropdown-list
v-model="data.amountdatatype"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.amountdatatype.disabled"
tag='Metric__AmountDataType'
codelistType='STATIC'
placeholder='请选择...' style="">
</dropdown-list>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.stretchtracked.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='stretchtracked' :itemRules="this.rules.stretchtracked" class='' :caption="$t('entities.metric.main_form.details.stretchtracked')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.stretchtracked.error" :isEmptyCaption="false" labelPos="LEFT">
<dropdown-list
v-model="data.stretchtracked"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.stretchtracked.disabled"
style="width:100px;width: 100px;"
tag='YesNo'
codelistType='STATIC'
placeholder='请选择...'>
</dropdown-list>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.description.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='description' :itemRules="this.rules.description" class='' :caption="$t('entities.metric.main_form.details.description')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.description.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.description" @enter="onEnter($event)" unit="" :disabled="detailsModel.description.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</row>
</i-form>
\ No newline at end of file
<template src="./main-form.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { MainEditFormBase } from './main-form-base';
/**
* form部件
*
* @export
* @class MainEditForm
* @extends {MainEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class MainEditForm extends MainEditFormBase { }
</script>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册