Commit 3882ac29 authored by 皮倩雯's avatar 皮倩雯

fix: '集成登录新增配置'

parent ab2b44cc
Pipeline #57208 waiting for manual action with stages
......@@ -84,7 +84,9 @@ const AddModal = props => {
form.setFieldsValue({
accountParamValue: '熊猫ticket',
target: 0,
coordinate: '',
mapSetting: '',
coordinate1: '',
coordinate2: '',
});
}
} else {
......@@ -168,9 +170,13 @@ const AddModal = props => {
console.log(result.districtList[0].districtList);
setOptionsList(data);
if (type == 'edit') {
form.setFieldsValue({ coordinate: pickItem.Coordinate });
form.setFieldsValue({
mapSetting: pickItem.MapSetting,
coordinate1: pickItem.Coordinate[0],
coordinate2: pickItem.Coordinate[1],
});
} else {
form.setFieldsValue({ coordinate: '' });
form.setFieldsValue({ mapSetting: '', coordinate1: '', coordinate2: '' });
}
});
});
......@@ -199,6 +205,9 @@ const AddModal = props => {
if (obj.iconUrl.file) {
obj.iconUrl = obj.iconUrl.file.response.data;
}
let data = [];
data.push(obj.coordinate1);
data.push(obj.coordinate2);
if (type === 'add') {
AddIntegratedLogin({
systemName: obj.systemName,
......@@ -209,7 +218,8 @@ const AddModal = props => {
iconUrl: obj.iconUrl,
accountType: 'Panda',
target: obj.target,
coordinate: obj.coordinate,
mapSetting: obj.mapSetting,
coordinate: data,
})
.then(res => {
if (res.code === 0) {
......@@ -244,7 +254,8 @@ const AddModal = props => {
accountType: 'Panda',
target: obj.target,
clients: pickItem.clients,
coordinate: obj.coordinate,
mapSetting: obj.mapSetting,
coordinate: data,
})
.then(res => {
if (res.code === 0) {
......@@ -511,29 +522,45 @@ const AddModal = props => {
</Col>
</Row>
{show == 1 ? (
<Item
label="地区选择"
name="coordinate"
rules={[
{
required: true,
message: '地区选择为必填项',
},
]}
>
<Cascader
fieldNames={{
label: 'name',
value: 'lastpos',
children: 'districtList',
}}
showSearch
options={optionslist}
placeholder="请选择行政区"
changeOnSelect
allowClear={false}
/>
</Item>
<>
<Item
label="地区选择"
name="mapSetting"
rules={[
{
required: true,
message: '地区选择为必填项',
},
]}
>
<Cascader
fieldNames={{
label: 'name',
value: 'lastpos',
children: 'districtList',
}}
showSearch
options={optionslist}
placeholder="请选择行政区"
changeOnSelect
allowClear={false}
/>
</Item>
<Item label="坐标">
<Row>
<Col span={11}>
<Item name="coordinate1">
<Input />
</Item>
</Col>
<Col span={12}>
<Item name="coordinate2">
<Input style={{ marginLeft: '20px' }} />
</Item>
</Col>
</Row>
</Item>
</>
) : (
<></>
)}
......
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