@fecp/designer 5.5.65 → 5.5.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/designer/package.json.mjs +1 -1
- package/es/designer/src/packages/dialog/useDialogDialog.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/index.vue.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/useDialogGlobalDialog.mjs +1 -1
- package/es/designer/src/packages/form/aside/index.mjs +1 -0
- package/es/designer/src/packages/form/property/widgets.vue.mjs +70 -43
- package/es/designer.css +508 -49
- package/es/packages/mobile/index.mjs +6 -0
- package/es/packages/mobile/src/api/index.mjs +8 -0
- package/es/packages/mobile/src/components/all.mjs +4 -0
- package/es/packages/mobile/src/components/base/card/Card.vue.mjs +2 -2
- package/es/packages/mobile/src/components/dataDisplay/dataStat/DataStat.vue.mjs +14 -0
- package/es/packages/mobile/src/components/dataDisplay/dataStat/index.mjs +10 -0
- package/es/packages/mobile/src/components/dataDisplay/menuGrid/MenuGrid.vue.mjs +123 -0
- package/es/packages/mobile/src/components/dataDisplay/menuGrid/index.mjs +7 -0
- package/es/packages/mobile/src/components/dataDisplay/noticeBar/NoticeBar.vue.mjs +98 -16
- package/es/packages/mobile/src/components/dataDisplay/table/Table.vue.mjs +2 -4
- package/es/packages/mobile/src/components/feedback/quickFilter/QuickFilter.vue.mjs +14 -15
- package/es/packages/mobile/src/components/form/search/Search.vue.mjs +4 -4
- package/es/packages/mobile/src/components/navigation/actionBar/ActionBar.vue.mjs +1 -1
- package/es/packages/mobile/src/components/navigation/navBar/NavBar.vue.mjs +13 -3
- package/es/packages/mobile/src/components/navigation/navBar/index.mjs +2 -2
- package/es/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.mjs +8 -4
- package/es/packages/mobile/src/components/navigation/tabbar/index.mjs +2 -2
- package/es/packages/mobile/src/index.vue.mjs +138 -0
- package/es/packages/mobile/src/page.vue.mjs +117 -0
- package/es/packages/mobile/src/utils/eventBus.mjs +5 -0
- package/es/packages/mobile/src/utils/pageHistory.mjs +111 -0
- package/es/packages/vue/src/components/forms/date/Date.vue.mjs +20 -0
- package/es/packages/vue/src/components/forms/form/validation.mjs +1 -1
- package/es/packages/vue/src/utils/parseFilterConfig.mjs +25 -0
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/packages/dialog/useDialogDialog.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/index.vue.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/useDialogGlobalDialog.js +1 -1
- package/lib/designer/src/packages/form/aside/index.js +1 -0
- package/lib/designer/src/packages/form/property/widgets.vue.js +70 -43
- package/lib/designer.css +508 -49
- package/lib/packages/mobile/index.js +94 -88
- package/lib/packages/mobile/src/api/index.js +8 -0
- package/lib/packages/mobile/src/components/all.js +92 -88
- package/lib/packages/mobile/src/components/base/card/Card.vue.js +2 -2
- package/lib/packages/mobile/src/components/dataDisplay/dataStat/DataStat.vue.js +14 -0
- package/lib/packages/mobile/src/components/dataDisplay/dataStat/index.js +10 -0
- package/lib/packages/mobile/src/components/dataDisplay/menuGrid/MenuGrid.vue.js +123 -0
- package/lib/packages/mobile/src/components/dataDisplay/menuGrid/index.js +7 -0
- package/lib/packages/mobile/src/components/dataDisplay/noticeBar/NoticeBar.vue.js +97 -15
- package/lib/packages/mobile/src/components/dataDisplay/table/Table.vue.js +2 -4
- package/lib/packages/mobile/src/components/feedback/quickFilter/QuickFilter.vue.js +13 -14
- package/lib/packages/mobile/src/components/form/search/Search.vue.js +4 -4
- package/lib/packages/mobile/src/components/navigation/actionBar/ActionBar.vue.js +1 -1
- package/lib/packages/mobile/src/components/navigation/navBar/NavBar.vue.js +13 -3
- package/lib/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.js +8 -4
- package/lib/packages/mobile/src/index.vue.js +138 -0
- package/lib/packages/mobile/src/page.vue.js +117 -0
- package/lib/packages/mobile/src/utils/eventBus.js +5 -0
- package/lib/packages/mobile/src/utils/pageHistory.js +111 -0
- package/lib/packages/vue/src/components/forms/date/Date.vue.js +20 -0
- package/lib/packages/vue/src/components/forms/form/validation.js +1 -1
- package/lib/packages/vue/src/utils/parseFilterConfig.js +25 -0
- package/package.json +1 -1
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const HISTORY_KEY = "mobile_page_history";
|
|
4
|
+
const MAX_HISTORY_SIZE = 20;
|
|
5
|
+
class PageHistory {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.history = this.loadHistory();
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 从 sessionStorage 加载历史记录
|
|
11
|
+
*/
|
|
12
|
+
loadHistory() {
|
|
13
|
+
try {
|
|
14
|
+
const data = sessionStorage.getItem(HISTORY_KEY);
|
|
15
|
+
return data ? JSON.parse(data) : [];
|
|
16
|
+
} catch (e) {
|
|
17
|
+
console.error("加载页面历史失败:", e);
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 保存历史记录到 sessionStorage
|
|
23
|
+
*/
|
|
24
|
+
saveHistory() {
|
|
25
|
+
try {
|
|
26
|
+
sessionStorage.setItem(HISTORY_KEY, JSON.stringify(this.history));
|
|
27
|
+
} catch (e) {
|
|
28
|
+
console.error("保存页面历史失败:", e);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* 添加页面到历史
|
|
33
|
+
* @param {Object} page - 页面配置对象,需包含 id
|
|
34
|
+
*/
|
|
35
|
+
push(page) {
|
|
36
|
+
if (!page || !page.id) {
|
|
37
|
+
console.warn("页面配置无效,无法添加到历史");
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (this.history.length > 0 && this.history[this.history.length - 1].id == page.id) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
this.history.push({
|
|
44
|
+
id: page.id,
|
|
45
|
+
name: page.name || "",
|
|
46
|
+
timestamp: Date.now(),
|
|
47
|
+
data: page
|
|
48
|
+
});
|
|
49
|
+
if (this.history.length > MAX_HISTORY_SIZE) {
|
|
50
|
+
this.history.shift();
|
|
51
|
+
}
|
|
52
|
+
this.saveHistory();
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* 后退到上一个页面
|
|
56
|
+
* @returns {Object|null} 返回上一个页面的配置,如果无法后退则返回 null
|
|
57
|
+
*/
|
|
58
|
+
back() {
|
|
59
|
+
if (this.history.length <= 1) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
this.history.pop();
|
|
63
|
+
this.saveHistory();
|
|
64
|
+
const prevPage = this.history[this.history.length - 1];
|
|
65
|
+
return prevPage ? prevPage.data : null;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* 获取当前页面
|
|
69
|
+
* @returns {Object|null}
|
|
70
|
+
*/
|
|
71
|
+
getCurrentPage() {
|
|
72
|
+
if (this.history.length == 0) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
return this.history[this.history.length - 1].data;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* 判断是否可以后退
|
|
79
|
+
* @returns {Boolean}
|
|
80
|
+
*/
|
|
81
|
+
canBack() {
|
|
82
|
+
return this.history.length > 1;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* 获取历史记录数量
|
|
86
|
+
* @returns {Number}
|
|
87
|
+
*/
|
|
88
|
+
getLength() {
|
|
89
|
+
return this.history.length;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* 清空历史记录
|
|
93
|
+
*/
|
|
94
|
+
clear() {
|
|
95
|
+
this.history = [];
|
|
96
|
+
this.saveHistory();
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* 初始化或重置历史记录(仅包含首页)
|
|
100
|
+
* @param {Object} homePage - 首页配置
|
|
101
|
+
*/
|
|
102
|
+
init(homePage) {
|
|
103
|
+
this.clear();
|
|
104
|
+
if (homePage) {
|
|
105
|
+
this.push(homePage);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const pageHistory = new PageHistory();
|
|
110
|
+
exports.default = pageHistory;
|
|
111
|
+
exports.pageHistory = pageHistory;
|
|
@@ -56,6 +56,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
56
56
|
endDate: {
|
|
57
57
|
type: String,
|
|
58
58
|
default: ""
|
|
59
|
+
},
|
|
60
|
+
dateRange: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: ""
|
|
59
63
|
}
|
|
60
64
|
},
|
|
61
65
|
emits: ["update:modelValue", "change"],
|
|
@@ -89,6 +93,21 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
89
93
|
emit("change", val);
|
|
90
94
|
}
|
|
91
95
|
});
|
|
96
|
+
const disabledDate = (date) => {
|
|
97
|
+
if (!props.dateRange) return false;
|
|
98
|
+
debugger;
|
|
99
|
+
const today = /* @__PURE__ */ new Date();
|
|
100
|
+
today.setHours(0, 0, 0, 0);
|
|
101
|
+
const targetDate = new Date(date);
|
|
102
|
+
targetDate.setHours(0, 0, 0, 0);
|
|
103
|
+
if (props.dateRange === "beforeToday") {
|
|
104
|
+
return targetDate > today;
|
|
105
|
+
}
|
|
106
|
+
if (props.dateRange === "afterToday") {
|
|
107
|
+
return targetDate < today;
|
|
108
|
+
}
|
|
109
|
+
return false;
|
|
110
|
+
};
|
|
92
111
|
return (_ctx, _cache) => {
|
|
93
112
|
const _component_el_date_picker = index.ElDatePicker;
|
|
94
113
|
return Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
|
|
@@ -102,6 +121,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
102
121
|
readonly: __props.readonly,
|
|
103
122
|
format: computedFormat.value,
|
|
104
123
|
"value-format": computedValueFormat.value,
|
|
124
|
+
"disabled-date": disabledDate,
|
|
105
125
|
clearable: "",
|
|
106
126
|
style: { "width": "100%" }
|
|
107
127
|
}), null, 16, ["modelValue", "type", "placeholder", "disabled", "readonly", "format", "value-format"])
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const parseRouteParams = require("./parseRouteParams.js");
|
|
4
|
+
function isDateString(value) {
|
|
5
|
+
if (typeof value !== "string") return false;
|
|
6
|
+
return /^\d{4}\/\d{2}\/\d{2}$/.test(value);
|
|
7
|
+
}
|
|
8
|
+
function compareDate(a, b) {
|
|
9
|
+
return a.localeCompare(b);
|
|
10
|
+
}
|
|
4
11
|
function checkFilterMatch(filterConfig, data, fields = []) {
|
|
5
12
|
if (!filterConfig || !data) {
|
|
6
13
|
return false;
|
|
@@ -32,21 +39,39 @@ function checkConditionMatch(condition, data, fields) {
|
|
|
32
39
|
const fieldName = (fieldInfo == null ? void 0 : fieldInfo.fieldName) || field;
|
|
33
40
|
const dataValue = data[fieldName];
|
|
34
41
|
const parsedValue = parseRouteParams.parseSingleParamValue(value, data, fields);
|
|
42
|
+
if ("null" == (dataValue ?? "null") || "null" == (parsedValue ?? "null")) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
35
45
|
switch (operator) {
|
|
36
46
|
case "eq":
|
|
37
47
|
return dataValue == parsedValue;
|
|
38
48
|
case "ne":
|
|
39
49
|
return dataValue != parsedValue;
|
|
40
50
|
case "gt":
|
|
51
|
+
if (isDateString(dataValue) && isDateString(parsedValue)) {
|
|
52
|
+
return compareDate(dataValue, parsedValue) > 0;
|
|
53
|
+
}
|
|
41
54
|
return Number(dataValue) > Number(parsedValue);
|
|
42
55
|
case "gte":
|
|
56
|
+
if (isDateString(dataValue) && isDateString(parsedValue)) {
|
|
57
|
+
return compareDate(dataValue, parsedValue) >= 0;
|
|
58
|
+
}
|
|
43
59
|
return Number(dataValue) >= Number(parsedValue);
|
|
44
60
|
case "lt":
|
|
61
|
+
if (isDateString(dataValue) && isDateString(parsedValue)) {
|
|
62
|
+
return compareDate(dataValue, parsedValue) < 0;
|
|
63
|
+
}
|
|
45
64
|
return Number(dataValue) < Number(parsedValue);
|
|
46
65
|
case "lte":
|
|
66
|
+
if (isDateString(dataValue) && isDateString(parsedValue)) {
|
|
67
|
+
return compareDate(dataValue, parsedValue) <= 0;
|
|
68
|
+
}
|
|
47
69
|
return Number(dataValue) <= Number(parsedValue);
|
|
48
70
|
case "range":
|
|
49
71
|
if (!parsedValue || parsedValue.min == null || parsedValue.max == null) return false;
|
|
72
|
+
if (isDateString(dataValue) && isDateString(parsedValue.min) && isDateString(parsedValue.max)) {
|
|
73
|
+
return compareDate(dataValue, parsedValue.min) >= 0 && compareDate(dataValue, parsedValue.max) <= 0;
|
|
74
|
+
}
|
|
50
75
|
const numValue = Number(dataValue);
|
|
51
76
|
return numValue >= Number(parsedValue.min) && numValue <= Number(parsedValue.max);
|
|
52
77
|
case "contains":
|