blak-kong 2 years ago
parent 67070731fa
commit 487903cf43

@ -104,7 +104,7 @@ class ConnectionBluetoot extends Component<any, any> {
searchError: false, //是否没有搜索到设备 searchError: false, //是否没有搜索到设备
connectionStatus: false, //是否连接成功状态 connectionStatus: false, //是否连接成功状态
hasVersionInfo: false, // 是否已获得版本信息 hasVersionInfo: false, // 是否已获得版本信息
hasSyncRecord: false, hasSyncRecord: false, // 是否已同步记录
subDeviceConnectedStatus: false, //子设备是否连接成功状态 subDeviceConnectedStatus: false, //子设备是否连接成功状态
synchronousStatus: false, // 设备同步记录状态 synchronousStatus: false, // 设备同步记录状态
islian: false, //是否获取离线记录状态 islian: false, //是否获取离线记录状态
@ -131,11 +131,6 @@ class ConnectionBluetoot extends Component<any, any> {
// 只有非断开状态的弹窗才自动连接蓝牙 // 只有非断开状态的弹窗才自动连接蓝牙
if (!this.props.isDisconnect) { if (!this.props.isDisconnect) {
this.connection(); this.connection();
} else {
// 断开状态弹窗:自动设置为错误模式
this.setState({
error: true,
});
} }
} }
@ -989,22 +984,17 @@ class ConnectionBluetoot extends Component<any, any> {
this.sendGetVersion(); this.sendGetVersion();
} }
} }
}, 1000); }, 600);
// 5秒后没有收到版本返回直接跳去护理页 // 5秒后没有收到版本返回直接跳去护理页
// if (isGetVersionTimer) clearTimeout(isGetVersionTimer); if (isGetVersionTimer) clearTimeout(isGetVersionTimer);
// isGetVersionTimer = setTimeout(() => { isGetVersionTimer = setTimeout(() => {
// that.setData({ this.sendSyncRecording();
// connectionStatus: true, }, 5000);
// // subDeviceConnectedStatus: true, // 子设备连接状态
// })
// this.sendSyncRecording()
// }, 5000);
} }
/** 发送同步记录 */ /** 发送同步记录 */
sendSyncRecording() { sendSyncRecording() {
const { deviceInfo } = this.props;
const versionCommand = { const versionCommand = {
commandType: "InfoQuery", commandType: "InfoQuery",
infoQueryType: "offlineClockSummary", infoQueryType: "offlineClockSummary",
@ -1035,6 +1025,7 @@ class ConnectionBluetoot extends Component<any, any> {
console.log("onReconnect"); console.log("onReconnect");
// 重置信息并重连 // 重置信息并重连
this.setState({ this.setState({
isBreak: false,
error: false, error: false,
searchError: false, searchError: false,
errorText: "", errorText: "",
@ -1077,6 +1068,7 @@ class ConnectionBluetoot extends Component<any, any> {
connectionSuccess={connectionSuccess} connectionSuccess={connectionSuccess}
isConnection={isConnection} isConnection={isConnection}
error={error} error={error}
isDisconnect={isDisconnect}
title="面罩模式启动中" title="面罩模式启动中"
/> />
</Block> </Block>

@ -84,6 +84,7 @@ export default class DeviceConnectPopup extends Component<any, any> {
isConnection, isConnection,
currentDeviceType, currentDeviceType,
error, error,
isDisconnect,
} = this.props; } = this.props;
return ( return (
@ -103,7 +104,7 @@ export default class DeviceConnectPopup extends Component<any, any> {
></View> ></View>
{/* 非错误弹窗 */} {/* 非错误弹窗 */}
{!error && ( {!error && !isDisconnect && (
<View className={classnames("common-box device-connection-box")}> <View className={classnames("common-box device-connection-box")}>
<View <View
className={classnames("common-popup-title", "margin-samll")} className={classnames("common-popup-title", "margin-samll")}
@ -188,8 +189,48 @@ export default class DeviceConnectPopup extends Component<any, any> {
</View> </View>
)} )}
{/* 错误与失败弹窗 */} {/* 断开弹窗 */}
{error && ( {!error && isDisconnect && (
<View className={classnames("common-box", "device-connection-box")}>
<View
className={classnames("common-popup-title", "margin-samll")}
>
{data.bluetoothClosedTitle}
</View>
<View className="device-popup-content-box">
{!this.isImage(data.bluetoothClosed) ? (
<Video className="videos" src={data.bluetoothClosed} />
) : (
<Image
className="images"
src={data.bluetoothClosed}
mode="aspectFill"
/>
)}
<View className="error-block">
<View className="tip1"></View>
<View className="tip2">
{data.bluetoothClosedContent || "请重启设备后点击重新连接"}
</View>
</View>
</View>
<View className="common-popup-btns device-popup-btns">
<Button className="common-popup-btn2" onClick={this.onClose}>
</Button>
<Button
className="common-popup-btn2"
onClick={this.onReconnect}
>
</Button>
</View>
</View>
)}
{/* 错误失败弹窗 */}
{error && !isDisconnect && (
<View className={classnames("common-box", "device-connection-box")}> <View className={classnames("common-box", "device-connection-box")}>
<View <View
className={classnames("common-popup-title", "margin-samll")} className={classnames("common-popup-title", "margin-samll")}

@ -22,26 +22,28 @@ function Index({ isShowNurse, ActiveModeItem }: Props) {
<View className="modelInfo-title"></View> <View className="modelInfo-title"></View>
<View className="modelInfo-effect">{ActiveModeItem.modeDesc}</View> <View className="modelInfo-effect">{ActiveModeItem.modeDesc}</View>
</View> </View>
<View className="modelInfo-line"> {ActiveModeItem.combineData.length > 0 && (
<View className="modelInfo-title"></View> <View className="modelInfo-line">
<View className="modelInfo-light-box"> <View className="modelInfo-title"></View>
{ActiveModeItem.combineData.map((item) => { <View className="modelInfo-light-box">
return ( {ActiveModeItem.combineData.map((item) => {
<View className="modelInfo-light-item" key={item.id}> return (
<View <View className="modelInfo-light-item" key={item.id}>
className="modelInfo-light-color" <View
style={{ className="modelInfo-light-color"
backgroundColor: ModeColor[item.technologyInfo], style={{
}} backgroundColor: ModeColor[item.technologyInfo],
></View> }}
<View className="modelInfo-light-colorname"> ></View>
{item.effectContent}({item.technologyInfo}) <View className="modelInfo-light-colorname">
{item.effectContent}({item.technologyInfo})
</View>
</View> </View>
</View> );
); })}
})} </View>
</View> </View>
</View> )}
</View> </View>
)} )}
</Block> </Block>

@ -1468,8 +1468,9 @@ class IotCarePlan extends Component<any, any> {
// 仪器缓存模式,判断是否存在于现有模式中 // 仪器缓存模式,判断是否存在于现有模式中
let recordModeItem = ModeList.find((item) => { let recordModeItem = ModeList.find((item) => {
return item.id == WL200NursingHistory.currentServiceData.id; return item.id == WL200NursingHistory.currentServiceData.modeId;
}); });
console.log("recordModeItem", recordModeItem);
if (!WL200NursingHistory || !recordModeItem) { if (!WL200NursingHistory || !recordModeItem) {
console.log("仪器有数据, 但是缓存没有数据, 忽略"); console.log("仪器有数据, 但是缓存没有数据, 忽略");
return; return;

@ -106,6 +106,7 @@ class Index extends Component<any, any> {
isBindingError: false, // 绑定失败 isBindingError: false, // 绑定失败
isBeforeBindingError: false, // 绑定前校验错误弹窗 isBeforeBindingError: false, // 绑定前校验错误弹窗
BeforeBindingErrorText: "", // 绑定前校验错误文本 BeforeBindingErrorText: "", // 绑定前校验错误文本
isBindingError203: false, // 绑定失败弹窗:已被别人绑定
instrumentList: [], // 仪器列表 instrumentList: [], // 仪器列表
unbindingInstrumentList: [], // 未绑定仪器列表 unbindingInstrumentList: [], // 未绑定仪器列表
@ -661,6 +662,8 @@ class Index extends Component<any, any> {
this.getInstrumentIntroInfo(instrumentInfo.id); this.getInstrumentIntroInfo(instrumentInfo.id);
}, 1000); }, 1000);
return; return;
} else if (data.code === 203) {
this.setState({ isBindingError203: true });
} else if (data.code === 202) { } else if (data.code === 202) {
// 换绑操作 // 换绑操作
this.setState({ isExchangeBinding: true, isVisibleBinding: true }); this.setState({ isExchangeBinding: true, isVisibleBinding: true });
@ -705,6 +708,7 @@ class Index extends Component<any, any> {
} }
}; };
// 仪器绑定失败弹窗 // 仪器绑定失败弹窗
// 绑定失败
onBindErrorClose = () => { onBindErrorClose = () => {
this.setState({ isBindingError: false }); this.setState({ isBindingError: false });
this.removeScanFun(); this.removeScanFun();
@ -713,6 +717,15 @@ class Index extends Component<any, any> {
this.onBindErrorClose(); this.onBindErrorClose();
go("/pages/consultant/consultant?customBack=true"); go("/pages/consultant/consultant?customBack=true");
}; };
// 已被别人绑定
onBindErrorClose203 = () => {
this.setState({ isBindingError203: false });
};
onBindErrorConfirm203 = () => {
this.onBindErrorClose203();
go("/pages/consultant/consultant");
};
// 绑定后弹窗
onBeforeBindClose = () => { onBeforeBindClose = () => {
this.setState({ isBeforeBindingError: false }); this.setState({ isBeforeBindingError: false });
this.removeScanFun(); this.removeScanFun();
@ -951,6 +964,7 @@ class Index extends Component<any, any> {
isBindingError, isBindingError,
isBeforeBindingError, isBeforeBindingError,
BeforeBindingErrorText, BeforeBindingErrorText,
isBindingError203,
isRegisterBoolean, isRegisterBoolean,
isExchangeBinding, isExchangeBinding,
instrumentInfo, instrumentInfo,
@ -1080,6 +1094,16 @@ class Index extends Component<any, any> {
confirm={this.onBeforeBindConfirm} confirm={this.onBeforeBindConfirm}
/> />
<PopupAlert
isShow={isBindingError203}
title="提示"
content="序列码已被别人绑定,请联系微信助手"
confirmButtonText="知道了"
textAlgin="center"
close={this.onBindErrorClose203}
confirm={this.onBindErrorConfirm203}
></PopupAlert>
<PopupAlert <PopupAlert
isShow={showEquipment} isShow={showEquipment}
title="提示" title="提示"

@ -295,7 +295,7 @@ export default class Instrument extends Component<any, any> {
let code = Number(res.code); // 强制类型转换 let code = Number(res.code); // 强制类型转换
if (code === 200) { if (code === 200) {
this.openBindingVisible(); this.openBindingVisible();
} else if (code === 204) { } else if (code === 204 || code === 205) {
this.setState({ isBindingCheckError: true }); this.setState({ isBindingCheckError: true });
} else { } else {
this.setState({ isBindingError: true }); this.setState({ isBindingError: true });
@ -345,6 +345,8 @@ export default class Instrument extends Component<any, any> {
go("/pages/instrument/intro?id=" + channelInfo.id); go("/pages/instrument/intro?id=" + channelInfo.id);
} else if (res.data.code === 204) { } else if (res.data.code === 204) {
this.setState({ isBindingCheckError: false }); this.setState({ isBindingCheckError: false });
} else if (res.data.code === 203) {
this.setState({ isBindingError203: true });
} else { } else {
this.setState({ isBindingError: true }); this.setState({ isBindingError: true });
} }

Loading…
Cancel
Save