forked from dyf/dyf-vue-ui
控制面板,不同的设备控制,跳转到不同的控制页
This commit is contained in:
@ -45,8 +45,8 @@
|
||||
<el-form-item label="设备名称" prop="deviceName">
|
||||
<el-input v-model="queryParams.deviceName" placeholder="请输入设备名称" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备状态" prop="deviceStatus">
|
||||
<el-select v-model="queryParams.deviceStatus" placeholder="设备状态" clearable>
|
||||
<el-form-item label="设备状态" prop="onlineStatus">
|
||||
<el-select v-model="queryParams.onlineStatus" placeholder="设备状态" clearable>
|
||||
<el-option label="在线" value="1"></el-option>
|
||||
<el-option label="离线" value="0"></el-option>
|
||||
</el-select>
|
||||
@ -192,7 +192,7 @@ const initData: PageData<'', deviceQuery> = {
|
||||
pageSize: 10,
|
||||
deviceId: '',
|
||||
deviceName: '',
|
||||
deviceStatus: '',
|
||||
onlineStatus: '',
|
||||
deviceMac: '',
|
||||
deviceImei: '',
|
||||
personnelBy: '',
|
||||
@ -299,10 +299,13 @@ const resetQuery = () => {
|
||||
};
|
||||
|
||||
|
||||
/** 设备控制跳转 */
|
||||
/** 设备控制跳转动态取detailPageUrl字段值,跳转 */
|
||||
const handleControl = (row: any) => {
|
||||
const deviceId = row.id;
|
||||
router.push('/controlCenter/6170/' + deviceId);
|
||||
const detailPageUrl = row.detailPageUrl;
|
||||
const basePath = detailPageUrl.replace(/\/index$/, '');
|
||||
const dynamicPath = `/${basePath}/${deviceId}`;
|
||||
router.push(dynamicPath); // 跳转路由
|
||||
};
|
||||
|
||||
/** 选择条数 */
|
||||
@ -354,12 +357,12 @@ const getDeptTree = async () => {
|
||||
const sendTextMessage = () => {
|
||||
// 防重复提交
|
||||
if (!queryParams.value.deviceType) {
|
||||
ElMessage.closeAll();
|
||||
ElMessage.closeAll();
|
||||
proxy?.$modal.msgWarning('请先选择设备类型');
|
||||
return;
|
||||
}
|
||||
if (ids.value.length == 0) {
|
||||
ElMessage.closeAll();
|
||||
ElMessage.closeAll();
|
||||
proxy?.$modal.msgWarning('请先选中一条设备');
|
||||
return;
|
||||
}
|
||||
@ -368,7 +371,7 @@ const sendTextMessage = () => {
|
||||
// 发送文本消息确认
|
||||
const submitForm = async () => {
|
||||
if (!form.value.messageToSend) {
|
||||
ElMessage.closeAll();
|
||||
ElMessage.closeAll();
|
||||
proxy?.$modal.msgWarning('发送消息不能为空');
|
||||
return
|
||||
}
|
||||
@ -424,12 +427,12 @@ const cancel = () => {
|
||||
// 强制报警
|
||||
const forceAlarm = async () => {
|
||||
if (!queryParams.value.deviceType) {
|
||||
ElMessage.closeAll();
|
||||
ElMessage.closeAll();
|
||||
proxy?.$modal.msgWarning('请先选择设备类型');
|
||||
return;
|
||||
}
|
||||
if (ids.value.length == 0) {
|
||||
ElMessage.closeAll();
|
||||
ElMessage.closeAll();
|
||||
proxy?.$modal.msgWarning('请先选中一条设备');
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user