Commit 4edba1e833384a598138eed7719bcf3297ddbff5

Authored by fengtao
1 parent cbd88574

perf: 优化设备分布地图,弹窗可自定义显示内容

... ... @@ -36,7 +36,6 @@
36 36 <setting-item-box :alone="true">
37 37 <setting-item>
38 38 <n-button
39   - v-if="optionData.dialogConfigField.length < 9"
40 39 size="small"
41 40 @click="
42 41 optionData.dialogConfigField.push({
... ...
... ... @@ -83,6 +83,7 @@ const initMap = (newData: any) => {
83 83 skyColor: skyColor.value,
84 84 viewMode: viewMode.value, // 地图模式
85 85 willReadFrequently: true,
  86 + // zoomEnable: false,
86 87 WebGLParams: {
87 88 preserveDrawingBuffer: true
88 89 }
... ... @@ -172,10 +173,11 @@ const createInfoWindow = async (extraInfo: dataExtraInfoType) => {
172 173 //
173 174
174 175 const dialogStyles = {
175   - textOverflowStyle: `width:15rem;text-overflow:ellipsis;overflow:hidden;word-break:break-all;white-space:nowrap;`,
176   - customFieldBox: `display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;color:white;`,
  176 + textOverflowStyle: `width:18rem;text-overflow:ellipsis;overflow:hidden;word-break:break-all;white-space:nowrap;`,
  177 + customFieldBox: `display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;color:white;gap:4px;`,
177 178 defaultFieldHeaderBox: `display:flex;justify-content:space-between;align-items:center;color:white;`,
178 179 defaultFieldHeaderBoldText: `width:12rem;text-overflow:ellipsis;overflow:hidden;word-break:break-all;white-space:nowrap;font-size:15px;font-weight:bold;`,
  180 + fieldBox: 'height: 11rem; overflow: hidden; overflow-y: auto;',
179 181 defaultFieldBox: `display:flex;flex-direction:column;justify-content:space-between;color:white;margin-top:1rem;gap:0.95rem;`,
180 182 iconSize: `width:1.2rem;height:1.2rem;`,
181 183 textStatus: `margin-left:0.6rem;font-weight:bold;`,
... ... @@ -189,15 +191,17 @@ const createInfoWindow = async (extraInfo: dataExtraInfoType) => {
189 191 dialogCustomField.value
190 192 ? `
191 193 <div style="position: absolute;top: 135px;left:110px;width:20rem">
192   - <div style="${dialogStyles.customFieldBox}">
193   - ${realDialogConfigFieldValue?.map((item: { label: string; value: string; realValue: any }) => {
194   - const { label, realValue } = item
195   - return `
196   - <div style="${dialogStyles.textOverflowStyle}">
197   - <span >${label}:${realValue}</span>
198   - </div>
199   - `
200   - })}
  194 + <div style="${dialogStyles.fieldBox}">
  195 + <div style="${dialogStyles.customFieldBox}">
  196 + ${realDialogConfigFieldValue?.map((item: { label: string; value: string; realValue: any }) => {
  197 + const { label, realValue } = item
  198 + return `
  199 + <div style="${dialogStyles.textOverflowStyle}">
  200 + <span >${label}:${realValue}</span>
  201 + </div>
  202 + `
  203 + })}
  204 + </div>
201 205 </div>
202 206 </div>
203 207 `
... ...