Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
浙江兰德纵横网络技术股份有限公司
o2oa
提交
c06ff5aa
o2oa
项目概览
浙江兰德纵横网络技术股份有限公司
/
o2oa
通知
339
Star
10
Fork
6
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c06ff5aa
编写于
12月 11, 2020
作者:
蔡
蔡祥熠
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'wrdp' into 'develop'
Wrdp See merge request o2oa/o2oa!2510
上级
3b322a08
4f85e411
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
56 addition
and
7 deletion
+56
-7
o2web/source/x_component_process_Xform/$Input.js
o2web/source/x_component_process_Xform/$Input.js
+5
-5
o2web/source/x_component_process_Xform/Actionbar.js
o2web/source/x_component_process_Xform/Actionbar.js
+1
-1
o2web/source/x_component_process_Xform/Attachment.js
o2web/source/x_component_process_Xform/Attachment.js
+50
-1
未找到文件。
o2web/source/x_component_process_Xform/$Input.js
浏览文件 @
c06ff5aa
...
...
@@ -272,7 +272,7 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input = new Class(
},
/**
* 判断组件值是否为空.
* @return {
b
oolean}.
* @return {
B
oolean}.
*/
isEmpty
:
function
(){
var
data
=
this
.
getData
();
...
...
@@ -280,7 +280,7 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input = new Class(
},
/**
* 获取组件值.
* @return {
object/string
}.
* @return {
Array|Object|String|Number|Boolean
}.
*/
getData
:
function
(
when
){
if
(
this
.
json
.
compute
==
"
save
"
)
this
.
_setValue
(
this
.
_computeValue
());
...
...
@@ -301,7 +301,7 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input = new Class(
},
/**
* 为控件赋值。
* @param data{
string/number/jsonObject/a
rray} .
* @param data{
String|Number|JsonObject|A
rray} .
*/
setData
:
function
(
data
){
// if (data && data.isAG){
...
...
@@ -535,8 +535,8 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input = new Class(
},
/**
* 根据组件的校验设置进行校验。
* @param {
s
tring} routeName - 可选,路由名称.
* @return {
b
oolean} 是否通过校验
* @param {
S
tring} routeName - 可选,路由名称.
* @return {
B
oolean} 是否通过校验
*/
validation
:
function
(
routeName
,
opinion
){
if
(
!
this
.
readonly
&&
!
this
.
json
.
isReadonly
){
...
...
o2web/source/x_component_process_Xform/Actionbar.js
浏览文件 @
c06ff5aa
...
...
@@ -220,7 +220,7 @@ MWF.xApplication.process.Xform.Actionbar = MWF.APPActionbar = new Class(
},
/**
* 根据操作id获取操作,该方法在操作条的afterLoad事件中有效,操作的操作脚本有效。
* @param {
s
tring} id - 必选,操作id.
* @param {
S
tring} id - 必选,操作id.
* @return {o2.widget.ToolbarButton} 操作
* @example
* var actionbar = this.form.get("name"); //获取操作条
...
...
o2web/source/x_component_process_Xform/Attachment.js
浏览文件 @
c06ff5aa
...
...
@@ -1035,7 +1035,33 @@ MWF.xApplication.process.Xform.AttachmentController = new Class({
}
});
MWF
.
xApplication
.
process
.
Xform
.
Attachment
=
MWF
.
APPAttachment
=
new
Class
({
/**
* 附件数据结构.
* @typedef {Object} AttachmentData
* @property {String} id - 附件id.
* @property {String} name - 附件标题.
* @property {String} person - 上传人.
* @property {Number} orderNumber - 排序号.
* @property {String} activityName - 上传的节点.
* @property {Object} control - 当前登录人员对附件拥有的权限.
* @property {Number} length - 附件大小.
* @property {String} createTime - 创建时间.
* @property {String} updateTime - 修改时间.
* @property {String} extension - 附件扩展名.
*/
/** @class Actionbar 附件组件类。
* @example
* //可以在脚本中获取该组件
* //方法1:
* var attachment = this.form.get("name"); //获取组件
* //方法2
* var attachment = this.target; //在组件事件脚本中获取
* @extends MWF.xApplication.process.Xform.$Module
*/
MWF
.
xApplication
.
process
.
Xform
.
Attachment
=
MWF
.
APPAttachment
=
new
Class
(
/** @lends MWF.xApplication.process.Xform.Attachment# */
{
Extends
:
MWF
.
APP$Module
,
options
:
{
"
moduleEvents
"
:
[
"
upload
"
,
"
delete
"
,
"
afterDelete
"
,
"
load
"
,
"
change
"
,
"
download
"
,
"
open
"
]
...
...
@@ -1091,6 +1117,14 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class({
}
//this.attachmentController = new MWF.widget.ATTER(this.node, this, options);
/**
* 附件容器.
* @member {MWF.xApplication.process.Xform.AttachmentController}
* @example
* var attachmentController = this.form.get("fieldName").AttachmentController; //获取附件容器
* var attachmentList = attachmentController.attachments; //获取所有的附件
* var attachmentData = attachment[0].data; //获取第一个附件的数据
*/
this
.
attachmentController
=
new
MWF
.
xApplication
.
process
.
Xform
.
AttachmentController
(
this
.
node
,
this
,
options
);
this
.
attachmentController
.
load
();
...
...
@@ -1138,6 +1172,12 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class({
return
!
data
;
}
},
/**
* 获取当前组件所有附件的标题.如果没有附件返回null
* @example
* var getAttachmentNames = this.form.get("name").getData();
* @return {StringArray|Null}.
*/
getData
:
function
()
{
return
(
this
.
attachmentController
)
?
this
.
attachmentController
.
getAttachmentNames
()
:
null
;
},
...
...
@@ -1615,6 +1655,10 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class({
});
return
data
;
},
/**
* 为组件重新设置附件,该附件必须已经上传。
* @param data{AttachmentData} .
*/
setData
:
function
(
data
){
this
.
attachmentController
.
clear
();
data
.
each
(
function
(
att
)
{
...
...
@@ -1754,6 +1798,11 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class({
}
return
true
;
},
/**
* 根据组件的校验设置进行校验。
* @param {String} routeName - 可选,路由名称.
* @return {Boolean} 是否通过校验
*/
validation
:
function
(
routeName
,
opinion
)
{
if
(
!
this
.
validationConfig
(
routeName
,
opinion
))
return
false
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录