forked from dyf/dyf-vue-ui
控制中心添加670的控制,大屏页面问题
This commit is contained in:
@ -472,6 +472,16 @@ const getList = () => {
|
||||
Status.sosMode = res.data.staSOSGrade;
|
||||
Status.staticPower = res.data.staDetectGrade;
|
||||
Status.lightMode = res.data.staLightGrade;
|
||||
if(!deviceDetail.value.personnelInfo){
|
||||
deviceDetail.value.personnelInfo={
|
||||
'id': null,
|
||||
'deviceId': null,
|
||||
'name': null,
|
||||
'position': null,
|
||||
'unitName': null,
|
||||
'code': null
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -538,6 +548,8 @@ const sendTextMessage = async () => {
|
||||
batchId: ''
|
||||
};
|
||||
|
||||
|
||||
|
||||
api.SendMessage(json).then((res) => {
|
||||
if (res.code === 200) {
|
||||
ElMessage.closeAll();
|
||||
|
||||
@ -165,6 +165,8 @@ import apiTypeAll from '@/api/equipmentManagement/device/index';
|
||||
import { deviceQuery, deviceVO } from '@/api/controlCenter/controlPanel/types';
|
||||
import Amap from "./components/map.vue";
|
||||
import { generateShortId, getDeviceStatus } from '@/utils/function';
|
||||
import eqControl from '@/api/controlCenter/controlPanel/eqControl';
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute(); // 新增:用于获取URL中的query参数
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
@ -380,6 +382,7 @@ const submitForm = async () => {
|
||||
return
|
||||
}
|
||||
try {
|
||||
|
||||
sendTextLoading.value = true;
|
||||
// 2. 准备请求数据
|
||||
const deviceIds = ids.value.map(item => item.id);
|
||||
@ -392,10 +395,11 @@ const submitForm = async () => {
|
||||
typeName: typeName,
|
||||
batchId: batchId,
|
||||
deviceImeiList: deviceImeiList,
|
||||
sendMsg: form.value.messageToSend
|
||||
sendMsg: form.value.messageToSend,
|
||||
instructValue:""
|
||||
};
|
||||
// 3.人员信息
|
||||
const registerRes = await api.deviceSendMessage(data);
|
||||
const registerRes = await eqControl.deviceSendMessage(data);
|
||||
if (registerRes.code !== 200) {
|
||||
proxy?.$modal.msgWarning(registerRes.msg)
|
||||
return
|
||||
@ -454,9 +458,10 @@ const forceAlarm = async () => {
|
||||
typeName: typeName,
|
||||
batchId: batchId,
|
||||
deviceImeiList: deviceImeiList,
|
||||
instructValue: '1', //强制报警1,解除报警0
|
||||
instructValue: '1' //强制报警1,解除报警0
|
||||
|
||||
}
|
||||
const registerRes = await api.sendAlarmMessage(data);
|
||||
const registerRes = await eqControl.sendAlarmMessage(data);
|
||||
if (registerRes.code !== 200) {
|
||||
proxy?.$modal.msgWarning(registerRes.msg)
|
||||
return
|
||||
|
||||
@ -12,8 +12,8 @@
|
||||
<el-icon v-show="!Status.showCheckGroup"><CaretBottom /></el-icon>
|
||||
<el-icon v-show="Status.showCheckGroup"><CaretTop /></el-icon>
|
||||
</div>
|
||||
<div class="clear" @click.stop="search.groupId=''">
|
||||
<el-icon ><CloseBold /></el-icon>
|
||||
<div class="clear" @click.stop="search.groupId = ''">
|
||||
<el-icon><CloseBold /></el-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -34,19 +34,16 @@
|
||||
<div class="vertiLine"></div>
|
||||
<div class="input" @click.stop="showCheck('showCheckType')">
|
||||
<div>{{ devType }}</div>
|
||||
|
||||
|
||||
|
||||
<div class="iconContent">
|
||||
<div class="iconContent">
|
||||
<div class="arrow">
|
||||
<el-icon v-show="!Status.showCheckType"><CaretBottom /></el-icon>
|
||||
<el-icon v-show="Status.showCheckType"><CaretTop /></el-icon>
|
||||
</div>
|
||||
<div class="clear" @click.stop="search.deviceType=''">
|
||||
<el-icon ><CloseBold /></el-icon>
|
||||
<div class="clear" @click.stop="search.deviceType = ''">
|
||||
<el-icon><CloseBold /></el-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="ul" :class="Status.showCheckType ? '' : 'displayNone'">
|
||||
<div
|
||||
@ -323,7 +320,7 @@ function getPoints() {
|
||||
var array = res.data;
|
||||
// if (!array.length) {
|
||||
// // ElMessage.error('未查询到任何数据,以下展示假数据,仅供查看效果,正式上线时取消');
|
||||
// // array = fakeData;
|
||||
// // array = fakeData;
|
||||
// // return;
|
||||
// }
|
||||
let promise = [];
|
||||
@ -361,10 +358,8 @@ function getPoints() {
|
||||
}
|
||||
}
|
||||
}
|
||||
Promise.allSettled(promise).then((res) => {
|
||||
// map.setFitView();
|
||||
let center=map.calcCenter();
|
||||
map.setCenter(center.lng,center.lat);
|
||||
Promise.allSettled(promise).then((res) => {
|
||||
map.setFitView();
|
||||
});
|
||||
} else {
|
||||
console.error('接口getDeviceLocationInfo出现了未知的异常', res);
|
||||
@ -390,7 +385,7 @@ function getTypes() {
|
||||
if (res.data.length) {
|
||||
types.value = res.data.map((v) => {
|
||||
return {
|
||||
value: v.id,
|
||||
value: v.deviceTypeId,
|
||||
label: v.typeName
|
||||
};
|
||||
});
|
||||
@ -520,7 +515,8 @@ function showCheck(type) {
|
||||
|
||||
onMounted(() => {
|
||||
map.initMap(hideCheck).then((res) => {
|
||||
setInterval(getPoints,300000);
|
||||
getPoints();
|
||||
setInterval(getPoints, 300000);
|
||||
});
|
||||
|
||||
getTypes();
|
||||
@ -691,15 +687,15 @@ onMounted(() => {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.iconContent:hover .arrow{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.iconContent .clear{
|
||||
.iconContent:hover .arrow {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.iconContent:hover .clear{
|
||||
.iconContent .clear {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.iconContent:hover .clear {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user