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

fix: '网关配置模块'

parent 049dfc13
Pipeline #53880 waiting for manual action with stages
......@@ -30,7 +30,7 @@ const AddModal = props => {
feedbackName: '',
doRole: '',
});
const { callBackSubmit = () => {}, visible, type, formObj } = props;
const { callBackSubmit = () => {}, visible, type, formObj, keepTableData } = props;
const [Type1, setType1] = useState('');
const [Type2, setType2] = useState('');
......@@ -297,6 +297,21 @@ const AddModal = props => {
required: true,
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="业务名称不可重复" />
......@@ -613,7 +628,7 @@ const AddModal = props => {
</Col>
<Col span={23}>
<Item label="台账过滤条件" name="filterCondition" labelCol={{ span: 4 }}>
<TextArea placeholder="设备对应的Scada台账名称,可多选" />
<TextArea placeholder="例如:and 泵房品牌='熊猫'" />
</Item>
</Col>
</Row>
......
......@@ -20,6 +20,7 @@ const maintenance = () => {
const [flag, setFlag] = useState(0);
const [sortVisible, setSortVisible] = useState(false);
const [tableData, setTableData] = useState([]);
const [keepTableData, setKeepTableData] = useState([]);
const columns = [
{
......@@ -265,6 +266,11 @@ const maintenance = () => {
setTreeLoading(false);
if (res.msg === 'Ok') {
setTableData(res.data);
let list = [];
res.data.map(i => {
list.push(i.businessName);
});
setKeepTableData(list);
}
});
}, [flag]);
......@@ -388,6 +394,7 @@ const maintenance = () => {
onClose={() => setAddVisible(false)}
callBackSubmit={onSubmit}
formObj={formObj}
keepTableData={keepTableData}
placement="right"
/>
<SortModal
......
This diff is collapsed.
.getWay_container{
.getWay_container {
display: flex;
height: 100%;
width: 100%;
flex-direction: row;
justify-content: flex-start;
.operate_container {
display: flex;
height: 100%;
flex-direction: column;
justify-content: space-around;
.operate_item {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
height: 50px;
margin-left: 25px;
}
}
.head {
width: 100%;
flex-direction: row;
justify-content: flex-start;
.operate_container{
display: flex;
flex-direction: column;
justify-content: space-around;
width: 100%;
height: 100%;
.operate_item{
display: flex;
flex-direction: row;
justify-content:flex-start;
align-items: center;
height: 50px;
margin-left:25px;
}
}
display: flex;
justify-content: space-between;
.head1 {
display: flex;
align-items: center;
}
}
}
.anticon svg {
margin-top:-5px;
}
\ No newline at end of file
margin-top: -5px;
}
......@@ -42,12 +42,12 @@
line-height: 1;
}
.ant-dropdown-menu-item>.anticon:first-child {
.ant-dropdown-menu-item > .anticon:first-child {
vertical-align: 0.15em !important;
}
.ant-table-tbody {
.ant-table-row:hover>td {
.ant-table-row:hover > td {
background: #aed8fa !important;
}
}
......@@ -114,7 +114,7 @@
}
.ant-tree-treenode:hover {
.iconWraper1>span {
.iconWraper1 > span {
margin-left: 12px;
font-size: 18px;
display: inline-block;
......@@ -260,7 +260,6 @@
}
.ant-card-body {
height: 100%;
}
}
......@@ -271,7 +270,7 @@
min-width: 600px;
}
.siteCheckbox .ant-collapse-content>.ant-collapse-content-box {
.siteCheckbox .ant-collapse-content > .ant-collapse-content-box {
padding: 16px 16px 0;
}
......@@ -320,7 +319,7 @@
overflow: auto;
}
.sitePanel .ant-checkbox-wrapper+.ant-checkbox-wrapper {
.sitePanel .ant-checkbox-wrapper + .ant-checkbox-wrapper {
margin: 0;
}
......@@ -356,7 +355,8 @@
li {
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-position: center right;
margin: 0 10px 10px 0;
......@@ -369,7 +369,8 @@
}
}
.siteline {}
.siteline {
}
.siteBtn {
width: 100%;
......@@ -389,7 +390,7 @@
.ant-checkbox-group .ant-checkbox-group-item {
margin-right: 0px !important;
min-width: 300px !important;
width: 300px;
}
.ant-tree-list-holder {
......@@ -440,4 +441,4 @@
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
\ No newline at end of file
}
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 =>
......@@ -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 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 =>
......
......@@ -7,6 +7,7 @@ const PUBLISH_SERVICE = '/PandaOMS/OMS';
const WebSERVICE = '/Publish/Web';
const CoreSERVICE = '/PandaCore/GCK';
const PANDA_GIS = '/PandaGIS/MapServer';
const PandaCore = '/PandaCore/GateWay';
const get = async (url, params, options = {}) =>
request({
url,
......@@ -29,4 +30,14 @@ const postForm = async (url, params = {}, 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';
// 1.获取所有已附加的表
export const CM_Table_LoadTable = param => get(`${PUBLISH_SERVICE}/CaseManage/LoadTable`, param);
......@@ -57,3 +64,7 @@ export const LoadFieldsByGroup = param =>
// 18.根据分组名加载字段集
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