Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
浙江兰德纵横网络技术股份有限公司
o2oa
提交
01f88e5b
o2oa
项目概览
浙江兰德纵横网络技术股份有限公司
/
o2oa
通知
332
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,体验更适合开发者的 AI 搜索 >>
提交
01f88e5b
编写于
3月 13, 2024
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
导出功能优化
上级
8d313320
变更
10
展开全部
隐藏空白更改
内联
并排
Showing
10 changed file
with
903 addition
and
861 deletion
+903
-861
o2web/source/x_component_Template/lp/en.js
o2web/source/x_component_Template/lp/en.js
+21
-30
o2web/source/x_component_Template/lp/es.js
o2web/source/x_component_Template/lp/es.js
+39
-48
o2web/source/x_component_Template/utils/ExcelUtils.js
o2web/source/x_component_Template/utils/ExcelUtils.js
+162
-93
o2web/source/x_component_query_ImporterDesigner/$Importer/column.html
.../x_component_query_ImporterDesigner/$Importer/column.html
+2
-0
o2web/source/x_component_query_ImporterDesigner/lp/en.js
o2web/source/x_component_query_ImporterDesigner/lp/en.js
+3
-1
o2web/source/x_component_query_ImporterDesigner/lp/es.js
o2web/source/x_component_query_ImporterDesigner/lp/es.js
+5
-1
o2web/source/x_component_query_ImporterDesigner/lp/zh-cn.js
o2web/source/x_component_query_ImporterDesigner/lp/zh-cn.js
+3
-1
o2web/source/x_component_query_Query/Importer.js
o2web/source/x_component_query_Query/Importer.js
+8
-4
o2web/source/x_component_query_ViewDesigner/lp/en.js
o2web/source/x_component_query_ViewDesigner/lp/en.js
+330
-341
o2web/source/x_component_query_ViewDesigner/lp/es.js
o2web/source/x_component_query_ViewDesigner/lp/es.js
+330
-342
未找到文件。
o2web/source/x_component_Template/lp/en.js
浏览文件 @
01f88e5b
o2
.
xApplication
.
Template
=
o2
.
xApplication
.
Template
||
{};
o2
.
xApplication
.
Template
.
LP
=
{
MWF
.
xApplication
=
MWF
.
xApplication
||
{};
MWF
.
xApplication
.
Template
=
MWF
.
xApplication
.
Template
||
{};
MWF
.
xApplication
.
Template
.
LP
=
{
"
title
"
:
"
Template
"
,
"
delete
"
:
"
Delete
"
,
"
deleteDocumentTitle
"
:
"
Delete Confirmation
"
,
...
...
@@ -8,69 +9,59 @@ o2.xApplication.Template.LP = {
"
createSuccess
"
:
"
Created successfully
"
,
"
updateSuccess
"
:
"
Update successful
"
,
"
inputName
"
:
"
Please enter a name
"
,
"
dateFormatMonth
"
:
"
%Y-%m
"
,
"
dateFormatOnlyMonth
"
:
"
%m
"
,
"
dateFormatDay
"
:
"
%Y-%m-%d
"
,
"
dateFormatMonthDayLocal
"
:
"
%m-%d
"
,
"
dateFormat
"
:
"
db
"
,
"
month
"
:
"
month
"
,
"
today
"
:
"
Today
"
,
"
day
"
:
"
day
"
,
"
cancel
"
:
"
Cancel
"
,
"
ok
"
:
"
OK
"
,
"
name
"
:
"
Name
"
,
"
create_cancel_title
"
:
"
Cancel New Confirmation
"
,
"
create_cancel
"
:
"
Are you sure you want to cancel the new creation?
"
,
"
index
"
:
{
},
"
index
"
:
{},
"
explorer
"
:
{
"
returnText
"
:
"
Return to home page
"
,
"
pageJumperText
"
:
"
Enter the page number and press enter to jump
"
,
"
prePage
"
:
"
Previous Page
"
,
"
nextPage
"
:
"
Next Page
"
},
"
MDomItem
"
:
{
"
emptyTip
"
:
"
{text} cannot be empty
"
,
"
emailTip
"
:
"
Please enter an email in the correct format
"
,
"
urlTip
"
:
"
Please enter a valid URL
"
,
"
phoneNumberTip
"
:
"
Please enter the correct phone number
"
,
"
dateTip
"
:
"
Please enter a valid date
"
,
"
dateISOTip
"
:
"
Please enter a valid date.
"
,
"
numberTip
"
:
"
Please enter a valid number
"
,
"
digitsTip
"
:
"
Only integers can be entered
"
,
"
maxlengthTip
"
:
"
The length cannot exceed {n}
"
,
"
minlengthTip
"
:
"
The length cannot be less than {n}
"
,
"
rangelengthTip
"
:
"
The length cannot be between {n0} and {n1}
"
,
"
rangeTip
"
:
"
Please enter a value between {n0} and {n1}
"
,
"
minTip
"
:
"
Please enter a minimum value of {n}
"
,
"
maxTip
"
:
"
Please enter a value up to {n}
"
,
"
extensionTip
"
:
"
Please upload an attachment in {text} format
"
,
"
defaultTip
"
:
"
Please enter the correct {text}
"
,
"
emailTip
"
:
"
Please enter an email in the correct format
"
,
"
urlTip
"
:
"
Please enter a valid URL
"
,
"
phoneNumberTip
"
:
"
Please enter the correct phone number
"
,
"
dateTip
"
:
"
Please enter a valid date
"
,
"
dateISOTip
"
:
"
Please enter a valid date.
"
,
"
numberTip
"
:
"
Please enter a valid number
"
,
"
digitsTip
"
:
"
Only integers can be entered
"
,
"
maxlengthTip
"
:
"
The length cannot exceed {n}
"
,
"
minlengthTip
"
:
"
The length cannot be less than {n}
"
,
"
rangelengthTip
"
:
"
The length cannot be between {n0} and {n1}
"
,
"
rangeTip
"
:
"
Please enter a value between {n0} and {n1}
"
,
"
minTip
"
:
"
Please enter a minimum value of {n}
"
,
"
maxTip
"
:
"
Please enter a value up to {n}
"
,
"
extensionTip
"
:
"
Please upload an attachment in {text} format
"
,
"
defaultTip
"
:
"
Please enter the correct {text}
"
,
"
selectTip
"
:
"
Please select {text} first
"
,
"
defaultOption
"
:
"
Please choose
"
,
"
setPicture
"
:
"
Set Picture
"
,
"
uploadPictureNotice
"
:
"
Please upload a picture first
"
,
"
selectCoundPicture
"
:
"
Select Cloud File Picture
"
},
"
MGrid
"
:
{
"
sequence
"
:
"
Sequence Number
"
,
"
add
"
:
"
Add
"
,
"
delete
"
:
"
Delete
"
,
"
addMaxLimitText
"
:
"
You can only add up to {count} items
"
},
"
MPopupForm
"
:
{
"
close
"
:
"
Close
"
,
"
max
"
:
"
Maximize
"
,
"
restore
"
:
"
Restore
"
}
};
\ No newline at end of file
}
MWF
.
xApplication
.
Template
[
"
lp.
"
+
o2
.
language
]
=
MWF
.
xApplication
.
Template
.
LP
\ No newline at end of file
o2web/source/x_component_Template/lp/es.js
浏览文件 @
01f88e5b
o2
.
xApplication
.
Template
=
o2
.
xApplication
.
Template
||
{};
o2
.
xApplication
.
Template
.
LP
=
{
MWF
.
xApplication
=
MWF
.
xApplication
||
{};
MWF
.
xApplication
.
Template
=
MWF
.
xApplication
.
Template
||
{};
MWF
.
xApplication
.
Template
.
LP
=
{
"
title
"
:
"
Plantilla
"
,
"
delete
"
:
"
Eliminar
"
,
"
delete
"
:
"
Eliminar
"
,
"
deleteDocumentTitle
"
:
"
Confirmación para eliminar
"
,
"
deleteDocument
"
:
"
¿Está seguro que desea eliminar esta información?
"
,
"
deleteDocumentOK
"
:
"
Eliminado con éxito
"
,
"
createSuccess
"
:
"
Creado con éxito
"
,
"
updateSuccess
"
:
"
Actualizado con éxito
"
,
"
inputName
"
:
"
Ingrese un nombre
"
,
"
createSuccess
"
:
"
Creado con éxito
"
,
"
updateSuccess
"
:
"
Actualizado con éxito
"
,
"
inputName
"
:
"
Ingrese un nombre
"
,
"
dateFormatMonth
"
:
"
%Y年%m月
"
,
"
dateFormatOnlyMonth
"
:
"
%m
"
,
"
dateFormatDay
"
:
"
%Y-%m-%d
"
,
"
dateFormatMonthDayLocal
"
:
"
%d de %B
"
,
"
dateFormat
"
:
"
db
"
,
"
month
"
:
"
mes
"
,
"
today
"
:
"
hoy
"
,
"
day
"
:
"
día
"
,
"
cancel
"
:
"
Cancelar
"
,
"
ok
"
:
"
Aceptar
"
,
"
name
"
:
"
Nombre
"
,
"
month
"
:
"
mes
"
,
"
today
"
:
"
hoy
"
,
"
day
"
:
"
día
"
,
"
cancel
"
:
"
Cancelar
"
,
"
ok
"
:
"
Aceptar
"
,
"
name
"
:
"
Nombre
"
,
"
create_cancel_title
"
:
"
Confirmación para cancelar la creación
"
,
"
create_cancel
"
:
"
¿Está seguro que desea cancelar la creación?
"
,
"
index
"
:
{
},
"
explorer
"
:
{
"
returnText
"
:
"
Volver a la página principal
"
,
"
index
"
:
{},
"
explorer
"
:
{
"
returnText
"
:
"
Volver a la página principal
"
,
"
pageJumperText
"
:
"
Ingrese el número de página y presione Enter para saltar
"
,
"
prePage
"
:
"
Página anterior
"
,
"
prePage
"
:
"
Página anterior
"
,
"
nextPage
"
:
"
Página siguiente
"
},
"
MDomItem
"
:
{
"
MDomItem
"
:
{
"
emptyTip
"
:
"
{text} no puede estar vacío
"
,
"
emailTip
"
:
"
Ingrese un correo electrónico con formato válido
"
,
"
urlTip
"
:
"
Ingrese una URL válida
"
,
"
phoneNumberTip
"
:
"
Ingrese un número de teléfono móvil válido
"
,
"
dateTip
"
:
"
Ingrese una fecha válida
"
,
"
dateISOTip
"
:
"
Ingrese una fecha válida.
"
,
"
numberTip
"
:
"
Ingrese un valor numérico válido
"
,
"
digitsTip
"
:
"
Solo se permiten números enteros
"
,
"
maxlengthTip
"
:
"
La longitud no puede ser mayor a {n}
"
,
"
minlengthTip
"
:
"
La longitud no puede ser menor a {n}
"
,
"
rangelengthTip
"
:
"
La longitud debe estar entre {n0} y {n1}
"
,
"
rangeTip
"
:
"
Ingrese un valor entre {n0} y {n1}
"
,
"
minTip
"
:
"
Ingrese un valor mínimo de {n}
"
,
"
maxTip
"
:
"
Ingrese un valor máximo de {n}
"
,
"
extensionTip
"
:
"
Por favor, cargue un archivo de {text}
"
,
"
defaultTip
"
:
"
Ingrese un valor válido para {text}
"
,
"
emailTip
"
:
"
Ingrese un correo electrónico con formato válido
"
,
"
urlTip
"
:
"
Ingrese una URL válida
"
,
"
phoneNumberTip
"
:
"
Ingrese un número de teléfono móvil válido
"
,
"
dateTip
"
:
"
Ingrese una fecha válida
"
,
"
dateISOTip
"
:
"
Ingrese una fecha válida.
"
,
"
numberTip
"
:
"
Ingrese un valor numérico válido
"
,
"
digitsTip
"
:
"
Solo se permiten números enteros
"
,
"
maxlengthTip
"
:
"
La longitud no puede ser mayor a {n}
"
,
"
minlengthTip
"
:
"
La longitud no puede ser menor a {n}
"
,
"
rangelengthTip
"
:
"
La longitud debe estar entre {n0} y {n1}
"
,
"
rangeTip
"
:
"
Ingrese un valor entre {n0} y {n1}
"
,
"
minTip
"
:
"
Ingrese un valor mínimo de {n}
"
,
"
maxTip
"
:
"
Ingrese un valor máximo de {n}
"
,
"
extensionTip
"
:
"
Por favor, cargue un archivo de {text}
"
,
"
defaultTip
"
:
"
Ingrese un valor válido para {text}
"
,
"
selectTip
"
:
"
Seleccione primero {text}
"
,
"
defaultOption
"
:
"
Seleccione una opción
"
,
"
setPicture
"
:
"
Establecer imagen
"
,
"
uploadPictureNotice
"
:
"
Cargue primero una imagen
"
,
"
uploadPictureNotice
"
:
"
Cargue primero una imagen
"
,
"
selectCoundPicture
"
:
"
Seleccionar imagen de archivos en la nube
"
},
"
MGrid
"
:
{
"
sequence
"
:
"
Secuencia
"
,
"
MGrid
"
:
{
"
sequence
"
:
"
Secuencia
"
,
"
add
"
:
"
Agregar
"
,
"
delete
"
:
"
Eliminar
"
,
"
addMaxLimitText
"
:
"
Solo se pueden agregar hasta {count} elementos
"
},
"
MPopupForm
"
:
{
"
MPopupForm
"
:
{
"
close
"
:
"
Cerrar
"
,
"
max
"
:
"
Maximizar
"
,
"
restore
"
:
"
Restaurar
"
}
};
\ No newline at end of file
}
MWF
.
xApplication
.
Template
[
"
lp.
"
+
o2
.
language
]
=
MWF
.
xApplication
.
Template
.
LP
\ No newline at end of file
o2web/source/x_component_Template/utils/ExcelUtils.js
浏览文件 @
01f88e5b
...
...
@@ -26,19 +26,6 @@ MWF.xApplication.Template.utils.ExcelUtils = new Class({
}
}
},
_loadResource
:
function
(
callback
){
if
(
!
window
.
XLSX
||
!
window
.
xlsxUtils
){
var
uri
=
"
../x_component_Template/framework/xlsx/xlsx.full.js
"
;
var
uri2
=
"
../x_component_Template/framework/xlsx/xlsxUtils.js
"
;
COMMON
.
AjaxModule
.
load
(
uri
,
function
(){
COMMON
.
AjaxModule
.
load
(
uri2
,
function
(){
callback
();
}.
bind
(
this
))
}.
bind
(
this
))
}
else
{
callback
();
}
},
_openDownloadDialog
:
function
(
url
,
saveName
,
callback
){
/**
* 通用的打开下载对话框方法,没有测试过具体兼容性
...
...
@@ -115,102 +102,184 @@ MWF.xApplication.Template.utils.ExcelUtils = new Class({
var
fileNode
=
uploadFileAreaNode
.
getFirst
();
fileNode
.
click
();
},
_loadExportResource
:
function
(
callback
){
if
(
!
window
.
ExcelJS
){
var
uri
=
"
../o2_lib/exceljs/babel-polyfill-6.2.js
"
;
var
uri2
=
"
../o2_lib/exceljs/exceljs.min.js
"
;
COMMON
.
AjaxModule
.
load
(
uri
,
function
(){
COMMON
.
AjaxModule
.
load
(
uri2
,
function
(){
callback
();
}.
bind
(
this
))
}.
bind
(
this
))
}
else
{
callback
();
}
},
exportToExcel
:
function
(
array
,
fileName
,
colWidthArr
,
dateIndexArray
,
numberIndexArray
,
callback
){
debugger
;
// var array = [["姓名","性别","学历","专业","出生日期","毕业日期"]];
// array.push([ "张三","男","大学本科","计算机","2001-1-2","2019-9-2" ]);
// array.push([ "李四","男","大学专科","数学","1998-1-2","2018-9-2" ]);
// this.exportToExcel(array, "导出数据"+(new Date).format("db"));
this
.
_loadResource
(
function
(){
var
data
=
window
.
xlsxUtils
.
format2Sheet
(
array
,
0
,
0
,
null
);
//偏移3行按keyMap顺序转换
var
wb
=
window
.
xlsxUtils
.
format2WB
(
data
,
"
sheet1
"
,
undefined
);
var
wopts
=
{
bookType
:
'
xlsx
'
,
bookSST
:
false
,
type
:
'
binary
'
};
debugger
;
var
dataInfo
=
wb
.
Sheets
[
wb
.
SheetNames
[
0
]];
this
.
_loadExportResource
(
function
(){
var
workbook
=
new
ExcelJS
.
Workbook
();
var
sheet
=
workbook
.
addWorksheet
(
'
sheet1
'
);
//sheet.properties.defaultRowHeight = 25;
var
widthArray
=
[];
array
[
0
].
each
(
function
(
v
,
i
){
//设置标题行样式
this
.
appendDataToSheet
(
sheet
,
array
,
colWidthArr
,
dateIndexArray
,
numberIndexArray
);
if
(
!
colWidthArr
)
widthArray
.
push
(
{
wpx
:
100
}
);
// var at = String.fromCharCode(97 + i).toUpperCase();
var
at
=
this
.
index2ColName
(
i
);
var
di
=
dataInfo
[
at
+
"
1
"
];
// di.v = v;
// di.t = "s";
di
.
s
=
{
//设置副标题样式
font
:
{
//name: '宋体',
sz
:
12
,
color
:
{
rgb
:
"
#FFFF0000
"
},
bold
:
true
,
italic
:
false
,
underline
:
false
},
alignment
:
{
horizontal
:
"
center
"
,
vertical
:
"
center
"
}
};
workbook
.
xlsx
.
writeBuffer
().
then
(
function
(
buffer
){
var
blob
=
new
Blob
([
buffer
]);
this
.
_openDownloadDialog
(
blob
,
fileName
+
"
.xlsx
"
,
callback
);
}.
bind
(
this
));
if
(
dateIndexArray
&&
dateIndexArray
.
length
){
dateIndexArray
.
each
(
function
(
value
,
index
){
dateIndexArray
[
index
]
=
this
.
index2ColName
(
value
);
}.
bind
(
this
))
}
if
(
numberIndexArray
&&
numberIndexArray
.
length
){
numberIndexArray
.
each
(
function
(
value
,
index
){
numberIndexArray
[
index
]
=
this
.
index2ColName
(
value
);
}.
bind
(
this
))
}.
bind
(
this
))
},
appendDataToSheet
:
function
(
sheet
,
array
,
colWidthArr
,
dateIndexArray
,
numberIndexArray
){
var
titleRow
=
sheet
.
getRow
(
1
);
var
titleArray
=
array
.
shift
();
titleArray
.
each
(
function
(
title
,
i
){
var
value
,
options
;
if
(
o2
.
typeOf
(
title
)
===
'
object
'
){
value
=
title
.
text
;
options
=
title
.
options
;
}
else
{
value
=
title
;
}
sheet
.
getColumn
(
i
+
1
).
width
=
colWidthArr
[
i
]
?
(
colWidthArr
[
i
]
/
10
)
:
20
;
var
cell
=
titleRow
.
getCell
(
i
+
1
);
cell
.
value
=
value
;
cell
.
font
=
{
name
:
'
宋体
'
,
family
:
4
,
size
:
12
,
bold
:
true
};
// cell.fill = {
// type: 'pattern',
// pattern:'solid',
// fgColor:{argb:'FFFFFF'}
// };
cell
.
alignment
=
{
vertical
:
'
middle
'
,
horizontal
:
'
center
'
,
wrapText
:
true
};
});
var
typeFlag
=
(
dateIndexArray
&&
dateIndexArray
.
length
)
||
(
numberIndexArray
&&
numberIndexArray
.
length
);
for
(
var
key
in
dataInfo
){
//设置所有样式,wrapText=true 后 /n会被换行
if
(
key
.
substr
(
0
,
1
)
!==
"
!
"
){
var
di
=
dataInfo
[
key
];
if
(
!
di
.
s
)
di
.
s
=
{};
if
(
!
di
.
s
.
alignment
)
di
.
s
.
alignment
=
{};
di
.
s
.
alignment
.
wrapText
=
true
;
if
(
typeFlag
){
var
colName
=
key
.
replace
(
/
\d
+/g
,
''
);
//清除数字
var
rowNum
=
key
.
replace
(
colName
,
''
);
if
(
rowNum
>
1
){
if
(
dateIndexArray
&&
dateIndexArray
.
length
&&
dateIndexArray
.
contains
(
colName
)
){
//di.s.numFmt = "yyyy-mm-dd HH:MM:SS"; //日期列 两种方式都可以
di
.
z
=
'
yyyy-mm-dd HH:MM:SS
'
;
//日期列
}
if
(
numberIndexArray
&&
numberIndexArray
.
length
&&
numberIndexArray
.
contains
(
colName
)
){
di
.
s
.
alignment
.
wrapText
=
false
;
di
.
t
=
'
n
'
;
//数字类型
}
}
}
array
.
each
(
function
(
contentArray
,
i
){
var
contentRow
=
sheet
.
getRow
(
i
+
2
);
contentArray
.
each
(
function
(
content
,
j
){
var
cell
=
contentRow
.
getCell
(
j
+
1
);
cell
.
value
=
content
;
cell
.
font
=
{
name
:
'
宋体
'
,
family
:
4
,
size
:
12
,
bold
:
false
};
if
(
(
dateIndexArray
||
[]).
contains
(
j
)
){
cell
.
numFmt
=
'
yyyy-mm-dd HH:MM:SS
'
;
}
var
isNumber
=
(
numberIndexArray
||
[]
).
contains
(
j
);
cell
.
alignment
=
{
vertical
:
'
middle
'
,
horizontal
:
'
center
'
,
wrapText
:
!
isNumber
};
});
});
},
// exportToExcel2: function(array, fileName, colWidthArr, dateIndexArray, numberIndexArray, callback){
// // var array = [["姓名","性别","学历","专业","出生日期","毕业日期"]];
// // array.push([ "张三","男","大学本科","计算机","2001-1-2","2019-9-2" ]);
// // array.push([ "李四","男","大学专科","数学","1998-1-2","2018-9-2" ]);
// // this.exportToExcel(array, "导出数据"+(new Date).format("db"));
// this._loadExportResource( function(){
// var data = window.xlsxUtils.format2Sheet(array, 0, 0, null);//偏移3行按keyMap顺序转换
// var wb = window.xlsxUtils.format2WB(data, "sheet1", undefined);
// var wopts = { bookType: 'xlsx', bookSST: false, type: 'binary' };
// debugger;
// var dataInfo = wb.Sheets[wb.SheetNames[0]];
//
// var widthArray = [];
// array[0].each( function( v, i ){ //设置标题行样式
//
// if( !colWidthArr )widthArray.push( {wpx: 100} );
//
// // var at = String.fromCharCode(97 + i).toUpperCase();
// var at = this.index2ColName(i);
// var di = dataInfo[at+"1"];
// // di.v = v;
// // di.t = "s";
// di.s = { //设置副标题样式
// font: {
// //name: '宋体',
// sz: 12,
// color: {rgb: "#FFFF0000"},
// bold: true,
// italic: false,
// underline: false
// },
// alignment: {
// horizontal: "center" ,
// vertical: "center"
// }
// };
// }.bind(this));
//
// if( dateIndexArray && dateIndexArray.length ){
// dateIndexArray.each( function( value, index ){
// dateIndexArray[ index ] = this.index2ColName(value);
// }.bind(this))
// }
//
// if( numberIndexArray && numberIndexArray.length ){
// numberIndexArray.each( function( value, index ){
// numberIndexArray[ index ] = this.index2ColName(value);
// }.bind(this))
// }
//
// var typeFlag = ( dateIndexArray && dateIndexArray.length ) || ( numberIndexArray && numberIndexArray.length );
//
// for( var key in dataInfo ){
// //设置所有样式,wrapText=true 后 /n会被换行
// if( key.substr(0, 1) !== "!" ){
// var di = dataInfo[key];
// if( !di.s )di.s = {};
// if( !di.s.alignment )di.s.alignment = {};
// di.s.alignment.wrapText = true;
//
// if( typeFlag ){
//
// var colName = key.replace(/\d+/g,''); //清除数字
// var rowNum = key.replace( colName, '');
//
// if( rowNum > 1 ){
// if( dateIndexArray && dateIndexArray.length && dateIndexArray.contains( colName ) ){
// //di.s.numFmt = "yyyy-mm-dd HH:MM:SS"; //日期列 两种方式都可以
// di.z = 'yyyy-mm-dd HH:MM:SS'; //日期列
// }
// if( numberIndexArray && numberIndexArray.length && numberIndexArray.contains( colName ) ){
// di.s.alignment.wrapText = false;
// di.t = 'n'; //数字类型
// }
// }
//
// }
// }
//
// }
//
// if( colWidthArr ){
// colWidthArr.each( function (w) {
// widthArray.push( {wpx: w} );
// })
// }
// dataInfo['!cols'] = widthArray; //列宽度
//
// this._openDownloadDialog(window.xlsxUtils.format2Blob(wb), fileName +".xlsx", callback);
// }.bind(this))
// },
}
if
(
colWidthArr
){
colWidthArr
.
each
(
function
(
w
)
{
widthArray
.
push
(
{
wpx
:
w
}
);
})
}
dataInfo
[
'
!cols
'
]
=
widthArray
;
//列宽度
this
.
_openDownloadDialog
(
window
.
xlsxUtils
.
format2Blob
(
wb
),
fileName
+
"
.xlsx
"
,
callback
);
}.
bind
(
this
))
_loadImportResource
:
function
(
callback
){
if
(
!
window
.
XLSX
||
!
window
.
xlsxUtils
){
var
uri
=
"
../x_component_Template/framework/xlsx/xlsx.full.js
"
;
var
uri2
=
"
../x_component_Template/framework/xlsx/xlsxUtils.js
"
;
COMMON
.
AjaxModule
.
load
(
uri
,
function
(){
COMMON
.
AjaxModule
.
load
(
uri2
,
function
(){
callback
();
}.
bind
(
this
))
}.
bind
(
this
))
}
else
{
callback
();
}
},
importFromExcel
:
function
(
file
,
callback
,
dateColArray
){
debugger
;
var
_self
=
this
;
this
.
_loadResource
(
function
(){
this
.
_load
Import
Resource
(
function
(){
var
reader
=
new
FileReader
();
var
workbook
,
data
;
reader
.
onload
=
function
(
e
)
{
...
...
o2web/source/x_component_query_ImporterDesigner/$Importer/column.html
浏览文件 @
01f88e5b
...
...
@@ -137,6 +137,8 @@
</div>
</div>
<div
style=
"background-color: #EEE; height:24px; line-height: 24px; text-align: center; font-weight: bold"
>
{{$.lp.excelSelectedOption}}
</div>
<div
class=
"MWFFormulaArea"
name=
"optionScript"
title=
"{{$.lp.selectedOptionScript}}"
></div>
<!-- <div style="display:text{($.vtype=='process')?'block':'none'}" id="text{$.pid}processFieldProperty" class="text{$.vid}processFieldProperty">-->
<!-- <div style="background-color: #EEE; height:24px; line-height: 24px; text-align: center; font-weight: bold">{{$.lp.workProperty}}</div>-->
<!-- <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">-->
...
...
o2web/source/x_component_query_ImporterDesigner/lp/en.js
浏览文件 @
01f88e5b
...
...
@@ -133,7 +133,9 @@ MWF.xApplication.query.ImporterDesigner.LP={
"
valueScriptDocumentNote
"
:
"
If you import a CMS document, the document data generated by the system
"
,
"
valueScriptWorkNote
"
:
"
If importing process Work, the system generated work data
"
,
"
selectField
"
:
"
Select Column/Field
"
,
"
idPathNote
"
:
"
When importing self created table data, a field path of 'id' indicates updating the original record.
"
"
idPathNote
"
:
"
When importing self created table data, a field path of 'id' indicates updating the original record.
"
,
"
excelSelectedOption
"
:
"
excel column options
"
,
"
selectedOptionScript
"
:
"
Optional script
"
},
"
formToolbar
"
:
{
"
save
"
:
"
Save
"
,
...
...
o2web/source/x_component_query_ImporterDesigner/lp/es.js
浏览文件 @
01f88e5b
...
...
@@ -133,7 +133,11 @@ MWF.xApplication.query.ImporterDesigner.LP={
"
valueScriptDataNote
"
:
"
Datos empresariales generados por el sistema según la configuración
"
,
"
valueScriptDocumentNote
"
:
"
Si importa documentos CMS, se generarán los datos del documento por el sistema
"
,
"
valueScriptWorkNote
"
:
"
Si importa trabajos de proceso, se generarán los datos de trabajo por el sistema
"
,
"
idPathNote
"
:
"
Al importar los datos de la tabla autoconstruida, la ruta de campo 'id' significa actualizar el registro original.
"
"
idPathNote
"
:
"
Al importar los datos de la tabla autoconstruida, la ruta de campo 'id' significa actualizar el registro original.
"
,
"
excelSelectedOption
"
:
"
columna excel opcional
"
,
"
selectedOptionScript
"
:
"
script opcional
"
,
"
excelSelectedOption
"
:
"
La columna Excel es opcional
"
,
"
selectedOptionScript
"
:
"
Guión opcional
"
},
"
formToolbar
"
:
{
"
save
"
:
"
Guardar
"
,
...
...
o2web/source/x_component_query_ImporterDesigner/lp/zh-cn.js
浏览文件 @
01f88e5b
...
...
@@ -153,7 +153,9 @@ MWF.xApplication.query.ImporterDesigner.LP = {
"
valueScriptDataNote
"
:
"
系统根据配置生成的业务数据
"
,
"
valueScriptDocumentNote
"
:
"
如果导入CMS文档,系统生成的文档数据
"
,
"
valueScriptWorkNote
"
:
"
如果导入流程work,系统生成的工作数据
"
,
"
idPathNote
"
:
"
当导入自建表数据时,字段路径为'id'表示更新原有记录。
"
"
idPathNote
"
:
"
当导入自建表数据时,字段路径为'id'表示更新原有记录。
"
,
"
excelSelectedOption
"
:
"
excel列可选项
"
,
"
selectedOptionScript
"
:
"
可选项脚本
"
},
"
formToolbar
"
:{
"
save
"
:
"
保存
"
,
...
...
o2web/source/x_component_query_Query/Importer.js
浏览文件 @
01f88e5b
...
...
@@ -805,11 +805,15 @@ MWF.xApplication.query.Query.Importer = MWF.QImporter = new Class(
return
title
;
},
getTitleArray
:
function
(){
var
titleArray
=
[];
this
.
json
.
data
.
columnList
.
each
(
function
(
columnJson
,
i
)
{
titleArray
.
push
(
columnJson
.
displayName
);
return
this
.
json
.
data
.
columnList
.
map
(
function
(
columnJson
,
i
)
{
var
obj
=
{
text
:
columnJson
.
displayName
};
if
(
columnJson
.
optionScript
){
obj
.
options
=
this
.
Macro
.
exec
(
columnJson
.
optionScript
,
this
);
}
return
obj
;
}.
bind
(
this
));
return
titleArray
;
},
getColWidthArray
:
function
(){
var
colWidthArr
=
[];
...
...
o2web/source/x_component_query_ViewDesigner/lp/en.js
浏览文件 @
01f88e5b
此差异已折叠。
点击以展开。
o2web/source/x_component_query_ViewDesigner/lp/es.js
浏览文件 @
01f88e5b
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录