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
32eb7245
Commit
32eb7245
authored
Dec 12, 2022
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
12121733
parent
97b50a3a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
396 additions
and
144 deletions
+396
-144
authRoutes.js
config/authRoutes.js
+150
-144
columns.js
src/pages/system/pushsetting/columns.js
+81
-0
index.jsx
src/pages/system/pushsetting/index.jsx
+165
-0
No files found.
config/authRoutes.js
View file @
32eb7245
...
@@ -139,6 +139,12 @@ export default [
...
@@ -139,6 +139,12 @@ export default [
"path"
:
"/system/rules"
,
"path"
:
"/system/rules"
,
"icon"
:
""
,
"icon"
:
""
,
"component"
:
"./system/rules"
"component"
:
"./system/rules"
},
{
"name"
:
"推送配置"
,
"path"
:
"/system/pushsetting"
,
"icon"
:
""
,
"component"
:
"./system/pushsetting"
}
}
]
]
}
}
...
...
src/pages/system/pushsetting/columns.js
0 → 100644
View file @
32eb7245
function
getcolumns
(
setdrawer
)
{
return
{
"columns"
:
[
{
"title"
:
"推送场景"
,
"dataIndex"
:
"businessMsgSceneId"
,
"key"
:
"businessMsgSceneId"
},
{
"title"
:
"推送方式"
,
"dataIndex"
:
"sendMethodType"
,
"key"
:
"sendMethodType"
},
{
"title"
:
"适用类型"
,
"dataIndex"
:
"fitField"
,
"key"
:
"fitField"
,
"valueType"
:
"select"
,
"mode"
:
"radio"
,
"options"
:
[
{
"label"
:
"全部"
,
"value"
:
"1"
},
{
"label"
:
"公司"
,
"value"
:
"2"
},
{
"label"
:
"部门"
,
"value"
:
"3"
},
{
"label"
:
"工厂"
,
"value"
:
"4"
},
{
"label"
:
"车间"
,
"value"
:
"5"
},
{
"label"
:
"工段"
,
"value"
:
"6"
},
{
"label"
:
"产线"
,
"value"
:
"7"
}
]
},
{
"title"
:
"适用选择"
,
"dataIndex"
:
"fieldId"
,
"key"
:
"fieldId"
},
{
"title"
:
"推送标题"
,
"dataIndex"
:
"sendTitle"
,
"key"
:
"sendTitle"
},
{
"title"
:
"推送内容"
,
"dataIndex"
:
"sendContent"
,
"key"
:
"sendContent"
}
],
"pathconfig"
:
{
"enableadd"
:
false
,
"enableedit"
:
false
,
"enabledelete"
:
false
,
"enabledetail"
:
false
,
"add"
:
""
,
"edit"
:
""
,
"list"
:
"/repair/umRepairOrder/queryRepairOrderList"
,
"delete"
:
""
,
"detail"
:
""
}
};
}
export
default
getcolumns
;
\ No newline at end of file
src/pages/system/pushsetting/index.jsx
0 → 100644
View file @
32eb7245
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
import
AutoTable
from
'@/components/AutoTable'
;
import
PremButton
from
'@/components/PremButton'
;
import
getcolumns
from
'./columns'
;
import
{
useRequest
}
from
'ahooks'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
function
Pushsetting
(
props
)
{
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
});
const
pathconfig
=
useMemo
(()
=>
{
let
pathconf
=
getcolumns
(
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'
,
}));
},
}
}
>
编辑
</
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
=
getcolumns
(
setdrawer
)?.
columns
;
return
defcolumn
.
concat
({
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
pathconfig
?.
enabledetail
&&
detail
(
text
,
row
,
_
,
action
),
pathconfig
?.
enableedit
&&
edit
(
text
,
row
,
_
,
action
),
pathconfig
?.
enabledelete
&&
remove
(
text
,
row
,
_
,
action
),
],
});
},
[]);
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
"推送配置"
columns=
{
columns
}
actionRef=
{
actionRef
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
pageextra=
{
pathconfig
?.
enableadd
?
'add'
:
null
}
resizeable=
{
true
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
disabled
:
false
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
null
,
title
:
'新增'
,
val
:
'add'
,
}));
},
},
}
}
/>
<
DrawerPro
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
}
});
}
else
if
(
drawer
?.
val
==
'edit'
)
{
run
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
}
});
}
}
}
/>
</
div
>
);
}
export
default
Pushsetting
;
\ No newline at end of file
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