Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
590b2d5a
o2oa
项目概览
ghsby
/
o2oa
落后 Fork 源项目 2880 个版本
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
1
Fork
0
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
590b2d5a
编写于
6月 23, 2021
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复导入模型的问题
上级
e1f63881
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
79 addition
and
24 deletion
+79
-24
o2web/source/x_component_query_ImporterDesigner/Importer.js
o2web/source/x_component_query_ImporterDesigner/Importer.js
+3
-2
o2web/source/x_component_query_Query/Importer.js
o2web/source/x_component_query_Query/Importer.js
+76
-22
未找到文件。
o2web/source/x_component_query_ImporterDesigner/Importer.js
浏览文件 @
590b2d5a
...
...
@@ -128,6 +128,9 @@ MWF.xApplication.query.ImporterDesigner.Importer = new Class({
this
.
data
.
data
=
JSON
.
parse
(
this
.
data
.
data
);
}
this
.
json
=
this
.
data
;
if
(
!
this
.
json
.
data
)
this
.
json
.
data
=
{};
if
(
!
this
.
json
.
data
.
calculateFieldList
)
this
.
json
.
data
.
calculateFieldList
=
[];
if
(
!
this
.
json
.
data
.
columnList
)
this
.
json
.
data
.
columnList
=
[];
if
(
!
this
.
json
.
data
.
events
){
var
url
=
"
../x_component_query_ImporterDesigner/$Importer/importer.json
"
;
MWF
.
getJSON
(
url
,
{
...
...
@@ -219,7 +222,6 @@ MWF.xApplication.query.ImporterDesigner.Importer = new Class({
"
id
"
:
id
,
"
displayName
"
:
this
.
designer
.
lp
.
unnamed
,
};
if
(
!
this
.
json
.
data
.
calculateFieldList
)
this
.
json
.
data
.
calculateFieldList
=
[];
this
.
json
.
data
.
calculateFieldList
.
push
(
json
);
var
field
=
new
MWF
.
xApplication
.
query
.
ImporterDesigner
.
Importer
.
CalculateField
(
json
,
this
,
null
);
...
...
@@ -238,7 +240,6 @@ MWF.xApplication.query.ImporterDesigner.Importer = new Class({
"
id
"
:
id
,
"
displayName
"
:
this
.
designer
.
lp
.
unnamed
,
};
if
(
!
this
.
json
.
data
.
columnList
)
this
.
json
.
data
.
columnList
=
[];
var
column
;
if
(
!
addToLeft
||
this
.
json
.
data
.
columnList
.
length
===
0
){
...
...
o2web/source/x_component_query_Query/Importer.js
浏览文件 @
590b2d5a
...
...
@@ -155,9 +155,9 @@ MWF.xApplication.query.Query.Importer = MWF.QImporter = new Class({
},
doImportData
:
function
(){
//创建数据
this
.
rowList
.
each
(
function
(
row
,
i
){
row
.
createData
();
}.
bind
(
this
));
//
this.rowList.each( function( row, i ){
//
row.createData();
//
}.bind(this));
//再次校验数据(计算的内容)
var
flag
=
true
;
...
...
@@ -275,20 +275,9 @@ MWF.xApplication.query.Query.Importer = MWF.QImporter = new Class({
checkNecessaryImportedData
:
function
(){
var
flag
=
true
;
if
(
this
.
json
.
type
===
"
cms
"
){
this
.
rowList
.
each
(
function
(
row
,
index
){
if
(
!
row
.
checkCMS
()
)
flag
=
false
;
}.
bind
(
this
));
}
else
if
(
this
.
json
.
type
===
"
process
"
){
this
.
rowList
.
each
(
function
(
row
,
index
){
if
(
!
row
.
checkProcess
()
)
flag
=
false
;
}.
bind
(
this
));
}
this
.
rowList
.
each
(
function
(
row
,
index
){
if
(
!
row
.
checkNecessary
()
)
flag
=
false
;
}.
bind
(
this
));
var
arg
=
{
validted
:
flag
,
...
...
@@ -531,11 +520,6 @@ MWF.xApplication.query.Query.Importer = MWF.QImporter = new Class({
}
},
openRecord
:
function
(
recordId
){
var
record
=
new
MWF
.
xApplication
.
query
.
Query
.
Importer
.
Record
(
this
,
recordId
);
record
.
load
();
},
downloadTemplate
:
function
(
fileName
,
callback
){
if
(
!
this
.
excelUtils
){
this
.
excelUtils
=
new
MWF
.
xApplication
.
query
.
Query
.
Importer
.
ExcelUtils
(
this
);
...
...
@@ -792,6 +776,74 @@ MWF.xApplication.query.Query.Importer.Row = new Class({
return
true
;
},
checkNecessary
:
function
(){
var
lp
=
this
.
lp
;
var
columnText
=
lp
.
importValidationColumnText
;
var
columnTextExcel
=
lp
.
importValidationColumnTextExcel
;
var
errorTextList
=
[];
var
errorTextListExcel
=
[];
this
.
importer
.
json
.
data
.
columnList
.
each
(
function
(
columnJson
,
i
)
{
var
colInfor
=
columnText
.
replace
(
"
{n}
"
,
i
+
1
);
var
colInforExcel
=
columnTextExcel
.
replace
(
"
{n}
"
,
this
.
importer
.
excelUtils
.
index2ColName
(
i
)
);
var
value
=
this
.
importedData
[
i
]
||
""
;
var
dataType
=
this
.
importer
.
json
.
type
===
"
dynamicTable
"
?
columnJson
.
dataType_Querytable
:
columnJson
.
dataType_CMSProcess
;
if
(
columnJson
.
validFieldType
!==
false
&&
value
){
switch
(
dataType
)
{
case
"
json
"
:
case
"
stringMap
"
:
value
=
value
.
replace
(
/ /g
,
""
);
try
{
var
d
=
JSON
.
parse
(
value
);
}
catch
(
e
)
{
errorTextList
.
push
(
colInfor
+
value
+
lp
.
notValidJson
+
lp
.
fullstop
);
errorTextListExcel
.
push
(
colInforExcel
+
value
+
lp
.
notValidJson
+
lp
.
fullstop
);
}
break
;
default
:
break
;
}
}
}.
bind
(
this
));
this
.
errorTextList
=
this
.
errorTextList
.
concat
(
errorTextList
);
this
.
errorTextListExcel
=
this
.
errorTextListExcel
.
concat
(
errorTextListExcel
);
if
(
this
.
errorTextList
.
length
>
0
){
return
false
;
}
this
.
createData
();
if
(
this
.
importer
.
json
.
type
===
"
cms
"
){
this
.
checkCMS
();
}
else
if
(
this
.
importer
.
json
.
type
===
"
process
"
){
this
.
checkProcess
();
}
if
(
this
.
errorTextList
.
length
>
0
){
return
false
;
}
return
true
;
// var flag = true;
// if( this.importer.json.type === "cms" ){
// if( !this.checkCMS() )flag = false;
// }else if( this.importer.json.type === "process" ){
// if( !this.checkProcess() )flag = false;
// }
// return flag;
},
getCol
:
function
(
key
,
isExcel
){
var
lp
=
this
.
lp
;
if
(
this
.
pathIndexMap
&&
typeOf
(
this
.
pathIndexMap
[
key
])
===
"
number
"
){
...
...
@@ -807,6 +859,7 @@ MWF.xApplication.query.Query.Importer.Row = new Class({
return
""
},
checkCMS
:
function
(
notCheckName
){
var
lp
=
this
.
lp
;
var
errorTextList
=
[];
...
...
@@ -856,6 +909,7 @@ MWF.xApplication.query.Query.Importer.Row = new Class({
return
true
;
},
checkProcess
:
function
(
notCheckName
){
var
lp
=
this
.
lp
;
var
json
=
this
.
importer
.
json
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录