代码问题调整

This commit is contained in:
fan 2021-05-13 13:12:28 +08:00
parent 4c5d0f39d6
commit 7cd36b7446
3 changed files with 7 additions and 4 deletions

View File

@ -1,10 +1,10 @@
import Vue from 'vue';
import { getBaseUrl } from '@/utils/baseUrl'
import { getBaseUrl } from '@/utils/baseUrl';
// 创建或者打开数据库
export function openIndexedDB() {
const baseUrl = getBaseUrl();
const indexedDBName = baseUrl.replace(/http.?:\/\/(.*)[\/|:].*/, "$1");
const indexedDBName = baseUrl.replace(/http.?:\/\/(.*)[\/|:].*/, '$1');
const request = window.indexedDB.open(indexedDBName, 1);
request.onerror = function (event) {
console.log('数据库打开报错');

View File

@ -54,6 +54,7 @@ import StatusIcon from '@/views/components/StatusIcon/statusIcon';
import { simulationPause, simulationStart } from '../../../api/rtSimulation';
// import Vue from 'vue';
import { getSessionStorage } from '@/utils/auth';
import { destroySimulation } from '@/api/rtSimulation';
// import { EventBus } from '@/scripts/event-bus';
export default {
@ -249,7 +250,7 @@ export default {
async back() {
this.isGoback = true;
if (this.projectDevice || this.project === 'wjls') {
clearSimulation(this.group).then(res=>{
destroySimulation(this.group).then(res=>{
this.$store.dispatch('training/over').then(() => {
this.$store.dispatch('LogOut').then(() => {
location.reload();

View File

@ -378,6 +378,8 @@ export default {
message = message + ( index ? '、' : '' ) + '《' + item.name + '》';
});
this.$messageBox(message);
} else {
this.$message.success('一键校验地图数据通过!');
}
}).catch(e => {
this.loading = false;