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

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

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