Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
8dbb169b
提交
8dbb169b
authored
3月 14, 2022
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
24999 学生签约审核 拖拽范围和组件顺序优化
上级
b7af1ad5
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
42 行增加
和
12 行删除
+42
-12
index.jsx
one_stop_public/filePreview/index.jsx
+2
-2
PictureSignature.js
one_stop_public/libs/PictureSignature/PictureSignature.js
+0
-0
ShowItem.js
one_stop_public/libs/PictureSignature/ShowItem.js
+12
-3
TreeList.js
one_stop_public/libs/formList/TreeList.js
+3
-3
index.js
one_stop_public/libs/formList/index.js
+3
-2
index.jsx
one_stop_public/location/index.jsx
+5
-1
utils.js
one_stop_public/utils/utils.js
+17
-1
没有找到文件。
one_stop_public/filePreview/index.jsx
浏览文件 @
8dbb169b
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
* web端文件预览功能
* web端文件预览功能
*/
*/
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
Popconfirm
}
from
'antd'
;
import
{
checkIsImage
}
from
'@/webPublic/one_stop_public/libs/UploadCom'
;
import
{
checkIsImage
}
from
'@/webPublic/one_stop_public/libs/UploadCom'
;
import
{
getModal
}
from
'@/webPublic/one_stop_public/utils/utils'
;
import
{
getModal
,
getPopconfirm
}
from
'@/webPublic/one_stop_public/utils/utils'
;
const
FileViewer
=
CLIENT_TYPE
===
'mobile'
?
null
:
require
(
'react-file-viewer'
);
const
FileViewer
=
CLIENT_TYPE
===
'mobile'
?
null
:
require
(
'react-file-viewer'
);
const
Modal
=
getModal
();
const
Modal
=
getModal
();
const
Popconfirm
=
getPopconfirm
();
export
default
class
index
extends
Component
{
export
default
class
index
extends
Component
{
...
...
one_stop_public/libs/PictureSignature/PictureSignature.js
浏览文件 @
8dbb169b
差异被折叠。
点击展开。
one_stop_public/libs/PictureSignature/ShowItem.js
浏览文件 @
8dbb169b
...
@@ -6,6 +6,8 @@ const oneSetItemP = {
...
@@ -6,6 +6,8 @@ const oneSetItemP = {
marginBottom
:
0
,
marginBottom
:
0
,
userSelect
:
'none'
,
userSelect
:
'none'
,
};
};
let
startX
=
0
;
let
startY
=
0
;
const
ShowItem
=
({
basicUrl
,
type
,
x
,
y
,
...
otherInfo
})
=>
{
const
ShowItem
=
({
basicUrl
,
type
,
x
,
y
,
...
otherInfo
})
=>
{
switch
(
type
)
{
switch
(
type
)
{
...
@@ -50,13 +52,17 @@ const ShowItem = ({ basicUrl, type, x, y, ...otherInfo }) => {
...
@@ -50,13 +52,17 @@ const ShowItem = ({ basicUrl, type, x, y, ...otherInfo }) => {
export
const
dragEventList
=
(
setOtherProps
,
otherProps
)
=>
{
export
const
dragEventList
=
(
setOtherProps
,
otherProps
)
=>
{
let
draggedRef
=
null
;
let
draggedRef
=
null
;
let
documentThis
=
window
?.
parent
?.
iframeParentComponent
?.
Modal
?
window
?.
parent
?.
document
:
document
;
let
documentThis
=
window
?.
parent
?.
iframeParentComponent
?.
Modal
?
window
?.
parent
?.
document
:
document
;
documentThis
.
onmousedown
=
function
(
evt
){
startX
=
evt
.
offsetX
;
startY
=
evt
.
offsetY
;
}
documentThis
.
addEventListener
(
documentThis
.
addEventListener
(
'dragstart'
,
'dragstart'
,
function
(
event
)
{
function
(
event
)
{
// 保存拖动元素的引用(ref.)
// 保存拖动元素的引用(ref.)
draggedRef
=
event
.
target
;
draggedRef
=
event
.
target
;
event
.
target
.
style
.
opacity
=
0.
5
;
event
.
target
.
style
.
opacity
=
0.
2
;
},
},
false
,
false
,
);
);
...
@@ -85,8 +91,11 @@ export const dragEventList = (setOtherProps, otherProps) => {
...
@@ -85,8 +91,11 @@ export const dragEventList = (setOtherProps, otherProps) => {
event
.
preventDefault
();
event
.
preventDefault
();
// 将拖动的元素到所选择的放置目标节点中
// 将拖动的元素到所选择的放置目标节点中
let
infoClientRect
=
documentThis
.
getElementById
(
'dropZone'
).
getBoundingClientRect
();
let
infoClientRect
=
documentThis
.
getElementById
(
'dropZone'
).
getBoundingClientRect
();
let
leftNew
=
Math
.
ceil
(
event
.
clientX
-
infoClientRect
.
left
);
// console.log(startX, typeof startX, startY);
let
topNew
=
Math
.
ceil
(
event
.
clientY
-
infoClientRect
.
top
);
// return ;
let
leftNew
=
Math
.
ceil
(
event
.
clientX
-
infoClientRect
.
left
)
-
startX
;
let
topNew
=
Math
.
ceil
(
event
.
clientY
-
infoClientRect
.
top
)
-
startY
;
// console.log(leftNew, topNew);
if
(
leftNew
<
0
||
leftNew
>
infoClientRect
.
width
||
topNew
<
0
||
topNew
>
infoClientRect
.
height
){
if
(
leftNew
<
0
||
leftNew
>
infoClientRect
.
width
||
topNew
<
0
||
topNew
>
infoClientRect
.
height
){
console
.
log
(
'拖拽到了图片区域外部,不能进行拖拽'
);
console
.
log
(
'拖拽到了图片区域外部,不能进行拖拽'
);
return
false
;
return
false
;
...
...
one_stop_public/libs/formList/TreeList.js
浏览文件 @
8dbb169b
...
@@ -4,17 +4,14 @@ import {
...
@@ -4,17 +4,14 @@ import {
Card
,
Card
,
DatePicker
,
DatePicker
,
Divider
,
Divider
,
Table
,
Form
,
Form
,
Row
,
Row
,
Col
,
Col
,
Input
,
Input
,
InputNumber
,
InputNumber
,
message
,
message
,
Modal
,
Select
,
Select
,
Tree
,
Tree
,
Popconfirm
,
Tooltip
,
Tooltip
,
Spin
,
Spin
,
}
from
'antd'
;
}
from
'antd'
;
...
@@ -35,7 +32,10 @@ import { isEmpty } from 'lodash';
...
@@ -35,7 +32,10 @@ import { isEmpty } from 'lodash';
import
FilePreview
from
'@/webPublic/one_stop_public/filePreview'
;
import
FilePreview
from
'@/webPublic/one_stop_public/filePreview'
;
import
{
queryApiActionPath
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
import
{
queryApiActionPath
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
import
UploadCom
from
'@/webPublic/one_stop_public/libs/UploadCom'
;
import
UploadCom
from
'@/webPublic/one_stop_public/libs/UploadCom'
;
import
{
getModal
,
getPopconfirm
}
from
'@/webPublic/one_stop_public/utils/utils'
;
const
Popconfirm
=
getPopconfirm
();
const
Modal
=
getModal
();
const
FormItem
=
Form
.
Item
;
const
FormItem
=
Form
.
Item
;
let
AllWidth
=
0
;
// 表格总长度
let
AllWidth
=
0
;
// 表格总长度
const
{
RangePicker
}
=
DatePicker
;
const
{
RangePicker
}
=
DatePicker
;
...
...
one_stop_public/libs/formList/index.js
浏览文件 @
8dbb169b
...
@@ -9,9 +9,7 @@ import {
...
@@ -9,9 +9,7 @@ import {
Col
,
Col
,
Input
,
Input
,
message
,
message
,
Modal
,
Select
,
Select
,
Popconfirm
,
Tooltip
,
Tooltip
,
Spin
,
Spin
,
Popover
,
Popover
,
...
@@ -37,8 +35,11 @@ import { queryApiActionPath } from '@/webPublic/one_stop_public/utils/queryConfi
...
@@ -37,8 +35,11 @@ import { queryApiActionPath } from '@/webPublic/one_stop_public/utils/queryConfi
import
UploadCom
from
'@/webPublic/one_stop_public/libs/UploadCom'
;
import
UploadCom
from
'@/webPublic/one_stop_public/libs/UploadCom'
;
import
ButtonDiy
from
'../../App/ButtonDiy/ButtonDiy'
;
import
ButtonDiy
from
'../../App/ButtonDiy/ButtonDiy'
;
import
{
cloneDeep
}
from
'../../copy/index'
;
import
{
cloneDeep
}
from
'../../copy/index'
;
import
{
getPopconfirm
,
getModal
}
from
'@/webPublic/one_stop_public/utils/utils'
;
const
FormItem
=
Form
.
Item
;
const
FormItem
=
Form
.
Item
;
const
Popconfirm
=
getPopconfirm
();
const
Modal
=
getModal
();
let
AllWidth
=
0
;
// 表格总长度
let
AllWidth
=
0
;
// 表格总长度
const
{
RangePicker
}
=
DatePicker
;
const
{
RangePicker
}
=
DatePicker
;
...
...
one_stop_public/location/index.jsx
浏览文件 @
8dbb169b
...
@@ -4,10 +4,14 @@
...
@@ -4,10 +4,14 @@
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
styles
from
'./styles.less'
;
import
styles
from
'./styles.less'
;
import
Location
from
'./components'
;
import
Location
from
'./components'
;
import
{
Button
,
Popconfirm
}
from
'antd'
;
import
{
Button
}
from
'antd'
;
import
{
isEmpty
}
from
'lodash'
;
import
{
isEmpty
}
from
'lodash'
;
import
{
openToast
}
from
'./Notification'
;
import
{
openToast
}
from
'./Notification'
;
import
{
successToast
,
failToast
}
from
'./Toast'
;
import
{
successToast
,
failToast
}
from
'./Toast'
;
import
{
getPopconfirm
}
from
'@/webPublic/one_stop_public/utils/utils'
;
const
Popconfirm
=
getPopconfirm
();
export
default
class
location
extends
Component
{
export
default
class
location
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
...
...
one_stop_public/utils/utils.js
浏览文件 @
8dbb169b
/* eslint no-useless-escape:0 import/prefer-default-export:0 */
/* eslint no-useless-escape:0 import/prefer-default-export:0 */
import
{
Modal
}
from
'antd'
;
import
{
Modal
,
Popconfirm
}
from
'antd'
;
const
reg
=
/
(((
^https
?
:
(?:\/\/)?)(?:[
-;:&=
\+\$
,
\w]
+@
)?[
A-Za-z0-9.-
]
+
(?:
:
\d
+
)?
|
(?:
www.|
[
-;:&=
\+\$
,
\w]
+@
)[
A-Za-z0-9.-
]
+
)((?:\/[\+
~%
\/
.
\w
-_
]
*
)?\??(?:[
-
\+
=&;%@.
\w
_
]
*
)
#
?(?:[\w]
*
))?)
$/
;
const
reg
=
/
(((
^https
?
:
(?:\/\/)?)(?:[
-;:&=
\+\$
,
\w]
+@
)?[
A-Za-z0-9.-
]
+
(?:
:
\d
+
)?
|
(?:
www.|
[
-;:&=
\+\$
,
\w]
+@
)[
A-Za-z0-9.-
]
+
)((?:\/[\+
~%
\/
.
\w
-_
]
*
)?\??(?:[
-
\+
=&;%@.
\w
_
]
*
)
#
?(?:[\w]
*
))?)
$/
;
...
@@ -41,3 +41,19 @@ export const getModal = () => {
...
@@ -41,3 +41,19 @@ export const getModal = () => {
return
Modal
;
return
Modal
;
}
}
};
};
export
const
getPopconfirm
=
()
=>
{
if
(
window
?.
parent
?.
iframeParentComponent
?.
Popconfirm
)
{
return
window
?.
parent
?.
iframeParentComponent
?.
Popconfirm
;
}
else
{
return
Popconfirm
;
}
};
export
const
getMessage
=
()
=>
{
if
(
window
?.
parent
?.
iframeParentComponent
?.
Popconfirm
)
{
return
window
?.
parent
?.
iframeParentComponent
?.
message
;
}
else
{
return
message
;
}
};
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论