|
|
|
|
@ -367,6 +367,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 获取模式列表
|
|
|
|
|
GetModeList = async (id) => {
|
|
|
|
|
let params = {
|
|
|
|
|
instrumentId: id,
|
|
|
|
|
@ -375,19 +376,18 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
if (res.data.code === 200) {
|
|
|
|
|
if (res.data.data.length > 0) {
|
|
|
|
|
this.setState({
|
|
|
|
|
ActiveModeItem: res.data.data[0],
|
|
|
|
|
ModeList: res.data.data,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (this.state.activeModeID != "") {
|
|
|
|
|
this.state.ModeList.map((item) => {
|
|
|
|
|
if (item.id === this.state.activeModeID) {
|
|
|
|
|
this.setState({
|
|
|
|
|
ActiveModeItem: item,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// if (this.state.activeModeID != "") {
|
|
|
|
|
// this.state.ModeList.map((item) => {
|
|
|
|
|
// if (item.id === this.state.activeModeID) {
|
|
|
|
|
// this.setState({
|
|
|
|
|
// ActiveModeItem: item,
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.modeCurrentFun(res.data.data[0]);
|
|
|
|
|
|