Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
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
ReactWeb5
CivManage
Commits
8a5d3601
Commit
8a5d3601
authored
Mar 21, 2023
by
涂伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '1.表结构升级功能添加2.已附加/未附加显示bug修复3.模板配置交互样式优化'
parent
92f71fbd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
107 additions
and
26 deletions
+107
-26
update.png
src/assets/font/omsfont/update.png
+0
-0
index.jsx
src/pages/bsmanager/base/tablemanager/index.jsx
+67
-3
AddModal.jsx
...ages/bsmanager/patrolMaintenance/maintenance/AddModal.jsx
+25
-20
AddModal.jsx
...s/bsmanager/patrolMaintenance/patrolFeedback/AddModal.jsx
+8
-3
tablemanager.js
src/services/tablemanager/tablemanager.js
+7
-0
No files found.
src/assets/font/omsfont/update.png
0 → 100644
View file @
8a5d3601
This diff was suppressed by a .gitattributes entry.
src/pages/bsmanager/base/tablemanager/index.jsx
View file @
8a5d3601
...
...
@@ -36,6 +36,7 @@ import {
FunnelPlotOutlined
,
BranchesOutlined
,
ToolOutlined
,
QuestionCircleTwoTone
,
}
from
'@ant-design/icons'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
...
...
@@ -46,6 +47,8 @@ import {
checkTableType
,
regroupTableType
,
GetDefaultTableFields
,
CheckUpgradeTable
,
UpgradeTable
,
}
from
'@/services/tablemanager/tablemanager'
;
import
{
useHistory
}
from
'react-router-dom'
;
import
{
Ellipse
}
from
'bizcharts/lib/g-components'
;
...
...
@@ -64,6 +67,7 @@ import styles from './index.less';
import
formDesign
from
'@/assets/font/omsfont/formDesign.svg'
;
import
tableDesign
from
'@/assets/font/omsfont/tableDesign.svg'
;
import
deleteSvg
from
'@/assets/font/omsfont/delete.svg'
;
import
update
from
'@/assets/font/omsfont/update.png'
;
const
{
Search
}
=
Input
;
const
{
Option
}
=
Select
;
const
placeholder
=
'请输入表名'
;
...
...
@@ -255,7 +259,11 @@ const TableManager = props => {
setSelectTableName
(
''
);
setPickIndex
(
0
);
setSelect
(
groupArr
[
0
].
type
);
setShowSearchStyle
(
true
);
if
(
!
text
)
{
setShowSearchStyle
(
false
);
}
else
{
setShowSearchStyle
(
true
);
}
};
const
getField
=
()
=>
{
loadUnattachedTables
().
then
(
res
=>
{
...
...
@@ -281,7 +289,7 @@ const TableManager = props => {
item
.
tableStyle
===
'大'
?
`一行三列/
${
item
.
labelStyle
?
`
${
item
.
labelStyle
}
布局`
:
'左右布局'
}
`
:
item
.
tableStyle
;
let
fieldCount
=
Number
(
item
.
fieldCount
);
let
fieldCount
=
Number
(
item
.
fieldCount
===
'(无)'
?
0
:
item
.
fieldCount
);
let
extraFieldCount
=
Number
(
item
.
extraFieldCount
===
'(无)'
?
0
:
item
.
extraFieldCount
,
);
...
...
@@ -413,6 +421,47 @@ const TableManager = props => {
setFieldConfigShow
(
true
);
};
const
updateForm
=
(
record
,
e
)
=>
{
e
.
stopPropagation
();
let
params
=
{
tableName
:
record
.
tableName
,
toTableType
:
record
.
groupName
===
'事件表'
||
record
.
groupName
===
'工单表'
?
'事件工单表'
:
record
.
groupName
,
};
CheckUpgradeTable
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
return
Modal
.
confirm
({
icon
:
<
QuestionCircleTwoTone
/>,
content
:
'确定要升级表结构吗?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onOk
:
()
=>
{
console
.
log
(
'确认了666666'
);
UpgradeTable
(
params
).
then
(
ress
=>
{
if
(
ress
.
code
===
0
)
{
message
.
success
(
'升级成功!'
);
loadTable
(
showSearchStyle
?
searchValue
:
''
);
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
ress
.
msg
,
});
}
});
},
});
}
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
,
});
});
};
const
columns
=
[
{
title
:
'名称'
,
...
...
@@ -420,7 +469,22 @@ const TableManager = props => {
key
:
'tableName'
,
width
:
400
,
render
:
(
text
,
record
)
=>
(
<
div
onClick=
{
e
=>
fieldsConfig
(
record
,
e
)
}
>
{
searchStyle
(
text
)
}
</
div
>
<
div
onClick=
{
e
=>
fieldsConfig
(
record
,
e
)
}
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
{
searchStyle
(
text
)
}
{
record
.
IsCanUpgrade
?
(
<
img
className=
{
styles
.
btnImg
}
alt=
""
title=
"升级表结构"
style=
{
{
marginLeft
:
'6px'
}
}
src=
{
update
}
onClick=
{
e
=>
updateForm
(
record
,
e
)
}
/>
)
:
null
}
</
div
>
),
},
{
...
...
src/pages/bsmanager/patrolMaintenance/maintenance/AddModal.jsx
View file @
8a5d3601
...
...
@@ -572,7 +572,7 @@ const AddModal = props => {
// 改变关联事件类型
const
onChangeEvent
=
(
e
,
i
)
=>
{
console
.
log
(
e
,
i
,
'666'
);
if
(
!
i
)
{
if
(
!
i
||
!
e
)
{
setKeepData
(
keep
);
formAdd
.
resetFields
();
}
...
...
@@ -680,7 +680,7 @@ const AddModal = props => {
return
(
<
Drawer
title=
"
巡维保计划
配置"
title=
"
模板
配置"
visible=
{
visible
}
destroyOnClose
width=
"600px"
...
...
@@ -922,29 +922,29 @@ const AddModal = props => {
<
Input
placeholder=
"请输入在线任务量"
/>
</
Item
>
</
Col
>
<
Col
span=
{
24
}
>
<
Item
label=
"
是否送审"
name=
"isSubmit"
labelCol=
{
{
span
:
5
}
}
>
<
Col
span=
{
12
}
>
<
Item
label=
"
自动派发"
name=
"autoAssign"
labelCol=
{
{
span
:
10
}
}
>
<
Switch
checkedChildren=
"是"
unCheckedChildren=
"否"
checked=
{
visibleChecked
}
onChange=
{
change
}
checked=
{
visibleChecked1
}
onChange=
{
change1
}
disabled=
{
autoFlag
}
/>
{
/* <Radio.Group defaultValue={chee}>
<Radio value="否">否</Radio>
<Radio value="是">是</Radio>
</Radio.Group> */
}
</
Item
>
</
Col
>
<
Col
span=
{
24
}
>
<
Item
label=
"
自动派发"
name=
"autoAssign"
labelCol=
{
{
span
:
5
}
}
>
<
Col
span=
{
12
}
>
<
Item
label=
"
是否送审"
name=
"isSubmit"
labelCol=
{
{
span
:
10
}
}
>
<
Switch
checkedChildren=
"是"
unCheckedChildren=
"否"
checked=
{
visibleChecked1
}
onChange=
{
change1
}
disabled=
{
autoFlag
}
checked=
{
visibleChecked
}
onChange=
{
change
}
/>
{
/* <Radio.Group defaultValue={chee}>
<Radio value="否">否</Radio>
<Radio value="是">是</Radio>
</Radio.Group> */
}
</
Item
>
</
Col
>
<
Col
span=
{
24
}
>
...
...
@@ -970,12 +970,17 @@ const AddModal = props => {
},
]
}
>
<
TextArea
placeholder=
"例如:and 泵房品牌='熊猫'(SQL表达式)
"
/>
<
Input
placeholder=
"例如:and 泵房品牌='熊猫'(SQL表达式)
"
/>
</
Item
>
</
Col
>
<
Col
span=
{
24
}
>
<
Item
label=
"关联事件"
name=
"relationEvent"
labelCol=
{
{
span
:
5
}
}
>
<
Select
placeholder=
"选择关联事件类型"
showSearch
onChange=
{
e
=>
onChangeEvent
(
e
)
}
>
<
Select
placeholder=
"选择关联事件类型"
showSearch
onChange=
{
e
=>
onChangeEvent
(
e
)
}
allowClear
>
{
eventData
?
eventData
.
map
((
item
,
index
)
=>
(
<
Option
key=
{
index
}
value=
{
item
}
>
...
...
@@ -987,12 +992,12 @@ const AddModal = props => {
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
span
style=
{
{
fontSize
:
'12px'
,
color
:
'#bfbcbc'
,
marginLeft
:
'
80
px'
}
}
>
<
span
style=
{
{
fontSize
:
'12px'
,
color
:
'#bfbcbc'
,
marginLeft
:
'
114
px'
}
}
>
当配置了关联事件后,可配置字段映射规则
</
span
>
<
br
/>
<
span
style=
{
{
fontSize
:
'12px'
,
color
:
'#bfbcbc'
,
marginLeft
:
'
80
px'
}
}
>
配置后,
巡维保发起的工单,可以传递该巡
维保任务信息
<
span
style=
{
{
fontSize
:
'12px'
,
color
:
'#bfbcbc'
,
marginLeft
:
'
114
px'
}
}
>
配置后,
设备维保发起的工单,可以传递该
维保任务信息
</
span
>
</
Col
>
<
Col
span=
{
4
}
/>
...
...
src/pages/bsmanager/patrolMaintenance/patrolFeedback/AddModal.jsx
View file @
8a5d3601
...
...
@@ -607,7 +607,7 @@ const AddModal = props => {
// 改变关联事件类型
const
onChangeEvent
=
(
e
,
i
)
=>
{
if
(
!
i
)
{
if
(
!
i
||
!
e
)
{
setKeepData
(
keep
);
formAdd
.
resetFields
();
}
...
...
@@ -832,7 +832,12 @@ const AddModal = props => {
</
Col
>
<
Col
span=
{
23
}
>
<
Item
label=
"关联事件"
name=
"relationEvent"
labelCol=
{
{
span
:
4
}
}
>
<
Select
placeholder=
"选择关联事件类型"
onChange=
{
e
=>
onChangeEvent
(
e
)
}
showSearch
>
<
Select
placeholder=
"选择关联事件类型"
onChange=
{
e
=>
onChangeEvent
(
e
)
}
showSearch
allowClear
>
{
eventData
?
eventData
.
map
((
item
,
index
)
=>
(
<
Option
key=
{
index
}
value=
{
item
}
>
...
...
@@ -849,7 +854,7 @@ const AddModal = props => {
</
span
>
<
br
/>
<
span
style=
{
{
fontSize
:
'12px'
,
color
:
'#bfbcbc'
,
marginLeft
:
'80px'
}
}
>
配置后,巡检发起的工单,可以传递该巡检任务信息
配置后,
管网
巡检发起的工单,可以传递该巡检任务信息
</
span
>
</
Col
>
<
Col
span=
{
4
}
/>
...
...
src/services/tablemanager/tablemanager.js
View file @
8a5d3601
...
...
@@ -85,3 +85,10 @@ export const GetDefaultTableFields = query =>
export
const
GetTableGroupMeta
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/AccountManage/GetTableGroupMeta`
,
param
);
// 升级表前类型检查
export
const
CheckUpgradeTable
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/CaseManage/CheckUpgradeTable`
,
param
);
// 升级表类型
export
const
UpgradeTable
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/CaseManage/UpgradeTable`
,
param
);
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