Commit 928cf499 authored by mayongxin's avatar mayongxin

perf:新增IIS助理服务器配置

parent 7948067a
Pipeline #25430 skipped with stages
...@@ -8,7 +8,7 @@ const DayOfWeekSelect = props => { ...@@ -8,7 +8,7 @@ const DayOfWeekSelect = props => {
const [selectValues, setSelectValues] = useState([]) const [selectValues, setSelectValues] = useState([])
const {onChange} = props const {onChange,value} = props
const hours = [ const hours = [
{ name: "星期一", value: '1' }, { name: "星期一", value: '1' },
...@@ -45,6 +45,9 @@ const DayOfWeekSelect = props => { ...@@ -45,6 +45,9 @@ const DayOfWeekSelect = props => {
setSelectValues(value) setSelectValues(value)
onChange&&onChange(values) onChange&&onChange(values)
} }
useEffect(()=>{
setSelectValues(value)
},[props])
return ( return (
<div > <div >
<Radio.Group onChange={onTypeChange}> <Radio.Group onChange={onTypeChange}>
......
...@@ -8,7 +8,7 @@ const HourOfDaySelect = props => { ...@@ -8,7 +8,7 @@ const HourOfDaySelect = props => {
const [selectValues, setSelectValues] = useState([]) const [selectValues, setSelectValues] = useState([])
const {onChange} = props const {onChange,value} = props
const hours = [ const hours = [
{ name: "0:00", value: '0' }, { name: "0:00", value: '0' },
...@@ -40,19 +40,28 @@ const HourOfDaySelect = props => { ...@@ -40,19 +40,28 @@ const HourOfDaySelect = props => {
let values = [] let values = []
switch (e.target.value) { switch (e.target.value) {
case 0: case 0:
values = ["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23",] values = ["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23"]
break
case 1: case 1:
values = [] values = []
break
case 2: case 2:
values = ["6","8"] values = ["6","8"]
break
case 3: case 3:
values = ["0","8","16"] values = ["0","8","16"]
break
case 4: case 4:
values = ["0","6","12","18"] values = ["0","6","12","18"]
break
} }
onChange&&onChange(value) onChange&&onChange(values)
setSelectValues(values)
} }
useEffect(()=>{
setSelectValues(value)
},[props])
const onCheckChange = (value)=>{ const onCheckChange = (value)=>{
setSelectValues(value) setSelectValues(value)
......
.IISAgent_container{ .agent_container {
display: flex;
flex-direction: row;
.select_btn {
display: inline-block;
color: #2f54eb;
cursor: pointer;
border-bottom: 1px solid #2f54eb;
width: 80px;
margin-left: 20px;
}
.select_result {}
}
.IISAgent_container {
overflow-y: scroll; overflow-y: scroll;
height: 500px; height: 500px;
}
\ No newline at end of file }
import React, { useEffect, useState } from 'react' import React, { useEffect, useState } from 'react'
import SiteModal from '@/components/Modal/SiteModa'; import SiteModal from '@/components/Modal/SiteModa';
import { Checkbox, Input, Button, Modal } from 'antd' import { Checkbox, Input, Button, Modal } from 'antd'
import { data } from '../Mock' //import { data } from '../Mock'
import _ from 'lodash'; import _ from 'lodash';
import classnames from 'classnames'; import classnames from 'classnames';
import styles from './VisibleRoleModal.less' import styles from './VisibleRoleModal.less'
import { ManOutlined } from '@ant-design/icons'; import { ManOutlined } from '@ant-design/icons';
import { RoleGroupList } from '@/services/platform/messagemanage'
const checkIsGroup = node => const checkIsGroup = node =>
node.children?.length > 0; node.children?.length > 0;
...@@ -18,7 +18,39 @@ const VisibleRoleModal = props => { ...@@ -18,7 +18,39 @@ const VisibleRoleModal = props => {
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [previewVisible, setPreviewVisible] = useState(false) const [previewVisible, setPreviewVisible] = useState(false)
const [selectRole,setSelectRole] = useState([]) const [selectRole, setSelectRole] = useState([])
const [dataTree,setDataTree] = useState([])
const GetRoleGroupList = () => {
RoleGroupList().then(
res => {
//数据转换
let tree = []
res.data.roleList.map((item,index)=>{
tree.push({
name:item.visibleTitle,
id:index,
children:item.roleList.map((roleItem)=>{
return(
{
name:roleItem.roleName,
id:roleItem.roleName,
children:[]
}
)
})
})
})
setDataTree(tree)
}
)
}
useEffect(() => {
setSelectRole(props.value)
GetRoleGroupList()
}, [props])
const onSubmit = () => { const onSubmit = () => {
} }
...@@ -32,18 +64,19 @@ const VisibleRoleModal = props => { ...@@ -32,18 +64,19 @@ const VisibleRoleModal = props => {
const handleClick = () => { const handleClick = () => {
setPreviewVisible(true) setPreviewVisible(true)
} }
const onChange2 = (value)=>{ const onChange2 = (value) => {
console.log(value) console.log(value)
setSelectRole(value.toString()) setSelectRole(value.toString())
} }
return ( return (
<div> <div className={styles.role_container}>
<div onClick={handleClick}>选择推送组</div> <Input disabled={true} value={selectRole} />
<div>{selectRole}</div> <div className={styles.select_btn} onClick={handleClick}>推送人员</div>
<SiteModal <SiteModal
{...props} {...props}
title="编辑推送方案" title="选择推送人员"
bodyStyle={{ width: '100%', minHeight: '100px' }} bodyStyle={{ width: '100%', minHeight: '100px' }}
style={{ top: 200, borderRadius: '20px' }} style={{ top: 200, borderRadius: '20px' }}
width="800px" width="800px"
...@@ -54,10 +87,10 @@ const VisibleRoleModal = props => { ...@@ -54,10 +87,10 @@ const VisibleRoleModal = props => {
confirmLoading={loading} confirmLoading={loading}
visible={previewVisible} visible={previewVisible}
onCancel={handleCancel} onCancel={handleCancel}
> >
<div> <div className={styles.list_card}>
<ListCard {...props} onChange2={onChange2}/> <ListCard {...props} onChange2={onChange2} data={dataTree}/>
</div> </div>
</SiteModal> </SiteModal>
</div> </div>
...@@ -80,7 +113,7 @@ const checkChildrenByCondition = ( ...@@ -80,7 +113,7 @@ const checkChildrenByCondition = (
const ListCard = props => { const ListCard = props => {
const { onChange,onChange2 } = props const { onChange, onChange2 ,data} = props
const [changedItem, setChangedItem] = useState({ item: {} }); const [changedItem, setChangedItem] = useState({ item: {} });
const [valueList, setValueList] = useState([]); const [valueList, setValueList] = useState([]);
...@@ -124,7 +157,7 @@ const ListCard = props => { ...@@ -124,7 +157,7 @@ const ListCard = props => {
} }
useEffect(() => { useEffect(() => {
setValueList(['1', '2', '3'])
}, []) }, [])
return ( return (
<div> <div>
......
.role_container {
display: flex;
flex-direction: row;
.select_btn {
display: inline-block;
color: #2f54eb;
cursor: pointer;
border-bottom: 1px solid #2f54eb;
width: 80px;
margin-left: 20px;
}
}
.list_card{
overflow-y: scroll;
height: 500px;
}
.divBox { .divBox {
// display: flex; // display: flex;
width: 100%; width: 100%;
flex-wrap: wrap; flex-wrap: wrap;
border: 1px solid #c2cdfd; border: 1px solid #c2cdfd;
border-radius: 5px; border-radius: 5px;
margin-top: 20px; margin-top: 20px;
min-height: 50px; min-height: 50px;
padding: 0 10px 10px 20px; padding: 0 10px 10px 20px;
.ant-checkbox-wrapper{
background-color: #fff; .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;
}
}
.divSingle{
border: none;
margin-top: 20px;
min-width: 180px;
flex-grow: 0;
flex-shrink: 0;
// flex:0 0 auto;
// flex-basis: auto;
margin-right: 10px;
background: transparent;
} }
.isSearch{
color: red; .topCheckbox {
background-color: yellow; // height: 75px;
margin: -10px 0 0 0px;
line-height: 20px;
} }
.boldLabel{
font-size: 15px; .topCheckbox>label :hover {
font-weight: bold; font-weight: 600;
background-color: #fff;
} }
.btnBox{
position: sticky; .checkdiv {
bottom: 0px;
right: 0px;
background-color: #fff;
width: 100%;
height: 80px;
padding: 0 20px;
display: flex; display: flex;
justify-content: flex-end; flex-wrap: wrap;
align-items: center; // margin-left: 20px;
} // justify-content: space-between;
\ No newline at end of file }
}
.divSingle {
border: none;
margin-top: 20px;
min-width: 180px;
// flex-grow: 0;
// flex-shrink: 0;
// flex:0 0 auto;
// flex-basis: auto;
margin-right: 10px;
background: transparent;
}
.isSearch {
color: red;
background-color: yellow;
}
.boldLabel {
font-size: 15px;
font-weight: bold;
background-color: #fff;
}
.btnBox {
position: sticky;
bottom: 0px;
right: 0px;
background-color: #fff;
width: 100%;
height: 80px;
padding: 0 20px;
display: flex;
justify-content: flex-end;
align-items: center;
}
\ No newline at end of file
...@@ -15,9 +15,9 @@ export const GetThirdpartyTemplates = param => ...@@ -15,9 +15,9 @@ export const GetThirdpartyTemplates = param =>
export const GetMessageConfigList = param => export const GetMessageConfigList = param =>
get(`${PUBLISH_SERVICE}/MessageConfig/GetMessageConfigList`, param); get(`${PUBLISH_SERVICE}/MessageConfig/GetMessageConfigList`, param);
export const InsertMessageConfig = param => export const InsertMessageConfig = param =>
get(`${PUBLISH_SERVICE}/MessageConfig/InsertMessageConfig`, param); post(`${PUBLISH_SERVICE}/MessageConfig/InsertMessageConfig`, param);
export const UpdateMessageConfig = param => export const UpdateMessageConfig = param =>
get(`${PUBLISH_SERVICE}/MessageConfig/UpdateMessageConfig`, param); post(`${PUBLISH_SERVICE}/MessageConfig/UpdateMessageConfig`, param);
export const DeleteMessageConfig = param => export const DeleteMessageConfig = param =>
get(`${PUBLISH_SERVICE}/MessageConfig/DeleteMessageConfig`, param); get(`${PUBLISH_SERVICE}/MessageConfig/DeleteMessageConfig`, param);
export const GetMessageVersion = param => export const GetMessageVersion = param =>
...@@ -27,8 +27,12 @@ export const GetMsgTypeList = param => ...@@ -27,8 +27,12 @@ export const GetMsgTypeList = param =>
export const TestPush = param => export const TestPush = param =>
get(`${PUBLISH_SERVICE}/MessageConfig/TestPush`, param); get(`${PUBLISH_SERVICE}/MessageConfig/TestPush`, param);
export const AddIISAgentConfig = param => export const AddIISAgentConfig = param =>
get(`${PUBLISH_SERVICE}/MessageConfig/AddIISAgentConfig`, param); post(`${PUBLISH_SERVICE}/MessageConfig/AddIISAgentConfig`, param);
export const DeleteIISAgentConfig = param => export const DeleteIISAgentConfig = param =>
get(`${PUBLISH_SERVICE}/MessageConfig/DeleteIISAgentConfig`, param); get(`${PUBLISH_SERVICE}/MessageConfig/DeleteIISAgentConfig`, param);
export const GetIISAgentConfig = param => export const GetIISAgentConfig = param =>
get(`${PUBLISH_SERVICE}/MessageConfig/GetIISAgentConfig`, param); get(`${PUBLISH_SERVICE}/MessageConfig/GetIISAgentConfig`, param);
\ No newline at end of file //组件接口
export const RoleGroupList = param =>
get(`${PUBLISH_SERVICE}/UserCenter/RoleGroupList`, param);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment