| | |
| | | import { checkPermi } from "@/utils/permission"; // 权限判断函数 |
| | | import { getToken } from "@/utils/auth"; |
| | | // 时间转换 |
| | | import Moment from 'moment' |
| | | import Moment from "moment"; |
| | | |
| | | // 全局方法挂载 |
| | | Vue.prototype.getDicts = getDicts; |
| | |
| | | Vue.prototype.HaveJson = (val) => { |
| | | return JSON.parse(JSON.stringify(val)); |
| | | }; |
| | | Vue.prototype.javaApi = process.env.VUE_APP_BASE_API |
| | | ? process.env.VUE_APP_BASE_API |
| | | : "http://192.168.1.36:8002"; |
| | | Vue.prototype.javaApi = "http://10.21.10.99:8088"; //测试库:192.168.18.50:7002 |
| | | Vue.prototype.checkPermi = checkPermi; |
| | | Vue.prototype.uploadHeader = { |
| | | Authorization: "Bearer " + getToken(), |
| | | }; |
| | | // 解决el-radio-group单选框自身的bug |
| | | Vue.directive('removeAriaHidden', { |
| | | Vue.directive("removeAriaHidden", { |
| | | bind(el, binding) { |
| | | let ariaEls = el.querySelectorAll('.el-radio__original'); |
| | | let ariaEls = el.querySelectorAll(".el-radio__original"); |
| | | ariaEls.forEach((item) => { |
| | | item.removeAttribute('aria-hidden'); |
| | | item.removeAttribute("aria-hidden"); |
| | | }); |
| | | } |
| | | }) |
| | | Vue.use(Moment) |
| | | Vue.prototype.$moment = Moment |
| | | }, |
| | | }); |
| | | Vue.use(Moment); |
| | | Vue.prototype.$moment = Moment; |
| | | |
| | | // 全局组件挂载 |
| | | Vue.component("DictTag", DictTag); |