Commit d07d612d authored by zhengjiawei's avatar zhengjiawei

Merge branch 'dev_upgrade' of http://172.16.10.76/station/amos-convertor-view into dev_upgrade

parents a773c754 9e885bfe
......@@ -538,7 +538,15 @@ export const getFireDetectorListAction = (filter, page, size) => {
export const getpreControlFireStationDetailAction = (id) => {
return commonGet(formatUrl(FasSerUrl.xiaofangxiaoshiUrl, { id }));
};
/**
* 新增消防小室
*
* @param {*} equipmentId
* @param {*} fireEquipmentId
*/
export const addFireStation = (data) => {
return commonPost(FasSerUrl.getFireStationInfoUrl, data);
};
export const queryDictsByCode = (code) => {
return commonGet(formatUrl(FasSerUrl.dictListUrl, { code }));
......
......@@ -46,6 +46,9 @@ class FireEquipmentToolBar extends Component {
let { searchParam } = this.state;
let { getTableListData, pageConfig } = this.props;
this.setState({ name: value });
if(value==='#'){
value='%23'
}
searchParam.name = value;
searchParam.pageNumber = pageConfig.pageNumber;
searchParam.pageSize = pageConfig.pageSize;
......
......@@ -171,6 +171,10 @@ class MonitorPointConfig extends Component {
}
getMonitorPointListData = (param) => {
this.setState({
selectedRows:[],
selectedRowKeys:[]
})
if (!param) {
return;
}
......
......@@ -21,7 +21,6 @@ class FireStationAdd extends Component {
position3d: '',
floor3d: '1',
isIndoor: true,
riskSourceId: undefined,
picture: []
},
previewVisible: false,
......@@ -174,7 +173,7 @@ class FireStationAdd extends Component {
dropdownStyle={{ maxHeight: 200, overflow: 'auto' }}
treeData={riskSourceData}
placeholder="请选择"
value={station.riskSourceId}
value={station.riskSourceId === null ? undefined : station.riskSourceId}
onChange={e => this.onSelectChange('riskSourceId', e)}
/>
</FormItem>
......
......@@ -10,15 +10,18 @@ import FireStationEdit from './FireStationEdit';
import FireStationAdd from './FireStationAdd';
import FireStatioinToolBar from './fireStatioinToolBar';
import { pathMapping } from './../../../../../routes/customRoutes';
import { deleteFireStationDataAction, getFireStationAction } from '../../../../../services/ledgerService';
import {
deleteFireStationDataAction,
deleteFireStationMatchesAction,
getFireStationAction
} from '../../../../../services/ledgerService';
import { queryRegionTreeAction } from '../../../../../services/preControlService';
import { FasSerUrl } from '../../../../../consts/urlConsts';
import { addFireStation } from './../../../../../services/ledgerService';
const fireStationPath = pathMapping.stationMatches;
const ls = _amosTool.Store.lsTool;
const apiKey = SysConsts.api_key;
const token = SysConsts.token;
const url = FasSerUrl.getFireStationInfoUrl;
const fireStationTableColumns = self => {
return [
......@@ -337,27 +340,16 @@ class FireStationTableView extends Component {
formData.append(item, station[item]);
}
});
fetch(url, {
method: 'post',
headers: {
Accept: 'application/json;charset=UTF-8',
'X-Api-Key': _amosTool.Store.getCookieByName(apiKey),
'X-Access-Token': ls.read(token),
'appKey': 'CONVERTER_STATION',
'product': 'CONVERTER_STATION_WEB',
'token':ls.read(token)
},
body: formData
})
.then(e => {
addFireStation(formData).then(
data => {
AmosAlert.success('提示', '保存成功');
this.cancel();
// this.getFireStationData(this.pageConfig);
this.state.reload();
})
.catch(e => {
},
err => {
AmosAlert.error('错误', '保存失败');
});
}
);
}
add = () => {
......
......@@ -26,6 +26,9 @@ class FireDetectorToolBar extends Component {
let { searchParam } = this.state;
let { getTableListData, pageConfig } = this.props;
this.setState({ name: value });
if(value==='#'){
value='%23'
}
searchParam.name = value;
searchParam.pageNumber = pageConfig.pageNumber;
searchParam.pageSize = pageConfig.pageSize;
......
......@@ -8,17 +8,15 @@ import AmosGridTable from './../../../common/tableComponent/table/AmosGridTable'
import FireReourceDetail from './FireFoamDetail';
import FireReourceEdit from './FireFoamEdit';
import FireReourceAdd from './FireFoamAdd';
import { deleteFireStationDataAction, getFireStationAction } from '../../../../../services/ledgerService';
import { deleteFireStationDataAction, getFireStationAction,addFireStation } from '../../../../../services/ledgerService';
import { queryRegionTreeAction } from '../../../../../services/preControlService';
import FireFoamToolBar from './fireFoamToolBar';
import { pathMapping } from './../../../../../routes/customRoutes';
import { FasSerUrl } from '../../../../../consts/urlConsts';
const fireFoamPath = pathMapping.stationMatches;
const ls = _amosTool.Store.lsTool;
const apiKey = SysConsts.api_key;
const token = SysConsts.token;
const url = FasSerUrl.getFireStationInfoUrl;
const fireFoamTableColumns = self => {
return [
......@@ -335,31 +333,16 @@ class FireFoamable extends Component {
formData.append(item, station[item]);
}
});
fetch(url, {
method: 'post',
headers: {
Accept: 'application/json;charset=UTF-8',
'X-Api-Key': _amosTool.Store.getCookieByName(apiKey),
'X-Access-Token': ls.read(token),
'appKey': 'CONVERTER_STATION',
'product': 'CONVERTER_STATION_WEB',
'token':ls.read(token)
addFireStation(formData).then(
data => {
AmosAlert.success('提示', '保存成功');
this.cancel();
this.state.reload();
},
body: formData
})
.then(e => {
if (e.status === 200 ){
AmosAlert.success('提示', '保存成功');
this.cancel();
// this.getFireStationData(this.pageConfig);
this.state.reload();
} else {
AmosAlert.error('错误', '保存失败,请检查编号是否重复!');
}
})
.catch(e => {
err => {
AmosAlert.error('错误', '保存失败');
});
}
);
}
add = () => {
......
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