控制权限 修改 不需要判断web是否有权限
This commit is contained in:
@@ -61,3 +61,4 @@ export default function App() {
|
|||||||
</I18nextProvider>
|
</I18nextProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -166,22 +166,22 @@ export default class DeviceController {
|
|||||||
wsManager.close();
|
wsManager.close();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await getControlRight({
|
//const res = await getControlRight({
|
||||||
userName: this.userInfo.username,
|
// userName: this.userInfo.username,
|
||||||
sourceType: 1,
|
// sourceType: 1,
|
||||||
token: this.userInfo.token,
|
// token: this.userInfo.token,
|
||||||
});
|
//});
|
||||||
|
|
||||||
this.hasControlRight = res?.code === 200 && res.data == true;
|
//this.hasControlRight = res?.code === 200 && res.data == true;
|
||||||
this.onHasControlRightChange?.(this.hasControlRight);
|
//this.onHasControlRightChange?.(this.hasControlRight);
|
||||||
|
|
||||||
wsManager.connect(sn, this.wsUrl);
|
wsManager.connect(sn, this.wsUrl);
|
||||||
this.connectedDeviceSn = sn;
|
this.connectedDeviceSn = sn;
|
||||||
|
|
||||||
if (!this.hasControlRight) {
|
//if (!this.hasControlRight) {
|
||||||
this.messageApi.warning(i18n.t('devices.fixed2OthersControlFixed2'));
|
// this.messageApi.warning(i18n.t('devices.fixed2OthersControlFixed2'));
|
||||||
return;
|
// return;
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -992,7 +992,6 @@ const en = {
|
|||||||
controllerNotConnected: "controllerNotConnected",
|
controllerNotConnected: "controllerNotConnected",
|
||||||
otherWebConnected: "otherWebConnected",
|
otherWebConnected: "otherWebConnected",
|
||||||
clickToRequestControl: "clickToRequestControl",
|
clickToRequestControl: "clickToRequestControl",
|
||||||
control2: "connecting",
|
|
||||||
|
|
||||||
fixed2TaskSuspended2: 'Fixed2 Task Suspended2 态势',
|
fixed2TaskSuspended2: 'Fixed2 Task Suspended2 态势',
|
||||||
|
|
||||||
|
|||||||
@@ -561,7 +561,6 @@ const zh = {
|
|||||||
controllerNotConnected: "控制器未连接",
|
controllerNotConnected: "控制器未连接",
|
||||||
otherWebConnected: "其他网页已连接",
|
otherWebConnected: "其他网页已连接",
|
||||||
clickToRequestControl: "点击请求控制",
|
clickToRequestControl: "点击请求控制",
|
||||||
control2: "已连接",
|
|
||||||
|
|
||||||
controlling: "控制中",
|
controlling: "控制中",
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user