mooho-base-admin-plus 2.2.13 → 2.2.14
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/history.md +1 -0
- package/package/mooho-base-admin-plus.min.esm.js +80 -69
- package/package/mooho-base-admin-plus.min.js +8 -8
- package/package.json +1 -1
- package/src/components/view/modal-table.vue +7 -0
- package/src/components/view/table-filter.vue +17 -4
- package/src/components/view/view-form-draggable.vue +3 -3
- package/src/components/view/view-form.vue +3 -3
- package/src/components/view/view-table.vue +18 -12
package/history.md
CHANGED
|
@@ -37128,7 +37128,7 @@ const _sfc_main$w = {
|
|
|
37128
37128
|
column.triggers = [];
|
|
37129
37129
|
});
|
|
37130
37130
|
this.columns.filter((column) => {
|
|
37131
|
-
return !column.isStaticItem && !!(column.source || "").trim() && !!(column.param || "").trim() && !column.dataType.startsWith("Enum:");
|
|
37131
|
+
return !column.isStaticItem && !!(column.source || "").trim() && !!(column.param || "").trim() && !(column.dataType && column.dataType.startsWith("Enum:"));
|
|
37132
37132
|
}).forEach((column) => {
|
|
37133
37133
|
let param = JSON.parse(column.param);
|
|
37134
37134
|
for (let key in param) {
|
|
@@ -37333,7 +37333,7 @@ const _sfc_main$w = {
|
|
|
37333
37333
|
}
|
|
37334
37334
|
if (sender == null || sender.triggers && sender.triggers !== []) {
|
|
37335
37335
|
this.columns.forEach(function(column) {
|
|
37336
|
-
if (!column.isStaticItem && !!(column.source || "").trim() && !column.dataType.startsWith("Enum:") && (sender == null || sender.triggers.some((item) => {
|
|
37336
|
+
if (!column.isStaticItem && !!(column.source || "").trim() && !(column.dataType && column.dataType.startsWith("Enum:")) && (sender == null || sender.triggers.some((item) => {
|
|
37337
37337
|
return item.code == column.code;
|
|
37338
37338
|
}))) {
|
|
37339
37339
|
column.needRefresh = true;
|
|
@@ -37352,7 +37352,7 @@ const _sfc_main$w = {
|
|
|
37352
37352
|
column.triggers.forEach((item) => {
|
|
37353
37353
|
item.needClear = true;
|
|
37354
37354
|
});
|
|
37355
|
-
} else if (column.needRefresh && !!(column.source || "").trim() && !column.dataType.startsWith("Enum:")) {
|
|
37355
|
+
} else if (column.needRefresh && !!(column.source || "").trim() && !(column.dataType && column.dataType.startsWith("Enum:"))) {
|
|
37356
37356
|
let param = this.getParam(this.data, column);
|
|
37357
37357
|
if (column.controlType === "Select" || column.controlType === "MultiSelect" || column.controlType === "TreeSelect" || column.controlType === "MultiTreeSelect" || column.controlType === "SelectWithOther" || column.controlType === "ComboSelect" || column.controlType === "Radio" || column.controlType === "CheckGroup") {
|
|
37358
37358
|
if (param != null) {
|
|
@@ -41404,7 +41404,9 @@ const _sfc_main$r = {
|
|
|
41404
41404
|
mixins: [mixin$1, mixinPage],
|
|
41405
41405
|
components: { DialogSelect },
|
|
41406
41406
|
data() {
|
|
41407
|
-
return {
|
|
41407
|
+
return {
|
|
41408
|
+
data: {}
|
|
41409
|
+
};
|
|
41408
41410
|
},
|
|
41409
41411
|
async created() {
|
|
41410
41412
|
this.init();
|
|
@@ -41413,7 +41415,7 @@ const _sfc_main$r = {
|
|
|
41413
41415
|
tableView: {
|
|
41414
41416
|
type: Object
|
|
41415
41417
|
},
|
|
41416
|
-
|
|
41418
|
+
filter: {
|
|
41417
41419
|
type: Object
|
|
41418
41420
|
},
|
|
41419
41421
|
columns: {
|
|
@@ -41429,6 +41431,10 @@ const _sfc_main$r = {
|
|
|
41429
41431
|
methods: {
|
|
41430
41432
|
init() {
|
|
41431
41433
|
let data2 = this.data;
|
|
41434
|
+
if (this.filter) {
|
|
41435
|
+
lodash$1.exports.defaultsDeep(data2, this.filter);
|
|
41436
|
+
lodash$1.exports.assign(this.filter, data2);
|
|
41437
|
+
}
|
|
41432
41438
|
this.columns.forEach((item) => {
|
|
41433
41439
|
if (item.defaultValue) {
|
|
41434
41440
|
if (item.defaultValue == "{today}") {
|
|
@@ -41452,6 +41458,7 @@ const _sfc_main$r = {
|
|
|
41452
41458
|
} else if (item.dataType === "Boolean" && item.defaultValue.toUpperCase == "FALSE") {
|
|
41453
41459
|
this.setFilterData(data2, item, false);
|
|
41454
41460
|
} else {
|
|
41461
|
+
console.log("this.setFilterData", data2, item, item.defaultValue);
|
|
41455
41462
|
this.setFilterData(data2, item, item.defaultValue);
|
|
41456
41463
|
}
|
|
41457
41464
|
}
|
|
@@ -41518,7 +41525,7 @@ const _sfc_main$r = {
|
|
|
41518
41525
|
column.triggers = [];
|
|
41519
41526
|
});
|
|
41520
41527
|
this.columns.filter((column) => {
|
|
41521
|
-
return !column.isStaticItem && !!(column.source || "").trim() && !!(column.param || "").trim() && !column.dataType.startsWith("Enum:");
|
|
41528
|
+
return !column.isStaticItem && !!(column.source || "").trim() && !!(column.param || "").trim() && !(column.dataType && column.dataType.startsWith("Enum:"));
|
|
41522
41529
|
}).forEach((column) => {
|
|
41523
41530
|
let param = JSON.parse(column.param);
|
|
41524
41531
|
for (let key in param) {
|
|
@@ -41589,6 +41596,7 @@ const _sfc_main$r = {
|
|
|
41589
41596
|
}
|
|
41590
41597
|
},
|
|
41591
41598
|
onSelectDataChange(sender, selected) {
|
|
41599
|
+
console.log("onSelectDataChange", sender, selected);
|
|
41592
41600
|
let code2;
|
|
41593
41601
|
if (sender.code.endsWith("ID")) {
|
|
41594
41602
|
code2 = sender.code.substr(0, sender.code.length - 2);
|
|
@@ -41635,7 +41643,7 @@ const _sfc_main$r = {
|
|
|
41635
41643
|
});
|
|
41636
41644
|
if (sender == null || sender.triggers !== []) {
|
|
41637
41645
|
this.columns.forEach(function(column) {
|
|
41638
|
-
if (!column.isStaticItem && !!(column.source || "").trim() && !column.dataType.startsWith("Enum:") && (sender == null || sender.triggers.some((item) => {
|
|
41646
|
+
if (!column.isStaticItem && !!(column.source || "").trim() && !(column.dataType && column.dataType.startsWith("Enum:")) && (sender == null || sender.triggers.some((item) => {
|
|
41639
41647
|
return item.id === column.id;
|
|
41640
41648
|
}))) {
|
|
41641
41649
|
column.needRefresh = true;
|
|
@@ -41816,18 +41824,18 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
41816
41824
|
column.controlType === "Custom" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
41817
41825
|
createCommentVNode("\r\n @slot \u81EA\u5B9A\u4E49\u5217\r\n @binding {object} filter \u6570\u636E\u5BF9\u8C61\r\n @binding {object} column \u5217\u5BF9\u8C61\r\n @binding {string} code \u5217\u4EE3\u7801\r\n "),
|
|
41818
41826
|
renderSlot(_ctx.$slots, "column", {
|
|
41819
|
-
filter: $
|
|
41827
|
+
filter: $data.data,
|
|
41820
41828
|
column,
|
|
41821
41829
|
code: column.code
|
|
41822
41830
|
})
|
|
41823
41831
|
], 64)) : column.controlType === "Label" ? (openBlock(), createElementBlock("div", _hoisted_2$f, [
|
|
41824
|
-
createElementVNode("div", null, toDisplayString$1(_ctx.showData($
|
|
41832
|
+
createElementVNode("div", null, toDisplayString$1(_ctx.showData($data.data, column)), 1)
|
|
41825
41833
|
])) : column.controlType === "TextInput" ? (openBlock(), createBlock(_component_Input, {
|
|
41826
41834
|
key: 2,
|
|
41827
41835
|
size: "small",
|
|
41828
41836
|
type: "text",
|
|
41829
|
-
"model-value": $options.parseFilterData($
|
|
41830
|
-
"onUpdate:modelValue": ($event) => $options.setFilterData($
|
|
41837
|
+
"model-value": $options.parseFilterData($data.data, column),
|
|
41838
|
+
"onUpdate:modelValue": ($event) => $options.setFilterData($data.data, column, $event),
|
|
41831
41839
|
onOnKeyup: _cache[0] || (_cache[0] = ($event) => $options.onKeyup($event)),
|
|
41832
41840
|
style: normalizeStyle$1({ width: column.controlWidth == null ? null : column.controlWidth + "px" }),
|
|
41833
41841
|
placeholder: column.description
|
|
@@ -41836,16 +41844,16 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
41836
41844
|
size: "small",
|
|
41837
41845
|
type: "number",
|
|
41838
41846
|
number: "",
|
|
41839
|
-
"model-value": $options.parseFilterData($
|
|
41840
|
-
"onUpdate:modelValue": ($event) => $options.setFilterData($
|
|
41847
|
+
"model-value": $options.parseFilterData($data.data, column),
|
|
41848
|
+
"onUpdate:modelValue": ($event) => $options.setFilterData($data.data, column, $event),
|
|
41841
41849
|
onOnKeyup: _cache[1] || (_cache[1] = ($event) => $options.onKeyup($event)),
|
|
41842
41850
|
style: normalizeStyle$1({ width: column.controlWidth == null ? "100px" : column.controlWidth + "px" }),
|
|
41843
41851
|
placeholder: column.description
|
|
41844
41852
|
}, null, 8, ["model-value", "onUpdate:modelValue", "style", "placeholder"])) : column.controlType === "Select" ? (openBlock(), createBlock(_component_Select, {
|
|
41845
41853
|
key: 4,
|
|
41846
41854
|
size: "small",
|
|
41847
|
-
"model-value": $options.parseFilterData($
|
|
41848
|
-
"onUpdate:modelValue": ($event) => $options.setFilterData($
|
|
41855
|
+
"model-value": $options.parseFilterData($data.data, column),
|
|
41856
|
+
"onUpdate:modelValue": ($event) => $options.setFilterData($data.data, column, $event),
|
|
41849
41857
|
clearable: "",
|
|
41850
41858
|
style: normalizeStyle$1({ width: column.controlWidth == null ? null : column.controlWidth + "px" }),
|
|
41851
41859
|
placeholder: column.description,
|
|
@@ -41853,7 +41861,7 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
41853
41861
|
onOnChange: (selected) => $options.onSelectDataChange(column, selected)
|
|
41854
41862
|
}, {
|
|
41855
41863
|
default: withCtx(() => [
|
|
41856
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList($options.getDataSource($
|
|
41864
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($options.getDataSource($data.data, column), (item) => {
|
|
41857
41865
|
return openBlock(), createBlock(_component_Option, {
|
|
41858
41866
|
key: item.id,
|
|
41859
41867
|
value: item.id
|
|
@@ -41869,17 +41877,17 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
41869
41877
|
}, 1032, ["model-value", "onUpdate:modelValue", "style", "placeholder", "onOnChange"])) : column.controlType === "MultiSelect" ? (openBlock(), createBlock(_component_Select, {
|
|
41870
41878
|
key: 5,
|
|
41871
41879
|
size: "small",
|
|
41872
|
-
"model-value": $options.parseArrayFilterData($
|
|
41880
|
+
"model-value": $options.parseArrayFilterData($data.data, column),
|
|
41873
41881
|
multiple: true,
|
|
41874
41882
|
clearable: "",
|
|
41875
|
-
"onUpdate:modelValue": ($event) => $options.setArrayFilterData($
|
|
41883
|
+
"onUpdate:modelValue": ($event) => $options.setArrayFilterData($data.data, column, $event),
|
|
41876
41884
|
style: normalizeStyle$1({ width: column.controlWidth == null ? null : column.controlWidth + "px" }),
|
|
41877
41885
|
placeholder: column.description,
|
|
41878
41886
|
transfer: true,
|
|
41879
41887
|
onOnChange: (selected) => $options.onSelectDataChange(column, selected)
|
|
41880
41888
|
}, {
|
|
41881
41889
|
default: withCtx(() => [
|
|
41882
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList($options.getDataSource($
|
|
41890
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($options.getDataSource($data.data, column), (item) => {
|
|
41883
41891
|
return openBlock(), createBlock(_component_Option, {
|
|
41884
41892
|
key: item.id,
|
|
41885
41893
|
value: item.id
|
|
@@ -41895,9 +41903,9 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
41895
41903
|
}, 1032, ["model-value", "onUpdate:modelValue", "style", "placeholder", "onOnChange"])) : column.controlType === "TreeSelect" ? (openBlock(), createBlock(_component_TreeSelect, {
|
|
41896
41904
|
key: 6,
|
|
41897
41905
|
size: "small",
|
|
41898
|
-
"model-value": $options.parseTreeFilterData($
|
|
41899
|
-
"onUpdate:modelValue": ($event) => $options.setFilterData($
|
|
41900
|
-
data: $options.getDataSource($
|
|
41906
|
+
"model-value": $options.parseTreeFilterData($data.data, column),
|
|
41907
|
+
"onUpdate:modelValue": ($event) => $options.setFilterData($data.data, column, $event),
|
|
41908
|
+
data: $options.getDataSource($data.data, column),
|
|
41901
41909
|
clearable: true,
|
|
41902
41910
|
style: normalizeStyle$1({ width: column.controlWidth == null ? null : column.controlWidth + "px" }),
|
|
41903
41911
|
placeholder: column.description,
|
|
@@ -41906,9 +41914,9 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
41906
41914
|
}, null, 8, ["model-value", "onUpdate:modelValue", "data", "style", "placeholder", "onOnChange"])) : column.controlType === "MultiTreeSelect" ? (openBlock(), createBlock(_component_TreeSelect, {
|
|
41907
41915
|
key: 7,
|
|
41908
41916
|
size: "small",
|
|
41909
|
-
"model-value": $options.parseArrayFilterData($
|
|
41910
|
-
"onUpdate:modelValue": ($event) => $options.setArrayFilterData($
|
|
41911
|
-
data: $options.getDataSource($
|
|
41917
|
+
"model-value": $options.parseArrayFilterData($data.data, column),
|
|
41918
|
+
"onUpdate:modelValue": ($event) => $options.setArrayFilterData($data.data, column, $event),
|
|
41919
|
+
data: $options.getDataSource($data.data, column),
|
|
41912
41920
|
multiple: true,
|
|
41913
41921
|
"show-checkbox": true,
|
|
41914
41922
|
clearable: true,
|
|
@@ -41919,8 +41927,8 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
41919
41927
|
}, null, 8, ["model-value", "onUpdate:modelValue", "data", "style", "placeholder", "onOnChange"])) : column.controlType === "SelectWithOther" ? (openBlock(), createElementBlock(Fragment, { key: 8 }, [
|
|
41920
41928
|
createVNode$1(_component_Select, {
|
|
41921
41929
|
size: "small",
|
|
41922
|
-
"model-value": $options.parseFilterDataWithOther($
|
|
41923
|
-
"onUpdate:modelValue": ($event) => $options.setFilterDataWithOther($
|
|
41930
|
+
"model-value": $options.parseFilterDataWithOther($data.data, column),
|
|
41931
|
+
"onUpdate:modelValue": ($event) => $options.setFilterDataWithOther($data.data, column, $event),
|
|
41924
41932
|
clearable: "",
|
|
41925
41933
|
style: normalizeStyle$1({ width: column.controlWidth == null ? "40%" : column.controlWidth + "px" }),
|
|
41926
41934
|
placeholder: column.description,
|
|
@@ -41928,7 +41936,7 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
41928
41936
|
onOnChange: (selected) => $options.onSelectDataChange(column, selected)
|
|
41929
41937
|
}, {
|
|
41930
41938
|
default: withCtx(() => [
|
|
41931
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList($options.getDataSource($
|
|
41939
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($options.getDataSource($data.data, column), (item) => {
|
|
41932
41940
|
return openBlock(), createBlock(_component_Option, {
|
|
41933
41941
|
key: item.id,
|
|
41934
41942
|
value: item.id
|
|
@@ -41954,20 +41962,20 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
41954
41962
|
withDirectives(createVNode$1(_component_Input, {
|
|
41955
41963
|
type: "text",
|
|
41956
41964
|
size: "small",
|
|
41957
|
-
"model-value": $options.parseFilterData($
|
|
41958
|
-
"onUpdate:modelValue": ($event) => $options.setFilterData($
|
|
41965
|
+
"model-value": $options.parseFilterData($data.data, column),
|
|
41966
|
+
"onUpdate:modelValue": ($event) => $options.setFilterData($data.data, column, $event),
|
|
41959
41967
|
style: normalizeStyle$1([{ width: column.controlWidth == null ? "40%" : column.controlWidth + "px" }, { "margin-left": "4px" }]),
|
|
41960
41968
|
maxlength: column.maxLength,
|
|
41961
41969
|
placeholder: column.description,
|
|
41962
41970
|
onOnChange: ($event) => $options.onDataChange(column)
|
|
41963
41971
|
}, null, 8, ["model-value", "onUpdate:modelValue", "style", "maxlength", "placeholder", "onOnChange"]), [
|
|
41964
|
-
[vShow, $options.parseFilterDataWithOther($
|
|
41972
|
+
[vShow, $options.parseFilterDataWithOther($data.data, column) == "__Other"]
|
|
41965
41973
|
])
|
|
41966
41974
|
], 64)) : column.controlType === "ComboSelect" ? (openBlock(), createBlock(_component_Select, {
|
|
41967
41975
|
key: 9,
|
|
41968
41976
|
size: "small",
|
|
41969
|
-
"model-value": $options.parseFilterData($
|
|
41970
|
-
"onUpdate:modelValue": ($event) => $options.setFilterData($
|
|
41977
|
+
"model-value": $options.parseFilterData($data.data, column),
|
|
41978
|
+
"onUpdate:modelValue": ($event) => $options.setFilterData($data.data, column, $event),
|
|
41971
41979
|
clearable: "",
|
|
41972
41980
|
filterable: "",
|
|
41973
41981
|
style: normalizeStyle$1({ width: column.controlWidth == null ? null : column.controlWidth + "px" }),
|
|
@@ -41976,7 +41984,7 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
41976
41984
|
onOnChange: (selected) => $options.onSelectDataChange(column, selected)
|
|
41977
41985
|
}, {
|
|
41978
41986
|
default: withCtx(() => [
|
|
41979
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList($options.getDataSource($
|
|
41987
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($options.getDataSource($data.data, column), (item) => {
|
|
41980
41988
|
return openBlock(), createBlock(_component_Option, {
|
|
41981
41989
|
key: item.id,
|
|
41982
41990
|
value: item.id
|
|
@@ -41992,32 +42000,32 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
41992
42000
|
}, 1032, ["model-value", "onUpdate:modelValue", "style", "placeholder", "onOnChange"])) : column.controlType === "DialogSelect" ? (openBlock(), createBlock(_component_dialog_select, {
|
|
41993
42001
|
key: 10,
|
|
41994
42002
|
size: "small",
|
|
41995
|
-
"model-value": $options.parseFilterData($
|
|
41996
|
-
"onUpdate:modelValue": ($event) => $options.setFilterData($
|
|
42003
|
+
"model-value": $options.parseFilterData($data.data, column),
|
|
42004
|
+
"onUpdate:modelValue": ($event) => $options.setFilterData($data.data, column, $event),
|
|
41997
42005
|
source: column.source,
|
|
41998
42006
|
"source-data-code": column.sourceDataCode,
|
|
41999
42007
|
"source-display-code": column.sourceDisplayCode,
|
|
42000
|
-
param: _ctx.getParam($
|
|
42008
|
+
param: _ctx.getParam($data.data, column),
|
|
42001
42009
|
controlWidth: column.controlWidth,
|
|
42002
42010
|
onOnChange: (selected) => $options.onSelectDataChange(column, selected)
|
|
42003
42011
|
}, null, 8, ["model-value", "onUpdate:modelValue", "source", "source-data-code", "source-display-code", "param", "controlWidth", "onOnChange"])) : column.controlType === "Date" || column.controlType === "DateTime" || column.controlType === "Year" || column.controlType === "Month" || column.controlType === "DateRange" ? (openBlock(), createBlock(_component_DatePicker, {
|
|
42004
42012
|
key: 11,
|
|
42005
42013
|
size: "small",
|
|
42006
42014
|
type: column.controlType.toLowerCase(),
|
|
42007
|
-
"model-value": $options.parseFilterData($
|
|
42015
|
+
"model-value": $options.parseFilterData($data.data, column),
|
|
42008
42016
|
placeholder: column.description,
|
|
42009
42017
|
transfer: true,
|
|
42010
42018
|
style: normalizeStyle$1({ width: column.controlWidth == null ? null : column.controlWidth + "px" }),
|
|
42011
42019
|
onOnChange: (time2) => {
|
|
42012
|
-
$options.setFilterData($
|
|
42020
|
+
$options.setFilterData($data.data, column, time2);
|
|
42013
42021
|
$options.onDataChange(column);
|
|
42014
42022
|
}
|
|
42015
42023
|
}, null, 8, ["type", "model-value", "placeholder", "style", "onOnChange"])) : column.controlType === "Time" ? (openBlock(), createBlock(_component_TimePicker, {
|
|
42016
42024
|
key: 12,
|
|
42017
42025
|
size: "small",
|
|
42018
42026
|
type: "time",
|
|
42019
|
-
"model-value": $options.parseFilterData($
|
|
42020
|
-
"onUpdate:modelValue": ($event) => $options.setFilterData($
|
|
42027
|
+
"model-value": $options.parseFilterData($data.data, column),
|
|
42028
|
+
"onUpdate:modelValue": ($event) => $options.setFilterData($data.data, column, $event),
|
|
42021
42029
|
placeholder: column.description,
|
|
42022
42030
|
transfer: true,
|
|
42023
42031
|
style: normalizeStyle$1({ width: column.controlWidth == null ? null : column.controlWidth + "px" }),
|
|
@@ -42026,26 +42034,26 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
42026
42034
|
key: 13,
|
|
42027
42035
|
size: "small",
|
|
42028
42036
|
style: { "line-height": "26px" },
|
|
42029
|
-
"model-value": !!$options.parseFilterData($
|
|
42030
|
-
"onUpdate:modelValue": ($event) => $options.setFilterData($
|
|
42037
|
+
"model-value": !!$options.parseFilterData($data.data, column),
|
|
42038
|
+
"onUpdate:modelValue": ($event) => $options.setFilterData($data.data, column, $event),
|
|
42031
42039
|
onOnChange: ($event) => $options.onDataChange(column)
|
|
42032
42040
|
}, null, 8, ["model-value", "onUpdate:modelValue", "onOnChange"])) : column.controlType === "Switch" ? (openBlock(), createElementBlock("div", _hoisted_3$d, [
|
|
42033
42041
|
createVNode$1(_component_Switch, {
|
|
42034
42042
|
size: "small",
|
|
42035
|
-
"model-value": !!$options.parseFilterData($
|
|
42036
|
-
"onUpdate:modelValue": ($event) => $options.setFilterData($
|
|
42043
|
+
"model-value": !!$options.parseFilterData($data.data, column),
|
|
42044
|
+
"onUpdate:modelValue": ($event) => $options.setFilterData($data.data, column, $event),
|
|
42037
42045
|
onOnChange: ($event) => $options.onDataChange(column)
|
|
42038
42046
|
}, null, 8, ["model-value", "onUpdate:modelValue", "onOnChange"])
|
|
42039
42047
|
])) : column.controlType === "Radio" ? (openBlock(), createBlock(_component_RadioGroup, {
|
|
42040
42048
|
key: 15,
|
|
42041
42049
|
size: "small",
|
|
42042
42050
|
style: { "line-height": "22px" },
|
|
42043
|
-
"model-value": $options.parseFilterData($
|
|
42044
|
-
"onUpdate:modelValue": ($event) => $options.setFilterData($
|
|
42051
|
+
"model-value": $options.parseFilterData($data.data, column),
|
|
42052
|
+
"onUpdate:modelValue": ($event) => $options.setFilterData($data.data, column, $event),
|
|
42045
42053
|
onOnChange: (selected) => $options.onSelectDataChange(column, selected)
|
|
42046
42054
|
}, {
|
|
42047
42055
|
default: withCtx(() => [
|
|
42048
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList($options.getDataSource($
|
|
42056
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($options.getDataSource($data.data, column), (item) => {
|
|
42049
42057
|
return openBlock(), createBlock(_component_Radio, {
|
|
42050
42058
|
key: item.id,
|
|
42051
42059
|
label: item.id
|
|
@@ -42076,8 +42084,8 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
42076
42084
|
}, {
|
|
42077
42085
|
default: withCtx(() => [
|
|
42078
42086
|
withDirectives(createVNode$1(_component_Input, {
|
|
42079
|
-
modelValue: $
|
|
42080
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $
|
|
42087
|
+
modelValue: $data.data.keyword,
|
|
42088
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.data.keyword = $event),
|
|
42081
42089
|
onOnKeyup: _cache[3] || (_cache[3] = ($event) => $options.onKeyup($event)),
|
|
42082
42090
|
size: "small"
|
|
42083
42091
|
}, null, 8, ["modelValue"]), [
|
|
@@ -42307,6 +42315,9 @@ const _sfc_main$q = {
|
|
|
42307
42315
|
} else {
|
|
42308
42316
|
return this.height;
|
|
42309
42317
|
}
|
|
42318
|
+
},
|
|
42319
|
+
filterData() {
|
|
42320
|
+
return this.$refs.tableFilter.data;
|
|
42310
42321
|
}
|
|
42311
42322
|
},
|
|
42312
42323
|
watch: {},
|
|
@@ -42701,8 +42712,8 @@ const _sfc_main$q = {
|
|
|
42701
42712
|
return data2;
|
|
42702
42713
|
},
|
|
42703
42714
|
resetFilter() {
|
|
42704
|
-
for (let key in this.
|
|
42705
|
-
delete this.
|
|
42715
|
+
for (let key in this.filterData) {
|
|
42716
|
+
delete this.filterData[key];
|
|
42706
42717
|
}
|
|
42707
42718
|
},
|
|
42708
42719
|
search() {
|
|
@@ -42843,7 +42854,7 @@ const _sfc_main$q = {
|
|
|
42843
42854
|
}
|
|
42844
42855
|
});
|
|
42845
42856
|
} else {
|
|
42846
|
-
if (!!(column.source || "").trim() && !column.dataType.startsWith("Enum:")) {
|
|
42857
|
+
if (!!(column.source || "").trim() && !(column.dataType && column.dataType.startsWith("Enum:"))) {
|
|
42847
42858
|
this.data.forEach((row) => {
|
|
42848
42859
|
if (row._dataSource && row._dataSource[column.code]) {
|
|
42849
42860
|
return;
|
|
@@ -42863,7 +42874,7 @@ const _sfc_main$q = {
|
|
|
42863
42874
|
column.triggers = [];
|
|
42864
42875
|
});
|
|
42865
42876
|
this.columns.filter((column) => {
|
|
42866
|
-
return !column.isStaticItem && !!(column.source || "").trim() && !!(column.param || "").trim() && !column.dataType.startsWith("Enum:");
|
|
42877
|
+
return !column.isStaticItem && !!(column.source || "").trim() && !!(column.param || "").trim() && !(column.dataType && column.dataType.startsWith("Enum:"));
|
|
42867
42878
|
}).forEach((column) => {
|
|
42868
42879
|
let param = JSON.parse(column.param);
|
|
42869
42880
|
for (let key in param) {
|
|
@@ -42997,7 +43008,7 @@ const _sfc_main$q = {
|
|
|
42997
43008
|
this.$emit("on-change", data2, sender, selected);
|
|
42998
43009
|
if (sender == null || sender.triggers !== []) {
|
|
42999
43010
|
this.columns.forEach(function(column) {
|
|
43000
|
-
if (!column.isStaticItem && !!(column.source || "").trim() && !column.dataType.startsWith("Enum:") && (sender == null || sender.triggers.some((item) => {
|
|
43011
|
+
if (!column.isStaticItem && !!(column.source || "").trim() && !(column.dataType && column.dataType.startsWith("Enum:")) && (sender == null || sender.triggers.some((item) => {
|
|
43001
43012
|
return item.code == column.code;
|
|
43002
43013
|
}))) {
|
|
43003
43014
|
if (data2._needRefresh) {
|
|
@@ -43018,7 +43029,7 @@ const _sfc_main$q = {
|
|
|
43018
43029
|
column.triggers.forEach((item) => {
|
|
43019
43030
|
data2._needClear[item.code] = true;
|
|
43020
43031
|
});
|
|
43021
|
-
} else if (data2._needRefresh[column.code] && !!(column.source || "").trim() && !column.dataType.startsWith("Enum:")) {
|
|
43032
|
+
} else if (data2._needRefresh[column.code] && !!(column.source || "").trim() && !(column.dataType && column.dataType.startsWith("Enum:"))) {
|
|
43022
43033
|
let param = this.getParam(data2, column, this.parentData);
|
|
43023
43034
|
if (column.controlType === "Select" || column.controlType === "SelectWithOther" || column.controlType === "ComboSelect" || column.controlType === "MulitSelect" || column.controlType === "Radio" || column.controlType === "CheckGroup") {
|
|
43024
43035
|
if (param != null) {
|
|
@@ -43104,9 +43115,10 @@ const _sfc_main$q = {
|
|
|
43104
43115
|
this.search();
|
|
43105
43116
|
},
|
|
43106
43117
|
getAllFilter() {
|
|
43118
|
+
console.log("getAllFilter");
|
|
43107
43119
|
let filter2 = {
|
|
43108
43120
|
...this.viewFilter,
|
|
43109
|
-
...this.
|
|
43121
|
+
...this.filterData
|
|
43110
43122
|
};
|
|
43111
43123
|
for (let key in filter2) {
|
|
43112
43124
|
if (typeof filter2[key] == "object" && !(filter2[key] instanceof Date)) {
|
|
@@ -43118,7 +43130,7 @@ const _sfc_main$q = {
|
|
|
43118
43130
|
getFilterResult() {
|
|
43119
43131
|
let data2 = this.staticData;
|
|
43120
43132
|
if (!this.filterDisable) {
|
|
43121
|
-
let filter2 = this.
|
|
43133
|
+
let filter2 = this.filterData;
|
|
43122
43134
|
for (let key in filter2) {
|
|
43123
43135
|
let column = key;
|
|
43124
43136
|
let value = filter2[key];
|
|
@@ -43572,29 +43584,25 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
43572
43584
|
}, {
|
|
43573
43585
|
default: withCtx(() => [
|
|
43574
43586
|
createCommentVNode("\r\n @slot \u7B5B\u9009\u680F\r\n @binding {object} table \u8868\u683C\u5BF9\u8C61\r\n @binding {object} filter \u7B5B\u9009\u5BF9\u8C61\r\n "),
|
|
43575
|
-
renderSlot(_ctx.$slots, "filter", {
|
|
43576
|
-
table: this,
|
|
43577
|
-
filter: $props.filter
|
|
43578
|
-
}, () => [
|
|
43587
|
+
renderSlot(_ctx.$slots, "filter", { table: this }, () => [
|
|
43579
43588
|
createCommentVNode("\r\n @slot \u81EA\u5B9A\u4E49\u7B5B\u9009\u680F\r\n "),
|
|
43580
43589
|
renderSlot(_ctx.$slots, "customFilter", {}, void 0, true),
|
|
43581
43590
|
createVNode$1(_component_table_filter, {
|
|
43582
43591
|
ref: "tableFilter",
|
|
43583
|
-
|
|
43592
|
+
filter: $props.filter,
|
|
43584
43593
|
columns: $data.filterColumns,
|
|
43585
43594
|
"table-view": $data.tableView,
|
|
43586
43595
|
onOnKeyup: $options.onKeyup
|
|
43587
43596
|
}, {
|
|
43588
|
-
column: withCtx(({
|
|
43597
|
+
column: withCtx(({ column }) => [
|
|
43589
43598
|
createCommentVNode("\r\n @slot \u7B5B\u9009\u680F\u81EA\u5B9A\u4E49\u5217\r\n @binding {object} filter \u7B5B\u9009\u6761\u4EF6\u5BF9\u8C61\r\n @binding {object} column \u5217\u5BF9\u8C61\r\n @binding {string} code \u5217\u4EE3\u7801\r\n "),
|
|
43590
43599
|
renderSlot(_ctx.$slots, "filterColumn", {
|
|
43591
|
-
filter: filter2,
|
|
43592
43600
|
column,
|
|
43593
43601
|
code: column.code
|
|
43594
43602
|
}, void 0, true)
|
|
43595
43603
|
]),
|
|
43596
43604
|
_: 3
|
|
43597
|
-
}, 8, ["
|
|
43605
|
+
}, 8, ["filter", "columns", "table-view", "onOnKeyup"]),
|
|
43598
43606
|
createVNode$1(_component_Col, mergeProps(_ctx.getGrid($data.tableView.filterWidth), {
|
|
43599
43607
|
style: { "text-align": $data.tableView.filterAlign == null ? "left" : $data.tableView.filterAlign.toLowerCase() }
|
|
43600
43608
|
}), {
|
|
@@ -51134,7 +51142,7 @@ const _sfc_main$o = {
|
|
|
51134
51142
|
column.triggers = [];
|
|
51135
51143
|
});
|
|
51136
51144
|
this.columns.filter((column) => {
|
|
51137
|
-
return !!(column.source || "").trim() && !!(column.param || "").trim() && !column.dataType.startsWith("Enum:");
|
|
51145
|
+
return !!(column.source || "").trim() && !!(column.param || "").trim() && !(column.dataType && column.dataType.startsWith("Enum:"));
|
|
51138
51146
|
}).forEach((column) => {
|
|
51139
51147
|
let param = JSON.parse(column.param);
|
|
51140
51148
|
for (let key in param) {
|
|
@@ -51223,7 +51231,7 @@ const _sfc_main$o = {
|
|
|
51223
51231
|
async onDataChange(sender) {
|
|
51224
51232
|
if (sender == null || sender.triggers !== []) {
|
|
51225
51233
|
this.columns.forEach(function(column) {
|
|
51226
|
-
if (!!(column.source || "").trim() && !column.dataType.startsWith("Enum:") && (sender == null || sender.triggers.some((item) => {
|
|
51234
|
+
if (!!(column.source || "").trim() && !(column.dataType && column.dataType.startsWith("Enum:")) && (sender == null || sender.triggers.some((item) => {
|
|
51227
51235
|
return item.id === column.id;
|
|
51228
51236
|
}))) {
|
|
51229
51237
|
column.needRefresh = true;
|
|
@@ -51242,7 +51250,7 @@ const _sfc_main$o = {
|
|
|
51242
51250
|
column.triggers.forEach((item) => {
|
|
51243
51251
|
item.needClear = true;
|
|
51244
51252
|
});
|
|
51245
|
-
} else if (column.needRefresh && !!(column.source || "").trim() && !column.dataType.startsWith("Enum:")) {
|
|
51253
|
+
} else if (column.needRefresh && !!(column.source || "").trim() && !(column.dataType && column.dataType.startsWith("Enum:"))) {
|
|
51246
51254
|
let param = this.getParam(this.data, column);
|
|
51247
51255
|
if (column.controlType === "Select" || column.controlType === "MultiSelect" || column.controlType === "TreeSelect" || column.controlType === "MultiTreeSelect" || column.controlType === "SelectWithOther" || column.controlType === "ComboSelect" || column.controlType === "Radio" || column.controlType === "CheckGroup") {
|
|
51248
51256
|
if (param != null) {
|
|
@@ -52899,6 +52907,9 @@ const _sfc_main$l = {
|
|
|
52899
52907
|
table() {
|
|
52900
52908
|
return this.$refs.table;
|
|
52901
52909
|
},
|
|
52910
|
+
filterData() {
|
|
52911
|
+
return this.$refs.tableFilter.data;
|
|
52912
|
+
},
|
|
52902
52913
|
screenWidth() {
|
|
52903
52914
|
return document.body.clientWidth * 0.8;
|
|
52904
52915
|
}
|