2020-01-13 19:04:03 +08:00
|
|
|
//import "./assets/css/main.css";
|
2020-01-17 16:50:17 +08:00
|
|
|
import './assets/stylus/index.scss'
|
2019-12-27 17:53:17 +08:00
|
|
|
import "./assets/css/nzIcon.css";
|
2020-02-12 12:06:37 +08:00
|
|
|
import "./assets/css/main.css";
|
2019-11-29 15:00:26 +08:00
|
|
|
import 'element-ui/lib/theme-chalk/index.css';
|
|
|
|
|
import ElementUI from 'element-ui';
|
2019-12-26 17:28:04 +08:00
|
|
|
import 'xterm/dist/xterm.css'
|
2019-12-02 16:16:26 +08:00
|
|
|
import i18n from './components/common/i18n'
|
2019-11-29 15:00:26 +08:00
|
|
|
|
2019-11-28 18:23:49 +08:00
|
|
|
import Vue from 'vue'
|
2019-12-05 16:48:23 +08:00
|
|
|
import Vuex from 'vuex'
|
|
|
|
|
import store from './store/index';
|
2019-11-28 18:23:49 +08:00
|
|
|
import App from './App'
|
|
|
|
|
import router from './router'
|
2020-01-08 22:19:46 +08:00
|
|
|
import VueResource from 'vue-resource'
|
2019-12-02 16:16:26 +08:00
|
|
|
import axios from 'axios';
|
2019-12-09 19:23:20 +08:00
|
|
|
import {post, get, put, del} from './http.js'
|
2020-03-27 18:44:59 +08:00
|
|
|
import {toTop, clickoutside, scrollBar} from './tools.js'
|
2019-12-02 16:16:26 +08:00
|
|
|
|
|
|
|
|
import Pagination from "./components/common/pagination"; //引入全局分页组件
|
2019-12-17 17:17:30 +08:00
|
|
|
import searchInput from "./components/common/searchInput"; //搜索框组件
|
2020-01-08 22:19:46 +08:00
|
|
|
import elementSet from "./components/common/elementSet"; //自定义表头组件
|
|
|
|
|
|
2019-12-18 17:00:44 +08:00
|
|
|
import projectBox from './components/common/rightBox/projectBox'; //project弹框组件
|
|
|
|
|
import moduleBox from './components/common/rightBox/moduleBox'; //module弹框组件
|
2019-12-20 17:18:30 +08:00
|
|
|
import editEndpointBox from './components/common/rightBox/editEndpointBox'; //endpoint弹框组件
|
|
|
|
|
import addEndpointBox from './components/common/rightBox/addEndpointBox'; //endpoint弹框组件
|
2019-12-23 15:43:05 +08:00
|
|
|
import assetAddUnit from "./components/page/asset/assetAddUnit"; //资产添加组件
|
|
|
|
|
import assetEditUnit from "./components/page/asset/assetEditUnit"; //资产添加组件
|
2020-02-19 16:33:01 +08:00
|
|
|
import assetBox from "./components/common/rightBox/assetBox"; //资产添加组件
|
2019-12-24 17:31:51 +08:00
|
|
|
import alertConfigBox from "./components/common/rightBox/alertConfigBox"; //告警规则弹框组件
|
2020-01-10 18:16:25 +08:00
|
|
|
import dcConfigBox from "./components/common/popBox/dcConfig"; //idc配置弹框组件
|
2020-01-03 17:17:09 +08:00
|
|
|
import panelBox from "./components/common/rightBox/panelBox"; //面板弹框组件
|
2020-01-09 19:30:43 +08:00
|
|
|
import moduleListPop from "./components/page/asset/moduleListPop"; //面板弹框组件
|
2020-01-10 18:16:25 +08:00
|
|
|
import cabinetConfigBox from "./components/common/popBox/cabinetConfig"; //面板弹框组件
|
2020-02-21 17:57:19 +08:00
|
|
|
import dcBox from "./components/common/rightBox/dcBox"; //dc弹框
|
2020-03-11 12:27:00 +08:00
|
|
|
import modelBox from "./components/common/rightBox/modelBox"; //model弹框
|
2020-02-24 20:27:14 +08:00
|
|
|
import selectArea from "./components/common/popBox/selectArea"; //dc弹框
|
2020-03-28 20:44:29 +08:00
|
|
|
import bottomBox from "./components/common/bottomBox/bottomBox"; //上滑框
|
2020-02-27 21:57:54 +08:00
|
|
|
import "perfect-scrollbar/css/perfect-scrollbar.css";
|
2020-03-18 19:22:45 +08:00
|
|
|
import loading from "./components/common/loading";
|
2020-03-26 19:58:09 +08:00
|
|
|
import mibBox from "./components/common/rightBox/mibBox";
|
2019-12-16 17:14:58 +08:00
|
|
|
|
2019-12-02 16:16:26 +08:00
|
|
|
Vue.component("Pagination", Pagination);
|
2019-12-16 17:14:58 +08:00
|
|
|
Vue.component("searchInput", searchInput);
|
2020-01-08 22:19:46 +08:00
|
|
|
Vue.component("element-set", elementSet);
|
2019-12-18 17:00:44 +08:00
|
|
|
Vue.component("project-box", projectBox);
|
|
|
|
|
Vue.component("module-box", moduleBox);
|
2019-12-19 17:22:18 +08:00
|
|
|
Vue.component("edit-endpoint-box", editEndpointBox);
|
2019-12-20 17:18:30 +08:00
|
|
|
Vue.component("add-endpoint-box", addEndpointBox);
|
2020-02-19 16:33:01 +08:00
|
|
|
Vue.component("asset-box", assetBox);
|
2019-12-23 15:43:05 +08:00
|
|
|
Vue.component("assetAddUnit", assetAddUnit);
|
|
|
|
|
Vue.component("assetEditUnit", assetEditUnit);
|
2019-12-24 17:31:51 +08:00
|
|
|
Vue.component("alert-config-box", alertConfigBox);
|
2020-01-03 16:04:23 +08:00
|
|
|
Vue.component("idc-config-box", dcConfigBox);
|
2020-01-03 17:17:09 +08:00
|
|
|
Vue.component("panel-box", panelBox);
|
2020-01-09 19:30:43 +08:00
|
|
|
Vue.component("module-list-pop", moduleListPop);
|
2020-01-10 18:16:25 +08:00
|
|
|
Vue.component("cabinet-config-box", cabinetConfigBox);
|
2020-02-21 17:57:19 +08:00
|
|
|
Vue.component("dc-box", dcBox);
|
2020-03-11 12:27:00 +08:00
|
|
|
Vue.component("model-box", modelBox);
|
2020-02-24 20:27:14 +08:00
|
|
|
Vue.component("select-area", selectArea);
|
2020-03-18 19:22:45 +08:00
|
|
|
Vue.component('loading',loading);
|
2020-03-27 15:41:26 +08:00
|
|
|
Vue.component('bottom-box', bottomBox);
|
2020-03-26 19:58:09 +08:00
|
|
|
Vue.component('mib-box',mibBox);
|
2019-12-02 16:16:26 +08:00
|
|
|
|
2019-12-17 17:17:30 +08:00
|
|
|
Vue.prototype.$axios = axios;
|
2019-12-02 16:16:26 +08:00
|
|
|
Vue.prototype.$post = post;
|
|
|
|
|
Vue.prototype.$get = get;
|
2019-12-09 19:23:20 +08:00
|
|
|
Vue.prototype.$put = put;
|
|
|
|
|
Vue.prototype.$delete = del;
|
2020-03-27 18:44:59 +08:00
|
|
|
Vue.prototype.$toTop = toTop; //toTop置顶按钮方法
|
2020-03-09 18:05:43 +08:00
|
|
|
Vue.prototype.$tableHeight = { //列表页表格的高度
|
|
|
|
|
normal: 'calc(100% - 100px)', //常规高度,特例在下方定义
|
2020-03-18 16:00:06 +08:00
|
|
|
openSubList: { //打开二级列表后的高度
|
|
|
|
|
mainList: 'calc(100% - 60px)',
|
2020-03-20 21:05:31 +08:00
|
|
|
subList: 'calc(100% - 86px)'
|
2020-03-18 16:00:06 +08:00
|
|
|
},
|
2020-03-25 18:38:13 +08:00
|
|
|
noPagination: 'calc(100% - 60px)', //特例:没有翻页组件
|
2020-03-09 18:05:43 +08:00
|
|
|
};
|
2019-11-28 18:23:49 +08:00
|
|
|
|
2019-12-17 17:17:30 +08:00
|
|
|
Vue.config.productionTip = false;
|
|
|
|
|
Vue.use(ElementUI);
|
|
|
|
|
Vue.use(Vuex);
|
2020-01-08 22:19:46 +08:00
|
|
|
Vue.use(VueResource);
|
2019-12-04 13:45:37 +08:00
|
|
|
|
2020-03-27 18:44:59 +08:00
|
|
|
/*指令*/
|
|
|
|
|
Vue.directive('clickoutside', clickoutside);
|
|
|
|
|
Vue.directive('scrollBar', scrollBar);
|
2019-12-04 13:45:37 +08:00
|
|
|
|
2019-12-26 17:28:04 +08:00
|
|
|
window.vm = new Vue({
|
2019-11-28 18:23:49 +08:00
|
|
|
el: '#app',
|
|
|
|
|
router,
|
2019-12-02 16:16:26 +08:00
|
|
|
i18n,
|
2019-12-05 16:48:23 +08:00
|
|
|
store,
|
|
|
|
|
components: {App},
|
2019-11-28 18:23:49 +08:00
|
|
|
template: '<App/>'
|
|
|
|
|
})
|
2019-12-12 17:07:33 +08:00
|
|
|
|
2020-03-05 21:30:45 +08:00
|
|
|
export default vm;
|
2020-03-19 20:44:14 +08:00
|
|
|
|
|
|
|
|
/* 重写组件内容 */
|
|
|
|
|
const elUi = require("element-ui");
|
2020-03-20 21:05:31 +08:00
|
|
|
//去掉el-table表头右侧的滚动条预留空间
|
2020-03-19 20:44:14 +08:00
|
|
|
elUi.Table.components.TableHeader.computed.hasGutter = () => {return false;};
|