From 1bef995d9a6cc817bea0318a2a33ea013fe69deb Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 12 十一月 2025 16:31:14 +0800
Subject: [PATCH] 计算精度问题修复
---
src/main.js | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/main.js b/src/main.js
index 24129ca..5f2db03 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,7 +1,5 @@
import Vue from "vue";
-import Cookies from "js-cookie";
-
import Element from "element-ui";
import "./assets/styles/element-variables.scss";
@@ -49,8 +47,13 @@
import DictData from "@/components/DictData";
import { checkPermi } from "@/utils/permission"; // 鏉冮檺鍒ゆ柇鍑芥暟
import { getToken } from "@/utils/auth";
+// 鏃堕棿杞崲
+import Moment from "moment";
+
+import Big from 'big.js'
// 鍏ㄥ眬鏂规硶鎸傝浇
+Vue.prototype.$Big = Big;
Vue.prototype.getDicts = getDicts;
Vue.prototype.getConfigKey = getConfigKey;
Vue.prototype.parseTime = parseTime;
@@ -64,9 +67,7 @@
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.0.170:8002";
+Vue.prototype.javaApi = "http://192.168.21.53:7002/lims";
Vue.prototype.checkPermi = checkPermi;
Vue.prototype.uploadHeader = {
Authorization: "Bearer " + getToken(),
@@ -80,6 +81,8 @@
});
},
});
+Vue.use(Moment);
+Vue.prototype.$moment = Moment;
// 鍏ㄥ眬缁勪欢鎸傝浇
Vue.component("DictTag", DictTag);
@@ -106,7 +109,7 @@
*/
Vue.use(Element, {
- size: Cookies.get("size") || "medium", // set element-ui default size
+ size: localStorage.getItem("size") || "medium", // set element-ui default size
});
Vue.config.productionTip = false;
--
Gitblit v1.9.3