1
0
forked from dyf/dyf-vue-ui

修复bug

This commit is contained in:
fengerli
2025-09-02 17:48:02 +08:00
parent f17e878e0c
commit 78771e9551
3 changed files with 14 additions and 3 deletions

View File

@ -339,18 +339,22 @@ const handleLaserClick = async () => {
// 人员信息发送
const registerPostInit = () => {
if (!deviceDetail.value.personnelInfo.unitName) {
ElMessage.closeAll();
proxy?.$modal.msgWarning('单位名称不能为空');
return
}
if (!deviceDetail.value.personnelInfo.name) {
ElMessage.closeAll();
proxy?.$modal.msgWarning('姓名不能为空');
return
}
if (!deviceDetail.value.personnelInfo.position) {
ElMessage.closeAll();
proxy?.$modal.msgWarning('职位不能为空');
return
}
if (!deviceDetail.value.personnelInfo.code) {
ElMessage.closeAll();
proxy?.$modal.msgWarning('ID不能为空');
return
}
@ -397,7 +401,7 @@ const saveBtn = () => {
// 强制报警
const forceAlarm = async () => {
try {
await proxy?.$modal.confirm('确定要对该设备开启强制报警?','');
await proxy?.$modal.confirm('确定要对该设备开启强制报警?', '');
forceAlarmLoading.value = true
// 2. 准备请求数据
const batchId = generateShortId();
@ -440,6 +444,7 @@ const forceAlarm = async () => {
const sendTextMessage = async () => {
// 防重复提交
if (!deviceDetail.value.sendMsg) {
ElMessage.closeAll();
proxy?.$modal.msgWarning('发送信息不能为空');
return;
}
@ -514,7 +519,8 @@ onMounted(() => {
.online {
color: #00ff00;
}
.offline{
.offline {
color: rgb(224, 52, 52);
}
}

View File

@ -151,7 +151,7 @@ const renderMarkers = () => {
map: mapInstance,
icon: new AMap.Icon({
size: new AMap.Size(32, 32), // Marker显示尺寸
image: 'https://a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
image: '/src/assets/images/position_ico.png',
imageSize: new AMap.Size(32, 32)
})
});

View File

@ -356,10 +356,12 @@ const getDeptTree = async () => {
const sendTextMessage = () => {
// 防重复提交
if (!queryParams.value.deviceType) {
ElMessage.closeAll();
proxy?.$modal.msgWarning('请先选择设备类型');
return;
}
if (ids.value.length == 0) {
ElMessage.closeAll();
proxy?.$modal.msgWarning('请先选中一条设备');
return;
}
@ -368,6 +370,7 @@ const sendTextMessage = () => {
// 发送文本消息确认
const submitForm = async () => {
if (!form.value.messageToSend) {
ElMessage.closeAll();
proxy?.$modal.msgWarning('发送消息不能为空');
return
}
@ -423,10 +426,12 @@ const cancel = () => {
// 强制报警
const forceAlarm = async () => {
if (!queryParams.value.deviceType) {
ElMessage.closeAll();
proxy?.$modal.msgWarning('请先选择设备类型');
return;
}
if (ids.value.length == 0) {
ElMessage.closeAll();
proxy?.$modal.msgWarning('请先选中一条设备');
return;
}