|
@@ -1,4 +1,3 @@
|
|
|
-
|
|
|
import Vue from 'vue'
|
|
|
import App from './App'
|
|
|
import router from './router'
|
|
@@ -23,7 +22,39 @@ import axiosKc from '@/utils/axiosKc'
|
|
|
import 'shepherd.js/dist/css/shepherd.css';
|
|
|
|
|
|
// import 'vant/lib/index.css';
|
|
|
-import { Tabbar, Empty, TabbarItem, ShareSheet, Loading, Divider, Overlay,Grid, GridItem, Form, Field, NavBar, Row, Col, List, Picker, Cell, CellGroup, Toast, Popup, Dialog, RadioGroup, Radio, Notify, Button, Icon, Tab, Tabs } from 'vant'
|
|
|
+import {
|
|
|
+ Tabbar,
|
|
|
+ Empty,
|
|
|
+ TabbarItem,
|
|
|
+ ShareSheet,
|
|
|
+ Loading,
|
|
|
+ Divider,
|
|
|
+ Overlay,
|
|
|
+ Grid,
|
|
|
+ GridItem,
|
|
|
+ Form,
|
|
|
+ Field,
|
|
|
+ NavBar,
|
|
|
+ Row,
|
|
|
+ Col,
|
|
|
+ List,
|
|
|
+ Picker,
|
|
|
+ Cell,
|
|
|
+ CellGroup,
|
|
|
+ Toast,
|
|
|
+ Popup,
|
|
|
+ Dialog,
|
|
|
+ RadioGroup,
|
|
|
+ Radio,
|
|
|
+ Notify,
|
|
|
+ Button,
|
|
|
+ Icon,
|
|
|
+ Tab,
|
|
|
+ Tabs,
|
|
|
+ Collapse,
|
|
|
+ CollapseItem
|
|
|
+} from 'vant'
|
|
|
+
|
|
|
|
|
|
/*element ui*/
|
|
|
import {
|
|
@@ -34,7 +65,23 @@ import {
|
|
|
import 'element-ui/lib/theme-chalk/index.css';
|
|
|
|
|
|
|
|
|
-import { getWxToken, setWxToken, getIsIdentity, supremeAuthority, getIsWx, getTypes, getTypesName, getUserData, getEmployeeMap, getCache, setCache, removeCache, returnDeptName, getEmployeeMapItem, returnFh } from '@/utils/auth'
|
|
|
+import {
|
|
|
+ getWxToken,
|
|
|
+ setWxToken,
|
|
|
+ getIsIdentity,
|
|
|
+ supremeAuthority,
|
|
|
+ getIsWx,
|
|
|
+ getTypes,
|
|
|
+ getTypesName,
|
|
|
+ getUserData,
|
|
|
+ getEmployeeMap,
|
|
|
+ getCache,
|
|
|
+ setCache,
|
|
|
+ removeCache,
|
|
|
+ returnDeptName,
|
|
|
+ getEmployeeMapItem,
|
|
|
+ returnFh
|
|
|
+} from '@/utils/auth'
|
|
|
Vue.prototype.$echarts = echarts
|
|
|
Vue.prototype.$moment = moment
|
|
|
Vue.prototype.$getTypesName = getTypesName
|
|
@@ -52,8 +99,8 @@ Vue.prototype.$axiosKq = axiosKq
|
|
|
Vue.prototype.$axiosKc = axiosKc
|
|
|
Vue.prototype.$removeCache = removeCache
|
|
|
Vue.prototype.$returnDeptName = returnDeptName
|
|
|
-Vue.prototype.$socketApi = socketApi //长连接
|
|
|
-Vue.prototype.$socketApiTow = socketApiTow //长连接
|
|
|
+Vue.prototype.$socketApi = socketApi //长连接
|
|
|
+Vue.prototype.$socketApiTow = socketApiTow //长连接
|
|
|
Vue.prototype.$returnFh = returnFh
|
|
|
Vue.prototype.$isWx = getIsWx()
|
|
|
|
|
@@ -70,10 +117,12 @@ Vue.component('userImage', userImage)
|
|
|
/*element ui 按需引入*/
|
|
|
Vue.use(ELTree).use(ELButton).use(ELDrawer)
|
|
|
|
|
|
-Vue.use(Button).use(Tabbar).use(TabbarItem).use(ShareSheet).use(Grid).use(Overlay).use(Loading).use(Divider).use(GridItem).use(Picker).use(Form).use(Field).use(List).use(Tabs).use(Tab).use(NavBar).use(Row).use(Col).use(Cell).use(CellGroup).use(Toast).use(Popup).use(Dialog).use(RadioGroup).use(Radio).use(Icon).use(Notify).use(Empty)
|
|
|
+Vue.use(Button).use(Tabbar).use(TabbarItem).use(ShareSheet).use(Grid).use(Overlay).use(Loading).use(Divider).use(
|
|
|
+ GridItem).use(Picker).use(Form).use(Field).use(List).use(Tabs).use(Tab).use(NavBar).use(Row).use(Col).use(Cell).use(
|
|
|
+ CellGroup).use(Toast).use(Popup).use(Dialog).use(RadioGroup).use(Radio).use(Icon).use(Notify).use(Empty).use(Collapse).use(CollapseItem)
|
|
|
|
|
|
-Vue.prototype.$route_back = function (setp) {
|
|
|
- if (typeof (setp) == 'undefined') {
|
|
|
+Vue.prototype.$route_back = function(setp) {
|
|
|
+ if (typeof(setp) == 'undefined') {
|
|
|
setp = -1
|
|
|
}
|
|
|
if (window.history.length <= 1 && window.plus) {
|
|
@@ -87,7 +136,7 @@ Vue.prototype.$route_back = function (setp) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-Vue.directive('isKeyboard', function (el) {
|
|
|
+Vue.directive('isKeyboard', function(el) {
|
|
|
let isAndroid = true;
|
|
|
if (navigator.userAgent.indexOf('Android') > 0) {
|
|
|
isAndroid = true;
|
|
@@ -97,7 +146,7 @@ Vue.directive('isKeyboard', function (el) {
|
|
|
if (isAndroid) {
|
|
|
//获取原窗口的高度
|
|
|
var originalHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
|
|
- window.onresize = function () {
|
|
|
+ window.onresize = function() {
|
|
|
//键盘弹起与隐藏都会引起窗口的高度发生变化
|
|
|
var resizeHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
|
|
if (resizeHeight - 0 < originalHeight - 0) {
|
|
@@ -108,7 +157,7 @@ Vue.directive('isKeyboard', function (el) {
|
|
|
el.style['display'] = 'block'
|
|
|
}
|
|
|
};
|
|
|
- } else { // ios:focusin和focusout支持冒泡,对应focus和blur, 使用focusin和focusout的原因是focusin和focusout可以冒泡,focus和blur不会冒泡,这样就可以使用事件代理,处理多个输入框存在的情况。
|
|
|
+ } else { // ios:focusin和focusout支持冒泡,对应focus和blur, 使用focusin和focusout的原因是focusin和focusout可以冒泡,focus和blur不会冒泡,这样就可以使用事件代理,处理多个输入框存在的情况。
|
|
|
document.body.addEventListener("focusin", () => {
|
|
|
//软键盘弹出的事件处理
|
|
|
el.style['display'] = 'none'
|