Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
浙江兰德纵横网络技术股份有限公司
o2oa
提交
e4338d45
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,发现更多精彩内容 >>
提交
e4338d45
编写于
6月 04, 2021
作者:
U
unknown
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
导入模型
上级
71f41e57
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
163 addition
and
85 deletion
+163
-85
o2web/source/o2_core/o2/xAction/services/x_query_assemble_surface.json
...o2_core/o2/xAction/services/x_query_assemble_surface.json
+12
-0
o2web/source/x_component_query_ImporterDesigner/Property.js
o2web/source/x_component_query_ImporterDesigner/Property.js
+3
-3
o2web/source/x_component_query_Query/Importer.js
o2web/source/x_component_query_Query/Importer.js
+148
-82
未找到文件。
o2web/source/o2_core/o2/xAction/services/x_query_assemble_surface.json
浏览文件 @
e4338d45
...
...
@@ -40,5 +40,17 @@
"calculateNeural"
:
{
"uri"
:
"/jaxrs/neural/list/calculate/model/{modelFlag}/work/{workId}"
},
"executImportModule"
:
{
"uri"
:
"/jaxrs/importmodel/{id}/execute"
,
"method"
:
"POST"
},
"listImportModule"
:
{
"uri"
:
"/jaxrs/importmodel/list/query/{queryFlag}"
},
"getImportModuleById"
:
{
"uri"
:
"/jaxrs/importmodel/{id}/execute"
},
"getImportModule"
:
{
"uri"
:
"/jaxrs/importmodel/flag/{flag}/query/{queryFlag}"
},
"getUUID"
:
{
"uri"
:
"/jaxrs/importmodel/uuid"
},
"getImportModuleRecord"
:
{
"uri"
:
"/jaxrs/importmodel//record/{recordId}"
},
"getImportModuleRecordStatus"
:
{
"uri"
:
"/jaxrs/importmodel/record/{recordId}/status"
},
"listImportModuleRecord"
:
{
"uri"
:
"/jaxrs/importmodel/list/record/paging/{page}/size/{size}"
,
"method"
:
"POST"
},
"listImportModuleRecordItem"
:
{
"uri"
:
"/jaxrs/importmodel/list/record/item/paging/{page}/size/{size}"
,
"method"
:
"POST"
},
"clazz"
:
"x_query_assemble_surface"
}
o2web/source/x_component_query_ImporterDesigner/Property.js
浏览文件 @
e4338d45
...
...
@@ -83,7 +83,7 @@ MWF.xApplication.query.ImporterDesigner.Property = new Class({
if
(
d
)
d
=
d
[
n
];
});
this
.
view
.
json
.
data
.
columnList
.
each
(
function
(
column
){
(
this
.
view
.
json
.
data
.
columnList
||
[])
.
each
(
function
(
column
){
var
option
=
new
Element
(
"
option
"
,
{
"
text
"
:
column
.
displayName
+
"
-
"
+
column
.
path
,
...
...
@@ -92,7 +92,7 @@ MWF.xApplication.query.ImporterDesigner.Property = new Class({
}).
inject
(
select
);
}.
bind
(
this
));
this
.
view
.
json
.
data
.
calculateFieldList
.
each
(
function
(
column
){
(
this
.
view
.
json
.
data
.
calculateFieldList
||
[])
.
each
(
function
(
column
){
var
option
=
new
Element
(
"
option
"
,
{
"
text
"
:
column
.
displayName
+
"
-
"
+
column
.
path
,
...
...
@@ -145,7 +145,7 @@ MWF.xApplication.query.ImporterDesigner.Property = new Class({
}.
bind
(
this
));
}
else
{
new
Element
(
"
option
"
,
{
"
text
"
:
this
.
view
.
designer
.
lp
.
selectProcess1
,
"
text
"
:
this
.
view
.
designer
.
lp
.
propertyTemplate
.
selectProcess1
,
"
value
"
:
""
}).
inject
(
select
);
}
...
...
o2web/source/x_component_query_Query/Importer.js
浏览文件 @
e4338d45
...
...
@@ -60,43 +60,22 @@ MWF.xApplication.query.Query.Importer = MWF.QImporter = new Class({
loadingTextNode
.
set
(
"
text
"
,
"
loading...
"
);
},
getImporterJSON
:
function
(
callback
){
// var path = "/x_component_query_Query/$Main/importer_test.json"; //_querytable
// var r = new Request.JSON({
// url: o2.filterUrl(path),
// secure: false,
// async: false,
// method: "get",
// noCache: false,
// onSuccess: function(responseJSON, responseText){
// this.json = responseJSON;
// debugger;
// if(callback)callback();
// this.fireEvent("postLoadJson");
// }.bind(this),
// onError: function(text, error){
// alert(error + text);
// }
// });
// r.send();
// return;
// if (this.json.application){
// this.lookupAction.getView(this.json.viewName, this.json.application, function(json){
// this.importerJson = JSON.decode(json.data.data);
// json.data.data = this.importerJson;
// this.json = Object.merge(this.json, json.data);
// if (callback) callback();
// }.bind(this));
// }else{
this
.
designerAction
.
getImportModel
(
this
.
json
.
id
,
function
(
json
){
debugger
;
if
(
this
.
json
.
name
){
this
.
lookupAction
.
getImportModule
(
this
.
json
.
name
,
this
.
json
.
application
,
function
(
json
){
this
.
importerJson
=
JSON
.
decode
(
json
.
data
.
data
);
json
.
data
.
data
=
this
.
importerJson
;
this
.
json
=
Object
.
merge
(
this
.
json
,
json
.
data
);
if
(
callback
)
callback
();
}.
bind
(
this
));
}
else
{
this
.
lookupAction
.
getImportModuleById
(
this
.
json
.
id
,
function
(
json
){
this
.
importerJson
=
JSON
.
decode
(
json
.
data
.
data
);
json
.
data
.
data
=
this
.
importerJson
;
this
.
json
.
application
=
json
.
data
.
query
;
this
.
json
=
Object
.
merge
(
this
.
json
,
json
.
data
);
if
(
callback
)
callback
();
}.
bind
(
this
));
//
}
}
},
_loadModuleEvents
:
function
(){
Object
.
each
(
this
.
json
.
data
.
events
,
function
(
e
,
key
){
...
...
@@ -686,7 +665,6 @@ MWF.xApplication.query.Query.Importer.Row = new Class({
var
errorTextList
=
[];
var
errorTextListExcel
=
[];
this
.
importer
.
json
.
data
.
columnList
.
each
(
function
(
columnJson
,
i
)
{
var
colInfor
=
columnText
.
replace
(
"
{n}
"
,
i
+
1
);
...
...
@@ -785,25 +763,27 @@ MWF.xApplication.query.Query.Importer.Row = new Class({
},
createData
:
function
(){
if
(
this
.
importer
.
json
.
type
===
"
cms
"
){
var
json
=
this
.
importer
.
json
;
if
(
json
.
type
===
"
cms
"
){
this
.
document
=
{
categoryId
:
this
.
importer
.
json
.
data
.
category
.
id
,
categoryId
:
json
.
data
.
category
.
id
,
readerList
:
[],
authorList
:
[],
docData
:
this
.
data
};
}
else
if
(
this
.
importer
.
json
.
type
===
"
process
"
){
}
else
if
(
json
.
type
===
"
process
"
){
this
.
work
=
{
processFlag
:
this
.
importer
.
json
.
data
.
process
.
id
,
processFlag
:
json
.
data
.
process
.
id
,
data
:
this
.
data
};
}
this
.
importer
.
fireEvent
(
"
beforeCreateRowData
"
,
[
null
,
this
]);
this
.
importer
.
json
.
data
.
columnList
.
each
(
function
(
columnJson
,
i
)
{
json
.
data
.
columnList
.
each
(
function
(
columnJson
,
i
)
{
var
dataType
=
this
.
importer
.
json
.
type
===
"
dynamicTable
"
?
columnJson
.
dataType_Querytable
:
columnJson
.
dataType_CMSProcess
;
var
dataType
=
json
.
type
===
"
dynamicTable
"
?
columnJson
.
dataType_Querytable
:
columnJson
.
dataType_CMSProcess
;
var
value
=
this
.
importedData
[
i
]
||
""
;
...
...
@@ -816,7 +796,7 @@ MWF.xApplication.query.Query.Importer.Row = new Class({
case
"
stringList
"
:
if
(
columnJson
.
isName
){
var
arr
=
value
.
split
(
/
\s
*,
\s
*/g
);
//空格,空格
if
(
this
.
importer
.
json
.
type
===
"
dynamicTable
"
){
if
(
json
.
type
===
"
dynamicTable
"
){
data
=
arr
}
else
{
data
=
arr
.
map
(
function
(
d
,
idx
){
...
...
@@ -860,23 +840,40 @@ MWF.xApplication.query.Query.Importer.Row = new Class({
break
;
}
if
(
this
.
importer
.
json
.
type
===
"
dynamicTable
"
){
if
(
json
.
type
===
"
dynamicTable
"
){
this
.
data
[
columnJson
.
path
]
=
data
;
}
else
{
var
names
=
columnJson
.
path
.
split
(
"
.
"
);
var
d
=
this
.
data
;
Array
.
each
(
names
,
function
(
n
,
idx
)
{
if
(
idx
===
names
.
length
-
1
)
return
;
if
(
!
d
[
n
]
)
d
[
n
]
=
{};
// if( idx === names.length -1 )return;
if
(
!
d
[
n
]
){
if
(
this
.
isNumberString
(
n
)
){
d
[
n
.
toInt
()]
=
[];
}
else
{
d
[
n
]
=
{};
}
}
d
=
d
[
n
];
});
d
[
names
[
names
.
length
-
1
]]
=
data
;
}
.
bind
(
this
)
);
//
d[names[names.length -1]] = data;
}
if
(
data
){
if
(
this
.
importer
.
json
.
type
===
"
cms
"
){
this
.
parseCMSDocument_FromExcel
(
columnJson
,
i
,
data
)
}
else
if
(
this
.
importer
.
json
.
type
===
"
process
"
){
if
(
json
.
type
===
"
cms
"
){
// this.parseCMSDocument_FromExcel( columnJson, i, data )
if
(
columnJson
.
isName
)
{
if
(
columnJson
.
isAuthor
)
{
var
array
=
this
.
parseCMSReadAndAuthor
(
data
);
this
.
document
.
authorList
=
this
.
document
.
authorList
.
concat
(
array
)
}
if
(
columnJson
.
isReader
)
{
var
array
=
this
.
parseCMSReadAndAuthor
(
data
);
this
.
document
.
readerList
=
this
.
document
.
readerList
.
concat
(
array
)
}
}
}
else
if
(
json
.
type
===
"
process
"
){
this
.
parseProcessWork_FromExcel
(
columnJson
,
i
,
data
)
}
}
...
...
@@ -885,54 +882,123 @@ MWF.xApplication.query.Query.Importer.Row = new Class({
}.
bind
(
this
));
this
.
importer
.
json
.
data
.
calculateFieldList
.
each
(
function
(
fieldJson
,
i
)
{
json
.
data
.
calculateFieldList
.
each
(
function
(
fieldJson
,
i
)
{
if
(
fieldJson
.
valueScript
){
var
data
=
this
.
importer
.
Macro
.
exec
(
fieldJson
.
valueScript
,
this
);
if
(
o2
.
typeOf
(
data
)
===
"
null
"
)
return
;
if
(
this
.
importer
.
json
.
type
===
"
dynamicTable
"
){
if
(
json
.
type
===
"
dynamicTable
"
){
this
.
data
[
fieldJson
.
path
]
=
data
;
}
else
{
var
names
=
fieldJson
.
path
.
split
(
"
.
"
);
var
d
=
this
.
data
;
Array
.
each
(
names
,
function
(
n
,
idx
)
{
if
(
idx
===
names
.
length
-
1
)
return
;
if
(
!
d
[
n
]
)
d
[
n
]
=
{};
// if( idx === names.length -1 )return;
if
(
!
d
[
n
]
){
if
(
this
.
isNumberString
(
n
)
){
d
[
n
.
toInt
()]
=
[];
}
else
{
d
[
n
]
=
{};
}
}
d
=
d
[
n
];
});
d
[
names
[
names
.
length
-
1
]]
=
data
;
//
d[names[names.length -1]] = data;
}
if
(
this
.
importer
.
json
.
type
===
"
cms
"
){
this
.
parseCMSDocument_CalculateField
(
fieldJson
,
data
)
}
else
if
(
this
.
importer
.
json
.
type
===
"
process
"
){
this
.
parseProcessWork_CalculateField
(
fieldJson
,
data
)
if
(
json
.
type
===
"
cms
"
){
// this.parseCMSDocument_CalculateField( fieldJson, data )
if
(
fieldJson
.
isAuthor
){
var
array
=
this
.
parseCMSReadAndAuthor
(
data
);
this
.
document
.
authorList
=
this
.
document
.
authorList
.
concat
(
array
)
}
if
(
fieldJson
.
isReader
){
var
array
=
this
.
parseCMSReadAndAuthor
(
data
);
this
.
document
.
readerList
=
this
.
document
.
readerList
.
concat
(
array
)
}
}
else
if
(
json
.
type
===
"
process
"
){
// this.parseProcessWork_CalculateField( fieldJson, data )
}
}
}.
bind
(
this
));
if
(
this
.
importer
.
json
.
type
===
"
cms
"
){
var
array
;
if
(
json
.
type
===
"
cms
"
){
this
.
document
.
docData
=
this
.
data
;
if
(
!
this
.
document
.
identity
){
//没有发布身份,则设置
var
identityList
=
layout
.
session
.
user
.
identityList
;
if
(
identityList
&&
identityList
.
length
){
this
.
document
.
identity
=
identityList
[
0
].
distinguishedName
if
(
json
.
data
.
documentPublisher
===
"
importer
"
){
array
=
layout
.
session
.
user
.
identityList
;
if
(
array
&&
array
.
length
){
this
.
document
.
identity
=
array
[
0
].
distinguishedName
}
}
else
{
this
.
setDataWithField
(
this
.
document
,
"
documentPublisherField
"
,
"
identity
"
,
true
);
}
}
else
if
(
this
.
importer
.
json
.
type
===
"
process
"
){
if
(
json
.
data
.
documentPublishTime
===
"
importer
"
){
this
.
document
.
publishTime
=
new
Date
().
format
(
db
);
}
else
{
this
.
setDataWithField
(
this
.
document
,
"
documentPublisherTimeField
"
,
"
publishTime
"
,
false
);
}
this
.
setDataWithField
(
this
.
document
,
"
documentTitleField
"
,
"
title
"
,
false
);
if
(
!
this
.
document
.
title
)
this
.
document
.
title
=
"
无标题
"
;
this
.
setDataWithField
(
this
.
document
,
"
documentSummaryField
"
,
"
summary
"
,
false
);
}
else
if
(
json
.
type
===
"
process
"
){
this
.
work
.
data
=
this
.
data
;
if
(
!
this
.
work
.
identity
){
//没有发布身份,则设置
var
identityList
=
layout
.
session
.
user
.
identityList
;
if
(
identityList
&&
identityList
.
length
){
this
.
work
.
identity
=
identityList
[
0
].
distinguishedName
if
(
json
.
data
.
processDrafter
===
"
importer
"
){
array
=
layout
.
session
.
user
.
identityList
;
if
(
array
&&
array
.
length
){
this
.
work
.
identity
=
array
[
0
].
distinguishedName
}
}
else
{
this
.
setDataWithField
(
this
.
work
,
"
processDrafterField
"
,
"
identity
"
,
true
);
}
this
.
setDataWithField
(
this
.
work
,
"
processTitleField
"
,
"
title
"
,
false
);
if
(
!
this
.
work
.
title
)
this
.
work
.
title
=
"
无标题
"
;
if
(
json
.
data
.
processStatus
===
"
completed
"
){
this
.
work
.
form
=
json
.
data
.
processForm
||
""
;
this
.
setDataWithField
(
this
.
work
,
"
processSerialField
"
,
"
serial
"
,
false
);
this
.
setDataWithField
(
this
.
work
,
"
processStartTimeField
"
,
"
startTime
"
,
false
);
this
.
setDataWithField
(
this
.
work
,
"
processCompleteTimeField
"
,
"
completeTime
"
,
false
);
}
}
this
.
importer
.
fireEvent
(
"
afterCreateRowData
"
,
[
null
,
this
]);
},
setDataWithField
:
function
(
obj
,
fieldName
,
path
,
isName
){
var
json
=
this
.
importer
.
json
;
var
data
;
if
(
json
.
data
[
fieldName
]
){
var
d
=
this
.
data
;
Array
.
each
(
json
.
data
[
fieldName
].
split
(
"
.
"
),
function
(
n
)
{
if
(
this
.
isNumberString
(
n
))
n
=
n
.
toInt
();
if
(
d
)
d
=
d
[
n
];
});
if
(
!
d
)
return
;
var
_d
=
(
typeOf
(
d
)
===
"
array
"
&&
d
.
length
)
?
d
[
0
]
:
d
;
if
(
_d
){
if
(
isName
){
obj
[
path
]
=
typeOf
(
_d
)
===
"
object
"
?
_d
.
distinguishedName
:
_d
;
}
else
{
obj
[
path
]
=
d
;
}
}
}
},
isNumberString
:
function
(
string
){
return
string
.
toInt
().
toString
()
===
string
;
},
parseCMSDocument_FromExcel
:
function
(
columnJson
,
i
,
data
,
excelValue
){
var
lp
=
this
.
importer
.
lp
;
var
columnText
=
lp
.
importValidationColumnText
;
...
...
@@ -951,14 +1017,14 @@ MWF.xApplication.query.Query.Importer.Row = new Class({
if
(
columnJson
.
isPublisher
&&
data
.
length
){
this
.
document
.
identity
=
data
[
0
].
distinguishedName
}
if
(
columnJson
.
isAuthor
){
var
array
=
this
.
parseCMSReadAndAuthor
(
data
);
this
.
document
.
authorList
=
this
.
document
.
authorList
.
concat
(
array
)
}
if
(
columnJson
.
isReader
){
var
array
=
this
.
parseCMSReadAndAuthor
(
data
);
this
.
document
.
readerList
=
this
.
document
.
readerList
.
concat
(
array
)
}
//
if( columnJson.isAuthor ){
//
var array = this.parseCMSReadAndAuthor( data );
//
this.document.authorList = this.document.authorList.concat( array )
//
}
//
if( columnJson.isReader ){
//
var array = this.parseCMSReadAndAuthor( data );
//
this.document.readerList = this.document.readerList.concat( array )
//
}
}
// if( columnJson.isTop ){
// if( [lp.yes,"yes","true"].contains(data) ){
...
...
@@ -994,14 +1060,14 @@ MWF.xApplication.query.Query.Importer.Row = new Class({
this
.
document
.
identity
=
data
[
0
].
distinguishedName
}
}
if
(
fieldJson
.
isAuthor
){
var
array
=
this
.
parseCMSReadAndAuthor
(
data
);
this
.
document
.
authorList
=
this
.
document
.
authorList
.
concat
(
array
)
}
if
(
fieldJson
.
isReader
){
var
array
=
this
.
parseCMSReadAndAuthor
(
data
);
this
.
document
.
readerList
=
this
.
document
.
readerList
.
concat
(
array
)
}
//
if( fieldJson.isAuthor ){
//
var array = this.parseCMSReadAndAuthor( data );
//
this.document.authorList = this.document.authorList.concat( array )
//
}
//
if( fieldJson.isReader ){
//
var array = this.parseCMSReadAndAuthor( data );
//
this.document.readerList = this.document.readerList.concat( array )
//
}
// if( fieldJson.isTop ){
// if( [lp.yes,"yes","true"].contains(data) ){
// this.document.isTop = true;
...
...
liyi_hz2008
@liyi_hz2008
mentioned in commit
e87842ea
·
6月 17, 2021
mentioned in commit
e87842ea
mentioned in commit e87842eab94a5fe8368bf31f1a8bbe4aab5abb8a
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录