120 lines
3.4 KiB
JavaScript
120 lines
3.4 KiB
JavaScript
import Vue from 'vue'
|
||
|
||
import Cookies from 'js-cookie'
|
||
|
||
import 'normalize.css/normalize.css' // a modern alternative to CSS resets
|
||
|
||
import Element from 'element-ui'
|
||
import './styles/element-variables.scss'
|
||
import 'xterm/css/xterm.css'
|
||
// import enLang from 'element-ui/lib/locale/lang/en'// 如果使用中文语言包请默认支持,无需额外引入,请删除该依赖
|
||
// import 'lib-flexible/flexible'
|
||
|
||
import '@/styles/index.scss' // global css
|
||
|
||
import globalMixin from '@/mixin/globalMixin'; // 替换为实际的文件路径
|
||
|
||
// 全局混入
|
||
Vue.mixin(globalMixin);
|
||
|
||
let ploady={
|
||
reseller_orgid:'',
|
||
start_date:'',
|
||
end_date:''
|
||
}
|
||
reqSaleMoneyList(ploady)
|
||
// import {saveApprovalInfo} from "@/api/finance/approvalList";
|
||
// saveApprovalInfo(JSON.stringify({
|
||
// "flag":"update",
|
||
// "id": "GUwHSPn7oKC-LZoqFfdJ9",
|
||
// "user_id": "11",
|
||
// "orgid": "x",
|
||
// "send_dd_user_id": "11",
|
||
// "source": "sssss",
|
||
// "app_key": "aaa",
|
||
// "app_secret": "app_secret",
|
||
// "http_aes_key": "http_aes_key",
|
||
// "http_token": "http_token",
|
||
// "process_code": "PROC-B2DAA076-6A9F-4740-80AB-0D5D4410F7AC",
|
||
// "process_name": "process_name",
|
||
// "update_time": "2023-08-25 16:15:18"
|
||
// }))
|
||
// bpmn 工作流绘图工具的样式
|
||
// import "bpmn-js/dist/assets/diagram-js.css" // 左边工具栏以及编辑节点的样式
|
||
// import "bpmn-js/dist/assets/bpmn-font/css/bpmn.css"
|
||
// import "bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css"
|
||
// import "bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css"
|
||
// import 'bpmn-js-properties-panel/dist/assets/properties-panel.css' // 右边工具栏样式
|
||
|
||
|
||
import App from './App'
|
||
import store from './store'
|
||
import router from './router'
|
||
// import 'default-passive-events'
|
||
import './icons' // icon
|
||
import './permission' // permission control
|
||
// import './utils/error-log' // error log
|
||
import index from '@/styles/index.css'
|
||
import { v4 as uuidv4 } from 'uuid';//引入uuid
|
||
// uuidv4();
|
||
|
||
sessionStorage.setItem('client_uuid', uuidv4())
|
||
// console.log(uuidv4());
|
||
|
||
// 引入form-create 表单生成器
|
||
import formCreate from "@form-create/element-ui"
|
||
|
||
Vue.use(formCreate);
|
||
|
||
import * as filters from './filters' // global filters
|
||
|
||
import HappyScroll from 'vue-happy-scroll'
|
||
// 引入css
|
||
import 'vue-happy-scroll/docs/happy-scroll.css'
|
||
import {reqSaleMoneyList} from "@/api/sales/distributorMangement";
|
||
Vue.use(HappyScroll)
|
||
// Vue.use(axios)
|
||
// Vue.prototype.axios=axios
|
||
|
||
/**
|
||
* 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 ! ! !
|
||
*/
|
||
// if (process.env.NODE_ENV === 'production') {
|
||
// const { mockXHR } = require('../mock')
|
||
// mockXHR()
|
||
// }
|
||
|
||
Vue.use(Element, {
|
||
size: Cookies.get('size') || 'medium' // set element-ui default size
|
||
// locale: enLang // 如果使用中文,无需设置,请删除
|
||
})
|
||
|
||
// 解决bug:页面/路由跳转后,滚动条消失,页面无法滚动
|
||
//设置跳转页面时给页面的body属性设置滚动条
|
||
var onOverflow = ["/shoppingManagement", "/supplierManagement"];
|
||
|
||
router.afterEach((to, from, next) => {
|
||
onOverflow.forEach(element => {
|
||
if (to.path == element) {
|
||
document.querySelector("body").setAttribute("style", "overflow: auto !important;")
|
||
}
|
||
});
|
||
});
|
||
Object.keys(filters).forEach(key => {
|
||
Vue.filter(key, filters[key])
|
||
})
|
||
|
||
Vue.config.productionTip = false
|
||
|
||
new Vue({
|
||
el: '#app',
|
||
router,
|
||
store,
|
||
render: h => h(App)
|
||
})
|