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
e74fae72
Commit
e74fae72
authored
Jan 10, 2023
by
左玲玲
😬
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://47.100.234.193:9527/wuhao/ems3.3
parents
5f10de68
f6f15a3b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
77 deletions
+76
-77
mtable.jsx
src/components/AutoTable/mtable.jsx
+75
-76
index.jsx
src/components/InitForm/Diyrule/index.jsx
+1
-1
No files found.
src/components/AutoTable/mtable.jsx
View file @
e74fae72
...
...
@@ -43,7 +43,6 @@ const Mtable = (props) => {
dataSource
,
}
=
props
;
console
.
log
(
'this is path:'
,
path
);
const
actionRefs
=
actionRef
??
useRef
(),
formRefs
=
formRef
??
useRef
(),
ifspagination
=
pagination
==
'false'
||
pagination
===
false
,
...
...
@@ -92,10 +91,10 @@ const Mtable = (props) => {
let
itemwidth
=
valueColumns
[
it
.
key
]?.
width
?
valueColumns
[
it
.
key
].
width
:
it
.
width
?
it
.
width
:
resizeable
?
160
:
'auto'
;
?
it
.
width
:
resizeable
?
160
:
'auto'
;
let
options
=
{};
if
([
'select'
,
'treeSelect'
,
'radio'
,
'checkbox'
,
'cascader'
].
includes
(
it
?.
valueType
))
{
if
(
Array
.
isArray
(
it
.
options
))
{
...
...
@@ -281,79 +280,79 @@ const Mtable = (props) => {
//缩放表格
const
handleResize
=
(
index
)
=>
(
e
,
{
size
})
=>
{
e
.
stopImmediatePropagation
();
setcolumnes
((
s
)
=>
{
const
nextColumns
=
[...
s
];
nextColumns
[
index
]
=
{
...
nextColumns
[
index
],
width
:
size
.
width
,
};
return
nextColumns
;
});
};
(
e
,
{
size
})
=>
{
e
.
stopImmediatePropagation
();
setcolumnes
((
s
)
=>
{
const
nextColumns
=
[...
s
];
nextColumns
[
index
]
=
{
...
nextColumns
[
index
],
width
:
size
.
width
,
};
return
nextColumns
;
});
};
//更新表格缩放
const
handleResizeStop
=
(
index
)
=>
(
e
,
{
size
})
=>
{
e
.
stopImmediatePropagation
();
let
submitdata
=
{
...
valueColumns
}
??
{},
curkey
=
Object
.
keys
(
submitdata
)[
index
];
submitdata
[
curkey
].
width
=
parseInt
(
size
.
width
);
setvalueColumns
(
submitdata
);
doFetch
({
url
:
'/ngic-base-business/paFieldScene/save'
,
params
:
{
sceneMark
:
activeTabKey
?
path
+
activeTabKey
:
path
,
controList
:
Object
.
keys
(
submitdata
).
map
((
it
,
i
)
=>
{
return
{
fieldKey
:
it
,
fieldWidth
:
i
==
index
?
parseInt
(
size
.
width
)
:
submitdata
[
it
].
width
,
fieldOrder
:
submitdata
[
it
].
order
,
fieldFixed
:
submitdata
[
it
].
fixed
,
fieldShow
:
submitdata
[
it
].
show
,
};
}),
},
});
};
(
e
,
{
size
})
=>
{
e
.
stopImmediatePropagation
();
let
submitdata
=
{
...
valueColumns
}
??
{},
curkey
=
Object
.
keys
(
submitdata
)[
index
];
submitdata
[
curkey
].
width
=
parseInt
(
size
.
width
);
setvalueColumns
(
submitdata
);
doFetch
({
url
:
'/ngic-base-business/paFieldScene/save'
,
params
:
{
sceneMark
:
activeTabKey
?
path
+
activeTabKey
:
path
,
controList
:
Object
.
keys
(
submitdata
).
map
((
it
,
i
)
=>
{
return
{
fieldKey
:
it
,
fieldWidth
:
i
==
index
?
parseInt
(
size
.
width
)
:
submitdata
[
it
].
width
,
fieldOrder
:
submitdata
[
it
].
order
,
fieldFixed
:
submitdata
[
it
].
fixed
,
fieldShow
:
submitdata
[
it
].
show
,
};
}),
},
});
};
const
components
=
resizeable
?
{
components
:
{
header
:
{
cell
:
Resizecell
,
components
:
{
header
:
{
cell
:
Resizecell
,
},
},
},
columnsState
:
{
value
:
valueColumns
,
onChange
:
(
val
,
state
)
=>
{
setvalueColumns
((
s
)
=>
{
let
submitdata
=
{
...
s
,
...
val
,
};
doFetch
({
url
:
'/ngic-base-business/paFieldScene/save'
,
params
:
{
sceneMark
:
activeTabKey
?
path
+
activeTabKey
:
path
,
controList
:
Object
.
keys
(
submitdata
).
map
((
it
)
=>
{
return
{
fieldKey
:
it
,
fieldWidth
:
submitdata
[
it
].
width
,
fieldOrder
:
submitdata
[
it
].
order
,
fieldFixed
:
submitdata
[
it
].
fixed
,
fieldShow
:
submitdata
[
it
].
show
,
};
}),
},
columnsState
:
{
value
:
valueColumns
,
onChange
:
(
val
,
state
)
=>
{
setvalueColumns
((
s
)
=>
{
let
submitdata
=
{
...
s
,
...
val
,
};
doFetch
({
url
:
'/ngic-base-business/paFieldScene/save'
,
params
:
{
sceneMark
:
activeTabKey
?
path
+
activeTabKey
:
path
,
controList
:
Object
.
keys
(
submitdata
).
map
((
it
)
=>
{
return
{
fieldKey
:
it
,
fieldWidth
:
submitdata
[
it
].
width
,
fieldOrder
:
submitdata
[
it
].
order
,
fieldFixed
:
submitdata
[
it
].
fixed
,
fieldShow
:
submitdata
[
it
].
show
,
};
}),
},
});
return
submitdata
;
});
return
submitdata
;
});
},
},
},
}
}
:
{};
const
datas
=
dataSource
?
{
dataSource
,
toolBarRender
:
false
}
:
{
request
};
...
...
@@ -402,19 +401,19 @@ const Mtable = (props) => {
scroll=
{
x
?
{
x
:
x
,
}
x
:
x
,
}
:
{}
}
pagination=
{
pagination
?
{
showTotal
:
(
total
,
range
)
=>
<
span
>
共
{
total
}
条
</
span
>,
showQuickJumper
:
true
,
showSizeChanger
:
true
,
pageSizeOptions
:
[
5
,
10
,
15
,
30
,
50
,
100
,
200
],
defaultPageSize
:
pageSize
||
15
,
}
showTotal
:
(
total
,
range
)
=>
<
span
>
共
{
total
}
条
</
span
>,
showQuickJumper
:
true
,
showSizeChanger
:
true
,
pageSizeOptions
:
[
5
,
10
,
15
,
30
,
50
,
100
,
200
],
defaultPageSize
:
pageSize
||
15
,
}
:
false
}
search=
{
{
...
...
src/components/InitForm/Diyrule/index.jsx
View file @
e74fae72
...
...
@@ -517,7 +517,7 @@ let Diyrule = (props) => {
options=
{
Object
.
keys
(
Array
.
apply
(
null
,
{
length
:
value
?
value
.
length
:
0
})).
map
(
(
it
,
i
)
=>
({
label
:
`第${i + 1}个`
,
value
:
i
+
2
,
value
:
i
+
1
,
}),
)
}
onChange=
{
(
val
)
=>
{
...
...
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