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

fix: '子站配置账号参数非必填'

parent fd82237e
Pipeline #82360 passed with stages
......@@ -62,13 +62,20 @@ const maintenance = () => {
const getDataList = () => {
CM_XWBPlan_DataList().then(res => {
setTreeLoading(false);
if (res.msg === 'Ok') {
if (res.code === 0) {
setTableData(res.data);
let list = [];
res.data.map(i => {
list.push(i.businessName);
});
setKeepTableData(list);
} else {
setTableData([]);
notification.error({
message: '提示',
duration: 3,
description: res.msg,
});
}
});
};
......@@ -76,13 +83,20 @@ const maintenance = () => {
const getNewDataList = () => {
NewCM_XWBPlan_DataList().then(res => {
setTreeLoading(false);
if (res.msg === 'Ok') {
if (res.code === 0) {
setTableData(res.data);
let list = [];
res.data.map(i => {
list.push(i.businessName);
});
setKeepTableData(list);
} else {
setTableData([]);
notification.error({
message: '提示',
duration: 3,
description: res.msg,
});
}
});
};
......@@ -90,7 +104,7 @@ const maintenance = () => {
const getConfigList = () => {
GetDeviceConfigList().then(res => {
setTreeLoading(false);
if (res.msg === 'Ok') {
if (res.code === 0) {
setTableData(res.data);
} else {
setTableData([]);
......
......@@ -35,10 +35,10 @@ import { get, PUBLISH_SERVICE } from '@/services';
import PreviewModal from './PreviewModal';
import CryptoJS from 'crypto-js';
const { Item } = Form;
const controlBarObj={
'停靠' :'dock',
'隐藏':'hide'
}
const controlBarObj = {
停靠: 'dock',
隐藏: 'hide',
};
const modules = {
toolbar: [
[{ header: [1, 2, 3, 4, 5, 6, false] }],
......@@ -97,7 +97,7 @@ const AddModal = props => {
getMap();
if (type === 'edit') {
setRadio(pickItem.target != 0);
// setRadio2(pickItem.controlBar != 'hide');
// setRadio2(pickItem.controlBar != 'hide');
setRadio1(pickItem.isMaster);
setIdentity(pickItem.siteType);
setAccount(pickItem.accountType);
......@@ -114,7 +114,7 @@ const AddModal = props => {
subtitle: pickItem.Subtitle,
accountType: pickItem.accountType,
target: pickItem.target != 0,
// controlBar:pickItem.controlBar != 'hide',
// controlBar:pickItem.controlBar != 'hide',
isMaster: pickItem.isMaster,
images: pickItem.images,
siteDescription: pickItem.siteDescription,
......@@ -173,7 +173,7 @@ const AddModal = props => {
form.setFieldsValue({
accountParamValue: '熊猫ticket',
target: 0,
// controlBar:true,
// controlBar:true,
isMaster: false,
mapSetting: '',
coordinate: '',
......@@ -361,7 +361,7 @@ const AddModal = props => {
// 提交
const onSubmit = () => {
form.validateFields().then(validate => {
console.log(validate,radio2,'validate');
console.log(validate, radio2, 'validate');
if (validate) {
setLoading(true);
let obj = form.getFieldsValue();
......@@ -424,7 +424,7 @@ const AddModal = props => {
accountType: account,
isHide: false,
target: radio ? 1 : 0,
// controlBar:radio2?'dock':'hide',
// controlBar:radio2?'dock':'hide',
isMaster: obj.isMaster,
images: dataList,
mapSetting: obj.mapSetting,
......@@ -469,7 +469,7 @@ const AddModal = props => {
iconUrl: obj.iconUrl,
accountType: account,
target: radio ? 1 : 0,
// controlBar:radio2?'dock':'hide',
// controlBar:radio2?'dock':'hide',
isMaster: obj.isMaster,
images: dataList,
siteType: obj.siteType,
......@@ -775,7 +775,7 @@ const AddModal = props => {
<Item label="新标签" name="target">
<Switch checkedChildren="是" unCheckedChildren="否" checked={radio} onChange={onChange} />
</Item>
{/* <Item label="控制台" name="controlBar">
{/* <Item label="控制台" name="controlBar">
<Switch checkedChildren="停靠" unCheckedChildren="隐藏" checked={radio2} onChange={onChange2} />
</Item> */}
<Row>
......@@ -946,12 +946,7 @@ const AddModal = props => {
</Item>
<Row>
<Col span={12}>
<Item
labelCol={{ span: 8 }}
label="账号参数"
name="accountParamKey"
rules={[{ required: true, message: '请输入参数' }]}
>
<Item labelCol={{ span: 8 }} label="账号参数" name="accountParamKey">
<Input allowClear placeholder="请填写账号参数" />
</Item>
</Col>
......
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