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
b4746e93
Commit
b4746e93
authored
Dec 02, 2022
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
12021920
parent
42ac5eb4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
9 deletions
+63
-9
Addform.jsx
src/pages/repair/failure/Addform.jsx
+11
-0
index.jsx
src/pages/repair/failure/index.jsx
+16
-4
columns.js
src/pages/system/rules/columns.js
+1
-1
index.jsx
src/pages/system/rules/index.jsx
+35
-4
No files found.
src/pages/repair/failure/Addform.jsx
0 → 100644
View file @
b4746e93
import
{
useState
,
useEffect
}
from
'react'
;
const
App
=
()
=>
{
return
(
<>
<
div
>
新增
</
div
>
</>
);
};
export
default
App
;
src/pages/repair/failure/index.jsx
View file @
b4746e93
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-02 1
1:41:03
* @Last Modified time: 2022-12-02 1
9:19:52
*/
import
*
as
React
from
'react'
;
...
...
@@ -13,6 +13,7 @@ import PremButton from '@/components/PremButton';
import
getcolumns
from
'./columns'
;
import
{
useRequest
}
from
'ahooks'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
Addform
from
'./Addform'
;
function
Failure
(
props
)
{
const
actionRef
=
useRef
(),
...
...
@@ -120,6 +121,14 @@ function Failure(props) {
return
defpath
;
},
[
activeTabKey
]);
const
selectType
=
(
type
)
=>
{
switch
(
type
)
{
case
'add'
:
return
<
Addform
/>;
default
:
break
;
}
};
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
...
...
@@ -140,7 +149,8 @@ function Failure(props) {
open
:
true
,
item
:
null
,
title
:
'新增'
,
val
:
'add'
,
val
:
'only'
,
type
:
'add'
,
}));
},
},
...
...
@@ -174,7 +184,9 @@ function Failure(props) {
run
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
}
});
}
}
}
/>
>
{
selectType
(
drawer
?.
type
)
}
</
DrawerPro
>
</
div
>
);
}
...
...
src/pages/system/rules/columns.js
View file @
b4746e93
...
...
@@ -9,7 +9,7 @@ function getcolumns(setdrawer) {
formItemProps
:
{
rules
:
[
{
required
:
fals
e
,
required
:
tru
e
,
message
:
'此项为必填项'
,
},
],
...
...
src/pages/system/rules/index.jsx
View file @
b4746e93
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-02 1
1:00:31
* @Last Modified time: 2022-12-02 1
8:35:26
*/
import
*
as
React
from
'react'
;
...
...
@@ -24,7 +24,7 @@ function Rules(props) {
const
urlParams
=
{
save
:
'/base/bmNumberRule/save'
,
remove
:
'/
auth/sysFactory/delete
'
,
remove
:
'/
base/bmNumberRule/deleteByNoTypeId
'
,
list
:
'/base/bmNumberRule/queryList'
,
detail
:
'/base/bmNumberRule/queryByNoTypeId'
,
};
...
...
@@ -60,7 +60,8 @@ function Rules(props) {
setDrawer
((
s
)
=>
({
...
s
,
visible
:
true
,
item
:
row
,
detailpath
:
urlParams
.
detail
,
params
:
{
noTypeId
:
row
?.
id
},
title
:
'编辑'
,
val
:
'edit'
,
onFinish
:
async
(
vals
)
=>
{
...
...
@@ -154,10 +155,40 @@ function Rules(props) {
title
:
'新增'
,
val
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
1
);
let
params
=
{
...
vals
,
};
console
.
log
(
'vals:'
,
vals
);
// for (let i in vals)
{
// if (i == 'nrList')
{
// let reshow =
{
// value: vals[i].filter((it) => it.noRuleCode != 'increasing_order'),
// other: vals[i].filter((it) => it.noRuleCode == 'increasing_order')[0] ||
{},
//
};
// reshow.other.increaseList = reshow.other.increaseList.maps((it) =>
{
// return reshow.value.filter((item) => item.sort == it)[0].id;
//
});
// reshow.other.sort =
// reshow.other.sort == 1 ? reshow.other.sort : reshow.other.sort - 1;
// console.log('reshow', reshow);
//
}
//
}
params
.
nrList
=
[];
params
.
nrList
=
params
.
nrList
.
concat
(
vals
?.
nrList
.
value
);
if
(
vals
?.
nrList
.
other
.
sort
)
{
vals
.
nrList
.
other
.
increaseList
=
Array
.
from
(
Array
(
vals
?.
nrList
.
value
.
length
+
1
),
(
_
,
index
)
=>
index
+
1
,
).
filter
((
it
)
=>
it
!==
vals
?.
nrList
.
other
.
sort
+
1
);
params
.
nrList
.
splice
(
vals
?.
nrList
.
other
.
sort
,
0
,
vals
?.
nrList
.
other
);
params
.
nrList
.
forEach
((
it
,
i
)
=>
{
it
.
sort
=
i
+
1
;
});
}
else
{
message
.
warning
(
'请选择顺序递增规则的位置!'
);
return
;
}
console
.
log
(
'11111'
,
params
);
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
params
,
...
...
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