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 个修改的文件
包含
96 行增加
和
46 行删除
+96
-46
index.js
FormInsertDiy/ApplyPage/index.js
+21
-0
index.js
FormInsertDiy/ListWithAddEditTemplate/index.js
+15
-11
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
+40
-19
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 {
addOrEditTableItem
,
deleteTableItem
,
}
from
'@/webPublic/Services'
;
import
{
ModalConfirm
}
from
'@/baseComponent/Modal'
;
const
getValue
=
obj
=>
Object
.
keys
(
obj
)
...
...
@@ -111,14 +112,7 @@ class ListWithAddEditTemplate extends React.Component {
<
div
>
<
a
onClick
=
{
this
.
modify
.
bind
(
this
,
record
)}
>
编辑
<
/a
>
<
Divider
type
=
"vertical"
/>
<
Popconfirm
title
=
"确定删除该数据?"
onConfirm
=
{
this
.
delete
.
bind
(
this
,
record
)}
okText
=
"确定"
cancelText
=
"取消"
>
<
a
>
删除
<
/a
>
<
/Popconfirm
>
<
a
onClick
=
{
this
.
delete
.
bind
(
this
,
record
)}
>
删除
<
/a
>
<
/div
>
<
/Fragment
>
);
...
...
@@ -161,14 +155,19 @@ class ListWithAddEditTemplate extends React.Component {
};
delete
=
record
=>
{
ModalConfirm
(
'确定删除?'
,
{
onOk
:
()
=>
{
const
{
objId
}
=
this
.
props
;
// 找出主键
const
{
primaryKey
}
=
this
.
state
;
const
Keys
=
{};
Keys
[
primaryKey
]
=
record
[
primaryKey
];
deleteTableItem
(
objId
,
primaryKey
,
record
[
primaryKey
]).
then
(
res
=>
{
this
.
getPage
();
});
},
});
};
changeFormData
=
(
value
,
key
)
=>
{
...
...
@@ -253,16 +252,21 @@ class ListWithAddEditTemplate extends React.Component {
};
batchDelete
=
e
=>
{
const
{
selectedRows
,
objId
,
primaryKey
}
=
this
.
state
;
const
{
selectedRows
,
primaryKey
}
=
this
.
state
;
const
{
objId
}
=
this
.
props
;
if
(
!
selectedRows
)
return
;
ModalConfirm
(
'确定删除?'
,
{
onOk
:
()
=>
{
deleteTableItem
(
objId
,
primaryKey
,
selectedRows
.
map
(
row
=>
row
[
primaryKey
])).
then
(
res
=>
{
this
.
setState
({
selectedRows
:
[],
});
this
.
getPage
();
});
},
});
};
goBack
=
()
=>
{
...
...
@@ -328,7 +332,7 @@ class ListWithAddEditTemplate extends React.Component {
config
=
{{
condition
:
searchConfig
,
fromTab
:
true
}}
/
>
)
:
null
}
<
Shell
styleShell
=
{{
marginTop
:
searchConfig
&&
searchConfig
.
length
?
16
:
0
}}
>
<
Shell
styleShell
=
{{
marginTop
:
searchConfig
&&
searchConfig
.
length
?
16
:
0
}}
>
<
div
style
=
{{
paddingLeft
:
'10px'
,
marginTop
:
'20px'
}}
>
<
ButtonDiy
icon
=
"plus"
className
=
"primaryBlue"
handleClick
=
{
this
.
add
}
name
=
"新建"
/>
{
hasImport
&&
<
ImportUtil
objId
=
{
objId
}
/>
}
...
...
@@ -342,7 +346,7 @@ class ListWithAddEditTemplate extends React.Component {
selectedRows
=
{
selectedRows
}
onSelectRow
=
{
this
.
handleSelectRows
}
onChange
=
{
this
.
handleStandardTableChange
}
scroll
=
{{
x
:
1200
}}
scroll
=
{{
x
:
1200
}}
/
>
<
/Shell
>
<
/Fragment
>
...
...
Services.js
浏览文件 @
65f44527
...
...
@@ -55,7 +55,7 @@ export const fetchTableHeader = objId =>
* @param {String} 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'
,
{
objId
,
keys
:
JSON
.
stringify
({
[
primaryKey
]:
copyValue
}),
...
...
one_stop_public/AffairButton/SumbitButton/index.jsx
浏览文件 @
65f44527
...
...
@@ -86,7 +86,7 @@ export default class idnex extends Component {
})
}
handleDraft
=
()
=>
{
let
{
dispatch
,
id
,
radioValue
}
=
this
.
props
;
let
{
dispatch
,
id
,
radioValue
,
draftCallback
}
=
this
.
props
;
this
.
setState
({
isLoading
:
true
},()
=>
{
...
...
@@ -105,6 +105,9 @@ export default class idnex extends Component {
this
.
setState
({
// 存在草稿后保存草稿Id 后续修改在这草稿Id上处理
draftId
:
val
.
id
})
if
(
this
.
props
?.
draftCallback
){
this
.
props
.
draftCallback
(
val
)
}
openToast
(
'success'
,
'保存成功'
,
'草稿保存成功'
);
}
else
{
openToast
(
'error'
,
'保存失败'
,
'请尝试'
);
...
...
one_stop_public/AffairButton/按钮使用文档.md
浏览文件 @
65f44527
...
...
@@ -16,6 +16,8 @@ import SumbitButton from '@/webPublic/one_stop_public/AffairButton/SumbitButton'
draftId
=
{
'草稿Id'
}
// 可不传 不传为发起全新 传后修改草稿
openDraftButton
=
{
true
}
// 开启保存草稿按钮
DraftButtonText
=
'草稿按钮文本'
// 草稿按钮内置文本
callback
=
'提交按钮回调函数'
// 提交按钮回调函数
draftCallback
=
{
'草稿按钮回调函数'
}
// 草稿按钮回调函数
/
>
```
...
...
one_stop_public/excelInitFuc/index.jsx
浏览文件 @
65f44527
...
...
@@ -131,20 +131,12 @@ export default class index extends Component {
*/
getListData
=
(
List
)
=>
{
const
{
checkedFuc
}
=
this
.
state
switch
(
List
.
length
)
{
case
1
:
return
checkedFuc
(
List
[
0
].
value
)
case
2
:
return
checkedFuc
(
List
[
0
].
value
,
List
[
1
].
value
)
case
3
:
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
)
}
let
ary
=
[]
List
.
map
(
item
=>
{
ary
.
push
(
item
.
value
)
return
item
})
return
checkedFuc
(...
ary
)
}
componentWillReceiveProps
(
nextProps
){
const
{
isPicth
}
=
nextProps
...
...
one_stop_public/filePreview/index.jsx
浏览文件 @
65f44527
...
...
@@ -2,7 +2,7 @@
* web端文件预览功能
*/
import
React
,
{
Component
}
from
'react'
;
import
{
Modal
,
Icon
,
Tooltip
}
from
'antd'
;
import
{
Modal
,
Icon
,
Tooltip
,
Popconfirm
}
from
'antd'
;
// import FileViewer from 'react-file-viewer';
export
default
class
index
extends
Component
{
constructor
(
props
){
...
...
@@ -28,6 +28,13 @@ export default class index extends Component {
visible
:
false
,
});
};
download
=
()
=>
{
let
{
path
,
pathName
}
=
this
.
props
window
.
open
(
path
,
'_blank'
)
}
render
()
{
let
{
path
,
...
...
@@ -38,17 +45,17 @@ export default class index extends Component {
}
=
this
.
state
let
isShow
=
pathName
?.
indexOf
(
'.pdf'
)
!==
-
1
// || pathName?.indexOf('.doc') !== -1
||
pathName
?.
indexOf
(
'.xls'
)
!==
-
1
||
pathName
?.
indexOf
(
'.mp3'
)
!==
-
1
||
pathName
?.
indexOf
(
'.mp4'
)
!==
-
1
||
pathName
?.
indexOf
(
'.csv'
)
!==
-
1
||
pathName
?.
indexOf
(
'.png'
)
!==
-
1
||
pathName
?.
indexOf
(
'.jpeg'
)
!==
-
1
||
pathName
?.
indexOf
(
'.gif'
)
!==
-
1
||
pathName
?.
indexOf
(
'.bmp'
)
!==
-
1
let
type
;
if
(
pathName
?.
indexOf
(
'.pdf'
)
!==
-
1
){
isShow
=
true
type
=
'pdf'
}
else
if
(
pathName
?.
indexOf
(
'.xlsx'
)
!==
-
1
){
isShow
=
true
type
=
'xlsx'
}
else
if
(
pathName
?.
indexOf
(
'.mp3'
)
!==
-
1
){
isShow
=
true
type
=
'mp3'
...
...
@@ -58,38 +65,52 @@ export default class index extends Component {
}
else
if
(
pathName
?.
indexOf
(
'.csv'
)
!==
-
1
){
isShow
=
true
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
{
isShow
=
false
}
return
(
<
span
>
<>
{
isShow
?
<
Popconfirm
title=
"该附件支持预览,是否预览?"
onConfirm=
{
this
.
download
}
onCancel=
{
this
.
showModal
}
okText=
"下载"
cancelText=
"预览"
>
<
a
target=
"_blank"
href=
{
path
}
>
{
pathName
}
</
a
>
{
isShow
?
<
Tooltip
title=
{
`预览${pathName}`
}
>
<
Icon
onClick=
{
this
.
showModal
}
style=
{
{
marginLeft
:
'12px'
}
}
type=
"security-scan"
/>
</
Tooltip
>
:
null
</
Popconfirm
>
:
<
a
target=
"_blank"
href=
{
path
}
>
{
pathName
}
</
a
>
}
<
Modal
title=
{
pathName
}
visible=
{
visible
}
width=
{
1200
}
destroyOnClose
onOk=
{
this
.
handleOk
}
onCancel=
{
this
.
handleCancel
}
>
{
type
===
'pdf'
||
type
===
'ppt'
?
type
===
'pdf'
?
<
iframe
style=
{
{
width
:
'100%'
,
...
...
@@ -113,7 +134,7 @@ export default class index extends Component {
}
</
Modal
>
</
span
>
</>
)
}
}
one_stop_public/tableCompon/index.jsx
浏览文件 @
65f44527
...
...
@@ -1766,6 +1766,12 @@ export default class tableCom extends Component {
if
(
f
.
filePath
.
indexOf
(
'.png'
)
!=
-
1
||
f
.
filePath
.
indexOf
(
'.jpg'
)
!=
-
1
)
{
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
}
>
{
f
.
fileName
}
</
a
></
li
>
...
...
one_stop_public/表单设计器相关.md
浏览文件 @
65f44527
...
...
@@ -20,6 +20,7 @@ react-native-uuid
path
-
to
-
regexp
prop
-
types
react
-
signature
-
canvas
react
-
file
-
viewer
```
##抽离注意
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论