1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
<#if appde??>
import ${srfclassname('${appde.getCodeName()}')}Service from '@/service/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-service';
</#if>
import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.getCodeName())}-${ctrl.getControlType()?lower_case}-model';
<#if import_block??>${import_block}</#if>
/**
* ${srfclassname('${ctrl.codeName}')} 部件服务对象
*
* @export
* @class ${srfclassname('${ctrl.codeName}')}Service
*/
export default class ${srfclassname('${ctrl.codeName}')}Service extends ControlService {
<#if appde??>
/**
* ${de.getLogicName()}服务对象
*
* @type {${srfclassname('${appde.getCodeName()}')}Service}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public appEntityService: ${srfclassname('${appde.getCodeName()}')}Service = new ${srfclassname('${appde.getCodeName()}')}Service();
</#if>
<#if view.isPSDEView()??>
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public setTempMode(){
this.isTempMode = <#if view.getTempMode?? && view.getTempMode()?? && view.getTempMode() == 2>true<#else>false</#if>;
}
</#if>
/**
* Creates an instance of ${srfclassname('${ctrl.codeName}')}Service.
*
* @param {*} [opts={}]
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
constructor(opts: any = {}) {
super(opts);
this.model = new ${srfclassname('${ctrl.codeName}')}Model();
}