|
|
@@ -107,7 +107,7 @@
|
|
|
|
|
|
<script>
|
|
|
import PlayerManager from '@@/icc/PlayerManager.js'
|
|
|
-import { addRail } from '@/api/centerMonitor/rail/rail'
|
|
|
+import { addRail, getRail } from '@/api/centerMonitor/rail/rail'
|
|
|
|
|
|
export default {
|
|
|
name: 'PolygonDrawer',
|
|
|
@@ -469,6 +469,14 @@ export default {
|
|
|
let param = {channelId: this.channelId, taskId: this.taskId, pointId: this.pointId, pointName: this.pointName, type: this.type, jsonData: jsonData, info: JSON.stringify(this.tasks.find(task => task.id == this.taskId))};
|
|
|
addRail(param).then(response => {
|
|
|
alert("成功")
|
|
|
+ let json = {channelId: this.channelId, taskId: this.taskId, pointId: this.pointId, pointName: this.pointName, type: this.type};
|
|
|
+ getRail(json).then(response => {
|
|
|
+ if (response.data && response.data.jsonData) {
|
|
|
+ this.redrawAllPolygons(response.data.jsonData, response.data.syncStatus)
|
|
|
+ } else {
|
|
|
+ this.clearCanvas()
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
// // 创建Blob并下载
|
|
|
// const blob = new Blob([jsonData], { type: 'application/json' })
|