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
ff7acd7e
Commit
ff7acd7e
authored
Dec 02, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '消息平台界面优化'
parent
d8bf27eb
Pipeline
#64821
passed with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
141 additions
and
80 deletions
+141
-80
editor.jsx
...s/bsmanager/base/tablemanager/components/Field/editor.jsx
+2
-2
DatabaseInitialization.jsx
...atabase/databaseInitialization/DatabaseInitialization.jsx
+35
-25
ProjectManage.jsx
...tformCenter/messageManage/projectManage/ProjectManage.jsx
+72
-42
schemeDetail.jsx
...latformCenter/messageManage/schemeDetail/schemeDetail.jsx
+32
-11
No files found.
src/pages/bsmanager/base/tablemanager/components/Field/editor.jsx
View file @
ff7acd7e
...
...
@@ -79,7 +79,7 @@ const AddModal = props => {
width=
"700px"
destroyOnClose
maskClosable=
{
false
}
centered
=
{
true
}
centered
cancelText=
"取消"
okText=
"确认"
{
...
props
}
...
...
@@ -101,7 +101,7 @@ const AddModal = props => {
<
Radio
value=
"大"
>
大(3)
</
Radio
>
<
Radio
value=
"中"
>
中(4)
</
Radio
>
<
Radio
value=
"小"
>
小(5)
</
Radio
>
<
Radio
value=
"较小"
>
较小(6)
</
Radio
>
{
/* <Radio value="较小">较小(6)</Radio> */
}
</
Radio
.
Group
>
</
Item
>
{
/* <Item label="模板" name="officeTmpl">
...
...
src/pages/database/databaseInitialization/DatabaseInitialization.jsx
View file @
ff7acd7e
...
...
@@ -370,14 +370,17 @@ const DatabaseInitialization = props => {
GetDbChangeFirst
(
kk
);
// 有License的情况下首次进入展示数据
// if (res.data.IsAuthorize) {
if
(
res
.
data
.
Product
)
{
console
.
log
(
res
.
data
.
Product
);
if
(
res
.
data
.
Product
.
length
>
0
)
{
let
aa
=
[];
let
gg
=
[];
res
.
data
.
Product
.
map
(
i
=>
{
if
(
i
.
status
==
1
)
{
gg
.
push
(
i
.
name
);
if
(
i
.
name
!==
null
)
{
if
(
i
.
status
==
1
)
{
gg
.
push
(
i
.
name
);
}
aa
.
push
(
i
.
name
);
}
aa
.
push
(
i
.
name
);
});
if
(
aa
.
length
>
0
)
{
let
dd
=
[];
...
...
@@ -401,11 +404,19 @@ const DatabaseInitialization = props => {
setProduct
(
arr
);
setKeepValue
(
arr
);
}
console
.
log
(
aa
);
let
newArr
=
Array
.
from
(
new
Set
(
aa
));
setKeepStatus
(
gg
);
setKeepProduct
(
newArr
);
setKeepCode
(
newArr
);
setValue
(
newArr
);
console
.
log
(
newArr
);
if
(
newArr
.
length
>
0
)
{
setKeepProduct
(
newArr
);
setKeepCode
(
newArr
);
setValue
(
newArr
);
}
else
{
setKeepProduct
([]);
setKeepCode
([]);
setValue
([]);
}
}
setKeepDb
(
res
.
data
);
setIsAuthorize
(
res
.
data
.
IsAuthorize
);
...
...
@@ -538,14 +549,16 @@ const DatabaseInitialization = props => {
setkeepNa
(
''
);
setkeepCo
(
''
);
}
if
(
res
.
data
.
Product
)
{
if
(
res
.
data
.
Product
.
length
>
0
)
{
let
aa
=
[];
let
gg
=
[];
res
.
data
.
Product
.
map
(
i
=>
{
if
(
i
.
status
==
1
)
{
gg
.
push
(
i
.
name
);
if
(
i
.
name
!==
null
)
{
if
(
i
.
status
==
1
)
{
gg
.
push
(
i
.
name
);
}
aa
.
push
(
i
.
name
);
}
aa
.
push
(
i
.
name
);
});
if
(
aa
.
length
>
0
)
{
let
dd
=
[];
...
...
@@ -573,6 +586,7 @@ const DatabaseInitialization = props => {
let
newArr
=
Array
.
from
(
new
Set
(
aa
));
// 当前数据库已存在和上一个已存在数据库值重新赋值
if
(
newArr
.
length
>
0
)
{
console
.
log
(
newArr
);
setKeepProduct
(
newArr
);
setKeepStatus
(
gg
);
setKeepCode
(
newArr
);
...
...
@@ -604,15 +618,18 @@ const DatabaseInitialization = props => {
GetDbProduct
({
...
obj
,
password
:
Encrypt
(
obj
.
password
)
}).
then
(
res
=>
{
setCardLoading
(
false
);
if
(
res
.
code
===
0
)
{
if
(
res
.
data
.
Product
)
{
if
(
res
.
data
.
Product
.
length
>
0
)
{
let
aa
=
[];
let
gg
=
[];
res
.
data
.
Product
.
map
(
i
=>
{
if
(
i
.
status
==
1
)
{
gg
.
push
(
i
.
name
);
if
(
i
.
name
!==
null
)
{
if
(
i
.
status
==
1
)
{
gg
.
push
(
i
.
name
);
}
aa
.
push
(
i
.
name
);
}
aa
.
push
(
i
.
name
);
});
// 后端返回出局的分组名可能发生改变,前端处理数据展示新分组名
if
(
aa
.
length
>
0
)
{
let
dd
=
[];
aa
.
map
(
i
=>
{
...
...
@@ -638,6 +655,7 @@ const DatabaseInitialization = props => {
let
newArr
=
Array
.
from
(
new
Set
(
aa
));
// 当前数据库已存在和上一个已存在数据库值重新赋值
if
(
newArr
.
length
>
0
)
{
console
.
log
(
newArr
);
setKeepProduct
(
newArr
);
setKeepStatus
(
gg
);
setKeepCode
(
newArr
);
...
...
@@ -683,7 +701,7 @@ const DatabaseInitialization = props => {
doInitLog
();
NewInitAddDataBase
({
...
obj
,
productSetting
,
password
:
Encrypt
(
obj
.
password
)
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
GetDbChangeAppend
();
GetDbChangeAppend
();
// 刷星已初始化的产品勾选
setMsg
(
'未检测到可用License'
);
setfirstColor
(
'green'
);
...
...
@@ -704,6 +722,7 @@ const DatabaseInitialization = props => {
}
setTotalProduct
(
res
.
data
.
productPackageSumCount
);
setSimpleProduct
(
res
.
data
.
productPackageCount
);
// 给平台管理员赋值所有菜单权限
SetAdminMenuToRole
().
then
(
resdata
=>
{
if
(
resdata
.
code
===
0
)
{
setLastColor
(
'green'
);
...
...
@@ -759,15 +778,6 @@ const DatabaseInitialization = props => {
setSimpleProduct
(
res
.
data
.
productPackageCount
);
setLastColor
(
'green'
);
setKeepLast
(
''
);
// SetAdminMenuToRole().then(resdata => {
// if (resdata.code === 0) {
// setLastColor('green');
// setKeepLast('');
// } else {
// setLastColor('red');
// setKeepLast(res.data.msg);
// }
// });
}
else
{
setDataResult
(
res
.
msg
);
setFinish
(
true
);
...
...
src/pages/platformCenter/messageManage/projectManage/ProjectManage.jsx
View file @
ff7acd7e
...
...
@@ -15,6 +15,7 @@ import {
Tooltip
,
Spin
,
notification
,
Tag
,
}
from
'antd'
;
import
{
PlusCircleOutlined
,
...
...
@@ -63,6 +64,7 @@ const ProjectManage = props => {
const
[
value
,
setValue
]
=
useState
(
''
);
const
[
pushTestMsg
,
setPushTestMsg
]
=
useState
(
''
);
const
[
currentPage
,
setCurrentPage
]
=
useState
(
1
);
const
[
nameList
,
setNameList
]
=
useState
([]);
const
columns
=
[
{
title
:
'方案名称'
,
...
...
@@ -95,11 +97,19 @@ const ProjectManage = props => {
</
div
>
),
},
{
title
:
'消息标题'
,
dataIndex
:
'Title'
,
align
:
'center'
,
key
:
'Title'
,
render
:
(
text
,
record
)
=>
<
div
>
{
text
===
null
||
!
text
?
'-'
:
text
}
</
div
>,
},
{
title
:
'方案类型'
,
dataIndex
:
'type'
,
align
:
'center'
,
key
:
'type'
,
width
:
200
,
render
:
(
text
,
record
)
=>
<
div
>
{
text
===
null
||
!
text
?
'-'
:
text
}
</
div
>,
},
{
...
...
@@ -116,52 +126,69 @@ const ProjectManage = props => {
cursor
:
'pointer'
,
},
}),
render
:
(
text
,
record
)
=>
(
<
span
>
{
text
===
null
||
!
text
?
(
'-'
)
:
(
<
Tooltip
placement=
"topLeft"
title=
{
text
}
>
{
text
}
</
Tooltip
>
)
}
</
span
>
),
},
{
title
:
'推送组'
,
dataIndex
:
'receive_person'
,
key
:
'receive_person'
,
align
:
'center'
,
ellipsis
:
true
,
onCell
:
()
=>
({
style
:
{
maxWidth
:
150
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
cursor
:
'pointer'
,
},
}),
render
:
(
text
,
record
)
=>
(
<
span
>
{
text
===
null
||
!
text
?
(
'-'
)
:
(
<
Tooltip
placement=
"topLeft"
title=
{
text
}
>
{
text
}
</
Tooltip
>
)
}
</
span
>
),
render
:
(
text
,
record
)
=>
{
console
.
log
(
text
);
let
arr
=
text
;
if
(
text
)
{
let
list
=
new
Set
(
text
.
split
(
','
));
console
.
log
(
list
);
let
data
=
Array
.
from
(
list
);
// 将类数组转化为真数组
console
.
log
(
data
);
arr
=
data
.
toString
();
}
return
(
<
span
>
{
arr
===
null
||
!
arr
?
(
'-'
)
:
(
<
Tooltip
placement=
"topLeft"
title=
{
arr
}
>
{
arr
}
</
Tooltip
>
)
}
</
span
>
);
},
},
// {
// title: '推送组',
// dataIndex: 'receive_person',
// key: 'receive_person',
// align: 'center',
// ellipsis: true,
// onCell: () => ({
// style: {
// maxWidth: 150,
// overflow: 'hidden',
// whiteSpace: 'nowrap',
// textOverflow: 'ellipsis',
// cursor: 'pointer',
// },
// }),
// render: (text, record) => (
// <span>
// {text === null || !text ? (
// '-'
// ) : (
// <Tooltip placement="topLeft" title={text}>
// {text}
// </Tooltip>
// )}
// </span>
// ),
// },
{
title
:
'是否启用'
,
dataIndex
:
'is_use'
,
align
:
'center'
,
key
:
'is_use'
,
width
:
'100px'
,
render
:
(
text
,
record
)
=>
<
div
>
{
text
===
'0'
?
'否'
:
'是'
}
</
div
>,
// render: (text, record) => <div>{text === '0' ? '否' : '是'}</div>,
render
:
record
=>
{
if
(
record
===
'1'
)
{
return
<
Tag
color=
"success"
>
是
</
Tag
>;
}
return
<
Tag
color=
"processing"
>
否
</
Tag
>;
},
},
{
title
:
'操作'
,
...
...
@@ -233,7 +260,7 @@ const ProjectManage = props => {
setCurrentTempalte
(
record
);
history
.
push
({
pathname
:
`/platform/schemeDetail`
,
state
:
{
template
:
record
,
currentPage
},
state
:
{
template
:
record
,
currentPage
,
nameList
},
});
// handleShowModal("editVisible", true)
};
...
...
@@ -301,7 +328,7 @@ const ProjectManage = props => {
// handleShowModal("addVisible", true)
history
.
push
({
pathname
:
`/platform/schemeDetail`
,
state
:
{
template
:
{}
},
state
:
{
template
:
{}
,
nameList
},
});
};
const
onTypeChange
=
value
=>
{
...
...
@@ -366,9 +393,12 @@ const ProjectManage = props => {
GetMessageConfigList
(
params
).
then
(
res
=>
{
setTreeLoading
(
false
);
if
(
res
.
code
===
0
)
{
console
.
log
(
res
.
data
);
let
mesList
=
[];
let
nameArr
=
[];
if
(
res
.
code
===
0
)
{
res
.
data
.
MessageConfigModels
.
map
(
item
=>
{
nameArr
.
push
(
item
.
MessageConfig
.
MsgType
);
mesList
.
push
({
name
:
item
.
MessageConfig
.
MsgType
,
type
:
item
.
MessageConfig
.
ThemeName
,
...
...
@@ -379,7 +409,7 @@ const ProjectManage = props => {
item
,
});
});
setNameList
(
nameArr
);
setDataList
(
mesList
);
}
}
else
{
...
...
src/pages/platformCenter/messageManage/schemeDetail/schemeDetail.jsx
View file @
ff7acd7e
...
...
@@ -61,9 +61,9 @@ const EditModal = props => {
const
[
plan
,
setPlan
]
=
useState
(
''
);
const
[
isStart
,
setIsStart
]
=
useState
(
false
);
const
[
IISConfig
,
setIISConfig
]
=
useState
(
null
);
const
[
isUse
,
setIsUse
]
=
useState
(
'1'
);
const
[
isUse
,
setIsUse
]
=
useState
(
null
);
const
[
btnType
,
setBtnType
]
=
useState
(
'自定义'
);
const
{
template
,
confirmModal
,
currentPage
}
=
props
.
location
.
state
;
const
{
template
,
confirmModal
,
currentPage
,
nameList
}
=
props
.
location
.
state
;
const
[
currentTrench
,
setCurrentTrench
]
=
useState
({
isMessageShow
:
false
,
isAPPShow
:
false
,
...
...
@@ -186,7 +186,7 @@ const EditModal = props => {
setIm
(
template
.
WebIcon
?
template
.
WebIcon
:
''
);
setPlan
(
template
.
MsgType
);
setBtnType
(
template
.
type
);
setIsUse
(
template
.
IsStarted
);
setIsUse
(
template
.
IsStarted
===
null
?
'0'
:
template
.
IsStarted
);
setCurrentTrench
({
isAPPShow
:
!!
(
template
.
PushMode
&&
template
.
PushMode
.
split
(
','
).
indexOf
(
'平台弹框'
)
>
-
1
),
isWXShow
:
!!
(
template
.
PushMode
&&
template
.
PushMode
.
split
(
','
).
indexOf
(
'公众号推送'
)
>
-
1
),
...
...
@@ -199,7 +199,7 @@ const EditModal = props => {
),
});
}
else
{
//
setIsUse('1');
setIsUse
(
'1'
);
setType
(
'add'
);
setImageUrl
(
''
);
setIm
(
''
);
...
...
@@ -319,11 +319,11 @@ const EditModal = props => {
push_mode
.
push
(
'平台弹框'
);
}
break
;
case
'isWEBShow'
:
if
(
currentTrench
[
key
])
{
push_mode
.
push
(
'平台弹框'
);
}
break
;
//
case 'isWEBShow':
//
if (currentTrench[key]) {
//
push_mode.push('平台弹框');
//
}
//
break;
case
'isWXShow'
:
if
(
currentTrench
[
key
])
{
push_mode
.
push
(
'公众号推送'
);
...
...
@@ -503,7 +503,12 @@ const EditModal = props => {
};
const
onTypeChange
=
(
value
,
type
)
=>
{
let
data
=
{
...
currentTrench
};
data
[
type
]
=
value
;
if
(
type
===
'isWEBShow'
||
type
===
'isAPPShow'
)
{
data
.
isWEBShow
=
value
;
data
.
isAPPShow
=
value
;
}
else
{
data
[
type
]
=
value
;
}
setCurrentTrench
(
data
);
};
// 推送组选择角色
...
...
@@ -709,6 +714,22 @@ const EditModal = props => {
required
:
true
,
message
:
'请输入方案名称'
,
},
{
validator
:
(
rule
,
value
)
=>
{
let
aa
=
form
.
getFieldValue
().
name
;
if
(
!
template
.
ThemeName
&&
nameList
.
indexOf
(
aa
)
!=
-
1
)
{
return
Promise
.
reject
(
'方案名称重复'
);
}
if
(
template
.
ThemeName
&&
nameList
.
indexOf
(
aa
)
!=
-
1
&&
aa
!=
template
.
name
)
{
return
Promise
.
reject
(
'方案名称重复'
);
}
return
Promise
.
resolve
();
},
},
]
}
>
<
Input
...
...
@@ -720,7 +741,7 @@ const EditModal = props => {
</
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Item
label=
"消息标题"
name=
"Title"
labelCol=
{
{
span
:
6
}
}
>
<
Item
label=
"消息标题"
name=
"Title"
labelCol=
{
{
span
:
5
}
}
>
<
Input
placeholder=
"请输入标题"
style=
{
{
width
:
'25rem'
}
}
/>
</
Item
>
</
Col
>
...
...
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