From 3f0d3ffb8a64b7eff32cde91a0ab13922a2a3729 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期四, 28 十月 2021 09:40:02 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue into dev
---
ruoyi-ui/src/utils/ruoyi.js | 27 ++++++++++++++++++---------
1 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js
index c136ed0..63bd379 100644
--- a/ruoyi-ui/src/utils/ruoyi.js
+++ b/ruoyi-ui/src/utils/ruoyi.js
@@ -3,8 +3,6 @@
* Copyright (c) 2019 ruoyi
*/
-const baseURL = process.env.VUE_APP_BASE_API
-
// 鏃ユ湡鏍煎紡鍖�
export function parseTime(time, pattern) {
if (arguments.length === 0 || !time) {
@@ -72,8 +70,8 @@
export function selectDictLabel(datas, value) {
var actions = [];
Object.keys(datas).some((key) => {
- if (datas[key].dictValue == ('' + value)) {
- actions.push(datas[key].dictLabel);
+ if (datas[key].value == ('' + value)) {
+ actions.push(datas[key].label);
return true;
}
})
@@ -93,11 +91,6 @@
})
})
return actions.join('').substring(0, actions.join('').length - 1);
-}
-
-// 閫氱敤涓嬭浇鏂规硶
-export function download(fileName) {
- window.location.href = baseURL + "/common/download?fileName=" + encodeURI(fileName) + "&delete=" + true;
}
// 瀛楃涓叉牸寮忓寲(%s )
@@ -122,6 +115,22 @@
return str;
}
+// 鏁版嵁鍚堝苟
+export function mergeRecursive(source, target) {
+ for (var p in target) {
+ try {
+ if (target[p].constructor == Object) {
+ source[p] = mergeRecursive(source[p], target[p]);
+ } else {
+ source[p] = target[p];
+ }
+ } catch(e) {
+ source[p] = target[p];
+ }
+ }
+ return source;
+};
+
/**
* 鏋勯�犳爲鍨嬬粨鏋勬暟鎹�
* @param {*} data 鏁版嵁婧�
--
Gitblit v1.9.3