Commit f79efa29 authored by 邓超's avatar 邓超

Merge branch 'master' of https://g.civnet.cn:8443/ReactWeb5/maintenance

# Conflicts: # src/services/tablemanager/tablemanager.js
parents 1123424f 5f3f16f2
Pipeline #54042 passed with stages
......@@ -58,6 +58,7 @@ const AddModal = props => {
onCancel,
treeData,
keepTreeFirst,
keepStandingBook,
} = props;
const [loading, setLoading] = useState(false);
const [fieldName, setFieldName] = useState([]); // 弹窗
......@@ -86,6 +87,7 @@ const AddModal = props => {
'设备二维码',
'本人ID',
'富文本',
'编码',
],
},
{
......@@ -121,11 +123,11 @@ const AddModal = props => {
ID: 4,
children: ['坐标控件', '设备选择', '区域控件', '路径控件', '位置坐标'],
},
{
name: '台账专有类',
ID: 5,
children: ['编码', '智能抄表'],
},
// {
// name: '台账专有类',
// ID: 5,
// children: ['智能抄表'],
// },
]);
const [visible, setVisible] = useState(false); // 弹窗
const [isShow, setIsShow] = useState(false); // 弹窗
......@@ -165,6 +167,7 @@ const AddModal = props => {
const { Item } = Form;
const { TreeNode } = TreeSelect;
const [timeData, setTimeData] = useState('');
const { Option } = Select;
// 提交
const onSubmit = () => {
// 不切换树
......@@ -266,37 +269,10 @@ const AddModal = props => {
data[0].Config = radio == 0 ? `${obj.standingBook}` : `${obj.standingBook}.n`;
}
}
if (obj.filterName && obj.filterValue) {
data[0].Config = `${data[0].Config}?${obj.filterName}='${obj.filterValue}'`;
if (obj.filterName) {
data[0].Config = `${data[0].Config}?${obj.filterName}`;
}
break;
// case '人员选择器':
// if (radio1 == '全部') {
// if (radio3 == '全部ID') {
// if (obj.ConfigName) {
// let str =
// radio == 0 ? `全部ID.${obj.ConfigName}` : `全部ID.${obj.ConfigName}.n`;
// data[0].Config = str;
// } else {
// let str = radio == 0 ? `全部ID` : `全部ID.n`;
// data[0].Config = str;
// }
// } else {
// if (obj.ConfigName) {
// let str = radio == 0 ? `全部.${obj.ConfigName}` : `全部.${obj.ConfigName}.n`;
// data[0].Config = str;
// } else {
// let str = radio == 0 ? `全部` : `全部.n`;
// data[0].Config = str;
// }
// }
// } else {
// let str = radio == 0 ? `${obj.Config}` : `${obj.Config}.n`;
// console.log(str);
// data[0].Config = str;
// }
// break;
case '人员选择器':
if (checkboxAll1 == true) {
if (checkboxAllID1 == true) {
......@@ -416,6 +392,30 @@ const AddModal = props => {
? (coordinates = true)
: (coordinates = false);
break;
case '日期时间':
case '日期':
case '日期月份':
case '日期年份':
case '日期周':
case '时分秒':
if (res[0].data.root.Config === '默认为空') {
form.setFieldsValue({
Config: '默认为空',
});
} else if (res[0].data.root.Config === '锁定为当前时间') {
form.setFieldsValue({
Config: '不可选择',
});
} else if (res[0].data.root.Config === '默认为当前时间') {
form.setFieldsValue({
Config: '默认为当前时间',
});
} else if (res[0].data.root.Config === '不超过当前时间') {
form.setFieldsValue({
Config: '不超过当前时间',
});
}
break;
case '图片':
case '可预览图片':
res[0].data.root.Preset === '拍照相册' ? (picture = true) : (picture = false);
......@@ -521,10 +521,10 @@ const AddModal = props => {
});
let book1 = res[0].data.root.Config.split('?');
if (book1[1]) {
let aa = book1[1].split('=');
// let aa = book1[1].split('=');
form.setFieldsValue({
filterName: aa[0],
filterValue: aa[1].substring(1, aa[1].length - 1),
filterName: book1[1],
// filterValue: aa[1].substring(1, aa[1].length - 1),
});
}
if (book1[0].endsWith('.n')) {
......@@ -539,66 +539,6 @@ const AddModal = props => {
setRadio(0);
}
break;
// case '人员选择器':
// let pepole = res[0].data.root.Config.split('.');
// console.log(pepole);
// form.setFieldsValue({ ShowConfig: res[0].data.root.Config });
// if (pepole[0] == '全部') {
// setRadio1('全部');
// setRadio3('0');
// if (pepole[1] != 'n') {
// form.setFieldsValue({
// All: '全部',
// AllID: '0',
// // Config: pepole[0],
// ConfigName: pepole[1],
// });
// } else {
// form.setFieldsValue({
// All: '全部',
// AllID: '0',
// // Config: pepole[0],
// ConfigName: '',
// });
// }
// } else if (pepole[0] == '全部ID') {
// setRadio1('全部');
// setRadio3('全部ID');
// if (pepole[1] != 'n') {
// form.setFieldsValue({
// All: '全部',
// AllID: '全部ID',
// // Config: pepole[0],
// ConfigName: pepole[1],
// });
// } else {
// form.setFieldsValue({
// All: '全部',
// AllID: '全部ID',
// // Config: pepole[0],
// ConfigName: '',
// });
// }
// } else {
// setRadio1('0');
// setRadio3('0');
// form.setFieldsValue({
// All: '0',
// AllID: '0',
// Config: pepole[0],
// });
// }
// if (res[0].data.root.Config.endsWith('.n')) {
// console.log(111);
// form.setFieldsValue({ check: 1 });
// setRadio(1);
// } else {
// console.log(222);
// form.setFieldsValue({ check: 0 });
// setRadio(0);
// }
// break;
case '人员选择器':
let pepole = res[0].data.root.Config.split('.');
console.log(pepole);
......@@ -650,11 +590,9 @@ const AddModal = props => {
});
}
if (res[0].data.root.Config.endsWith('.n')) {
console.log(1212);
form.setFieldsValue({ choose: false });
setCho(false);
} else {
console.log(3434);
form.setFieldsValue({ choose: true });
setCho(true);
}
......@@ -697,16 +635,6 @@ const AddModal = props => {
}
}, [isVisible]);
const layout = {
layout: 'horizontal',
labelCol: {
span: 3,
},
wrapperCol: {
span: 30,
},
};
const handleChange = value => {
form.setFieldsValue({ schemename: value });
};
......@@ -1050,14 +978,39 @@ const AddModal = props => {
} else {
setDetail('');
}
console.log(aa.Shape);
let coordinates = false,
picture = false,
must = false;
switch (aa.Shape) {
case '坐标控件':
aa.Config === '当前坐标' ? (coordinates = true) : (coordinates = false);
break;
case '日期时间':
case '日期':
case '日期月份':
case '日期年份':
case '日期周':
case '时分秒':
if (aa.Config === '默认为空') {
form.setFieldsValue({
Config: '默认为空',
});
} else if (aa.Config === '锁定为当前时间') {
form.setFieldsValue({
Config: '不可选择',
});
} else if (aa.Config === '默认为当前时间') {
form.setFieldsValue({
Config: '默认为当前时间',
});
} else if (aa.Config === '不超过当前时间') {
form.setFieldsValue({
Config: '不超过当前时间',
});
}
break;
case '图片':
case '可预览图片':
aa.Preset === '拍照相册' ? (picture = true) : (picture = false);
......@@ -1163,10 +1116,10 @@ const AddModal = props => {
});
let book1 = aa.Config.split('?');
if (book1[1]) {
let cc = book1[1].split('=');
// let cc = book1[1].split('=');
form.setFieldsValue({
filterName: cc[0],
filterValue: cc[1].substring(1, cc[1].length - 1),
filterName: book1[1],
// filterValue: cc[1].substring(1, cc[1].length - 1),
});
}
if (book1[0].endsWith('.n')) {
......@@ -1181,62 +1134,6 @@ const AddModal = props => {
setRadio(0);
}
break;
// case '人员选择器':
// let pepole = aa.Config.split('.');
// // form.setFieldsValue({ ShowConfig: pepole });
// if (pepole[0] == '全部') {
// setRadio1('全部');
// setRadio3('0');
// if (pepole[1] != 'n') {
// form.setFieldsValue({
// All: '全部',
// AllID: '0',
// ConfigName: pepole[1],
// });
// } else {
// form.setFieldsValue({
// All: '全部',
// AllID: '0',
// ConfigName: '',
// });
// }
// } else if (pepole[0] == '全部ID') {
// setRadio1('全部');
// setRadio3('全部ID');
// if (pepole[1] != 'n') {
// form.setFieldsValue({
// All: '全部',
// AllID: '全部ID',
// ConfigName: pepole[1],
// });
// } else {
// form.setFieldsValue({
// All: '全部',
// AllID: '全部ID',
// ConfigName: '',
// });
// }
// } else {
// setRadio1('0');
// setRadio3('0');
// form.setFieldsValue({
// All: '0',
// AllID: '0',
// Config: pepole[0],
// });
// }
// if (aa.Config.endsWith('.n')) {
// form.setFieldsValue({
// check: 1,
// });
// setRadio(1);
// } else {
// form.setFieldsValue({
// check: 0,
// });
// setRadio(0);
// }
// break;
case '人员选择器':
let pepole = aa.Config.split('.');
console.log(pepole);
......@@ -1320,6 +1217,7 @@ const AddModal = props => {
setCheckedList(res[0].data.root.ExceptionEventFields.split(','));
}
setShape(res[0].data.root.Shape);
console.log(res[0].data.root.Shape);
let coordinates = false,
picture = false,
must = false;
......@@ -1329,6 +1227,30 @@ const AddModal = props => {
? (coordinates = true)
: (coordinates = false);
break;
case '日期时间':
case '日期':
case '日期月份':
case '日期年份':
case '日期周':
case '时分秒':
if (res[0].data.root.Config === '默认为空') {
form.setFieldsValue({
Config: '默认为空',
});
} else if (res[0].data.root.Config === '锁定为当前时间') {
form.setFieldsValue({
Config: '不可选择',
});
} else if (res[0].data.root.Config === '默认为当前时间') {
form.setFieldsValue({
Config: '默认为当前时间',
});
} else if (res[0].data.root.Config === '不超过当前时间') {
form.setFieldsValue({
Config: '不超过当前时间',
});
}
break;
case '图片':
case '可预览图片':
res[0].data.root.Preset === '拍照相册' ? (picture = true) : (picture = false);
......@@ -1435,10 +1357,10 @@ const AddModal = props => {
});
let book1 = res[0].data.root.Config.split('?');
if (book1[1]) {
let aa = book1[1].split('=');
// let aa = book1[1].split('=');
form.setFieldsValue({
filterName: aa[0],
filterValue: aa[1].substring(1, aa[1].length - 1),
filterName: book1[1],
// filterValue: aa[1].substring(1, aa[1].length - 1),
});
}
if (book1[0].endsWith('.n')) {
......@@ -1453,67 +1375,6 @@ const AddModal = props => {
setRadio(0);
}
break;
// case '人员选择器':
// let pepole = res[0].data.root.Config.split('.');
// // form.setFieldsValue({ ShowConfig: pepole });
// console.log(pepole);
// if (pepole[0] == '全部') {
// setRadio1('全部');
// setRadio3('全部');
// if (pepole[1] != 'n') {
// form.setFieldsValue({
// All: '全部',
// AllID: '0',
// // Config: pepole[0],
// ConfigName: pepole[1],
// });
// } else {
// form.setFieldsValue({
// All: '全部',
// AllID: '0',
// // Config: pepole[0],
// ConfigName: '',
// });
// }
// } else if (pepole[0] == '全部ID') {
// setRadio1('全部');
// setRadio3('全部ID');
// if (pepole[1] != 'n') {
// form.setFieldsValue({
// All: '全部',
// AllID: '全部ID',
// // Config: pepole[0],
// ConfigName: pepole[1],
// });
// } else {
// form.setFieldsValue({
// All: '全部',
// AllID: '全部ID',
// // Config: pepole[0],
// ConfigName: '',
// });
// }
// } else {
// setRadio1('0');
// setRadio3('0');
// form.setFieldsValue({
// All: '0',
// AllID: '0',
// Config: pepole[0],
// });
// }
// if (res[0].data.root.Config.endsWith('.n')) {
// form.setFieldsValue({
// check: 1,
// });
// setRadio(1);
// } else {
// form.setFieldsValue({
// check: 0,
// });
// setRadio(0);
// }
// break;
case '人员选择器':
let pepole = res[0].data.root.Config.split('.');
console.log(pepole);
......@@ -1676,42 +1537,10 @@ const AddModal = props => {
data[0].Config = radio == 0 ? `${obj.standingBook}` : `${obj.standingBook}.n`;
}
}
if (obj.filterName && obj.filterValue) {
data[0].Config = `${data[0].Config}?${obj.filterName}='${obj.filterValue}'`;
if (obj.filterName) {
data[0].Config = `${data[0].Config}?${obj.filterName}`;
}
break;
// case '人员选择器':
// console.log(obj.ConfigName);
// console.log(form.getFieldValue().ConfigName);
// console.log(radio1);
// console.log(radio3);
// console.log(form.getFieldValue().All);
// console.log(form.getFieldValue().AllID);
// if (radio1 == '全部') {
// if (radio3 == '全部ID') {
// if (obj.ConfigName) {
// let str = radio == 0 ? `全部ID.${obj.ConfigName}` : `全部ID.${obj.ConfigName}.n`;
// data[0].Config = str;
// } else {
// let str = radio == 0 ? `全部ID` : `全部ID.n`;
// data[0].Config = str;
// }
// } else {
// if (obj.ConfigName) {
// let str = radio == 0 ? `全部.${obj.ConfigName}` : `全部.${obj.ConfigName}.n`;
// data[0].Config = str;
// } else {
// let str = radio == 0 ? `全部` : `全部.n`;
// data[0].Config = str;
// }
// }
// } else {
// let str = radio == 0 ? `${obj.Config}` : `${obj.Config}.n`;
// console.log(str);
// data[0].Config = str;
// }
// break;
case '人员选择器':
if (checkboxAll1 == true) {
if (checkboxAllID1 == true) {
......@@ -1967,14 +1796,10 @@ const AddModal = props => {
};
const changePepole = e => {
console.log(e.target.value);
console.log(e.target.checked);
setPep(e.target.checked);
};
const changeChoose = e => {
console.log(e.target.value);
console.log(e.target.checked);
setCho(e.target.checked);
};
......@@ -1983,13 +1808,13 @@ const AddModal = props => {
let bb = form.getFieldsValue().Config;
setCheckboxAll1(e.target.checked);
if (e.target.checked == true) {
if (bb) {
if (bb || bb == '' || bb == undefined) {
form.setFieldsValue({ ConfigName: bb });
}
setHide(false);
setFlag(true);
} else {
if (aa) {
if (aa || aa == '' || bb == undefined) {
form.setFieldsValue({ Config: aa });
}
setHide(true);
......@@ -2006,7 +1831,7 @@ const AddModal = props => {
<>
<Drawer
title="修改"
width="900px"
width="1000px"
// {...props}
visible={isVisible}
onClose={onCancel}
......@@ -2048,15 +1873,15 @@ const AddModal = props => {
<Item
label="字段名"
name="Name"
labelCol={{ span: 3 }}
labelCol={{ span: 4 }}
rules={[{ required: true, message: '请输入表名' }]}
>
<Input placeholder="请输入别名" disabled style={{ width: '93%' }} />
<Input placeholder="请输入别名" disabled />
</Item>
<Item label="别名" name="Alias" labelCol={{ span: 3 }}>
<Input placeholder="请输入别名" allowClear style={{ width: '93%' }} />
<Item label="别名" name="Alias" labelCol={{ span: 4 }}>
<Input placeholder="请输入别名" allowClear />
</Item>
<Item name="ReadOnly" label="属性" labelCol={{ span: 3 }}>
<Item name="ReadOnly" label="属性" labelCol={{ span: 4 }}>
<div>
<Checkbox
checked={pramData.ReadOnly}
......@@ -2072,7 +1897,7 @@ const AddModal = props => {
</Checkbox>
</div>
</Item>
<Item label="同步" name="SyncEvent" labelCol={{ span: 3 }}>
<Item label="同步" name="SyncEvent" labelCol={{ span: 4 }}>
<Radio.Group>
<Radio value={0} style={{ marginRight: '0.5rem' }}>
不同步
......@@ -2080,12 +1905,12 @@ const AddModal = props => {
<Radio value={1} style={{ marginRight: '0.5rem' }}>
工单 → 事件
</Radio>
<Radio value={2}>事件(上报时) → 工单</Radio>
{/* <Radio value={2}>事件(上报时) → 工单</Radio> */}
</Radio.Group>
</Item>
<Row>
{/* <Col span={1} /> */}
<Col span={12}>
<Col span={16}>
<Item label="形态" labelCol={{ span: 6 }}>
<div className={styles.listEvent}>
<TreeSelect
......@@ -2129,15 +1954,15 @@ const AddModal = props => {
</div>
</Item>
</Col>
<Col span={1} />
<Col span={5}>
<Item label="单位" name="Unit" labelCol={{ span: 7 }}>
<Item label="单位" name="Unit" labelCol={{ span: 10 }}>
<Input style={{ width: '95%' }} placeholder="" />
</Item>
</Col>
<Col span={5}>
<Item label="宽" name="RowSpan" labelCol={{ span: 7 }}>
<Input style={{ width: '87%' }} placeholder="" />
<Col span={3}>
<Item label="宽" name="RowSpan" labelCol={{ span: 8 }}>
<Input placeholder="" />
</Item>
</Col>
</Row>
......@@ -2148,10 +1973,10 @@ const AddModal = props => {
case '编码':
return (
<>
<Item label="前缀" name="prefix" labelCol={{ span: 3 }}>
<Input style={{ width: '93%' }} placeholder="" allowClear />
<Item label="前缀" name="prefix" labelCol={{ span: 4 }}>
<Input placeholder="" allowClear />
</Item>
<Item label="编码方式" name="code" labelCol={{ span: 3 }}>
<Item label="编码方式" name="code" labelCol={{ span: 4 }}>
<Radio.Group>
<Radio value="年份编码" style={{ marginRight: '0.5rem' }}>
XJ-2019-000001(前缀-年份-六位编码)
......@@ -2171,10 +1996,9 @@ const AddModal = props => {
return (
<>
{' '}
<Item label="可选值" name="Config" labelCol={{ span: 3 }}>
<Item label="可选值" name="Config" labelCol={{ span: 4 }}>
<TextArea
allowClear
style={{ width: '93%' }}
placeholder="用英文逗号分隔自定义的值,可设置初始值"
/>
</Item>
......@@ -2203,10 +2027,9 @@ const AddModal = props => {
return (
<>
{' '}
<Item label="可选值" name="Config" labelCol={{ span: 3 }}>
<Item label="可选值" name="Config" labelCol={{ span: 4 }}>
<TextArea
allowClear
style={{ width: '93%' }}
placeholder="用英文逗号分隔自定义的值,可编辑,可设置初始值"
/>
</Item>
......@@ -2216,19 +2039,13 @@ const AddModal = props => {
return (
<>
{' '}
<Item
label="可选值"
name="Config"
labelCol={{ span: 3 }}
// rules={[{ required: true, message: '请输入表名' }]}
>
<Item label="可选值" name="Config" labelCol={{ span: 4 }}>
<TextArea
allowClear
style={{ width: '93%' }}
placeholder="用英文逗号分隔自定义的值,勾选,可设置初始值"
/>
</Item>
<Item colon={false} name="check" label="配置:" labelCol={{ span: 3 }}>
<Item colon={false} name="check" label="配置:" labelCol={{ span: 4 }}>
<Radio.Group onChange={onChange2} value={radio} defaultValue={chee}>
<Radio value={0}>单选</Radio>
<Radio value={1}>多选</Radio>
......@@ -2239,7 +2056,7 @@ const AddModal = props => {
case '图片':
// case '可预览图片':
return (
<Item name="ReadOnly" label="选项" labelCol={{ span: 3 }}>
<Item name="ReadOnly" label="选项" labelCol={{ span: 4 }}>
<div>
<Checkbox
checked={pramData.picture}
......@@ -2263,20 +2080,20 @@ const AddModal = props => {
<Item
label="表名"
name="tableName"
labelCol={{ span: 6 }}
labelCol={{ span: 8 }}
rules={[{ required: true, message: '请输入表名' }]}
>
<Input style={{ width: '95%' }} placeholder="请输入表名" />
<Input placeholder="请输入表名" />
</Item>
</Col>
<Col span={12}>
<Item
label="字段名"
name="fieldName"
labelCol={{ span: 5 }}
labelCol={{ span: 8 }}
rules={[{ required: true, message: '请输入表名' }]}
>
<Input style={{ width: '85%' }} placeholder="请输入字段名" />
<Input placeholder="请输入字段名" />
</Item>
</Col>
</Row>
......@@ -2289,24 +2106,24 @@ const AddModal = props => {
<Item
label="表名"
name="tableName"
labelCol={{ span: 6 }}
labelCol={{ span: 8 }}
rules={[{ required: true, message: '请输入表名' }]}
>
<Input style={{ width: '95%' }} placeholder="请输入表名" />
<Input placeholder="请输入表名" />
</Item>
</Col>
<Col span={12}>
<Item
label="字段名"
name="fieldName"
labelCol={{ span: 5 }}
labelCol={{ span: 8 }}
rules={[{ required: true, message: '请输入表名' }]}
>
<Input style={{ width: '85%' }} placeholder="请输入字段名" />
<Input placeholder="请输入字段名" />
</Item>
</Col>
</Row>
<Item colon={false} name="check" label="配置:" labelCol={{ span: 3 }}>
<Item colon={false} name="check" label="配置:" labelCol={{ span: 4 }}>
<Radio.Group onChange={onChange2} value={radio} defaultValue={chee}>
<Radio value={0}>单选</Radio>
<Radio value={1}>多选</Radio>
......@@ -2320,14 +2137,10 @@ const AddModal = props => {
<Item
label="配置"
name="Config"
labelCol={{ span: 3 }}
labelCol={{ span: 4 }}
// rules={[{ required: true, message: '请输入数据字典名称' }]}
>
<TextArea
allowClear
style={{ width: '93%' }}
placeholder="请输入数据字典名称"
/>
<TextArea allowClear placeholder="请输入数据字典名称" />
</Item>
</>
);
......@@ -2337,16 +2150,12 @@ const AddModal = props => {
<Item
label="数据字典名称"
name="Config"
labelCol={{ span: 7 }}
labelCol={{ span: 4 }}
// rules={[{ required: true, message: '请输入数据字典名称' }]}
>
<Input
allowClear
style={{ width: '92%' }}
placeholder="请输入数据字典名称"
/>
<Input allowClear placeholder="请输入数据字典名称" />
</Item>
<Item colon={false} name="check" label="配置:" labelCol={{ span: 7 }}>
<Item colon={false} name="check" label="配置:" labelCol={{ span: 4 }}>
<Radio.Group onChange={onChange2} value={radio} defaultValue={chee}>
<Radio value={0}>单选</Radio>
<Radio value={1}>多选</Radio>
......@@ -2357,7 +2166,7 @@ const AddModal = props => {
case '部门选择器':
return (
<>
<Item colon={false} name="check" label="配置:" labelCol={{ span: 3 }}>
<Item colon={false} name="check" label="配置:" labelCol={{ span: 4 }}>
<Radio.Group onChange={onChange2} value={radio} defaultValue={chee}>
<Radio value={0}>单选</Radio>
<Radio value={1}>多选</Radio>
......@@ -2367,32 +2176,7 @@ const AddModal = props => {
);
case '站点选择器':
return (
<Item
name="Config"
labelCol={{ span: 3 }}
label={
<div>
<Tooltip title="默认全局多选">
<InfoCircleOutlined
style={{
color: 'rgb(24 144 255)',
marginRight: '2px',
}}
/>
</Tooltip>
<span>配置</span>
</div>
}
>
{/* <Select
placeholder="默认为全局.n即全局多选,.n为多选(全局时勾选由问题)"
style={{ width: '93%' }}
>
<Select.Option value="全局.n">全局(多选)</Select.Option>
<Select.Option value="全局">全局</Select.Option>
<Select.Option value="本人.n">本人(多选)</Select.Option>
<Select.Option value="本人">本人</Select.Option>
</Select> */}
<Item name="Config" labelCol={{ span: 4 }} label="配置">
<div style={{ display: 'inline-block' }}>
<Item name="pepole" style={{ marginBottom: '0' }}>
<Checkbox
......@@ -2421,32 +2205,42 @@ const AddModal = props => {
return (
<>
<Row>
<Col span={12}>
<Col span={16}>
<Item
label="台账名"
name="standingBook"
labelCol={{ span: 6 }}
rules={[{ required: true, message: '请输入台账名' }]}
>
<Input style={{ width: '95%' }} placeholder="请输入台账名" />
<Select showSearch style={{ width: '95%' }}>
{keepStandingBook
? keepStandingBook.map((item, index) => (
<Option key={index} value={item}>
{item}
</Option>
))
: ''}
</Select>
</Item>
</Col>
<Col span={12}>
<Col span={8}>
<Item
label="字段名"
name="fieldName"
labelCol={{ span: 5 }}
labelCol={{ span: 8 }}
rules={[{ required: true, message: '请输入字段名' }]}
>
<Input style={{ width: '85%' }} placeholder="请输入字段名" />
</Item>
</Col>
<Col span={12}>
<Item label="台账过滤" name="filterName" labelCol={{ span: 6 }}>
<Input style={{ width: '95%' }} placeholder="请输入字段名" />
<Input placeholder="请输入字段名" />
</Item>
</Col>
<Col span={2}>
</Row>
{/* <Col span={12}> */}
<Item label="SQL过滤" name="filterName" labelCol={{ span: 4 }}>
<TextArea placeholder="示例:部门='研发一部'" />
</Item>
{/* </Col> */}
{/* <Col span={2}>
<span style={{ marginLeft: '20px' }}>=</span>
</Col>
<Col span={9}>
......@@ -2456,9 +2250,9 @@ const AddModal = props => {
placeholder="请输入过滤条件"
/>
</Item>
</Col>
</Row>
<Item colon={false} name="check" label="配置:" labelCol={{ span: 3 }}>
</Col> */}
<Item colon={false} name="check" label="配置:" labelCol={{ span: 4 }}>
<Radio.Group onChange={onChange2} value={radio} defaultValue={chee}>
<Radio value={0}>单选</Radio>
<Radio value={1}>多选</Radio>
......@@ -2469,125 +2263,14 @@ const AddModal = props => {
case '人员选择器':
return (
<>
{/* <Item colon={false} label="全部:" name="All" labelCol={{ span: 3 }}>
<Radio.Group onChange={onChange1} value={radio1}>
<Radio value="0">否</Radio>
<Radio value="全部">是</Radio>
</Radio.Group>
</Item> */}
{/* {(() => {
switch (radio1) {
case '全部':
return (
<>
<Item
colon={false}
label="全部ID:"
name="AllID"
labelCol={{ span: 3 }}
>
<Radio.Group onChange={onChange3} value={radio3}>
<Radio value="0">否</Radio>
<Radio value="全部ID">是</Radio>
</Radio.Group>
</Item>
<Item
colon={false}
name="check"
label="形态功能:"
labelCol={{ span: 3 }}
>
<Radio.Group onChange={onChange2} value={radio}>
<Radio value={0}>单选</Radio>
<Radio value={1}>多选</Radio>
</Radio.Group>
</Item>
<Item
label="角色或机构名称"
name="ConfigName"
labelCol={{ span: 5 }}
rules={[
{
validator: (rule, value) => {
let str = /[.]/g;
if (str.test(form.getFieldValue().ConfigName)) {
return Promise.reject('.作为分隔符,请勿输入');
}
return Promise.resolve();
},
},
]}
>
<Input
allowClear
style={{ width: '92%' }}
placeholder="请输入角色或机构名称"
onChange={inputOnChange}
/>
</Item>
<Item label="配置" name="ShowConfig" labelCol={{ span: 5 }}>
<Input allowClear style={{ width: '92%' }} disabled />
</Item>
</>
);
case '0':
return (
<>
<Item
colon={false}
name="check"
label="形态功能:"
labelCol={{ span: 3 }}
>
<Radio.Group onChange={onChange2} value={radio}>
<Radio value={0}>单选</Radio>
<Radio value={1}>多选</Radio>
</Radio.Group>
</Item>
<Item
label="角色或机构或部门名称"
name="Config"
labelCol={{ span: 7 }}
rules={[
{
required: true,
message: '请输入角色或机构或部门名称',
},
{
validator: (rule, value) => {
let str = /[.]/g;
if (str.test(form.getFieldValue().Config)) {
return Promise.reject('.作为分隔符,请勿输入');
}
return Promise.resolve();
},
},
]}
>
<Input
allowClear
style={{ width: '93%' }}
placeholder="请输入角色或机构或部门名称"
onChange={inputOnchange}
/>
</Item>
<Item label="配置" name="ShowConfig" labelCol={{ span: 5 }}>
<Input allowClear style={{ width: '92%' }} disabled />
</Item>
</>
);
}
})()} */}
<Item
labelCol={{ span: 3 }}
labelCol={{ span: 4 }}
label={
<div>
<Tooltip
title={
<>
<span>默认非全部,展示形式为下拉框</span>
<span>默认展示形式为下拉框</span>
<Image width={200} src={partImage} />
</>
}
......@@ -2606,7 +2289,7 @@ const AddModal = props => {
<Tooltip
title={
<>
<span>全部,展示形式为弹窗</span>
<span>展示形式为弹窗显示人员所属机构</span>
<Image width={200} src={AllImage} />
</>
}
......@@ -2629,18 +2312,6 @@ const AddModal = props => {
</Checkbox>
</Item>
</div>
<div style={{ display: 'inline-block', marginRight: '10px' }}>
<Item name="AllID1" style={{ marginBottom: '0' }}>
<Checkbox
checked={checkboxAllID1}
onChange={changeAllID1}
style={{ marginBottom: '0' }}
disabled={hide}
>
存储ID
</Checkbox>
</Item>
</div>
<div style={{ display: 'inline-block', marginRight: '10px' }}>
<Item name="choose" style={{ marginBottom: '0' }}>
<Checkbox
......@@ -2652,18 +2323,18 @@ const AddModal = props => {
</Checkbox>
</Item>
</div>
{/* <div style={{ display: 'inline-block', marginRight: '10px' }}>
<Item name="department" style={{ marginBottom: '0' }}>
<div style={{ display: 'inline-block', marginRight: '10px' }}>
<Item name="AllID1" style={{ marginBottom: '0' }}>
<Checkbox
checked={checkboxAllID1}
onChange={changeAllID1}
style={{ marginBottom: '0' }}
disabled={hide}
>
展示部门
ID存储
</Checkbox>
</Item>
</div> */}
</div>
</Item>
{(() => {
switch (flag) {
......@@ -2673,7 +2344,7 @@ const AddModal = props => {
<Item
label="角色|机构"
name="ConfigName"
labelCol={{ span: 3 }}
labelCol={{ span: 4 }}
rules={[
{
validator: (rule, value) => {
......@@ -2688,7 +2359,6 @@ const AddModal = props => {
>
<Input
allowClear
style={{ width: '93%' }}
placeholder="请输入角色或机构名称"
onChange={inputOnChange}
/>
......@@ -2701,7 +2371,7 @@ const AddModal = props => {
<Item
label="角色|机构"
name="Config"
labelCol={{ span: 3 }}
labelCol={{ span: 4 }}
rules={[
{
required: true,
......@@ -2720,7 +2390,6 @@ const AddModal = props => {
>
<Input
allowClear
style={{ width: '93%' }}
placeholder="请输入角色或机构名称"
onChange={inputOnchange}
/>
......@@ -2739,7 +2408,7 @@ const AddModal = props => {
case '日期周':
case '时分秒':
return (
<Item label="选项" name="Config" labelCol={{ span: 3 }}>
<Item label="选项" name="Config" labelCol={{ span: 4 }}>
<Radio.Group
style={{ marginTop: '0.3rem' }}
value={timeData}
......@@ -2761,7 +2430,7 @@ const AddModal = props => {
);
case '坐标控件':
return (
<Item label="选项" name="Config" labelCol={{ span: 3 }}>
<Item label="选项" name="Config" labelCol={{ span: 4 }}>
<div>
<Checkbox
value="当前坐标"
......@@ -2775,7 +2444,7 @@ const AddModal = props => {
);
case '位置坐标':
return (
<Item label="字段名称" name="Config" labelCol={{ span: 3 }}>
<Item label="字段名称" name="Config" labelCol={{ span: 4 }}>
<Input
allowClear
style={{ width: '93%' }}
......@@ -2801,8 +2470,8 @@ const AddModal = props => {
return <></>;
default:
return (
<Item label="配置" name="Config" labelCol={{ span: 3 }}>
<TextArea allowClear style={{ width: '93%' }} placeholder={detail} />
<Item label="配置" name="Config" labelCol={{ span: 4 }}>
<TextArea allowClear placeholder={detail} />
</Item>
);
}
......@@ -2811,7 +2480,7 @@ const AddModal = props => {
{Shape === '图片' || Shape === '可预览图片' ? (
''
) : (
<Item label="预设值" labelCol={{ span: 3 }}>
<Item label="预设值" labelCol={{ span: 4 }}>
{/* <div className={styles.listEvent}> */}
<Row>
<Col span={10}>
......@@ -2827,7 +2496,7 @@ const AddModal = props => {
<Item
style={{ marginLeft: '1rem' }}
label="验证"
labelCol={{ span: 5 }}
labelCol={{ span: 8 }}
name="ValidationRule"
>
<Input style={{ width: '92%' }} placeholder="" allowClear />
......
......@@ -27,6 +27,7 @@ import {
reloadTableFields,
removeFields,
loadUnattachedTables,
LoadLedgers,
} from '@/services/tablemanager/tablemanager';
import { useHistory } from 'react-router-dom';
import FieldEditor from './fieldEditor';
......@@ -61,6 +62,7 @@ const AddModal = props => {
const [deleteUserVisible, setDeleteUserVisible] = useState(false); // 批量删除
const [checkStrictly, setCheckStrictly] = useState(false);
const [selectGroup, setSelectGroup] = useState([]);
const [keepStandingBook, setKeepStandingBook] = useState([]);
const editor = record => {
console.log(record);
......@@ -300,6 +302,17 @@ const AddModal = props => {
},
},
];
useEffect(() => {
LoadLedgers().then(res => {
if (res.code === 0) {
let data = [];
res.data.root.map(i => {
data.push(i.name);
});
setKeepStandingBook(data);
}
});
}, []);
useEffect(() => {
console.log(props);
......@@ -724,6 +737,7 @@ const AddModal = props => {
treeData={treeData}
keepTreeFirst={keepTreeFirst}
callBackSubmit={Submit}
keepStandingBook={keepStandingBook}
/>
{visible && type === 'affiliateAdd' && (
<AffiliateAdd
......
/* eslint-disable indent */
/* eslint-disable camelcase */
/* eslint-disable no-unused-expressions */
import React, { useState, useEffect } from 'react';
import {
Drawer,
......@@ -11,9 +14,10 @@ import {
Dropdown,
Menu,
Space,
Radio,
} from 'antd';
import { PlusOutlined, DownOutlined, StepForwardFilled } from '@ant-design/icons';
import styles from './maintenance.less';
import ModalDrag from './ModalDrag';
import {
CM_XWBPlan_AccountTable,
CM_XWBPlan_feedbackTable,
......@@ -21,7 +25,7 @@ import {
CM_XWBPlan_DataList,
} from '@/services/maintenance/api';
import { CM_Event_LoadDepartmentAndRoles } from '@/services/standingBook/api';
import { PlusOutlined, DownOutlined, StepForwardFilled } from '@ant-design/icons';
import ChangeAdd from './ChangeAdd';
const { Option } = Select;
......@@ -30,7 +34,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('');
......@@ -45,28 +49,35 @@ const AddModal = props => {
const [checkedList1, setCheckedList1] = useState([]); // 最新选择数据
const [characterValue, setCharacterValue] = useState(''); // 打开弹框之前数据
const [ff, setFf] = useState([]);
const [chee, setChee] = useState('');
const [form] = Form.useForm();
const { Item } = Form;
const { TextArea } = Input;
useEffect(() => {
getRole();
if (type === 'add') {
setType1('');
setType2('');
setInputValue({ feedbackName: '', doRole: '' });
setFiled1({});
if (visible) {
getRole();
if (type === 'add') {
setChee('否');
form.setFieldsValue({ isSubmit: '否', docycle: '一周一次' });
setType1('');
setType2('');
setInputValue({ feedbackName: '', doRole: '' });
setFiled1({});
} else if (type === 'edit') {
CM_XWBPlan_DataList({ id: formObj.id }).then(res => {
let data = res.data[0];
data && form.setFieldsValue({ ...data });
setInputValue({ ...data });
console.log(data.businessTypee);
setType1(data.businessType);
setType2(data.accountName);
});
}
} else {
setChee('');
form.resetFields();
} else if (type === 'edit') {
CM_XWBPlan_DataList({ id: formObj.id }).then(res => {
let data = res.data[0];
data && form.setFieldsValue({ ...data });
setInputValue({ ...data });
console.log(data.businessTypee);
setType1(data.businessType);
setType2(data.accountName);
});
}
}, [visible]);
......@@ -270,12 +281,19 @@ const AddModal = props => {
setInputValue(inputText);
};
// const title = <ModalDrag title="巡维保计划配置" />
const inputType = value => {
console.log(value);
if (value) {
form.setFieldsValue({ businessType: value });
}
};
return (
<Drawer
title="巡维保计划配置"
visible={visible}
destroyOnClose
width="600px"
width="650px"
{...props}
footer={
<Space>
......@@ -297,28 +315,36 @@ 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="业务名称不可重复" />
</Item>
</Col>
<Col span={23}>
<span
style={{
position: 'absolute',
left: '1%',
top: '9%',
color: 'red',
fontSize: '16px',
}}
>
*
</span>
<Item
label="业务类型"
name="businessType"
labelCol={{ span: 4 }}
rules={[
{
required: true,
message: '请输入业务名称',
},
{
validator: (rule, value) => {
if (form.getFieldsValue().businessType == '') {
......@@ -329,67 +355,15 @@ const AddModal = props => {
},
]}
>
<div>
<Input
className="ue-editable-select-input"
onChange={inputType1}
value={Type1}
placeholder="选择或手动输入业务类型"
/>
<Dropdown
placement="bottomRight"
style={{ width: '430px' }}
overlay={
<Menu>
<Menu.Item
key="巡检"
onClick={() => {
setType1('巡检');
form.setFieldsValue({ businessType: '巡检' });
}}
style={{ width: '430px', marginLeft: '-8px' }}
>
巡检
</Menu.Item>
<Menu.Item
key="保养"
onClick={() => {
setType1('保养');
form.setFieldsValue({ businessType: '保养' });
}}
style={{ width: '430px', marginLeft: '-8px' }}
>
保养
</Menu.Item>
</Menu>
}
>
<div className={styles.linkDrowp} onClick={e => e.preventDefault()}>
<DownOutlined
style={{
fontSize: '12px',
color: 'rgba(0, 0, 0, 0.25)',
marginLeft: '5px',
}}
/>
</div>
</Dropdown>
</div>
<Select placeholder="选择业务类型" onSearch={inputType} showSearch>
<Option value="巡检">巡检</Option>
<Option value="保养">保养</Option>
</Select>
</Item>
</Col>
<Col span={23}>
<Item
label="执行周期"
name="docycle"
labelCol={{ span: 4 }}
rules={[
{
required: true,
message: '请选择执行周期',
},
]}
>
<Select placeholder="选择计划执行周期" onChange={changTable} value={selectValue}>
<Item label="执行周期" name="docycle" labelCol={{ span: 4 }}>
<Select placeholder="选择计划执行周期">
<Option value="一周一次">一周一次</Option>
<Option value="半月一次">半月一次</Option>
<Option value="一月一次">一月一次</Option>
......@@ -400,22 +374,15 @@ const AddModal = props => {
</Item>
</Col>
<Col span={23}>
<span
style={{
position: 'absolute',
left: '1%',
top: '9%',
color: 'red',
fontSize: '16px',
}}
>
*
</span>
<Item
label="台账名称"
name="accountName"
labelCol={{ span: 4 }}
rules={[
{
required: true,
message: '请输入业务名称',
},
{
validator: (rule, value) => {
if (form.getFieldsValue().accountName == '') {
......@@ -426,73 +393,27 @@ const AddModal = props => {
},
]}
>
<div>
<Input
className="ue-editable-select-input"
onChange={inputType2}
value={Type2}
placeholder="选择此计划关联的设备台账名称"
/>
<Dropdown
placement="bottomRight"
style={{ width: '430px' }}
overlay={
<Menu>
{treeData.length ? (
treeData.map((item, index) => {
return (
<Menu.Item
onClick={() => {
setType2(item);
form.setFieldsValue({ accountName: item });
}}
style={{ width: '430px', marginLeft: '-8px' }}
key={index}
>
{item}
</Menu.Item>
);
})
) : (
<Menu.Item style={{ width: '430px', marginLeft: '-8px' }}>
<span style={{ color: 'red' }}>
暂无数据,请先配置台账管理台账名称为设备
</span>
</Menu.Item>
)}
</Menu>
}
>
<div className={styles.linkDrowp} onClick={e => e.preventDefault()}>
<DownOutlined
style={{
fontSize: '12px',
color: 'rgba(0, 0, 0, 0.25)',
marginLeft: '5px',
}}
/>
</div>
</Dropdown>
</div>
<Select placeholder="选择此计划关联的设备台账名称" showSearch>
{treeData
? treeData.map((item, index) => (
<Option key={index} value={item}>
{item}
</Option>
))
: ''}
</Select>
</Item>
</Col>
<Col span={23}>
<span
style={{
position: 'absolute',
left: '1%',
top: '9%',
color: 'red',
fontSize: '16px',
}}
>
*
</span>
<Item
label="反馈名称"
name="feedbackName"
labelCol={{ span: 4 }}
rules={[
{
required: true,
message: '请输入业务名称',
},
{
validator: (rule, value) => {
if (inputValue.feedbackName == '') {
......@@ -515,28 +436,21 @@ const AddModal = props => {
type="dashed"
onClick={() => pickFiled('feedbackName')}
icon={<PlusOutlined style={{ marginTop: '5px' }} />}
style={{ marginLeft: '0.5rem', width: '4rem' }}
style={{ marginLeft: '10px', width: '70px' }}
/>
</div>
</Item>
</Col>
<Col span={23}>
<span
style={{
position: 'absolute',
left: '1%',
top: '9%',
color: 'red',
fontSize: '16px',
}}
>
*
</span>
<Item
label="执行角色"
name="doRole"
labelCol={{ span: 4 }}
rules={[
{
required: true,
message: '请输入业务名称',
},
{
validator: (rule, value) => {
if (inputValue.doRole == '') {
......@@ -559,7 +473,7 @@ const AddModal = props => {
type="dashed"
onClick={() => pickFiled1('doRole')}
icon={<PlusOutlined style={{ marginTop: '5px' }} />}
style={{ marginLeft: '0.5rem', width: '4rem' }}
style={{ marginLeft: '10px', width: '70px' }}
/>
</div>
</Item>
......@@ -594,26 +508,16 @@ const AddModal = props => {
</Item>
</Col>
<Col span={23}>
<Item
label="是否送审"
name="isSubmit"
labelCol={{ span: 4 }}
rules={[
{
required: true,
message: '请选择是否送审',
},
]}
>
<Select placeholder="是否送审" onChange={changTable1} value={selectValue1}>
<Option value="否"></Option>
<Option value="是"></Option>
</Select>
<Item label="是否送审" name="isSubmit" labelCol={{ span: 4 }}>
<Radio.Group defaultValue={chee}>
<Radio value="否"></Radio>
<Radio value="是"></Radio>
</Radio.Group>
</Item>
</Col>
<Col span={23}>
<Item label="台账过滤条件" name="filterCondition" labelCol={{ span: 4 }}>
<TextArea placeholder="设备对应的Scada台账名称,可多选" />
<Item label="SQL过滤" name="filterCondition" labelCol={{ span: 4 }}>
<TextArea placeholder="例如:and 泵房品牌='熊猫'" />
</Item>
</Col>
</Row>
......
......@@ -88,6 +88,7 @@ const ChangeAdd = props => {
console.log(indeterminate);
if (type == 'edit') {
if (isType != '' && isType === 'add') {
// 反馈名称
let checkArr = [];
console.log(newCheckedList);
newCheckedList.map(checkItem => {
......@@ -96,11 +97,12 @@ const ChangeAdd = props => {
}
});
setCheckedList(checkArr);
setIndeterminate(!!newCheckedList.length && newCheckedList.length < filed.length);
setCheckAll(newCheckedList.length === filed.length);
setIndeterminate(!!checkArr.length && checkArr.length < filed.length);
setCheckAll(checkArr.length === filed.length);
let newArr = characterValue.length ? characterValue.split(',') : [];
setSelectData(newArr);
} else if (isType === 'app') {
// 执行角色
let checkArr = [];
console.log(newCheckedList);
newCheckedList.map(checkItem => {
......@@ -109,26 +111,30 @@ const ChangeAdd = props => {
}
});
setCheckedList(checkArr);
setIndeterminate(!!newCheckedList.length && newCheckedList.length < ff.length);
setCheckAll(newCheckedList.length === ff.length);
setIndeterminate(!!checkArr.length && checkArr.length < ff.length);
setCheckAll(checkArr.length === ff.length);
let newArr = characterValue.length ? characterValue.split(',') : [];
setSelectData(newArr);
}
} else {
if (isType != '' && isType === 'add') {
// 反馈名称
let checkArr = [];
console.log(filed);
console.log(newCheckedList);
newCheckedList.map(checkItem => {
if (filed.includes(checkItem)) {
checkArr.push(checkItem);
}
});
console.log(checkArr);
setCheckedList(checkArr);
setIndeterminate(false);
setCheckAll(false);
setIndeterminate(!!checkArr.length && checkArr.length < filed.length);
setCheckAll(checkArr.length === filed.length);
let newArr = characterValue.length ? characterValue.split(',') : [];
setSelectData(newArr);
} else if (isType === 'app') {
// 执行角色
let checkArr = [];
console.log(newCheckedList);
newCheckedList.map(checkItem => {
......@@ -137,8 +143,8 @@ const ChangeAdd = props => {
}
});
setCheckedList(checkArr);
setIndeterminate(false);
setCheckAll(false);
setIndeterminate(!!checkArr.length && checkArr.length < ff.length);
setCheckAll(checkArr.length === ff.length);
let newArr = characterValue.length ? characterValue.split(',') : [];
setSelectData(newArr);
}
......
......@@ -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 = [
{
......@@ -47,7 +48,7 @@ const maintenance = () => {
title: '业务类型',
dataIndex: 'businessType',
key: 'businessType',
// width: 100,
width: 100,
onCell: () => ({
style: {
maxWidth: 100,
......@@ -68,26 +69,17 @@ const maintenance = () => {
title: '执行周期',
dataIndex: 'docycle',
key: 'docycle',
// width: 100,
onCell: () => ({
style: {
maxWidth: 100,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
cursor: 'pointer',
},
}),
width: 100,
align: 'center',
},
{
title: '台账名称',
dataIndex: 'accountName',
key: 'accountName',
// width: 100,
width: 200,
onCell: () => ({
style: {
maxWidth: 100,
maxWidth: 200,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
......@@ -105,10 +97,9 @@ const maintenance = () => {
title: '反馈名称',
dataIndex: 'feedbackName',
key: 'feedbackName',
width: 200,
onCell: () => ({
style: {
maxWidth: 200,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
......@@ -126,10 +117,10 @@ const maintenance = () => {
title: '台账过滤条件',
dataIndex: 'filterCondition',
key: 'filterCondition',
// width: 150,
width: 150,
onCell: () => ({
style: {
maxWidth: 200,
maxWidth: 150,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
......@@ -148,32 +139,22 @@ const maintenance = () => {
dataIndex: 'isSubmit',
key: 'isSubmit',
width: 80,
onCell: () => ({
style: {
maxWidth: 100,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
cursor: 'pointer',
},
}),
align: 'center',
},
{
title: '执行角色',
dataIndex: 'doRole',
key: 'doRole',
width: 300,
align: 'center',
onCell: () => ({
style: {
maxWidth: 350,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
cursor: 'pointer',
},
}),
align: 'center',
render: record => (
<Tooltip placement="topLeft" title={record}>
{record}
......@@ -185,32 +166,32 @@ const maintenance = () => {
dataIndex: 'produceDays',
key: 'produceDays',
width: 80,
align: 'center',
onCell: () => ({
style: {
maxWidth: 100,
maxWidth: 80,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
cursor: 'pointer',
},
}),
align: 'center',
},
{
title: '在线任务量',
dataIndex: 'onLines',
key: 'onLines',
width: 80,
align: 'center',
onCell: () => ({
style: {
maxWidth: 100,
maxWidth: 80,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
cursor: 'pointer',
},
}),
align: 'center',
render: record => (
<Tooltip placement="topLeft" title={record}>
{record}
......@@ -221,16 +202,7 @@ const maintenance = () => {
title: '启停',
dataIndex: 'doNot',
key: 'doNot',
// width: 100,
onCell: () => ({
style: {
maxWidth: 100,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
cursor: 'pointer',
},
}),
width: 80,
align: 'center',
},
{
......@@ -265,6 +237,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 +365,7 @@ const maintenance = () => {
onClose={() => setAddVisible(false)}
callBackSubmit={onSubmit}
formObj={formObj}
keepTableData={keepTableData}
placement="right"
/>
<SortModal
......
......@@ -7,7 +7,7 @@
* @Description:
* @Author: leizhe
* @Date: 2022-04-06 11:38:46
* @LastEditTime: 2022-05-23 10:49:46
* @LastEditTime: 2022-06-22 13:53:09
* @LastEditors: leizhe
*/
import React, { useState, useEffect } from 'react';
......@@ -119,8 +119,8 @@ const DrawBoardManage = () => {
const updateTrees = e => {
setTreeLoading(true);
typeList().then(res => {
setTreeLoading(false);
if (res.code === 0) {
setTreeLoading(false);
if (e) {
let aa = res.data.find(i => i.name === e);
setPickItem(aa);
......
/* eslint-disable react/jsx-boolean-value */
import React, { useState, useEffect } from 'react';
import {
Form,
Modal,
Input,
notification,
Radio,
InputNumber,
Checkbox,
Switch,
Tooltip,
Row,
Col,
} from 'antd';
import { SaveRoutes } from '@/services/hostmanager/hostmanager';
import { InfoCircleOutlined } from '@ant-design/icons';
const { Item } = Form;
const AddModal = props => {
const { callBackSubmit = () => {}, type, pickItem, visible, onCancel } = props;
const [loading, setLoading] = useState(false);
const [current, setCurrent] = useState(false);
const [advanced, setAdvanced] = useState(0);
const [form] = Form.useForm();
useEffect(() => {
if (visible) {
if (type === 'edit') {
let aa = pickItem.methods.replace(/\s/g, '');
form.setFieldsValue({
UpstreamPathTemplate: pickItem.upstreamPathTemplate,
DownstreamPathTemplate: pickItem.downstreamPathTemplate,
Methods: aa.split(','),
Url: pickItem.url,
IsAuthentication: pickItem.isAuthentication,
Key: pickItem.key,
Priority: pickItem.priority,
UpstreamHost: pickItem.upstreamHost,
AddHeasersToRequest: pickItem.addHeasersToRequest,
UpstreamHeaderTransform: pickItem.upstreamHeaderTransform,
DownstreamHeaderTransform: pickItem.downstreamHeaderTransform,
Timeout: pickItem.timeout,
QoSOptions: pickItem.qoSOptions,
RateLimitOptions: pickItem.rateLimitOptions,
CacheOptions: pickItem.cacheOptions,
LoadBalancerOptions: pickItem.loadBalancerOptions,
SecurityOptions: pickItem.securityOptions,
RequestIdKey: pickItem.requestIdKey,
ServiceName: pickItem.serviceName,
ServiceNamespace: pickItem.serviceNamespace,
DelegatingHandlers: pickItem.delegatingHandlers,
ReRouteIsCaseSensitive: pickItem.reRouteIsCaseSensitive,
DownstreamHttpMethod: pickItem.downstreamHttpMethod,
});
if (
pickItem.upstreamHost ||
pickItem.addHeasersToRequest ||
pickItem.upstreamHeaderTransform ||
pickItem.downstreamHeaderTransform ||
pickItem.timeout ||
pickItem.qoSOptions ||
pickItem.rateLimitOptions ||
pickItem.cacheOptions ||
pickItem.loadBalancerOptions ||
pickItem.securityOptions ||
pickItem.requestIdKey ||
pickItem.serviceName ||
pickItem.serviceNamespace ||
pickItem.delegatingHandlers ||
pickItem.reRouteIsCaseSensitive ||
pickItem.downstreamHttpMethod
) {
setAdvanced(1);
setCurrent(true);
}
} else {
form.setFieldsValue({ IsAuthentication: true });
}
} else {
form.resetFields();
setAdvanced(0);
setCurrent(false);
}
}, [visible]);
// 提交
const onSubmit = () => {
form.validateFields().then(validate => {
if (validate) {
setLoading(true);
let obj = form.getFieldsValue();
console.log(obj.IsAuthentication);
console.log(obj.Ptiority);
let aa = obj.Methods.toString();
obj.Methods = aa.replace(/\s/g, '');
console.log(obj.Methods);
let data = {
UpstreamPathTemplate: obj.UpstreamPathTemplate || null,
DownstreamPathTemplate: obj.DownstreamPathTemplate || null,
Methods: obj.Methods || null,
Url: obj.Url || null,
IsAuthentication: obj.IsAuthentication,
Key: obj.Key || null,
Priority: obj.Priority || null,
UpstreamHost: obj.UpstreamHost || null,
AddHeasersToRequest: obj.AddHeasersToRequest || null,
UpstreamHeaderTransform: obj.UpstreamHeaderTransform || null,
DownstreamHeaderTransform: obj.DownstreamHeaderTransform || null,
Timeout: obj.Timeout || null,
QoSOptions: obj.QoSOptions || null,
RateLimitOptions: obj.RateLimitOptions || null,
CacheOptions: obj.CacheOptions || null,
LoadBalancerOptions: obj.LoadBalancerOptions || null,
SecurityOptions: obj.SecurityOptions || null,
RequestIdKey: obj.RequestIdKey || null,
ServiceName: obj.ServiceName || null,
ServiceNamespace: obj.ServiceNamespace || null,
DelegatingHandlers: obj.DelegatingHandlers || null,
ReRouteIsCaseSensitive: obj.ReRouteIsCaseSensitive || null,
DownstreamHttpMethod: obj.DownstreamHttpMethod || null,
};
if (type === 'add') {
SaveRoutes([
{
...data,
IsEnable: 1,
},
])
.then(res => {
setLoading(false);
if (res.code === 0) {
onCancel();
callBackSubmit();
notification.success({
message: '提示',
duration: 3,
description: res.msg || '新增成功',
});
} else {
notification.error({
message: '提示',
duration: 3,
description: res.msg || '新增失败',
});
}
})
.catch(err => {
setLoading(false);
});
} else {
SaveRoutes([
{
id: pickItem.id,
...data,
IsEnable: 1,
},
])
.then(res => {
setLoading(false);
if (res.code === 0) {
onCancel();
callBackSubmit();
notification.success({
message: '提示',
duration: 3,
description: res.msg || '编辑成功',
});
} else {
notification.error({
message: '提示',
duration: 3,
description: res.msg || '编辑失败',
});
}
})
.catch(err => {
setLoading(false);
});
}
}
});
};
const layout = {
layout: 'horizontal',
labelCol: { span: 4 },
wrapperCol: { span: 18 },
};
const plainOptions = ['GET', 'POST', 'PUT', 'DELETE'];
const change = (e, event) => {
if (e) {
setAdvanced(1);
setCurrent(true);
} else {
setAdvanced(0);
setCurrent(false);
}
};
return (
<Modal
title={type === 'add' ? '新增网关配置' : '编辑网关配置'}
bodyStyle={{ width: '100%', maxHeight: '600px', overflow: 'scroll', minHeight: '360px' }}
width="700px"
destroyOnClose
maskClosable={false}
cancelText="取消"
okText="确认"
{...props}
onOk={() => onSubmit()}
confirmLoading={loading}
forceRender={true}
getContainer={false}
>
<Form form={form} {...layout}>
<Item
label="上游路由模板"
name="UpstreamPathTemplate"
rules={[
{
validator: (rule, value) => {
let aa = form.getFieldValue().UpstreamPathTemplate;
console.log(aa.startsWith('/'));
if (!aa.startsWith('/')) {
return Promise.reject('必须以/开头');
}
return Promise.resolve();
},
},
{
required: true,
message: '请输入上游路由模板',
},
]}
>
<Input allowClear style={{ width: '100%' }} placeholder="示例:/PandaOMS/PandaOMS/{url}" />
</Item>
<Item
label="下游路由模板"
name="DownstreamPathTemplate"
rules={[
{
validator: (rule, value) => {
let aa = form.getFieldValue().DownstreamPathTemplate;
console.log(aa.startsWith('/'));
if (!aa.startsWith('/')) {
return Promise.reject('必须以/开头');
}
return Promise.resolve();
},
},
{
required: true,
message: '请输入下游路由模板',
},
]}
>
<Input allowClear placeholder="示例:/{url}" />
</Item>
<Item
label="上游请求方式"
name="Methods"
rules={[
{
required: true,
message: '请选择上游请求方式',
},
]}
>
<Checkbox.Group options={plainOptions} style={{ display: 'flex' }} />
</Item>
<Item
label="下游服务地址"
name="Url"
rules={[
{
required: true,
message: '请输入下游服务地址',
},
]}
>
<Input allowClear placeholder="示例:http://localhost:8050" />
</Item>
<Item label="身份认证" name="IsAuthentication">
<Radio.Group>
<Radio value={true}>开启</Radio>
<Radio value={false}>关闭</Radio>
</Radio.Group>
</Item>
<Item
label="关键字"
name="Key"
rules={[
{
required: true,
message: '请输入关键字',
},
]}
>
<Input allowClear />
</Item>
<Row>
<Col span={8}>
<Item
// label={
// <div>
// <Tooltip title="0默认级别最低,10最高,优先级越高越先匹配">
// <InfoCircleOutlined
// style={{
// color: 'rgb(24, 144, 255)',
// marginLeft: '0px',
// marginRight: '5px',
// }}
// />
// </Tooltip>
// <span>优先级</span>
// </div>
// }
label="优先级"
name="Priority"
labelCol={{ span: 12 }}
>
<InputNumber min={0} max={10} defaultValue={0} />
</Item>
</Col>
<Col span={16}>
<Item>
<span style={{ color: 'red' }}>0默认级别最低,10最高,优先级越高越先匹配</span>
</Item>
</Col>
</Row>
{/* <Switch
checkedChildren="高级设置"
unCheckedChildren="高级设置"
onChange={change}
checked={current}
style={{ marginLeft: '40px', marginBottom: '15px' }}
/>
{advanced === 1 ? (
<>
<Item label="上游host" name="UpstreamHost">
<Input allowClear />
</Item>
<Item label="头部信息" name="AddHeasersToRequest">
<Input allowClear />
</Item>
<Item label="上游头信息转发" name="UpstreamHeaderTransform">
<Input allowClear />
</Item>
<Item label="下游头信息转发" name="DownstreamHeaderTransform">
<Input allowClear />
</Item>
<Item label="超时设置" name="Timeout">
<Input allowClear />
</Item>
<Item label="服务质量与熔断" name="QoSOptions">
<Input allowClear />
</Item>
<Item label="限流配置" name="RateLimitOptions">
<Input allowClear />
</Item>
<Item label="缓存" name="CacheOptions">
<Input allowClear />
</Item>
<Item label="负载均衡" name="LoadBalancerOptions">
<Input allowClear />
</Item>
<Item label="安全配置" name="SecurityOptions">
<Input allowClear />
</Item>
<Item label="请求Id Key" name="RequestIdKey">
<Input allowClear />
</Item>
<Item label="服务名" name="ServiceName">
<Input allowClear />
</Item>
<Item label="服务空间" name="ServiceNamespace">
<Input allowClear />
</Item>
<Item label="委托配置" name="DelegatingHandlers">
<Input allowClear />
</Item>
<Item label="路由大小写敏感" name="ReRouteIsCaseSensitive">
<Radio.Group>
<Radio value={0}>否</Radio>
<Radio value={1}>是</Radio>
</Radio.Group>
</Item>
<Item label="下游请求方式" name="DownstreamHttpMethod">
<Checkbox.Group options={plainOptions} />
</Item>
</>
) : (
''
)} */}
</Form>
</Modal>
);
};
export default AddModal;
/* eslint-disable no-else-return */
import React, { useEffect, useState } from 'react';
import { Card, Form, Switch, message, Divider, Row, Col, Spin } from 'antd';
import {
Card,
Form,
Switch,
message,
Divider,
Row,
Col,
Spin,
Tooltip,
Input,
Space,
Button,
Popconfirm,
Table,
notification,
} from 'antd';
import {
EditTwoTone,
DeleteOutlined,
PlusOutlined,
SyncOutlined,
SearchOutlined,
} from '@ant-design/icons';
import styles from './gateWay.less';
import { GetGateWay, UpdateGeteWay } from '@/services/hostmanager/hostmanager';
import {
GetGateWay,
UpdateGeteWay,
GetReRoutes,
DelRoutes,
} from '@/services/hostmanager/hostmanager';
import configuration from '../../../../assets/images/icons/消息.svg';
import AddModal from './AddModal';
const GateConfig = () => {
const [loading, setLoading] = useState(false); // 加载
const [form] = Form.useForm();
const [flag, setFlag] = useState(1);
const [currentConfig, setCurrentConfig] = useState();
const [tableData, setTableData] = useState([]);
const [showSearchStyle, setShowSearchStyle] = useState(false); // 是否显示模糊查询样式
const [searchWord, setSearchWord] = useState(''); // 关键字
const [searchWord1, setSearchWord1] = useState(''); // 关键字
const [addVisible, setAddVisible] = useState(false);
const [pickItem, setPickItem] = useState('');
const [type, setType] = useState('');
const { Search } = Input;
const OperateNginx = checked => {
console.log(checked);
......@@ -34,22 +73,250 @@ const GateConfig = () => {
GetGateWay().then(res => {
if (res.code === 0) {
setCurrentConfig(res.data);
console.log(res.data);
console.log(currentConfig);
}
});
setLoading(true);
GetReRoutes({
UpstreamPathTemplate: '',
key: '',
}).then(res => {
setLoading(false);
if (res.code === 0) {
setTableData(res.data);
}
});
}, [flag]);
const columns = [
{
title: '上游路由模板',
dataIndex: 'upstreamPathTemplate',
key: 'upstreamPathTemplate',
align: 'center',
ellipsis: true,
render: (text, record) => (
<span>
<Tooltip placement="top" title={text}>
{searchStyle(text)}
</Tooltip>
</span>
),
},
{
title: '上游请求方式',
dataIndex: 'methods',
key: 'methods',
align: 'center',
ellipsis: true,
width: 200,
render: (text, record) => (
<span>
<Tooltip placement="top" title={text}>
{text}
</Tooltip>
</span>
),
},
{
title: '下游服务地址',
dataIndex: 'url',
key: 'url',
align: 'center',
ellipsis: true,
width: 250,
render: (text, record) => (
<span>
<Tooltip placement="top" title={text}>
{text}
</Tooltip>
</span>
),
},
{
title: '下游路由模板',
dataIndex: 'downstreamPathTemplate',
key: 'downstreamPathTemplate',
ellipsis: true,
align: 'center',
render: (text, record) => (
<span>
<Tooltip placement="top" title={text}>
{text}
</Tooltip>
</span>
),
},
{
title: '关键字',
dataIndex: 'key',
key: 'key',
align: 'center',
width: 100,
render: (text, record) => (
<span>
<Tooltip placement="top" title={text}>
{searchStyle1(text)}
</Tooltip>
</span>
),
},
{
title: '开启身份认证',
dataIndex: 'isAuthentication',
key: 'isAuthentication',
align: 'center',
width: 120,
render: (text, record) => {
if (text == true) {
return <span></span>;
} else {
return <span></span>;
}
},
},
{
title: '操作',
key: 'action',
width: 100,
align: 'center',
render: record => (
<Space size="middle">
<Tooltip title="编辑">
<EditTwoTone onClick={() => edit(record)} style={{ fontSize: '16px' }} />
</Tooltip>
<Tooltip title="删除">
<Popconfirm
placement="bottomRight"
title={
<p>
即将删除 <span>{record.loginName}</span>
,是否确认删除?
</p>
}
okText="确认"
cancelText="取消"
onConfirm={() => dele(record)}
>
<DeleteOutlined style={{ fontSize: '16px', color: '#e86060' }} />
</Popconfirm>
</Tooltip>
</Space>
),
},
];
// 模糊查询匹配的样式
const searchStyle = val => {
let n;
if (showSearchStyle) {
n = val.replace(new RegExp(searchWord, 'g'), `<span style='color:red'>${searchWord}</span>`);
} else {
n = val;
}
return <div dangerouslySetInnerHTML={{ __html: n }} />;
};
// 模糊查询匹配的样式
const searchStyle1 = val => {
let n;
if (showSearchStyle) {
n = val.replace(
new RegExp(searchWord1, 'g'),
`<span style='color:red'>${searchWord1}</span>`,
);
} else {
n = val;
}
return <div dangerouslySetInnerHTML={{ __html: n }} />;
};
const handleReset = () => {
setSearchWord('');
setSearchWord1('');
setShowSearchStyle(false);
setFlag(flag + 1);
};
const handleSearch = e => {
setSearchWord(e.target.value);
};
const handleSearch1 = e => {
setSearchWord1(e.target.value);
};
const submitSearch = () => {
setLoading(true);
GetReRoutes({ UpstreamPathTemplate: searchWord, Key: searchWord1 }).then(resnew => {
setLoading(false);
if (resnew.code === 0) {
setTableData(resnew.data);
setShowSearchStyle(true);
} else {
notification.error({
message: '查询失败',
description: resnew.msg,
});
}
});
};
const add = () => {
setType('add');
setAddVisible(true);
};
const edit = e => {
setType('edit');
setPickItem(e);
setAddVisible(true);
};
const dele = e => {
setPickItem(e);
let data = [];
data.push(e.id);
console.log(data);
if (e.id == 1) {
notification.error({
message: '删除失败',
description: '默认数据无法删除',
});
} else {
DelRoutes({
Ids: e.id,
}).then(res => {
if (res.code === 0) {
setFlag(flag + 1);
notification.success({
message: '删除成功',
description: res.msg,
});
} else {
notification.error({
message: '删除失败',
description: res.msg,
});
}
});
}
};
const onSubmit = () => {
setFlag(flag + 1);
};
return (
<div className={styles.gateWay_container}>
<Card style={{ width: '100%', height: 'calc(100vh - 130px)' }}>
<Spin spinning={loading} tip="loading">
<div style={{ display: 'flex', alignItems: 'center', marginTop: '10px' }}>
<img src={configuration} style={{ height: '16px' }} alt="" />
<span style={{ marginLeft: '10px', fontWeight: 'bold' }}>网关配置</span>
</div>
<Divider />
<div className={styles.operate_container}>
<div style={{ display: 'flex', alignItems: 'center', marginTop: '10px' }}>
<img src={configuration} style={{ height: '16px' }} alt="" />
<span style={{ marginLeft: '10px', fontWeight: 'bold' }}>网关配置</span>
</div>
<Divider />
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: '20px' }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<div
style={{
marginLeft: '35px',
......@@ -66,7 +333,86 @@ const GateConfig = () => {
</div>
{console.log(currentConfig)}
</div>
</Spin>
{currentConfig ? (
<div className={styles.head1}>
<span>快速搜索上游路由模板:</span>
<Input
value={searchWord}
placeholder="请输入上游路由模板"
style={{ width: 200 }}
onChange={handleSearch}
/>
<span style={{ marginLeft: '20px' }}>快速搜索关键字:</span>
<Input
value={searchWord1}
placeholder="请输入键值"
style={{ width: 200 }}
onChange={handleSearch1}
/>
<Button
type="primary"
icon={<SearchOutlined />}
onClick={submitSearch}
style={{ marginLeft: '20px' }}
>
搜索
</Button>
<Button icon={<SyncOutlined />} onClick={handleReset} style={{ marginLeft: '20px' }}>
重置
</Button>
<Button
icon={<PlusOutlined className={styles.icon} />}
onClick={add}
style={{
verticalAlign: 'middle',
marginTop: '-3px',
marginLeft: '20px',
}}
>
新增
</Button>
</div>
) : (
<></>
)}
</div>
{currentConfig ? (
<Spin spinning={loading} tip="loading">
<div className={styles.table}>
<Table
size="small"
bordered
rowKey={record => record.Id}
columns={columns}
dataSource={tableData}
scroll={{ y: 'calc(100vh - 380px)', x: 'max-content' }}
onRow={record => ({
onDoubleClick: event => {
event.stopPropagation();
edit(record);
}, // 双击
})}
pagination={{
showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条`,
pageSizeOptions: [10, 20, 50, 100],
defaultPageSize: 20,
showQuickJumper: true,
showSizeChanger: true,
}}
/>
</div>
</Spin>
) : (
<></>
)}
<AddModal
visible={addVisible}
pickItem={pickItem}
onCancel={() => setAddVisible(false)}
type={type}
callBackSubmit={onSubmit}
/>
</Card>
</div>
);
......
.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-28 09:42:40
* @LastEditors: dengchao 754083046@qq.com
*/
import { get, post, PUBLISH_SERVICE, CITY_SERVICE } from '@/services/index';
// 1.获取所有已附加的表
export const CM_Table_LoadTable = param => get(`${PUBLISH_SERVICE}/CaseManage/LoadTable`, param);
......@@ -61,3 +68,7 @@ export const ChangeOrder = data => post(`${PUBLISH_SERVICE}/CaseManage/ChangeOrd
export const CreateTablePost = data => post(`${PUBLISH_SERVICE}/CaseManage/CreateTable`, data);
// 修改表
export const updateTablePost = param => post(`${PUBLISH_SERVICE}/CaseManage/UpdateTable`, param);
// 加载台账
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