Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
65f44527
提交
65f44527
authored
3月 30, 2020
作者:
钟是志
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master'
上级
006749d1
cc0d77fc
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
116 行增加
和
66 行删除
+116
-66
index.js
FormInsertDiy/ApplyPage/index.js
+21
-0
index.js
FormInsertDiy/ListWithAddEditTemplate/index.js
+27
-23
Services.js
Services.js
+1
-1
index.jsx
one_stop_public/AffairButton/SumbitButton/index.jsx
+4
-1
按钮使用文档.md
one_stop_public/AffairButton/按钮使用文档.md
+2
-0
index.jsx
one_stop_public/excelInitFuc/index.jsx
+6
-14
index.jsx
one_stop_public/filePreview/index.jsx
+48
-27
index.jsx
one_stop_public/tableCompon/index.jsx
+6
-0
表单设计器相关.md
one_stop_public/表单设计器相关.md
+1
-0
没有找到文件。
FormInsertDiy/ApplyPage/index.js
0 → 100644
浏览文件 @
65f44527
import
React
from
'react'
;
import
Entrance
from
'@/webPublic/one_stop_public/Entrance'
;
import
Shell
from
'@/baseComponent/Shell'
;
import
SubmitButton
from
'@/webPublic/one_stop_public/AffairButton/SumbitButton'
;
export
default
function
ApplyPage
({
id
,
form
})
{
return
(
<
Shell
styleShell
=
{{
marginTop
:
0
}}
>
<
Entrance
id
=
{
id
}
get
=
"web"
form
=
{
form
}
/
>
<
div
style
=
{{
padding
:
16
,
textAlign
:
'center'
}}
>
<
SubmitButton
form
=
{
form
}
appId
=
{
id
}
text
=
"提交"
openDraftButton
DraftButtonText
=
"暂存"
/>
<
/div
>
<
/Shell
>
);
}
FormInsertDiy/ListWithAddEditTemplate/index.js
浏览文件 @
65f44527
...
@@ -18,6 +18,7 @@ import {
...
@@ -18,6 +18,7 @@ import {
addOrEditTableItem
,
addOrEditTableItem
,
deleteTableItem
,
deleteTableItem
,
}
from
'@/webPublic/Services'
;
}
from
'@/webPublic/Services'
;
import
{
ModalConfirm
}
from
'@/baseComponent/Modal'
;
const
getValue
=
obj
=>
const
getValue
=
obj
=>
Object
.
keys
(
obj
)
Object
.
keys
(
obj
)
...
@@ -111,14 +112,7 @@ class ListWithAddEditTemplate extends React.Component {
...
@@ -111,14 +112,7 @@ class ListWithAddEditTemplate extends React.Component {
<
div
>
<
div
>
<
a
onClick
=
{
this
.
modify
.
bind
(
this
,
record
)}
>
编辑
<
/a
>
<
a
onClick
=
{
this
.
modify
.
bind
(
this
,
record
)}
>
编辑
<
/a
>
<
Divider
type
=
"vertical"
/>
<
Divider
type
=
"vertical"
/>
<
Popconfirm
<
a
onClick
=
{
this
.
delete
.
bind
(
this
,
record
)}
>
删除
<
/a
>
title
=
"确定删除该数据?"
onConfirm
=
{
this
.
delete
.
bind
(
this
,
record
)}
okText
=
"确定"
cancelText
=
"取消"
>
<
a
>
删除
<
/a
>
<
/Popconfirm
>
<
/div
>
<
/div
>
<
/Fragment
>
<
/Fragment
>
);
);
...
@@ -161,13 +155,18 @@ class ListWithAddEditTemplate extends React.Component {
...
@@ -161,13 +155,18 @@ class ListWithAddEditTemplate extends React.Component {
};
};
delete
=
record
=>
{
delete
=
record
=>
{
const
{
objId
}
=
this
.
props
;
ModalConfirm
(
'确定删除?'
,
{
// 找出主键
onOk
:
()
=>
{
const
{
primaryKey
}
=
this
.
state
;
const
{
objId
}
=
this
.
props
;
const
Keys
=
{};
// 找出主键
Keys
[
primaryKey
]
=
record
[
primaryKey
];
const
{
primaryKey
}
=
this
.
state
;
deleteTableItem
(
objId
,
primaryKey
,
record
[
primaryKey
]).
then
(
res
=>
{
const
Keys
=
{};
this
.
getPage
();
Keys
[
primaryKey
]
=
record
[
primaryKey
];
deleteTableItem
(
objId
,
primaryKey
,
record
[
primaryKey
]).
then
(
res
=>
{
this
.
getPage
();
});
},
});
});
};
};
...
@@ -253,15 +252,20 @@ class ListWithAddEditTemplate extends React.Component {
...
@@ -253,15 +252,20 @@ class ListWithAddEditTemplate extends React.Component {
};
};
batchDelete
=
e
=>
{
batchDelete
=
e
=>
{
const
{
selectedRows
,
objId
,
primaryKey
}
=
this
.
state
;
const
{
selectedRows
,
primaryKey
}
=
this
.
state
;
const
{
objId
}
=
this
.
props
;
if
(
!
selectedRows
)
return
;
if
(
!
selectedRows
)
return
;
deleteTableItem
(
objId
,
primaryKey
,
selectedRows
.
map
(
row
=>
row
[
primaryKey
])).
then
(
res
=>
{
ModalConfirm
(
'确定删除?'
,
{
this
.
setState
({
onOk
:
()
=>
{
selectedRows
:
[],
deleteTableItem
(
objId
,
primaryKey
,
selectedRows
.
map
(
row
=>
row
[
primaryKey
])).
then
(
res
=>
{
});
this
.
setState
({
this
.
getPage
();
selectedRows
:
[],
});
this
.
getPage
();
});
},
});
});
};
};
...
@@ -328,7 +332,7 @@ class ListWithAddEditTemplate extends React.Component {
...
@@ -328,7 +332,7 @@ class ListWithAddEditTemplate extends React.Component {
config
=
{{
condition
:
searchConfig
,
fromTab
:
true
}}
config
=
{{
condition
:
searchConfig
,
fromTab
:
true
}}
/
>
/
>
)
:
null
}
)
:
null
}
<
Shell
styleShell
=
{{
marginTop
:
searchConfig
&&
searchConfig
.
length
?
16
:
0
}}
>
<
Shell
styleShell
=
{{
marginTop
:
searchConfig
&&
searchConfig
.
length
?
16
:
0
}}
>
<
div
style
=
{{
paddingLeft
:
'10px'
,
marginTop
:
'20px'
}}
>
<
div
style
=
{{
paddingLeft
:
'10px'
,
marginTop
:
'20px'
}}
>
<
ButtonDiy
icon
=
"plus"
className
=
"primaryBlue"
handleClick
=
{
this
.
add
}
name
=
"新建"
/>
<
ButtonDiy
icon
=
"plus"
className
=
"primaryBlue"
handleClick
=
{
this
.
add
}
name
=
"新建"
/>
{
hasImport
&&
<
ImportUtil
objId
=
{
objId
}
/>
}
{
hasImport
&&
<
ImportUtil
objId
=
{
objId
}
/>
}
...
@@ -342,7 +346,7 @@ class ListWithAddEditTemplate extends React.Component {
...
@@ -342,7 +346,7 @@ class ListWithAddEditTemplate extends React.Component {
selectedRows
=
{
selectedRows
}
selectedRows
=
{
selectedRows
}
onSelectRow
=
{
this
.
handleSelectRows
}
onSelectRow
=
{
this
.
handleSelectRows
}
onChange
=
{
this
.
handleStandardTableChange
}
onChange
=
{
this
.
handleStandardTableChange
}
scroll
=
{{
x
:
1200
}}
scroll
=
{{
x
:
1200
}}
/
>
/
>
<
/Shell
>
<
/Shell
>
<
/Fragment
>
<
/Fragment
>
...
...
Services.js
浏览文件 @
65f44527
...
@@ -55,7 +55,7 @@ export const fetchTableHeader = objId =>
...
@@ -55,7 +55,7 @@ export const fetchTableHeader = objId =>
* @param {String} value 主键对应的值,删除多条数据时传数组
* @param {String} value 主键对应的值,删除多条数据时传数组
*/
*/
export
const
deleteTableItem
=
(
objId
,
primaryKey
,
value
)
=>
{
export
const
deleteTableItem
=
(
objId
,
primaryKey
,
value
)
=>
{
const
copyValue
=
Array
.
isArray
[
value
]
?
value
.
join
(
','
)
:
value
;
const
copyValue
=
Array
.
isArray
(
value
)
?
value
.
join
(
','
)
:
value
;
return
uaaRequest
(
'/DataObjApi/deleteFormData'
,
{
return
uaaRequest
(
'/DataObjApi/deleteFormData'
,
{
objId
,
objId
,
keys
:
JSON
.
stringify
({
[
primaryKey
]:
copyValue
}),
keys
:
JSON
.
stringify
({
[
primaryKey
]:
copyValue
}),
...
...
one_stop_public/AffairButton/SumbitButton/index.jsx
浏览文件 @
65f44527
...
@@ -86,7 +86,7 @@ export default class idnex extends Component {
...
@@ -86,7 +86,7 @@ export default class idnex extends Component {
})
})
}
}
handleDraft
=
()
=>
{
handleDraft
=
()
=>
{
let
{
dispatch
,
id
,
radioValue
}
=
this
.
props
;
let
{
dispatch
,
id
,
radioValue
,
draftCallback
}
=
this
.
props
;
this
.
setState
({
this
.
setState
({
isLoading
:
true
isLoading
:
true
},()
=>
{
},()
=>
{
...
@@ -105,6 +105,9 @@ export default class idnex extends Component {
...
@@ -105,6 +105,9 @@ export default class idnex extends Component {
this
.
setState
({
// 存在草稿后保存草稿Id 后续修改在这草稿Id上处理
this
.
setState
({
// 存在草稿后保存草稿Id 后续修改在这草稿Id上处理
draftId
:
val
.
id
draftId
:
val
.
id
})
})
if
(
this
.
props
?.
draftCallback
){
this
.
props
.
draftCallback
(
val
)
}
openToast
(
'success'
,
'保存成功'
,
'草稿保存成功'
);
openToast
(
'success'
,
'保存成功'
,
'草稿保存成功'
);
}
else
{
}
else
{
openToast
(
'error'
,
'保存失败'
,
'请尝试'
);
openToast
(
'error'
,
'保存失败'
,
'请尝试'
);
...
...
one_stop_public/AffairButton/按钮使用文档.md
浏览文件 @
65f44527
...
@@ -16,6 +16,8 @@ import SumbitButton from '@/webPublic/one_stop_public/AffairButton/SumbitButton'
...
@@ -16,6 +16,8 @@ import SumbitButton from '@/webPublic/one_stop_public/AffairButton/SumbitButton'
draftId
=
{
'草稿Id'
}
// 可不传 不传为发起全新 传后修改草稿
draftId
=
{
'草稿Id'
}
// 可不传 不传为发起全新 传后修改草稿
openDraftButton
=
{
true
}
// 开启保存草稿按钮
openDraftButton
=
{
true
}
// 开启保存草稿按钮
DraftButtonText
=
'草稿按钮文本'
// 草稿按钮内置文本
DraftButtonText
=
'草稿按钮文本'
// 草稿按钮内置文本
callback
=
'提交按钮回调函数'
// 提交按钮回调函数
draftCallback
=
{
'草稿按钮回调函数'
}
// 草稿按钮回调函数
/
>
/
>
```
```
...
...
one_stop_public/excelInitFuc/index.jsx
浏览文件 @
65f44527
...
@@ -131,20 +131,12 @@ export default class index extends Component {
...
@@ -131,20 +131,12 @@ export default class index extends Component {
*/
*/
getListData
=
(
List
)
=>
{
getListData
=
(
List
)
=>
{
const
{
checkedFuc
}
=
this
.
state
const
{
checkedFuc
}
=
this
.
state
switch
(
List
.
length
)
{
let
ary
=
[]
case
1
:
List
.
map
(
item
=>
{
return
checkedFuc
(
List
[
0
].
value
)
ary
.
push
(
item
.
value
)
case
2
:
return
item
return
checkedFuc
(
List
[
0
].
value
,
List
[
1
].
value
)
})
case
3
:
return
checkedFuc
(...
ary
)
return
checkedFuc
(
List
[
0
].
value
,
List
[
1
].
value
,
List
[
2
].
value
)
case
4
:
return
checkedFuc
(
List
[
0
].
value
,
List
[
1
].
value
,
List
[
2
].
value
,
List
[
3
].
value
)
case
5
:
return
checkedFuc
(
List
[
0
].
value
,
List
[
1
].
value
,
List
[
2
].
value
,
List
[
3
].
value
,
List
[
4
].
value
)
case
6
:
return
checkedFuc
(
List
[
0
].
value
,
List
[
1
].
value
,
List
[
2
].
value
,
List
[
3
].
value
,
List
[
4
].
value
,
List
[
5
].
value
)
}
}
}
componentWillReceiveProps
(
nextProps
){
componentWillReceiveProps
(
nextProps
){
const
{
isPicth
}
=
nextProps
const
{
isPicth
}
=
nextProps
...
...
one_stop_public/filePreview/index.jsx
浏览文件 @
65f44527
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* web端文件预览功能
* web端文件预览功能
*/
*/
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
Modal
,
Icon
,
Tooltip
}
from
'antd'
;
import
{
Modal
,
Icon
,
Tooltip
,
Popconfirm
}
from
'antd'
;
// import FileViewer from 'react-file-viewer';
// import FileViewer from 'react-file-viewer';
export
default
class
index
extends
Component
{
export
default
class
index
extends
Component
{
constructor
(
props
){
constructor
(
props
){
...
@@ -28,6 +28,13 @@ export default class index extends Component {
...
@@ -28,6 +28,13 @@ export default class index extends Component {
visible
:
false
,
visible
:
false
,
});
});
};
};
download
=
()
=>
{
let
{
path
,
pathName
}
=
this
.
props
window
.
open
(
path
,
'_blank'
)
}
render
()
{
render
()
{
let
{
let
{
path
,
path
,
...
@@ -38,18 +45,18 @@ export default class index extends Component {
...
@@ -38,18 +45,18 @@ export default class index extends Component {
}
=
this
.
state
}
=
this
.
state
let
isShow
=
pathName
?.
indexOf
(
'.pdf'
)
!==
-
1
let
isShow
=
pathName
?.
indexOf
(
'.pdf'
)
!==
-
1
// || pathName?.indexOf('.doc') !== -1
// || pathName?.indexOf('.doc') !== -1
||
pathName
?.
indexOf
(
'.xls'
)
!==
-
1
||
pathName
?.
indexOf
(
'.mp3'
)
!==
-
1
||
pathName
?.
indexOf
(
'.mp3'
)
!==
-
1
||
pathName
?.
indexOf
(
'.mp4'
)
!==
-
1
||
pathName
?.
indexOf
(
'.mp4'
)
!==
-
1
||
pathName
?.
indexOf
(
'.csv'
)
!==
-
1
||
pathName
?.
indexOf
(
'.csv'
)
!==
-
1
||
pathName
?.
indexOf
(
'.png'
)
!==
-
1
||
pathName
?.
indexOf
(
'.jpeg'
)
!==
-
1
||
pathName
?.
indexOf
(
'.gif'
)
!==
-
1
||
pathName
?.
indexOf
(
'.bmp'
)
!==
-
1
let
type
;
let
type
;
if
(
pathName
?.
indexOf
(
'.pdf'
)
!==
-
1
){
if
(
pathName
?.
indexOf
(
'.pdf'
)
!==
-
1
){
isShow
=
true
isShow
=
true
type
=
'pdf'
type
=
'pdf'
}
else
if
(
pathName
?.
indexOf
(
'.xlsx'
)
!==
-
1
){
}
else
if
(
pathName
?.
indexOf
(
'.mp3'
)
!==
-
1
){
isShow
=
true
type
=
'xlsx'
}
else
if
(
pathName
?.
indexOf
(
'.mp3'
)
!==
-
1
){
isShow
=
true
isShow
=
true
type
=
'mp3'
type
=
'mp3'
}
else
if
(
pathName
?.
indexOf
(
'.mp4'
)
!==
-
1
){
}
else
if
(
pathName
?.
indexOf
(
'.mp4'
)
!==
-
1
){
...
@@ -58,38 +65,52 @@ export default class index extends Component {
...
@@ -58,38 +65,52 @@ export default class index extends Component {
}
else
if
(
pathName
?.
indexOf
(
'.csv'
)
!==
-
1
){
}
else
if
(
pathName
?.
indexOf
(
'.csv'
)
!==
-
1
){
isShow
=
true
isShow
=
true
type
=
'csv'
type
=
'csv'
}
else
if
(
pathName
?.
indexOf
(
'.png'
)
!==
-
1
){
isShow
=
true
type
=
'png'
}
else
if
(
pathName
?.
indexOf
(
'.gif'
)
!==
-
1
){
isShow
=
true
type
=
'gif'
}
else
if
(
pathName
?.
indexOf
(
'.bmp'
)
!==
-
1
){
isShow
=
true
type
=
'bmp'
}
else
{
}
else
{
isShow
=
false
isShow
=
false
}
}
return
(
return
(
<
span
>
<>
<
a
{
target=
"_blank"
isShow
?
href=
{
path
}
>
<
Popconfirm
{
pathName
}
title=
"该附件支持预览,是否预览?"
</
a
>
onConfirm=
{
this
.
download
}
{
onCancel=
{
this
.
showModal
}
isShow
?
okText=
"下载"
<
Tooltip
cancelText=
"预览"
title=
{
`预览${pathName}`
}
>
>
<
a
<
Icon
target=
"_blank"
onClick=
{
this
.
showModal
}
href=
{
path
}
>
style=
{
{
marginLeft
:
'12px'
}
}
{
pathName
}
type=
"security-scan"
/>
</
a
>
</
Tooltip
>
</
Popconfirm
>
:
null
:
<
a
}
target=
"_blank"
href=
{
path
}
>
{
pathName
}
</
a
>
}
<
Modal
<
Modal
title=
{
pathName
}
title=
{
pathName
}
visible=
{
visible
}
visible=
{
visible
}
width=
{
1200
}
width=
{
1200
}
destroyOnClose
onOk=
{
this
.
handleOk
}
onOk=
{
this
.
handleOk
}
onCancel=
{
this
.
handleCancel
}
onCancel=
{
this
.
handleCancel
}
>
>
{
{
type
===
'pdf'
||
type
===
'ppt'
?
type
===
'pdf'
?
<
iframe
<
iframe
style=
{
{
style=
{
{
width
:
'100%'
,
width
:
'100%'
,
...
@@ -113,7 +134,7 @@ export default class index extends Component {
...
@@ -113,7 +134,7 @@ export default class index extends Component {
}
}
</
Modal
>
</
Modal
>
</
span
>
</>
)
)
}
}
}
}
one_stop_public/tableCompon/index.jsx
浏览文件 @
65f44527
...
@@ -1766,6 +1766,12 @@ export default class tableCom extends Component {
...
@@ -1766,6 +1766,12 @@ export default class tableCom extends Component {
if
(
f
.
filePath
.
indexOf
(
'.png'
)
!=
-
1
||
f
.
filePath
.
indexOf
(
'.jpg'
)
!=
-
1
)
{
if
(
f
.
filePath
.
indexOf
(
'.png'
)
!=
-
1
||
f
.
filePath
.
indexOf
(
'.jpg'
)
!=
-
1
)
{
return
<
img
key=
{
index2
}
style=
{
{
width
:
100
,
height
:
100
}
}
src=
{
queryApiActionPath
()
+
f
.
filePath
}
/>
return
<
img
key=
{
index2
}
style=
{
{
width
:
100
,
height
:
100
}
}
src=
{
queryApiActionPath
()
+
f
.
filePath
}
/>
}
}
// if(get === 'web')
{
// return <li key=
{
index2
}
>
<
FilePreview
// path=
{
queryApiActionPath
()
+
f
.
path
}
// pathName=
{
f
.
name
}
// /></li>
//
}
return
<
li
key=
{
index2
}
><
a
target=
"_blank"
key=
{
f
.
filePath
}
href=
{
queryApiActionPath
()
+
f
.
filePath
}
>
return
<
li
key=
{
index2
}
><
a
target=
"_blank"
key=
{
f
.
filePath
}
href=
{
queryApiActionPath
()
+
f
.
filePath
}
>
{
f
.
fileName
}
{
f
.
fileName
}
</
a
></
li
>
</
a
></
li
>
...
...
one_stop_public/表单设计器相关.md
浏览文件 @
65f44527
...
@@ -20,6 +20,7 @@ react-native-uuid
...
@@ -20,6 +20,7 @@ react-native-uuid
path
-
to
-
regexp
path
-
to
-
regexp
prop
-
types
prop
-
types
react
-
signature
-
canvas
react
-
signature
-
canvas
react
-
file
-
viewer
```
```
##抽离注意
##抽离注意
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论