From 12b2ac7ed9ec4c6d9ab2de8b2541eed8988037e0 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 16 十一月 2023 11:26:25 +0800
Subject: [PATCH] Merge branch 'develop'
---
src/utils/utils-custom.js | 65 +++++++++++++++++++++++++++++---
1 files changed, 58 insertions(+), 7 deletions(-)
diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js
index 350ccc7..44a9750 100644
--- a/src/utils/utils-custom.js
+++ b/src/utils/utils-custom.js
@@ -6,7 +6,7 @@
* @description 鑾峰彇涓嬬骇妯″潡
* @return {String} selfId 褰撳墠缁勪欢id
*/
- static getSubModules (components, selfId, supId) {
+ static getSubModules (components, selfId, supId, has) {
let modules = []
components.forEach(item => {
if (item.uuid === selfId || item.type === 'navbar') {
@@ -17,6 +17,17 @@
label: item.name,
disabled: supId === item.uuid
})
+
+ if (item.type === 'form' && item.subtype === 'simpleform' && item.wrap.refocus && supId !== item.uuid) {
+ modules.push({
+ value: item.uuid + '$focus-refresh',
+ label: item.name + '锛堝埛鏂�-鑱氱劍锛�',
+ })
+ modules.push({
+ value: item.uuid + '$focus-nofresh',
+ label: item.name + '锛堜笉鍒锋柊-鑱氱劍锛�',
+ })
+ }
} else if (item.type === 'tabs') {
if (item.subtype === 'tabletabs') {
item.subtabs.forEach(tab => {
@@ -38,7 +49,7 @@
type: 'tab',
value: f_tab.uuid,
label: f_tab.label,
- children: this.getSubModules(f_tab.components, selfId, supId)
+ children: this.getSubModules(f_tab.components, selfId, supId, has)
}
if (subItem.children.length === 0) {
@@ -672,11 +683,23 @@
}
if (btn.syncComponent && btn.syncComponent[0] === 'multiComponent' && btn.syncComponents) {
btn.syncComponents = btn.syncComponents.map(m => {
- m.syncComId = m.syncComId.map(n => md5(commonId + n))
+ m.syncComId = m.syncComId.map(n => {
+ if (/\$focus/.test(n)) {
+ return md5(commonId + n.split('$')[0]) + '$' + n.split('$')[1]
+ }
+
+ return md5(commonId + n)
+ })
return m
})
} else if (btn.syncComponent && btn.syncComponent.length > 0) {
- btn.syncComponent = btn.syncComponent.map(m => md5(commonId + m))
+ btn.syncComponent = btn.syncComponent.map(m => {
+ if (/\$focus/.test(m)) {
+ return md5(commonId + m.split('$')[0]) + '$' + m.split('$')[1]
+ }
+
+ return md5(commonId + m)
+ })
}
}
@@ -984,7 +1007,11 @@
if (item.type === 'date') {
value = '1949-10-01 00:00:00.000'
} else if (item.type === 'datemonth') {
- value = '1949-10-01 00:00:00.000,1949-10-02 00:00:00.000'
+ if (item.match === '=') {
+ value = '1949-10'
+ } else {
+ value = '1949-10-01 00:00:00.000,1949-10-02 00:00:00.000'
+ }
} else if (item.type === 'dateweek') {
value = '1949-10-01 00:00:00.000,1949-10-02 00:00:00.000'
} else if (item.type === 'daterange') {
@@ -1036,9 +1063,16 @@
searchText.push(`('${item.value}' ${item.match} '%'+${item.key}+'%')`)
} else if (item.type === 'date') {
searchText.push('(' + item.key + ' ' + item.match + ' \'' + item.value + '\')')
- } else if (item.type === 'datemonth' || item.type === 'dateweek' || item.type === 'range') {
+ } else if (item.type === 'dateweek' || item.type === 'range') {
let val = item.value.split(',')
searchText.push('(' + item.key + ' >= \'' + val[0] + '\' AND ' + item.key + ' < \'' + val[1] + '\')')
+ } else if (item.type === 'datemonth') {
+ if (item.match === '=') {
+ searchText.push('(' + item.key + ' = \'' + item.value + '\')')
+ } else {
+ let val = item.value.split(',')
+ searchText.push('(' + item.key + ' >= \'' + val[0] + '\' AND ' + item.key + ' < \'' + val[1] + '\')')
+ }
} else if (item.type === 'daterange') {
let val = item.value.split(',')
@@ -1081,7 +1115,8 @@
value: `'${item.value}'`
})
}
- } else if (['dateweek', 'datemonth', 'range'].includes(item.type)) {
+
+ } else if (['dateweek', 'range'].includes(item.type)) {
let val = item.value.split(',')
options.push({
reg: new RegExp('@' + item.key + '@', 'ig'),
@@ -1090,6 +1125,22 @@
reg: new RegExp('@' + item.key + '1@', 'ig'),
value: `'${val[1]}'`
})
+ } else if (item.type === 'datemonth') {
+ if (item.match === '=') {
+ options.push({
+ reg: new RegExp('@' + item.key + '@', 'ig'),
+ value: `'${item.value}'`
+ })
+ } else {
+ let val = item.value.split(',')
+ options.push({
+ reg: new RegExp('@' + item.key + '@', 'ig'),
+ value: `'${val[0]}'`
+ }, {
+ reg: new RegExp('@' + item.key + '1@', 'ig'),
+ value: `'${val[1]}'`
+ })
+ }
} else if (item.type === 'daterange') {
let val = item.value.split(',')
let _skey = item.key
--
Gitblit v1.8.0