Commit 0413cc73 authored by wanghao's avatar wanghao

1 报警记录界面实现

2 在所有设备上下电的基础上,增加指定柜子上下电实现
3 实时数据界面增加位置编号字段,位置编号是在托盘上用记号笔记录的编号。
4 解绑时判断 如果都解绑了则更新托盘状态
parent e42f2e1c
package com.zehong.web.controller.equipment;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.system.domain.TEquipmentAlarmData;
import com.zehong.system.service.ITEquipmentAlarmDataService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* @author lenovo
* @date 2025/11/12
* @description 报警历史记录
*/
@RestController
@RequestMapping("/equipmentAlarmData/record")
public class TEquipmentAlarmDataController extends BaseController {
@Resource
private ITEquipmentAlarmDataService tEquipmentAlarmDataService;
@RequestMapping("/list")
public TableDataInfo list(TEquipmentAlarmData tEquipmentAlarmData) {
startPage();
List<TEquipmentAlarmData> list = tEquipmentAlarmDataService.selectTEquipmentAlarmDataList(tEquipmentAlarmData);
return getDataTable(list);
}
}
......@@ -119,6 +119,21 @@ public class TStoreyInfoController extends BaseController
public AjaxResult powerOffAllStore() {
return tStoreyInfoService.powerOffAllStore();
}
/**
* 指定设备下电 逗号分隔
*/
@GetMapping(value = "/designatedDevicePowerOff/{equipmentCode}")
public AjaxResult designatedDevicePowerOff(@PathVariable("equipmentCode") String equipmentCode) {
return tStoreyInfoService.designatedDevicePowerOff(equipmentCode);
}
/**
* 批量扫描并开始老化
*/
@GetMapping(value = "/scanAndStartAgingAllCabinetLayers")
public AjaxResult scanAndStartAgingAllCabinetLayers() {
return tStoreyInfoService.scanAndStartAgingAllCabinetLayers();
}
/**
* 给所有设备上电
......@@ -128,6 +143,14 @@ public class TStoreyInfoController extends BaseController
return tStoreyInfoService.powerOnAllStore();
}
/**
* 指定设备上电 逗号分隔
*/
@GetMapping(value = "/designatedDevicePowerOn/{equipmentCode}")
public AjaxResult designatedDevicePowerOn(@PathVariable("equipmentCode") String equipmentCode) {
return tStoreyInfoService.designatedDevicePowerOn(equipmentCode);
}
/**
* 获取老化层信息详细信息
*/
......
......@@ -42,6 +42,8 @@ public interface PalletDeviceBindingMapper
public int countByTrayId(Long trayId);
public int countDeviceByTrayId(Long trayId);
/**
* 新增托盘绑定的设备列
*
......
......@@ -37,6 +37,10 @@ public interface TEquipmentInfoMapper
*/
public List<TEquipmentInfo> selectTEquipmentList(@Param("types") List<String> types);
public List<TEquipmentInfo> getAll();
public List<TEquipmentInfo> getAllByEquipmentCodeList(@Param("equipmentCodes") List<String> equipmentCodes);
/**
* 新增生产设备信息
*
......
......@@ -21,6 +21,9 @@ public interface ITStoreyInfoService
*/
public TStoreyInfo selectTStoreyInfoById(Long fStoreyId);
public AjaxResult designatedDevicePowerOn(String equipmentCode);
public AjaxResult designatedDevicePowerOff(String equipmentCode);
/**
* 查询老化层信息
*
......@@ -49,6 +52,8 @@ public interface ITStoreyInfoService
public AjaxResult powerOffAllStore();
public AjaxResult scanAndStartAgingAllCabinetLayers();
public AjaxResult powerOnAllStore();
public AjaxResult handleFeeding(String command);
......
......@@ -234,6 +234,13 @@ public class PalletDeviceBindingServiceImpl implements IPalletDeviceBindingServi
int i = palletDeviceBindingMapper.unbindDevice(palletDeviceBindingDb.getPalletDeviceBindingId());
if (i > 0) {
// 成功之后 判断 是否还有设备,如果没有设备的话则 初始化托盘状态
int count = palletDeviceBindingMapper.countDeviceByTrayId(palletDeviceBindingDb.getTrayId());
if(count == 0) {
tTrayInfoMapper.initStatusByTrayId(palletDeviceBindingDb.getTrayId());
}
return AjaxResult.success();
}
return AjaxResult.error();
......
......@@ -6,6 +6,7 @@ import com.zehong.system.task.DeviceCommJob.DeviceComm501Device2Job;
import com.zehong.system.task.DeviceCommJob.DeviceComm501Device3Job;
import org.quartz.*;
import org.quartz.impl.matchers.GroupMatcher;
import org.quartz.utils.Key;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -15,7 +16,9 @@ import javax.annotation.Resource;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
/**
* @author lenovo
......@@ -30,9 +33,9 @@ public class DeviceTaskScheduler {
private Scheduler scheduler;
// 任务组名(统一固定,与原有逻辑保持一致)
private static final String JOB_GROUP = "DEVICE_TASKS";
public static final String JOB_GROUP = "DEVICE_TASKS";
// 触发器组名(统一固定,与原有逻辑保持一致)
private static final String TRIGGER_GROUP = "DEVICE_TRIGGERS";
public static final String TRIGGER_GROUP = "DEVICE_TRIGGERS";
// 新增:注入监控器
@Autowired
private QuartzTaskMonitor quartzTaskMonitor;
......@@ -91,7 +94,6 @@ public class DeviceTaskScheduler {
log.info("清理现有任务: {}", jobKey.getName());
}
}
// 清理触发器
Set<TriggerKey> triggerKeys = scheduler.getTriggerKeys(GroupMatcher.triggerGroupEquals(TRIGGER_GROUP));
for (TriggerKey triggerKey : triggerKeys) {
......
......@@ -63,6 +63,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select count(1) from t_pallet_device_binding palDeviceBinding
where palDeviceBinding.f_tray_id = #{trayId}
</select>
<select id="countDeviceByTrayId" parameterType="long" resultType="int">
select count(1) from t_pallet_device_binding palDeviceBinding
where palDeviceBinding.f_tray_id = #{trayId}
and palDeviceBinding.f_device_code is not null
and palDeviceBinding.f_device_code != ''
</select>
<select id="selectPalletDeviceBindingList" parameterType="PalletDeviceBinding" resultMap="PalletDeviceBindingResult">
<include refid="selectPalletDeviceBindingVo"/>
<where>
......
......@@ -19,10 +19,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTEquipmentAlarmDataList" parameterType="TEquipmentAlarmData" resultMap="TEquipmentAlarmDataResult">
<include refid="selectTEquipmentAlarmDataVo"/>
<where>
<if test="fEquipmentCode != null and fEquipmentCode != ''"> and f_equipment_code = #{fEquipmentCode}</if>
<if test="fAlarmType != null and fAlarmType != ''"> and f_alarm_type = #{fAlarmType}</if>
<if test="fAlarmData != null and fAlarmData != ''"> and f_alarm_data = #{fAlarmData}</if>
<if test="fCreateTime != null "> and f_create_time = #{fCreateTime}</if>
<if test="fEquipmentCode != null and fEquipmentCode != ''"> and f_equipment_code like concat ('%',#{fEquipmentCode},'%')</if>
<if test="fAlarmData != null and fAlarmData != ''"> and f_alarm_data like concat ('%', #{fAlarmData},'%')</if>
</where>
</select>
......
......@@ -61,7 +61,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item}
</foreach>
</select>
<select id="getAll" resultMap="TEquipmentInfoResult">
<include refid="selectTEquipmentInfoVo"/>
</select>
<select id="getAllByEquipmentCodeList" parameterType="list" resultMap="TEquipmentInfoResult">
<include refid="selectTEquipmentInfoVo"/>
where f_equipment_code in
<foreach item="item" collection="equipmentCodes" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="selectTEquipmentInfoById" parameterType="Long" resultMap="TEquipmentInfoResult">
<include refid="selectTEquipmentInfoVo"/>
where f_equipment_id = #{fEquipmentId}
......
......@@ -3,51 +3,8 @@ import request from '@/utils/request'
// 查询生产设备报警信息列表
export function listEquipmentAlarmData(query) {
return request({
url: '/equipmentAlarmData/equipmentAlarmData/list',
url: '/equipmentAlarmData/record/list',
method: 'get',
params: query
})
}
// 查询生产设备报警信息详细
export function getEquipmentAlarmData(fEquipmentAlarmDataId) {
return request({
url: '/equipmentAlarmData/equipmentAlarmData/' + fEquipmentAlarmDataId,
method: 'get'
})
}
// 新增生产设备报警信息
export function addEquipmentAlarmData(data) {
return request({
url: '/equipmentAlarmData/equipmentAlarmData',
method: 'post',
data: data
})
}
// 修改生产设备报警信息
export function updateEquipmentAlarmData(data) {
return request({
url: '/equipmentAlarmData/equipmentAlarmData',
method: 'put',
data: data
})
}
// 删除生产设备报警信息
export function delEquipmentAlarmData(fEquipmentAlarmDataId) {
return request({
url: '/equipmentAlarmData/equipmentAlarmData/' + fEquipmentAlarmDataId,
method: 'delete'
})
}
// 导出生产设备报警信息
export function exportEquipmentAlarmData(query) {
return request({
url: '/equipmentAlarmData/equipmentAlarmData/export',
method: 'get',
params: query
})
}
\ No newline at end of file
......@@ -109,6 +109,18 @@ export function powerOnAllStore() {
method: 'get'
})
}
export function designatedDevicePowerOn(equipmentCode) {
return request({
url: '/storey/designatedDevicePowerOn/' + equipmentCode,
method: 'get'
})
}
export function designatedDevicePowerOff(equipmentCode) {
return request({
url: '/storey/designatedDevicePowerOff/' + equipmentCode,
method: 'get'
})
}
export function powerOffAllStore() {
return request({
......@@ -116,3 +128,10 @@ export function powerOffAllStore() {
method: 'get'
})
}
export function scanAndStartAgingAllCabinetLayers() {
return request({
url: '/storey/scanAndStartAgingAllCabinetLayers',
method: 'get'
})
}
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px">
<el-form-item label="报警设备编号" prop="fEquipmentCode">
<el-input
v-model="queryParams.fEquipmentCode"
placeholder="请输入报警设备编号"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="equipmentAlarmDataList" @selection-change="handleSelectionChange">
<el-table-column label="报警设备编号" align="center" prop="fEquipmentCode" />
<el-table-column label="报警数据" align="center" prop="fAlarmData" />
<el-table-column label="创建时间" align="center" prop="fCreateTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.fCreateTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listEquipmentAlarmData } from "@/api/equipmentAlarmData/equipmentAlarmData";
export default {
name: "EquipmentAlarmData",
components: {
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 生产设备报警信息表格数据
equipmentAlarmDataList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
fAlarmCode: null,
fAlarmType: null,
fAlarmData: null,
fCreateTime: null
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询生产设备报警信息列表 */
getList() {
this.loading = true;
listEquipmentAlarmData(this.queryParams).then(response => {
this.equipmentAlarmDataList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
fEquipmentAlarmDataId: null,
fAlarmCode: null,
fAlarmType: null,
fAlarmData: null,
fCreateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.fEquipmentAlarmDataId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加生产设备报警信息";
}
}
};
</script>
......@@ -65,7 +65,7 @@
</el-table-column>
<el-table-column label="行" prop="row" align="center" width="80" />
<el-table-column label="列" prop="col" align="center" width="80" />
<el-table-column label="位置编号" prop="number" align="center" width="80" />
<el-table-column label="位置编号" prop="number" align="center" width="150" />
<el-table-column label="绑定时间" align="center" width="150">
<template slot-scope="scope">
<div class="binding-time">{{ scope.row.bindingTime ? formatDate(scope.row.bindingTime) : '-' }}</div>
......
......@@ -83,7 +83,7 @@
<div class="priority-control">
<div class="priority-display">{{ priorityDisplayText }}</div>
<button class="priority-toggle-btn" @click="togglePriority">
{{ priorityToggleText }}
<!-- {{ priorityToggleText }}-->点击切换
</button>
</div>
......
......@@ -50,47 +50,12 @@
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
:loading="exportLoading"
@click="handleExport"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="el-icon-reading"
size="mini"
@click="handleReading"
>批量读取设备状态</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="el-icon-reading"
size="mini"
@click="handleHoldingRegister"
>测试501端口</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-circle-plus"
size="mini"
@click="handleAllPowerOn"
>所有设备上电</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-remove"
size="mini"
@click="handleAllPowerOff"
>所有设备断电</el-button>
</el-col>
<!-- 移除的功能按钮 -->
<el-col :span="1.5">
<el-button
......@@ -111,15 +76,7 @@
@click="handleStop"
>机械臂停止</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-circle-close"
size="mini"
@click="handleWriteHour"
>写时间测试</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
......@@ -181,12 +138,12 @@
@click="handlePowerOutage(scope.row)"
>断电</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleFeeding(scope.row)"
>上料</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleFeeding(scope.row)"-->
<!-- >上料</el-button>-->
<el-button
size="mini"
type="text"
......@@ -256,9 +213,8 @@
<script>
import { listStorey, getStorey, delStorey, addStorey, updateStorey,
exportStorey,PowerOn,PowerOutage ,
batchReadingCabinetStatus,powerOnAllStore,powerOffAllStore,
feeding, blanking,readingHoldingRegister} from "@/api/storey/storey";
import {sendHomeCommand, sendStopCommand,sendWriteHour} from "@/api/robotArm/robotArmCommand";
feeding, blanking} from "@/api/storey/storey";
import {sendHomeCommand, sendStopCommand} from "@/api/robotArm/robotArmCommand";
export default {
name: "Info",
......@@ -467,65 +423,14 @@ export default {
handleDelete(row) {
const fStoreyIds = row.fStoreyId || this.ids;
this.$confirm('是否确认删除柜层信息编号为"' + fStoreyIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delStorey(fStoreyIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
// 测试 某个设备的 501,502,503端口号
handleHoldingRegister() {
this.$prompt('请输入ip加端口号 逗号分隔', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
readingHoldingRegister(value).then(response => {
if(response.code === 200) {
this.msgSuccess("msg = " + response.data);
}
})
}).catch(() => {
});
},
handleReading() {
this.$prompt('请输入老化柜编号', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
batchReadingCabinetStatus(value).then(response => {
if(response.code === 200) {
this.msgSuccess("msg = " + response.data);
}
})
}).catch(() => {
});
},
handleAllPowerOff() {
this.$confirm('是否确认给所有设备断电?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return powerOffAllStore();
return delStorey(fStoreyIds);
}).then(() => {
this.getList();
this.msgSuccess("断电成功");
}).catch(() => {});
},
handleAllPowerOn() {
this.$confirm('是否确认给所有设备上电?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return powerOnAllStore();
}).then(() => {
this.getList();
this.msgSuccess("上电成功");
this.msgSuccess("删除成功");
}).catch(() => {});
},
......@@ -536,20 +441,6 @@ export default {
})
},
/** 写时钟 */
handleWriteHour() {
this.$prompt('请输入ip加端口号 逗号分隔', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
sendWriteHour(value).then(response => {
if(response.code === 200) {
this.msgSuccess("msg = " + response.data);
}
})
}).catch(() => {
});
},
// 停止
handleStop() {
sendStopCommand().then( response => {
......@@ -560,16 +451,16 @@ export default {
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有柜层信息数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportStorey(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportStorey(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
}
}
};
......
<template>
<div class="app-container">
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- size="mini"-->
<!-- @click="testAgingCabinetAndPowerCheck"-->
<!-- >测试老化柜状态获取-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- 新增的批量操作按钮 -->
<el-col :span="1.5">
<el-button
type="primary"
type="info"
plain
icon="el-icon-reading"
size="mini"
@click="testAgingCabinetAndPowerCheck"
>测试老化柜状态获取
</el-button>
@click="handleReading"
>批量读取设备状态</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="info"-->
<!-- plain-->
<!-- icon="el-icon-reading"-->
<!-- size="mini"-->
<!-- @click="handleHoldingRegister"-->
<!-- >测试501端口</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-circle-close"
size="mini"
@click="handleWriteHour"
>写时间测试</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-circle-check"
size="mini"
@click="handleScanAndStartAgingAllCabinetLayers"
>扫描并老化</el-button>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-circle-plus"
size="mini"
@click="handleAllPowerOn"
>所有设备上电</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-circle-plus"
size="mini"
@click="handleDesignatedDevicePowerOn"
>指定设备上电</el-button>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-remove"
size="mini"
@click="handleAllPowerOff"
>所有设备断电</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-remove"
size="mini"
@click="handleDesignatedDevicePowerOff"
>指定设备断电</el-button>
</el-col>
</el-row>
<el-input
type="textarea"
:rows="25"
:rows="15"
placeholder="返回内容信息"
v-model="textarea">
</el-input>
......@@ -21,8 +99,12 @@
</template>
<script>
import {getAgingCabinetAndPowerCheck} from "@/api/testScheduledTasks/testTasks";
import {
batchReadingCabinetStatus, readingHoldingRegister, powerOnAllStore, powerOffAllStore,
scanAndStartAgingAllCabinetLayers, designatedDevicePowerOn, designatedDevicePowerOff
} from "@/api/storey/storey";
import {sendWriteHour} from "@/api/robotArm/robotArmCommand";
export default {
name: "TestScheduledTasks",
......@@ -36,7 +118,7 @@ export default {
methods: {
testAgingCabinetAndPowerCheck() {
getAgingCabinetAndPowerCheck().then(response => {
this.textarea = "";
this.textarea = "";
if (response.length > 0) {
for (let i = 0; i < response.length; i++) {
let item = response[i];
......@@ -51,6 +133,113 @@ export default {
}
}
);
},
// 从原组件提取的功能方法
handleReading() {
this.$prompt('请输入老化柜编号', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
batchReadingCabinetStatus(value).then(response => {
if(response.code === 200) {
this.textarea = "批量读取设备状态成功:" + response.data;
this.$message.success("读取成功");
}
})
}).catch(() => {});
},
handleHoldingRegister() {
this.$prompt('请输入ip加端口号 逗号分隔', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
readingHoldingRegister(value).then(response => {
if(response.code === 200) {
this.textarea = "测试501端口成功:" + response.data;
this.$message.success("测试成功");
}
})
}).catch(() => {});
},
handleAllPowerOn() {
this.$confirm('是否确认给所有设备上电?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return powerOnAllStore();
}).then(() => {
this.textarea = "所有设备上电操作执行成功";
this.$message.success("上电成功");
}).catch(() => {});
},
handleDesignatedDevicePowerOff() {
this.$prompt('请输入需要断电的柜子设备编号北1-15,南16-30,英文逗号分隔', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
designatedDevicePowerOff(value).then(response => {
if(response.code === 200) {
this.textarea = "指定设备已断电成功:" + response.data;
this.$message.success("指定设备已断电成功");
}
})
}).catch(() => {});
},
handleDesignatedDevicePowerOn() {
this.$prompt('请输入需要上电的柜子设备编号北1-15,南16-30,英文逗号分隔', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
designatedDevicePowerOn(value).then(response => {
if(response.code === 200) {
this.textarea = "指定设备已上电成功:" + response.data;
this.$message.success("指定设备已上电成功");
}
})
}).catch(() => {});
},
handleAllPowerOff() {
this.$confirm('是否确认给所有设备断电?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return powerOffAllStore();
}).then(() => {
this.textarea = "所有设备断电操作执行成功";
this.$message.success("断电成功");
}).catch(() => {});
},
// 扫描并老化
handleScanAndStartAgingAllCabinetLayers() {
this.$confirm('警示:此操作将清理所有已存在的任务并重新扫描所有老化柜的层信息去生成任务,确认操作请点击确定!!!', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return scanAndStartAgingAllCabinetLayers();
}).then(() => {
this.$message.success("我想好了");
}).catch(() => {});
},
handleWriteHour() {
this.$prompt('请输入ip加端口号 逗号分隔', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
sendWriteHour(value).then(response => {
if(response.code === 200) {
this.textarea = "写时间测试成功:" + response.data;
this.$message.success("写时间成功");
}
})
}).catch(() => {});
}
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment