Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ems3.3
Project
Project
Details
Activity
Releases
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
wuhao
ems3.3
Commits
1da0fc3b
Commit
1da0fc3b
authored
Jan 11, 2023
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pushing
parent
4c587ab9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
314 additions
and
4 deletions
+314
-4
Notice.jsx
src/pages/system/pushsetting/Notice.jsx
+171
-0
columns.js
src/pages/system/pushsetting/columns.js
+18
-0
index.jsx
src/pages/system/pushsetting/index.jsx
+8
-4
procolumns.js
src/pages/system/pushsetting/procolumns.js
+117
-0
No files found.
src/pages/system/pushsetting/Notice.jsx
0 → 100644
View file @
1da0fc3b
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
ModalPro
from
'@/components/ModalPro'
;
import
AutoTable
from
'@/components/AutoTable'
;
import
PremButton
from
'@/components/PremButton'
;
import
procolumns
from
'./procolumns'
;
import
{
useRequest
}
from
'ahooks'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
function
Project
({
businessMsgOptionId
})
{
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
});
const
pathconfig
=
useMemo
(()
=>
{
let
pathconf
=
procolumns
(
setdrawer
)?.
pathconfig
??
{};
return
pathconf
;
},
[]);
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
onSuccess
:
(
res
,
params
)
=>
{
if
(
res
?.
code
==
'0000'
)
{
actionRef
?.
current
?.
reload
();
setdrawer
((
s
)
=>
({
...
s
,
open
:
false
,
}));
}
},
});
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'link'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
},
}
}
>
详情
</
PremButton
>
);
};
const
edit
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'编辑'
,
val
:
'edit'
,
id
:
row
?.
id
,
}));
},
}
}
>
编辑
</
PremButton
>
);
};
const
remove
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
pop=
{
{
title
:
'是否删除?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
run
({
url
:
pathconfig
?.
delete
||
'/delete'
,
params
:
{
id
:
row
?.
id
}
});
},
}
}
btn=
{
{
size
:
'small'
,
type
:
'danger'
,
}
}
>
删除
</
PremButton
>
);
};
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
procolumns
(
drawer
?.
id
)?.
columns
;
return
defcolumn
.
concat
({
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
pathconfig
?.
enableedit
&&
edit
(
text
,
row
,
_
,
action
),
pathconfig
?.
enabledelete
&&
remove
(
text
,
row
,
_
,
action
),
],
});
},
[
drawer
?.
id
]);
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
columns=
{
columns
}
actionRef=
{
actionRef
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
pageextra=
{
pathconfig
?.
enableadd
?
'add'
:
null
}
resizeable=
{
false
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
disabled
:
false
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
null
,
title
:
'新增'
,
val
:
'add'
,
id
:
null
,
}));
},
},
}
}
extraparams=
{
{
businessMsgOptionId
}
}
/>
<
ModalPro
fields=
{
columns
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
placement=
"right"
detailpath=
{
pathconfig
?.
detail
||
null
}
detailData=
{
drawer
?.
item
}
defaultFormValue=
{
drawer
?.
item
}
onClose=
{
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
false
,
}));
}
}
{
...
drawer
}
onFinish=
{
(
vals
)
=>
{
if
(
drawer
?.
val
==
'add'
)
{
run
({
url
:
pathconfig
?.
add
||
'/add'
,
params
:
{
...
vals
,
businessMsgOptionId
},
});
}
else
if
(
drawer
?.
val
==
'edit'
)
{
run
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
,
businessMsgOptionId
},
});
}
}
}
/>
</
div
>
);
}
export
default
Project
;
src/pages/system/pushsetting/columns.js
View file @
1da0fc3b
...
...
@@ -10,6 +10,24 @@ function getcolumns(setdrawer) {
path
:
'/base/paBusinessMsgScene/queryAllForSelect'
,
params
:
{},
},
render
:
(
_
,
row
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
}}
>
{
row
?.
msgSceneName
}
<
/a
>
);
},
},
{
title
:
'推送方式'
,
...
...
src/pages/system/pushsetting/index.jsx
View file @
1da0fc3b
...
...
@@ -9,6 +9,7 @@ import { doFetch } from '@/utils/doFetch';
import
{
Drawer
,
Space
,
Table
,
message
}
from
'antd'
;
import
InitForm
from
'@/components/InitForm'
;
import
copy
from
'copy-to-clipboard'
;
import
Notice
from
'./Notice'
;
function
Pushsetting
(
props
)
{
const
actionRef
=
useRef
(),
...
...
@@ -45,9 +46,10 @@ function Pushsetting(props) {
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
title
:
'通知'
,
val
:
'only'
,
id
:
row
?.
id
,
pushSettingFlag
:
false
,
}));
},
}
}
...
...
@@ -227,7 +229,9 @@ function Pushsetting(props) {
run
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
}
});
}
}
}
/>
>
<
Notice
businessMsgOptionId=
{
drawer
?.
id
}
/>
</
DrawerPro
>
<
Drawer
title=
"查看变量"
width=
{
700
}
...
...
src/pages/system/pushsetting/procolumns.js
0 → 100644
View file @
1da0fc3b
function
procolumns
(
id
)
{
return
{
columns
:
[
{
title
:
'推送流程'
,
dataIndex
:
'sendProcessName'
,
key
:
'sendProcess'
,
hideInSearch
:
true
,
valueType
:
'select'
,
colProps
:
{
span
:
6
},
options
:
[
{
label
:
'一级通知'
,
value
:
1
},
{
label
:
'二级通知'
,
value
:
2
},
{
label
:
'三级通知'
,
value
:
3
},
{
label
:
'四级通知'
,
value
:
4
},
],
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'推送对象'
,
dataIndex
:
'sendToName'
,
colProps
:
{
span
:
6
},
key
:
'sendTo'
,
hideInSearch
:
true
,
valueType
:
'select'
,
options
:
[
{
label
:
'可指定人员'
,
value
:
2
},
{
label
:
'创建人'
,
value
:
3
},
{
label
:
'选择角色'
,
value
:
6
},
{
label
:
'选择人员'
,
value
:
7
},
],
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'选择对象'
,
colProps
:
{
span
:
6
},
dataIndex
:
'targetNames'
,
hideInSearch
:
true
,
key
:
'targetIdList'
,
},
{
colProps
:
{
span
:
6
},
title
:
'触发次数'
,
dataIndex
:
'judgeTypeName'
,
key
:
'judgeType'
,
valueType
:
'digit'
,
precision
:
0
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
hideInSearch
:
true
,
},
{
title
:
'初始触发时长'
,
dataIndex
:
'initialTime'
,
hideInSearch
:
true
,
key
:
'initialTime'
,
valueType
:
'digit'
,
precision
:
0
,
colProps
:
{
span
:
6
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'初始触发时长单位'
,
colProps
:
{
span
:
6
},
dataIndex
:
'initialUnit'
,
hideInSearch
:
true
,
key
:
'initialUnit'
,
valueType
:
'select'
,
options
:
[
{
label
:
'分钟'
,
value
:
1
},
{
label
:
'小时'
,
value
:
2
},
{
label
:
'天'
,
value
:
3
},
],
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'间隔时长'
,
dataIndex
:
'intervalTime'
,
colProps
:
{
span
:
6
},
valueType
:
'digit'
,
precision
:
0
,
key
:
'intervalTime'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
valueType
:
'digit'
,
hideInSearch
:
true
,
},
{
title
:
'间隔时长单位'
,
dataIndex
:
'intervalUnit'
,
key
:
'intervalUnit'
,
hideInSearch
:
true
,
colProps
:
{
span
:
6
},
valueType
:
'select'
,
options
:
[
{
label
:
'分钟'
,
value
:
1
},
{
label
:
'小时'
,
value
:
2
},
{
label
:
'天'
,
value
:
3
},
],
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
],
pathconfig
:
{
enableadd
:
true
,
enableedit
:
true
,
enabledelete
:
true
,
enabledetail
:
false
,
add
:
'/base/paBusinessMsgOptionDetail/save'
,
edit
:
'/base/paBusinessMsgOptionDetail/save'
,
list
:
'/base/paBusinessMsgOptionDetail/queryList'
,
delete
:
'/maintain/umMaintainItem/deleteById'
,
detail
:
''
,
},
};
}
export
default
procolumns
;
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