|
|
@@ -7,12 +7,12 @@ import axios from 'axios'
|
|
|
import MultiUpload from '../components/MultiUpload'
|
|
|
import SingleUpload from '../components/SingleUpload'
|
|
|
import VueI18n from 'vue-i18n'
|
|
|
-import VueAMap from 'vue-amap'
|
|
|
+// import VueAMap from 'vue-amap'
|
|
|
|
|
|
import 'normalize.css/normalize.css'
|
|
|
import 'element-ui/lib/theme-chalk/index.css'
|
|
|
import '../main.less'
|
|
|
-import {format} from 'date-fns'
|
|
|
+import { format } from 'date-fns'
|
|
|
import zh from 'date-fns/locale/zh_cn'
|
|
|
|
|
|
VueAMap.initAMapApiLoader({
|
|
|
@@ -34,7 +34,7 @@ Vue.prototype.$http = {
|
|
|
get(params) {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
if (params instanceof String) {
|
|
|
- params = {url: params};
|
|
|
+ params = { url: params };
|
|
|
} else if (!params instanceof Object) {
|
|
|
reject('params error');
|
|
|
return;
|
|
|
@@ -55,7 +55,7 @@ Vue.prototype.$http = {
|
|
|
store.commit('updateFetchingData', true);
|
|
|
axios.get(params.url, {
|
|
|
params: params.data
|
|
|
- }, {withCredentials: true}).then(res => {
|
|
|
+ }, { withCredentials: true }).then(res => {
|
|
|
store.commit('updateFetchingData', false);
|
|
|
if (res.status === 200) {
|
|
|
resolve(res.data);
|
|
|
@@ -82,7 +82,7 @@ Vue.prototype.$http = {
|
|
|
},
|
|
|
post(params) {
|
|
|
if (params instanceof String) {
|
|
|
- params = {url: params};
|
|
|
+ params = { url: params };
|
|
|
} else if (!params instanceof Object) {
|
|
|
reject('params error');
|
|
|
return;
|
|
|
@@ -122,7 +122,7 @@ Vue.prototype.$http = {
|
|
|
}
|
|
|
return new Promise((resolve, reject) => {
|
|
|
store.commit('updateFetchingData', true);
|
|
|
- axios.post(params.url, data, {withCredentials: true}).then(res => {
|
|
|
+ axios.post(params.url, data, { withCredentials: true }).then(res => {
|
|
|
store.commit('updateFetchingData', false);
|
|
|
if (res.status === 200) {
|
|
|
resolve(res.data);
|
|
|
@@ -151,11 +151,11 @@ Vue.prototype.$http = {
|
|
|
Vue.mixin({
|
|
|
methods: {
|
|
|
timeFormatter(row, column, cellValue, index) {
|
|
|
- return format(new Date(cellValue), 'HH:mm', {locale: zh})
|
|
|
+ return format(new Date(cellValue), 'HH:mm', { locale: zh })
|
|
|
},
|
|
|
datetimeFormatter(row, column, cellValue, index) {
|
|
|
if (!cellValue) return ''
|
|
|
- return format(new Date(cellValue), 'YYYY/MM/DD HH:mm', {locale: zh})
|
|
|
+ return format(new Date(cellValue), 'YYYY/MM/DD HH:mm', { locale: zh })
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
@@ -179,6 +179,6 @@ new Vue({
|
|
|
el: '#app',
|
|
|
router,
|
|
|
store,
|
|
|
- components: {Main},
|
|
|
+ components: { Main },
|
|
|
template: '<Main/>'
|
|
|
-});
|
|
|
+});
|