fix: BUG修改
This commit is contained in:
parent
27a5f2eba2
commit
f1c3f702e7
BIN
src/assets/images/dangerousEngineeringImg/dangerAlarm.png
Normal file
BIN
src/assets/images/dangerousEngineeringImg/dangerAlarm.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 463 B |
@ -20,7 +20,7 @@
|
|||||||
class="message-item"
|
class="message-item"
|
||||||
v-for="(item, index) in messageList"
|
v-for="(item, index) in messageList"
|
||||||
:key="index"
|
:key="index"
|
||||||
@dblclick="changeStatus(item)"
|
@click="changeStatus(item)"
|
||||||
>
|
>
|
||||||
<div class="message-content">
|
<div class="message-content">
|
||||||
<span class="message-title">{{ item.type == 1 ? "通知公告" : item.type == 2 ? "政策法规" : "无标题" }}</span>
|
<span class="message-title">{{ item.type == 1 ? "通知公告" : item.type == 2 ? "政策法规" : "无标题" }}</span>
|
||||||
@ -124,11 +124,11 @@ const createMqttConnect = () => {
|
|||||||
clientInstance.value.subscribe(`wisdomSite/message/${store.userInfo.userId}`, { qos: 1 }, (error, res) => {
|
clientInstance.value.subscribe(`wisdomSite/message/${store.userInfo.userId}`, { qos: 1 }, (error, res) => {
|
||||||
console.log(error, res);
|
console.log(error, res);
|
||||||
});
|
});
|
||||||
});
|
clientInstance.value.on("message", (topic, message) => {
|
||||||
clientInstance.value.on("message", (topic, message) => {
|
let val = JSON.parse(message.toString());
|
||||||
let val = JSON.parse(message.toString());
|
console.log(val);
|
||||||
console.log(val);
|
getInfoList();
|
||||||
getInfoList();
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 断开连接
|
// 断开连接
|
||||||
@ -171,6 +171,7 @@ onBeforeUnmount(() => {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.message-item {
|
.message-item {
|
||||||
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 20px 0;
|
padding: 20px 0;
|
||||||
|
|||||||
@ -536,6 +536,7 @@ onMounted(() => {});
|
|||||||
// height: 100%;
|
// height: 100%;
|
||||||
> div {
|
> div {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
min-height: 50px;
|
||||||
> div:nth-child(2n-1) {
|
> div:nth-child(2n-1) {
|
||||||
@include flex;
|
@include flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
@ -144,11 +144,71 @@ const onSearch = async (params: ResAiEngineerPage | ResAiProjectPage) => {
|
|||||||
);
|
);
|
||||||
// 匹配到的 去做一个处理 开关啥的
|
// 匹配到的 去做一个处理 开关啥的
|
||||||
monitorList.value = monitorList.value.map(item => (item === curr ? { ...curr, showGif: true } : { ...item, showGif: false }));
|
monitorList.value = monitorList.value.map(item => (item === curr ? { ...curr, showGif: true } : { ...item, showGif: false }));
|
||||||
params.longitude !== "" && params.longitude !== null
|
if (params.longitude && params.latitude) {
|
||||||
? map.value?.setCenter([params.longitude, +params.latitude])
|
console.log(111);
|
||||||
: map.value?.setCenter([116.481181, 39.90923]);
|
map.value?.setCenter([+params.longitude, +params.latitude]);
|
||||||
|
showInfoPage(curr);
|
||||||
|
}
|
||||||
|
// params.longitude !== "" && params.longitude !== null
|
||||||
|
// ? map.value?.setCenter([params.longitude, +params.latitude])
|
||||||
|
// : map.value?.setCenter([116.481181, 39.90923]);
|
||||||
};
|
};
|
||||||
|
// 展示信息窗口
|
||||||
|
const showInfoPage = async (obj: any) => {
|
||||||
|
const createMarkerImage = (state: string) => new URL(`../../../assets/images/AIwaring/${state}`, import.meta.url).href;
|
||||||
|
|
||||||
|
// 创建一个 选中的Icon
|
||||||
|
let selectIcon = getIcon(
|
||||||
|
"selected",
|
||||||
|
obj.environAlarmFlag === false ? createMarkerImage("clouding.gif") : createMarkerImage("warnclouding.gif")
|
||||||
|
);
|
||||||
|
|
||||||
|
// 将 icon 传入 marker
|
||||||
|
let startMarker = new AMapRef.value.Marker({
|
||||||
|
position: new AMapRef.value.LngLat(Number(obj.longitude) || 113, Number(obj.latitude) || 21),
|
||||||
|
icon: selectIcon,
|
||||||
|
offset: new AMapRef.value.Pixel(-13, -30)
|
||||||
|
});
|
||||||
|
map.value?.add([startMarker]);
|
||||||
|
monitorList.value = monitorList.value.map(val =>
|
||||||
|
val.latitude == obj.latitude && val.longitude == obj.longitude
|
||||||
|
? { ...obj, showGif: true }
|
||||||
|
: { ...val, showGif: false, showInfo: false }
|
||||||
|
);
|
||||||
|
const curr = monitorList.value.find(item => item.showGif);
|
||||||
|
curr.showInfo = !curr.showInfo;
|
||||||
|
// addMarker();
|
||||||
|
|
||||||
|
aiAlarmFlag.value = obj.aiAlarmFlag;
|
||||||
|
|
||||||
|
// e.target.setIcon(selectIcon);
|
||||||
|
if (active.value === 0) {
|
||||||
|
infoName.value = obj.projectName;
|
||||||
|
// @ts-expect-error
|
||||||
|
const { result } = await getAIprodetail({ projectId: obj.projectId });
|
||||||
|
// @ts-expect-error
|
||||||
|
infoWindowData.value = result;
|
||||||
|
} else {
|
||||||
|
infoName.value = obj.engineeringName;
|
||||||
|
const { result } = await getAIengdetail({ id: obj.id });
|
||||||
|
// @ts-expect-error
|
||||||
|
infoWindowData.value = result;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (curr.showInfo) {
|
||||||
|
infoShow.value = true;
|
||||||
|
const infowindow = new AMapRef.value.InfoWindow({
|
||||||
|
isCustom: true, //使用自定义窗体
|
||||||
|
content: infoWindowPage.value,
|
||||||
|
offset: new AMap.Pixel(16, -45)
|
||||||
|
});
|
||||||
|
|
||||||
|
infowindow.open(map.value, startMarker.getPosition());
|
||||||
|
} else {
|
||||||
|
infoShow.value = false;
|
||||||
|
onClose();
|
||||||
|
}
|
||||||
|
};
|
||||||
// 页面的搜索按钮
|
// 页面的搜索按钮
|
||||||
const onSearchInput = async (params: string) => {
|
const onSearchInput = async (params: string) => {
|
||||||
if (active.value === 0) {
|
if (active.value === 0) {
|
||||||
@ -266,7 +326,7 @@ const addMarker = () => {
|
|||||||
const mapData = async () => {
|
const mapData = async () => {
|
||||||
const AMap = await initAMap();
|
const AMap = await initAMap();
|
||||||
AMapRef.value = AMap;
|
AMapRef.value = AMap;
|
||||||
map.value = new AMap.Map("map-container", { zoom: 10, center: [116.481181, 39.90923], viewMode: "2D", resizeEnable: true });
|
map.value = new AMap.Map("map-container", { zoom: 7, center: [116.481181, 39.90923], viewMode: "2D", resizeEnable: true });
|
||||||
// 这个是点击地图的时候关闭信息弹窗 就不用点击图标或者x的时候 但是得点两次 所以有问题
|
// 这个是点击地图的时候关闭信息弹窗 就不用点击图标或者x的时候 但是得点两次 所以有问题
|
||||||
// map.value?.on("click", function (e) {
|
// map.value?.on("click", function (e) {
|
||||||
// infoShow.value = false;
|
// infoShow.value = false;
|
||||||
|
|||||||
@ -15,9 +15,13 @@
|
|||||||
<div class="leftMenu_item">
|
<div class="leftMenu_item">
|
||||||
<div class="leftMenu_item flx-justify-between">
|
<div class="leftMenu_item flx-justify-between">
|
||||||
<div style="margin-top: 5px" class="flx-justify-between">
|
<div style="margin-top: 5px" class="flx-justify-between">
|
||||||
<img style="margin-right: 5px" src="@/assets/images/AIwaring/dustMap.png" alt="" />
|
<img
|
||||||
|
style="margin-right: 5px; width: 10px; height: 12px"
|
||||||
|
src="@/assets/images/dangerousEngineeringImg/dangerAlarm.png"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
<el-tooltip effect="dark" :content="data.projectAddress || data.address" placement="top-start">
|
<el-tooltip effect="dark" :content="data.projectAddress || data.address" placement="top-start">
|
||||||
<span class="middleSize">{{ data.projectAddress || data.address }}</span>
|
<span class="middleSize">危大工程总数:{{ data.number ? data.number : 0 }}</span>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -185,7 +185,6 @@ const onSearch = async (params: ResAiEngineerPage | ResAiProjectPage) => {
|
|||||||
map.value?.setCenter([+params.longitude, +params.latitude]);
|
map.value?.setCenter([+params.longitude, +params.latitude]);
|
||||||
showInfoPage(curr);
|
showInfoPage(curr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// params.longitude !== "" && params.longitude !== null
|
// params.longitude !== "" && params.longitude !== null
|
||||||
// ? map.value?.setCenter([params.longitude, +params.latitude])
|
// ? map.value?.setCenter([params.longitude, +params.latitude])
|
||||||
// : map.value?.setCenter([116.481181, 39.90923]);
|
// : map.value?.setCenter([116.481181, 39.90923]);
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
// width: 290px;
|
// width: 290px;
|
||||||
// 页面的项目工程
|
// 页面的项目工程
|
||||||
:deep(.item) {
|
:deep(.item) {
|
||||||
height: 78px !important;
|
height: 108px !important;
|
||||||
}
|
}
|
||||||
:deep(.content) {
|
:deep(.content) {
|
||||||
height: calc(100% - 150px) !important;
|
height: calc(100% - 150px) !important;
|
||||||
@ -29,15 +29,30 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.leftMenu_item {
|
.leftMenu_item {
|
||||||
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
.middleSize {
|
> div {
|
||||||
display: inline-block;
|
width: 100%;
|
||||||
font-size: 12px;
|
.middleSize {
|
||||||
white-space: nowrap;
|
display: inline-block;
|
||||||
text-overflow: ellipsis;
|
font-size: 12px;
|
||||||
overflow: hidden;
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.count-data {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 15px;
|
||||||
|
span {
|
||||||
|
color: #838689;
|
||||||
|
}
|
||||||
|
span:nth-child(1) {
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,13 +13,17 @@
|
|||||||
<div class="leftProject" @click="onSearch(data)">
|
<div class="leftProject" @click="onSearch(data)">
|
||||||
<span class="projectName">{{ data.projectName || data.engineeringName }}</span>
|
<span class="projectName">{{ data.projectName || data.engineeringName }}</span>
|
||||||
<div class="leftMenu_item">
|
<div class="leftMenu_item">
|
||||||
<div class="leftMenu_item flx-justify-between">
|
<div>
|
||||||
<div style="margin-top: 5px" class="flx-justify-between">
|
<div style="margin-top: 5px" class="flx-justify-between">
|
||||||
<img style="margin-right: 5px" src="@/assets/images/AIwaring/dustMap.png" alt="" />
|
<img style="margin-right: 5px" src="@/assets/images/AIwaring/dustMap.png" alt="" />
|
||||||
<el-tooltip effect="dark" :content="data.projectAddress || data.address" placement="top-start">
|
<el-tooltip effect="dark" :content="data.projectAddress || data.address" placement="top-start">
|
||||||
<span class="middleSize">{{ data.projectAddress || data.address }}</span>
|
<span class="middleSize">{{ data.projectAddress || data.address }}</span>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="count-data">
|
||||||
|
<span>单体工程数量:{{ data.singleProjectNum ? data.singleProjectNum : 0 }}</span>
|
||||||
|
<span>已验收单体工程数量:{{ data.acceptedNum ? data.acceptedNum : 0 }}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -539,6 +539,7 @@ onMounted(() => {});
|
|||||||
width: 97%;
|
width: 97%;
|
||||||
// height: 100%;
|
// height: 100%;
|
||||||
> div {
|
> div {
|
||||||
|
min-height: 50px;
|
||||||
display: flex;
|
display: flex;
|
||||||
> div:nth-child(2n-1) {
|
> div:nth-child(2n-1) {
|
||||||
@include flex;
|
@include flex;
|
||||||
|
|||||||
@ -152,7 +152,6 @@ const headerList = reactive([
|
|||||||
{ label: "未开始", color: "#35e5fd" },
|
{ label: "未开始", color: "#35e5fd" },
|
||||||
{ label: "进行中", color: "#f1d520" },
|
{ label: "进行中", color: "#f1d520" },
|
||||||
{ label: "已完成", color: "#4fd389" },
|
{ label: "已完成", color: "#4fd389" },
|
||||||
,
|
|
||||||
{ label: "逾期", color: "#F80840" }
|
{ label: "逾期", color: "#F80840" }
|
||||||
// { label: "逾期未开始", color: "#F80840" },
|
// { label: "逾期未开始", color: "#F80840" },
|
||||||
// { label: "逾期进行中", color: "#fc6f8e" },
|
// { label: "逾期进行中", color: "#fc6f8e" },
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
.el-container {
|
.el-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
overflow-y: scroll;
|
||||||
|
/* 隐藏滚动条 */
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
.el-header {
|
.el-header {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -541,6 +541,7 @@ onMounted(() => {});
|
|||||||
width: 97%;
|
width: 97%;
|
||||||
// height: 100%;
|
// height: 100%;
|
||||||
> div {
|
> div {
|
||||||
|
min-height: 50px;
|
||||||
display: flex;
|
display: flex;
|
||||||
> div:nth-child(2n-1) {
|
> div:nth-child(2n-1) {
|
||||||
@include flex;
|
@include flex;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user