import Vue from 'vue' import Cookies from 'js-cookie' import Element from 'element-ui' import './assets/styles/element-variables.scss' import '@/assets/styles/index.scss' // global css import '@/assets/styles/huyi.scss' // huyi css import App from './App' import store from './store' import router from './router' import permission from './directive/permission' import { download } from '@/utils/request' import './assets/icons' // icon import './assets/iconfont/iconfont.css' // 导航栏菜单图标 import './permission' // permission control import { getDicts } from "@/api/system/dict/data"; import { getConfigKey } from "@/api/system/config"; import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/huyi"; import Pagination from "@/components/Pagination"; //自定义表格工具扩展 import RightToolbar from "@/components/RightToolbar" // 提示信息 import ZapTip from "@/components/ZapTip" // 表格标题 import ContentTitle from "@/components/ContentTitle" // 表格合计额 import ContentTotal from "@/components/ContentTotal" // 表格顶部搜索栏 import SearchBar from "@/components/SearchBar" // 页面头部栏:融信编号、创建时间、创建人 import HeaderBar from "@/components/HeaderBar" // 表格底部数字统计 import StatisticalData from "@/components/StatisticalData" // 附件展示 import Attachments from "@/components/Attachments" // 表单纯展示文本 import TextItem from "@/components/TextItem" // 导入 import UploadImport from '@/components/UploadImport/index.vue' // 日期过滤器 import "@/filters/date.js" // 全局方法挂载 Vue.prototype.getDicts = getDicts Vue.prototype.getConfigKey = getConfigKey Vue.prototype.parseTime = parseTime Vue.prototype.resetForm = resetForm Vue.prototype.addDateRange = addDateRange Vue.prototype.selectDictLabel = selectDictLabel Vue.prototype.selectDictLabels = selectDictLabels Vue.prototype.download = download Vue.prototype.handleTree = handleTree Vue.prototype.msgSuccess = function (msg) { this.$message({ showClose: true, message: msg, type: "success" }); } Vue.prototype.msgError = function (msg) { this.$message({ showClose: true, message: msg, type: "error" }); } Vue.prototype.msgInfo = function (msg) { this.$message.info(msg); } // 全局组件挂载 Vue.component('Pagination', Pagination) Vue.component('RightToolbar', RightToolbar) Vue.component('ZapTip', ZapTip) Vue.component('ContentTitle', ContentTitle) Vue.component('ContentTotal', ContentTotal) Vue.component('SearchBar', SearchBar) Vue.component('HeaderBar', HeaderBar) Vue.component('StatisticalData', StatisticalData) Vue.component('Attachments', Attachments) Vue.component('TextItem', TextItem) Vue.component('UploadImport', UploadImport) Vue.use(permission) //拖拽 import VueI18n from 'vue-i18n' import enLocale from 'element-ui/lib/locale/lang/en' import zhLocale from 'element-ui/lib/locale/lang/zh-CN' Vue.use(VueI18n) Vue.locale('en-US', {...enLocale }) Vue.locale('zh-CN', {...zhLocale }) Vue.config.lang = 'zh-CN' import FormMaking from './index' import CustomComponent from './views/tool/model/CustomComponent.vue' Vue.use(FormMaking, { components: [{ name: 'custom-width-height', component: CustomComponent }] }) //阿里icon图标 import './assets/icon/iconfont.css' //echarts图表 import echarts from 'echarts' Vue.prototype.$echarts = echarts; /** * If you don't want to use mock-server * you want to use MockJs for mock api * you can execute: mockXHR() * * Currently MockJs will be used in the production environment, * please remove it before going online! ! ! */ Vue.use(Element, { size: Cookies.get('size') || 'medium' // set element-ui default size }) Vue.config.productionTip = false new Vue({ el: '#app', router, store, render: h => h(App) })