添加运行轨迹等弹窗内容

This commit is contained in:
978184212@qq.com 2026-08-03 17:21:59 +08:00
parent aef546997b
commit cf960f82b2
29 changed files with 1223 additions and 3442 deletions

View File

@ -37,6 +37,8 @@
"@vue/cli-service": "~5.0.0", "@vue/cli-service": "~5.0.0",
"eslint": "^7.32.0", "eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3", "eslint-plugin-vue": "^8.0.3",
"less": "^4.8.1",
"less-loader": "^13.0.0",
"vue-template-compiler": "^2.6.14" "vue-template-compiler": "^2.6.14"
}, },
"eslintConfig": { "eslintConfig": {

BIN
src/assets/image/puse.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 853 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 918 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

File diff suppressed because it is too large Load Diff

View File

@ -457,6 +457,15 @@
<LiulDialog v-if="liulShowFlag" :liulDataId="liulDataId" @close="liulShowFlag=false"/> <LiulDialog v-if="liulShowFlag" :liulDataId="liulDataId" @close="liulShowFlag=false"/>
<SingleEchartDialog v-if="singleEchartDialogShowFlag" :item="singleEchartData" @close="singleEchartDialogShowFlag=false"/> <SingleEchartDialog v-if="singleEchartDialogShowFlag" :item="singleEchartData" @close="singleEchartDialogShowFlag=false"/>
<TaizhangDialog v-if="taizhangDialogShowFlag" :resourcedirect="resourcedirect" @close="taizhangDialogShowFlag=false"/> <TaizhangDialog v-if="taizhangDialogShowFlag" :resourcedirect="resourcedirect" @close="taizhangDialogShowFlag=false"/>
<!-- 农机列表组件 -->
<zhnjCov
ref="agriculturalMachinery"
:vehicle-data="agriculturalVehicleData"
:vehicle-list="vehicleList"
:vehicle-list-full="vehicleListFull"
:visible.sync="agriculturalDialogVisible"
@close="agriculturalDialogVisible = false"
/>
</ScaleBox> </ScaleBox>
</template> </template>
@ -476,6 +485,7 @@ import vueSeamlessScroll from 'vue-seamless-scroll'
import hefentianqi from '@/pages/weather/weather.vue' import hefentianqi from '@/pages/weather/weather.vue'
import SoilDialog from '@/components/SoilDialog.vue' import SoilDialog from '@/components/SoilDialog.vue'
import LiulDialog from '@/components/LiulDialog.vue' import LiulDialog from '@/components/LiulDialog.vue'
import zhnjCov from '@/components/zhnjCov.vue';
import {_colors} from '@/utils/color.js' import {_colors} from '@/utils/color.js'
import SingleEchartDialog from "@/components/SingleEchartDialog.vue"; import SingleEchartDialog from "@/components/SingleEchartDialog.vue";
import TaizhangDialog from "@/components/TaizhangDialog.vue"; import TaizhangDialog from "@/components/TaizhangDialog.vue";
@ -489,7 +499,8 @@ export default {
hefentianqi, hefentianqi,
ScaleBox, ScaleBox,
SoilDialog, SoilDialog,
LiulDialog LiulDialog,
zhnjCov,
}, },
data() { data() {
return { return {
@ -565,6 +576,9 @@ export default {
currentVehicleInfo: null, currentVehicleInfo: null,
vehicleLocationMarker: null, vehicleLocationMarker: null,
vehicleInfoWindow: null, vehicleInfoWindow: null,
agriculturalDialogVisible: false,
agriculturalVehicleData: null,
vehicleListFull: null,
}; };
}, },
created() { created() {
@ -778,7 +792,8 @@ export default {
box-shadow: 0 0 40px rgba(0, 212, 255, 0.15); box-shadow: 0 0 40px rgba(0, 212, 255, 0.15);
backdrop-filter: blur(10px); backdrop-filter: blur(10px);
color: #8bb4d0; color: #8bb4d0;
"> cursor: pointer;
" class="vehicle-info-window">
<div style="display: flex; align-items: center; margin-bottom: 12px; border-bottom: 1px solid rgba(0, 212, 255, 0.15); padding-bottom: 10px;"> <div style="display: flex; align-items: center; margin-bottom: 12px; border-bottom: 1px solid rgba(0, 212, 255, 0.15); padding-bottom: 10px;">
<span style="font-size: 28px; margin-right: 12px;">🚛</span> <span style="font-size: 28px; margin-right: 12px;">🚛</span>
<span style="font-size: 18px; font-weight: bold; color: #FFD700;">${vehicleName}</span> <span style="font-size: 18px; font-weight: bold; color: #FFD700;">${vehicleName}</span>
@ -805,8 +820,9 @@ export default {
<span style="font-weight: 500; color: #00d4ff;">${lat.toFixed(6)}</span> <span style="font-weight: 500; color: #00d4ff;">${lat.toFixed(6)}</span>
</div> </div>
</div> </div>
<div style="margin-top: 10px; text-align: center; font-size: 11px; color: #4a8ba8; border-top: 1px solid rgba(0, 212, 255, 0.1); padding-top: 8px;"> <div style="margin-top: 10px; text-align: center; font-size: 12px; color: #00d4ff; border-top: 1px solid rgba(0, 212, 255, 0.1); padding-top: 8px; display: flex; align-items: center; justify-content: center; gap: 8px;">
📍 点击标记查看详情 <span>📍 点击查看农机列表</span>
<span style="font-size: 16px;"></span>
</div> </div>
</div> </div>
`; `;
@ -816,7 +832,6 @@ export default {
offset: new AMap.Pixel(0, -35), offset: new AMap.Pixel(0, -35),
autoMove: true, autoMove: true,
closeWhenClickMap: true, closeWhenClickMap: true,
//
isCustom: true, isCustom: true,
}); });
@ -824,17 +839,52 @@ export default {
this.vehicleInfoWindow.open(this.aMap, [lng, lat]); this.vehicleInfoWindow.open(this.aMap, [lng, lat]);
this.vehicleMarkers.push(this.vehicleInfoWindow); this.vehicleMarkers.push(this.vehicleInfoWindow);
// InfoWindow // -
setTimeout(() => { setTimeout(() => {
const infoWindowEl = document.querySelector('.amap-info-content'); const infoWindowEl = document.querySelector('.vehicle-info-window');
if (infoWindowEl) { if (infoWindowEl) {
infoWindowEl.style.background = 'transparent !important'; infoWindowEl.addEventListener('click', (e) => {
infoWindowEl.style.padding = '0 !important'; //
if (e.target.closest('.vehicle-info-window')) {
this.openAgriculturalMachineryList(vehicleInfo, point);
}
});
}
// InfoWindow
const infoWindowContent = document.querySelector('.amap-info-content');
if (infoWindowContent) {
infoWindowContent.style.background = 'transparent !important';
infoWindowContent.style.padding = '0 !important';
} }
}, 50); }, 50);
} }
}, },
//
openAgriculturalMachineryList(vehicleInfo, point) {
//
const vehicleData = {
vehicleInfo: vehicleInfo,
location: point,
vehicleName: vehicleInfo.vePlate || vehicleInfo.plateNumber || '车辆',
deviceId: vehicleInfo.gpsDeviceId || vehicleInfo.gpsId || '',
latitude: point.weidu || point.latitude || point.lat || 0,
longitude: point.jingdu || point.longitude || point.lng || point.lon || 0,
extData: {
vehicleType: '危废车辆',
status: '在线',
lastUpdate: point.createTime || point.server_time || point.updateTime || new Date().toISOString()
}
};
this.closeVehicleInfoWindow();
this.qcdtdialogTableVisible = false;
this.agriculturalVehicleData = vehicleData;
this.agriculturalDialogVisible = true;
},
// //
closeVehicleInfoWindow() { closeVehicleInfoWindow() {
if (this.vehicleInfoWindow) { if (this.vehicleInfoWindow) {
@ -872,15 +922,21 @@ export default {
pageNo: 1, pageNo: 1,
pageSize: 30, pageSize: 30,
}).then(res => { }).then(res => {
if (res.code === 200 && res.result) {
//
this.vehicleListFull = res.result;
// records
this.vehicleList = res.result.records || []; this.vehicleList = res.result.records || [];
console.log('车辆列表:', this.vehicleList); } else {
this.vehicleList = [];
this.vehicleListFull = null;
}
}).catch(err => { }).catch(err => {
console.error('获取车辆列表失败:', err); this.vehicleList = [];
this.vehicleListFull = null;
}); });
}, },
// ==================== ====================
formatter: function (num) { formatter: function (num) {
return num.toFixed(3) return num.toFixed(3)
}, },

File diff suppressed because it is too large Load Diff