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
13f218bc
Commit
13f218bc
authored
May 20, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '组态平台接口翻新'
parent
0a64e8b6
Pipeline
#50850
skipped with stages
Changes
17
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
433 additions
and
196 deletions
+433
-196
fieldEditor.jsx
...s/bsmanager/base/tablemanager/filedConfig/fieldEditor.jsx
+81
-80
filedConfig.jsx
...s/bsmanager/base/tablemanager/filedConfig/filedConfig.jsx
+2
-2
importModal.jsx
src/pages/dataCenter/dictionary/importModal.jsx
+3
-3
AddModal.jsx
...ormCenter/baseFrameContainer/drawBoardManage/AddModal.jsx
+6
-6
AddTemplate.jsx
...Center/baseFrameContainer/drawBoardManage/AddTemplate.jsx
+12
-13
AssociationModel.jsx
...r/baseFrameContainer/drawBoardManage/AssociationModel.jsx
+164
-0
ChildAddTemplate.jsx
...r/baseFrameContainer/drawBoardManage/ChildAddTemplate.jsx
+15
-15
DrawBoardManage.jsx
...er/baseFrameContainer/drawBoardManage/DrawBoardManage.jsx
+0
-0
EditModal.jsx
...rmCenter/baseFrameContainer/drawBoardManage/EditModal.jsx
+5
-4
EditTemplate.jsx
...enter/baseFrameContainer/drawBoardManage/EditTemplate.jsx
+13
-13
ImportModal.jsx
...Center/baseFrameContainer/drawBoardManage/ImportModal.jsx
+9
-4
addForm.less
src/pages/productCenter/mobileConfig/menuconfig/addForm.less
+55
-11
editForm.jsx
src/pages/productCenter/mobileConfig/menuconfig/editForm.jsx
+0
-0
miniMenu.jsx
src/pages/productCenter/mobileConfig/menuconfig/miniMenu.jsx
+28
-4
editForm.jsx
src/pages/productCenter/webConfig/menuconfig/editForm.jsx
+2
-0
api.js
src/services/drawBoardManage/api.js
+21
-15
api.js
src/services/mobileConfig/api.js
+17
-26
No files found.
src/pages/bsmanager/base/tablemanager/filedConfig/fieldEditor.jsx
View file @
13f218bc
...
...
@@ -199,88 +199,89 @@ const AddModal = props => {
};
useEffect
(()
=>
{
console
.
log
(
isVisible
);
// 用于判断分组名与字段名重复时提示当前未选中字段
if
(
keepTreeFirst
.
indexOf
(
itemData
.
name
)
!=
-
1
&&
itemData
.
children
)
{
setShow
(
'none'
);
}
else
{
setShow
(
'block'
);
}
setTreeValue
(
treeData
);
setValueData
([]);
setExpendKey
(
itemData
.
ID
);
setCurrentSelectOrg
(
itemData
.
ID
);
console
.
log
(
treeData
);
if
(
isType
!=
''
)
{
let
req1
=
getField
({
fieldID
:
itemData
.
ID
});
let
req2
=
loadTableFields
({
tableName
:
formObj1
});
let
req3
=
LoadEventType
({});
Promise
.
all
([
req1
,
req2
,
req3
]).
then
(
res
=>
{
res
[
1
].
msg
===
'Ok'
&&
setFieldName
(
res
[
1
].
data
.
root
);
res
[
2
].
msg
===
'Ok'
&&
setEventList
(
res
[
2
].
data
.
root
);
if
(
res
[
0
].
msg
===
'Ok'
)
{
form
.
setFieldsValue
({
...
res
[
0
].
data
.
root
});
if
(
res
[
0
].
data
.
root
.
ExceptionEventFields
===
''
)
{
setCharacterValue
(
''
);
setCheckedList
([]);
setIsShow
(
false
);
}
else
{
setIsShow
(
true
);
setCharacterValue
(
res
[
0
].
data
.
root
.
ExceptionEventFields
);
setCheckedList
(
res
[
0
].
data
.
root
.
ExceptionEventFields
.
split
(
','
));
}
setShape
(
res
[
0
].
data
.
root
.
Shape
);
let
coordinates
=
false
,
picture
=
false
,
must
=
false
;
switch
(
res
[
0
].
data
.
root
.
Shape
)
{
case
'坐标控件'
:
res
[
0
].
data
.
root
.
Config
===
'当前坐标'
?
(
coordinates
=
true
)
:
(
coordinates
=
false
);
break
;
case
'图片'
:
case
'可预览图片'
:
res
[
0
].
data
.
root
.
Preset
===
'拍照相册'
?
(
picture
=
true
)
:
(
picture
=
false
);
res
[
0
].
data
.
root
.
ValidationRule
===
'required'
?
(
must
=
true
)
:
(
must
=
false
);
break
;
case
'编码'
:
let
code
=
res
[
0
].
data
.
root
.
Config
.
split
(
'.'
);
form
.
setFieldsValue
({
code
:
code
[
0
]
||
''
,
prefix
:
code
[
1
]
===
'undefined'
?
''
:
code
[
1
],
});
break
;
}
setPramData
({
...
res
[
0
].
data
.
root
,
coordinates
,
must
,
picture
});
if
(
res
[
0
].
data
.
root
.
Shape
==
'多行文本'
||
res
[
0
].
data
.
root
.
Shape
==
'附件'
||
res
[
0
].
data
.
root
.
Shape
==
'可预览附件'
||
res
[
0
].
data
.
root
.
Shape
==
'图片'
||
res
[
0
].
data
.
root
.
Shape
==
'可预览图片'
||
res
[
0
].
data
.
root
.
Shape
==
'录音'
||
res
[
0
].
data
.
root
.
Shape
==
'视频'
)
{
form
.
setFieldsValue
({
RowSpan
:
6
});
}
else
{
if
(
pramData
.
RowSpan
)
{
form
.
setFieldsValue
({
RowSpan
:
res
[
0
].
data
.
root
.
RowSpan
});
if
(
isVisible
)
{
// 用于判断分组名与字段名重复时提示当前未选中字段
if
(
keepTreeFirst
.
indexOf
(
itemData
.
name
)
!=
-
1
&&
itemData
.
children
)
{
setShow
(
'none'
);
}
else
{
setShow
(
'block'
);
}
setTreeValue
(
treeData
);
setValueData
([]);
setExpendKey
(
itemData
.
ID
);
setCurrentSelectOrg
(
itemData
.
ID
);
console
.
log
(
treeData
);
if
(
isType
!=
''
)
{
let
req1
=
getField
({
fieldID
:
itemData
.
ID
});
let
req2
=
loadTableFields
({
tableName
:
formObj1
});
let
req3
=
LoadEventType
({});
Promise
.
all
([
req1
,
req2
,
req3
]).
then
(
res
=>
{
res
[
1
].
msg
===
'Ok'
&&
setFieldName
(
res
[
1
].
data
.
root
);
res
[
2
].
msg
===
'Ok'
&&
setEventList
(
res
[
2
].
data
.
root
);
if
(
res
[
0
].
msg
===
'Ok'
)
{
form
.
setFieldsValue
({
...
res
[
0
].
data
.
root
});
if
(
res
[
0
].
data
.
root
.
ExceptionEventFields
===
''
)
{
setCharacterValue
(
''
);
setCheckedList
([]);
setIsShow
(
false
);
}
else
{
setIsShow
(
true
);
setCharacterValue
(
res
[
0
].
data
.
root
.
ExceptionEventFields
);
setCheckedList
(
res
[
0
].
data
.
root
.
ExceptionEventFields
.
split
(
','
));
}
form
.
setFieldsValue
({
RowSpan
:
1
});
}
console
.
log
(
pramData
);
// 清空表单数据
if
(
isVisible
==
false
)
{
console
.
log
(
123
);
setPramData
([]);
form
.
resetFields
();
setShape
(
res
[
0
].
data
.
root
.
Shape
);
let
coordinates
=
false
,
picture
=
false
,
must
=
false
;
switch
(
res
[
0
].
data
.
root
.
Shape
)
{
case
'坐标控件'
:
res
[
0
].
data
.
root
.
Config
===
'当前坐标'
?
(
coordinates
=
true
)
:
(
coordinates
=
false
);
break
;
case
'图片'
:
case
'可预览图片'
:
res
[
0
].
data
.
root
.
Preset
===
'拍照相册'
?
(
picture
=
true
)
:
(
picture
=
false
);
res
[
0
].
data
.
root
.
ValidationRule
===
'required'
?
(
must
=
true
)
:
(
must
=
false
);
break
;
case
'编码'
:
let
code
=
res
[
0
].
data
.
root
.
Config
.
split
(
'.'
);
form
.
setFieldsValue
({
code
:
code
[
0
]
||
''
,
prefix
:
code
[
1
]
===
'undefined'
?
''
:
code
[
1
],
});
break
;
}
setPramData
({
...
res
[
0
].
data
.
root
,
coordinates
,
must
,
picture
});
if
(
res
[
0
].
data
.
root
.
Shape
==
'多行文本'
||
res
[
0
].
data
.
root
.
Shape
==
'附件'
||
res
[
0
].
data
.
root
.
Shape
==
'可预览附件'
||
res
[
0
].
data
.
root
.
Shape
==
'图片'
||
res
[
0
].
data
.
root
.
Shape
==
'可预览图片'
||
res
[
0
].
data
.
root
.
Shape
==
'录音'
||
res
[
0
].
data
.
root
.
Shape
==
'视频'
)
{
form
.
setFieldsValue
({
RowSpan
:
6
});
}
else
{
if
(
pramData
.
RowSpan
)
{
form
.
setFieldsValue
({
RowSpan
:
res
[
0
].
data
.
root
.
RowSpan
});
}
form
.
setFieldsValue
({
RowSpan
:
1
});
}
console
.
log
(
pramData
);
// 清空表单数据
let
index
=
res
[
2
].
data
.
root
.
find
(
item
=>
{
return
item
.
Name
==
res
[
0
].
data
.
root
.
ExceptionEvent
;
});
console
.
log
(
index
);
getFieldData
(
index
.
TableName
);
}
let
index
=
res
[
2
].
data
.
root
.
find
(
item
=>
{
return
item
.
Name
==
res
[
0
].
data
.
root
.
ExceptionEvent
;
});
console
.
log
(
index
);
getFieldData
(
index
.
TableName
);
}
});
});
}
}
else
{
setPramData
([]);
form
.
resetFields
();
}
},
[
isVisible
]);
...
...
src/pages/bsmanager/base/tablemanager/filedConfig/filedConfig.jsx
View file @
13f218bc
...
...
@@ -260,7 +260,7 @@ const AddModal = props => {
<
span
/>
)
:
(
<>
<
Tooltip
title=
"修改"
>
{
/*
<Tooltip title="修改">
<EditOutlined
style={{ fontSize: '16px', color: '#1890FF' }}
onClick={() => {
...
...
@@ -269,7 +269,7 @@ const AddModal = props => {
>
编辑
</EditOutlined>
</
Tooltip
>
</Tooltip>
*/
}
<
div
onClick=
{
e
=>
e
.
stopPropagation
()
}
>
<
Popconfirm
title=
"是否删除该字段?"
...
...
src/pages/dataCenter/dictionary/importModal.jsx
View file @
13f218bc
...
...
@@ -3,7 +3,7 @@
* @Description:
* @Author: leizhe
* @Date: 2022-04-11 18:12:39
* @LastEditTime: 2022-05-
19 17:31:42
* @LastEditTime: 2022-05-
20 15:25:04
* @LastEditors: leizhe
*/
import
React
,
{
useEffect
,
useState
}
from
'react'
;
...
...
@@ -74,8 +74,8 @@ const importModal = props => {
const
title1
=
(
<>
<
span
>
导入数据
</
span
>
<
span
style=
{
{
color
:
'rgb(24, 144, 255)'
}
}
>
(
覆盖导入
)
</
span
>
<
span
>
覆盖
导入数据
</
span
>
<
span
style=
{
{
color
:
'rgb(24, 144, 255)'
}
}
>
(
不支持导入从老运维导出的数据
)
</
span
>
</>
);
return
(
...
...
src/pages/platformCenter/baseFrameContainer/drawBoardManage/AddModal.jsx
View file @
13f218bc
...
...
@@ -2,7 +2,7 @@
* @Description:
* @Author: leizhe
* @Date: 2022-04-07 10:23:26
* @LastEditTime: 2022-0
4-11 17:06:39
* @LastEditTime: 2022-0
5-20 14:19:53
* @LastEditors: leizhe
*/
import
React
,
{
useEffect
}
from
'react'
;
...
...
@@ -10,7 +10,7 @@ import { Modal, Form, Input, notification, message } from 'antd';
import
{
Save
}
from
'@/services/drawBoardManage/api'
;
const
AddModal
=
props
=>
{
const
{
visible
,
onCancel
,
updateTrees
}
=
props
;
const
{
visible
,
onCancel
,
callBackSubmit
=
()
=>
{}
}
=
props
;
const
[
addForm
]
=
Form
.
useForm
();
useEffect
(()
=>
{
...
...
@@ -20,20 +20,20 @@ const AddModal = props => {
const
submitAdd
=
()
=>
{
console
.
log
(
addForm
.
getFieldValue
().
name
);
if
(
addForm
.
getFieldValue
().
name
)
{
Save
({
n
ame
:
addForm
.
getFieldValue
().
name
})
Save
({
modelTypeN
ame
:
addForm
.
getFieldValue
().
name
})
.
then
(
res
=>
{
if
(
res
.
statusCode
===
'0000'
)
{
if
(
res
.
code
===
0
)
{
callBackSubmit
(
addForm
.
getFieldValue
(
'name'
));
onCancel
();
notification
.
success
({
message
:
'提交成功'
,
duration
:
2
,
});
// 重新获取机构树与用户表
updateTrees
();
}
else
{
notification
.
error
({
message
:
'提交失败'
,
description
:
res
.
errM
sg
,
description
:
res
.
m
sg
,
});
}
})
...
...
src/pages/platformCenter/baseFrameContainer/drawBoardManage/AddTemplate.jsx
View file @
13f218bc
...
...
@@ -3,7 +3,7 @@
* @Description:
* @Author: leizhe
* @Date: 2022-04-07 10:23:26
* @LastEditTime: 2022-0
4-14 19:52:2
8
* @LastEditTime: 2022-0
5-19 18:41:3
8
* @LastEditors: leizhe
*/
import
React
,
{
useEffect
,
useState
}
from
'react'
;
...
...
@@ -42,29 +42,28 @@ const AddTemplate = props => {
const
submitAdd
=
()
=>
{
addTemplateForm
.
validateFields
().
then
(
validate
=>
{
if
(
validate
)
{
let
aa
=
{};
aa
.
width
=
addTemplateForm
.
getFieldsValue
().
imageWidth
.
toString
();
aa
.
height
=
addTemplateForm
.
getFieldsValue
().
imageHeight
.
toString
();
let
width
=
addTemplateForm
.
getFieldsValue
().
imageWidth
.
toString
();
let
height
=
addTemplateForm
.
getFieldsValue
().
imageHeight
.
toString
();
const
formData
=
new
FormData
();
formData
.
append
(
'
Name'
,
addTemplateForm
.
getFieldsValue
().
Nam
e
);
formData
.
append
(
'Type'
,
selectValue
);
formData
.
append
(
'
Dimension'
,
'二维'
);
formData
.
append
(
'
Size'
,
JSON
.
stringify
(
aa
)
);
formData
.
append
(
'
ModelName'
,
addTemplateForm
.
getFieldsValue
().
ModelFil
e
);
formData
.
append
(
'
Model
Type'
,
selectValue
);
formData
.
append
(
'
width'
,
width
);
formData
.
append
(
'
height'
,
height
);
formData
.
append
(
'ModelFile'
,
file
);
console
.
log
(
formData
);
SaveUpload
(
formData
).
then
(
res
=>
{
if
(
res
.
statusCode
===
'0000'
)
{
if
(
res
.
code
===
0
)
{
callBackSubmit
();
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
info
,
description
:
res
.
msg
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
errM
sg
,
description
:
res
.
m
sg
,
});
}
});
...
...
@@ -151,7 +150,7 @@ const AddTemplate = props => {
},
]
}
>
<
Input
placeholder=
"仅支持png和svg格式"
/>
<
Input
placeholder=
"仅支持png和svg格式"
disabled
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
7
}
>
...
...
@@ -163,7 +162,7 @@ const AddTemplate = props => {
</
Col
>
</
Row
>
<
Form
.
Item
label=
"模型名称"
name=
"Name"
>
<
Input
placeholder=
"
请输入菜单组名称"
/>
<
Input
placeholder=
"
菜单组名称"
disabled
/>
</
Form
.
Item
>
<
Row
>
<
Col
span=
{
13
}
>
...
...
src/pages/platformCenter/baseFrameContainer/drawBoardManage/AssociationModel.jsx
0 → 100644
View file @
13f218bc
/* eslint-disable prefer-template */
/* eslint-disable indent */
/*
* @Description:
* @Author: leizhe
* @Date: 2022-05-17 10:26:35
* @LastEditTime: 2022-05-20 09:38:44
* @LastEditors: leizhe
*/
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Modal
,
Form
,
Input
,
notification
,
Button
,
Select
,
Space
,
Image
}
from
'antd'
;
import
{
UpdateParentId
,
modelManageListAll
}
from
'@/services/drawBoardManage/api'
;
const
{
Option
}
=
Select
;
const
AssociationModel
=
props
=>
{
const
{
visible
,
onCancel
,
obj
,
callBackSubmit
=
()
=>
{}
}
=
props
;
const
{
Item
}
=
Form
;
const
[
form
]
=
Form
.
useForm
();
const
[
data
,
setData
]
=
useState
([]);
const
[
imageData
,
setImgData
]
=
useState
(
''
);
useEffect
(()
=>
{
console
.
log
(
obj
);
if
(
visible
)
{
modelManageListAll
({
modelName
:
''
,
modelType
:
''
,
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
data
.
length
>
0
)
{
let
aa
=
[];
res
.
data
.
map
(
i
=>
{
aa
.
push
(
i
);
});
let
bb
=
aa
;
console
.
log
(
bb
);
console
.
log
(
obj
);
if
(
bb
&&
bb
.
length
>
0
)
{
if
(
obj
.
RelModel
!=
0
)
{
bb
.
splice
(
bb
.
findIndex
(
item
=>
item
.
ID
===
obj
.
RelModel
),
1
);
}
else
{
bb
.
splice
(
bb
.
findIndex
(
item
=>
item
.
ID
===
obj
.
ID
),
1
);
}
bb
.
map
(
i
=>
{
if
(
i
.
children
&&
i
.
children
.
length
>
0
)
{
delete
i
.
children
;
}
});
console
.
log
(
bb
);
setData
(
bb
);
}
}
}
});
}
else
{
form
.
resetFields
();
setImgData
(
''
);
setData
(
''
);
}
},
[
visible
]);
const
onSubmit
=
()
=>
{
form
.
validateFields
().
then
(
validate
=>
{
if
(
validate
)
{
let
obj1
=
form
.
getFieldsValue
();
let
aa
=
[];
aa
.
push
(
obj
.
ID
);
UpdateParentId
({
modelIds
:
aa
,
parentId
:
obj1
.
Name
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
callBackSubmit
();
onCancel
();
notification
.
success
({
message
:
'关联成功'
,
duration
:
2
,
});
}
else
{
notification
.
error
({
message
:
'关联失败'
,
description
:
res
.
msg
,
});
}
});
}
});
};
const
handleChange
=
e
=>
{
console
.
log
(
e
);
console
.
log
(
data
);
let
aa
=
data
.
find
(
i
=>
i
.
ID
===
e
);
console
.
log
(
aa
);
setImgData
(
aa
.
Path
);
};
return
(
<
Modal
title=
"关联父模型"
visible=
{
visible
}
onCancel=
{
onCancel
}
destroyOnClose
width=
"600px"
footer=
{
<
Space
>
<
Button
onClick=
{
onSubmit
}
type=
"primary"
>
确定
</
Button
>
</
Space
>
}
>
<
Form
form=
{
form
}
style=
{
{
overflowY
:
'scroll'
}
}
>
<
Item
labelCol=
{
{
span
:
8
}
}
name=
"Name"
rules=
{
[
{
required
:
true
,
message
:
'请选择父模型'
,
},
]
}
>
<
Select
style=
{
{
width
:
'100%'
}
}
placeholder=
"选择父模型"
optionLabelProp=
"label"
onChange=
{
handleChange
}
optionFilterProp=
"label"
showSearch
>
{
data
.
length
?
data
.
map
((
item
,
index
)
=>
(
<>
<
Option
value=
{
item
.
ID
}
label=
{
item
.
ModelName
}
>
<
div
className=
"demo-option-label-item"
>
{
item
.
ModelName
}
<
span
role=
"img"
aria
-
label=
{
item
.
ModelTypeName
}
>
(
{
item
.
ModelTypeName
}
)
</
span
>
</
div
>
</
Option
>
</>
))
:
''
}
</
Select
>
</
Item
>
<
Item
>
{
imageData
==
''
?
(
<></>
)
:
(
<
Image
src=
{
window
.
location
.
origin
+
`/Publish/Web/File/ModelManage/ModelFilePreview/${encodeURIComponent(imageData)}`
}
height=
"60px"
/>
)
}
</
Item
>
</
Form
>
</
Modal
>
);
};
export
default
AssociationModel
;
src/pages/platformCenter/baseFrameContainer/drawBoardManage/ChildAddTemplate.jsx
View file @
13f218bc
...
...
@@ -3,7 +3,7 @@
* @Description:
* @Author: leizhe
* @Date: 2022-04-07 10:23:26
* @LastEditTime: 2022-0
4-14 19:58:49
* @LastEditTime: 2022-0
5-20 09:45:00
* @LastEditors: leizhe
*/
import
React
,
{
useEffect
,
useState
}
from
'react'
;
...
...
@@ -34,36 +34,36 @@ const ChildAddTemplate = props => {
useEffect
(()
=>
{
console
.
log
(
obj
);
addTemplateForm
.
resetFields
();
addTemplateForm
.
setFieldsValue
({
Type
:
obj
.
t
ypeName
});
addTemplateForm
.
setFieldsValue
({
Type
:
obj
.
ModelT
ypeName
});
},
[
visible
]);
const
submitAdd
=
()
=>
{
addTemplateForm
.
validateFields
().
then
(
validate
=>
{
if
(
validate
)
{
let
aa
=
{};
aa
.
width
=
addTemplateForm
.
getFieldsValue
().
imageWidth
.
toString
();
aa
.
height
=
addTemplateForm
.
getFieldsValue
().
imageHeight
.
toString
();
let
width
=
addTemplateForm
.
getFieldsValue
().
imageWidth
.
toString
();
let
height
=
addTemplateForm
.
getFieldsValue
().
imageHeight
.
toString
();
const
formData
=
new
FormData
();
formData
.
append
(
'Name'
,
addTemplateForm
.
getFieldsValue
().
Name
);
formData
.
append
(
'Type'
,
addTemplateForm
.
getFieldsValue
().
Type
);
formData
.
append
(
'Dimension'
,
'二维'
);
formData
.
append
(
'Size'
,
JSON
.
stringify
(
aa
));
formData
.
append
(
'ModelName'
,
addTemplateForm
.
getFieldsValue
().
ModelFile
);
formData
.
append
(
'ModelType'
,
addTemplateForm
.
getFieldsValue
().
Type
);
// formData.append('Size', JSON.stringify(aa));
formData
.
append
(
'width'
,
width
);
formData
.
append
(
'height'
,
height
);
formData
.
append
(
'ModelFile'
,
file
);
formData
.
append
(
'RelModel'
,
obj
.
id
);
formData
.
append
(
'RelModel'
,
obj
.
ID
);
console
.
log
(
formData
);
SaveUpload
(
formData
).
then
(
res
=>
{
if
(
res
.
statusCode
===
'0000'
)
{
if
(
res
.
code
===
0
)
{
callBackSubmit
();
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
info
,
description
:
res
.
msg
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
errM
sg
,
description
:
res
.
m
sg
,
});
}
});
...
...
@@ -150,7 +150,7 @@ const ChildAddTemplate = props => {
},
]
}
>
<
Input
/>
<
Input
disabled
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
7
}
>
...
...
@@ -162,7 +162,7 @@ const ChildAddTemplate = props => {
</
Col
>
</
Row
>
<
Form
.
Item
label=
"模型名称"
name=
"Name"
>
<
Input
placeholder=
"请输入菜单组名称"
/>
<
Input
placeholder=
"请输入菜单组名称"
disabled
/>
</
Form
.
Item
>
<
Row
>
<
Col
span=
{
13
}
>
...
...
src/pages/platformCenter/baseFrameContainer/drawBoardManage/DrawBoardManage.jsx
View file @
13f218bc
This diff is collapsed.
Click to expand it.
src/pages/platformCenter/baseFrameContainer/drawBoardManage/EditModal.jsx
View file @
13f218bc
...
...
@@ -2,7 +2,7 @@
* @Description:
* @Author: leizhe
* @Date: 2022-04-07 10:23:26
* @LastEditTime: 2022-0
4-11 16:24:40
* @LastEditTime: 2022-0
5-20 09:30:13
* @LastEditors: leizhe
*/
import
React
,
{
useEffect
}
from
'react'
;
...
...
@@ -10,7 +10,7 @@ import { Modal, Form, Input, notification, message } from 'antd';
import
{
UpdateModelType
}
from
'@/services/drawBoardManage/api'
;
const
EditModal
=
props
=>
{
const
{
visible
,
onCancel
,
updateTrees
,
changeObj
}
=
props
;
const
{
visible
,
onCancel
,
changeObj
,
callBackSubmit
=
()
=>
{}
}
=
props
;
const
[
addForm
]
=
Form
.
useForm
();
useEffect
(()
=>
{
...
...
@@ -18,18 +18,19 @@ const EditModal = props => {
},
[
visible
]);
const
submitEdit
=
()
=>
{
console
.
log
(
changeObj
);
console
.
log
(
addForm
.
getFieldValue
(
'name'
));
if
(
addForm
.
getFieldValue
(
'name'
))
{
UpdateModelType
({
model
Name
:
addForm
.
getFieldValue
(
'name'
),
modelId
:
changeObj
.
id
})
UpdateModelType
({
model
TypeName
:
addForm
.
getFieldValue
(
'name'
),
id
:
changeObj
.
ID
})
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
callBackSubmit
(
addForm
.
getFieldValue
(
'name'
));
onCancel
();
notification
.
success
({
message
:
'提交成功'
,
duration
:
2
,
});
// 重新获取机构树与用户表
updateTrees
();
}
else
{
notification
.
error
({
message
:
'提交失败'
,
...
...
src/pages/platformCenter/baseFrameContainer/drawBoardManage/EditTemplate.jsx
View file @
13f218bc
...
...
@@ -26,10 +26,10 @@ const EditTemplate = props => {
addTemplateForm
.
resetFields
();
console
.
log
(
pickItem
);
console
.
log
(
obj
);
if
(
obj
.
model
Path
)
{
let
index
=
obj
.
model
Path
.
lastIndexOf
(
'
\
\'
);
let ab = obj.
modelPath.substring(index + 1, obj.model
Path.length);
let a = JSON.parse(obj.
size
);
if
(
obj
.
Path
)
{
let
index
=
obj
.
Path
.
lastIndexOf
(
'
\
\'
);
let ab = obj.
Path.substring(index + 1, obj.
Path.length);
let a = JSON.parse(obj.
Json
);
console.log(a);
let aa;
let bb;
...
...
@@ -43,8 +43,8 @@ const EditTemplate = props => {
}
}
addTemplateForm.setFieldsValue({
Name: obj.
n
ame,
Type: obj.
t
ypeName,
Name: obj.
ModelN
ame,
Type: obj.
ModelT
ypeName,
ModelFile: ab,
imageWidth: aa,
imageHeight: bb,
...
...
@@ -61,11 +61,11 @@ const EditTemplate = props => {
console.log(aa);
console.log(file);
const formData = new FormData();
formData.append('
ModelName
', addTemplateForm.getFieldsValue().
Nam
e);
formData.append('
ModelType
', obj.
t
ypeName);
formData.append('
ModelName
', addTemplateForm.getFieldsValue().
ModelFil
e);
formData.append('
ModelType
', obj.
ModelT
ypeName);
formData.append('
width
', aa.width);
formData.append('
height
', aa.height);
formData.append('
ID
', obj.
id
);
formData.append('
ID
', obj.
ID
);
formData.append('
ModelFile
', file);
// if (obj.realModal != 0) {
// formData.append('
RelModel
', obj.realModel);
...
...
@@ -77,13 +77,13 @@ const EditTemplate = props => {
notification.success({
message: '
提示
',
duration: 3,
description: res.
info
,
description: res.
msg
,
});
} else {
notification.error({
message: '
提示
',
duration: 3,
description: res.
errM
sg,
description: res.
m
sg,
});
}
});
...
...
@@ -111,7 +111,7 @@ const EditTemplate = props => {
imageWidth: `${image.width}px`,
imageHeight: `${image.height}px`,
ModelFile: file.name,
//
Name: file.name.substring(0, file.name.lastIndexOf('
.
')),
Name: file.name.substring(0, file.name.lastIndexOf('
.
')),
});
};
// };
...
...
@@ -169,7 +169,7 @@ const EditTemplate = props => {
},
]}
>
<Input placeholder="仅支持png和svg格式" />
<Input placeholder="仅支持png和svg格式"
disabled
/>
</Form.Item>
</Col>
<Col span={7}>
...
...
src/pages/platformCenter/baseFrameContainer/drawBoardManage/ImportModal.jsx
View file @
13f218bc
...
...
@@ -2,7 +2,7 @@
* @Description:
* @Author: leizhe
* @Date: 2022-04-11 18:12:39
* @LastEditTime: 2022-0
4-14 15:57:18
* @LastEditTime: 2022-0
5-19 17:28:25
* @LastEditors: leizhe
*/
import
React
,
{
useEffect
,
useState
}
from
'react'
;
...
...
@@ -13,8 +13,10 @@ const ImportModal = props => {
const
{
visible
,
onCancel
,
callBackSubmit
=
()
=>
{}
}
=
props
;
const
[
addForm
]
=
Form
.
useForm
();
const
[
file
,
setFile
]
=
useState
(
''
);
const
[
load
,
setLoad
]
=
useState
(
false
);
// 提交加载
useEffect
(()
=>
{
setLoad
(
false
);
addForm
.
resetFields
();
},
[
visible
]);
...
...
@@ -32,22 +34,24 @@ const ImportModal = props => {
const
importData
=
()
=>
{
addForm
.
validateFields
().
then
(
validate
=>
{
if
(
validate
)
{
setLoad
(
true
);
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
file
);
Import
(
formData
).
then
(
res
=>
{
if
(
res
.
statusCode
===
'0000'
)
{
setLoad
(
false
);
if
(
res
.
code
===
0
)
{
callBackSubmit
();
addForm
.
resetFields
();
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
info
,
description
:
res
.
msg
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
errM
sg
,
description
:
res
.
m
sg
,
});
}
});
...
...
@@ -61,6 +65,7 @@ const ImportModal = props => {
onCancel=
{
onCancel
}
destroyOnClose
onOk=
{
importData
}
confirmLoading=
{
load
}
afterClose=
{
()
=>
{
addForm
.
resetFields
();
}
}
...
...
src/pages/productCenter/mobileConfig/menuconfig/addForm.less
View file @
13f218bc
.formStyle{
margin-bottom: 40px;
padding-bottom: 30px;
// height: 100%;
// overflow-y: scroll;
}
.formbtn{
.formbtn {
position: fixed;
bottom: 40px;
right:
40%
right:
40%;
}
.divbox{
.divbox
{
height: 100%;
overflow: hidden;
}
\ No newline at end of file
}
.formStyle {
margin-bottom: 40px;
padding-bottom: 30px;
}
.rolebox {
display: flex;
justify-content: space-between;
flex-wrap: nowrap;
}
.cardItemData {
display: flex;
justify-content: space-around;
width: 100%;
padding: 1rem;
border: 1px solid #b5b8c8;
margin-bottom: 1rem;
overflow-x: scroll;
}
.divBox {
// display: flex;
width: 100%;
flex-wrap: wrap;
border: 1px solid #c2cdfd;
border-radius: 5px;
margin-top: 20px;
min-height: 50px;
padding: 0 10px 10px 20px;
.ant-checkbox-wrapper {
background-color: #fff;
}
.topCheckbox {
height: 20px;
margin: -10px 0 0 0px;
line-height: 20px;
}
.topCheckbox > label :hover {
font-weight: 600;
}
.checkdiv {
display: flex;
flex-wrap: wrap;
// margin-left: 20px;
// justify-content: space-between;
}
}
.boe {
border: 1px solid #d9d9d9;
width: 100%;
}
src/pages/productCenter/mobileConfig/menuconfig/editForm.jsx
View file @
13f218bc
This diff is collapsed.
Click to expand it.
src/pages/productCenter/mobileConfig/menuconfig/miniMenu.jsx
View file @
13f218bc
...
...
@@ -24,6 +24,7 @@ import Tree from '@/components/ExpendableTree';
import
AddForm
from
'./AddForm'
;
import
EditForm
from
'./editForm'
;
import
CheckList
from
'./checkBox'
;
import
{
setIn
}
from
'immutable'
;
const
MiniMenu
=
props
=>
{
const
{
userMode
,
clientName
,
parentKey
}
=
props
;
...
...
@@ -50,6 +51,8 @@ const MiniMenu = props => {
const
[
keepId
,
setKeepId
]
=
useState
(
''
);
const
[
mapDataList
,
setMapDataList
]
=
useState
(
new
Set
());
const
[
keepType
,
setKeepType
]
=
useState
(
''
);
const
[
inf
,
setInf
]
=
useState
({});
const
[
checkList
,
setCheckList
]
=
useState
([]);
// 获取菜单树
useEffect
(()
=>
{
...
...
@@ -270,7 +273,26 @@ const MiniMenu = props => {
.
then
(
res
=>
{
setLoading
(
false
);
if
(
res
.
code
===
0
)
{
setInfo
({
...
res
});
let
infoList
=
res
.
data
.
relatedRoleList
.
map
(
item
=>
({
groupName
:
item
.
groupName
,
isChecked
:
item
.
isChecked
,
list
:
item
.
list
,
checkedList
:
new
Set
([]),
}));
setInf
(
infoList
);
setInfo
({
...
res
.
data
});
let
data
=
new
Set
();
infoList
.
map
(
item
=>
{
if
(
item
.
isChecked
==
true
)
{
data
.
add
(
item
.
groupName
);
}
item
.
list
.
map
(
i
=>
{
if
(
i
.
related
)
{
item
.
checkedList
.
add
(
i
.
relatedRoleCode
);
}
});
});
setCheckList
(
data
);
}
else
{
notification
.
error
({
message
:
'提示'
,
...
...
@@ -416,9 +438,9 @@ const MiniMenu = props => {
setLoading
(
true
);
console
.
log
(
prop
);
let
obj
=
{
...
prop
};
if
(
nodeType
===
3
||
nodeType
===
4
)
{
obj
.
relatedRoleList
=
String
(
roleList
)
||
''
;
}
//
if (nodeType === 3 || nodeType === 4) {
//
obj.relatedRoleList = String(roleList) || '';
//
}
editMenu
({
_dc
:
Date
.
now
(),
menuID
,
...
...
@@ -755,6 +777,8 @@ const MiniMenu = props => {
<
EditForm
nodeType=
{
nodeType
}
info=
{
info
}
inf=
{
inf
}
checkList=
{
checkList
}
submitCallback=
{
editSubmitCallback
}
valueCallback=
{
valueCallback
}
/>
...
...
src/pages/productCenter/webConfig/menuconfig/editForm.jsx
View file @
13f218bc
...
...
@@ -47,6 +47,8 @@ const EditForm = props => {
};
// 回显表单
useEffect
(()
=>
{
console
.
log
(
info
);
console
.
log
(
infoAll
);
form
.
resetFields
();
otherForm
.
resetFields
();
setPlainOptions
(
info
);
...
...
src/services/drawBoardManage/api.js
View file @
13f218bc
...
...
@@ -2,40 +2,44 @@
* @Description:
* @Author: leizhe
* @Date: 2022-04-06 17:28:30
* @LastEditTime: 2022-05-1
3 09:54:37
* @LastEditTime: 2022-05-1
9 19:31:58
* @LastEditors: leizhe
*/
import
{
get
,
post
,
postForm
,
PUBLISH_SERVICE
,
WebSERVICE
,
CoreSERVICE
}
from
'@/services/index'
;
export
const
typeList
=
param
=>
get
(
`
${
WebSERVICE
}
/ModelType/ModelType/TypeList
`
,
param
);
export
const
typeList
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/ModelType/GetModelType
`
,
param
);
// export const typeList = param => get(`${CoreSERVICE}/ModelType/List`, param);
export
const
modelManageList
=
param
=>
get
(
`
${
WebSERVICE
}
/Models/Models/ModelManageList`
,
param
);
export
const
modelManageList
=
param
=>
post
(
`
${
PUBLISH_SERVICE
}
/ModelType/GetModelInfo`
,
param
);
export
const
modelManageListAll
=
param
=>
post
(
`
${
PUBLISH_SERVICE
}
/ModelType/GetModelInfo`
,
param
);
// export const modelManageList = param => get(`${CoreSERVICE}/Model/ModelList`, param);
export
const
SaveUpload
=
query
=>
post
(
`
${
WebSERVICE
}
/Models/Models/SaveUpload`
,
query
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data;charset=UTF-8'
,
},
});
// export const SaveUpload = query =>
// post(`${
CoreSERVICE}/Model/Save
`, query, {
// post(`${
WebSERVICE}/Models/Models/SaveUpload
`, query, {
// headers: {
// 'Content-Type': 'multipart/form-data;charset=UTF-8',
// },
// });
export
const
SaveUpload
=
query
=>
post
(
`
${
PUBLISH_SERVICE
}
/ModelType/AddModelInfo`
,
query
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data;charset=UTF-8'
,
},
});
export
const
Save
=
param
=>
get
(
`
${
WebSERVICE
}
/ModelType/ModelType/Save`
,
param
);
// export const Save = param => get(`${WebSERVICE}/ModelType/ModelType/Save`, param);
export
const
Save
=
param
=>
post
(
`
${
PUBLISH_SERVICE
}
/ModelType/AddModelType`
,
param
);
export
const
deleteByModel
=
param
=>
get
(
`
${
WebSERVICE
}
/Models/Models/DeleteByModel`
,
param
);
// export const deleteByModel = param => get(`${WebSERVICE}/Models/Models/DeleteByModel`, param);
export
const
deleteByModel
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/ModelType/DeleteModel`
,
param
);
export
const
UpdateModelType
=
param
=>
ge
t
(
`
${
PUBLISH_SERVICE
}
/ModelType/UpdateModelType`
,
param
);
export
const
UpdateModelType
=
param
=>
pos
t
(
`
${
PUBLISH_SERVICE
}
/ModelType/UpdateModelType`
,
param
);
export
const
DelModelType
=
param
=>
ge
t
(
`
${
PUBLISH_SERVICE
}
/ModelType/DelModelType`
,
param
);
export
const
DelModelType
=
param
=>
pos
t
(
`
${
PUBLISH_SERVICE
}
/ModelType/DelModelType`
,
param
);
export
const
Import
=
query
=>
post
(
`
${
WebSERVICE
}
/Models/Models/Import
`
,
query
,
{
post
(
`
${
PUBLISH_SERVICE
}
/ModelType/UpLoadModel
`
,
query
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data;charset=UTF-8'
,
},
...
...
@@ -58,3 +62,5 @@ export const DownLoadModelTypeSingle = query =>
`
${
PUBLISH_SERVICE
}
/ModelType/DownLoadModelTypeSingle?modeId=
${
query
.
modeId
}
`
;
export
const
Export
=
query
=>
`
${
WebSERVICE
}
/Models/Models/Export?Ids=
${
query
.
Ids
}
`
;
export
const
UpdateParentId
=
param
=>
post
(
`
${
PUBLISH_SERVICE
}
/ModelType/UpdateParentId`
,
param
);
src/services/mobileConfig/api.js
View file @
13f218bc
/*
* @Description:
* @Author: leizhe
* @Date: 2021-12-23 17:51:09
* @LastEditTime: 2022-05-20 11:47:20
* @LastEditors: leizhe
*/
import
{
get
,
post
,
PUBLISH_SERVICE
,
CITY_SERVICE
}
from
'@/services/index'
;
import
qs
from
'qs'
;
/**
* @param {*} params
*/
export
const
miniAppSiteTree
=
params
=>
get
(
`
${
CITY_SERVICE
}
/OMS.svc/MiniAppSiteTree`
,
params
);
export
const
miniAppSiteTree
=
params
=>
get
(
`
${
CITY_SERVICE
}
/OMS.svc/MiniAppSiteTree`
,
params
);
/**
* 获取网站配置
* @param {*} params
* title:'名称'
*/
export
const
getWebsite
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/WebSite/MiniApp_GetWebsite`
,
params
);
export
const
getWebsite
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/WebSite/MiniApp_GetWebsite`
,
params
);
/**
*
* @param {*} params
...
...
@@ -31,11 +36,7 @@ export const getWebsite = params =>
export
const
editWebsite
=
(
params
,
options
)
=>
{
let
strParams
=
params
;
let
qsParams
=
strParams
;
return
post
(
`
${
PUBLISH_SERVICE
}
/WebSite/MiniApp_EditWebsite?_version=9999`
,
qsParams
,
options
,
);
return
post
(
`
${
PUBLISH_SERVICE
}
/WebSite/MiniApp_EditWebsite?_version=9999`
,
qsParams
,
options
);
};
/**
...
...
@@ -64,8 +65,7 @@ export const getMiniAppModuleTree = params =>
relatedRoleList: //角色数组
}
*/
export
const
addMenu
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/WebSite/MiniApp_AddMenu`
,
params
);
export
const
addMenu
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/WebSite/MiniApp_AddMenu`
,
params
);
// 获取菜单详情
/**
...
...
@@ -73,16 +73,13 @@ export const addMenu = params =>
* menuID:''
* }
*/
export
const
getMenuInfo
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/PlatformCenter/Mini_GetMenuInfo`
,
params
);
export
const
getMenuInfo
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/PlatformCenter/GetMenuInfo`
,
params
);
// 编辑菜单
export
const
editMenu
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/WebSite/MiniApp_EditMenu`
,
params
);
export
const
editMenu
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/WebSite/MiniApp_EditMenu`
,
params
);
// 删除菜单
export
const
deleteMenu
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/WebSite/MiniApp_DeleteMenu`
,
params
);
export
const
deleteMenu
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/WebSite/MiniApp_DeleteMenu`
,
params
);
// 获取角色列表
export
const
getRoleListPlain
=
params
=>
...
...
@@ -95,19 +92,13 @@ export const deleteWebsite = params =>
export
const
addWebsite
=
(
params
,
options
)
=>
// let strParams = JSON.stringify(params);
// let qsParams = qs.stringify({ config: strParams });
post
(
`
${
PUBLISH_SERVICE
}
/WebSite/MiniApp_AddWebsite?_version=9999`
,
params
,
options
,
);
post
(
`
${
PUBLISH_SERVICE
}
/WebSite/MiniApp_AddWebsite?_version=9999`
,
params
,
options
);
// 菜单拖拽
export
const
dragMenu
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/WebSite/DragMenu `
,
params
);
export
const
dragMenu
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/WebSite/DragMenu `
,
params
);
export
const
deleteMiniMenu
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/PlatformCenter/DeleteMiniMenu`
,
params
);
// 获取移动应用上传APK信息
export
const
getMobileFiles
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/FileCenter/GetMobileFiles`
,
params
);
export
const
getMobileFiles
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/FileCenter/GetMobileFiles`
,
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