cnhis-design-vue 3.1.34-beta.1 → 3.1.34-beta.10
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/README.md +123 -123
- package/es/components/big-table/index.d.ts +1 -0
- package/es/components/big-table/src/BigTable.vue.d.ts +1 -0
- package/es/components/big-table/src/BigTable.vue2.js +17 -5
- package/es/components/big-table/src/components/edit-form/edit-input.js +2 -1
- package/es/components/big-table/src/components/edit-form/edit-select.js +26 -1
- package/es/components/big-table/src/hooks/useEvent.js +3 -4
- package/es/components/fabric-chart/index.d.ts +141 -374
- package/es/components/fabric-chart/src/BirthProcessChart.vue.d.ts +2 -2
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +142 -374
- package/es/components/fabric-chart/src/FabricChart.vue.js +52 -22
- package/es/components/fabric-chart/src/hooks/index.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/index.js +1 -0
- package/es/components/fabric-chart/src/hooks/useBirthProcess.js +2 -2
- package/es/components/fabric-chart/src/hooks/useBottom.js +1 -6
- package/es/components/fabric-chart/src/hooks/useCenter.d.ts +4 -18
- package/es/components/fabric-chart/src/hooks/useCenter.js +5 -21
- package/es/components/fabric-chart/src/hooks/useCommon.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/useCommon.js +2 -2
- package/es/components/fabric-chart/src/hooks/useGrid.js +2 -7
- package/es/components/fabric-chart/src/hooks/useLeft.d.ts +2 -1
- package/es/components/fabric-chart/src/hooks/useLeft.js +22 -28
- package/es/components/fabric-chart/src/hooks/useOther.js +1 -6
- package/es/components/fabric-chart/src/hooks/useRight.js +13 -18
- package/es/components/fabric-chart/src/hooks/useTemperatureChart.d.ts +25 -0
- package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +339 -0
- package/es/components/fabric-chart/src/hooks/useTop.js +1 -6
- package/es/components/iho-table/index.d.ts +6 -0
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/IhoTable.vue.d.ts +6 -0
- package/es/components/iho-table/src/IhoTable.vue.js +12 -1
- package/es/components/iho-table/src/components/IhoTableColumn.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +6 -0
- package/es/components/iho-table/src/constants/index.js +9 -7
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.js +4 -4
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +19 -7
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.d.ts +12 -0
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +58 -25
- package/es/components/iho-table/src/plugins/filterPlugin/index.js +56 -55
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +12 -7
- package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +10 -3
- package/es/components/iho-table/src/types/index.d.ts +8 -3
- package/es/components/iho-table/src/utils/index.d.ts +6 -0
- package/es/components/iho-table/src/utils/index.js +16 -2
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/shared/assets/img/failure.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/icon-asc.js +1 -1
- package/es/shared/assets/img/icon-desc.js +1 -1
- package/es/shared/assets/img/no-permission.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/video_hover.js +1 -1
- package/es/shared/assets/img/video_play_hover.js +1 -1
- package/es/shared/assets/img/xb_big.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/types/index.d.ts +1 -0
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/components/fabric-chart/src/BirthProcessChart.vue.js +0 -172
- package/es/components/fabric-chart/src/TemperatureChart.vue.d.ts +0 -214
- package/es/components/fabric-chart/src/TemperatureChart.vue.js +0 -355
- package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/tapable/index.d.ts +0 -139
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { defineComponent, inject, ref, onDeactivated, watch, computed, openBlock, createElementBlock, createVNode, unref, withCtx, createTextVNode, toDisplayString, normalizeClass,
|
|
1
|
+
import { defineComponent, inject, ref, onDeactivated, watch, computed, openBlock, createElementBlock, createElementVNode, renderSlot, createVNode, unref, withCtx, createTextVNode, toDisplayString, normalizeClass, createCommentVNode, Fragment, renderList, createBlock, isRef, normalizeStyle } from 'vue';
|
|
2
2
|
import { widthAppend } from '../../../../../shared/utils/index.js';
|
|
3
3
|
import { FunnelSharp } from '@vicons/ionicons5';
|
|
4
4
|
import { useVModel, useVirtualList } from '@vueuse/core';
|
|
5
|
-
import { NEllipsis, NPopover, NIcon, NInput,
|
|
5
|
+
import { NEllipsis, NPopover, NIcon, NInput, NCheckbox, NCheckboxGroup, NButtonGroup, NButton } from 'naive-ui';
|
|
6
6
|
import { InjectionIhoTableUUID } from '../../constants/index.js';
|
|
7
7
|
import _export_sfc from '../../../../../_virtual/plugin-vue_export-helper.js';
|
|
8
8
|
|
|
9
9
|
const _hoisted_1 = { style: { "display": "flex", "align-items": "center" } };
|
|
10
|
-
const _hoisted_2 = {
|
|
11
|
-
const _hoisted_3 =
|
|
12
|
-
const _hoisted_4 = {
|
|
10
|
+
const _hoisted_2 = { style: { "max-width": "calc(100% - 22px)" } };
|
|
11
|
+
const _hoisted_3 = { class: "iho-table__filterWrapper" };
|
|
12
|
+
const _hoisted_4 = { key: 0 };
|
|
13
|
+
const _hoisted_5 = ["onClick"];
|
|
14
|
+
const _hoisted_6 = { class: "iho-table__filterListItem" };
|
|
15
|
+
const _hoisted_7 = { class: "iho-table__filterFooter" };
|
|
13
16
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
17
|
__name: "filter",
|
|
15
18
|
props: {
|
|
@@ -17,6 +20,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
20
|
type: Object,
|
|
18
21
|
required: true
|
|
19
22
|
},
|
|
23
|
+
sortable: { type: Boolean },
|
|
20
24
|
options: { type: Array, default: () => [] },
|
|
21
25
|
checked: { type: Array, required: true },
|
|
22
26
|
sortStatus: { type: String }
|
|
@@ -54,6 +58,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54
58
|
overscan: 3
|
|
55
59
|
}
|
|
56
60
|
);
|
|
61
|
+
const indeterminate = computed(() => !!checkedCacheRef.value.length && checkedCacheRef.value.length !== props.options.length);
|
|
62
|
+
const checkAll = computed({
|
|
63
|
+
get() {
|
|
64
|
+
return checkedCacheRef.value.length === props.options.length;
|
|
65
|
+
},
|
|
66
|
+
set: (isCheck) => {
|
|
67
|
+
if (isCheck) {
|
|
68
|
+
checkedCacheRef.value = props.options.map((item) => item.value);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
checkedCacheRef.value = [];
|
|
72
|
+
}
|
|
73
|
+
});
|
|
57
74
|
const containerStyleWithHeight = computed(() => {
|
|
58
75
|
return {
|
|
59
76
|
...containerProps.style,
|
|
@@ -77,12 +94,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
77
94
|
});
|
|
78
95
|
return (_ctx, _cache) => {
|
|
79
96
|
return openBlock(), createElementBlock("section", _hoisted_1, [
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
97
|
+
createElementVNode("section", _hoisted_2, [
|
|
98
|
+
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
99
|
+
createVNode(unref(NEllipsis), null, {
|
|
100
|
+
default: withCtx(() => [
|
|
101
|
+
createTextVNode(toDisplayString(__props.payload.column.title), 1)
|
|
102
|
+
]),
|
|
103
|
+
_: 1
|
|
104
|
+
})
|
|
105
|
+
])
|
|
106
|
+
]),
|
|
86
107
|
createVNode(unref(NPopover), {
|
|
87
108
|
to: `#${unref(uuid)}`,
|
|
88
109
|
show: filterVisible.value
|
|
@@ -95,27 +116,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
95
116
|
}, null, 8, ["class", "component"])
|
|
96
117
|
]),
|
|
97
118
|
default: withCtx(() => [
|
|
98
|
-
createElementVNode("section",
|
|
99
|
-
(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
119
|
+
createElementVNode("section", _hoisted_3, [
|
|
120
|
+
createCommentVNode(' \u5224\u65AD\u662F\u5426\u663E\u793A\u5347\u5E8F\u964D\u5E8F\u6A21\u5757\u7684\u7EC4\u4EF6 v-if="sortable"'),
|
|
121
|
+
__props.sortable ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
122
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(sortStatusList, (item) => {
|
|
123
|
+
return createElementVNode("div", {
|
|
124
|
+
key: item.status,
|
|
125
|
+
class: normalizeClass(["iho-table__filterButton", { "iho-table__filterButton--active": unref(sortStatusRef) === item.status }]),
|
|
126
|
+
onClick: ($event) => setSort(item.status)
|
|
127
|
+
}, toDisplayString(item.text), 11, _hoisted_5);
|
|
128
|
+
}), 64))
|
|
129
|
+
])) : createCommentVNode("v-if", true),
|
|
130
|
+
__props.options.length > 5 ? (openBlock(), createBlock(unref(NInput), {
|
|
131
|
+
key: 1,
|
|
107
132
|
value: searchFilterText.value,
|
|
108
133
|
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => searchFilterText.value = $event)
|
|
109
|
-
}, null, 8, ["value"]),
|
|
134
|
+
}, null, 8, ["value"])) : createCommentVNode("v-if", true),
|
|
135
|
+
createElementVNode("div", _hoisted_6, [
|
|
136
|
+
createVNode(unref(NCheckbox), {
|
|
137
|
+
label: "\u5168\u9009",
|
|
138
|
+
checked: unref(checkAll),
|
|
139
|
+
"onUpdate:checked": _cache[1] || (_cache[1] = ($event) => isRef(checkAll) ? checkAll.value = $event : null),
|
|
140
|
+
indeterminate: unref(indeterminate)
|
|
141
|
+
}, null, 8, ["checked", "indeterminate"])
|
|
142
|
+
]),
|
|
110
143
|
createVNode(unref(NCheckboxGroup), {
|
|
111
144
|
value: checkedCacheRef.value,
|
|
112
|
-
"onUpdate:value": _cache[
|
|
145
|
+
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => checkedCacheRef.value = $event)
|
|
113
146
|
}, {
|
|
114
147
|
default: withCtx(() => [
|
|
115
148
|
createElementVNode("section", {
|
|
116
149
|
ref: unref(containerProps).ref,
|
|
117
150
|
style: normalizeStyle(unref(containerStyleWithHeight)),
|
|
118
|
-
onScroll: _cache[
|
|
151
|
+
onScroll: _cache[2] || (_cache[2] = (...args) => unref(containerProps).onScroll && unref(containerProps).onScroll(...args)),
|
|
119
152
|
class: "iho-table__filterListWrapper"
|
|
120
153
|
}, [
|
|
121
154
|
createElementVNode("section", {
|
|
@@ -137,12 +170,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
137
170
|
]),
|
|
138
171
|
_: 1
|
|
139
172
|
}, 8, ["value"]),
|
|
140
|
-
createElementVNode("footer",
|
|
173
|
+
createElementVNode("footer", _hoisted_7, [
|
|
141
174
|
createElementVNode("section", null, toDisplayString(`\u5DF2\u9009\u62E9${checkedCacheRef.value.length}\u9879`), 1),
|
|
142
175
|
createVNode(unref(NButtonGroup), { size: "tiny" }, {
|
|
143
176
|
default: withCtx(() => [
|
|
144
177
|
createVNode(unref(NButton), {
|
|
145
|
-
onClick: _cache[
|
|
178
|
+
onClick: _cache[4] || (_cache[4] = ($event) => checkedCacheRef.value = [])
|
|
146
179
|
}, {
|
|
147
180
|
default: withCtx(() => [
|
|
148
181
|
createTextVNode("\u6E05\u7A7A")
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { computed, createVNode, onBeforeUnmount, reactive } from 'vue';
|
|
2
|
+
import { jsonParse } from '../../../../../shared/utils/index.js';
|
|
2
3
|
import { isObject, isArray } from 'lodash-es';
|
|
3
4
|
import '../../../index.js';
|
|
4
5
|
import { IHO_TABLE_NUMBER_STATUS, IHO_TABLE_STRING_STATUS } from '../../constants/index.js';
|
|
@@ -121,62 +122,62 @@ function filterPlugin() {
|
|
|
121
122
|
const lowCodeField = (_a = fieldItem.editRender) == null ? void 0 : _a.props;
|
|
122
123
|
if (!isObject(lowCodeField))
|
|
123
124
|
return;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
const {
|
|
136
|
-
filterState,
|
|
137
|
-
setChecked,
|
|
138
|
-
setSort
|
|
139
|
-
} = initFilterState(uuid, fieldItem.field, lowCodeField.filterDefaultValue);
|
|
140
|
-
filterState.options = options;
|
|
141
|
-
const oldHeader = (_g = fieldItem.slots) == null ? void 0 : _g.header;
|
|
142
|
-
const sortStatusRef = computed({
|
|
143
|
-
get: () => {
|
|
144
|
-
return filterState.sortStatus;
|
|
145
|
-
},
|
|
146
|
-
set: (value) => setSort({
|
|
147
|
-
field: fieldItem.field,
|
|
148
|
-
value,
|
|
149
|
-
$table: $table.value,
|
|
150
|
-
emits
|
|
151
|
-
})
|
|
152
|
-
});
|
|
153
|
-
const checkedRef = computed({
|
|
154
|
-
get: () => filterState.checked,
|
|
155
|
-
set: (value) => setChecked({
|
|
156
|
-
field: fieldItem.field,
|
|
157
|
-
value,
|
|
158
|
-
$table: $table.value,
|
|
159
|
-
emits
|
|
160
|
-
})
|
|
161
|
-
});
|
|
162
|
-
const optionsRef = computed(() => filterState.options);
|
|
163
|
-
fieldItem.slots = {
|
|
164
|
-
...fieldItem.slots,
|
|
165
|
-
header(payload) {
|
|
166
|
-
return createVNode(FilterComponent, {
|
|
167
|
-
"payload": payload,
|
|
168
|
-
"options": optionsRef.value,
|
|
169
|
-
"checked": checkedRef.value,
|
|
170
|
-
"onUpdate:checked": ($event) => checkedRef.value = $event,
|
|
171
|
-
"sortStatus": sortStatusRef.value,
|
|
172
|
-
"onUpdate:sortStatus": ($event) => sortStatusRef.value = $event
|
|
173
|
-
}, {
|
|
174
|
-
header: oldHeader
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
} catch (e) {
|
|
125
|
+
const fieldSetting = jsonParse(lowCodeField.fieldSetting || "");
|
|
126
|
+
if (!isFieldSetting(fieldSetting) || !showFilter(fieldSetting))
|
|
127
|
+
return;
|
|
128
|
+
const sortable = fieldItem.sortable;
|
|
129
|
+
fieldItem.sortable = false;
|
|
130
|
+
let options = (_d = (_c = (_b = fieldSetting.mapping) == null ? void 0 : _b.mappingFiled) == null ? void 0 : _c.map((item) => item.value[0])) != null ? _d : [];
|
|
131
|
+
if (isCompatibleColumn(lowCodeField)) {
|
|
132
|
+
options = (_f = (_e = lowCodeField.options) == null ? void 0 : _e.map((option) => ({
|
|
133
|
+
...option,
|
|
134
|
+
key: option.label
|
|
135
|
+
}))) != null ? _f : [];
|
|
179
136
|
}
|
|
137
|
+
const {
|
|
138
|
+
filterState,
|
|
139
|
+
setChecked,
|
|
140
|
+
setSort
|
|
141
|
+
} = initFilterState(uuid, fieldItem.field, lowCodeField.filterDefaultValue);
|
|
142
|
+
filterState.options = options;
|
|
143
|
+
const oldHeader = (_g = fieldItem.slots) == null ? void 0 : _g.header;
|
|
144
|
+
const sortStatusRef = computed({
|
|
145
|
+
get: () => {
|
|
146
|
+
return filterState.sortStatus;
|
|
147
|
+
},
|
|
148
|
+
set: (value) => setSort({
|
|
149
|
+
field: fieldItem.field,
|
|
150
|
+
value,
|
|
151
|
+
$table: $table.value,
|
|
152
|
+
emits
|
|
153
|
+
})
|
|
154
|
+
});
|
|
155
|
+
const checkedRef = computed({
|
|
156
|
+
get: () => filterState.checked,
|
|
157
|
+
set: (value) => setChecked({
|
|
158
|
+
field: fieldItem.field,
|
|
159
|
+
value,
|
|
160
|
+
$table: $table.value,
|
|
161
|
+
emits
|
|
162
|
+
})
|
|
163
|
+
});
|
|
164
|
+
const optionsRef = computed(() => filterState.options);
|
|
165
|
+
fieldItem.slots = {
|
|
166
|
+
...fieldItem.slots,
|
|
167
|
+
header(payload) {
|
|
168
|
+
return createVNode(FilterComponent, {
|
|
169
|
+
"payload": payload,
|
|
170
|
+
"options": optionsRef.value,
|
|
171
|
+
"sortable": sortable,
|
|
172
|
+
"checked": checkedRef.value,
|
|
173
|
+
"onUpdate:checked": ($event) => checkedRef.value = $event,
|
|
174
|
+
"sortStatus": sortStatusRef.value,
|
|
175
|
+
"onUpdate:sortStatus": ($event) => sortStatusRef.value = $event
|
|
176
|
+
}, {
|
|
177
|
+
header: oldHeader
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
};
|
|
180
181
|
});
|
|
181
182
|
return fieldList;
|
|
182
183
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { pick, cloneDeep } from 'lodash-es';
|
|
1
|
+
import { pick, cloneDeep, isObject } from 'lodash-es';
|
|
2
2
|
import { toRaw } from 'vue';
|
|
3
|
-
import { HIGHEST_PRIORITY,
|
|
3
|
+
import { HIGHEST_PRIORITY, WIDGET_TYPE } from '../../constants/index.js';
|
|
4
4
|
import { defineTablePlugin } from '../../hooks/useTablePlugin.js';
|
|
5
|
-
import { IhoTableUtils } from '../../utils/index.js';
|
|
5
|
+
import { IhoTableStatusHelper, IhoTableUtils } from '../../utils/index.js';
|
|
6
6
|
|
|
7
7
|
function lowCodeFieldAdaptorPlugin() {
|
|
8
8
|
const pluginName = "lowCodeFieldAdaptorPlugin";
|
|
@@ -15,10 +15,12 @@ function lowCodeFieldAdaptorPlugin() {
|
|
|
15
15
|
className: _field.bold ? "iho-table__boldCell" : "",
|
|
16
16
|
field: _field.columnName,
|
|
17
17
|
showOverflow: Reflect.has(_field, "showOverflow") ? _field.showOverflow : "tooltip",
|
|
18
|
-
visible: _field.isShow
|
|
18
|
+
visible: IhoTableStatusHelper.notNegative(_field.isShow),
|
|
19
19
|
minWidth: _field.colWidth,
|
|
20
|
+
sortable: IhoTableStatusHelper.isPositive(_field.isSort),
|
|
20
21
|
slots: { ..._field.slots, default: _field.slotFn, header: _field.headerSlotFn },
|
|
21
|
-
|
|
22
|
+
title: _field.alias || _field.title,
|
|
23
|
+
...pick(_field, ["treeNode", "resizable"])
|
|
22
24
|
};
|
|
23
25
|
settingObjAdaptor(result, _field, config);
|
|
24
26
|
return result;
|
|
@@ -27,7 +29,6 @@ function lowCodeFieldAdaptorPlugin() {
|
|
|
27
29
|
});
|
|
28
30
|
}
|
|
29
31
|
function settingObjAdaptor(fieldItem, lowCodeField, config) {
|
|
30
|
-
var _a;
|
|
31
32
|
const props = cloneDeep(toRaw(lowCodeField));
|
|
32
33
|
props.componentProps = { size: config.size === "mini" ? "small" : config.size, ...props.componentProps };
|
|
33
34
|
fieldItem.editRender = {
|
|
@@ -36,7 +37,11 @@ function settingObjAdaptor(fieldItem, lowCodeField, config) {
|
|
|
36
37
|
props
|
|
37
38
|
};
|
|
38
39
|
fieldItem.editRender.enabled = !Reflect.get(WIDGET_TYPE, fieldItem.editRender.name);
|
|
39
|
-
|
|
40
|
+
if (!isObject(lowCodeField.settingObj))
|
|
41
|
+
return;
|
|
42
|
+
if (Reflect.has(lowCodeField.settingObj, "isHide")) {
|
|
43
|
+
fieldItem.visible = fieldItem.visible && IhoTableStatusHelper.notPositive(lowCodeField.settingObj.isHide);
|
|
44
|
+
}
|
|
40
45
|
}
|
|
41
46
|
|
|
42
47
|
export { lowCodeFieldAdaptorPlugin };
|
|
@@ -41,12 +41,19 @@ function virtualTreePlugin() {
|
|
|
41
41
|
hooks.fieldHooks.fieldList.tap(pluginName, (fieldList, config) => {
|
|
42
42
|
const { transform } = config.treeConfig || DMZ;
|
|
43
43
|
if (transform && config.uuid) {
|
|
44
|
-
|
|
44
|
+
let treeNodeColumnIndex = fieldList.findIndex((field) => field.treeNode);
|
|
45
|
+
if (!~treeNodeColumnIndex) {
|
|
46
|
+
fieldList.some((field, index) => {
|
|
47
|
+
if (field.type)
|
|
48
|
+
return;
|
|
49
|
+
treeNodeColumnIndex = index;
|
|
50
|
+
return field.treeNode = true;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
45
53
|
treeNodeColumnIndexMap.set(config.uuid, {
|
|
46
|
-
index:
|
|
54
|
+
index: treeNodeColumnIndex,
|
|
47
55
|
length: fieldList.length
|
|
48
56
|
});
|
|
49
|
-
!~treeNodeColumnIndex && Reflect.set(fieldList[0], "treeNode", true);
|
|
50
57
|
}
|
|
51
58
|
return fieldList;
|
|
52
59
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyObject, TupleToUnion } from '../../../../../es/shared/types';
|
|
1
|
+
import { AnyObject, MaybeString, TupleToUnion } from '../../../../../es/shared/types';
|
|
2
2
|
import { VxeTableProps, VxeTableDefines, VxeTableInstance, VxeColumnPropTypes } from 'vxe-table';
|
|
3
3
|
import { VxeTableEventProps } from 'vxe-table/types/table';
|
|
4
4
|
import { IHO_TABLE_STRING_STATUS, IhoTableCustomEventNameTuple, IhoTableEventNameTuple, IhoTableRowGroupSequence, VxeEventListenerNameList } from '../../../../../es/components/iho-table/src/constants';
|
|
@@ -13,6 +13,9 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
|
|
|
13
13
|
[K in typeof VxeEventListenerNameList[number]]: (...payload: IhoTableEmitPayload<EventListenerToEventName<K>>) => void;
|
|
14
14
|
}> & Partial<{
|
|
15
15
|
uuid: string;
|
|
16
|
+
isTree: MaybeString<0 | 1 | 2 | 3>;
|
|
17
|
+
isSort: MaybeString<0 | 1>;
|
|
18
|
+
isBatchSelect: MaybeString<0 | 1>;
|
|
16
19
|
showSeq: boolean;
|
|
17
20
|
selectType: Exclude<VxeTableDefines.ColumnInfo['type'], 'seq' | 'expand' | 'html'>;
|
|
18
21
|
rowGroupSetting: Partial<Record<TupleToUnion<typeof IhoTableRowGroupSequence>, IhoTableRowGroupItem[]>>;
|
|
@@ -41,7 +44,7 @@ export declare namespace IhoTableLowCodeField {
|
|
|
41
44
|
};
|
|
42
45
|
type SettingObj = Partial<{
|
|
43
46
|
attr: string;
|
|
44
|
-
isHide:
|
|
47
|
+
isHide: MaybeString<0 | 1>;
|
|
45
48
|
[K: string]: unknown;
|
|
46
49
|
}>;
|
|
47
50
|
}
|
|
@@ -51,10 +54,12 @@ export declare type LowCodeTableFieldItem = {
|
|
|
51
54
|
} & Partial<{
|
|
52
55
|
id: number | string;
|
|
53
56
|
title: string;
|
|
57
|
+
alias: string;
|
|
54
58
|
colWidth: VxeTableDefines.ColumnInfo['width'];
|
|
55
59
|
settingObj: IhoTableLowCodeField.SettingObj;
|
|
56
60
|
treeNode: boolean;
|
|
57
|
-
isShow: 0 | 1
|
|
61
|
+
isShow: MaybeString<0 | 1>;
|
|
62
|
+
isSort: MaybeString<0 | 1>;
|
|
58
63
|
formType: string;
|
|
59
64
|
fieldSetting: string;
|
|
60
65
|
componentProps: AnyObject;
|
|
@@ -30,4 +30,10 @@ export declare const IhoTableRenderHelper: Readonly<{
|
|
|
30
30
|
createDefaultRenderCell: typeof createDefaultRenderCell;
|
|
31
31
|
createRenderEdit: typeof createRenderEdit;
|
|
32
32
|
}>;
|
|
33
|
+
export declare const IhoTableStatusHelper: Readonly<{
|
|
34
|
+
isPositive(value: string | number | undefined | null): boolean;
|
|
35
|
+
isNegative(value: string | number | undefined | null): boolean;
|
|
36
|
+
notPositive(value: string | number | undefined | null): boolean;
|
|
37
|
+
notNegative(value: string | number | undefined | null): boolean;
|
|
38
|
+
}>;
|
|
33
39
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { inject, reactive, nextTick, unref, toRaw, createVNode } from 'vue';
|
|
2
2
|
import { isNumber, cloneDeep } from 'lodash-es';
|
|
3
|
-
import { InjectionIhoTableEmits, InjectionIhoTableConfig } from '../constants/index.js';
|
|
3
|
+
import { InjectionIhoTableEmits, InjectionIhoTableConfig, IHO_TABLE_NUMBER_STATUS, IHO_TABLE_STRING_STATUS } from '../constants/index.js';
|
|
4
4
|
|
|
5
5
|
function IhoTableWarn(message) {
|
|
6
6
|
return console.warn(`[IhoTable]: ${message}`);
|
|
@@ -112,5 +112,19 @@ const IhoTableRenderHelper = Object.freeze({
|
|
|
112
112
|
createDefaultRenderCell,
|
|
113
113
|
createRenderEdit
|
|
114
114
|
});
|
|
115
|
+
const IhoTableStatusHelper = Object.freeze({
|
|
116
|
+
isPositive(value) {
|
|
117
|
+
return value === IHO_TABLE_NUMBER_STATUS.POSITIVE || value === IHO_TABLE_STRING_STATUS.POSITIVE;
|
|
118
|
+
},
|
|
119
|
+
isNegative(value) {
|
|
120
|
+
return value === IHO_TABLE_NUMBER_STATUS.NEGATIVE || value === IHO_TABLE_STRING_STATUS.NEGATIVE;
|
|
121
|
+
},
|
|
122
|
+
notPositive(value) {
|
|
123
|
+
return value !== IHO_TABLE_NUMBER_STATUS.POSITIVE && value !== IHO_TABLE_STRING_STATUS.POSITIVE;
|
|
124
|
+
},
|
|
125
|
+
notNegative(value) {
|
|
126
|
+
return value !== IHO_TABLE_NUMBER_STATUS.NEGATIVE && value !== IHO_TABLE_STRING_STATUS.NEGATIVE;
|
|
127
|
+
}
|
|
128
|
+
});
|
|
115
129
|
|
|
116
|
-
export { IhoTableRenderHelper, IhoTableUtils, IhoTableWarn, getColumnRenderWidth, getEventName, getLowCodeFieldFromField, getRowHeight, useIhoTableFormEvent, useUUIDMap };
|
|
130
|
+
export { IhoTableRenderHelper, IhoTableStatusHelper, IhoTableUtils, IhoTableWarn, getColumnRenderWidth, getEventName, getLowCodeFieldFromField, getRowHeight, useIhoTableFormEvent, useUUIDMap };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.iho-table__boldCell{font-weight:700}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar{background-color:transparent;height:10px;width:10px}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#f2f2f2;border:3px dashed transparent;border-radius:5px}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb:hover,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb:hover{background:#b2b2b2}.iho-table .vxe-table{transform:translateZ(0)}.iho-table .vxe-table .vxe-table--empty-content,.iho-table .vxe-table .vxe-table--empty-content>div{height:100%;width:100%}.iho-table .vxe-table .vxe-table--empty-content>div .no-data-tip{display:inline-flex}.iho-table .vxe-table .col--checkbox .vxe-cell,.iho-table .vxe-table .col--seq .vxe-cell{padding:0}.iho-table .vxe-table .col--checkbox .vxe-cell .vxe-checkbox--label,.iho-table .vxe-table .col--seq .vxe-cell .vxe-checkbox--label{padding-left:0}.iho-table .vxe-table .vxe-cell .vxe-tree-cell{height:100%}.iho-table .vxe-table .scan-multi-delete{color:#f06f64}.iho-table .vxe-table .vxe-table--header{background-color:#f2f2f2}.iho-table .vxe-table .vxe-table--header .vxe-header--column .vxe-cell--title{color:#35393c;height:100%;line-height:unset}.iho-table .vxe-table .vxe-table--header .vxe-header--column .vxe-cell--title .header-title-span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.iho-table .vxe-table .vxe-table--header .col--checkbox .vxe-cell--title,.iho-table .vxe-table .vxe-table--header .col--seq .vxe-cell--title{display:inline-block}.iho-table .vxe-table .vxe-table--body-wrapper::-webkit-scrollbar,.iho-table .vxe-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar{background-color:transparent;height:10px;width:10px}.iho-table .vxe-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb,.iho-table .vxe-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#f2f2f2;border:3px dashed transparent;border-radius:0}.iho-table .vxe-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb:hover,.iho-table .vxe-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb:hover{background:#b2b2b2}.iho-table .vxe-table .vxe-footer--row .vxe-footer--column>.vxe-cell .vxe-cell--item{height:30px;line-height:30px}.iho-table .vxe-table .vxe-cell--checkbox .vxe-checkbox--label{display:none}.iho-table .vxe-table--render-default .vxe-body--expanded-column,.iho-table .vxe-table--render-default .vxe-table--border-line{border-color:#d5d5d599}.iho-table .vxe-table--render-default .vxe-table--footer-wrapper{border-top-color:#d5d5d599}.iho-table .vxe-table--render-default.border--default .vxe-body--column,.iho-table .vxe-table--render-default.border--default .vxe-footer--column,.iho-table .vxe-table--render-default.border--default .vxe-header--column,.iho-table .vxe-table--render-default.border--inner .vxe-body--column,.iho-table .vxe-table--render-default.border--inner .vxe-footer--column,.iho-table .vxe-table--render-default.border--inner .vxe-header--column{background-image:linear-gradient(#d5d5d599,#d5d5d599)}.iho-table .vxe-table--render-default.border--full .vxe-body--column,.iho-table .vxe-table--render-default.border--full .vxe-footer--column,.iho-table .vxe-table--render-default.border--full .vxe-header--column{background-image:linear-gradient(#d5d5d599,#d5d5d599),linear-gradient(#d5d5d599,#d5d5d599)}.iho-table .vxe-table--render-default.border--full .vxe-table--fixed-left-wrapper .vxe-body--column{border-right-color:#d5d5d599}.iho-table .vxe-table--render-default.border--default .vxe-table--header-wrapper .vxe-header--row:last-child .vxe-header--gutter,.iho-table .vxe-table--render-default.border--full .vxe-table--header-wrapper .vxe-header--row:last-child .vxe-header--gutter,.iho-table .vxe-table--render-default.border--inner .vxe-table--header-wrapper .vxe-header--row:last-child .vxe-header--gutter,.iho-table .vxe-table--render-default.border--outer .vxe-table--header-wrapper .vxe-header--row:last-child .vxe-header--gutter{background-image:linear-gradient(#d5d5d599,#d5d5d599)}.iho-table .vxe-table--render-default.border--default .vxe-table--header-wrapper .vxe-table--header-border-line,.iho-table .vxe-table--render-default.border--full .vxe-table--header-wrapper .vxe-table--header-border-line,.iho-table .vxe-table--render-default.border--inner .vxe-table--header-wrapper .vxe-table--header-border-line,.iho-table .vxe-table--render-default.border--outer .vxe-table--header-wrapper .vxe-table--header-border-line{border-bottom-color:#d5d5d599}.iho-table .vxe-table--render-default .vxe-table--fixed-left-wrapper.scrolling--middle{box-shadow:7px 0 8px -3px rgba(0,0,0,.15)}.iho-table .vxe-table--render-default .vxe-table--fixed-right-wrapper.scrolling--middle{box-shadow:-7px 0 8px -3px rgba(0,0,0,.15)}.iho-table .
|
|
1
|
+
.iho-table__boldCell{font-weight:700}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar{background-color:transparent;height:10px;width:10px}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#f2f2f2;border:3px dashed transparent;border-radius:5px}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb:hover,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb:hover{background:#b2b2b2}.iho-table .vxe-table{transform:translateZ(0)}.iho-table .vxe-table .vxe-table--empty-content,.iho-table .vxe-table .vxe-table--empty-content>div{height:100%;width:100%}.iho-table .vxe-table .vxe-table--empty-content>div .no-data-tip{display:inline-flex}.iho-table .vxe-table .col--checkbox .vxe-cell,.iho-table .vxe-table .col--seq .vxe-cell{padding:0}.iho-table .vxe-table .col--checkbox .vxe-cell .vxe-checkbox--label,.iho-table .vxe-table .col--seq .vxe-cell .vxe-checkbox--label{padding-left:0}.iho-table .vxe-table .vxe-cell .vxe-tree-cell{height:100%}.iho-table .vxe-table .scan-multi-delete{color:#f06f64}.iho-table .vxe-table .vxe-table--header{background-color:#f2f2f2}.iho-table .vxe-table .vxe-table--header .vxe-header--column .vxe-cell--title{color:#35393c;height:100%;line-height:unset}.iho-table .vxe-table .vxe-table--header .vxe-header--column .vxe-cell--title .header-title-span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.iho-table .vxe-table .vxe-table--header .col--checkbox .vxe-cell--title,.iho-table .vxe-table .vxe-table--header .col--seq .vxe-cell--title{display:inline-block}.iho-table .vxe-table .vxe-table--body-wrapper::-webkit-scrollbar,.iho-table .vxe-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar{background-color:transparent;height:10px;width:10px}.iho-table .vxe-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb,.iho-table .vxe-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#f2f2f2;border:3px dashed transparent;border-radius:0}.iho-table .vxe-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb:hover,.iho-table .vxe-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb:hover{background:#b2b2b2}.iho-table .vxe-table .vxe-footer--row .vxe-footer--column>.vxe-cell .vxe-cell--item{height:30px;line-height:30px}.iho-table .vxe-table .vxe-cell--checkbox .vxe-checkbox--label{display:none}.iho-table .vxe-table--render-default .vxe-body--expanded-column,.iho-table .vxe-table--render-default .vxe-table--border-line{border-color:#d5d5d599}.iho-table .vxe-table--render-default .vxe-table--footer-wrapper{border-top-color:#d5d5d599}.iho-table .vxe-table--render-default.border--default .vxe-body--column,.iho-table .vxe-table--render-default.border--default .vxe-footer--column,.iho-table .vxe-table--render-default.border--default .vxe-header--column,.iho-table .vxe-table--render-default.border--inner .vxe-body--column,.iho-table .vxe-table--render-default.border--inner .vxe-footer--column,.iho-table .vxe-table--render-default.border--inner .vxe-header--column{background-image:linear-gradient(#d5d5d599,#d5d5d599)}.iho-table .vxe-table--render-default.border--full .vxe-body--column,.iho-table .vxe-table--render-default.border--full .vxe-footer--column,.iho-table .vxe-table--render-default.border--full .vxe-header--column{background-image:linear-gradient(#d5d5d599,#d5d5d599),linear-gradient(#d5d5d599,#d5d5d599)}.iho-table .vxe-table--render-default.border--full .vxe-table--fixed-left-wrapper .vxe-body--column{border-right-color:#d5d5d599}.iho-table .vxe-table--render-default.border--default .vxe-table--header-wrapper .vxe-header--row:last-child .vxe-header--gutter,.iho-table .vxe-table--render-default.border--full .vxe-table--header-wrapper .vxe-header--row:last-child .vxe-header--gutter,.iho-table .vxe-table--render-default.border--inner .vxe-table--header-wrapper .vxe-header--row:last-child .vxe-header--gutter,.iho-table .vxe-table--render-default.border--outer .vxe-table--header-wrapper .vxe-header--row:last-child .vxe-header--gutter{background-image:linear-gradient(#d5d5d599,#d5d5d599)}.iho-table .vxe-table--render-default.border--default .vxe-table--header-wrapper .vxe-table--header-border-line,.iho-table .vxe-table--render-default.border--full .vxe-table--header-wrapper .vxe-table--header-border-line,.iho-table .vxe-table--render-default.border--inner .vxe-table--header-wrapper .vxe-table--header-border-line,.iho-table .vxe-table--render-default.border--outer .vxe-table--header-wrapper .vxe-table--header-border-line{border-bottom-color:#d5d5d599}.iho-table .vxe-table--render-default .vxe-table--fixed-left-wrapper.scrolling--middle{box-shadow:7px 0 8px -3px rgba(0,0,0,.15)}.iho-table .vxe-table--render-default .vxe-table--fixed-right-wrapper.scrolling--middle{box-shadow:-7px 0 8px -3px rgba(0,0,0,.15)}.iho-table .icon-dot{background:var(--table-icon-color);box-shadow:0 2px 4px 0 var(--table-icon-shadow)}.iho-table .icon-dot,.iho-table .icon-dot-red{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-red{background:red;box-shadow:0 2px 4px 0 rgba(255,0,0,.5)}.iho-table .icon-dot-blue{background:blue;box-shadow:0 2px 4px 0 rgba(0,0,255,.5)}.iho-table .icon-dot-blue,.iho-table .icon-dot-green{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-green{background:green;box-shadow:0 2px 4px 0 rgba(0,128,0,.5)}.iho-table .icon-dot-gray{background:gray;box-shadow:0 2px 4px 0 hsla(0,0%,50%,.5)}.iho-table .icon-dot-gray,.iho-table .icon-dot-yellow{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-yellow{background:#ff0;box-shadow:0 2px 4px 0 rgba(255,255,0,.5)}.iho-table .icon-dot-resolved{background:#36be8c;box-shadow:0 2px 4px 0 rgba(54,190,140,.5)}.iho-table .icon-dot-huifu,.iho-table .icon-dot-resolved{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-huifu{background:#42d0f6;box-shadow:0 2px 4px 0 rgba(66,208,246,.5)}.iho-table .icon-dot-close{background:#718391;box-shadow:0 2px 4px 0 rgba(113,131,145,.5)}.iho-table .icon-dot-audit,.iho-table .icon-dot-close{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-audit{background:#f4ba32;box-shadow:0 2px 4px 0 rgba(244,186,50,.5)}.iho-table .icon-dot-design{background:#927ce1;box-shadow:0 2px 4px 0 rgba(146,124,225,.5)}.iho-table .icon-dot-design,.iho-table .icon-dot-develop{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-develop{background:#4eb0ef;box-shadow:0 2px 4px 0 rgba(78,176,239,.5)}.iho-table .icon-dot-develop-complete{background:#6381f9;border-radius:50%;box-shadow:0 2px 4px 0 rgba(99,129,249,.5);display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table__filterIcon{cursor:pointer;padding:0 4px}.iho-table__filterIcon:hover{opacity:.7}.iho-table__filterIcon.is-active{color:#5585f5}.iho-table__filterWrapper{display:flex;flex-direction:column;gap:8px;width:200px}.iho-table__filterButton{align-items:center;border-radius:4px;cursor:pointer;display:flex;height:30px;padding:0 8px}.iho-table__filterButton--active{color:#5585f5}.iho-table__filterButton:hover{background:rgba(0,0,0,.05)}.iho-table__filterListWrapper{border:1px solid rgba(0,0,0,.05)}.iho-table__filterListItem{align-items:center;border-radius:4px;display:flex;height:32px;padding:0 8px}.iho-table__filterListItem:hover{background:rgba(0,0,0,.05)}.iho-table__filterFooter{display:flex;justify-content:space-between}.iho-table{height:100%}.iho-table .vxe-header--column [annotation-hover-show=true]{visibility:hidden}.iho-table .vxe-header--column:hover [annotation-hover-show=true]{visibility:visible}.iho-table__headerWrapper{display:inline-flex}
|