离线地图修改

This commit is contained in:
仲么了
2024-02-28 09:42:07 +08:00
parent 374971c828
commit 38a4183276
6 changed files with 76 additions and 12 deletions

View File

@@ -15,6 +15,7 @@ import '@/styles/index.scss'
import '@/assets/font/iconfont.css'
import { ElDialog } from 'element-plus'
import BaiduMap from 'vue-baidu-map-3x'
import BaiduMapOffline from 'vue-baidu-map-offline';
import ExcelJS from 'exceljs'
import VXETablePluginExportXLSX from 'vxe-table-plugin-export-xlsx'
// 方式1NPM 安装,注入 ExcelJS 对象
@@ -24,12 +25,15 @@ VXETable.use(VXETablePluginExportXLSX, {
window.XEUtils = XEUtils
const app = createApp(App)
//开启离线地图
// app.use(BaiduMapOffline, {
// offline: true,
// offlineUrl: window.location.origin + '/map/',
// });
app.use(BaiduMap, {
ak: 'RpQi6WNFZ9tseKzhdwOQsXwFsoVntnsN',
// type: 'WebGL' // ||API 默认API (使用此模式 BMap=BMapGL)
})
ak: 'Yp57V71dkOPiXjiN8VdcFRsVELzlVNKK',
v: '3.0',
});
app.use(router)
app.use(pinia)
app.use(ElementPlus)

View File

@@ -1,5 +1,5 @@
<template>
<div style='display: flex;flex-direction: column;height: 100%' v-loading='loading'>
<div v-loading='loading' class='running-condition'>
<el-form :inline='true'>
<el-form-item label='日期'>
<DatePicker ref='datePickerRef'></DatePicker>
@@ -12,11 +12,11 @@
<div
style='position: absolute; right: 10px; top: 10px; z-index: 2;display: flex;align-items: center;font-size: 12px'>
<el-tag style='width: 20px;height: 12px' :style='{background: gradeColor[2]}'></el-tag>
<span class='ml2' :style='{color: gradeColor[2]}'> {{ 'X<60%' }} </span>
<span class='ml2' :style='{color: gradeColor[2]}'> {{ 'X<60%' }} </span>
<el-tag class='ml10' style='width: 20px;height: 12px' :style='{background: gradeColor[1]}'></el-tag>
<span class='ml2' :style='{color: gradeColor[1]}'>{{ '60%≤X<90%' }} </span>
<span class='ml2' :style='{color: gradeColor[1]}'>{{ '60%≤X<90%' }} </span>
<el-tag class='ml10' style='width: 20px;height: 12px' :style='{background: gradeColor[0]}'></el-tag>
<span class='ml2' :style='{color: gradeColor[0]}'> {{ 'X≥90 %' }}</span>
<span class='ml2' :style='{color: gradeColor[0]}'> {{ 'X≥90 %' }}</span>
</div>
<my-echart :options='secondOptions' style='flex: 1;height: 100%' />
<my-echart :options='firstOptions' style='flex: 1;height: 100%' />
@@ -313,9 +313,18 @@ onMounted(() => {
</script>
<style lang='scss'>
.zanjiangfenbutongji {
position: relative;
.running-condition {
display: flex;
overflow: hidden;
flex-direction: column;
height: 100%;
box-sizing: border-box;
padding: 14px;
border: 1px solid var(--el-border-color);
.zanjiangfenbutongji {
position: relative;
display: flex;
overflow: hidden;
}
}
</style>