|
|
|
import Vue from 'vue'
|
|
|
|
import App from './App.vue'
|
|
|
|
import store from '@/store/index'
|
|
|
|
import {ApiConfig} from "@/config/index";
|
|
|
|
import BootstrapVue from 'bootstrap-vue'
|
|
|
|
import 'bootstrap/dist/css/bootstrap.css'
|
|
|
|
import 'bootstrap-vue/dist/bootstrap-vue.css'
|
|
|
|
import VueSweetalert2 from 'vue-sweetalert2';
|
|
|
|
import 'sweetalert2/dist/sweetalert2.min.css';
|
|
|
|
Vue.use(VueSweetalert2);
|
|
|
|
import VueWait from 'vue-wait'
|
|
|
|
import { ValidationProvider } from 'vee-validate';
|
|
|
|
Vue.use(VueWait)
|
|
|
|
|
|
|
|
|
|
|
|
import "@/assets/css/_cards.scss";
|
|
|
|
|
|
|
|
|
|
|
|
import VueSocketIOExt from 'vue-socket.io-extended';
|
|
|
|
//import io from 'socket.io-client';
|
|
|
|
import { io } from 'socket.io-client';
|
|
|
|
|
|
|
|
|
|
|
|
//const socket = io('https://factory.swarmlab.io:55527', {
|
|
|
|
//const socket = io('https://localhost:3080', {
|
|
|
|
var socketurl = ApiConfig.url_80;
|
|
|
|
const socket = io(socketurl, {
|
|
|
|
autoConnect: false,
|
|
|
|
reconnection: true,
|
|
|
|
reconnectionDelay: 500,
|
|
|
|
maxReconnectionAttempts: Infinity,
|
|
|
|
pingInterval: 25000,
|
|
|
|
pingTimeout: 60000,
|
|
|
|
transports: [ 'websocket', 'polling' ],
|
|
|
|
secure: true,
|
|
|
|
rejectUnauthorized: false
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
//const socket = io('http://localhost:3000', { autoConnect: false });
|
|
|
|
|
|
|
|
|
|
|
|
Vue.use(VueSocketIOExt, socket);
|
|
|
|
|
|
|
|
//Vue.use(VueSocketIOExt, socket);
|
|
|
|
|
|
|
|
Vue.use(BootstrapVue);
|
|
|
|
|
|
|
|
|
|
|
|
const config = {
|
|
|
|
aria: true,
|
|
|
|
classNames: {
|
|
|
|
valid: "is-valid",
|
|
|
|
invalid: "is-invalid"
|
|
|
|
},
|
|
|
|
classes: true,
|
|
|
|
delay: 0,
|
|
|
|
dictionary: null,
|
|
|
|
errorBagName: 'vErrors', // change if property conflicts
|
|
|
|
events: 'input|blur',
|
|
|
|
fieldsBagName: 'vFields',
|
|
|
|
i18n: null, // the vue-i18n plugin instance
|
|
|
|
i18nRootKey: 'validations', // the nested key under which the validation messages will be located
|
|
|
|
inject: true,
|
|
|
|
locale: 'en',
|
|
|
|
validity: false,
|
|
|
|
useConstraintAttrs: true
|
|
|
|
};
|
|
|
|
//Vue.use(ValidationProvider,config);
|
|
|
|
Vue.component('ValidationProvider', ValidationProvider);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Vue.config.productionTip = false
|
|
|
|
new Vue({
|
|
|
|
el: '#app',
|
|
|
|
store,
|
|
|
|
wait: new VueWait(),
|
|
|
|
render: h => h(App)
|
|
|
|
})
|
|
|
|
|