Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
5fbdea9d
提交
5fbdea9d
authored
10月 28, 2022
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
30429 系统通用功能--数据下钻/打印弹窗--均打开新页面,不要弹窗,太小了
上级
6354e6e4
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
141 行增加
和
120 行删除
+141
-120
encryptApiList.js
one_stop_public/Base16/encryptApiList.js
+3
-0
globalFunction.js
one_stop_public/Table/globalFunction.js
+104
-118
index.js
one_stop_public/libs/formList/index.js
+1
-0
FormModal.jsx
one_stop_public/tableCompon/FormModal.jsx
+16
-1
style.less
one_stop_public/tableCompon/style.less
+17
-1
没有找到文件。
one_stop_public/Base16/encryptApiList.js
浏览文件 @
5fbdea9d
...
@@ -147,6 +147,9 @@ const resBinaryApiList = [
...
@@ -147,6 +147,9 @@ const resBinaryApiList = [
{
{
api
:
'UnifiedAppApi/getDetail'
,
api
:
'UnifiedAppApi/getDetail'
,
},
},
{
api
:
'DataColumnApi/getHeaderList'
,
},
{
{
api
:
'UnifiedServiceApi/getDetail'
,
api
:
'UnifiedServiceApi/getDetail'
,
},
},
...
...
one_stop_public/Table/globalFunction.js
浏览文件 @
5fbdea9d
...
@@ -24,24 +24,19 @@ const apiUrl = queryOauthActionPath();
...
@@ -24,24 +24,19 @@ const apiUrl = queryOauthActionPath();
* 返回值
* 返回值
* rowSpanData 列合并数据,colSpanData行合并数据
* rowSpanData 列合并数据,colSpanData行合并数据
* */
* */
export
function
getSpanJson
({
export
function
getSpanJson
({
mergeKey
,
data
,
eliminateRow
=
[],
eliminateCol
=
[]
})
{
mergeKey
,
data
,
eliminateRow
=
[],
eliminateCol
=
[]
})
{
const
dataList
=
deepCopy
(
data
);
const
dataList
=
deepCopy
(
data
);
let
rowSpanData
,
colSpanData
=
null
;
let
rowSpanData
,
colSpanData
=
null
;
try
{
try
{
rowSpanData
=
getRowSpanJson
(
mergeKey
,
dataList
,
eliminateRow
);
rowSpanData
=
getRowSpanJson
(
mergeKey
,
dataList
,
eliminateRow
);
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
table
(
"rowSpanData"
,
err
);
console
.
table
(
'rowSpanData'
,
err
);
}
}
try
{
try
{
colSpanData
=
getColSpanJson
(
mergeKey
,
dataList
,
eliminateCol
);
colSpanData
=
getColSpanJson
(
mergeKey
,
dataList
,
eliminateCol
);
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
table
(
"colSpanData"
,
err
);
console
.
table
(
'colSpanData'
,
err
);
}
}
return
{
return
{
rowSpanData
,
rowSpanData
,
...
@@ -191,7 +186,7 @@ export function getColumns(columns) {
...
@@ -191,7 +186,7 @@ export function getColumns(columns) {
}
}
return
res
;
return
res
;
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
table
(
"getColumnsData"
,
e
);
console
.
table
(
'getColumnsData'
,
e
);
return
false
;
return
false
;
}
}
}
}
...
@@ -216,7 +211,6 @@ export function getColumns(columns) {
...
@@ -216,7 +211,6 @@ export function getColumns(columns) {
return
maxLevel
;
return
maxLevel
;
}
}
//递归当前数据宽度
//递归当前数据宽度
function
getColumnsWidth
(
data
=
[],
sum
=
0
)
{
function
getColumnsWidth
(
data
=
[],
sum
=
0
)
{
for
(
let
item
of
data
)
{
for
(
let
item
of
data
)
{
...
@@ -229,18 +223,12 @@ export function getColumns(columns) {
...
@@ -229,18 +223,12 @@ export function getColumns(columns) {
return
sum
;
return
sum
;
}
}
let
columnsHandle
=
getColumnsData
(
columns
)
let
columnsHandle
=
getColumnsData
(
columns
).
filter
((
v
,
i
)
=>
{
.
filter
((
v
,
i
)
=>
{
return
(
v
.
level
<
columnsHeight
&&
v
.
isLast
)
||
v
.
width
>
1
;
return
(
v
.
level
<
columnsHeight
&&
v
.
isLast
)
||
v
.
width
>
1
;
});
});
let
columnsMerges
=
[];
let
columnsMerges
=
[];
columnsHandle
.
forEach
((
v
,
i
)
=>
{
columnsHandle
.
forEach
((
v
,
i
)
=>
{
let
{
let
{
isLast
,
width
,
col
,
level
}
=
v
;
isLast
,
width
,
col
,
level
}
=
v
;
let
nowCol
=
col
-
1
;
let
nowCol
=
col
-
1
;
let
nowLevel
=
level
-
1
;
let
nowLevel
=
level
-
1
;
if
(
isLast
&&
width
===
1
)
{
if
(
isLast
&&
width
===
1
)
{
...
@@ -276,15 +264,11 @@ export function getColumnsSqlKeyRealize({
...
@@ -276,15 +264,11 @@ export function getColumnsSqlKeyRealize({
styles
,
styles
,
fileName
=
'导出文件'
,
fileName
=
'导出文件'
,
ext
=
'xlsx'
,
ext
=
'xlsx'
,
allValues
=
JSON
.
stringify
({})
allValues
=
JSON
.
stringify
({}),
})
{
})
{
columns
=
deepCopy
(
columns
);
columns
=
deepCopy
(
columns
);
let
{
let
{
columnsList
,
columnsMerges
,
columnsKey
}
=
getColumns
(
columns
);
columnsList
,
columnsMerges
,
columnsKey
}
=
getColumns
(
columns
);
let
content
=
{
let
content
=
{
sheets
:
[
sheets
:
[
...
@@ -328,7 +312,7 @@ export function getColumnsSqlKeyRealize({
...
@@ -328,7 +312,7 @@ export function getColumnsSqlKeyRealize({
{
{
content
:
JSON
.
stringify
(
content
),
content
:
JSON
.
stringify
(
content
),
title
:
fileName
,
title
:
fileName
,
allValues
:
allValues
allValues
:
allValues
,
},
},
`
${
apiUrl
+
'/DataObjApi/exportCustom'
}
`
,
`
${
apiUrl
+
'/DataObjApi/exportCustom'
}
`
,
);
);
...
@@ -343,7 +327,7 @@ export function getColumnsSqlKeyRealize({
...
@@ -343,7 +327,7 @@ export function getColumnsSqlKeyRealize({
ext
,
ext
,
);
);
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
table
(
"getColumnsSqlKeyRealize"
,
err
);
console
.
table
(
'getColumnsSqlKeyRealize'
,
err
);
}
}
}
}
...
@@ -407,9 +391,8 @@ export function getColumnsDataRealize({
...
@@ -407,9 +391,8 @@ export function getColumnsDataRealize({
ext
,
ext
,
);
);
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
table
(
"getColumnsDataRealize"
,
err
);
console
.
table
(
'getColumnsDataRealize'
,
err
);
}
}
}
}
/**
/**
...
@@ -440,20 +423,12 @@ export function getColumnsData({
...
@@ -440,20 +423,12 @@ export function getColumnsData({
})
{
})
{
columns
=
deepCopy
(
columns
);
columns
=
deepCopy
(
columns
);
data
=
deepCopy
(
data
);
data
=
deepCopy
(
data
);
let
{
let
{
columnsList
,
columnsMerges
,
columnsKey
,
columnsHeight
}
=
getColumns
(
columns
);
columnsList
,
let
{
colSpanData
,
rowSpanData
}
=
getSpanJson
({
columnsMerges
,
columnsKey
,
columnsHeight
}
=
getColumns
(
columns
);
let
{
colSpanData
,
rowSpanData
}
=
getSpanJson
({
mergeKey
,
mergeKey
,
data
,
data
,
eliminateRow
,
eliminateRow
,
eliminateCol
eliminateCol
,
});
});
// 处理数据
// 处理数据
let
bodyData
=
[];
let
bodyData
=
[];
...
@@ -492,7 +467,7 @@ export function getColumnsData({
...
@@ -492,7 +467,7 @@ export function getColumnsData({
});
});
});
});
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
table
(
"getColumnsDataRealize"
,
err
);
console
.
table
(
'getColumnsDataRealize'
,
err
);
}
}
let
content
=
{
let
content
=
{
sheets
:
[
sheets
:
[
...
@@ -529,58 +504,65 @@ export function getColumnsData({
...
@@ -529,58 +504,65 @@ export function getColumnsData({
if
(
styles
)
{
if
(
styles
)
{
content
.
styles
=
styles
;
content
.
styles
=
styles
;
}
}
return
content
return
content
;
}
}
// ant列表组件合并表格 render属性,合并纵向、横向。
// ant列表组件合并表格 render属性,合并纵向、横向。
export
function
renderContentAll
(
value
,
row
,
index
,
key
,
spanData
,
cloumnNames
=
[])
{
export
function
renderContentAll
(
value
,
row
,
index
,
key
,
spanData
,
cloumnNames
=
[])
{
let
colSpan
,
let
colSpan
,
rowSpan
=
null
;
rowSpan
=
null
;
try
{
try
{
colSpan
=
spanData
.
colSpanData
[
key
][
index
];
// 横向合并
colSpan
=
spanData
.
colSpanData
[
key
][
index
];
// 横向合并
rowSpan
=
spanData
.
rowSpanData
[
key
][
index
];
// 纵向合并
rowSpan
=
spanData
.
rowSpanData
[
key
][
index
];
// 纵向合并
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
table
(
"renderContentAll"
,
err
);
console
.
table
(
'renderContentAll'
,
err
);
}
}
const
obj
=
{
const
obj
=
{
children
:
value
,
children
:
value
,
props
:
{
props
:
{
rowSpan
:
rowSpan
,
rowSpan
:
rowSpan
,
colSpan
:
colSpan
colSpan
:
colSpan
,
}
},
};
};
return
obj
;
return
obj
;
}
}
// ant列表组件合并表格 render属性,合并纵向。 meanwhileKey :key 是本身字段key,value 是同步的字段key
// ant列表组件合并表格 render属性,合并纵向。 meanwhileKey :key 是本身字段key,value 是同步的字段key
export
function
renderContentRow
(
value
,
row
,
index
,
key
,
spanData
,
cloumnNames
=
[],
meanwhileKey
=
{})
{
export
function
renderContentRow
(
value
,
row
,
index
,
key
,
spanData
,
cloumnNames
=
[],
meanwhileKey
=
{},
)
{
let
colSpan
,
let
colSpan
,
rowSpan
=
null
;
rowSpan
=
null
;
try
{
try
{
if
(
cloumnNames
.
indexOf
(
key
)
!==
-
1
)
{
if
(
cloumnNames
.
indexOf
(
key
)
!==
-
1
)
{
rowSpan
=
spanData
.
rowSpanData
[
key
][
index
];
// 纵向合并
rowSpan
=
spanData
.
rowSpanData
[
key
][
index
];
// 纵向合并
}
else
{
}
else
{
if
(
key
in
meanwhileKey
&&
meanwhileKey
[
key
])
{
if
(
key
in
meanwhileKey
&&
meanwhileKey
[
key
])
{
let
meanwhileKeyValue
=
meanwhileKey
[
key
];
let
meanwhileKeyValue
=
meanwhileKey
[
key
];
rowSpan
=
spanData
.
rowSpanData
[
meanwhileKeyValue
][
index
];
// 同步字段 的纵向合并
rowSpan
=
spanData
.
rowSpanData
[
meanwhileKeyValue
][
index
];
// 同步字段 的纵向合并
}
else
{
}
else
{
rowSpan
=
1
;
rowSpan
=
1
;
}
}
}
}
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
table
(
"renderContentRow"
,
err
);
console
.
table
(
'renderContentRow'
,
err
);
}
}
const
obj
=
{
const
obj
=
{
children
:
value
,
children
:
value
,
props
:
{
props
:
{
rowSpan
:
rowSpan
,
rowSpan
:
rowSpan
,
colSpan
:
1
colSpan
:
1
,
}
},
};
};
return
obj
;
return
obj
;
}
}
/**
/**
* 表头和数据导出(合并表格)
* 表头和数据导出(合并表格)
* templatePath : word文档模板地址
* templatePath : word文档模板地址
...
@@ -625,10 +607,8 @@ export function getWord({
...
@@ -625,10 +607,8 @@ export function getWord({
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
table
(
err
);
console
.
table
(
err
);
}
}
}
}
/**
/**
* 表头和数据导出(合并表格)
* 表头和数据导出(合并表格)
* templatePath : word文档模板地址
* templatePath : word文档模板地址
...
@@ -673,10 +653,8 @@ export function getFileAndShow({
...
@@ -673,10 +653,8 @@ export function getFileAndShow({
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
table
(
err
);
console
.
table
(
err
);
}
}
}
}
/**
/**
* 表头和数据导出(合并表格)
* 表头和数据导出(合并表格)
* templatePath : word文档模板地址
* templatePath : word文档模板地址
...
@@ -697,7 +675,7 @@ export function getListWord({
...
@@ -697,7 +675,7 @@ export function getListWord({
listConfig
=
{},
listConfig
=
{},
ext
=
'zip'
,
ext
=
'zip'
,
sonExt
=
'pdf'
,
sonExt
=
'pdf'
,
filesKey
=
[]
filesKey
=
[],
})
{
})
{
try
{
try
{
let
content
=
[];
let
content
=
[];
...
@@ -707,10 +685,8 @@ export function getListWord({
...
@@ -707,10 +685,8 @@ export function getListWord({
for
(
var
ki
in
filesKey
)
{
for
(
var
ki
in
filesKey
)
{
let
files_
=
v
[
filesKey
[
ki
]];
let
files_
=
v
[
filesKey
[
ki
]];
try
{
try
{
files
=
[...
files
,
...
JSON
.
parse
(
files_
).
files
]
files
=
[...
files
,
...
JSON
.
parse
(
files_
).
files
];
}
catch
(
e
)
{
}
catch
(
e
)
{}
}
delete
paramsObj
[
filesKey
[
ki
]];
delete
paramsObj
[
filesKey
[
ki
]];
}
}
content
.
push
({
content
.
push
({
...
@@ -719,10 +695,10 @@ export function getListWord({
...
@@ -719,10 +695,10 @@ export function getListWord({
...
listConfig
,
...
listConfig
,
},
},
allValues
:
{
allValues
:
{
...
getObjectsKey
(
allValuesKey
,
paramsObj
)
...
getObjectsKey
(
allValuesKey
,
paramsObj
),
},
},
title
:
(
paramsObj
[
sonTitleKey
]
||
"未设置名称"
)
+
`.
${
sonExt
}
`
,
title
:
(
paramsObj
[
sonTitleKey
]
||
'未设置名称'
)
+
`.
${
sonExt
}
`
,
files
:
JSON
.
stringify
(
files
)
files
:
JSON
.
stringify
(
files
),
});
});
});
});
let
getFileData
=
giveFilePostDataInfoForTrue
(
let
getFileData
=
giveFilePostDataInfoForTrue
(
...
@@ -747,31 +723,25 @@ export function getListWord({
...
@@ -747,31 +723,25 @@ export function getListWord({
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
table
(
err
);
console
.
table
(
err
);
}
}
function
getObjectsKey
(
listKey
=
[],
params
=
{})
{
function
getObjectsKey
(
listKey
=
[],
params
=
{})
{
return
(
return
listKey
.
filter
((
key
)
=>
Object
.
keys
(
params
).
indexOf
(
key
)).
reduce
(
listKey
.
filter
((
key
)
=>
Object
.
keys
(
params
).
indexOf
(
key
))
.
reduce
(
(
acc
,
key
)
=>
({
(
acc
,
key
)
=>
({
...
acc
,
...
acc
,
[
key
]:
params
[
key
]
===
null
?
''
:
params
[
key
],
[
key
]:
params
[
key
]
===
null
?
''
:
params
[
key
],
}),
}),
{},
{},
)
);
)
}
}
}
}
function
setObjectKey
(
data
)
{
function
setObjectKey
(
data
)
{
return
(
return
Object
.
keys
(
data
).
reduce
(
Object
.
keys
(
data
)
.
reduce
(
(
acc
,
key
)
=>
({
(
acc
,
key
)
=>
({
...
acc
,
...
acc
,
[
'${'
+
key
+
'}'
]:
data
[
key
]
===
null
?
''
:
data
[
key
],
[
'${'
+
key
+
'}'
]:
data
[
key
]
===
null
?
''
:
data
[
key
],
}),
}),
{},
{},
)
);
);
}
}
...
@@ -779,17 +749,21 @@ function setObjectKey(data) {
...
@@ -779,17 +749,21 @@ function setObjectKey(data) {
* 修改对象key
* 修改对象key
* 支持对象、数组对象
* 支持对象、数组对象
* @param {*} obj 数组对象或者对象
* @param {*} obj 数组对象或者对象
* @param {*} setKey {
"被修改的key":"修改后的key"
}
* @param {*} setKey {
'被修改的key":"修改后的key'
}
* @returns
* @returns
*/
*/
export
function
upObjKey
(
obj
,
setKey
=
{},
defaultValue
=
""
)
{
export
function
upObjKey
(
obj
,
setKey
=
{},
defaultValue
=
''
)
{
try
{
try
{
obj
=
deepCopy
(
obj
);
obj
=
deepCopy
(
obj
);
setKey
=
deepCopy
(
setKey
);
setKey
=
deepCopy
(
setKey
);
let
objType
=
Object
.
prototype
.
toString
.
call
(
obj
);
let
objType
=
Object
.
prototype
.
toString
.
call
(
obj
);
if
(
obj
&&
(
objType
.
indexOf
(
"Array"
)
>
-
1
||
objType
.
indexOf
(
"Object"
)
>
-
1
)
&&
Object
.
keys
(
setKey
).
length
>
0
)
{
if
(
obj
&&
(
objType
.
indexOf
(
'Array'
)
>
-
1
||
objType
.
indexOf
(
'Object'
)
>
-
1
)
&&
Object
.
keys
(
setKey
).
length
>
0
)
{
let
nowObj
=
null
;
let
nowObj
=
null
;
if
(
objType
===
"[object Object]"
&&
!
Array
.
isArray
(
obj
)
&&
Object
.
keys
(
obj
).
length
>
0
)
{
if
(
objType
===
'[object Object]'
&&
!
Array
.
isArray
(
obj
)
&&
Object
.
keys
(
obj
).
length
>
0
)
{
nowObj
=
deepCopy
(
obj
);
nowObj
=
deepCopy
(
obj
);
for
(
var
e
in
setKey
)
{
for
(
var
e
in
setKey
)
{
let
upKey
=
setKey
[
e
];
let
upKey
=
setKey
[
e
];
...
@@ -797,15 +771,20 @@ export function upObjKey(obj, setKey = {}, defaultValue = "") {
...
@@ -797,15 +771,20 @@ export function upObjKey(obj, setKey = {}, defaultValue = "") {
nowObj
=
{
nowObj
=
{
...
nowObj
,
...
nowObj
,
...
getSetKeyJson
({
...
getSetKeyJson
({
obj
,
e
,
newKey
,
type
,
timeFormat
,
defaultValue
obj
,
})
e
,
newKey
,
type
,
timeFormat
,
defaultValue
,
}),
};
};
if
(
e
!=
newKey
)
{
if
(
e
!=
newKey
)
{
delete
nowObj
[
e
];
delete
nowObj
[
e
];
}
}
}
}
}
}
if
(
objType
===
"[object Array]"
&&
Array
.
isArray
(
obj
)
&&
obj
.
length
>
0
)
{
if
(
objType
===
'[object Array]'
&&
Array
.
isArray
(
obj
)
&&
obj
.
length
>
0
)
{
nowObj
=
new
Array
();
nowObj
=
new
Array
();
obj
.
forEach
((
v
,
i
,
arr
)
=>
{
obj
.
forEach
((
v
,
i
,
arr
)
=>
{
let
newJson
=
deepCopy
(
v
);
let
newJson
=
deepCopy
(
v
);
...
@@ -815,22 +794,27 @@ export function upObjKey(obj, setKey = {}, defaultValue = "") {
...
@@ -815,22 +794,27 @@ export function upObjKey(obj, setKey = {}, defaultValue = "") {
newJson
=
{
newJson
=
{
...
newJson
,
...
newJson
,
...
getSetKeyJson
({
...
getSetKeyJson
({
obj
:
v
,
e
,
newKey
,
type
,
timeFormat
,
defaultValue
obj
:
v
,
})
e
,
newKey
,
type
,
timeFormat
,
defaultValue
,
}),
};
};
if
(
e
!=
newKey
)
{
if
(
e
!=
newKey
)
{
delete
newJson
[
e
];
delete
newJson
[
e
];
}
}
}
}
nowObj
.
push
(
newJson
);
nowObj
.
push
(
newJson
);
})
});
}
}
return
nowObj
;
return
nowObj
;
}
else
{
}
else
{
return
null
;
return
null
;
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
"upObjKey"
,
error
);
console
.
log
(
'upObjKey'
,
error
);
return
undefined
;
return
undefined
;
}
}
}
}
...
@@ -839,36 +823,35 @@ function getSetKeyValue(value) {
...
@@ -839,36 +823,35 @@ function getSetKeyValue(value) {
let
valeuType
=
Object
.
prototype
.
toString
.
call
(
value
);
let
valeuType
=
Object
.
prototype
.
toString
.
call
(
value
);
let
newName
=
null
;
let
newName
=
null
;
let
extendJson
=
{
let
extendJson
=
{
"type"
:
"string"
type
:
'string'
,
};
};
if
(
valeuType
===
"[object String]"
)
{
if
(
valeuType
===
'[object String]'
)
{
newName
=
value
;
newName
=
value
;
}
}
if
(
valeuType
===
"[object Object]"
)
{
if
(
valeuType
===
'[object Object]'
)
{
newName
=
value
[
"new"
];
newName
=
value
[
'new'
];
delete
value
[
"new"
];
delete
value
[
'new'
];
extendJson
=
{
extendJson
=
{
...
extendJson
,
...
extendJson
,
...
value
...
value
,
};
};
}
}
return
{
return
{
newKey
:
newName
,
newKey
:
newName
,
...
extendJson
...
extendJson
,
}
};
}
}
function
getSetKeyJson
({
function
getSetKeyJson
({
obj
,
e
,
newKey
,
type
,
timeFormat
=
'YYYY-MM-DD HH:mm:ss'
,
defaultValue
})
{
obj
,
e
,
newKey
,
type
,
timeFormat
=
"YYYY-MM-DD HH:mm:ss"
,
defaultValue
})
{
obj
=
deepCopy
(
obj
);
obj
=
deepCopy
(
obj
);
let
value
=
obj
[
e
];
let
value
=
obj
[
e
];
let
newKeyObj
=
{};
let
newKeyObj
=
{};
// delete obj[e];
// delete obj[e];
switch
(
type
)
{
switch
(
type
)
{
case
"time"
:
case
'time'
:
debugger
debugger
;
newKeyObj
[
newKey
]
=
(
timeFormat
&&
value
?
moment
(
value
).
format
(
timeFormat
)
:
value
)
||
defaultValue
;
newKeyObj
[
newKey
]
=
(
timeFormat
&&
value
?
moment
(
value
).
format
(
timeFormat
)
:
value
)
||
defaultValue
;
break
;
break
;
default
:
default
:
newKeyObj
[
newKey
]
=
value
||
defaultValue
;
newKeyObj
[
newKey
]
=
value
||
defaultValue
;
...
@@ -876,7 +859,6 @@ function getSetKeyJson({
...
@@ -876,7 +859,6 @@ function getSetKeyJson({
return
newKeyObj
;
return
newKeyObj
;
}
}
// 下载附件FormdataWrapper
// 下载附件FormdataWrapper
function
isObject
(
value
)
{
function
isObject
(
value
)
{
return
value
===
Object
(
value
);
return
value
===
Object
(
value
);
...
@@ -896,13 +878,12 @@ function makeArrayKey(key) {
...
@@ -896,13 +878,12 @@ function makeArrayKey(key) {
function
FormdataWrapper
(
obj
,
fd
,
pre
)
{
function
FormdataWrapper
(
obj
,
fd
,
pre
)
{
fd
=
fd
||
new
FormData
();
fd
=
fd
||
new
FormData
();
Object
.
keys
(
obj
)
Object
.
keys
(
obj
).
forEach
(
function
(
prop
)
{
.
forEach
(
function
(
prop
)
{
var
key
=
pre
?
pre
+
'['
+
prop
+
']'
:
prop
;
var
key
=
pre
?
pre
+
'['
+
prop
+
']'
:
prop
;
if
(
isObject
(
obj
[
prop
])
&&
!
isArray
(
obj
[
prop
])
&&
!
isFile
(
obj
[
prop
]))
{
if
(
isObject
(
obj
[
prop
])
&&
!
isArray
(
obj
[
prop
])
&&
!
isFile
(
obj
[
prop
]))
{
FormdataWrapper
(
obj
[
prop
],
fd
,
key
);
FormdataWrapper
(
obj
[
prop
],
fd
,
key
);
}
else
if
(
isArray
(
obj
[
prop
]))
{
}
else
if
(
isArray
(
obj
[
prop
]))
{
obj
[
prop
].
forEach
(
function
(
value
)
{
obj
[
prop
].
forEach
(
function
(
value
)
{
var
arrayKey
=
makeArrayKey
(
key
);
var
arrayKey
=
makeArrayKey
(
key
);
if
(
isObject
(
value
)
&&
!
isFile
(
value
))
{
if
(
isObject
(
value
)
&&
!
isFile
(
value
))
{
FormdataWrapper
(
value
,
fd
,
arrayKey
);
FormdataWrapper
(
value
,
fd
,
arrayKey
);
...
@@ -960,7 +941,6 @@ export async function downloadFile(url, params, fileName = '导出文件', ext =
...
@@ -960,7 +941,6 @@ export async function downloadFile(url, params, fileName = '导出文件', ext =
});
});
}
}
export
async
function
downloadFileAndShowModal
(
url
,
params
,
fileName
=
'导出文件'
,
ext
=
'xlsx'
)
{
export
async
function
downloadFileAndShowModal
(
url
,
params
,
fileName
=
'导出文件'
,
ext
=
'xlsx'
)
{
// console.log("downloadFile",url);
// console.log("downloadFile",url);
const
{
transformApi
,
headersApi
}
=
await
getTransformApi
(
url
);
const
{
transformApi
,
headersApi
}
=
await
getTransformApi
(
url
);
...
@@ -991,20 +971,26 @@ export async function downloadFileAndShowModal(url, params, fileName = '导出
...
@@ -991,20 +971,26 @@ export async function downloadFileAndShowModal(url, params, fileName = '导出
https://view.officeapps.live.com/op/view.aspx?src=
https://view.officeapps.live.com/op/view.aspx?src=
https%3A%2F%2Fwww.longchang.gov.cn%2Flcs%2Fgsgg%2F202207%2F3ae45ccac65d40d885f40ec385ae287a%2Ffiles%2F%25E9%259A%2586%25E6%2598%258C%25E5%25B8%2582%25E7%25AC%25AC%25E5%2585%25AB%25E4%25B8%25AD%25E5%25AD%25A6%25E5%258E%2595%25E6%2589%2580%25E6%2594%25B9%25E9%2580%25A0%25E9%25A1%25B9%25E7%259B%25AE%25E5%2585%25AC%25E5%2591%258A.doc&wdOrigin=BROWSELINK
https%3A%2F%2Fwww.longchang.gov.cn%2Flcs%2Fgsgg%2F202207%2F3ae45ccac65d40d885f40ec385ae287a%2Ffiles%2F%25E9%259A%2586%25E6%2598%258C%25E5%25B8%2582%25E7%25AC%25AC%25E5%2585%25AB%25E4%25B8%25AD%25E5%25AD%25A6%25E5%258E%2595%25E6%2589%2580%25E6%2594%25B9%25E9%2580%25A0%25E9%25A1%25B9%25E7%259B%25AE%25E5%2585%25AC%25E5%2591%258A.doc&wdOrigin=BROWSELINK
* */
* */
window
.
open
(
url
);
return
;
Modal
.
info
({
Modal
.
info
({
title
:
filename
,
title
:
filename
,
width
:
1000
,
width
:
1000
,
content
:
<
div
>
content
:
(
<
embed
width
=
'100%'
<
div
>
height
=
'568px'
<
embed
name
=
'plugin'
width
=
"100%"
id
=
'pdfView'
height
=
"568px"
name
=
"plugin"
id
=
"pdfView"
src
=
{
url
}
src
=
{
url
}
type
=
'application/pdf'
type
=
"application/pdf"
internalinstanceid
=
"3"
internalinstanceid
=
'3'
title
=
{
filename
}
title
=
{
filename
}
/
>
/
>
<
/div>
,
<
/div
>
),
okText
:
'确定'
,
okText
:
'确定'
,
onCancel
:
()
=>
{
onCancel
:
()
=>
{
window
.
URL
.
revokeObjectURL
(
url
);
window
.
URL
.
revokeObjectURL
(
url
);
...
...
one_stop_public/libs/formList/index.js
浏览文件 @
5fbdea9d
...
@@ -1456,6 +1456,7 @@ class FormList extends React.Component {
...
@@ -1456,6 +1456,7 @@ class FormList extends React.Component {
onSelectRow
=
{
this
.
handleSelectRows
}
onSelectRow
=
{
this
.
handleSelectRows
}
onChange
=
{
this
.
handleStandardTableChange
}
onChange
=
{
this
.
handleStandardTableChange
}
loading
=
{
loading
}
loading
=
{
loading
}
getCheckboxProps
=
{
this
.
props
.
getCheckboxProps
||
undefined
}
/
>
/
>
)}
)}
<
/div
>
<
/div
>
...
...
one_stop_public/tableCompon/FormModal.jsx
浏览文件 @
5fbdea9d
import
React
,
{
}
from
'react'
;
import
React
from
'react'
;
import
{
Button
}
from
'antd'
;
import
{
getModal
}
from
'@/webPublic/one_stop_public/utils/utils'
;
import
{
getModal
}
from
'@/webPublic/one_stop_public/utils/utils'
;
import
styles
from
'./style.less'
const
Modal
=
getModal
();
const
Modal
=
getModal
();
export
default
class
FormModal
extends
React
.
Component
{
export
default
class
FormModal
extends
React
.
Component
{
render
()
{
render
()
{
const
showFullScreen
=
()
=>
{
let
dom
=
document
.
getElementById
(
'smartFormModal'
);
dom
.
requestFullscreen
();
console
.
log
(
dom
);
};
return
(
return
(
<
Modal
<
Modal
bodyStyle=
{
{
bodyStyle=
{
{
...
@@ -19,7 +27,14 @@ export default class FormModal extends React.Component {
...
@@ -19,7 +27,14 @@ export default class FormModal extends React.Component {
visible=
{
this
.
props
.
visible
}
visible=
{
this
.
props
.
visible
}
footer=
{
null
}
footer=
{
null
}
onCancel=
{
this
.
props
.
handleCancel
}
>
onCancel=
{
this
.
props
.
handleCancel
}
>
{
this
.
props
.
showFullScreen
&&
(
<
Button
type=
{
'primary'
}
onClick=
{
showFullScreen
}
>
全屏查看
</
Button
>
)
}
<
div
id=
{
'smartFormModal'
}
className=
{
styles
.
fullScreen
}
>
{
this
.
props
.
children
}
{
this
.
props
.
children
}
</
div
>
</
Modal
>
</
Modal
>
);
);
}
}
...
...
one_stop_public/tableCompon/style.less
浏览文件 @
5fbdea9d
.fullScreen {
&:-webkit-full-screen {
width: 100%;
height: 100%;
padding: 100px;
background-color: #fff;
}
//&:div[data-page-formkey]{
// overflow: hidden;
//}
}
:global {
:global {
// table{
// table{
// border-collapse:collapse;
// border-collapse:collapse;
// }
// }
#web_table .ant-form-item {
#web_table .ant-form-item {
margin-bottom: 2.5px;
margin-bottom: 2.5px;
margin-top: 2.5px;
margin-top: 2.5px;
...
@@ -290,7 +305,8 @@
...
@@ -290,7 +305,8 @@
min-height: 50px;
min-height: 50px;
}
}
}
}
.bigTitle{
.bigTitle {
text-align: center;
text-align: center;
font-size: 18px;
font-size: 18px;
margin-bottom: 20px;
margin-bottom: 20px;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论