Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivManage
Commits
580736c7
Commit
580736c7
authored
Jul 30, 2021
by
shaoan123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改消息平台中定时计划提示语
parent
6f12fe9e
Pipeline
#32363
skipped with stages
Changes
8
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
127 additions
and
77 deletions
+127
-77
.env
.env
+1
-1
index.jsx
src/components/MapScope/index.jsx
+1
-0
InitDataBase.jsx
src/pages/database/InitDataBase.jsx
+31
-8
DayOfWeekSelect.jsx
...ojectManage/components/IISAgentConfig/DayOfWeekSelect.jsx
+26
-18
HourOfDaySelect.jsx
...ojectManage/components/IISAgentConfig/HourOfDaySelect.jsx
+27
-21
HourOfDaySelect.less
...jectManage/components/IISAgentConfig/HourOfDaySelect.less
+0
-4
VisibleIISAgentConfig.jsx
...anage/components/IISAgentConfig/VisibleIISAgentConfig.jsx
+35
-24
VisibleIISAgentConfig.less
...nage/components/IISAgentConfig/VisibleIISAgentConfig.less
+6
-1
No files found.
.env
View file @
580736c7
# PUBLIC_PATH = reactOMS, 默认转发 /cityinterface
# PUBLIC_PATH = reactOMS, 默认转发 /cityinterface
PROXY=/Cityinterface:http://192.168.1
9.105:8049;/PandaOMS:http://192.168.19.105:8049;/Web4:http://192.168.19.105:8049;/CityTemp:http://192.168.19.105:8049
PROXY=/Cityinterface:http://192.168.1
2.121:8082;/PandaOMS:http://192.168.12.121:8082;/Web4:http://192.168.12.121:8082;/CityTemp:http://192.168.12.121:8082
# 可设置第二个代理,test为转发前缀,后面为代理转发的地址
# 可设置第二个代理,test为转发前缀,后面为代理转发的地址
# PROXY2 = test : http://localhost:8006/
# PROXY2 = test : http://localhost:8006/
...
...
src/components/MapScope/index.jsx
View file @
580736c7
...
@@ -45,6 +45,7 @@ const MapScope = props => {
...
@@ -45,6 +45,7 @@ const MapScope = props => {
'VERSION'
:
'1.1.1'
,
'VERSION'
:
'1.1.1'
,
'_site'
:
''
'_site'
:
''
};
};
console
.
log
(
'params'
,
params
);
const
wmsOption
=
{
const
wmsOption
=
{
tileSize
:
512
,
tileSize
:
512
,
url
:
`
${
location
.
origin
}
/Cityinterface/rest/services/MapServer.svc/
${
pipenetCofig
.
servicename
}
/GeoServerProxy/wms`
,
url
:
`
${
location
.
origin
}
/Cityinterface/rest/services/MapServer.svc/
${
pipenetCofig
.
servicename
}
/GeoServerProxy/wms`
,
...
...
src/pages/database/InitDataBase.jsx
View file @
580736c7
...
@@ -46,6 +46,7 @@ const formLables = {
...
@@ -46,6 +46,7 @@ const formLables = {
password
:
'数据库用户密码'
,
password
:
'数据库用户密码'
,
dbName
:
'数据库名称'
,
dbName
:
'数据库名称'
,
};
};
let
time
=
null
const
InitDataBase
=
props
=>
{
const
InitDataBase
=
props
=>
{
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
[
tableLoading
,
setTableLoading
]
=
useState
(
false
);
// 连接记录
const
[
tableLoading
,
setTableLoading
]
=
useState
(
false
);
// 连接记录
...
@@ -67,6 +68,7 @@ const InitDataBase = props => {
...
@@ -67,6 +68,7 @@ const InitDataBase = props => {
const
[
initContent
,
setInitContent
]
=
useState
(
''
);
// 数据库初始化内容
const
[
initContent
,
setInitContent
]
=
useState
(
''
);
// 数据库初始化内容
const
[
cardLoading
,
setCardLoading
]
=
useState
(
false
);
// 初始化card Loading
const
[
cardLoading
,
setCardLoading
]
=
useState
(
false
);
// 初始化card Loading
const
[
finish
,
setFinish
]
=
useState
(
false
);
const
[
finish
,
setFinish
]
=
useState
(
false
);
const
[
initLoading
,
setInitLoading
]
=
useState
(
false
);
const
scroll
=
useRef
(
null
);
const
scroll
=
useRef
(
null
);
// 获取数据库链接记录
// 获取数据库链接记录
useEffect
(()
=>
{
useEffect
(()
=>
{
...
@@ -103,6 +105,12 @@ const InitDataBase = props => {
...
@@ -103,6 +105,12 @@ const InitDataBase = props => {
setTableLoading
(
false
);
setTableLoading
(
false
);
console
.
error
(
err
);
console
.
error
(
err
);
});
});
return
()
=>
{
if
(
time
)
{
clearTimeout
(
time
)
time
=
null
}
}
},
[
upData
]);
},
[
upData
]);
// 获取数据库配置信息
// 获取数据库配置信息
useEffect
(()
=>
{
useEffect
(()
=>
{
...
@@ -159,27 +167,42 @@ const InitDataBase = props => {
...
@@ -159,27 +167,42 @@ const InitDataBase = props => {
}
}
}
}
)
)
return
()
=>
{
if
(
time
)
{
clearTimeout
(
time
)
time
=
null
}
}
},
[]);
},
[]);
// 获取日志
// 获取日志
const
doInitLog
=
()
=>
{
const
doInitLog
=
()
=>
{
setInitLoading
(
true
)
getInitDBLogNew
()
getInitDBLogNew
()
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
if
(
res
.
content
)
{
if
(
res
.
data
.
content
)
{
setInitLoading
(
false
)
let
arr
=
[];
let
arr
=
[];
arr
.
push
(
arr
.
push
(
res
.
content
res
.
data
.
content
.
split
(
/
(\r\n)
|
(\n)
/
)
.
split
(
/
(\r\n)
|
(\n)
/
)
.
map
((
item
,
index
)
=>
<
p
key=
{
index
}
>
{
item
}
</
p
>),
.
map
((
item
,
index
)
=>
<
p
key=
{
index
}
>
{
item
}
</
p
>),
);
);
setInitContent
(
arr
);
setInitContent
(
arr
);
scroll
.
current
.
scrollTop
=
scroll
.
current
.
scrollHeight
;
scroll
.
current
.
scrollTop
=
scroll
.
current
.
scrollHeight
;
}
}
if
(
!
res
.
finish
)
{
if
(
!
res
.
data
.
finish
)
{
setTimeout
(()
=>
{
time
=
setTimeout
(()
=>
{
doInitLog
();
doInitLog
();
},
600
);
},
600
);
}
}
else
{
setInitLoading
(
false
)
if
(
time
)
{
clearTimeout
(
time
)
time
=
null
}
}
}
}
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
...
@@ -408,7 +431,7 @@ const InitDataBase = props => {
...
@@ -408,7 +431,7 @@ const InitDataBase = props => {
dirName
:
val
,
dirName
:
val
,
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
notification
.
success
({
notification
.
success
({
message
:
'提示'
,
message
:
'提示'
,
duration
:
3
,
duration
:
3
,
...
@@ -492,7 +515,7 @@ const InitDataBase = props => {
...
@@ -492,7 +515,7 @@ const InitDataBase = props => {
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
setTableLoading
(
false
);
setTableLoading
(
false
);
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
setUpData
(
upData
+
1
);
setUpData
(
upData
+
1
);
notification
.
success
({
notification
.
success
({
message
:
'提示'
,
message
:
'提示'
,
...
@@ -766,7 +789,7 @@ const InitDataBase = props => {
...
@@ -766,7 +789,7 @@ const InitDataBase = props => {
>
>
{
initContent
||
(
{
initContent
||
(
<
Spin
<
Spin
spinning
spinning
=
{
initLoading
}
tip=
"loading..."
tip=
"loading..."
style=
{
{
width
:
'100%'
,
marginTop
:
'40px'
}
}
style=
{
{
width
:
'100%'
,
marginTop
:
'40px'
}
}
/>
/>
...
...
src/pages/platformCenter/messageManage/projectManage/components/IISAgentConfig/DayOfWeekSelect.jsx
View file @
580736c7
...
@@ -2,13 +2,12 @@ import React, { useEffect, useState } from 'react'
...
@@ -2,13 +2,12 @@ import React, { useEffect, useState } from 'react'
import
{
Radio
,
Checkbox
,
Row
,
Col
}
from
'antd'
import
{
Radio
,
Checkbox
,
Row
,
Col
}
from
'antd'
const
DayOfWeekSelect
=
props
=>
{
const
DayOfWeekSelect
=
props
=>
{
const
{
changeWeek
}
=
props
const
[
selectValues
,
setSelectValues
]
=
useState
([])
const
[
selectValues
,
setSelectValues
]
=
useState
([])
const
{
onChange
,
value
}
=
props
const
{
onChange
,
value
}
=
props
const
hours
=
[
const
hours
=
[
{
name
:
"星期一"
,
value
:
'1'
},
{
name
:
"星期一"
,
value
:
'1'
},
...
@@ -23,38 +22,46 @@ const DayOfWeekSelect = props => {
...
@@ -23,38 +22,46 @@ const DayOfWeekSelect = props => {
let
values
=
[]
let
values
=
[]
switch
(
e
.
target
.
value
)
{
switch
(
e
.
target
.
value
)
{
case
0
:
case
0
:
values
=
[
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
]
values
=
[
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
]
break
break
case
1
:
case
1
:
values
=
[]
const
arr
=
[
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
]
let
newArr
=
[]
selectValues
&&
arr
.
map
(
item
=>
{
if
(
!
selectValues
.
includes
(
item
))
{
newArr
.
push
(
item
)
}
})
values
=
newArr
break
break
case
2
:
case
2
:
values
=
[
"1"
,
"2"
,
"3"
,
"4"
,
"5"
]
values
=
[
"1"
,
"2"
,
"3"
,
"4"
,
"5"
]
break
break
case
3
:
case
3
:
values
=
[
"6"
,
"7"
]
values
=
[
"6"
,
"7"
]
break
break
}
}
changeWeek
(
values
)
setSelectValues
(
values
)
setSelectValues
(
values
)
onChange
&&
onChange
(
values
)
onChange
&&
onChange
(
values
)
}
}
const
onCheckChange
=
(
value
)
=>
{
const
onCheckChange
=
(
value
)
=>
{
setSelectValues
(
value
)
setSelectValues
(
value
)
onChange
&&
onChange
(
values
)
onChange
&&
onChange
(
value
)
changeWeek
(
value
)
}
}
useEffect
(()
=>
{
useEffect
(()
=>
{
setSelectValues
(
value
)
setSelectValues
(
value
)
},[
props
])
},
[
props
])
return
(
return
(
<
div
>
<
div
>
<
Radio
.
Group
onChange=
{
onTypeChange
}
style=
{
{
margin
:
'0.25rem 0'
}
}
>
<
Radio
.
Group
onChange=
{
onTypeChange
}
style=
{
{
margin
:
'0.25rem 0'
}
}
>
<
Radio
style=
{
{
width
:
'85px'
}
}
value=
{
0
}
>
全选
</
Radio
>
<
Radio
style=
{
{
width
:
'85px'
}
}
value=
{
0
}
>
全选
</
Radio
>
<
Radio
style=
{
{
width
:
'85px'
}
}
value=
{
1
}
>
反选
</
Radio
>
<
Radio
style=
{
{
width
:
'85px'
}
}
value=
{
1
}
>
反选
</
Radio
>
<
Radio
style=
{
{
width
:
'88px'
}
}
value=
{
2
}
>
工作日
</
Radio
>
<
Radio
style=
{
{
width
:
'88px'
}
}
value=
{
2
}
>
工作日
</
Radio
>
<
Radio
style=
{
{
width
:
'88px'
}
}
value=
{
3
}
>
周末
</
Radio
>
<
Radio
style=
{
{
width
:
'88px'
}
}
value=
{
3
}
>
周末
</
Radio
>
</
Radio
.
Group
>
</
Radio
.
Group
>
<
Checkbox
.
Group
value=
{
selectValues
}
onChange=
{
onCheckChange
}
>
<
Checkbox
.
Group
value=
{
selectValues
}
onChange=
{
onCheckChange
}
>
<
Row
>
<
Row
>
...
@@ -69,6 +76,7 @@ const DayOfWeekSelect = props => {
...
@@ -69,6 +76,7 @@ const DayOfWeekSelect = props => {
}
}
</
Row
>
</
Row
>
</
Checkbox
.
Group
>
</
Checkbox
.
Group
>
</
div
>
</
div
>
)
)
}
}
...
...
src/pages/platformCenter/messageManage/projectManage/components/IISAgentConfig/HourOfDaySelect.jsx
View file @
580736c7
import
React
,
{
useEffect
,
useState
}
from
'react'
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
Radio
,
Checkbox
,
Row
,
Col
}
from
'antd'
import
{
Radio
,
Checkbox
,
Row
,
Col
}
from
'antd'
import
styles
from
'./HourOfDaySelect.less'
import
styles
from
'./HourOfDaySelect.less'
const
HourOfDaySelect
=
props
=>
{
const
HourOfDaySelect
=
props
=>
{
const
{
changeDay
}
=
props
const
[
selectValues
,
setSelectValues
]
=
useState
([])
const
[
selectValues
,
setSelectValues
]
=
useState
([])
const
{
onChange
,
value
}
=
props
const
{
onChange
,
value
}
=
props
const
hours
=
[
const
hours
=
[
{
name
:
"0:00"
,
value
:
'0'
},
{
name
:
"0:00"
,
value
:
'0'
},
...
@@ -40,41 +38,49 @@ const HourOfDaySelect = props => {
...
@@ -40,41 +38,49 @@ const HourOfDaySelect = props => {
let
values
=
[]
let
values
=
[]
switch
(
e
.
target
.
value
)
{
switch
(
e
.
target
.
value
)
{
case
0
:
case
0
:
values
=
[
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
,
"8"
,
"9"
,
"10"
,
"11"
,
"12"
,
"13"
,
"14"
,
"15"
,
"16"
,
"17"
,
"18"
,
"19"
,
"20"
,
"21"
,
"22"
,
"23"
]
values
=
[
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
,
"8"
,
"9"
,
"10"
,
"11"
,
"12"
,
"13"
,
"14"
,
"15"
,
"16"
,
"17"
,
"18"
,
"19"
,
"20"
,
"21"
,
"22"
,
"23"
]
break
break
case
1
:
case
1
:
values
=
[]
const
arr
=
[
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
,
"8"
,
"9"
,
"10"
,
"11"
,
"12"
,
"13"
,
"14"
,
"15"
,
"16"
,
"17"
,
"18"
,
"19"
,
"20"
,
"21"
,
"22"
,
"23"
]
let
newArr
=
[]
selectValues
&&
arr
.
map
(
item
=>
{
if
(
!
selectValues
.
includes
(
item
))
{
newArr
.
push
(
item
)
}
})
values
=
newArr
break
break
case
2
:
case
2
:
values
=
[
"6"
,
"8"
]
values
=
[
"6"
,
"8"
]
break
break
case
3
:
case
3
:
values
=
[
"0"
,
"8"
,
"16"
]
values
=
[
"0"
,
"8"
,
"16"
]
break
break
case
4
:
case
4
:
values
=
[
"0"
,
"6"
,
"12"
,
"18"
]
values
=
[
"0"
,
"6"
,
"12"
,
"18"
]
break
break
}
}
onChange
&&
onChange
(
values
)
onChange
&&
onChange
(
values
)
setSelectValues
(
values
)
setSelectValues
(
values
)
changeDay
(
values
)
}
}
useEffect
(()
=>
{
useEffect
(()
=>
{
setSelectValues
(
value
)
setSelectValues
(
value
)
},[
props
])
},
[
props
])
const
onCheckChange
=
(
value
)
=>
{
const
onCheckChange
=
(
value
)
=>
{
setSelectValues
(
value
)
setSelectValues
(
value
)
onChange
&&
onChange
(
value
)
onChange
&&
onChange
(
value
)
changeDay
(
value
)
}
}
return
(
return
(
<
div
className=
{
styles
.
hourOfDay_container
}
>
<
div
className=
{
styles
.
hourOfDay_container
}
>
<
Radio
.
Group
onChange=
{
onTypeChange
}
style=
{
{
marginBottom
:
'0.5rem'
}
}
>
<
Radio
.
Group
onChange=
{
onTypeChange
}
style=
{
{
marginBottom
:
'0.5rem'
}
}
>
<
Radio
style=
{
{
width
:
'85px'
}
}
value=
{
0
}
>
全选
</
Radio
>
<
Radio
style=
{
{
width
:
'85px'
}
}
value=
{
0
}
>
全选
</
Radio
>
<
Radio
style=
{
{
width
:
'85px'
}
}
value=
{
1
}
>
反选
</
Radio
>
<
Radio
style=
{
{
width
:
'85px'
}
}
value=
{
1
}
>
反选
</
Radio
>
<
Radio
style=
{
{
width
:
'88px'
}
}
value=
{
2
}
>
一天两次
</
Radio
>
<
Radio
style=
{
{
width
:
'88px'
}
}
value=
{
2
}
>
一天两次
</
Radio
>
<
Radio
style=
{
{
width
:
'88px'
}
}
value=
{
3
}
>
一天三次
</
Radio
>
<
Radio
style=
{
{
width
:
'88px'
}
}
value=
{
3
}
>
一天三次
</
Radio
>
<
Radio
style=
{
{
width
:
'88px'
}
}
value=
{
4
}
>
一天四次
</
Radio
>
<
Radio
style=
{
{
width
:
'88px'
}
}
value=
{
4
}
>
一天四次
</
Radio
>
</
Radio
.
Group
>
</
Radio
.
Group
>
<
Checkbox
.
Group
value=
{
selectValues
}
onChange=
{
onCheckChange
}
>
<
Checkbox
.
Group
value=
{
selectValues
}
onChange=
{
onCheckChange
}
>
<
Row
>
<
Row
>
...
...
src/pages/platformCenter/messageManage/projectManage/components/IISAgentConfig/HourOfDaySelect.less
View file @
580736c7
...
@@ -2,10 +2,6 @@
...
@@ -2,10 +2,6 @@
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
margin-top: 0.3rem;
margin-top: 0.3rem;
.ant-form-item-control-input{
}
.ant-radio-wrapper{
}
}
}
src/pages/platformCenter/messageManage/projectManage/components/IISAgentConfig/VisibleIISAgentConfig.jsx
View file @
580736c7
...
@@ -6,11 +6,12 @@ import DayOfWeekSelect from './DayOfWeekSelect'
...
@@ -6,11 +6,12 @@ import DayOfWeekSelect from './DayOfWeekSelect'
import
styles
from
'./VisibleIISAgentConfig.less'
import
styles
from
'./VisibleIISAgentConfig.less'
import
moment
from
'moment'
import
moment
from
'moment'
import
{
tr
}
from
'voca'
;
import
{
tr
}
from
'voca'
;
import
{
EditOutlined
}
from
'@ant-design/icons'
;
import
{
EditOutlined
,
InfoCircleOutlined
}
from
'@ant-design/icons'
;
const
{
Item
}
=
Form
;
const
{
Item
}
=
Form
;
const
{
TextArea
}
=
Input
;
const
{
TextArea
}
=
Input
;
let
unitType
=
{
Hour
:
'小时'
,
Minute
:
'分钟'
,
Second
:
'秒'
}
let
unitType
=
{
Hour
:
'小时'
,
Minute
:
'分钟'
,
Second
:
'秒'
}
const
hours
=
{
'1'
:
'星期一'
,
'2'
:
'星期二'
,
'3'
:
'星期三'
,
'4'
:
'星期四'
,
'5'
:
'星期五'
,
'6'
:
'星期六'
,
'7'
:
'星期天'
}
const
VisibleIISAgentConfig
=
props
=>
{
const
VisibleIISAgentConfig
=
props
=>
{
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
...
@@ -32,7 +33,9 @@ const VisibleIISAgentConfig = props => {
...
@@ -32,7 +33,9 @@ const VisibleIISAgentConfig = props => {
const
[
isType
,
setIsType
]
=
useState
(
'重复执行'
)
const
[
isType
,
setIsType
]
=
useState
(
'重复执行'
)
const
[
isTypeValue
,
setIsTypeValue
]
=
useState
(
'BYLOOP'
)
const
[
isTypeValue
,
setIsTypeValue
]
=
useState
(
'BYLOOP'
)
const
[
time_out
,
setTime_out
]
=
useState
(
30
)
const
[
time_out
,
setTime_out
]
=
useState
(
30
)
const
[
weekData
,
setWeekData
]
=
useState
([])
const
[
exeTime
,
setExeTime
]
=
useState
(
moment
().
format
(
'YYYY-MM-DD 00:00:00'
))
const
[
exeTime
,
setExeTime
]
=
useState
(
moment
().
format
(
'YYYY-MM-DD 00:00:00'
))
const
[
selectValues
,
setSelectValues
]
=
useState
([])
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
dateFormat
=
'YYYY-MM-DD HH:mm:ss'
;
const
dateFormat
=
'YYYY-MM-DD HH:mm:ss'
;
const
{
agentConfig
,
value
,
onIISAgentSubmit
}
=
props
const
{
agentConfig
,
value
,
onIISAgentSubmit
}
=
props
...
@@ -94,7 +97,7 @@ const VisibleIISAgentConfig = props => {
...
@@ -94,7 +97,7 @@ const VisibleIISAgentConfig = props => {
loop_mode
:
'BYLOOP'
,
loop_mode
:
'BYLOOP'
,
start_time
:
moment
(
new
Date
(
new
Date
().
toLocaleDateString
()),
'YYYY-MM-DD 00:00:00'
)
start_time
:
moment
(
new
Date
(
new
Date
().
toLocaleDateString
()),
'YYYY-MM-DD 00:00:00'
)
})
})
setExeTime
(
moment
().
format
(
'YYYY-MM-DD 00:00:00'
))
setExeTime
(
moment
().
format
(
'YYYY-MM-DD 00:00:00'
))
setIsType
(
'重复执行'
)
setIsType
(
'重复执行'
)
changeLoopMode
(
'BYLOOP'
)
changeLoopMode
(
'BYLOOP'
)
setIsUse
(
true
)
setIsUse
(
true
)
...
@@ -115,20 +118,6 @@ const VisibleIISAgentConfig = props => {
...
@@ -115,20 +118,6 @@ const VisibleIISAgentConfig = props => {
},
[
props
])
},
[
props
])
const
addDays
=
(
days
)
=>
{
var
d
=
new
Date
();
d
.
setMilliseconds
(
d
.
getMilliseconds
()
+
(
days
*
24
*
60
*
60
*
1000
));
var
month
=
d
.
getMonth
()
+
1
;
var
day
=
d
.
getDate
();
if
(
month
<
10
)
{
month
=
"0"
+
month
;
}
if
(
day
<
10
)
{
day
=
"0"
+
day
;
}
var
val
=
d
.
getFullYear
()
+
""
+
month
+
""
+
day
;
return
val
;
}
const
handleCancel
=
()
=>
{
const
handleCancel
=
()
=>
{
setPreviewVisible
(
false
)
setPreviewVisible
(
false
)
...
@@ -137,6 +126,10 @@ const VisibleIISAgentConfig = props => {
...
@@ -137,6 +126,10 @@ const VisibleIISAgentConfig = props => {
const
handleOk
=
()
=>
{
const
handleOk
=
()
=>
{
let
fv
=
form
.
getFieldValue
()
let
fv
=
form
.
getFieldValue
()
if
((
fv
.
loop_mode
===
'ByDay'
&&
!
selectValues
.
length
)
||
(
fv
.
loop_mode
===
'ByWeek'
&&
!
weekData
.
length
))
{
message
.
warning
(
'请选择计划执行日'
)
return
false
}
let
data
=
{
let
data
=
{
Url
:
fv
.
url_path
,
Url
:
fv
.
url_path
,
CustomHeader
:
fv
.
request_header
||
''
,
CustomHeader
:
fv
.
request_header
||
''
,
...
@@ -264,9 +257,6 @@ const VisibleIISAgentConfig = props => {
...
@@ -264,9 +257,6 @@ const VisibleIISAgentConfig = props => {
}
}
const
onWait
=
(
e
)
=>
{
const
onWait
=
(
e
)
=>
{
setWaitCheck
(
e
)
setWaitCheck
(
e
)
console
.
log
(
'e'
,
e
);
}
}
const
changeUnit
=
(
e
)
=>
{
const
changeUnit
=
(
e
)
=>
{
setLoop_unit
(
e
)
setLoop_unit
(
e
)
...
@@ -277,9 +267,18 @@ const VisibleIISAgentConfig = props => {
...
@@ -277,9 +267,18 @@ const VisibleIISAgentConfig = props => {
const
InputTimeOut
=
(
e
)
=>
{
const
InputTimeOut
=
(
e
)
=>
{
setTime_out
(
e
)
setTime_out
(
e
)
}
}
const
changeStartTime
=
(
e
)
=>
{
const
changeStartTime
=
(
e
)
=>
{
setExeTime
(
moment
(
e
).
format
(
'YYYY-MM-DD HH:mm:ss'
))
setExeTime
(
moment
(
e
).
format
(
'YYYY-MM-DD HH:mm:ss'
))
}
}
const
changeDay
=
(
data
)
=>
{
console
.
log
(
'data'
,
data
);
if
(
data
)
setSelectValues
(
data
)
}
const
changeWeek
=
(
data
)
=>
{
console
.
log
(
'data'
,
data
);
if
(
data
)
setWeekData
(
data
)
}
return
(
return
(
<
div
className=
{
styles
.
agent_container
}
>
<
div
className=
{
styles
.
agent_container
}
>
<
Input
value=
{
selectRole
}
disabled=
{
true
}
/>
<
Input
value=
{
selectRole
}
disabled=
{
true
}
/>
...
@@ -409,7 +408,7 @@ const VisibleIISAgentConfig = props => {
...
@@ -409,7 +408,7 @@ const VisibleIISAgentConfig = props => {
label=
"日循环"
label=
"日循环"
name=
"hour_of_day"
name=
"hour_of_day"
>
>
<
HourOfDaySelect
/>
<
HourOfDaySelect
changeDay=
{
changeDay
}
/>
</
Item
>
</
Item
>
)
)
}
}
...
@@ -419,10 +418,13 @@ const VisibleIISAgentConfig = props => {
...
@@ -419,10 +418,13 @@ const VisibleIISAgentConfig = props => {
label=
"周循环"
label=
"周循环"
name=
"day_of_week"
name=
"day_of_week"
>
>
<
DayOfWeekSelect
/>
<
DayOfWeekSelect
changeWeek=
{
changeWeek
}
/>
</
Item
>
</
Item
>
)
)
}
}
{
isTypeValue
===
'ByDay'
?
!
selectValues
.
length
&&
(<
span
style=
{
{
color
:
'#f00'
}
}
className=
{
styles
.
exeTime
}
><
InfoCircleOutlined
style=
{
{
marginRight
:
'0.2rem'
}
}
/>
必须选择计划执行时刻
</
span
>)
:
''
}
{
isTypeValue
===
'ByWeek'
?
!
weekData
.
length
&&
(<
span
style=
{
{
color
:
'#f00'
}
}
className=
{
styles
.
exeTime
}
><
InfoCircleOutlined
style=
{
{
marginRight
:
'0.2rem'
}
}
/>
必须选择计划执行时刻
</
span
>)
:
''
}
<
Item
<
Item
label=
"说明"
label=
"说明"
>
>
...
@@ -430,8 +432,17 @@ const VisibleIISAgentConfig = props => {
...
@@ -430,8 +432,17 @@ const VisibleIISAgentConfig = props => {
{
isType
===
'执行一次'
&&
(<
span
>
{
isType
===
'执行一次'
&&
(<
span
>
在
{
exeTime
}
执行一次
在
{
exeTime
}
执行一次
</
span
>)
}
</
span
>)
}
{
isType
===
'重复执行'
&&
isTypeValue
!==
'BYLOOP'
&&
(<
span
style=
{
{
color
:
'#f00'
}
}
>
{
isType
===
'重复执行'
&&
isTypeValue
===
'ByDay'
&&
(<
span
style=
{
{
color
:
selectValues
.
length
?
'#909EB6FF'
:
'#f00'
}
}
>
从
{
exeTime
}
开始
从
{
exeTime
}
开始
{
selectValues
.
length
?
',在每天'
:
''
}{
selectValues
.
length
?
selectValues
.
map
((
item
,
index
)
=>
{
return
item
.
length
>
1
?
`${item}:00${index == selectValues.length - 1 ? '' : ','}`
:
`0${item}:00${index == selectValues.length - 1 ? '' : ','}`
})
:
''
}{
selectValues
.
length
?
'执行'
:
''
}
</
span
>)
}
{
isType
===
'重复执行'
&&
isTypeValue
===
'ByWeek'
&&
(<
span
style=
{
{
color
:
weekData
.
length
?
'#909EB6FF'
:
'#f00'
}
}
>
从
{
exeTime
}
开始
{
weekData
.
length
?
',在每周'
:
''
}{
weekData
.
length
?
weekData
.
map
((
item
,
index
)
=>
{
return
`${hours[item]}${index == weekData.length - 1 ? '' : ','}`
})
:
''
}{
weekData
.
length
&&
selectValues
.
length
?
selectValues
.
map
((
item
,
index
)
=>
{
return
item
.
length
>
1
?
`${item}:00${index == selectValues.length - 1 ? '' : ','}`
:
`0${item}:00${index == selectValues.length - 1 ? '' : ','}`
})
:
''
}
{
weekData
.
length
?
'执行'
:
''
}
</
span
>)
}
</
span
>)
}
{
isType
===
'重复执行'
&&
isTypeValue
===
'BYLOOP'
&&
(<
span
style=
{
{
color
:
'#909EB6FF'
}
}
>
{
isType
===
'重复执行'
&&
isTypeValue
===
'BYLOOP'
&&
(<
span
style=
{
{
color
:
'#909EB6FF'
}
}
>
从
{
exeTime
}
开始,每
{
interval
}{
unitType
[
loop_unit
]
}
执行一次。
从
{
exeTime
}
开始,每
{
interval
}{
unitType
[
loop_unit
]
}
执行一次。
...
...
src/pages/platformCenter/messageManage/projectManage/components/IISAgentConfig/VisibleIISAgentConfig.less
View file @
580736c7
...
@@ -10,7 +10,12 @@
...
@@ -10,7 +10,12 @@
color: rgba(22,133,255,1);
color: rgba(22,133,255,1);
}
}
.select_result {}
}
.exeTime{
display: flex;
align-items: center;
margin:0.2rem 0 0 7.6rem
}
}
.IISAgent_container {
.IISAgent_container {
overflow-y: scroll;
overflow-y: scroll;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment