|
@@ -1,61 +1,85 @@
|
|
|
// The Vue build version to load with the `import` command
|
|
|
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
|
|
|
-import Vue from 'vue';
|
|
|
-import App from '@/components/App.vue';
|
|
|
+import Vue from "vue";
|
|
|
+import App from "@/components/App.vue";
|
|
|
// include
|
|
|
-import '@/config/include.js';
|
|
|
+import "@/config/include.js";
|
|
|
|
|
|
// 通用store
|
|
|
-import store from '@/store/index.js';
|
|
|
+import store from "@/store/index.js";
|
|
|
|
|
|
// router
|
|
|
-import router from './router/index.js';
|
|
|
+import router from "./router/index.js";
|
|
|
|
|
|
-import VueApollo from 'vue-apollo'
|
|
|
+import VueApollo from "vue-apollo";
|
|
|
|
|
|
-import apollo from '@/config/apolloConfig.js'
|
|
|
+import apollo from "@/config/apolloConfig.js";
|
|
|
|
|
|
// 关闭生产模式下给出的提示
|
|
|
Vue.config.productionTip = false;
|
|
|
|
|
|
-Vue.use(VueApollo)
|
|
|
-import 'xe-utils'
|
|
|
-import VXETable from 'vxe-table'
|
|
|
-import 'vxe-table/lib/style.css'
|
|
|
-Vue.use(VXETable)
|
|
|
-Vue.prototype.$XModal = VXETable.modal
|
|
|
+Vue.use(VueApollo);
|
|
|
+import "xe-utils";
|
|
|
+import VXETable from "vxe-table";
|
|
|
+import "vxe-table/lib/style.css";
|
|
|
+Vue.use(VXETable);
|
|
|
+Vue.prototype.$XModal = VXETable.modal;
|
|
|
|
|
|
// 注册表格的全局组件
|
|
|
import DilCommonUI from "@/components/DilCommonUI";
|
|
|
Vue.use(DilCommonUI);
|
|
|
|
|
|
-import htmlToPdf from '@/components/exportPdf/exportPdf'
|
|
|
-Vue.use(htmlToPdf)
|
|
|
+import htmlToPdf from "@/components/exportPdf/exportPdf";
|
|
|
+Vue.use(htmlToPdf);
|
|
|
|
|
|
-import vuescroll from "vuescroll";//引入vuescroll
|
|
|
-import "vuescroll/dist/vuescroll.css";//引入vuescroll样式
|
|
|
-Vue.use(vuescroll);//使用
|
|
|
+import vuescroll from "vuescroll"; //引入vuescroll
|
|
|
+import "vuescroll/dist/vuescroll.css"; //引入vuescroll样式
|
|
|
+Vue.use(vuescroll); //使用
|
|
|
|
|
|
// 导出Excel全局组件
|
|
|
-import tableToExcel from '@/components/exportExcel/exportExcel'
|
|
|
-Vue.use(tableToExcel)
|
|
|
+import tableToExcel from "@/components/exportExcel/exportExcel";
|
|
|
+Vue.use(tableToExcel);
|
|
|
|
|
|
const apolloProvider = new VueApollo({
|
|
|
- defaultClient: apollo
|
|
|
-})
|
|
|
+ defaultClient: apollo
|
|
|
+});
|
|
|
|
|
|
- //把时间戳改为正常可读的时间
|
|
|
- export function renderTime(date) {
|
|
|
- if(date !== null){
|
|
|
- let dateee = new Date(date).toJSON();
|
|
|
- return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, " ").replace(/\.[\d]{3}Z/, "");
|
|
|
+//禁止打开控制台
|
|
|
+document.onkeydown = () => {
|
|
|
+ //禁用F12
|
|
|
+ if (window.event && window.event.keyCode == 123) {
|
|
|
+ return false;
|
|
|
+ //禁用ctrl+shift+i,
|
|
|
+ } else if (
|
|
|
+ window.event.ctrlKey &&
|
|
|
+ window.event.shiftKey &&
|
|
|
+ window.event.keyCode == 73
|
|
|
+ ) {
|
|
|
+ return false;
|
|
|
+ //屏蔽Shift+F10
|
|
|
+ } else if (window.event.shiftKey && window.event.keyCode == 121) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+// console.log = function() {};
|
|
|
+// console.error = function() {};
|
|
|
+
|
|
|
+//把时间戳改为正常可读的时间
|
|
|
+export function renderTime(date) {
|
|
|
+ if (date !== null) {
|
|
|
+ let dateee = new Date(date).toJSON();
|
|
|
+ return new Date(+new Date(dateee) + 8 * 3600 * 1000)
|
|
|
+ .toISOString()
|
|
|
+ .replace(/T/g, " ")
|
|
|
+ .replace(/\.[\d]{3}Z/, "");
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
//把毫秒数转换分
|
|
|
-export function getDuration(my_time) {
|
|
|
- if(my_time !== null){
|
|
|
- return Math.floor(my_time / 1000 / 60);
|
|
|
+export function getDuration(my_time) {
|
|
|
+ if (my_time !== null) {
|
|
|
+ return Math.floor(my_time / 1000 / 60);
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
@@ -66,11 +90,11 @@ export function sjTime(orderPlanInTime) {
|
|
|
}
|
|
|
//验证电话号码
|
|
|
export function VerifyPhoneNumber(Phone) {
|
|
|
- var myreg=/^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/;
|
|
|
+ var myreg = /^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/;
|
|
|
if (!myreg.test(Phone)) {
|
|
|
- return false;
|
|
|
+ return false;
|
|
|
} else {
|
|
|
- return true;
|
|
|
+ return true;
|
|
|
}
|
|
|
}
|
|
|
export function isNumber(value) {
|
|
@@ -93,10 +117,10 @@ export function isIntegerNumber(value) {
|
|
|
}
|
|
|
/* eslint-disable no-new */
|
|
|
new Vue({
|
|
|
- el: '#app',
|
|
|
+ el: "#app",
|
|
|
router,
|
|
|
store,
|
|
|
components: { App },
|
|
|
provide: apolloProvider.provide(),
|
|
|
- template: '<App/>'
|
|
|
+ template: "<App/>"
|
|
|
});
|