@epoint-testtech/ep-stage-skill 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/codex-skill/ep-stage/code-list-generate/SKILL.md +168 -0
- package/codex-skill/ep-stage/code-list-generate/assets/code_list.template.json5 +325 -0
- package/codex-skill/ep-stage/code-list-generate/assets/example-zwplace.json5 +588 -0
- package/codex-skill/ep-stage/code-list-generate/evals/evals.json +47 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/schemeresource-req/src/main/java/com/epoint/schemeresource/action/SchemeResourceAddAction.java +119 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/schemeresource-req/src/main/java/com/epoint/schemeresource/action/SchemeResourceDetailAction.java +70 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/schemeresource-req/src/main/java/com/epoint/schemeresource/action/SchemeResourceEditAction.java +107 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/schemeresource-req/src/main/java/com/epoint/schemeresource/action/SchemeResourceListAction.java +167 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/schemeresource-req/src/main/java/com/epoint/schemeresource/api/ISchemeResourceService.java +84 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/schemeresource-req/src/main/java/com/epoint/schemeresource/api/entity/SchemeResource.java +218 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/schemeresource-req/src/main/java/com/epoint/schemeresource/impl/SchemeResourceService.java +146 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/schemeresource-req/src/main/java/com/epoint/schemeresource/impl/SchemeResourceServiceImpl.java +110 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/schemeresource-req/src/main/webapp/perpage/schemeresource/schemeresourceadd.html +158 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/schemeresource-req/src/main/webapp/perpage/schemeresource/schemeresourcedetail.html +89 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/schemeresource-req/src/main/webapp/perpage/schemeresource/schemeresourceedit.html +125 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/schemeresource-req/src/main/webapp/perpage/schemeresource/schemeresourcelist.html +224 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/zwplace-req/docs//345/234/272/346/211/200/347/252/227/345/217/243/344/277/241/346/201/257/347/256/241/347/220/206/345/217/212/345/220/204/347/253/257/347/273/237/350/256/241/346/243/200/347/264/242/346/237/245/347/234/213_prd.md +602 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/zwplace-req/src/main/java/com/epoint/zwplace/action/GxhZwPlaceAddAction.java +210 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/zwplace-req/src/main/java/com/epoint/zwplace/action/GxhZwPlaceDetailAction.java +69 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/zwplace-req/src/main/java/com/epoint/zwplace/action/GxhZwPlaceEditAction.java +235 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/zwplace-req/src/main/java/com/epoint/zwplace/action/GxhZwPlaceListAction.java +145 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/zwplace-req/src/main/java/com/epoint/zwplace/api/IGxhZwPlaceService.java +87 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/zwplace-req/src/main/java/com/epoint/zwplace/api/entity/GxhZwPlace.java +306 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/zwplace-req/src/main/java/com/epoint/zwplace/api/entity/GxhZwPlaceHistory.java +205 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/zwplace-req/src/main/java/com/epoint/zwplace/api/entity/GxhZwWindow.java +184 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/zwplace-req/src/main/java/com/epoint/zwplace/impl/GxhZwPlaceService.java +151 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/zwplace-req/src/main/java/com/epoint/zwplace/impl/GxhZwPlaceServiceImpl.java +96 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/zwplace-req/src/main/webapp/perpage/zwplace/gxhzwplaceadd.html +253 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/zwplace-req/src/main/webapp/perpage/zwplace/gxhzwplacedetail.html +146 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/zwplace-req/src/main/webapp/perpage/zwplace/gxhzwplaceedit.html +275 -0
- package/codex-skill/ep-stage/code-list-generate/evals/fixtures/zwplace-req/src/main/webapp/perpage/zwplace/gxhzwplacelist.html +168 -0
- package/codex-skill/ep-stage/code-list-generate/evals/grade-code-list.mjs +184 -0
- package/codex-skill/ep-stage/code-list-generate/references/epoint-extraction.md +106 -0
- package/codex-skill/ep-stage/code-list-generate/references/field-contract.md +122 -0
- package/codex-skill/ep-stage/code-list-generate/scripts/validate-code-list.mjs +202 -0
- package/codex-skill/ep-stage/glue-create-project/SKILL.md +227 -223
- package/dist/src/extractors/code-list-json5.d.ts +5 -0
- package/dist/src/extractors/code-list-json5.d.ts.map +1 -1
- package/dist/src/generators/stage-skeleton-script.d.ts +4 -0
- package/dist/src/generators/stage-skeleton-script.d.ts.map +1 -1
- package/dist/src/generators/stage-skeleton-script.js +399 -362
- package/dist/src/testcase/contract-testcase-assembler.d.ts +10 -1
- package/dist/src/testcase/contract-testcase-assembler.d.ts.map +1 -1
- package/dist/src/testcase/contract-testcase-assembler.js +46 -13
- package/package.json +1 -1
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8"/>
|
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
|
7
|
+
<title>方案资源文档详情页面</title>
|
|
8
|
+
<!-- 请修改相对路径 -->
|
|
9
|
+
<script src="../../frame/fui/js/cssboot.js"></script>
|
|
10
|
+
</head>
|
|
11
|
+
|
|
12
|
+
<body>
|
|
13
|
+
<!-- 必须有,加载时的loading效果 -->
|
|
14
|
+
<div class="page-loading"></div>
|
|
15
|
+
<!-- toolbar区域 -->
|
|
16
|
+
<div class="fui-toolbar">
|
|
17
|
+
<div class="btn-group mr10">
|
|
18
|
+
<a class="mini-button" state="primary" onclick="epoint.closeDialog">关闭</a>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<!-- 内容区域 -->
|
|
23
|
+
<div class="fui-content">
|
|
24
|
+
<div id="fui-form" class="fui-form" style="width:90%">
|
|
25
|
+
<div role="form">
|
|
26
|
+
|
|
27
|
+
<div role="row" id="attach" data-inline="true">
|
|
28
|
+
<div role="control" label="附件信息" starred="true">
|
|
29
|
+
<div id="uploader" class="mini-webuploader r"
|
|
30
|
+
action="getFileUploadModel" fileNumLimit="1" enableSort="true" style="width: auto"
|
|
31
|
+
fileList="#uploader1-filelist" showAsFileList="true"
|
|
32
|
+
limitType="doc,docx,pdf,xls,xlsx,ppt,pptx"></div>
|
|
33
|
+
<div id="uploader1-filelist" style="width: 100%"></div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div role="row">
|
|
38
|
+
<div role="control" label="名称">
|
|
39
|
+
<input id="scheme_name" class="mini-textbox" bind="dataBean.scheme_name"/>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div role="row">
|
|
44
|
+
<div role="control" label="类型">
|
|
45
|
+
<input class="mini-combobox" action="scheme_typeModel" id="scheme_type" bind="dataBean.scheme_type"
|
|
46
|
+
textField="text" valueField="id" emptyText="请选择..."/>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div role="row">
|
|
51
|
+
<div role="control" label="简介">
|
|
52
|
+
<textarea id="scheme_synopsis" class="mini-webeditor" readOnly="false"
|
|
53
|
+
bind="dataBean.scheme_synopsis"
|
|
54
|
+
height="300" style="height: 300px;"
|
|
55
|
+
extraUEditorConfig="{emotionLocalization: false, autoHeightEnabled: false, serverUrl: 'https://fe.epoint.com.cn/miniuiServer/ueditor_server/controller.php'}">
|
|
56
|
+
|
|
57
|
+
</textarea>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<div role="row">
|
|
62
|
+
<div role="control" label="附件大小">
|
|
63
|
+
<div class="mini-outputtext" bind="dataBean.client_size"></div>
|
|
64
|
+
</div>
|
|
65
|
+
<div role="control" label="附件类型">
|
|
66
|
+
<div class="mini-outputtext" bind="dataBean.client_type"></div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
<div role="row">
|
|
70
|
+
<div role="control" label="附件标识">
|
|
71
|
+
<div class="mini-outputtext" bind="dataBean.client_guid"></div>
|
|
72
|
+
</div>
|
|
73
|
+
<div role="control" label="排序">
|
|
74
|
+
<div class="mini-outputtext" bind="dataBean.order_num"></div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<!-- 请修改相对路径 -->
|
|
82
|
+
<script src="../../rest/resource/jsboot"></script>
|
|
83
|
+
|
|
84
|
+
<script>
|
|
85
|
+
// 初始化页面
|
|
86
|
+
epoint.initPage('schemeresourcedetailaction');
|
|
87
|
+
</script>
|
|
88
|
+
</body>
|
|
89
|
+
</html>
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8"/>
|
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
|
7
|
+
<title>方案资源文档修改</title>
|
|
8
|
+
<!-- 请修改相对路径 -->
|
|
9
|
+
<script src="../../frame/fui/js/cssboot.js"></script>
|
|
10
|
+
</head>
|
|
11
|
+
|
|
12
|
+
<body>
|
|
13
|
+
<!-- 必须有,加载时的loading效果 -->
|
|
14
|
+
<div class="page-loading"></div>
|
|
15
|
+
|
|
16
|
+
<!-- 内容区域 -->
|
|
17
|
+
<div class="fui-content">
|
|
18
|
+
<div id="fui-form" class="fui-form" style="width:90%">
|
|
19
|
+
<div role="form">
|
|
20
|
+
<input class="mini-hidden" bind="dataBean.client_guid" id="client_guid"/>
|
|
21
|
+
<input class="mini-hidden" bind="dataBean.client_type" id="client_type"/>
|
|
22
|
+
<input class="mini-hidden" bind="dataBean.client_size" id="client_size"/>
|
|
23
|
+
|
|
24
|
+
<div role="row" id="attach" data-inline="true">
|
|
25
|
+
<div role="control" label="附件信息" starred="true">
|
|
26
|
+
<div id="uploader" class="mini-webuploader r"
|
|
27
|
+
action="getFileUploadModel" fileNumLimit="1" enableSort="true" style="width: auto"
|
|
28
|
+
fileList="#uploader1-filelist"
|
|
29
|
+
limitType="doc,docm,docx,docxf,dot,dotm,dotx,epub,fodt,fb2,htm,html,mht,odt,oform,ott,oxps,pdf,rtf,txt,djvu,xml,xps,csv,fods,ods,ots,xls,xlsb,xlsm,xlsx,xlt,xltm,xltx,fodp,odp,otp,pot,potm,potx,pps,ppsm,ppsx,ppt,pptm,pptx"
|
|
30
|
+
onuploadaccept="UploadSuccess"></div>
|
|
31
|
+
<div id="uploader1-filelist" style="width: 100%"></div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div role="row">
|
|
36
|
+
<div role="control" label="名称" starred="true">
|
|
37
|
+
<input id="scheme_name" class="mini-textbox" bind="dataBean.scheme_name" required="true"
|
|
38
|
+
requiredErrorText="名称不能为空!"/>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div role="row">
|
|
43
|
+
<div role="control" label="类型" starred="true">
|
|
44
|
+
<input class="mini-combobox" action="scheme_typeModel" id="scheme_type" bind="dataBean.scheme_type"
|
|
45
|
+
textField="text" valueField="id" emptyText="请选择..." required="true"
|
|
46
|
+
requiredErrorText="类型不能为空!"/>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div role="row">
|
|
51
|
+
<div role="control" label="简介">
|
|
52
|
+
<textarea id="scheme_synopsis" class="mini-webeditor" readOnly="false"
|
|
53
|
+
bind="dataBean.scheme_synopsis"
|
|
54
|
+
height="300" style="height: 300px;"
|
|
55
|
+
extraUEditorConfig="{emotionLocalization: false, autoHeightEnabled: false, serverUrl: 'https://fe.epoint.com.cn/miniuiServer/ueditor_server/controller.php'}">
|
|
56
|
+
|
|
57
|
+
</textarea>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<div role="row">
|
|
62
|
+
<div role="control" label="排序">
|
|
63
|
+
<input id="order_num" class="mini-textbox" bind="dataBean.order_num" vType="int" value="0"
|
|
64
|
+
emptyText="0"/>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<!-- toolbar区域 -->
|
|
73
|
+
<div class="fui-toolbar bottom">
|
|
74
|
+
<a class="mini-button" id="save" onclick="saveModify" state="primary">保存并关闭</a>
|
|
75
|
+
<a class="mini-button" onclick="epoint.closeDialog">取消修改</a>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<!-- 请修改相对路径 -->
|
|
79
|
+
<script src="../../rest/resource/jsboot"></script>
|
|
80
|
+
<script>
|
|
81
|
+
// 初始化页面
|
|
82
|
+
epoint.initPage('schemeresourceeditaction');
|
|
83
|
+
|
|
84
|
+
function saveModify() {
|
|
85
|
+
if (epoint.validate()) {
|
|
86
|
+
epoint.execute('save', 'fui-form', closeCallback);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// 关闭操作的回调
|
|
91
|
+
function closeCallback(data) {
|
|
92
|
+
if (data.msg) {
|
|
93
|
+
epoint.alertAndClose(data.msg, '', null, null, 'info');
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function UploadSuccess(args) {
|
|
98
|
+
if (args.ret.extraDatas) {
|
|
99
|
+
epoint.alert(args.ret.extraDatas.msg, '', null, 'warning');
|
|
100
|
+
} else {
|
|
101
|
+
// 上传成功
|
|
102
|
+
epoint.execute('uploadSuccess', null, args.ret.attachGuid, function (data) {
|
|
103
|
+
if (data.scheme_name) {
|
|
104
|
+
let schemeName = mini.get('scheme_name');
|
|
105
|
+
schemeName.setValue(data.scheme_name);
|
|
106
|
+
schemeName.setText(data.scheme_name);
|
|
107
|
+
}
|
|
108
|
+
if (data.client_type) {
|
|
109
|
+
let client_type = mini.get('client_type');
|
|
110
|
+
client_type.setValue(data.client_type);
|
|
111
|
+
}
|
|
112
|
+
if (data.client_size) {
|
|
113
|
+
let client_size = mini.get('client_size');
|
|
114
|
+
client_size.setValue(data.client_size);
|
|
115
|
+
}
|
|
116
|
+
if (data.client_guid) {
|
|
117
|
+
let client_guid = mini.get('client_guid');
|
|
118
|
+
client_guid.setValue(data.client_guid);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
</script>
|
|
124
|
+
</body>
|
|
125
|
+
</html>
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<title>方案资源文档列表</title>
|
|
6
|
+
<meta charset="UTF-8"/>
|
|
7
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
|
8
|
+
<!-- 请修改相对路径 -->
|
|
9
|
+
<script src="../../frame/fui/js/cssboot.js"></script>
|
|
10
|
+
</head>
|
|
11
|
+
|
|
12
|
+
<body>
|
|
13
|
+
<!-- 必须有,加载时的loading效果 -->
|
|
14
|
+
<div class="page-loading"></div>
|
|
15
|
+
|
|
16
|
+
<!-- toolbar区域 -->
|
|
17
|
+
<div class="fui-toolbar">
|
|
18
|
+
<a class="mini-button" state="primary" onclick="openAdd" id="btnAddRecord">
|
|
19
|
+
新增记录
|
|
20
|
+
</a>
|
|
21
|
+
<a id="btnDel" state="danger" class="mini-button" onclick="deleteData">
|
|
22
|
+
删除选定
|
|
23
|
+
</a>
|
|
24
|
+
<a class="mini-dataexport" id="dataexport" gridId="datagrid" fileName="查询列表"
|
|
25
|
+
action="getExportModel" extraId="fui-form"></a>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<!-- 条件区域 -->
|
|
29
|
+
<div class="fui-condition">
|
|
30
|
+
<div class="fui-form" id="fui-form">
|
|
31
|
+
<div id="cform" role="form">
|
|
32
|
+
<div role="row">
|
|
33
|
+
<div role="control" label="名称">
|
|
34
|
+
<input id="search_scheme_name" class="mini-textbox" bind="dataBean.scheme_name"/>
|
|
35
|
+
</div>
|
|
36
|
+
<div role="control" label="类型">
|
|
37
|
+
<input class="mini-combobox" action="scheme_typeModel" id="search_scheme_type"
|
|
38
|
+
bind="dataBean.scheme_type" textField="text" valueField="id" emptyText="请选择..."/>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
<div role="row">
|
|
42
|
+
<div role="control" label="简介">
|
|
43
|
+
<input id="search_scheme_synopsis" class="mini-textbox" bind="dataBean.scheme_synopsis"/>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<a role="searcher" callback="searchData"></a></div>
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
<!-- 内容区域 -->
|
|
52
|
+
<div id="fuiContent" class="fui-content">
|
|
53
|
+
<div id="datagrid" class="mini-datagrid" idField="rowguid" action="getDataGridData" sortOrder="desc"
|
|
54
|
+
sortField="order_num"
|
|
55
|
+
showPager="true" style="height: 100%;" allowResize="true" multiSelect="true" allowCellEdit="true"
|
|
56
|
+
allowCellSelect="true" editNextOnEnterKey="true" editNextRowCell="true" ondrawCell="onDrawCell">
|
|
57
|
+
<div property="columns">
|
|
58
|
+
<div type="checkcolumn" width="10"></div>
|
|
59
|
+
<div type="indexcolumn" width="10" align="left" headerAlign="left">序</div>
|
|
60
|
+
<div field="scheme_name" renderer="nameRenderer">名称(点击可预览)</div>
|
|
61
|
+
<div field="scheme_type" data-options="{code:'方案资源类型'}" width="50">类型</div>
|
|
62
|
+
<div field="client_size" width="20">附件大小</div>
|
|
63
|
+
<div field="client_type" width="20">附件类型</div>
|
|
64
|
+
<div width="20" field="order_num">排序</div>
|
|
65
|
+
<div width="10" align="left" headerAlign="left" renderer="onEditRenderer">修改</div>
|
|
66
|
+
<!--<div width="10" align="left" headerAlign="left" renderer="handleDownRenderer">下载</div>-->
|
|
67
|
+
<div width="10" align="left" headerAlign="left" renderer="handleLinkRenderer">分享</div>
|
|
68
|
+
<div width="10" align="left" headerAlign="left" renderer="onDetailRenderer">查看</div>
|
|
69
|
+
|
|
70
|
+
<div field="client_guid" visible="false">附件标识</div>
|
|
71
|
+
<div field="is_edit" visible="false">是否可以编辑</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<!-- 请修改相对路径 -->
|
|
77
|
+
<script src="../../rest/resource/jsboot"></script>
|
|
78
|
+
<script>
|
|
79
|
+
SrcBoot.output([
|
|
80
|
+
'../../js/file/FileSaver.js'
|
|
81
|
+
]);
|
|
82
|
+
</script>
|
|
83
|
+
<script>
|
|
84
|
+
// 初始化页面
|
|
85
|
+
epoint.initPage('schemeresourcelistaction');
|
|
86
|
+
|
|
87
|
+
function onDrawCell(e) {
|
|
88
|
+
if (e.cellCls === "mini-checkcolumn" && e.row.is_edit === 0) {
|
|
89
|
+
e.cellHtml = "";
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// 绘制行编辑按钮
|
|
94
|
+
var onEditRenderer = function (e) {
|
|
95
|
+
if (e.row.is_edit === 1) {
|
|
96
|
+
return epoint.renderCell(e, "action-icon icon-edit", "openEdit");
|
|
97
|
+
} else {
|
|
98
|
+
return "";
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// 绘制行查看按钮
|
|
103
|
+
var onDetailRenderer = function (e) {
|
|
104
|
+
return epoint.renderCell(e, "action-icon icon-search", "openDetail");
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
// 弹出新增窗口
|
|
108
|
+
function openAdd() {
|
|
109
|
+
epoint.openDialog('新增记录', "perpage/schemeresource/schemeresourceadd", searchData, {
|
|
110
|
+
'width': 970,
|
|
111
|
+
'height': 750
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// 弹出修改窗口
|
|
116
|
+
function openEdit(id) {
|
|
117
|
+
epoint.openDialog('修改记录', "perpage/schemeresource/schemeresourceedit?guid=" + id, searchData, {
|
|
118
|
+
'width': 970,
|
|
119
|
+
'height': 550
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// 弹出明细窗口
|
|
124
|
+
function openDetail(id) {
|
|
125
|
+
epoint.openDialog('详细信息', "perpage/schemeresource/schemeresourcedetail?guid=" + id, '', {
|
|
126
|
+
'width': 970,
|
|
127
|
+
'height': 550
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// 删除数据
|
|
132
|
+
function deleteSelect() {
|
|
133
|
+
epoint.execute("deleteSelect", '', function (data) {
|
|
134
|
+
epoint.refresh(['datagrid', 'fui-form'], '', true);
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
function callback(data) {
|
|
140
|
+
if (data.msg) {
|
|
141
|
+
epoint.alert(data.msg, '', searchData, 'info');
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// 表格的搜索
|
|
146
|
+
function searchData(param) {
|
|
147
|
+
epoint.refresh(['datagrid', 'fui-form'], '', true);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function deleteData() {
|
|
151
|
+
if (mini.get('datagrid').getSelecteds().length === 0) {
|
|
152
|
+
epoint.alert('请选择要删除的记录!', '', null, 'warning');
|
|
153
|
+
} else {
|
|
154
|
+
epoint.confirm('确认要删除吗?', '', deleteSelect);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// 名称渲染
|
|
159
|
+
function nameRenderer(e) {
|
|
160
|
+
return '<a onclick="openViewDetail(\'' + e.row['client_guid'] + '\',\'' + e.row['client_type'] + '\')" style="cursor:pointer;color: #4a75d9 ">' + e.value + '</a>';
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function openViewDetail(client_guid, client_type) {
|
|
164
|
+
epoint.execute('getAttach', null, client_guid, function (data) {
|
|
165
|
+
const addr = window.location.protocol + "//" + window.location.host + "/" + window.location.pathname.split('/')[1];
|
|
166
|
+
if (client_type === ".doc" || client_type === ".docx" || client_type === ".xls" || client_type === ".xlsx" || client_type === ".ppt" || client_type === ".pptx") {
|
|
167
|
+
const url = addr + '/attach_view?attachGuid=' + data.attachGuid;
|
|
168
|
+
window.open(url);
|
|
169
|
+
} else if (client_type === ".pdf") {
|
|
170
|
+
const url = addr + '/pdfjs/web/viewer.html?file=' + encodeURI(addr + "/rest/attachEMApi/attach/3/" + data.attachGuid);
|
|
171
|
+
window.open(url);
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// 绘分享查看按钮
|
|
177
|
+
var handleLinkRenderer = function (e) {
|
|
178
|
+
return epoint.renderCell(e, "action-icon icon-retrieve", "handleLink", "epoint_total");
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
// 分享
|
|
182
|
+
function handleLink(e) {
|
|
183
|
+
epoint.execute('getAttach', null, e.client_guid, function (data) {
|
|
184
|
+
const addr = window.location.protocol + "//" + window.location.host + "/" + window.location.pathname.split('/')[1];
|
|
185
|
+
if (e.client_type === ".doc" || e.client_type === ".docx" || e.client_type === ".xls" || e.client_type === ".xlsx" || e.client_type === ".ppt" || e.client_type === ".pptx") {
|
|
186
|
+
const url = addr + '/attach_view?attachGuid=' + data.attachGuid;
|
|
187
|
+
copyToClip(url);
|
|
188
|
+
} else if (e.client_type === ".pdf") {
|
|
189
|
+
const url = addr + '/pdfjs/web/viewer.html?file=' + encodeURI(addr + "/rest/attachEMApi/attach/3/" + data.attachGuid);
|
|
190
|
+
copyToClip(url);
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// 绘下载查看按钮
|
|
196
|
+
var handleDownRenderer = function (e) {
|
|
197
|
+
return epoint.renderCell(e, "action-icon icon-download", "handleDown", "epoint_total");
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
// 下载
|
|
201
|
+
function handleDown(e) {
|
|
202
|
+
const addr = window.location.protocol + "//" + window.location.host + "/" + window.location.pathname.split('/')[1] + '/rest/attachEMApi/attach/2/' + e.client_guid;
|
|
203
|
+
saveAs(addr, e.attachfilename, "", "");
|
|
204
|
+
epoint.showTips("下载中...", {state: 'success'});
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// 复制
|
|
208
|
+
function copyToClip(content, message) {
|
|
209
|
+
const aux = document.createElement("input");
|
|
210
|
+
aux.setAttribute("value", content);
|
|
211
|
+
document.body.appendChild(aux);
|
|
212
|
+
aux.select();
|
|
213
|
+
document.execCommand("copy");
|
|
214
|
+
document.body.removeChild(aux);
|
|
215
|
+
if (message == null) {
|
|
216
|
+
epoint.showTips("已将下载地址复制在粘贴板!", {state: 'success'});
|
|
217
|
+
} else {
|
|
218
|
+
epoint.showTips(message, {state: 'success'});
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
</script>
|
|
223
|
+
</body>
|
|
224
|
+
</html>
|