装备配置率配置问题修改

This commit is contained in:
jiang 2026-01-30 16:42:03 +08:00
parent d8296ab418
commit b0ce123801
3 changed files with 31 additions and 16 deletions

View File

@ -8,12 +8,12 @@
@close="handleCloseDialog" @close="handleCloseDialog"
destroy-on-close destroy-on-close
> >
<el-row :gutter="24" class="map-container"> <el-row :gutter="24" class="map-container">
<el-col :span="24"> <el-col :span="24">
<!-- 百度地图容器 --> <!-- 百度地图容器 -->
<div id="container" style="height: 550px; background-color: #f5f5f5"></div> <div id="container" style="height: 550px; background-color: #f5f5f5"></div>
</el-col> </el-col>
</el-row> </el-row>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -38,8 +38,8 @@ export default {
return { return {
map: null, map: null,
trackAni: null, trackAni: null,
calLon: 116.404, // calLon: 116.404, //
calLat: 39.915, // calLat: 39.915, //
requestParams: { requestParams: {
beginTime: moment().subtract(1, 'days').format('YYYY-MM-DD HH:mm:ss'), beginTime: moment().subtract(1, 'days').format('YYYY-MM-DD HH:mm:ss'),
endTime: moment().format('YYYY-MM-DD HH:mm:ss'), endTime: moment().format('YYYY-MM-DD HH:mm:ss'),
@ -66,7 +66,8 @@ export default {
async initPage() { async initPage() {
this.initMap(); this.initMap();
}, },
/** 初始化百度地图(增加双重校验) */
/** 初始化百度地图(增加双重校验 + 中心点兜底) */
initMap() { initMap() {
this.$nextTick(() => { this.$nextTick(() => {
// 1SDK // 1SDK
@ -78,10 +79,24 @@ export default {
const container = document.getElementById('container'); const container = document.getElementById('container');
if (!container) return; if (!container) return;
// ---------- ----------
let targetLon = this.calLon; //
let targetLat = this.calLat; //
// address
if (this.address && this.address.trim() !== '') {
const [lon, lat] = this.address.split(',');
// NaN
if (lon && lat && !isNaN(Number(lon)) && !isNaN(Number(lat))) {
targetLon = Number(lon);
targetLat = Number(lat);
}
}
// ---------------------------------------------------
// //
this.map = new window.BMapGL.Map(container); this.map = new window.BMapGL.Map(container);
// //
const centerPoint = new window.BMapGL.Point(this.address.split(',')[0], this.address.split(',')[1]); const centerPoint = new window.BMapGL.Point(targetLon, targetLat);
// + // +
this.map.centerAndZoom(centerPoint, 15); this.map.centerAndZoom(centerPoint, 15);
// //
@ -89,7 +104,7 @@ export default {
// //
this.map.setHeading(64.5); this.map.setHeading(64.5);
this.map.setTilt(73); this.map.setTilt(73);
// //
const marker = new window.BMapGL.Marker(centerPoint); const marker = new window.BMapGL.Marker(centerPoint);
this.map.addOverlay(marker); this.map.addOverlay(marker);
}); });

View File

@ -162,7 +162,7 @@
<el-table-column align="center" prop="returnTime" label="归还时间" /> <el-table-column align="center" prop="returnTime" label="归还时间" />
<el-table-column align="center" prop="actualNumber" label="实际使用台班数(天)" width="160" /> <el-table-column align="center" prop="actualNumber" label="实际使用台班数(天)" width="160" />
<el-table-column align="center" prop="rentalAmount" label="租赁金额(元)" /> <el-table-column align="center" prop="rentalAmount" label="租赁金额(元)" />
<el-table-column align="center" prop="fileList" label="装备图"> <el-table-column align="center" prop="fileList" label="租赁单据">
<template v-slot="{ row }"> <template v-slot="{ row }">
<span <span
v-if="row.fileList && row.fileList.trim() !== ''" v-if="row.fileList && row.fileList.trim() !== ''"
@ -341,7 +341,7 @@
<!-- 图片一类的处理 --> <!-- 图片一类的处理 -->
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-form-item style="font-weight: bold" label="装备图" prop="fileList"> <el-form-item style="font-weight: bold" label="租赁单据" prop="fileList">
<ImageUpload <ImageUpload
v-model="addOrEditForm.fileList" v-model="addOrEditForm.fileList"
:value="addOrEditForm.fileList" :value="addOrEditForm.fileList"

View File

@ -10,9 +10,9 @@
style="margin-bottom: 20px" style="margin-bottom: 20px"
/> />
</div> </div>
<div class="head-container"> <div class="head-container" style="height:78.5vh;overflow: auto;background-color:#FFFFFF;padding: 10px">
<el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false" <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false"
:filter-node-method="filterNode" ref="tree" node-key="id" default-expand-all highlight-current :filter-node-method="filterNode" ref="tree" node-key="id" highlight-current
@node-click="handleNodeClick" @node-click="handleNodeClick"
/> />
</div> </div>