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
cdbaedf8
Commit
cdbaedf8
authored
Jan 04, 2023
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11111
parent
acd13dfd
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
198 additions
and
166 deletions
+198
-166
index.jsx
src/components/PremButton/index.jsx
+9
-1
AvatarDropdown.jsx
src/components/RightContent/AvatarDropdown.jsx
+0
-1
index.jsx
src/pages/repair/order/index.jsx
+131
-112
index.jsx
src/pages/repair/outsourcing/index.jsx
+49
-43
index.jsx
src/pages/repair/track/index.jsx
+9
-9
No files found.
src/components/PremButton/index.jsx
View file @
cdbaedf8
...
...
@@ -4,8 +4,16 @@ import { useModel } from '@umijs/max';
function
PremButton
(
props
)
{
const
{
initialState
,
setInitialState
}
=
useModel
(
'@@initialState'
);
console
.
log
(
initialState
.
newMenu
);
let
buttonPerm
=
initialState
.
newMenu
.
buttonPerm
;
const
{
children
,
btn
,
pop
,
access
}
=
props
;
let
accesses
=
access
?
[
'havePrem'
].
includes
(
access
)
:
true
;
console
.
log
(
access
);
let
res
=
buttonPerm
&&
buttonPerm
.
length
>
0
?
buttonPerm
.
filter
((
it
)
=>
it
.
typeName
==
access
&&
it
.
show
==
1
)
:
[];
console
.
log
(
res
);
let
accesses
=
access
?
res
.
map
((
it
)
=>
it
.
typeName
).
includes
(
access
)
:
true
;
//配置按钮权限接口
return
pop
?
(
...
...
src/components/RightContent/AvatarDropdown.jsx
View file @
cdbaedf8
...
...
@@ -31,7 +31,6 @@ const loginOut = async () => {
const
AvatarDropdown
=
({
menu
})
=>
{
const
{
initialState
,
setInitialState
}
=
useModel
(
'@@initialState'
);
console
.
log
(
'initialState,'
,
initialState
);
const
[
visible
,
cv
]
=
useState
(
false
),
[
formRef
]
=
Form
.
useForm
(),
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
...
...
src/pages/repair/order/index.jsx
View file @
cdbaedf8
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 202
2-12-30 17:32:29
* @Last Modified time: 202
3-01-04 17:41:56
*/
import
*
as
React
from
'react'
;
...
...
@@ -38,14 +38,7 @@ function Failure(props) {
}
},
});
const
perData
=
useRequest
(
async
()
=>
{
let
res
=
await
doFetch
({
url
:
'/auth/sysPermission/queryButton'
,
params
:
{
parentId
:
'400300'
},
});
return
res
?.
data
?.
dataList
;
});
console
.
log
(
perData
.
data
);
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
...
...
@@ -113,15 +106,15 @@ function Failure(props) {
// 更多
const
More
=
(
text
,
row
,
_
,
action
)
=>
{
console
.
log
(
perData
.
data
);
const
menu
=
(
<
Menu
items=
{
[
{
label
:
(
<
a
onClick=
{
()
=>
{
<
PremButton
access=
"umRepairOrder_dispatchById"
btn=
{
{
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
...
...
@@ -130,17 +123,20 @@ function Failure(props) {
val
:
'only'
,
title
:
row
?.
status
==
8
?
'派单'
:
'接单'
,
}));
},
}
}
>
{
row
?.
status
==
8
?
'派单'
:
'接单'
}
</
a
>
</
PremButton
>
),
key
:
'0'
,
},
{
label
:
(
<
a
onClick=
{
()
=>
{
<
PremButton
access=
"umRepairOrder_completeRepair"
btn=
{
{
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
...
...
@@ -149,16 +145,18 @@ function Failure(props) {
val
:
'only'
,
title
:
'完成维修'
,
}));
},
}
}
>
完成维修
</
a
>
</
PremButton
>
),
key
:
'1'
,
},
{
label
:
(
<
a
<
PremButton
access=
"umRepairOrder_transferTracking"
onClick=
{
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
...
...
@@ -171,14 +169,16 @@ function Failure(props) {
}
}
>
转追踪
</
a
>
</
PremButton
>
),
key
:
'2'
,
},
{
label
:
(
<
a
onClick=
{
()
=>
{
<
PremButton
access=
"umRepairOrder_transferOutsourcing"
btn=
{
{
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
...
...
@@ -187,17 +187,20 @@ function Failure(props) {
val
:
'only'
,
title
:
'转外协'
,
}));
},
}
}
>
转外协
</
a
>
</
PremButton
>
),
key
:
'3'
,
},
{
label
:
(
<
a
onClick=
{
()
=>
{
<
PremButton
access=
"umRepairOrder_documentTransfer"
btn=
{
{
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
...
...
@@ -206,17 +209,20 @@ function Failure(props) {
val
:
'only'
,
title
:
'转单'
,
}));
},
}
}
>
转单
</
a
>
</
PremButton
>
),
key
:
'4'
,
},
{
label
:
(
<
a
onClick=
{
()
=>
{
<
PremButton
access=
"umRepairOrder_chargeback"
btn=
{
{
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
...
...
@@ -225,17 +231,20 @@ function Failure(props) {
val
:
'only'
,
title
:
'退单'
,
}));
},
}
}
>
退单
</
a
>
</
PremButton
>
),
key
:
'5'
,
},
{
label
:
(
<
a
onClick=
{
()
=>
{
<
PremButton
access=
"umRepairOrder_completeRepairValidate"
btn=
{
{
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
...
...
@@ -244,17 +253,20 @@ function Failure(props) {
val
:
'only'
,
title
:
'效果验证'
,
}));
},
}
}
>
效果验证
</
a
>
</
PremButton
>
),
key
:
'6'
,
},
{
label
:
(
<
a
onClick=
{
()
=>
{
<
PremButton
access=
"umRepairOrder_transferTrackingAudit"
btn=
{
{
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
...
...
@@ -263,17 +275,20 @@ function Failure(props) {
val
:
'only'
,
title
:
'追踪审核'
,
}));
},
}
}
>
追踪审核
</
a
>
</
PremButton
>
),
key
:
'7'
,
},
{
label
:
(
<
a
onClick=
{
()
=>
{
<
PremButton
access=
"umRepairOrder_transferAudit"
btn=
{
{
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
...
...
@@ -282,17 +297,20 @@ function Failure(props) {
val
:
'only'
,
title
:
'外协审核'
,
}));
},
}
}
>
外协审核
</
a
>
</
PremButton
>
),
key
:
'8'
,
},
{
label
:
(
<
a
onClick=
{
()
=>
{
<
PremButton
access=
"umRepairOrder_chargebackAudit"
btn=
{
{
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
...
...
@@ -301,10 +319,11 @@ function Failure(props) {
val
:
'only'
,
title
:
'退单审核'
,
}));
},
}
}
>
退单审核
</
a
>
</
PremButton
>
),
key
:
'9'
,
},
...
...
src/pages/repair/outsourcing/index.jsx
View file @
cdbaedf8
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-04 1
0:31:19
* @Last Modified time: 2023-01-04 1
7:46:11
*/
import
*
as
React
from
'react'
;
...
...
@@ -251,8 +251,9 @@ function Failure(props) {
{
label
:
row
?.
status
==
0
||
row
?.
status
==
1
?
(
<
a
onClick=
{
async
()
=>
{
<
PremButton
btn=
{
{
onClick
:
async
()
=>
{
let
params
=
{
id
:
row
?.
id
,
};
...
...
@@ -268,13 +269,15 @@ function Failure(props) {
}));
actionRef
.
current
.
reload
();
}
},
}
}
>
接单
</
a
>
</
PremButton
>
)
:
(
<
a
onClick=
{
async
()
=>
{
<
PremButton
btn=
{
{
onClick
:
async
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
...
...
@@ -283,18 +286,20 @@ function Failure(props) {
val
:
'only'
,
title
:
'派单'
,
}));
},
}
}
>
派单
</
a
>
</
PremButton
>
),
key
:
'0'
,
// disabled: true,
},
{
label
:
(
<
a
onClick=
{
()
=>
{
<
PremButton
btn=
{
{
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
...
...
@@ -305,10 +310,11 @@ function Failure(props) {
val
:
'only'
,
title
:
'完成外协'
,
}));
},
}
}
>
完成外协
</
a
>
</
PremButton
>
),
key
:
'1'
,
},
...
...
src/pages/repair/track/index.jsx
View file @
cdbaedf8
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-04 1
0:30:44
* @Last Modified time: 2023-01-04 1
6:25:39
*/
import
*
as
React
from
'react'
;
...
...
@@ -322,7 +322,7 @@ function Failure(props) {
{
label
:
row
?.
status
==
0
||
row
?.
status
==
1
?
(
<
a
<
PremButton
onClick=
{
async
()
=>
{
let
params
=
{
id
:
row
?.
id
,
...
...
@@ -342,9 +342,9 @@ function Failure(props) {
}
}
>
接单
</
a
>
</
PremButton
>
)
:
(
<
a
<
PremButton
onClick=
{
async
()
=>
{
let
params
=
{
id
:
row
?.
id
,
...
...
@@ -364,14 +364,14 @@ function Failure(props) {
}
}
>
派单
</
a
>
</
PremButton
>
),
key
:
'0'
,
// disabled: true,
},
{
label
:
(
<
a
<
PremButton
onClick=
{
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
...
...
@@ -386,13 +386,13 @@ function Failure(props) {
}
}
>
追踪
</
a
>
</
PremButton
>
),
key
:
'1'
,
},
{
label
:
(
<
a
<
PremButton
onClick=
{
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
...
...
@@ -407,7 +407,7 @@ function Failure(props) {
}
}
>
验证
</
a
>
</
PremButton
>
),
key
:
'2'
,
},
...
...
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