|
@@ -45,7 +45,7 @@
|
|
|
import { mapState } from 'vuex';
|
|
import { mapState } from 'vuex';
|
|
|
import axios from 'axios';
|
|
import axios from 'axios';
|
|
|
import pageableTable from '@/mixins/pageableTable';
|
|
import pageableTable from '@/mixins/pageableTable';
|
|
|
-import https from 'https';
|
|
|
|
|
|
|
+import requestWithCertificate from '@/plugins/requestWithCertificate';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'MetaObjectMoveList',
|
|
name: 'MetaObjectMoveList',
|
|
@@ -74,13 +74,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
- const agent = new https.Agent({
|
|
|
|
|
- rejectUnauthorized: false // 允许访问无效或过期的 SSL 证书
|
|
|
|
|
- });
|
|
|
|
|
- const instance = axios.create({
|
|
|
|
|
- httpsAgent: agent // 指定自定义的 SSL 证书验证方式
|
|
|
|
|
- });
|
|
|
|
|
- instance.get(`https://${this.baseUrl}/mmo/websocket/check`)
|
|
|
|
|
|
|
+ requestWithCertificate().get(`https://${this.baseUrl}/mmo/websocket/check`)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
if (res.data !== 'success') {
|
|
if (res.data !== 'success') {
|
|
|
this.$message.error(res.data);
|
|
this.$message.error(res.data);
|
|
@@ -89,16 +83,6 @@ export default {
|
|
|
.catch(e => {
|
|
.catch(e => {
|
|
|
this.$message.error(e.message);
|
|
this.$message.error(e.message);
|
|
|
});
|
|
});
|
|
|
- // axios
|
|
|
|
|
- // .get(`https://${this.baseUrl}/mmo/websocket/check`)
|
|
|
|
|
- // .then(res => {
|
|
|
|
|
- // if (res.data != 'success') {
|
|
|
|
|
- // this.$message.error(res.data);
|
|
|
|
|
- // }
|
|
|
|
|
- // })
|
|
|
|
|
- // .catch(e => {
|
|
|
|
|
- // this.$message.error(e);
|
|
|
|
|
- // });
|
|
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
beforeGetData() {
|
|
beforeGetData() {
|
|
@@ -179,8 +163,7 @@ export default {
|
|
|
return this.$http.post(`/metaObjectMove/${row.id}/run`);
|
|
return this.$http.post(`/metaObjectMove/${row.id}/run`);
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
- axios
|
|
|
|
|
- .get(`http://${this.baseUrl}/mmo/websocket/${row.objectId}/start`)
|
|
|
|
|
|
|
+ requestWithCertificate().get(`https://${this.baseUrl}/mmo/websocket/${row.objectId}/start`)
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
this.$message.success('运行成功,正在广播坐标信息');
|
|
this.$message.success('运行成功,正在广播坐标信息');
|
|
|
this.getData();
|
|
this.getData();
|
|
@@ -209,8 +192,7 @@ export default {
|
|
|
return this.$http.post(`/metaObjectMove/${row.id}/cancelRun`);
|
|
return this.$http.post(`/metaObjectMove/${row.id}/cancelRun`);
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
- axios
|
|
|
|
|
- .get(`http://${this.baseUrl}/mmo/websocket/${row.objectId}/stop`)
|
|
|
|
|
|
|
+ requestWithCertificate().get(`https://${this.baseUrl}/mmo/websocket/${row.objectId}/stop`)
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
this.$message.success('停运成功');
|
|
this.$message.success('停运成功');
|
|
|
this.getData();
|
|
this.getData();
|