Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz企业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz企业中心
提交
fdbe8b2c
提交
fdbe8b2c
编写于
6月 29, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xignzi006 发布系统代码
上级
eeb5ae5e
变更
41
隐藏空白字符变更
内嵌
并排
正在显示
41 个修改的文件
包含
3082 行增加
和
153 行删除
+3082
-153
view-config.json
app_CRM/public/assets/json/view-config.json
+1
-1
sales-literature_en_US.ts
...anres/entities/sales-literature/sales-literature_en_US.ts
+8
-4
sales-literature_zh_CN.ts
...anres/entities/sales-literature/sales-literature_zh_CN.ts
+6
-2
viewconfig.ts
app_CRM/src/mock/viewconfig/viewconfig.ts
+1
-1
subject-pickup-grid-view-base.tsx
...ubject-pickup-grid-view/subject-pickup-grid-view-base.tsx
+185
-0
subject-pickup-grid-view.html
...se/subject-pickup-grid-view/subject-pickup-grid-view.html
+41
-0
subject-pickup-grid-view.vue
...ase/subject-pickup-grid-view/subject-pickup-grid-view.vue
+29
-0
subject-pickup-view-base.tsx
...ges/base/subject-pickup-view/subject-pickup-view-base.tsx
+134
-0
subject-pickup-view.html
...c/pages/base/subject-pickup-view/subject-pickup-view.html
+25
-0
subject-pickup-view.vue
...rc/pages/base/subject-pickup-view/subject-pickup-view.vue
+27
-0
sales-literature-grid-view-base.tsx
...-literature-grid-view/sales-literature-grid-view-base.tsx
+28
-131
sales-literature-grid-view.html
...ales-literature-grid-view/sales-literature-grid-view.html
+1
-1
sales-literature-grid-view.vue
...sales-literature-grid-view/sales-literature-grid-view.vue
+1
-1
sales-literature-quick-create-view-base.tsx
...k-create-view/sales-literature-quick-create-view-base.tsx
+135
-0
sales-literature-quick-create-view.html
...quick-create-view/sales-literature-quick-create-view.html
+34
-0
sales-literature-quick-create-view.vue
...-quick-create-view/sales-literature-quick-create-view.vue
+27
-0
page-register.ts
app_CRM/src/pages/ungroup/central/page-register.ts
+3
-0
router.ts
app_CRM/src/pages/ungroup/central/router.ts
+54
-12
state.ts
app_CRM/src/store/modules/view-action/state.ts
+30
-0
sales-literature-ui-service-base.ts
...vice/sales-literature/sales-literature-ui-service-base.ts
+60
-0
quick-create-form-base.tsx
...s-literature/quick-create-form/quick-create-form-base.tsx
+165
-0
quick-create-form-model.ts
...s-literature/quick-create-form/quick-create-form-model.ts
+91
-0
quick-create-form-service.ts
...literature/quick-create-form/quick-create-form-service.ts
+383
-0
quick-create-form.html
...sales-literature/quick-create-form/quick-create-form.html
+67
-0
quick-create-form.vue
.../sales-literature/quick-create-form/quick-create-form.vue
+22
-0
default-searchform-base.tsx
...ts/subject/default-searchform/default-searchform-base.tsx
+63
-0
default-searchform-model.ts
...ts/subject/default-searchform/default-searchform-model.ts
+31
-0
default-searchform-service.ts
.../subject/default-searchform/default-searchform-service.ts
+366
-0
default-searchform.html
...idgets/subject/default-searchform/default-searchform.html
+9
-0
default-searchform.vue
...widgets/subject/default-searchform/default-searchform.vue
+22
-0
main-grid-base.tsx
app_CRM/src/widgets/subject/main-grid/main-grid-base.tsx
+131
-0
main-grid-model.ts
app_CRM/src/widgets/subject/main-grid/main-grid-model.ts
+99
-0
main-grid-service.ts
app_CRM/src/widgets/subject/main-grid/main-grid-service.ts
+318
-0
main-grid.html
app_CRM/src/widgets/subject/main-grid/main-grid.html
+104
-0
main-grid.vue
app_CRM/src/widgets/subject/main-grid/main-grid.vue
+22
-0
pickup-viewpickupviewpanel-pickupviewpanel-base.tsx
...panel/pickup-viewpickupviewpanel-pickupviewpanel-base.tsx
+246
-0
pickup-viewpickupviewpanel-pickupviewpanel-model.ts
...panel/pickup-viewpickupviewpanel-pickupviewpanel-model.ts
+61
-0
pickup-viewpickupviewpanel-pickupviewpanel-service.ts
...nel/pickup-viewpickupviewpanel-pickupviewpanel-service.ts
+11
-0
pickup-viewpickupviewpanel-pickupviewpanel.html
...viewpanel/pickup-viewpickupviewpanel-pickupviewpanel.html
+16
-0
pickup-viewpickupviewpanel-pickupviewpanel.less
...viewpanel/pickup-viewpickupviewpanel-pickupviewpanel.less
+3
-0
pickup-viewpickupviewpanel-pickupviewpanel.vue
...pviewpanel/pickup-viewpickupviewpanel-pickupviewpanel.vue
+22
-0
未找到文件。
app_CRM/public/assets/json/view-config.json
浏览文件 @
fdbe8b2c
...
...
@@ -980,7 +980,7 @@
"memo"
:
""
},
"salesliteraturegridview"
:
{
"title"
:
"销售宣传资料
表格视图
"
,
"title"
:
"销售宣传资料
信息
"
,
"caption"
:
"销售宣传资料"
,
"viewtype"
:
"DEGRIDVIEW"
,
"viewmodule"
:
"Sales"
,
...
...
app_CRM/src/locale/lanres/entities/sales-literature/sales-literature_en_US.ts
浏览文件 @
fdbe8b2c
...
...
@@ -40,7 +40,7 @@ export default {
},
gridview
:
{
caption
:
"销售宣传资料"
,
title
:
"销售宣传资料
表格视图
"
,
title
:
"销售宣传资料
信息
"
,
},
quickcreateview
:
{
caption
:
"销售宣传资料"
,
...
...
@@ -147,9 +147,13 @@ export default {
},
},
gridviewtoolbar_toolbar
:
{
tbitem3
:
{
caption
:
"New"
,
tip
:
"New"
,
tbitem1_openquickcreateview
:
{
caption
:
"新建"
,
tip
:
"新建"
,
},
tbitem2
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem4
:
{
caption
:
"Edit"
,
...
...
app_CRM/src/locale/lanres/entities/sales-literature/sales-literature_zh_CN.ts
浏览文件 @
fdbe8b2c
...
...
@@ -39,7 +39,7 @@ export default {
},
gridview
:
{
caption
:
"销售宣传资料"
,
title
:
"销售宣传资料
表格视图
"
,
title
:
"销售宣传资料
信息
"
,
},
quickcreateview
:
{
caption
:
"销售宣传资料"
,
...
...
@@ -146,10 +146,14 @@ export default {
},
},
gridviewtoolbar_toolbar
:
{
tbitem
3
:
{
tbitem
1_openquickcreateview
:
{
caption
:
"新建"
,
tip
:
"新建"
,
},
tbitem2
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem4
:
{
caption
:
"编辑"
,
tip
:
"编辑"
,
...
...
app_CRM/src/mock/viewconfig/viewconfig.ts
浏览文件 @
fdbe8b2c
...
...
@@ -792,7 +792,7 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewtag"
:
"8d3e0363ae4532310000143fd6d61aae"
},
"salesliteraturegridview"
:
{
"title"
:
"销售宣传资料
表格视图
"
,
"title"
:
"销售宣传资料
信息
"
,
"caption"
:
"销售宣传资料"
,
"viewtype"
:
"DEGRIDVIEW"
,
"viewmodule"
:
"Sales"
,
...
...
app_CRM/src/pages/base/subject-pickup-grid-view/subject-pickup-grid-view-base.tsx
0 → 100644
浏览文件 @
fdbe8b2c
import
{
Subject
}
from
'rxjs'
;
import
{
PickupGridViewBase
}
from
'@/studio-core'
;
import
SubjectService
from
'@/service/subject/subject-service'
;
import
PickupGridViewEngine
from
'@engine/view/pickup-grid-view-engine'
;
/**
* 主题选择表格视图视图基类
*
* @export
* @class SubjectPickupGridViewBase
* @extends {PickupGridViewBase}
*/
export
class
SubjectPickupGridViewBase
extends
PickupGridViewBase
{
/**
* 实体服务对象
*
* @type {SubjectService}
* @memberof SubjectPickupGridViewBase
*/
protected
appEntityService
:
SubjectService
=
new
SubjectService
;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof SubjectPickupGridViewBase
*/
protected
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof SubjectPickupGridViewBase
*/
protected
model
:
any
=
{
srfCaption
:
'entities.subject.views.pickupgridview.caption'
,
srfTitle
:
'entities.subject.views.pickupgridview.title'
,
srfSubTitle
:
'entities.subject.views.pickupgridview.subtitle'
,
dataInfo
:
''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof SubjectPickupGridViewBase
*/
protected
containerModel
:
any
=
{
view_grid
:
{
name
:
'grid'
,
type
:
'GRID'
},
view_searchform
:
{
name
:
'searchform'
,
type
:
'SEARCHFORM'
},
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected
viewtag
:
string
=
'19e1193c4075ae18f2f29095bb8841fa'
;
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof SubjectPickupGridViewBase
*/
public
engine
:
PickupGridViewEngine
=
new
PickupGridViewEngine
();
/**
* 引擎初始化
*
* @public
* @memberof SubjectPickupGridViewBase
*/
public
engineInit
():
void
{
this
.
engine
.
init
({
view
:
this
,
grid
:
this
.
$refs
.
grid
,
searchform
:
this
.
$refs
.
searchform
,
keyPSDEField
:
'subject'
,
majorPSDEField
:
'title'
,
isLoadDefault
:
true
,
});
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SubjectPickupGridViewBase
*/
public
grid_selectionchange
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'selectionchange'
,
$event
);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SubjectPickupGridViewBase
*/
public
grid_beforeload
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'beforeload'
,
$event
);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SubjectPickupGridViewBase
*/
public
grid_rowdblclick
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'rowdblclick'
,
$event
);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SubjectPickupGridViewBase
*/
public
grid_load
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'load'
,
$event
);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SubjectPickupGridViewBase
*/
public
searchform_save
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'save'
,
$event
);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SubjectPickupGridViewBase
*/
public
searchform_search
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'search'
,
$event
);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SubjectPickupGridViewBase
*/
public
searchform_load
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'load'
,
$event
);
}
/**
* 是否展开搜索表单
*
* @protected
* @type {boolean}
* @memberof SubjectPickupGridViewBase
*/
protected
isExpandSearchForm
:
boolean
=
true
;
}
\ No newline at end of file
app_CRM/src/pages/base/subject-pickup-grid-view/subject-pickup-grid-view.html
0 → 100644
浏览文件 @
fdbe8b2c
<studio-view-style2
viewName=
"subjectpickupgridview"
viewTitle=
"主题选择表格视图"
class=
'depickupgridview subject-pickup-grid-view'
>
<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"
:selectedData=
"selectedData"
:showBusyIndicator=
"true"
updateAction=
""
removeAction=
"Remove"
loaddraftAction=
""
loadAction=
""
createAction=
""
fetchAction=
"FetchDefault"
name=
"grid"
ref=
'grid'
@
selectionchange=
"grid_selectionchange($event)"
@
beforeload=
"grid_beforeload($event)"
@
rowdblclick=
"grid_rowdblclick($event)"
@
load=
"grid_load($event)"
@
closeview=
"closeView($event)"
>
</view
_grid
>
</studio-view-style2>
\ No newline at end of file
app_CRM/src/pages/base/subject-pickup-grid-view/subject-pickup-grid-view.vue
0 → 100644
浏览文件 @
fdbe8b2c
<
template
src=
"./subject-pickup-grid-view.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { SubjectPickupGridViewBase } from './subject-pickup-grid-view-base';
import view_grid from '@widgets/subject/main-grid/main-grid.vue';
import view_searchform from '@widgets/subject/default-searchform/default-searchform.vue';
/**
* 主题选择表格视图视图
*
* @export
* @class SubjectPickupGridView
* @extends {SubjectPickupGridViewBase}
*/
@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 SubjectPickupGridView extends SubjectPickupGridViewBase { }
</script>
app_CRM/src/pages/base/subject-pickup-view/subject-pickup-view-base.tsx
0 → 100644
浏览文件 @
fdbe8b2c
import
{
Subject
}
from
'rxjs'
;
import
{
PickupViewBase
}
from
'@/studio-core'
;
import
SubjectService
from
'@/service/subject/subject-service'
;
import
PickupViewEngine
from
'@engine/view/pickup-view-engine'
;
/**
* 主题数据选择视图视图基类
*
* @export
* @class SubjectPickupViewBase
* @extends {PickupViewBase}
*/
export
class
SubjectPickupViewBase
extends
PickupViewBase
{
/**
* 实体服务对象
*
* @type {SubjectService}
* @memberof SubjectPickupViewBase
*/
protected
appEntityService
:
SubjectService
=
new
SubjectService
;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof SubjectPickupViewBase
*/
protected
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof SubjectPickupViewBase
*/
protected
model
:
any
=
{
srfCaption
:
'entities.subject.views.pickupview.caption'
,
srfTitle
:
'entities.subject.views.pickupview.title'
,
srfSubTitle
:
'entities.subject.views.pickupview.subtitle'
,
dataInfo
:
''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof SubjectPickupViewBase
*/
protected
containerModel
:
any
=
{
view_pickupviewpanel
:
{
name
:
'pickupviewpanel'
,
type
:
'PICKUPVIEWPANEL'
},
view_okbtn
:
{
name
:
'okbtn'
,
type
:
'button'
,
text
:
'确定'
,
disabled
:
true
},
view_cancelbtn
:
{
name
:
'cancelbtn'
,
type
:
'button'
,
text
:
'取消'
,
disabled
:
false
},
view_leftbtn
:
{
name
:
'leftbtn'
,
type
:
'button'
,
text
:
'左移'
,
disabled
:
true
},
view_rightbtn
:
{
name
:
'rightbtn'
,
type
:
'button'
,
text
:
'右移'
,
disabled
:
true
},
view_allleftbtn
:
{
name
:
'allleftbtn'
,
type
:
'button'
,
text
:
'全部左移'
,
disabled
:
true
},
view_allrightbtn
:
{
name
:
'allrightbtn'
,
type
:
'button'
,
text
:
'全部右移'
,
disabled
:
true
},
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected
viewtag
:
string
=
'e52af970c14fd89546ac8ccaecab460c'
;
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof SubjectPickupViewBase
*/
public
engine
:
PickupViewEngine
=
new
PickupViewEngine
();
/**
* 引擎初始化
*
* @public
* @memberof SubjectPickupViewBase
*/
public
engineInit
():
void
{
this
.
engine
.
init
({
view
:
this
,
pickupviewpanel
:
this
.
$refs
.
pickupviewpanel
,
keyPSDEField
:
'subject'
,
majorPSDEField
:
'title'
,
isLoadDefault
:
true
,
});
}
/**
* pickupviewpanel 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SubjectPickupViewBase
*/
public
pickupviewpanel_selectionchange
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'pickupviewpanel'
,
'selectionchange'
,
$event
);
}
/**
* pickupviewpanel 部件 activated 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SubjectPickupViewBase
*/
public
pickupviewpanel_activated
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'pickupviewpanel'
,
'activated'
,
$event
);
}
/**
* pickupviewpanel 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SubjectPickupViewBase
*/
public
pickupviewpanel_load
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'pickupviewpanel'
,
'load'
,
$event
);
}
}
\ No newline at end of file
app_CRM/src/pages/base/subject-pickup-view/subject-pickup-view.html
0 → 100644
浏览文件 @
fdbe8b2c
<studio-view-style2
viewName=
"subjectpickupview"
viewTitle=
"主题数据选择视图"
class=
'depickupview subject-pickup-view'
>
<div
class=
"content-container pickup-view"
>
<view
_pickupviewpanel
:viewState=
"viewState"
:viewparams=
"JSON.parse(JSON.stringify(viewparams))"
:context=
"JSON.parse(JSON.stringify(context))"
:isSingleSelect=
"isSingleSelect"
:selectedData=
"selectedData"
:isShowButton=
"isShowButton"
name=
"pickupviewpanel"
ref=
'pickupviewpanel'
@
selectionchange=
"pickupviewpanel_selectionchange($event)"
@
activated=
"pickupviewpanel_activated($event)"
@
load=
"pickupviewpanel_load($event)"
@
closeview=
"closeView($event)"
>
</view
_pickupviewpanel
>
</div>
<template
slot=
"footer"
>
<div
v-if=
"isShowButton"
:style=
"{ textAlign: 'right' }"
>
<i-button
type=
"primary"
:disabled=
"this.viewSelections.length > 0 ? false : true"
@
click=
"onClickOk.apply(_self, arguments)"
>
{{this.containerModel.view_okbtn.text}}
</i-button>
<i-button
@
click=
"onClickCancel.apply(_self, arguments)"
>
{{this.containerModel.view_cancelbtn.text}}
</i-button>
</div>
</template>
</studio-view-style2>
\ No newline at end of file
app_CRM/src/pages/base/subject-pickup-view/subject-pickup-view.vue
0 → 100644
浏览文件 @
fdbe8b2c
<
template
src=
"./subject-pickup-view.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { SubjectPickupViewBase } from './subject-pickup-view-base';
import view_pickupviewpanel from '@widgets/subject/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel.vue';
/**
* 主题数据选择视图视图
*
* @export
* @class SubjectPickupView
* @extends {SubjectPickupViewBase}
*/
@Component({
components: {
view_pickupviewpanel,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class SubjectPickupView extends SubjectPickupViewBase { }
</script>
app_CRM/src/pages/sales/sales-literature-grid-view/sales-literature-grid-view-base.tsx
浏览文件 @
fdbe8b2c
...
...
@@ -3,11 +3,12 @@ import { Subject } from 'rxjs';
import
{
GridViewBase
}
from
'@/studio-core'
;
import
SalesLiteratureService
from
'@/service/sales-literature/sales-literature-service'
;
import
GridViewEngine
from
'@engine/view/grid-view-engine'
;
import
SalesLiteratureUIService
from
'@/uiservice/sales-literature/sales-literature-ui-service'
;
import
CodeListService
from
"@service/app/codelist-service"
;
/**
* 销售宣传资料
表格视图
视图基类
* 销售宣传资料
信息
视图基类
*
* @export
* @class SalesLiteratureGridViewBase
...
...
@@ -67,8 +68,9 @@ export class SalesLiteratureGridViewBase extends GridViewBase {
* @memberof SalesLiteratureGridView
*/
public
toolBarModels
:
any
=
{
tbitem
3
:
{
name
:
'tbitem3'
,
caption
:
'新建'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'新建'
,
iconcls
:
'fa fa-file-text-o'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'New'
,
target
:
'
'
},
class
:
''
},
tbitem
1_openquickcreateview
:
{
name
:
'tbitem1_openquickcreateview'
,
caption
:
'新建'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'新建'
,
iconcls
:
'fa fa-user-plus'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'OpenQuickCreateView'
,
target
:
'NONE
'
},
class
:
''
},
tbitem2
:
{
name
:
'tbitem2'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem4
:
{
name
:
'tbitem4'
,
caption
:
'编辑'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'编辑'
,
iconcls
:
'fa fa-edit'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Edit'
,
target
:
'SINGLEKEY'
},
class
:
''
},
tbitem6
:
{
name
:
'tbitem6'
,
caption
:
'拷贝'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'拷贝'
,
iconcls
:
'fa fa-copy'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Copy'
,
target
:
'SINGLEKEY'
},
class
:
''
},
...
...
@@ -136,8 +138,8 @@ export class SalesLiteratureGridViewBase extends GridViewBase {
* @memberof SalesLiteratureGridViewBase
*/
public
toolbar_click
(
$event
:
any
,
$event2
?:
any
):
void
{
if
(
Object
.
is
(
$event
.
tag
,
'tbitem
3
'
))
{
this
.
toolbar_tbitem
3
_click
(
null
,
''
,
$event2
);
if
(
Object
.
is
(
$event
.
tag
,
'tbitem
1_openquickcreateview
'
))
{
this
.
toolbar_tbitem
1_openquickcreateview
_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem4'
))
{
this
.
toolbar_tbitem4_click
(
null
,
''
,
$event2
);
...
...
@@ -145,12 +147,6 @@ export class SalesLiteratureGridViewBase extends GridViewBase {
if
(
Object
.
is
(
$event
.
tag
,
'tbitem6'
))
{
this
.
toolbar_tbitem6_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem24'
))
{
this
.
toolbar_tbitem24_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem25'
))
{
this
.
toolbar_tbitem25_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem8'
))
{
this
.
toolbar_tbitem8_click
(
null
,
''
,
$event2
);
}
...
...
@@ -261,7 +257,7 @@ export class SalesLiteratureGridViewBase extends GridViewBase {
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem
3
_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
public
toolbar_tbitem
1_openquickcreateview
_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
...
...
@@ -278,7 +274,8 @@ export class SalesLiteratureGridViewBase extends GridViewBase {
datas
=
[
params
];
}
// 界面行为
this
.
New
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"SalesLiterature"
);
const
curUIService
:
SalesLiteratureUIService
=
new
SalesLiteratureUIService
();
curUIService
.
SalesLiterature_OpenQuickCreateView
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"SalesLiterature"
);
}
/**
...
...
@@ -337,62 +334,6 @@ export class SalesLiteratureGridViewBase extends GridViewBase {
this
.
Copy
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"SalesLiterature"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem24_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
];
}
// 界面行为
this
.
ToggleRowEdit
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"SalesLiterature"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem25_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
];
}
// 界面行为
this
.
NewRow
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"SalesLiterature"
);
}
/**
* 逻辑事件
*
...
...
@@ -530,16 +471,28 @@ export class SalesLiteratureGridViewBase extends GridViewBase {
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'salesliteratures'
,
parameterName
:
'salesliterature'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
];
const
_this
:
any
=
this
;
const
openIndexViewTab
=
(
data
:
any
)
=>
{
const
_data
:
any
=
{
w
:
(
new
Date
().
getTime
())
};
Object
.
assign
(
_data
,
data
);
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
tempContext
,
deResParameters
,
parameters
,
args
,
_data
);
this
.
$router
.
push
(
routePath
);
const
openDrawer
=
(
view
:
any
,
data
:
any
)
=>
{
let
container
:
Subject
<
any
>
=
this
.
$appdrawer
.
openDrawer
(
view
,
tempContext
,
data
);
container
.
subscribe
((
result
:
any
)
=>
{
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
return
;
}
if
(
!
xData
||
!
(
xData
.
refresh
instanceof
Function
))
{
return
;
}
xData
.
refresh
(
result
.
datas
);
});
}
openIndexViewTab
(
data
);
const
view
:
any
=
{
viewname
:
'sales-literature-quick-create-view'
,
height
:
0
,
width
:
0
,
title
:
this
.
$t
(
'entities.salesliterature.views.quickcreateview.title'
),
placement
:
'DRAWER_RIGHT'
,
};
openDrawer
(
view
,
data
);
}
...
...
@@ -575,26 +528,6 @@ export class SalesLiteratureGridViewBase extends GridViewBase {
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof SalesLiteratureGridViewBase
*/
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 视图处理逻辑不存在,请添加!'
});
}
}
/**
* 编辑
*
...
...
@@ -653,42 +586,6 @@ export class SalesLiteratureGridViewBase extends GridViewBase {
_this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'opendata 视图处理逻辑不存在,请添加!'
});
}
}
/**
* 行编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof SalesLiteratureGridViewBase
*/
public
ToggleRowEdit
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
xData
.
actualIsOpenEdit
=
!
xData
.
actualIsOpenEdit
;
}
/**
* 新建行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof SalesLiteratureGridViewBase
*/
public
NewRow
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
const
data
:
any
=
{};
if
(
_this
.
newRow
&&
_this
.
newRow
instanceof
Function
)
{
_this
.
newRow
([{
...
data
}],
params
,
$event
,
xData
);
}
else
if
(
xData
.
newRow
&&
xData
.
newRow
instanceof
Function
)
{
xData
.
newRow
([{
...
data
}],
params
,
$event
,
xData
);
}
else
{
_this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'newRow 视图处理逻辑不存在,请添加!'
});
}
}
/**
* 删除
*
...
...
app_CRM/src/pages/sales/sales-literature-grid-view/sales-literature-grid-view.html
浏览文件 @
fdbe8b2c
<studio-view-style2
viewName=
"salesliteraturegridview"
viewTitle=
"销售宣传资料
表格视图
"
class=
'degridview sales-literature-grid-view'
>
<studio-view-style2
viewName=
"salesliteraturegridview"
viewTitle=
"销售宣传资料
信息
"
class=
'degridview sales-literature-grid-view'
>
<template
slot=
'title'
>
<span
class=
'caption-info'
>
{{$t(model.srfTitle)}}
</span>
</template>
...
...
app_CRM/src/pages/sales/sales-literature-grid-view/sales-literature-grid-view.vue
浏览文件 @
fdbe8b2c
...
...
@@ -7,7 +7,7 @@ import view_grid from '@widgets/sales-literature/main-grid/main-grid.vue';
import view_searchform from '@widgets/sales-literature/default-searchform/default-searchform.vue';
/**
* 销售宣传资料
表格视图
视图
* 销售宣传资料
信息
视图
*
* @export
* @class SalesLiteratureGridView
...
...
app_CRM/src/pages/sales/sales-literature-quick-create-view/sales-literature-quick-create-view-base.tsx
0 → 100644
浏览文件 @
fdbe8b2c
import
{
Subject
}
from
'rxjs'
;
import
{
OptionViewBase
}
from
'@/studio-core'
;
import
SalesLiteratureService
from
'@/service/sales-literature/sales-literature-service'
;
import
OptionViewEngine
from
'@engine/view/option-view-engine'
;
/**
* 快速新建视图基类
*
* @export
* @class SalesLiteratureQuickCreateViewBase
* @extends {OptionViewBase}
*/
export
class
SalesLiteratureQuickCreateViewBase
extends
OptionViewBase
{
/**
* 实体服务对象
*
* @type {SalesLiteratureService}
* @memberof SalesLiteratureQuickCreateViewBase
*/
protected
appEntityService
:
SalesLiteratureService
=
new
SalesLiteratureService
;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof SalesLiteratureQuickCreateViewBase
*/
protected
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof SalesLiteratureQuickCreateViewBase
*/
protected
model
:
any
=
{
srfCaption
:
'entities.salesliterature.views.quickcreateview.caption'
,
srfTitle
:
'entities.salesliterature.views.quickcreateview.title'
,
srfSubTitle
:
'entities.salesliterature.views.quickcreateview.subtitle'
,
dataInfo
:
''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof SalesLiteratureQuickCreateViewBase
*/
protected
containerModel
:
any
=
{
view_form
:
{
name
:
'form'
,
type
:
'FORM'
},
view_okbtn
:
{
name
:
'okbtn'
,
type
:
'button'
,
text
:
'确定'
,
disabled
:
true
},
view_cancelbtn
:
{
name
:
'cancelbtn'
,
type
:
'button'
,
text
:
'取消'
,
disabled
:
false
},
view_leftbtn
:
{
name
:
'leftbtn'
,
type
:
'button'
,
text
:
'左移'
,
disabled
:
true
},
view_rightbtn
:
{
name
:
'rightbtn'
,
type
:
'button'
,
text
:
'右移'
,
disabled
:
true
},
view_allleftbtn
:
{
name
:
'allleftbtn'
,
type
:
'button'
,
text
:
'全部左移'
,
disabled
:
true
},
view_allrightbtn
:
{
name
:
'allrightbtn'
,
type
:
'button'
,
text
:
'全部右移'
,
disabled
:
true
},
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected
viewtag
:
string
=
'e45cd3d0a9959e1979243837b5dcfd2d'
;
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof SalesLiteratureQuickCreateViewBase
*/
public
engine
:
OptionViewEngine
=
new
OptionViewEngine
();
/**
* 引擎初始化
*
* @public
* @memberof SalesLiteratureQuickCreateViewBase
*/
public
engineInit
():
void
{
this
.
engine
.
init
({
view
:
this
,
form
:
this
.
$refs
.
form
,
p2k
:
'0'
,
keyPSDEField
:
'salesliterature'
,
majorPSDEField
:
'salesliteraturename'
,
isLoadDefault
:
true
,
});
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesLiteratureQuickCreateViewBase
*/
public
form_save
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'form'
,
'save'
,
$event
);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesLiteratureQuickCreateViewBase
*/
public
form_remove
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'form'
,
'remove'
,
$event
);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesLiteratureQuickCreateViewBase
*/
public
form_load
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'form'
,
'load'
,
$event
);
}
}
\ No newline at end of file
app_CRM/src/pages/sales/sales-literature-quick-create-view/sales-literature-quick-create-view.html
0 → 100644
浏览文件 @
fdbe8b2c
<studio-view-style2
viewName=
"salesliteraturequickcreateview"
viewTitle=
"快速新建"
class=
'deoptview sales-literature-quick-create-view'
>
<template
slot=
'title'
>
<span
class=
'caption-info'
>
{{$t(model.srfTitle)}}
</span>
</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
>
<template
slot=
"footer"
>
<div
class=
"option-view-footer-actions"
>
<i-button
type=
'primary'
@
click=
"onClickOk.apply(_self, arguments)"
>
{{ containerModel.view_okbtn.text }}
</i-button>
<i-button
@
click=
"onClickCancel.apply(_self, arguments)"
>
{{ containerModel.view_cancelbtn.text }}
</i-button>
</div>
</template>
</studio-view-style2>
\ No newline at end of file
app_CRM/src/pages/sales/sales-literature-quick-create-view/sales-literature-quick-create-view.vue
0 → 100644
浏览文件 @
fdbe8b2c
<
template
src=
"./sales-literature-quick-create-view.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { SalesLiteratureQuickCreateViewBase } from './sales-literature-quick-create-view-base';
import view_form from '@widgets/sales-literature/quick-create-form/quick-create-form.vue';
/**
* 快速新建视图
*
* @export
* @class SalesLiteratureQuickCreateView
* @extends {SalesLiteratureQuickCreateViewBase}
*/
@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 SalesLiteratureQuickCreateView extends SalesLiteratureQuickCreateViewBase { }
</script>
app_CRM/src/pages/ungroup/central/page-register.ts
浏览文件 @
fdbe8b2c
...
...
@@ -31,6 +31,8 @@ export const PageComponents = {
Vue
.
component
(
'goal-grid-view'
,
()
=>
import
(
'@pages/sales/goal-grid-view/goal-grid-view.vue'
));
Vue
.
component
(
'account-grid-view'
,
()
=>
import
(
'@pages/base/account-grid-view/account-grid-view.vue'
));
Vue
.
component
(
'invoice-grid-view'
,
()
=>
import
(
'@pages/finance/invoice-grid-view/invoice-grid-view.vue'
));
Vue
.
component
(
'sales-literature-quick-create-view'
,
()
=>
import
(
'@pages/sales/sales-literature-quick-create-view/sales-literature-quick-create-view.vue'
));
Vue
.
component
(
'subject-pickup-grid-view'
,
()
=>
import
(
'@pages/base/subject-pickup-grid-view/subject-pickup-grid-view.vue'
));
Vue
.
component
(
'quote-info'
,
()
=>
import
(
'@pages/sales/quote-info/quote-info.vue'
));
Vue
.
component
(
'competitor-summary'
,
()
=>
import
(
'@pages/sales/competitor-summary/competitor-summary.vue'
));
Vue
.
component
(
'ibiz-list-grid-view'
,
()
=>
import
(
'@pages/marketing/ibiz-list-grid-view/ibiz-list-grid-view.vue'
));
...
...
@@ -77,6 +79,7 @@ export const PageComponents = {
Vue
.
component
(
'campaign-list-grid-view'
,
()
=>
import
(
'@pages/marketing/campaign-list-grid-view/campaign-list-grid-view.vue'
));
Vue
.
component
(
'lead-grid-view'
,
()
=>
import
(
'@pages/sales/lead-grid-view/lead-grid-view.vue'
));
Vue
.
component
(
'activity-pointer-edit-view'
,
()
=>
import
(
'@pages/base/activity-pointer-edit-view/activity-pointer-edit-view.vue'
));
Vue
.
component
(
'subject-pickup-view'
,
()
=>
import
(
'@pages/base/subject-pickup-view/subject-pickup-view.vue'
));
Vue
.
component
(
'sales-literature-grid-view'
,
()
=>
import
(
'@pages/sales/sales-literature-grid-view/sales-literature-grid-view.vue'
));
Vue
.
component
(
'product-edit-view'
,
()
=>
import
(
'@pages/product/product-edit-view/product-edit-view.vue'
));
Vue
.
component
(
'quote-grid-view'
,
()
=>
import
(
'@pages/sales/quote-grid-view/quote-grid-view.vue'
));
...
...
app_CRM/src/pages/ungroup/central/router.ts
浏览文件 @
fdbe8b2c
...
...
@@ -856,6 +856,34 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/finance/invoice-grid-view/invoice-grid-view.vue'
),
},
{
path
:
'salesliteratures/:salesliterature?/quickcreateview/:quickcreateview?'
,
meta
:
{
caption
:
'entities.salesliterature.views.quickcreateview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'salesliteratures'
,
parameterName
:
'salesliterature'
},
{
pathName
:
'quickcreateview'
,
parameterName
:
'quickcreateview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sales/sales-literature-quick-create-view/sales-literature-quick-create-view.vue'
),
},
{
path
:
'subjects/:subject?/pickupgridview/:pickupgridview?'
,
meta
:
{
caption
:
'entities.subject.views.pickupgridview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'subjects'
,
parameterName
:
'subject'
},
{
pathName
:
'pickupgridview'
,
parameterName
:
'pickupgridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/base/subject-pickup-grid-view/subject-pickup-grid-view.vue'
),
},
{
path
:
'accounts/:account?/contacts/:contact?/opportunities/:opportunity?/quotes/:quote?/info/:info?'
,
meta
:
{
...
...
@@ -1299,27 +1327,27 @@ const router = new Router({
component
:
()
=>
import
(
'@pages/finance/invoice-detail-edit-view/invoice-detail-edit-view.vue'
),
},
{
path
:
'
campaigns/:campaign?/gridview/:gridview
?'
,
path
:
'
accounts/:account?/contacts/:contact?/editmarket/:editmarket
?'
,
meta
:
{
caption
:
'entities.c
ampaign.views.gridview
.title'
,
caption
:
'entities.c
ontact.views.editmarket
.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'campaigns'
,
parameterName
:
'campaign'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
{
pathName
:
'contacts'
,
parameterName
:
'contact'
},
{
pathName
:
'editmarket'
,
parameterName
:
'editmarket'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/
marketing/campaign-grid-view/campaign-grid-view
.vue'
),
component
:
()
=>
import
(
'@pages/
base/contact-edit-market/contact-edit-market
.vue'
),
},
{
path
:
'
accounts/:account?/
contacts/:contact?/editmarket/:editmarket?'
,
path
:
'contacts/:contact?/editmarket/:editmarket?'
,
meta
:
{
caption
:
'entities.contact.views.editmarket.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
{
pathName
:
'contacts'
,
parameterName
:
'contact'
},
{
pathName
:
'editmarket'
,
parameterName
:
'editmarket'
},
],
...
...
@@ -1328,18 +1356,18 @@ const router = new Router({
component
:
()
=>
import
(
'@pages/base/contact-edit-market/contact-edit-market.vue'
),
},
{
path
:
'c
ontacts/:contact?/editmarket/:editmarket
?'
,
path
:
'c
ampaigns/:campaign?/gridview/:gridview
?'
,
meta
:
{
caption
:
'entities.c
ontact.views.editmarket
.title'
,
caption
:
'entities.c
ampaign.views.gridview
.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'c
ontacts'
,
parameterName
:
'contact
'
},
{
pathName
:
'
editmarket'
,
parameterName
:
'editmarket
'
},
{
pathName
:
'c
ampaigns'
,
parameterName
:
'campaign
'
},
{
pathName
:
'
gridview'
,
parameterName
:
'gridview
'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/
base/contact-edit-market/contact-edit-market
.vue'
),
component
:
()
=>
import
(
'@pages/
marketing/campaign-grid-view/campaign-grid-view
.vue'
),
},
{
path
:
'accounts/:account?/contacts/:contact?/leads/:lead?/listleads/:listlead?/bylist/:bylist?'
,
...
...
@@ -2321,6 +2349,20 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/base/activity-pointer-edit-view/activity-pointer-edit-view.vue'
),
},
{
path
:
'subjects/:subject?/pickupview/:pickupview?'
,
meta
:
{
caption
:
'entities.subject.views.pickupview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'subjects'
,
parameterName
:
'subject'
},
{
pathName
:
'pickupview'
,
parameterName
:
'pickupview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/base/subject-pickup-view/subject-pickup-view.vue'
),
},
{
path
:
'salesliteratures/:salesliterature?/gridview/:gridview?'
,
meta
:
{
...
...
app_CRM/src/store/modules/view-action/state.ts
浏览文件 @
fdbe8b2c
...
...
@@ -183,6 +183,15 @@ export const viewstate: any = {
'a5213905238dbc5d8e1a505029105cc9'
,
],
},
{
viewtag
:
'19e1193c4075ae18f2f29095bb8841fa'
,
viewmodule
:
'Base'
,
viewname
:
'SubjectPickupGridView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
],
},
{
viewtag
:
'1bc48b15dbe69c5f30dafe489f58aacb'
,
viewmodule
:
'Sales'
,
...
...
@@ -949,6 +958,7 @@ export const viewstate: any = {
viewdatachange
:
false
,
refviews
:
[
'303fcfed216ca770612be2c0a97be789'
,
'e45cd3d0a9959e1979243837b5dcfd2d'
,
],
},
{
...
...
@@ -1523,6 +1533,26 @@ export const viewstate: any = {
refviews
:
[
],
},
{
viewtag
:
'e45cd3d0a9959e1979243837b5dcfd2d'
,
viewmodule
:
'Sales'
,
viewname
:
'SalesLiteratureQuickCreateView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'e52af970c14fd89546ac8ccaecab460c'
,
],
},
{
viewtag
:
'e52af970c14fd89546ac8ccaecab460c'
,
viewmodule
:
'Base'
,
viewname
:
'SubjectPickupView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'19e1193c4075ae18f2f29095bb8841fa'
,
],
},
{
viewtag
:
'e58ac89b5c246602406093577b77248f'
,
viewmodule
:
'Sales'
,
...
...
app_CRM/src/uiservice/sales-literature/sales-literature-ui-service-base.ts
浏览文件 @
fdbe8b2c
...
...
@@ -92,6 +92,66 @@ export default class SalesLiteratureUIServiceBase 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
SalesLiterature_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
:
'salesliteratures'
,
parameterName
:
'salesliterature'
},
];
const
openDrawer
=
(
view
:
any
,
data
:
any
)
=>
{
let
container
:
Subject
<
any
>
=
actionContext
.
$appdrawer
.
openDrawer
(
view
,
context
,
data
);
container
.
subscribe
((
result
:
any
)
=>
{
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
return
;
}
const
_this
:
any
=
actionContext
;
if
(
window
.
opener
){
window
.
opener
.
postMessage
({
status
:
'OK'
,
identification
:
'WF'
},
Environment
.
uniteAddress
);
window
.
close
();
}
return
result
.
datas
;
});
}
const
view
:
any
=
{
viewname
:
'sales-literature-quick-create-view'
,
height
:
0
,
width
:
0
,
title
:
actionContext
.
$t
(
'entities.salesliterature.views.quickcreateview.title'
),
placement
:
'DRAWER_RIGHT'
,
};
openDrawer
(
view
,
data
);
}
/**
* 获取指定数据的重定向页面
...
...
app_CRM/src/widgets/sales-literature/quick-create-form/quick-create-form-base.tsx
0 → 100644
浏览文件 @
fdbe8b2c
import
{
Prop
,
Provide
,
Emit
,
Model
}
from
'vue-property-decorator'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
Watch
,
EditFormControlBase
}
from
'@/studio-core'
;
import
SalesLiteratureService
from
'@/service/sales-literature/sales-literature-service'
;
import
QuickCreateService
from
'./quick-create-form-service'
;
import
{
FormButtonModel
,
FormPageModel
,
FormItemModel
,
FormDRUIPartModel
,
FormPartModel
,
FormGroupPanelModel
,
FormIFrameModel
,
FormRowItemModel
,
FormTabPageModel
,
FormTabPanelModel
,
FormUserControlModel
}
from
'@/model/form-detail'
;
/**
* form部件基类
*
* @export
* @class EditFormControlBase
* @extends {QuickCreateEditFormBase}
*/
export
class
QuickCreateEditFormBase
extends
EditFormControlBase
{
/**
* 建构部件服务对象
*
* @type {QuickCreateService}
* @memberof QuickCreateEditFormBase
*/
public
service
:
QuickCreateService
=
new
QuickCreateService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {SalesLiteratureService}
* @memberof QuickCreateEditFormBase
*/
public
appEntityService
:
SalesLiteratureService
=
new
SalesLiteratureService
({
$store
:
this
.
$store
});
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof QuickCreateEditFormBase
*/
protected
appDeName
:
string
=
'salesliterature'
;
/**
* 表单数据对象
*
* @type {*}
* @memberof QuickCreateEditFormBase
*/
public
data
:
any
=
{
srfupdatedate
:
null
,
srforikey
:
null
,
srfkey
:
null
,
srfmajortext
:
null
,
srftempmode
:
null
,
srfuf
:
null
,
srfdeid
:
null
,
srfsourcekey
:
null
,
salesliteraturename
:
null
,
subjectname
:
null
,
literaturetypecode
:
null
,
subjectid
:
null
,
salesliteratureid
:
null
,
salesliterature
:
null
,
};
/**
* 属性值规则
*
* @type {*}
* @memberof QuickCreateEditFormBase
*/
public
rules
:
any
=
{
srfupdatedate
:
[
{
required
:
false
,
type
:
'string'
,
message
:
'更新时间 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'更新时间 值不能为空'
,
trigger
:
'blur'
},
],
srforikey
:
[
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'blur'
},
],
srfkey
:
[
{
required
:
false
,
type
:
'string'
,
message
:
'销售宣传资料 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'销售宣传资料 值不能为空'
,
trigger
:
'blur'
},
],
srfmajortext
:
[
{
required
:
false
,
type
:
'string'
,
message
:
'销售资料名称 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'销售资料名称 值不能为空'
,
trigger
:
'blur'
},
],
srftempmode
:
[
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'blur'
},
],
srfuf
:
[
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'blur'
},
],
srfdeid
:
[
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'blur'
},
],
srfsourcekey
:
[
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'blur'
},
],
salesliteraturename
:
[
{
required
:
true
,
type
:
'string'
,
message
:
'标题 值不能为空'
,
trigger
:
'change'
},
{
required
:
true
,
type
:
'string'
,
message
:
'标题 值不能为空'
,
trigger
:
'blur'
},
],
subjectname
:
[
{
required
:
false
,
type
:
'string'
,
message
:
'主题 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'主题 值不能为空'
,
trigger
:
'blur'
},
],
literaturetypecode
:
[
{
required
:
false
,
type
:
'string'
,
message
:
'类型 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'类型 值不能为空'
,
trigger
:
'blur'
},
],
subjectid
:
[
{
required
:
false
,
type
:
'string'
,
message
:
'主题 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'主题 值不能为空'
,
trigger
:
'blur'
},
],
salesliteratureid
:
[
{
required
:
false
,
type
:
'string'
,
message
:
'销售宣传资料 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'销售宣传资料 值不能为空'
,
trigger
:
'blur'
},
],
}
/**
* 详情模型集合
*
* @type {*}
* @memberof QuickCreateEditFormBase
*/
public
detailsModel
:
any
=
{
group1
:
new
FormGroupPanelModel
({
caption
:
'销售宣传资料基本信息'
,
detailType
:
'GROUPPANEL'
,
name
:
'group1'
,
visible
:
true
,
isShowCaption
:
false
,
form
:
this
,
uiActionGroup
:
{
caption
:
''
,
langbase
:
'entities.salesliterature.quickcreate_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
}),
salesliteraturename
:
new
FormItemModel
({
caption
:
'标题'
,
detailType
:
'FORMITEM'
,
name
:
'salesliteraturename'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
subjectname
:
new
FormItemModel
({
caption
:
'主题'
,
detailType
:
'FORMITEM'
,
name
:
'subjectname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
literaturetypecode
:
new
FormItemModel
({
caption
:
'类型'
,
detailType
:
'FORMITEM'
,
name
:
'literaturetypecode'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
subjectid
:
new
FormItemModel
({
caption
:
'主题'
,
detailType
:
'FORMITEM'
,
name
:
'subjectid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
salesliteratureid
:
new
FormItemModel
({
caption
:
'销售宣传资料'
,
detailType
:
'FORMITEM'
,
name
:
'salesliteratureid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
1
}),
};
}
\ No newline at end of file
app_CRM/src/widgets/sales-literature/quick-create-form/quick-create-form-model.ts
0 → 100644
浏览文件 @
fdbe8b2c
/**
* QuickCreate 部件模型
*
* @export
* @class QuickCreateModel
*/
export
default
class
QuickCreateModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof QuickCreateModel
*/
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
:
'salesliteratureid'
,
dataType
:
'GUID'
,
},
{
name
:
'srfmajortext'
,
prop
:
'salesliteraturename'
,
dataType
:
'TEXT'
,
},
{
name
:
'srftempmode'
,
},
{
name
:
'srfuf'
,
},
{
name
:
'srfdeid'
,
},
{
name
:
'srfsourcekey'
,
},
{
name
:
'salesliteraturename'
,
prop
:
'salesliteraturename'
,
dataType
:
'TEXT'
,
},
{
name
:
'subjectname'
,
prop
:
'subjectname'
,
dataType
:
'PICKUPTEXT'
,
},
{
name
:
'literaturetypecode'
,
prop
:
'literaturetypecode'
,
dataType
:
'SSCODELIST'
,
},
{
name
:
'subjectid'
,
prop
:
'subjectid'
,
dataType
:
'PICKUP'
,
},
{
name
:
'salesliteratureid'
,
prop
:
'salesliteratureid'
,
dataType
:
'GUID'
,
},
{
name
:
'salesliterature'
,
prop
:
'salesliteratureid'
,
dataType
:
'FONTKEY'
,
},
]
}
}
\ No newline at end of file
app_CRM/src/widgets/sales-literature/quick-create-form/quick-create-form-service.ts
0 → 100644
浏览文件 @
fdbe8b2c
import
{
Http
,
Util
,
Errorlog
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
import
SalesLiteratureService
from
'@/service/sales-literature/sales-literature-service'
;
import
QuickCreateModel
from
'./quick-create-form-model'
;
import
SubjectService
from
'@/service/subject/subject-service'
;
/**
* QuickCreate 部件服务对象
*
* @export
* @class QuickCreateService
*/
export
default
class
QuickCreateService
extends
ControlService
{
/**
* 销售宣传资料服务对象
*
* @type {SalesLiteratureService}
* @memberof QuickCreateService
*/
public
appEntityService
:
SalesLiteratureService
=
new
SalesLiteratureService
({
$store
:
this
.
getStore
()
});
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof QuickCreateService
*/
public
setTempMode
(){
this
.
isTempMode
=
false
;
}
/**
* Creates an instance of QuickCreateService.
*
* @param {*} [opts={}]
* @memberof QuickCreateService
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
model
=
new
QuickCreateModel
();
}
/**
* 主题服务对象
*
* @type {SubjectService}
* @memberof QuickCreateService
*/
public
subjectService
:
SubjectService
=
new
SubjectService
();
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof QuickCreateService
*/
private
doItems
(
promise
:
Promise
<
any
>
,
deKeyField
:
string
,
deName
:
string
):
Promise
<
any
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
promise
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
200
)
{
const
data
=
response
.
data
;
data
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
item
[
deName
]
=
item
[
deKeyField
];
data
[
index
]
=
item
;
});
resolve
(
data
);
}
else
{
reject
([])
}
}).
catch
((
response
:
any
)
=>
{
reject
([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof QuickCreateService
*/
@
Errorlog
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
if
(
Object
.
is
(
serviceName
,
'SubjectService'
)
&&
Object
.
is
(
interfaceName
,
'FetchDefault'
))
{
return
this
.
doItems
(
this
.
subjectService
.
FetchDefault
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'subjectid'
,
'subject'
);
}
return
Promise
.
reject
([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof QuickCreateService
*/
@
Errorlog
public
wfstart
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
,
localdata
?:
any
):
Promise
<
any
>
{
data
=
this
.
handleWFData
(
data
);
context
=
this
.
handleRequestData
(
action
,
context
,
data
).
context
;
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
context
,
data
,
isloading
,
localdata
);
}
else
{
result
=
this
.
appEntityService
.
WFStart
(
context
,
data
,
isloading
,
localdata
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof QuickCreateService
*/
@
Errorlog
public
wfsubmit
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
,
localdata
?:
any
):
Promise
<
any
>
{
data
=
this
.
handleWFData
(
data
,
true
);
context
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
).
context
;
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
context
,
data
,
isloading
,
localdata
);
}
else
{
result
=
this
.
appEntityService
.
WFSubmit
(
context
,
data
,
isloading
,
localdata
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof QuickCreateService
*/
@
Errorlog
public
add
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
Create
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof QuickCreateService
*/
@
Errorlog
public
delete
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
Remove
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof QuickCreateService
*/
@
Errorlog
public
update
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
Update
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof QuickCreateService
*/
@
Errorlog
public
get
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
Get
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof QuickCreateService
*/
@
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
.
salesliteratureid
=
PrimaryKey
;
Data
.
salesliterature
=
PrimaryKey
;
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
GetDraft
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
response
.
data
.
salesliteratureid
=
PrimaryKey
;
this
.
handleResponse
(
action
,
response
,
true
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof QuickCreateService
*/
@
Errorlog
public
frontLogic
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
return
Promise
.
reject
({
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
'系统异常'
}
});
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
,
true
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof QuickCreateService
*/
public
handleRequestData
(
action
:
string
,
context
:
any
,
data
:
any
=
{},
isMerge
:
boolean
=
false
){
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
let
requestData
:
any
=
{};
if
(
isMerge
&&
(
data
&&
data
.
viewparams
)){
Object
.
assign
(
requestData
,
data
.
viewparams
);
}
formItemItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
&&
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
'FONTKEY'
)){
if
(
item
&&
item
.
prop
){
requestData
[
item
.
prop
]
=
context
[
item
.
name
];
}
}
else
{
if
(
item
&&
item
.
prop
){
requestData
[
item
.
prop
]
=
data
[
item
.
name
];
}
}
});
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
if
(
tempContext
&&
tempContext
.
srfsessionid
){
tempContext
.
srfsessionkey
=
tempContext
.
srfsessionid
;
delete
tempContext
.
srfsessionid
;
}
return
{
context
:
tempContext
,
data
:
requestData
};
}
}
\ No newline at end of file
app_CRM/src/widgets/sales-literature/quick-create-form/quick-create-form.html
0 → 100644
浏览文件 @
fdbe8b2c
<i-form
:model=
"this.data"
class=
'app-form'
ref=
'form'
id=
'salesliterature_quickcreate'
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.salesliterature.quickcreate_form.details.group1')"
:isShowCaption=
"false"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"0"
:isInfoGroupMode=
"false"
>
<row>
<i-col
v-show=
"detailsModel.salesliteraturename.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-item
name=
'salesliteraturename'
:itemRules=
"this.rules.salesliteraturename"
class=
''
:caption=
"$t('entities.salesliterature.quickcreate_form.details.salesliteraturename')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.salesliteraturename.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.salesliteraturename"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.salesliteraturename.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.subjectname.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-item
name=
'subjectname'
:itemRules=
"this.rules.subjectname"
class=
''
:caption=
"$t('entities.salesliterature.quickcreate_form.details.subjectname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.subjectname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-picker
:formState=
"formState"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'{ }'
:localParam =
'{ }'
:disabled=
"detailsModel.subjectname.disabled"
name=
'subjectname'
deMajorField=
'title'
deKeyField=
'subject'
:service=
"service"
:acParams=
"{ serviceName: 'SubjectService', interfaceName: 'FetchDefault'}"
valueitem=
'subjectid'
:value=
"data.subjectname"
editortype=
""
:pickupView=
"{ viewname: 'subject-pickup-view', title: $t('entities.subject.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'subjects', parameterName: 'subject' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=
""
@
formitemvaluechange=
"onFormItemValueChange($event)"
>
</app-picker>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.literaturetypecode.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-item
name=
'literaturetypecode'
:itemRules=
"this.rules.literaturetypecode"
class=
''
:caption=
"$t('entities.salesliterature.quickcreate_form.details.literaturetypecode')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.literaturetypecode.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<dropdown-list
v-model=
"data.literaturetypecode"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'{ }'
:localParam =
'{ }'
:disabled=
"detailsModel.literaturetypecode.disabled"
tag=
'Salesliterature__LiteratureTypeCode'
codelistType=
'STATIC'
placeholder=
'请选择...'
style=
""
>
</dropdown-list>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</row>
</i-form>
\ No newline at end of file
app_CRM/src/widgets/sales-literature/quick-create-form/quick-create-form.vue
0 → 100644
浏览文件 @
fdbe8b2c
<
template
src=
"./quick-create-form.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { QuickCreateEditFormBase } from './quick-create-form-base';
/**
* form部件
*
* @export
* @class QuickCreateEditForm
* @extends {QuickCreateEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class QuickCreateEditForm extends QuickCreateEditFormBase { }
</script>
app_CRM/src/widgets/subject/default-searchform/default-searchform-base.tsx
0 → 100644
浏览文件 @
fdbe8b2c
import
{
Prop
,
Provide
,
Emit
,
Model
}
from
'vue-property-decorator'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
Watch
,
SearchFormControlBase
}
from
'@/studio-core'
;
import
SubjectService
from
'@/service/subject/subject-service'
;
import
DefaultService
from
'./default-searchform-service'
;
import
{
FormButtonModel
,
FormPageModel
,
FormItemModel
,
FormDRUIPartModel
,
FormPartModel
,
FormGroupPanelModel
,
FormIFrameModel
,
FormRowItemModel
,
FormTabPageModel
,
FormTabPanelModel
,
FormUserControlModel
}
from
'@/model/form-detail'
;
import
{
debounceTime
,
distinctUntilChanged
}
from
'rxjs/operators'
;
/**
* searchform部件基类
*
* @export
* @class SearchFormControlBase
* @extends {DefaultSearchFormBase}
*/
export
class
DefaultSearchFormBase
extends
SearchFormControlBase
{
/**
* 建构部件服务对象
*
* @type {DefaultService}
* @memberof DefaultSearchFormBase
*/
public
service
:
DefaultService
=
new
DefaultService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {SubjectService}
* @memberof DefaultSearchFormBase
*/
public
appEntityService
:
SubjectService
=
new
SubjectService
({
$store
:
this
.
$store
});
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected
appDeName
:
string
=
'subject'
;
/**
* 表单数据对象
*
* @type {*}
* @memberof DefaultSearchFormBase
*/
public
data
:
any
=
{
};
/**
* 详情模型集合
*
* @type {*}
* @memberof DefaultSearchFormBase
*/
public
detailsModel
:
any
=
{
formpage1
:
new
FormPageModel
({
caption
:
'常规条件'
,
detailType
:
'FORMPAGE'
,
name
:
'formpage1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
})
,
};
}
\ No newline at end of file
app_CRM/src/widgets/subject/default-searchform/default-searchform-model.ts
0 → 100644
浏览文件 @
fdbe8b2c
/**
* Default 部件模型
*
* @export
* @class DefaultModel
*/
export
default
class
DefaultModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof DefaultModel
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'srfwfmemo'
,
prop
:
'srfwfmemo'
,
dataType
:
'TEXT'
,
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name
:
'srffrontuf'
,
prop
:
'srffrontuf'
,
dataType
:
'TEXT'
,
},
]
}
}
\ No newline at end of file
app_CRM/src/widgets/subject/default-searchform/default-searchform-service.ts
0 → 100644
浏览文件 @
fdbe8b2c
import
{
Http
,
Util
,
Errorlog
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
import
SubjectService
from
'@/service/subject/subject-service'
;
import
DefaultModel
from
'./default-searchform-model'
;
/**
* Default 部件服务对象
*
* @export
* @class DefaultService
*/
export
default
class
DefaultService
extends
ControlService
{
/**
* 主题服务对象
*
* @type {SubjectService}
* @memberof DefaultService
*/
public
appEntityService
:
SubjectService
=
new
SubjectService
({
$store
:
this
.
getStore
()
});
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof DefaultService
*/
public
setTempMode
(){
this
.
isTempMode
=
false
;
}
/**
* Creates an instance of DefaultService.
*
* @param {*} [opts={}]
* @memberof DefaultService
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
model
=
new
DefaultModel
();
}
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof DefaultService
*/
private
doItems
(
promise
:
Promise
<
any
>
,
deKeyField
:
string
,
deName
:
string
):
Promise
<
any
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
promise
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
200
)
{
const
data
=
response
.
data
;
data
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
item
[
deName
]
=
item
[
deKeyField
];
data
[
index
]
=
item
;
});
resolve
(
data
);
}
else
{
reject
([])
}
}).
catch
((
response
:
any
)
=>
{
reject
([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof DefaultService
*/
@
Errorlog
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
return
Promise
.
reject
([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@
Errorlog
public
wfstart
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
,
localdata
?:
any
):
Promise
<
any
>
{
data
=
this
.
handleWFData
(
data
);
context
=
this
.
handleRequestData
(
action
,
context
,
data
).
context
;
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
context
,
data
,
isloading
,
localdata
);
}
else
{
result
=
this
.
appEntityService
.
WFStart
(
context
,
data
,
isloading
,
localdata
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@
Errorlog
public
wfsubmit
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
,
localdata
?:
any
):
Promise
<
any
>
{
data
=
this
.
handleWFData
(
data
,
true
);
context
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
).
context
;
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
context
,
data
,
isloading
,
localdata
);
}
else
{
result
=
this
.
appEntityService
.
WFSubmit
(
context
,
data
,
isloading
,
localdata
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@
Errorlog
public
add
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
Create
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@
Errorlog
public
delete
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
Remove
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@
Errorlog
public
update
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
Update
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@
Errorlog
public
get
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
Get
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@
Errorlog
public
loadDraft
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
GetDraft
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
,
true
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@
Errorlog
public
frontLogic
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
return
Promise
.
reject
({
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
'系统异常'
}
});
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
,
true
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof DefaultService
*/
public
handleRequestData
(
action
:
string
,
context
:
any
,
data
:
any
=
{},
isMerge
:
boolean
=
false
){
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
let
requestData
:
any
=
{};
if
(
isMerge
&&
(
data
&&
data
.
viewparams
)){
Object
.
assign
(
requestData
,
data
.
viewparams
);
}
formItemItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
&&
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
'FONTKEY'
)){
if
(
item
&&
item
.
prop
){
requestData
[
item
.
prop
]
=
context
[
item
.
name
];
}
}
else
{
if
(
item
&&
item
.
prop
){
requestData
[
item
.
prop
]
=
data
[
item
.
name
];
}
}
});
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
if
(
tempContext
&&
tempContext
.
srfsessionid
){
tempContext
.
srfsessionkey
=
tempContext
.
srfsessionid
;
delete
tempContext
.
srfsessionid
;
}
return
{
context
:
tempContext
,
data
:
requestData
};
}
}
\ No newline at end of file
app_CRM/src/widgets/subject/default-searchform/default-searchform.html
0 → 100644
浏览文件 @
fdbe8b2c
<i-form
:model=
"this.data"
class=
'app-search-form'
ref=
'searchform'
style=
""
>
<input
style=
"display:none;"
/>
<div
class=
"search-button"
>
<i-button
size=
"small"
type=
"primary"
ghost
@
click=
"onSearch.apply(_self, arguments)"
>
{{$t('app.searchButton.search')}}
</i-button>
<i-button
size=
"small"
type=
"default"
ghost
@
click=
"onReset.apply(_self, arguments)"
>
{{this.$t('app.searchButton.reset')}}
</i-button>
</div>
<div
class=
"form-content"
>
</div>
</i-form>
\ No newline at end of file
app_CRM/src/widgets/subject/default-searchform/default-searchform.vue
0 → 100644
浏览文件 @
fdbe8b2c
<
template
src=
"./default-searchform.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { DefaultSearchFormBase } from './default-searchform-base';
/**
* searchform部件
*
* @export
* @class DefaultSearchForm
* @extends {DefaultSearchFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class DefaultSearchForm extends DefaultSearchFormBase { }
</script>
app_CRM/src/widgets/subject/main-grid/main-grid-base.tsx
0 → 100644
浏览文件 @
fdbe8b2c
import
{
Prop
,
Provide
,
Emit
,
Model
}
from
'vue-property-decorator'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
Watch
,
GridControllerBase
}
from
'@/studio-core'
;
import
SubjectService
from
'@/service/subject/subject-service'
;
import
MainService
from
'./main-grid-service'
;
import
{
FormItemModel
}
from
'@/model/form-detail'
;
/**
* grid部件基类
*
* @export
* @class GridControllerBase
* @extends {MainGridBase}
*/
export
class
MainGridBase
extends
GridControllerBase
{
/**
* 建构部件服务对象
*
* @type {MainService}
* @memberof MainGridBase
*/
public
service
:
MainService
=
new
MainService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {SubjectService}
* @memberof MainGridBase
*/
public
appEntityService
:
SubjectService
=
new
SubjectService
({
$store
:
this
.
$store
});
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainGridBase
*/
protected
appDeName
:
string
=
'subject'
;
/**
* 本地缓存标识
*
* @protected
* @type {string}
* @memberof GridControllerBase
*/
protected
localStorageTag
:
string
=
'subject_main_grid'
;
/**
* 所有列成员
*
* @type {any[]}
* @memberof MainGridBase
*/
public
allColumns
:
any
[]
=
[
{
name
:
'title'
,
label
:
'标题'
,
langtag
:
'entities.subject.main_grid.columns.title'
,
show
:
true
,
util
:
'PX'
},
{
name
:
'updateman'
,
label
:
'更新人'
,
langtag
:
'entities.subject.main_grid.columns.updateman'
,
show
:
true
,
util
:
'PX'
},
{
name
:
'updatedate'
,
label
:
'更新时间'
,
langtag
:
'entities.subject.main_grid.columns.updatedate'
,
show
:
true
,
util
:
'PX'
},
]
/**
* 获取表格行模型
*
* @type {*}
* @memberof MainGridBase
*/
public
getGridRowModel
(){
return
{
srfkey
:
new
FormItemModel
(),
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof MainGridBase
*/
public
rules
:
any
=
{
srfkey
:
[
{
required
:
false
,
validator
:
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
return
(
rule
.
required
&&
(
value
===
null
||
value
===
undefined
||
value
===
""
))
?
false
:
true
;},
message
:
'主题 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
validator
:
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
return
(
rule
.
required
&&
(
value
===
null
||
value
===
undefined
||
value
===
""
))
?
false
:
true
;},
message
:
'主题 值不能为空'
,
trigger
:
'blur'
},
],
}
/**
* 获取对应列class
*
* @type {*}
* @memberof MainBase
*/
public
hasRowEdit
:
any
=
{
'title'
:
false
,
'updateman'
:
false
,
'updatedate'
:
false
,
};
/**
* 获取对应列class
*
* @param {*} $args row 行数据,column 列数据,rowIndex 行索引,列索引
* @returns {void}
* @memberof MainBase
*/
public
getCellClassName
(
args
:
{
row
:
any
,
column
:
any
,
rowIndex
:
number
,
columnIndex
:
number
}):
any
{
return
(
this
.
hasRowEdit
[
args
.
column
.
property
]
&&
this
.
actualIsOpenEdit
)
?
"edit-cell"
:
"info-cell"
;
}
}
\ No newline at end of file
app_CRM/src/widgets/subject/main-grid/main-grid-model.ts
0 → 100644
浏览文件 @
fdbe8b2c
/**
* Main 部件模型
*
* @export
* @class MainModel
*/
export
default
class
MainModel
{
/**
* 是否是实体数据导出
*
* @returns {any[]}
* @memberof MainGridMode
*/
public
isDEExport
:
boolean
=
false
;
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof MainGridMode
*/
public
getDataItems
():
any
[]
{
if
(
this
.
isDEExport
){
return
[
]
}
else
{
return
[
{
name
:
'parentsubject'
,
prop
:
'parentsubject'
,
dataType
:
'PICKUP'
,
},
{
name
:
'title'
,
prop
:
'title'
,
dataType
:
'TEXT'
,
},
{
name
:
'updateman'
,
prop
:
'updateman'
,
dataType
:
'TEXT'
,
},
{
name
:
'updatedate'
,
prop
:
'updatedate'
,
dataType
:
'DATETIME'
,
},
{
name
:
'srfmajortext'
,
prop
:
'title'
,
dataType
:
'TEXT'
,
},
{
name
:
'srfdataaccaction'
,
prop
:
'subjectid'
,
dataType
:
'GUID'
,
},
{
name
:
'srfkey'
,
prop
:
'subjectid'
,
dataType
:
'GUID'
,
},
{
name
:
'subject'
,
prop
:
'subjectid'
,
},
{
name
:
'size'
,
prop
:
'size'
},
{
name
:
'query'
,
prop
:
'query'
},
{
name
:
'page'
,
prop
:
'page'
},
{
name
:
'sort'
,
prop
:
'sort'
},
{
name
:
'srfparentdata'
,
prop
:
'srfparentdata'
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name
:
'srffrontuf'
,
prop
:
'srffrontuf'
,
dataType
:
'TEXT'
,
},
]
}
}
}
\ No newline at end of file
app_CRM/src/widgets/subject/main-grid/main-grid-service.ts
0 → 100644
浏览文件 @
fdbe8b2c
import
{
Http
,
Util
,
Errorlog
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
import
SubjectService
from
'@/service/subject/subject-service'
;
import
MainModel
from
'./main-grid-model'
;
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export
default
class
MainService
extends
ControlService
{
/**
* 主题服务对象
*
* @type {SubjectService}
* @memberof MainService
*/
public
appEntityService
:
SubjectService
=
new
SubjectService
({
$store
:
this
.
getStore
()
});
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof MainService
*/
public
setTempMode
(){
this
.
isTempMode
=
false
;
}
/**
* Creates an instance of MainService.
*
* @param {*} [opts={}]
* @memberof MainService
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
model
=
new
MainModel
();
}
/**
* 处理数据
*
* @public
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof MainService
*/
public
doItems
(
promise
:
Promise
<
any
>
,
deKeyField
:
string
,
deName
:
string
):
Promise
<
any
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
promise
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
200
)
{
const
data
=
response
.
data
;
data
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
item
[
deName
]
=
item
[
deKeyField
];
data
[
index
]
=
item
;
});
resolve
(
data
);
}
else
{
reject
([])
}
}).
catch
((
response
:
any
)
=>
{
reject
([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof MainService
*/
@
Errorlog
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
return
Promise
.
reject
([])
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@
Errorlog
public
add
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
Create
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@
Errorlog
public
delete
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
Remove
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@
Errorlog
public
update
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Data
,
Context
,
isloading
);
}
else
{
result
=
_appEntityService
.
Update
(
Data
,
Context
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 获取数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@
Errorlog
public
get
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
Get
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
//处理返回数据,补充判断标识
if
(
response
.
data
){
Object
.
assign
(
response
.
data
,{
srfuf
:
0
});
}
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@
Errorlog
public
search
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
FetchDefault
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@
Errorlog
public
loadDraft
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
GetDraft
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
//处理返回数据,补充判断标识
if
(
response
.
data
){
Object
.
assign
(
response
.
data
,{
srfuf
:
'0'
});
//仿真主键数据
response
.
data
.
subjectid
=
Util
.
createUUID
();
}
this
.
handleResponse
(
action
,
response
,
true
);
this
.
mergeDefaults
(
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 合并配置的默认值
* @param {*}
* @memberof MainService
*/
public
mergeDefaults
(
response
:
any
=
{}){
if
(
response
.
data
){
}
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@
Errorlog
public
frontLogic
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
return
Promise
.
reject
({
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
'系统异常'
}
});
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
})
}
}
\ No newline at end of file
app_CRM/src/widgets/subject/main-grid/main-grid.html
0 → 100644
浏览文件 @
fdbe8b2c
<div
:class=
"{ 'grid': true, 'show-paging-bar': isEnablePagingBar, 'hidden-paging-bar': !isEnablePagingBar }"
>
<i-form>
<el-table
v-if=
"isDisplay === true"
:default-sort=
"{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"
@
sort-change=
"onSortChange($event)"
:border=
"isDragendCol"
:highlight-current-row =
"isSingleSelect"
:row-class-name=
"getRowClassName.bind(_self)"
:cell-class-name=
"getCellClassName.bind(_self)"
size=
"mini"
stripe
@
row-click=
"rowClick($event)"
@
select-all=
"selectAll($event)"
@
select=
"select($event)"
@
row-class-name=
"onRowClassName($event)"
@
row-dblclick=
"rowDBLClick($event)"
ref=
'multipleTable'
:data=
"items"
:show-header=
"!isHideHeader"
>
<template
slot=
"empty"
>
无数据
<span
class=
"quick-toolbar"
>
</span>
</template>
<template
v-if=
"!isSingleSelect"
>
<el-table-column
align=
"center"
type=
'selection'
:width=
"checkboxColWidth"
></el-table-column>
</template>
<template
v-if=
"getColumnState('title')"
>
<el-table-column
show-overflow-tooltip
:prop=
"'title'"
:label=
"$t('entities.subject.main_grid.columns.title')"
:width=
"150"
:align=
"'left'"
:sortable=
"'custom'"
>
<template
v-slot:header=
"{column}"
>
<span
class=
"column-header "
>
{{$t('entities.subject.main_grid.columns.title')}}
</span>
</template>
<template
v-slot=
"{row,column,$index}"
>
<span>
{{row.title}}
</span>
</template>
</el-table-column>
</template>
<template
v-if=
"getColumnState('updateman')"
>
<el-table-column
show-overflow-tooltip
:prop=
"'updateman'"
:label=
"$t('entities.subject.main_grid.columns.updateman')"
:width=
"150"
:align=
"'left'"
:sortable=
"'custom'"
>
<template
v-slot:header=
"{column}"
>
<span
class=
"column-header "
>
{{$t('entities.subject.main_grid.columns.updateman')}}
</span>
</template>
<template
v-slot=
"{row,column,$index}"
>
<template
>
<codelist
:value=
"row.updateman"
tag=
'SysOperator'
codelistType=
'DYNAMIC'
></codelist>
</template>
</template>
</el-table-column>
</template>
<template
v-if=
"getColumnState('updatedate')"
>
<el-table-column
show-overflow-tooltip
:prop=
"'updatedate'"
:label=
"$t('entities.subject.main_grid.columns.updatedate')"
:width=
"150"
:align=
"'left'"
:sortable=
"'custom'"
>
<template
v-slot:header=
"{column}"
>
<span
class=
"column-header "
>
{{$t('entities.subject.main_grid.columns.updatedate')}}
</span>
</template>
<template
v-slot=
"{row,column,$index}"
>
<app-format-data
format=
"YYYY-MM-DD hh:mm:ss"
:data=
"row.updatedate"
></app-format-data>
</template>
</el-table-column>
</template>
<template
v-if=
"adaptiveState"
>
<el-table-column></el-table-column>
</template>
</el-table>
<row
class=
'grid-pagination'
v-show=
"items.length > 0"
>
<page
class=
'pull-right'
@
on-change=
"pageOnChange($event)"
@
on-page-size-change=
"onPageSizeChange($event)"
:transfer=
"true"
:total=
"totalRecord"
show-sizer
:current=
"curPage"
:page-size=
"limit"
:page-size-opts=
"[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]"
show-elevator
show-total
>
<span>
<span
class=
"page-column"
>
<poptip
transfer
placement=
"top-start"
>
<i-button
icon=
"md-menu"
>
{{$t('app.gridpage.choicecolumns')}}
</i-button>
<div
slot=
"content"
>
<template
v-for=
"col in allColumns"
>
<div
:key=
"col.name"
><el-checkbox
v-model=
"col.show"
@
change=
"onColChange()"
>
{{$t(col.langtag)}}
</el-checkbox></div>
</template>
</div>
</poptip>
</span>
<span
v-if=
"selections.length > 0"
class=
"batch-toolbar"
>
</span>
<span
class=
"page-button"
><i-button
icon=
"md-refresh"
:title=
"$t('app.gridpage.refresh')"
@
click=
"pageRefresh()"
></i-button></span>
<span>
{{$t('app.gridpage.show')}}
<span>
<template
v-if=
"items.length === 1"
>
1
</template>
<template
v-else
>
<span>
{{(curPage - 1) * limit + 1}}
-
{{totalRecord > curPage * limit ? curPage * limit : totalRecord}}
</span>
</template>
</span>
{{$t('app.gridpage.records')}},{{$t('app.gridpage.totle')}}
{{totalRecord}}
{{$t('app.gridpage.records')}}
</span>
</span>
</page>
</row>
</i-form>
</div>
\ No newline at end of file
app_CRM/src/widgets/subject/main-grid/main-grid.vue
0 → 100644
浏览文件 @
fdbe8b2c
<
template
src=
"./main-grid.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { MainGridBase } from './main-grid-base';
/**
* grid部件
*
* @export
* @class MainGrid
* @extends {MainGridBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class MainGrid extends MainGridBase { }
</script>
app_CRM/src/widgets/subject/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel-base.tsx
0 → 100644
浏览文件 @
fdbe8b2c
import
{
Prop
,
Provide
,
Emit
,
Model
}
from
'vue-property-decorator'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
Watch
,
MainControlBase
}
from
'@/studio-core'
;
import
SubjectService
from
'@/service/subject/subject-service'
;
import
PickupViewpickupviewpanelService
from
'./pickup-viewpickupviewpanel-pickupviewpanel-service'
;
import
PickupViewpickupviewpanelModel
from
'./pickup-viewpickupviewpanel-pickupviewpanel-model'
;
/**
* pickupviewpanel部件基类
*
* @export
* @class MainControlBase
* @extends {PickupViewpickupviewpanelPickupviewpanelBase}
*/
export
class
PickupViewpickupviewpanelPickupviewpanelBase
extends
MainControlBase
{
/**
* 建构部件服务对象
*
* @type {PickupViewpickupviewpanelService}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
public
service
:
PickupViewpickupviewpanelService
=
new
PickupViewpickupviewpanelService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {SubjectService}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
public
appEntityService
:
SubjectService
=
new
SubjectService
({
$store
:
this
.
$store
});
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
protected
appDeName
:
string
=
'subject'
;
/**
* 选中数据字符串
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
@
Prop
()
public
selectedData
?:
string
;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof PickupViewpickupviewpanel
*/
public
getDatas
():
any
[]
{
return
[];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof PickupViewpickupviewpanel
*/
public
getData
():
any
{
return
{};
}
/**
* 视图名称
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public
view
:
any
=
{
viewname
:
'subject-pickup-grid-view'
,
data
:
{},
}
/**
* 局部上下文
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public
localContext
:
any
=
null
;
/**
* 局部视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public
localViewParam
:
any
=
null
;
/**
* 视图数据
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public
viewdata
:
string
=
JSON
.
stringify
(
this
.
context
);
/**
* 视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public
viewparam
:
string
=
JSON
.
stringify
(
this
.
viewparams
);
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
@
Prop
({
default
:
true
})
public
isShowButton
!
:
boolean
;
/**
* 是否单选
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
@
Prop
()
public
isSingleSelect
?:
boolean
;
/**
* 初始化完成
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
public
inited
:
boolean
=
false
;
/**
* 视图数据变化
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public
onViewDatasChange
(
$event
:
any
):
void
{
if
(
$event
.
length
>
0
){
$event
.
forEach
((
item
:
any
,
index
:
any
)
=>
{
let
srfmajortext
=
item
[
'title'
];
if
(
srfmajortext
){
Object
.
assign
(
$event
[
index
],{
srfmajortext
:
srfmajortext
});
}
});
}
this
.
$emit
(
'selectionchange'
,
$event
);
}
/**
* 视图数据被激活
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public
viewDatasActivated
(
$event
:
any
):
void
{
this
.
$emit
(
'activated'
,
$event
);
}
/**
* 视图加载完成
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public
onViewLoad
(
$event
:
any
):
void
{
this
.
$emit
(
'load'
,
$event
);
}
/**
* vue 生命周期
*
* @memberof PickupViewpickupviewpanel
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof PickupViewpickupviewpanel
*/
public
afterCreated
(){
this
.
initNavParam
();
if
(
this
.
viewState
)
{
this
.
viewStateEvent
=
this
.
viewState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
if
(
!
Object
.
is
(
tag
,
this
.
name
))
{
return
;
}
if
(
Object
.
is
(
'load'
,
action
))
{
this
.
viewdata
=
JSON
.
stringify
(
this
.
context
);
this
.
viewparam
=
JSON
.
stringify
(
Object
.
assign
(
data
,
this
.
viewparams
));
this
.
inited
=
true
;
}
});
}
}
/**
* 初始化导航参数
*
* @memberof PickupViewpickupviewpanel
*/
public
initNavParam
(){
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
){
let
_context
:
any
=
this
.
$util
.
computedNavData
({},
this
.
context
,
this
.
viewparams
,
this
.
localContext
);
Object
.
assign
(
this
.
context
,
_context
);
}
if
(
this
.
localViewParam
&&
Object
.
keys
(
this
.
localViewParam
).
length
>
0
){
let
_param
:
any
=
this
.
$util
.
computedNavData
({},
this
.
context
,
this
.
viewparams
,
this
.
localViewParam
);
Object
.
assign
(
this
.
viewparams
,
_param
);
}
this
.
viewdata
=
JSON
.
stringify
(
this
.
context
);
this
.
viewparam
=
JSON
.
stringify
(
this
.
viewparams
);
}
/**
* vue 生命周期
*
* @memberof PickupViewpickupviewpanel
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof PickupViewpickupviewpanel
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
}
}
\ No newline at end of file
app_CRM/src/widgets/subject/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel-model.ts
0 → 100644
浏览文件 @
fdbe8b2c
/**
* PickupViewpickupviewpanel 部件模型
*
* @export
* @class PickupViewpickupviewpanelModel
*/
export
default
class
PickupViewpickupviewpanelModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof PickupViewpickupviewpanelModel
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'overriddencreatedon'
,
},
{
name
:
'updatedate'
,
},
{
name
:
'versionnumber'
,
},
{
name
:
'description'
,
},
{
name
:
'importsequencenumber'
,
},
{
name
:
'updateman'
,
},
{
name
:
'createdate'
,
},
{
name
:
'parentsubjectname'
,
},
{
name
:
'featuremask'
,
},
{
name
:
'createman'
,
},
{
name
:
'title'
,
},
{
name
:
'subject'
,
prop
:
'subjectid'
,
},
{
name
:
'parentsubject'
,
},
]
}
}
\ No newline at end of file
app_CRM/src/widgets/subject/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel-service.ts
0 → 100644
浏览文件 @
fdbe8b2c
import
{
Http
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
/**
* PickupViewpickupviewpanel 部件服务对象
*
* @export
* @class PickupViewpickupviewpanelService
*/
export
default
class
PickupViewpickupviewpanelService
extends
ControlService
{
}
\ No newline at end of file
app_CRM/src/widgets/subject/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel.html
0 → 100644
浏览文件 @
fdbe8b2c
<div
class=
'pickupviewpanel'
>
<component
v-if=
"inited && view.viewname && !Object.is(view.viewname, '')"
:is=
"view.viewname"
class=
"viewcontainer3"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewDefaultUsage=
"false"
:isSingleSelect=
"isSingleSelect"
:selectedData=
"selectedData"
:isShowButton=
"isShowButton"
@
viewdataschange=
"onViewDatasChange.apply(_self, arguments)"
@
viewdatasactivated=
"viewDatasActivated.apply(_self, arguments)"
@
viewload=
"onViewLoad.apply(_self, arguments)"
>
</component>
</div>
\ No newline at end of file
app_CRM/src/widgets/subject/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel.less
0 → 100644
浏览文件 @
fdbe8b2c
.pickupviewpanel{
width: 100%;
}
\ No newline at end of file
app_CRM/src/widgets/subject/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel.vue
0 → 100644
浏览文件 @
fdbe8b2c
<
template
src=
"./pickup-viewpickupviewpanel-pickupviewpanel.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { PickupViewpickupviewpanelPickupviewpanelBase } from './pickup-viewpickupviewpanel-pickupviewpanel-base';
/**
* pickupviewpanel部件
*
* @export
* @class PickupViewpickupviewpanelPickupviewpanel
* @extends {PickupViewpickupviewpanelPickupviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class PickupViewpickupviewpanelPickupviewpanel extends PickupViewpickupviewpanelPickupviewpanelBase { }
</script>
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录