|
|
@@ -5,7 +5,7 @@
|
|
|
|
|
|
</template>
|
|
|
<script>
|
|
|
-import {chartMap} from '@/api/dashboard-json'
|
|
|
+import { chartMap } from '@/api/dashboard-json'
|
|
|
|
|
|
export default {
|
|
|
name: 'ChartMap',
|
|
|
@@ -45,7 +45,7 @@ export default {
|
|
|
})
|
|
|
return ret
|
|
|
})
|
|
|
- window['mapData'] = data;
|
|
|
+ window['mapData'] = data
|
|
|
this.$refs.mapFrame.contentWindow.postMessage(
|
|
|
{
|
|
|
data: data
|
|
|
@@ -61,7 +61,7 @@ export default {
|
|
|
if (findConfig && (renderType === 1 || renderType === 2)) {
|
|
|
this.loadImage(findConfig['文件路径'])
|
|
|
} else if (findConfig && renderType === 0) {
|
|
|
- this.loadDXF(findConfig['名称'], findConfig['文件路径'])
|
|
|
+ this.loadDXF(findConfig['名称'], findConfig['文件路径'], findConfig['所亭路径'])
|
|
|
}
|
|
|
})
|
|
|
console.log('data', data)
|
|
|
@@ -69,24 +69,24 @@ export default {
|
|
|
console.log('loadDone')
|
|
|
},
|
|
|
async getConfig() {
|
|
|
- const response = await fetch('/static/config.json');
|
|
|
- const json = await response.json();
|
|
|
+ const response = await fetch('/static/config.json')
|
|
|
+ const json = await response.json()
|
|
|
console.log('json', json)
|
|
|
- this.config = json;
|
|
|
+ this.config = json
|
|
|
},
|
|
|
|
|
|
loadImage(path) {
|
|
|
console.log('loadImage', path)
|
|
|
if (!this.imgViewer?.isShown) {
|
|
|
this.imgViewer = this.$viewerApi({
|
|
|
- images: [`/static${path}`],
|
|
|
+ images: [`/static${path}`]
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- loadDXF(name, path) {
|
|
|
- console.log('loadDXF', name, path)
|
|
|
- const url = `/static${path}`;
|
|
|
- this.openDrawer('变电-电力异常信息', {name, path})
|
|
|
+ loadDXF(name, path, stPath) {
|
|
|
+ console.log('loadDXF', name, path, stPath)
|
|
|
+ const url = `/static${path}`
|
|
|
+ this.openDrawer('变电-电力异常信息', { name, path, stPath })
|
|
|
}
|
|
|
}
|
|
|
}
|