|
|
|
@ -11,7 +11,7 @@ import {
|
|
|
|
SwiperItem,
|
|
|
|
SwiperItem,
|
|
|
|
RichText,
|
|
|
|
RichText,
|
|
|
|
} from "@tarojs/components";
|
|
|
|
} from "@tarojs/components";
|
|
|
|
|
|
|
|
import { Popup } from "@antmjs/vantui";
|
|
|
|
/*** redux ***/
|
|
|
|
/*** redux ***/
|
|
|
|
import { connect } from "react-redux";
|
|
|
|
import { connect } from "react-redux";
|
|
|
|
import { userRefresh, tokenRefresh } from "@/store/features/userInfo";
|
|
|
|
import { userRefresh, tokenRefresh } from "@/store/features/userInfo";
|
|
|
|
@ -134,6 +134,7 @@ class Index extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
|
|
/** 已绑定仪器 */
|
|
|
|
/** 已绑定仪器 */
|
|
|
|
instrument_detail: {},
|
|
|
|
instrument_detail: {},
|
|
|
|
|
|
|
|
show: false,
|
|
|
|
/* 已绑定仪器 END */
|
|
|
|
/* 已绑定仪器 END */
|
|
|
|
|
|
|
|
|
|
|
|
/** 蓝牙相关 */
|
|
|
|
/** 蓝牙相关 */
|
|
|
|
@ -360,10 +361,16 @@ class Index extends Component<any, any> {
|
|
|
|
goRegister() {
|
|
|
|
goRegister() {
|
|
|
|
go("/pages/register/register");
|
|
|
|
go("/pages/register/register");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查看所有设备是否绑定完
|
|
|
|
|
|
|
|
Alldevice = () => {
|
|
|
|
|
|
|
|
console.log(this.state.isDisabledClickAddDevic, '查看');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
// 新增设备
|
|
|
|
// 新增设备
|
|
|
|
addNewDevice = () => {
|
|
|
|
addNewDevice = () => {
|
|
|
|
|
|
|
|
|
|
|
|
if (this.isRegister("addNewDevice")) {
|
|
|
|
if (this.isRegister("addNewDevice")) {
|
|
|
|
|
|
|
|
|
|
|
|
if (this.state.isDisabledClickAddDevice) {
|
|
|
|
if (this.state.isDisabledClickAddDevice) {
|
|
|
|
msg("您已绑定所有设备");
|
|
|
|
msg("您已绑定所有设备");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
@ -415,13 +422,33 @@ class Index extends Component<any, any> {
|
|
|
|
go(`/pages/recording/recording?param=${ViewAddInstrument}`);
|
|
|
|
go(`/pages/recording/recording?param=${ViewAddInstrument}`);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
gourl = (e) => {
|
|
|
|
gourl = async (e) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log('添加新设备', e);
|
|
|
|
|
|
|
|
|
|
|
|
const { url } = e.currentTarget.dataset;
|
|
|
|
const { url } = e.currentTarget.dataset;
|
|
|
|
if (this.isRegister()) {
|
|
|
|
if (this.isRegister()) {
|
|
|
|
|
|
|
|
if (url === '/pages/instrument/instrument') {
|
|
|
|
|
|
|
|
let { data } = await InstrumentInfo.unbindingInstrumentInfoList();
|
|
|
|
|
|
|
|
console.log(data, '查看未绑定设备');
|
|
|
|
|
|
|
|
if(data.data.length === 0){
|
|
|
|
|
|
|
|
this.setState(
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
show:true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
this.setState({ show: false });
|
|
|
|
|
|
|
|
}, 1000); // 2秒后将 show 变量置为 false
|
|
|
|
|
|
|
|
}else{
|
|
|
|
go(url);
|
|
|
|
go(url);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
go(url);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
closeDev = () => {
|
|
|
|
closeDev = () => {
|
|
|
|
@ -944,6 +971,7 @@ class Index extends Component<any, any> {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
let {
|
|
|
|
let {
|
|
|
|
|
|
|
|
show,
|
|
|
|
isCommonError,
|
|
|
|
isCommonError,
|
|
|
|
commonErrorText,
|
|
|
|
commonErrorText,
|
|
|
|
calendarComplete,
|
|
|
|
calendarComplete,
|
|
|
|
@ -1301,6 +1329,9 @@ class Index extends Component<any, any> {
|
|
|
|
</Swiper>
|
|
|
|
</Swiper>
|
|
|
|
</View>
|
|
|
|
</View>
|
|
|
|
<View style="height:200rpx"></View>
|
|
|
|
<View style="height:200rpx"></View>
|
|
|
|
|
|
|
|
<Popup show={show} className="custom-popup" overlay={false}>
|
|
|
|
|
|
|
|
<View className="popBox">你已绑定所有设备</View>
|
|
|
|
|
|
|
|
</Popup>
|
|
|
|
</Block>
|
|
|
|
</Block>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|