Commit e163b3ff authored by 皮倩雯's avatar 皮倩雯

fix: '网关配置模块'

parent 049dfc13
Pipeline #53880 waiting for manual action with stages
...@@ -30,7 +30,7 @@ const AddModal = props => { ...@@ -30,7 +30,7 @@ const AddModal = props => {
feedbackName: '', feedbackName: '',
doRole: '', doRole: '',
}); });
const { callBackSubmit = () => {}, visible, type, formObj } = props; const { callBackSubmit = () => {}, visible, type, formObj, keepTableData } = props;
const [Type1, setType1] = useState(''); const [Type1, setType1] = useState('');
const [Type2, setType2] = useState(''); const [Type2, setType2] = useState('');
...@@ -297,6 +297,21 @@ const AddModal = props => { ...@@ -297,6 +297,21 @@ const AddModal = props => {
required: true, required: true,
message: '请输入业务名称', message: '请输入业务名称',
}, },
{
validator: (rule, value) => {
let aa = form.getFieldValue().businessName;
if (type === 'add' && keepTableData.indexOf(aa) != -1) {
return Promise.reject('业务名称已存在');
} else if (
type === 'edit' &&
keepTableData.indexOf(aa) != -1 &&
aa != formObj.businessName
) {
return Promise.reject('业务名称已存在');
}
return Promise.resolve();
},
},
]} ]}
> >
<Input placeholder="业务名称不可重复" /> <Input placeholder="业务名称不可重复" />
...@@ -613,7 +628,7 @@ const AddModal = props => { ...@@ -613,7 +628,7 @@ const AddModal = props => {
</Col> </Col>
<Col span={23}> <Col span={23}>
<Item label="台账过滤条件" name="filterCondition" labelCol={{ span: 4 }}> <Item label="台账过滤条件" name="filterCondition" labelCol={{ span: 4 }}>
<TextArea placeholder="设备对应的Scada台账名称,可多选" /> <TextArea placeholder="例如:and 泵房品牌='熊猫'" />
</Item> </Item>
</Col> </Col>
</Row> </Row>
......
...@@ -20,6 +20,7 @@ const maintenance = () => { ...@@ -20,6 +20,7 @@ const maintenance = () => {
const [flag, setFlag] = useState(0); const [flag, setFlag] = useState(0);
const [sortVisible, setSortVisible] = useState(false); const [sortVisible, setSortVisible] = useState(false);
const [tableData, setTableData] = useState([]); const [tableData, setTableData] = useState([]);
const [keepTableData, setKeepTableData] = useState([]);
const columns = [ const columns = [
{ {
...@@ -265,6 +266,11 @@ const maintenance = () => { ...@@ -265,6 +266,11 @@ const maintenance = () => {
setTreeLoading(false); setTreeLoading(false);
if (res.msg === 'Ok') { if (res.msg === 'Ok') {
setTableData(res.data); setTableData(res.data);
let list = [];
res.data.map(i => {
list.push(i.businessName);
});
setKeepTableData(list);
} }
}); });
}, [flag]); }, [flag]);
...@@ -388,6 +394,7 @@ const maintenance = () => { ...@@ -388,6 +394,7 @@ const maintenance = () => {
onClose={() => setAddVisible(false)} onClose={() => setAddVisible(false)}
callBackSubmit={onSubmit} callBackSubmit={onSubmit}
formObj={formObj} formObj={formObj}
keepTableData={keepTableData}
placement="right" placement="right"
/> />
<SortModal <SortModal
......
This diff is collapsed.
.getWay_container{ .getWay_container {
display: flex; display: flex;
height: 100%; height: 100%;
width: 100%; width: 100%;
flex-direction: row; flex-direction: row;
justify-content: flex-start; justify-content: flex-start;
.operate_container{ .operate_container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
width: 100%; .operate_item {
height: 100%;
.operate_item{
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content:flex-start; justify-content: flex-start;
align-items: center; align-items: center;
height: 50px; height: 50px;
margin-left:25px; margin-left: 25px;
}
}
.head {
width: 100%;
display: flex;
justify-content: space-between;
.head1 {
display: flex;
align-items: center;
} }
} }
} }
.anticon svg { .anticon svg {
margin-top:-5px; margin-top: -5px;
} }
...@@ -42,12 +42,12 @@ ...@@ -42,12 +42,12 @@
line-height: 1; line-height: 1;
} }
.ant-dropdown-menu-item>.anticon:first-child { .ant-dropdown-menu-item > .anticon:first-child {
vertical-align: 0.15em !important; vertical-align: 0.15em !important;
} }
.ant-table-tbody { .ant-table-tbody {
.ant-table-row:hover>td { .ant-table-row:hover > td {
background: #aed8fa !important; background: #aed8fa !important;
} }
} }
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
} }
.ant-tree-treenode:hover { .ant-tree-treenode:hover {
.iconWraper1>span { .iconWraper1 > span {
margin-left: 12px; margin-left: 12px;
font-size: 18px; font-size: 18px;
display: inline-block; display: inline-block;
...@@ -260,7 +260,6 @@ ...@@ -260,7 +260,6 @@
} }
.ant-card-body { .ant-card-body {
height: 100%; height: 100%;
} }
} }
...@@ -271,7 +270,7 @@ ...@@ -271,7 +270,7 @@
min-width: 600px; min-width: 600px;
} }
.siteCheckbox .ant-collapse-content>.ant-collapse-content-box { .siteCheckbox .ant-collapse-content > .ant-collapse-content-box {
padding: 16px 16px 0; padding: 16px 16px 0;
} }
...@@ -320,7 +319,7 @@ ...@@ -320,7 +319,7 @@
overflow: auto; overflow: auto;
} }
.sitePanel .ant-checkbox-wrapper+.ant-checkbox-wrapper { .sitePanel .ant-checkbox-wrapper + .ant-checkbox-wrapper {
margin: 0; margin: 0;
} }
...@@ -356,7 +355,8 @@ ...@@ -356,7 +355,8 @@
li { li {
height: 35px; height: 35px;
line-height: 35px; line-height: 35px;
background: rgba(24, 144, 255, 0.16) url('../../../assets/images/icons/close.png') no-repeat 170px; background: rgba(24, 144, 255, 0.16) url('../../../assets/images/icons/close.png') no-repeat
170px;
background-size: 20px; background-size: 20px;
background-position: center right; background-position: center right;
margin: 0 10px 10px 0; margin: 0 10px 10px 0;
...@@ -369,7 +369,8 @@ ...@@ -369,7 +369,8 @@
} }
} }
.siteline {} .siteline {
}
.siteBtn { .siteBtn {
width: 100%; width: 100%;
...@@ -389,7 +390,7 @@ ...@@ -389,7 +390,7 @@
.ant-checkbox-group .ant-checkbox-group-item { .ant-checkbox-group .ant-checkbox-group-item {
margin-right: 0px !important; margin-right: 0px !important;
min-width: 300px !important; width: 300px;
} }
.ant-tree-list-holder { .ant-tree-list-holder {
......
import { get, post, PUBLISH_SERVICE, CITY_SERVICE } from '@/services/index'; /*
* @Description:
* @Author: leizhe
* @Date: 2022-01-13 17:26:14
* @LastEditTime: 2022-06-23 16:42:21
* @LastEditors: leizhe
*/
import { get, post, PUBLISH_SERVICE, CITY_SERVICE, PandaCore } from '@/services/index';
// 基础信息展示 // 基础信息展示
export const GetDataBaseConfig = param => export const GetDataBaseConfig = param =>
...@@ -32,6 +39,10 @@ export const ReloadNginx = param => get(`${PUBLISH_SERVICE}/HostManager/ReloadNg ...@@ -32,6 +39,10 @@ export const ReloadNginx = param => get(`${PUBLISH_SERVICE}/HostManager/ReloadNg
// 获取网关配置 // 获取网关配置
export const GetGateWay = param => get(`${PUBLISH_SERVICE}/HostManager/GetGateWay`, param); export const GetGateWay = param => get(`${PUBLISH_SERVICE}/HostManager/GetGateWay`, param);
export const UpdateGeteWay = param => get(`${PUBLISH_SERVICE}/HostManager/UpdateGeteWay`, param); export const UpdateGeteWay = param => get(`${PUBLISH_SERVICE}/HostManager/UpdateGeteWay`, param);
// 网关配置
export const GetReRoutes = param => get(`${PandaCore}/OcelotSettings/GetReRoutes`, param);
export const SaveRoutes = param => post(`/OcelotSettings/SaveRoutes`, param);
export const DelRoutes = param => get(`/OcelotSettings/DelRoutes`, param);
// 代理服务老接口 // 代理服务老接口
export const GetNginxConfigInfoOLD = param => export const GetNginxConfigInfoOLD = param =>
......
...@@ -7,6 +7,7 @@ const PUBLISH_SERVICE = '/PandaOMS/OMS'; ...@@ -7,6 +7,7 @@ const PUBLISH_SERVICE = '/PandaOMS/OMS';
const WebSERVICE = '/Publish/Web'; const WebSERVICE = '/Publish/Web';
const CoreSERVICE = '/PandaCore/GCK'; const CoreSERVICE = '/PandaCore/GCK';
const PANDA_GIS = '/PandaGIS/MapServer'; const PANDA_GIS = '/PandaGIS/MapServer';
const PandaCore = '/PandaCore/GateWay';
const get = async (url, params, options = {}) => const get = async (url, params, options = {}) =>
request({ request({
url, url,
...@@ -29,4 +30,14 @@ const postForm = async (url, params = {}, options = {}) => { ...@@ -29,4 +30,14 @@ const postForm = async (url, params = {}, options = {}) => {
return post(url, formData, options); return post(url, formData, options);
}; };
export { get, post, postForm, CITY_SERVICE, PUBLISH_SERVICE, WebSERVICE, CoreSERVICE, PANDA_GIS }; export {
get,
post,
postForm,
CITY_SERVICE,
PUBLISH_SERVICE,
WebSERVICE,
CoreSERVICE,
PANDA_GIS,
PandaCore,
};
/*
* @Description:
* @Author: leizhe
* @Date: 2022-01-13 17:26:14
* @LastEditTime: 2022-06-23 20:21:47
* @LastEditors: leizhe
*/
import { get, post, PUBLISH_SERVICE, CITY_SERVICE } from '@/services/index'; import { get, post, PUBLISH_SERVICE, CITY_SERVICE } from '@/services/index';
// 1.获取所有已附加的表 // 1.获取所有已附加的表
export const CM_Table_LoadTable = param => get(`${PUBLISH_SERVICE}/CaseManage/LoadTable`, param); export const CM_Table_LoadTable = param => get(`${PUBLISH_SERVICE}/CaseManage/LoadTable`, param);
...@@ -57,3 +64,7 @@ export const LoadFieldsByGroup = param => ...@@ -57,3 +64,7 @@ export const LoadFieldsByGroup = param =>
// 18.根据分组名加载字段集 // 18.根据分组名加载字段集
export const ChangeOrder = data => post(`${PUBLISH_SERVICE}/CaseManage/ChangeOrder`, data); export const ChangeOrder = data => post(`${PUBLISH_SERVICE}/CaseManage/ChangeOrder`, data);
// 加载台账
export const LoadLedgers = query =>
get(`${PUBLISH_SERVICE}/WorkOrderCenter/GetCM_Ledger_LoadLedgers`, query);
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