You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

109 lines
4.2 KiB

import { createApp } from 'vue';
import website from './config/website';
import axios from './axios';
import router from './router/';
import store from './store';
import i18n from './lang/';
import { language, messages } from './lang/';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import ElementPlus from 'element-plus';
// import 'element-plus/dist/index.css';
import Avue from '@smallwei/avue';
import '@smallwei/avue/lib/index.css';
import crudCommon from '@/mixins/crud.js';
import globalc from '@/api/basicdata/globalc.js';
import { getScreen, getHtmls } from './utils/util';
import functions from './utils/functions';
import './permission';
import error from './error';
import avueUeditor from 'avue-plugin-ueditor';
import basicBlock from 'components/basic-block/main.vue';
import basicContainer from 'components/basic-container/main.vue';
import thirdRegister from './components/third-register/main.vue';
import NfDesignBase from '@saber/nf-design-base-elp';
import flowDesign from './components/flow-design/main.vue';
import tablecmt from './components/tablecmt/tablecmt.vue';
import webCamera from './components/webCameraIMG/webCamera.vue';
import SelectBox from './components/SelectBox/SelectBox.vue';
import edittablehead from './components/edittablehead/index.vue';
import WaybillPrintTemplate from './components/WaybillPrintTemplate/WaybillPrintTemplate.vue';
import ArteryPrintTemplate from './components/ArteryPrintTemplate/ArteryPrintTemplate.vue';
import TripartiteTransferPrintTemplate from './components/TripartiteTransferPrintTemplate/TripartiteTransferPrintTemplate.vue';
import ImgList from './components/ImgList/ImgList.vue';
import MyPrint from './components/MyPrint/MyPrint.vue';
import MyUpload from './components/MyUpload/MyUpload.vue';
import { message } from './utils/resetMessage';
import FileslicingPlugin from './utils/Fileslicing.js';
import App from './App.vue';
import 'animate.css';
import dayjs from 'dayjs';
import 'styles/common.scss';
// import './styles/custom-theme.scss'
import './styles/index.scss';
import './styles/custom-theme.scss';
// 业务组件
import tenantPackage from './views/system/tenantpackage.vue';
window.$crudCommon = crudCommon;
window.axios = axios;
const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app.component(key, component);
}
app.component('basicContainer', basicContainer);
app.component('basicBlock', basicBlock);
app.component('thirdRegister', thirdRegister);
app.component('flowDesign', flowDesign);
app.component('tenantPackage', tenantPackage);
app.component('tablecmt', tablecmt);
app.component('webCamera', webCamera);
app.component('edittablehead', edittablehead);
app.component('SelectBox', SelectBox);
/** 打印 */
app.component('MyPrint', MyPrint);
/** 上传Excel */
app.component('MyUpload', MyUpload);
/** 运单打印模版 */
app.component('WaybillPrintTemplate', WaybillPrintTemplate);
/** 干线运输打印模版 */
app.component('ArteryPrintTemplate', ArteryPrintTemplate);
/** 三方运输打印模版 */
app.component('TripartiteTransferPrintTemplate', TripartiteTransferPrintTemplate);
app.component('ImgList', ImgList);
app.config.globalProperties.$dayjs = dayjs;
app.config.globalProperties.$functions = functions;
app.provide('functions', functions);
app.config.globalProperties.$globalc = globalc;
app.config.globalProperties.website = website;
app.config.globalProperties.getScreen = getScreen;
app.config.globalProperties.getHtmls = getHtmls;
app.use(error);
app.use(i18n);
app.use(FileslicingPlugin);
app.use(store);
app.use(router);
app.use(ElementPlus, {
locale: messages[language],
});
app.config.globalProperties.$message = message; //解决重复弹窗
app.use(Avue, {
axios,
calcHeight: 10,
locale: messages[language],
});
app.use(avueUeditor, { axios });
app.use(NfDesignBase);
// 按钮显示搜索或隐藏
app.directive('h5uShow', {
created(el, binding, vnode, prevVnode) {
el.classList.add('search_container');
console.log('el.classList :>> ', el.classList);
el.style.gridTemplateRows = binding.value ? '1fr' : '0fr';
el.children[0].style.minHeight = 0;
},
updated(el, binding) {
el.classList.add('search_container');
el.style.gridTemplateRows = binding.value ? '1fr' : '0fr';
},
});
app.mount('#app');