@airpower/web 0.3.0 → 0.3.2
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/dist/main.js
CHANGED
|
@@ -541,7 +541,7 @@ var zhCn = {
|
|
|
541
541
|
close: "关闭此对话框"
|
|
542
542
|
},
|
|
543
543
|
upload: {
|
|
544
|
-
deleteTip: "按
|
|
544
|
+
deleteTip: "按 Delete 键可删除",
|
|
545
545
|
delete: "删除",
|
|
546
546
|
preview: "查看图片",
|
|
547
547
|
continue: "继续上传"
|
|
@@ -2184,7 +2184,7 @@ class WebI18n extends I18n {
|
|
|
2184
2184
|
__publicField(this, "InvalidIntegerNumber", "请输入正确的整数");
|
|
2185
2185
|
__publicField(this, "InvalidNaturalNumber", "只允许输入非负数字");
|
|
2186
2186
|
__publicField(this, "InvalidMobilePhone", "请输入正确的手机号");
|
|
2187
|
-
__publicField(this, "
|
|
2187
|
+
__publicField(this, "ConfirmToComplete", "请确认填写完整");
|
|
2188
2188
|
__publicField(this, "InvalidContain", "不允许输入中包含");
|
|
2189
2189
|
__publicField(this, "Import", "导入");
|
|
2190
2190
|
__publicField(this, "ImportSuccess", "数据导入成功");
|
|
@@ -9870,7 +9870,7 @@ const _hoisted_5$6 = {
|
|
|
9870
9870
|
class: "footer"
|
|
9871
9871
|
};
|
|
9872
9872
|
const _hoisted_6$4 = { class: "status" };
|
|
9873
|
-
const _hoisted_7$
|
|
9873
|
+
const _hoisted_7$2 = {
|
|
9874
9874
|
key: 0,
|
|
9875
9875
|
class: "control"
|
|
9876
9876
|
};
|
|
@@ -10209,7 +10209,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
10209
10209
|
createElementVNode("div", _hoisted_6$4, [
|
|
10210
10210
|
renderSlot(_ctx.$slots, "status", {}, void 0, true)
|
|
10211
10211
|
]),
|
|
10212
|
-
!__props.hideButtons ? (openBlock(), createElementBlock("div", _hoisted_7$
|
|
10212
|
+
!__props.hideButtons ? (openBlock(), createElementBlock("div", _hoisted_7$2, [
|
|
10213
10213
|
renderSlot(_ctx.$slots, "leftCtrl", {}, void 0, true),
|
|
10214
10214
|
!__props.hideConfirm ? (openBlock(), createBlock(unref(_sfc_main$v), {
|
|
10215
10215
|
key: 0,
|
|
@@ -14415,7 +14415,7 @@ const _hoisted_3$6 = { class: "web-page-panel-box" };
|
|
|
14415
14415
|
const _hoisted_4$4 = { class: "web-page-header" };
|
|
14416
14416
|
const _hoisted_5$3 = { class: "web-page-title" };
|
|
14417
14417
|
const _hoisted_6$2 = { class: "web-page-goto" };
|
|
14418
|
-
const _hoisted_7$
|
|
14418
|
+
const _hoisted_7$1 = { class: "web-page-jumper" };
|
|
14419
14419
|
const _hoisted_8$1 = {
|
|
14420
14420
|
key: 1,
|
|
14421
14421
|
class: "web-page-total"
|
|
@@ -14575,7 +14575,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
14575
14575
|
}, 1032, ["disabled", "style", "type", "onClick"]);
|
|
14576
14576
|
}), 128))
|
|
14577
14577
|
]),
|
|
14578
|
-
createElementVNode("div", _hoisted_7$
|
|
14578
|
+
createElementVNode("div", _hoisted_7$1, [
|
|
14579
14579
|
createVNode(unref(ElInput), {
|
|
14580
14580
|
modelValue: currentPage.value,
|
|
14581
14581
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => currentPage.value = $event),
|
|
@@ -14626,12 +14626,6 @@ const _hoisted_4$3 = {
|
|
|
14626
14626
|
};
|
|
14627
14627
|
const _hoisted_5$2 = { class: "panel-right" };
|
|
14628
14628
|
const _hoisted_6$1 = { class: "panel-body" };
|
|
14629
|
-
const _hoisted_7$1 = {
|
|
14630
|
-
key: 1,
|
|
14631
|
-
class: "panel-footer"
|
|
14632
|
-
};
|
|
14633
|
-
const _hoisted_8 = { class: "panel-footer-left" };
|
|
14634
|
-
const _hoisted_9 = { class: "panel-footer-right" };
|
|
14635
14629
|
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
14636
14630
|
__name: "Panel",
|
|
14637
14631
|
props: {
|
|
@@ -14657,13 +14651,6 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
14657
14651
|
type: Boolean,
|
|
14658
14652
|
default: true
|
|
14659
14653
|
},
|
|
14660
|
-
/**
|
|
14661
|
-
* # 是否隐藏底部
|
|
14662
|
-
*/
|
|
14663
|
-
hideFooter: {
|
|
14664
|
-
type: Boolean,
|
|
14665
|
-
default: false
|
|
14666
|
-
},
|
|
14667
14654
|
/**
|
|
14668
14655
|
* # 是否显示图标
|
|
14669
14656
|
*/
|
|
@@ -14715,20 +14702,12 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
14715
14702
|
])) : createCommentVNode("", true),
|
|
14716
14703
|
createElementVNode("div", _hoisted_6$1, [
|
|
14717
14704
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
14718
|
-
])
|
|
14719
|
-
!__props.hideFooter ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
|
|
14720
|
-
createElementVNode("div", _hoisted_8, [
|
|
14721
|
-
renderSlot(_ctx.$slots, "footerLeft", {}, void 0, true)
|
|
14722
|
-
]),
|
|
14723
|
-
createElementVNode("div", _hoisted_9, [
|
|
14724
|
-
renderSlot(_ctx.$slots, "footerRight", {}, void 0, true)
|
|
14725
|
-
])
|
|
14726
|
-
])) : createCommentVNode("", true)
|
|
14705
|
+
])
|
|
14727
14706
|
], 2);
|
|
14728
14707
|
};
|
|
14729
14708
|
}
|
|
14730
14709
|
});
|
|
14731
|
-
const APanel = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-
|
|
14710
|
+
const APanel = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-212156a1"]]);
|
|
14732
14711
|
class DialogProps {
|
|
14733
14712
|
/**
|
|
14734
14713
|
* ### 使用无参 `DialogProps` 配置
|
|
@@ -17007,6 +16986,7 @@ function useBaseTable(serviceClass, option = {}) {
|
|
|
17007
16986
|
return {
|
|
17008
16987
|
entity,
|
|
17009
16988
|
service,
|
|
16989
|
+
serviceClass,
|
|
17010
16990
|
isLoading,
|
|
17011
16991
|
response,
|
|
17012
16992
|
request,
|
|
@@ -17480,9 +17460,34 @@ const _hoisted_6 = {
|
|
|
17480
17460
|
style: { "color": "#aaa" }
|
|
17481
17461
|
};
|
|
17482
17462
|
const _hoisted_7 = { class: "ctrlRow" };
|
|
17463
|
+
const _hoisted_8 = { class: "a-table-footer" };
|
|
17464
|
+
const _hoisted_9 = { class: "left" };
|
|
17465
|
+
const _hoisted_10 = { class: "right" };
|
|
17483
17466
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
17484
17467
|
__name: "Table",
|
|
17485
17468
|
props: {
|
|
17469
|
+
/**
|
|
17470
|
+
* # 直接使用表格Hook
|
|
17471
|
+
* 请注意,将不会再触发一些事件,请使用 Hook 的前后置等拦截方法处理
|
|
17472
|
+
*/
|
|
17473
|
+
useHook: {
|
|
17474
|
+
type: Object,
|
|
17475
|
+
default: void 0
|
|
17476
|
+
},
|
|
17477
|
+
/**
|
|
17478
|
+
* # 是否禁用分页
|
|
17479
|
+
*/
|
|
17480
|
+
disablePage: {
|
|
17481
|
+
type: Boolean,
|
|
17482
|
+
default: false
|
|
17483
|
+
},
|
|
17484
|
+
/**
|
|
17485
|
+
* # 表格加载中
|
|
17486
|
+
*/
|
|
17487
|
+
loading: {
|
|
17488
|
+
type: Boolean,
|
|
17489
|
+
default: false
|
|
17490
|
+
},
|
|
17486
17491
|
/**
|
|
17487
17492
|
* # 隐藏添加按钮
|
|
17488
17493
|
*/
|
|
@@ -17558,7 +17563,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
17558
17563
|
*/
|
|
17559
17564
|
dataList: {
|
|
17560
17565
|
type: Array,
|
|
17561
|
-
|
|
17566
|
+
default: () => []
|
|
17562
17567
|
},
|
|
17563
17568
|
/**
|
|
17564
17569
|
* # 默认选中的数据数组
|
|
@@ -17744,7 +17749,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
17744
17749
|
*/
|
|
17745
17750
|
entity: {
|
|
17746
17751
|
type: Function,
|
|
17747
|
-
|
|
17752
|
+
default: void 0
|
|
17748
17753
|
},
|
|
17749
17754
|
/**
|
|
17750
17755
|
* # 是否显示导入按钮
|
|
@@ -17834,15 +17839,35 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
17834
17839
|
});
|
|
17835
17840
|
const airTableRef = ref();
|
|
17836
17841
|
const tableId = `table_${Math.random()}`;
|
|
17837
|
-
const
|
|
17838
|
-
const
|
|
17842
|
+
const hook = props.useHook;
|
|
17843
|
+
const ServiceClass = props.service || (hook == null ? void 0 : hook.serviceClass);
|
|
17844
|
+
let EntityClass;
|
|
17845
|
+
if (ServiceClass) {
|
|
17846
|
+
EntityClass = Transformer.newInstance(ServiceClass).entityClass;
|
|
17847
|
+
} else {
|
|
17848
|
+
EntityClass = props.entity;
|
|
17849
|
+
}
|
|
17850
|
+
if (!EntityClass) {
|
|
17851
|
+
throw new Error("[ATable] entity/service/useHook 三者必须传入一个");
|
|
17852
|
+
}
|
|
17853
|
+
const entityInstance = Transformer.newInstance(EntityClass);
|
|
17854
|
+
const modelConfig = getModelConfig(EntityClass);
|
|
17855
|
+
const dataListRef = computed(() => {
|
|
17856
|
+
return hook ? hook.response.value.list : props.dataList;
|
|
17857
|
+
});
|
|
17858
|
+
const selectListRef = computed(() => {
|
|
17859
|
+
return hook ? hook.selectList.value : props.selectList;
|
|
17860
|
+
});
|
|
17861
|
+
const isLoadingRef = computed(() => {
|
|
17862
|
+
return hook ? hook.isLoading.value : props.loading;
|
|
17863
|
+
});
|
|
17839
17864
|
const {
|
|
17840
17865
|
allColumnList,
|
|
17841
17866
|
isColumnSelectorEnabled,
|
|
17842
17867
|
updateSelectKeys,
|
|
17843
17868
|
showColumnList
|
|
17844
17869
|
} = useTableColumn({
|
|
17845
|
-
entityClass:
|
|
17870
|
+
entityClass: EntityClass,
|
|
17846
17871
|
customColumns: props.columnList,
|
|
17847
17872
|
hideColumnSelector: props.hideColumnSelector,
|
|
17848
17873
|
modelConfig
|
|
@@ -17851,7 +17876,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
17851
17876
|
var _a, _b;
|
|
17852
17877
|
for (const row of list) {
|
|
17853
17878
|
(_a = airTableRef.value) == null ? void 0 : _a.toggleRowSelection(row, false);
|
|
17854
|
-
for (const selectedRow of
|
|
17879
|
+
for (const selectedRow of selectListRef.value) {
|
|
17855
17880
|
if (selectedRow.id === row.id) {
|
|
17856
17881
|
(_b = airTableRef.value) == null ? void 0 : _b.toggleRowSelection(row, true);
|
|
17857
17882
|
}
|
|
@@ -17862,7 +17887,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
17862
17887
|
}
|
|
17863
17888
|
}
|
|
17864
17889
|
function toggleSelection() {
|
|
17865
|
-
selectRow(
|
|
17890
|
+
selectRow(dataListRef.value);
|
|
17866
17891
|
}
|
|
17867
17892
|
const {
|
|
17868
17893
|
isAddRowDisabled,
|
|
@@ -17872,7 +17897,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
17872
17897
|
isDisableChangeStatus,
|
|
17873
17898
|
isDeleteDisabled
|
|
17874
17899
|
} = useTableButton({
|
|
17875
|
-
entityClass:
|
|
17900
|
+
entityClass: EntityClass,
|
|
17876
17901
|
editPermission: props.editPermission,
|
|
17877
17902
|
deletePermission: props.deletePermission,
|
|
17878
17903
|
addRowPermission: props.addRowPermission,
|
|
@@ -17887,14 +17912,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
17887
17912
|
selectable: props.selectable,
|
|
17888
17913
|
isAddDisabled: props.disableAddRow
|
|
17889
17914
|
});
|
|
17890
|
-
const searchFieldList = computed(() => props.searchParams || getSearchConfigList(
|
|
17915
|
+
const searchFieldList = computed(() => props.searchParams || getSearchConfigList(EntityClass));
|
|
17891
17916
|
function getStringValue(data) {
|
|
17892
17917
|
if (data === void 0 || data === null) {
|
|
17893
17918
|
return "";
|
|
17894
17919
|
}
|
|
17895
17920
|
return data.toString();
|
|
17896
17921
|
}
|
|
17897
|
-
const request = ref(new QueryRequestPage(
|
|
17922
|
+
const request = ref(new QueryRequestPage(EntityClass));
|
|
17898
17923
|
function onExport() {
|
|
17899
17924
|
if (!props.service) {
|
|
17900
17925
|
FeedbackUtil.toastError("请先传入 service 参数");
|
|
@@ -17909,7 +17934,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
17909
17934
|
}
|
|
17910
17935
|
async function handleDelete(item) {
|
|
17911
17936
|
if (props.customDelete) {
|
|
17912
|
-
emits("delete", item);
|
|
17937
|
+
hook ? hook.onDelete(item) : emits("delete", item);
|
|
17913
17938
|
return;
|
|
17914
17939
|
}
|
|
17915
17940
|
try {
|
|
@@ -17929,7 +17954,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
17929
17954
|
cancelButtonText: WebI18n.get().Cancel,
|
|
17930
17955
|
type: "warning"
|
|
17931
17956
|
});
|
|
17932
|
-
emits("delete", item);
|
|
17957
|
+
hook ? hook.onDelete(item) : emits("delete", item);
|
|
17933
17958
|
} catch (e) {
|
|
17934
17959
|
console.error(e);
|
|
17935
17960
|
}
|
|
@@ -17950,7 +17975,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
17950
17975
|
function handleSelectChanged(list) {
|
|
17951
17976
|
const selectAll = list.map((item) => item.copy());
|
|
17952
17977
|
list.forEach((find) => {
|
|
17953
|
-
if (inCurrentPage(
|
|
17978
|
+
if (inCurrentPage(dataListRef.value, find)) {
|
|
17954
17979
|
return;
|
|
17955
17980
|
}
|
|
17956
17981
|
const exist = selectAll.find((item) => item.id === find.id);
|
|
@@ -17958,16 +17983,16 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
17958
17983
|
selectAll.push(find);
|
|
17959
17984
|
}
|
|
17960
17985
|
});
|
|
17961
|
-
emits("selectChanged", selectAll);
|
|
17986
|
+
hook ? hook.onSelected(selectAll) : emits("selectChanged", selectAll);
|
|
17962
17987
|
}
|
|
17963
17988
|
function handleSortChanged(data) {
|
|
17964
17989
|
if (data.prop && data.order) {
|
|
17965
17990
|
const sort = new QuerySort();
|
|
17966
17991
|
sort.field = data.prop;
|
|
17967
17992
|
sort.direction = data.order === "descending" ? "desc" : "asc";
|
|
17968
|
-
emits("sortChanged", sort);
|
|
17993
|
+
hook ? hook.onSortChanged(sort) : emits("sortChanged", sort);
|
|
17969
17994
|
} else {
|
|
17970
|
-
emits("sortChanged", void 0);
|
|
17995
|
+
hook ? hook.onSortChanged(void 0) : emits("sortChanged", void 0);
|
|
17971
17996
|
}
|
|
17972
17997
|
}
|
|
17973
17998
|
function getRowEntity(scope) {
|
|
@@ -17987,7 +18012,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
17987
18012
|
return "";
|
|
17988
18013
|
}
|
|
17989
18014
|
watch(
|
|
17990
|
-
() =>
|
|
18015
|
+
() => dataListRef,
|
|
17991
18016
|
() => {
|
|
17992
18017
|
nextTick(() => {
|
|
17993
18018
|
toggleSelection();
|
|
@@ -17998,7 +18023,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
17998
18023
|
}
|
|
17999
18024
|
);
|
|
18000
18025
|
watch(
|
|
18001
|
-
() =>
|
|
18026
|
+
() => selectListRef,
|
|
18002
18027
|
() => {
|
|
18003
18028
|
nextTick(() => {
|
|
18004
18029
|
if (airTableRef.value) {
|
|
@@ -18077,11 +18102,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18077
18102
|
} else {
|
|
18078
18103
|
searchFilter.value = entityInstance.copy();
|
|
18079
18104
|
}
|
|
18080
|
-
request.value = new QueryRequestPage(
|
|
18105
|
+
request.value = new QueryRequestPage(EntityClass);
|
|
18081
18106
|
request.value.exclude("filter");
|
|
18082
18107
|
}
|
|
18083
18108
|
function onSearch() {
|
|
18084
|
-
request.value = new QueryRequestPage(
|
|
18109
|
+
request.value = new QueryRequestPage(EntityClass);
|
|
18085
18110
|
const keys = Object.keys(searchFilter.value);
|
|
18086
18111
|
keys.forEach((key) => {
|
|
18087
18112
|
if (searchFilter.value[key] === "") {
|
|
@@ -18092,316 +18117,336 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18092
18117
|
if (request.value.page) {
|
|
18093
18118
|
request.value.page.pageNum = 1;
|
|
18094
18119
|
}
|
|
18095
|
-
emits("search", request.value);
|
|
18120
|
+
hook ? hook.onSearch(request.value) : emits("search", request.value);
|
|
18096
18121
|
}
|
|
18097
18122
|
return (_ctx, _cache) => {
|
|
18098
|
-
|
|
18099
|
-
|
|
18100
|
-
|
|
18101
|
-
|
|
18102
|
-
|
|
18103
|
-
|
|
18104
|
-
|
|
18105
|
-
|
|
18106
|
-
renderSlot(_ctx.$slots, "
|
|
18107
|
-
|
|
18123
|
+
const _directive_loading = resolveDirective("loading");
|
|
18124
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
18125
|
+
createElementVNode("div", {
|
|
18126
|
+
style: normalizeStyle({ height: __props.autoHeight ? "auto" : "0px" }),
|
|
18127
|
+
class: "a-table-container"
|
|
18128
|
+
}, [
|
|
18129
|
+
createElementVNode("div", _hoisted_1$2, [
|
|
18130
|
+
createElementVNode("div", _hoisted_2$2, [
|
|
18131
|
+
renderSlot(_ctx.$slots, "left", {}, () => [
|
|
18132
|
+
renderSlot(_ctx.$slots, "beforeButton"),
|
|
18133
|
+
renderSlot(_ctx.$slots, "addButton", {}, () => [
|
|
18134
|
+
!__props.hideAdd ? (openBlock(), createBlock(unref(_sfc_main$v), {
|
|
18135
|
+
key: 0,
|
|
18136
|
+
permission: __props.addPermission || unref(PermissionUtil).get(unref(EntityClass), unref(PermissionAction).ADD),
|
|
18137
|
+
icon: "ADD",
|
|
18138
|
+
primary: "",
|
|
18139
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(hook) ? unref(hook).onAdd() : emits("add"))
|
|
18140
|
+
}, {
|
|
18141
|
+
default: withCtx(() => [
|
|
18142
|
+
createTextVNode(toDisplayString(unref(modelConfig).addTitle || unref(WebI18n).get().Add), 1)
|
|
18143
|
+
]),
|
|
18144
|
+
_: 1
|
|
18145
|
+
}, 8, ["permission"])) : createCommentVNode("", true)
|
|
18146
|
+
]),
|
|
18147
|
+
__props.showImport ? (openBlock(), createBlock(unref(_sfc_main$v), {
|
|
18108
18148
|
key: 0,
|
|
18109
|
-
permission: __props.
|
|
18110
|
-
icon: "
|
|
18111
|
-
|
|
18112
|
-
onClick: _cache[0] || (_cache[0] = ($event) => emits("add"))
|
|
18149
|
+
permission: __props.importPermission || unref(PermissionUtil).get(unref(EntityClass), unref(PermissionAction).IMPORT),
|
|
18150
|
+
icon: "IMPORT",
|
|
18151
|
+
onClick: _cache[1] || (_cache[1] = ($event) => onImport())
|
|
18113
18152
|
}, {
|
|
18114
18153
|
default: withCtx(() => [
|
|
18115
|
-
createTextVNode(toDisplayString(unref(
|
|
18154
|
+
createTextVNode(toDisplayString(unref(WebI18n).get().Import), 1)
|
|
18116
18155
|
]),
|
|
18117
18156
|
_: 1
|
|
18118
|
-
}, 8, ["permission"])) : createCommentVNode("", true)
|
|
18157
|
+
}, 8, ["permission"])) : createCommentVNode("", true),
|
|
18158
|
+
renderSlot(_ctx.$slots, "afterButton")
|
|
18159
|
+
])
|
|
18160
|
+
]),
|
|
18161
|
+
createElementVNode("div", _hoisted_3$2, [
|
|
18162
|
+
renderSlot(_ctx.$slots, "beforeSearch"),
|
|
18163
|
+
createElementVNode("div", _hoisted_4$1, [
|
|
18164
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(searchFieldList.value, (item) => {
|
|
18165
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
18166
|
+
key: item.key
|
|
18167
|
+
}, [
|
|
18168
|
+
!item.hide ? (openBlock(), createElementBlock("div", {
|
|
18169
|
+
key: 0,
|
|
18170
|
+
style: normalizeStyle({ width: `${item.width || 150}px` }),
|
|
18171
|
+
class: "a-table-toolbar-search-item"
|
|
18172
|
+
}, [
|
|
18173
|
+
renderSlot(_ctx.$slots, item.key, { data: searchFilter.value }, () => [
|
|
18174
|
+
unref(getDictionary)(unref(EntityClass), item.key) ? (openBlock(), createBlock(unref(ElSelect), {
|
|
18175
|
+
key: 0,
|
|
18176
|
+
modelValue: searchFilter.value[item.key],
|
|
18177
|
+
"onUpdate:modelValue": ($event) => searchFilter.value[item.key] = $event,
|
|
18178
|
+
clearable: item.clearable !== false,
|
|
18179
|
+
filterable: item.filterable,
|
|
18180
|
+
placeholder: `${unref(getFieldLabel)(unref(EntityClass), item.key)}...`,
|
|
18181
|
+
onChange: _cache[2] || (_cache[2] = ($event) => onSearch()),
|
|
18182
|
+
onClear: ($event) => searchFilter.value[item.key] = void 0
|
|
18183
|
+
}, {
|
|
18184
|
+
default: withCtx(() => {
|
|
18185
|
+
var _a;
|
|
18186
|
+
return [
|
|
18187
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList((_a = unref(getDictionary)(unref(EntityClass), item.key)) == null ? void 0 : _a.toArray(), (enumItem) => {
|
|
18188
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
18189
|
+
!enumItem.disabled ? (openBlock(), createBlock(unref(ElOption), {
|
|
18190
|
+
key: enumItem.key.toString(),
|
|
18191
|
+
label: enumItem.label,
|
|
18192
|
+
value: enumItem.key
|
|
18193
|
+
}, null, 8, ["label", "value"])) : createCommentVNode("", true)
|
|
18194
|
+
], 64);
|
|
18195
|
+
}), 256))
|
|
18196
|
+
];
|
|
18197
|
+
}),
|
|
18198
|
+
_: 2
|
|
18199
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "clearable", "filterable", "placeholder", "onClear"])) : (openBlock(), createBlock(unref(ElInput), {
|
|
18200
|
+
key: 1,
|
|
18201
|
+
modelValue: searchFilter.value[item.key],
|
|
18202
|
+
"onUpdate:modelValue": ($event) => searchFilter.value[item.key] = $event,
|
|
18203
|
+
clearable: item.clearable !== false,
|
|
18204
|
+
placeholder: `${unref(getFieldLabel)(unref(EntityClass), item.key)}...`,
|
|
18205
|
+
onBlur: _cache[3] || (_cache[3] = ($event) => onSearch()),
|
|
18206
|
+
onClear: onSearch,
|
|
18207
|
+
onKeydown: withKeys(onSearch, ["enter"])
|
|
18208
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "clearable", "placeholder"]))
|
|
18209
|
+
])
|
|
18210
|
+
], 4)) : createCommentVNode("", true)
|
|
18211
|
+
], 64);
|
|
18212
|
+
}), 128))
|
|
18119
18213
|
]),
|
|
18120
|
-
__props.
|
|
18214
|
+
__props.showExport ? (openBlock(), createBlock(unref(_sfc_main$v), {
|
|
18121
18215
|
key: 0,
|
|
18122
|
-
permission: __props.
|
|
18123
|
-
icon: "
|
|
18124
|
-
onClick: _cache[
|
|
18216
|
+
permission: __props.exportPermission || unref(PermissionUtil).get(unref(EntityClass), unref(PermissionAction).EXPORT),
|
|
18217
|
+
icon: "EXPORT",
|
|
18218
|
+
onClick: _cache[4] || (_cache[4] = ($event) => onExport())
|
|
18125
18219
|
}, {
|
|
18126
18220
|
default: withCtx(() => [
|
|
18127
|
-
createTextVNode(toDisplayString(unref(WebI18n).get().
|
|
18221
|
+
createTextVNode(toDisplayString(unref(WebI18n).get().Export) + ": ", 1)
|
|
18128
18222
|
]),
|
|
18129
18223
|
_: 1
|
|
18130
18224
|
}, 8, ["permission"])) : createCommentVNode("", true),
|
|
18131
|
-
renderSlot(_ctx.$slots, "
|
|
18225
|
+
renderSlot(_ctx.$slots, "afterSearch"),
|
|
18226
|
+
unref(isColumnSelectorEnabled) ? (openBlock(), createBlock(unref(ColumnSelector), {
|
|
18227
|
+
key: 1,
|
|
18228
|
+
"column-list": unref(allColumnList),
|
|
18229
|
+
"entity-class": unref(EntityClass),
|
|
18230
|
+
onChanged: _cache[5] || (_cache[5] = ($event) => unref(updateSelectKeys)($event))
|
|
18231
|
+
}, null, 8, ["column-list", "entity-class"])) : createCommentVNode("", true)
|
|
18132
18232
|
])
|
|
18133
18233
|
]),
|
|
18134
|
-
|
|
18135
|
-
|
|
18136
|
-
|
|
18137
|
-
|
|
18138
|
-
|
|
18139
|
-
|
|
18140
|
-
|
|
18141
|
-
|
|
18142
|
-
|
|
18143
|
-
|
|
18144
|
-
|
|
18145
|
-
|
|
18146
|
-
|
|
18147
|
-
|
|
18148
|
-
|
|
18149
|
-
|
|
18150
|
-
|
|
18151
|
-
|
|
18152
|
-
|
|
18153
|
-
|
|
18154
|
-
|
|
18155
|
-
|
|
18156
|
-
}, {
|
|
18157
|
-
default: withCtx(() => {
|
|
18158
|
-
var _a;
|
|
18159
|
-
return [
|
|
18160
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList((_a = unref(getDictionary)(__props.entity, item.key)) == null ? void 0 : _a.toArray(), (enumItem) => {
|
|
18161
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
18162
|
-
!enumItem.disabled ? (openBlock(), createBlock(unref(ElOption), {
|
|
18163
|
-
key: enumItem.key.toString(),
|
|
18164
|
-
label: enumItem.label,
|
|
18165
|
-
value: enumItem.key
|
|
18166
|
-
}, null, 8, ["label", "value"])) : createCommentVNode("", true)
|
|
18167
|
-
], 64);
|
|
18168
|
-
}), 256))
|
|
18169
|
-
];
|
|
18170
|
-
}),
|
|
18171
|
-
_: 2
|
|
18172
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "clearable", "filterable", "placeholder", "onClear"])) : (openBlock(), createBlock(unref(ElInput), {
|
|
18173
|
-
key: 1,
|
|
18174
|
-
modelValue: searchFilter.value[item.key],
|
|
18175
|
-
"onUpdate:modelValue": ($event) => searchFilter.value[item.key] = $event,
|
|
18176
|
-
clearable: item.clearable !== false,
|
|
18177
|
-
placeholder: `${unref(getFieldLabel)(__props.entity, item.key)}...`,
|
|
18178
|
-
onBlur: _cache[3] || (_cache[3] = ($event) => onSearch()),
|
|
18179
|
-
onClear: onSearch,
|
|
18180
|
-
onKeydown: withKeys(onSearch, ["enter"])
|
|
18181
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "clearable", "placeholder"]))
|
|
18182
|
-
])
|
|
18183
|
-
], 4)) : createCommentVNode("", true)
|
|
18184
|
-
], 64);
|
|
18185
|
-
}), 128))
|
|
18234
|
+
unref(allColumnList) ? withDirectives((openBlock(), createBlock(unref(ElTable), {
|
|
18235
|
+
key: 0,
|
|
18236
|
+
id: tableId,
|
|
18237
|
+
ref_key: "airTableRef",
|
|
18238
|
+
ref: airTableRef,
|
|
18239
|
+
data: dataListRef.value,
|
|
18240
|
+
"row-class-name": tableRowClassName,
|
|
18241
|
+
"row-key": (row) => `${row.id}`,
|
|
18242
|
+
class: "a-table",
|
|
18243
|
+
flexible: "",
|
|
18244
|
+
height: "100%",
|
|
18245
|
+
onSelect: handleSelectChanged,
|
|
18246
|
+
onSelectAll: handleSelectChanged,
|
|
18247
|
+
onSortChange: handleSortChanged
|
|
18248
|
+
}, {
|
|
18249
|
+
empty: withCtx(() => [
|
|
18250
|
+
_cache[7] || (_cache[7] = createElementVNode("img", {
|
|
18251
|
+
alt: "",
|
|
18252
|
+
src: _imports_0,
|
|
18253
|
+
style: { "width": "80px" }
|
|
18254
|
+
}, null, -1)),
|
|
18255
|
+
createElementVNode("div", null, toDisplayString(__props.emptyText || unref(modelConfig).tableEmptyText || unref(WebI18n).get().NoData), 1)
|
|
18186
18256
|
]),
|
|
18187
|
-
|
|
18188
|
-
|
|
18189
|
-
|
|
18190
|
-
|
|
18191
|
-
|
|
18192
|
-
|
|
18193
|
-
|
|
18194
|
-
|
|
18195
|
-
]),
|
|
18196
|
-
|
|
18197
|
-
|
|
18198
|
-
|
|
18199
|
-
|
|
18200
|
-
|
|
18201
|
-
|
|
18202
|
-
"
|
|
18203
|
-
|
|
18204
|
-
|
|
18205
|
-
|
|
18206
|
-
|
|
18207
|
-
|
|
18208
|
-
|
|
18209
|
-
|
|
18210
|
-
|
|
18211
|
-
|
|
18212
|
-
|
|
18213
|
-
|
|
18214
|
-
|
|
18215
|
-
|
|
18216
|
-
|
|
18217
|
-
|
|
18218
|
-
|
|
18219
|
-
|
|
18220
|
-
|
|
18221
|
-
|
|
18222
|
-
empty: withCtx(() => [
|
|
18223
|
-
_cache[6] || (_cache[6] = createElementVNode("img", {
|
|
18224
|
-
alt: "",
|
|
18225
|
-
src: _imports_0,
|
|
18226
|
-
style: { "width": "80px" }
|
|
18227
|
-
}, null, -1)),
|
|
18228
|
-
createElementVNode("div", null, toDisplayString(__props.emptyText || unref(modelConfig).tableEmptyText || unref(WebI18n).get().NoData), 1)
|
|
18229
|
-
]),
|
|
18230
|
-
default: withCtx(() => [
|
|
18231
|
-
__props.showSelect ? (openBlock(), createBlock(unref(ElTableColumn), {
|
|
18232
|
-
key: 0,
|
|
18233
|
-
"reserve-selection": true,
|
|
18234
|
-
selectable: unref(isSelectable),
|
|
18235
|
-
fixed: "left",
|
|
18236
|
-
type: "selection",
|
|
18237
|
-
width: "40"
|
|
18238
|
-
}, null, 8, ["selectable"])) : createCommentVNode("", true),
|
|
18239
|
-
!__props.hideIndex ? (openBlock(), createBlock(unref(ElTableColumn), {
|
|
18240
|
-
key: 1,
|
|
18241
|
-
label: unref(WebI18n).get().ID || "序号",
|
|
18242
|
-
fixed: "left",
|
|
18243
|
-
type: "index",
|
|
18244
|
-
width: "60"
|
|
18245
|
-
}, null, 8, ["label"])) : createCommentVNode("", true),
|
|
18246
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(showColumnList), (item) => {
|
|
18247
|
-
return openBlock(), createBlock(unref(ElTableColumn), {
|
|
18248
|
-
key: item.key,
|
|
18249
|
-
align: item.align,
|
|
18250
|
-
fixed: item.fixed,
|
|
18251
|
-
label: unref(getFieldLabel)(__props.entity, item.key),
|
|
18252
|
-
"min-width": item.minWidth || "auto",
|
|
18253
|
-
prop: item.key,
|
|
18254
|
-
sortable: item.sortable,
|
|
18255
|
-
width: item.width || "auto"
|
|
18256
|
-
}, {
|
|
18257
|
-
default: withCtx((scope) => [
|
|
18258
|
-
scope.$index >= 0 ? renderSlot(_ctx.$slots, item.key, {
|
|
18259
|
-
key: 0,
|
|
18260
|
-
data: getRowEntity(scope),
|
|
18261
|
-
index: scope.$index
|
|
18262
|
-
}, () => [
|
|
18263
|
-
item.prefixText ? (openBlock(), createElementBlock("span", _hoisted_5$1, toDisplayString(item.prefixText), 1)) : createCommentVNode("", true),
|
|
18264
|
-
unref(getDictionary)(__props.entity, item.key) ? (openBlock(), createBlock(unref(EnumColumn), {
|
|
18265
|
-
key: 1,
|
|
18266
|
-
column: item,
|
|
18267
|
-
data: scope.row,
|
|
18268
|
-
dictionary: unref(getDictionary)(__props.entity, item.key)
|
|
18269
|
-
}, null, 8, ["column", "data", "dictionary"])) : item.phone ? (openBlock(), createBlock(unref(APhone), {
|
|
18270
|
-
key: 2,
|
|
18271
|
-
desensitize: item.desensitize,
|
|
18272
|
-
phone: getValue(scope, item.key)
|
|
18273
|
-
}, null, 8, ["desensitize", "phone"])) : item.datetime ? (openBlock(), createBlock(unref(ADateTime), {
|
|
18274
|
-
key: 3,
|
|
18275
|
-
formatter: item.datetime === true ? unref(DateTimeFormatter).FULL_DATE_TIME : item.datetime,
|
|
18276
|
-
"milli-second": getValue(scope, item.key)
|
|
18277
|
-
}, null, 8, ["formatter", "milli-second"])) : item.money ? (openBlock(), createBlock(unref(AMoney), {
|
|
18278
|
-
key: 4,
|
|
18279
|
-
money: getValue(scope, item.key)
|
|
18280
|
-
}, null, 8, ["money"])) : item.payload ? (openBlock(), createElementBlock(Fragment, { key: 5 }, [
|
|
18281
|
-
item.array ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
18282
|
-
createTextVNode(toDisplayString(getPayloadArray(scope, item.key).map((payload) => payload.getPayloadLabel()).join(",")), 1)
|
|
18283
|
-
], 64)) : (openBlock(), createBlock(unref(APayload), {
|
|
18257
|
+
default: withCtx(() => [
|
|
18258
|
+
__props.showSelect ? (openBlock(), createBlock(unref(ElTableColumn), {
|
|
18259
|
+
key: 0,
|
|
18260
|
+
"reserve-selection": true,
|
|
18261
|
+
selectable: unref(isSelectable),
|
|
18262
|
+
fixed: "left",
|
|
18263
|
+
type: "selection",
|
|
18264
|
+
width: "40"
|
|
18265
|
+
}, null, 8, ["selectable"])) : createCommentVNode("", true),
|
|
18266
|
+
!__props.hideIndex ? (openBlock(), createBlock(unref(ElTableColumn), {
|
|
18267
|
+
key: 1,
|
|
18268
|
+
label: unref(WebI18n).get().ID || "序号",
|
|
18269
|
+
fixed: "left",
|
|
18270
|
+
type: "index",
|
|
18271
|
+
width: "60"
|
|
18272
|
+
}, null, 8, ["label"])) : createCommentVNode("", true),
|
|
18273
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(showColumnList), (item) => {
|
|
18274
|
+
return openBlock(), createBlock(unref(ElTableColumn), {
|
|
18275
|
+
key: item.key,
|
|
18276
|
+
align: item.align,
|
|
18277
|
+
fixed: item.fixed,
|
|
18278
|
+
label: unref(getFieldLabel)(unref(EntityClass), item.key),
|
|
18279
|
+
"min-width": item.minWidth || "auto",
|
|
18280
|
+
prop: item.key,
|
|
18281
|
+
sortable: item.sortable,
|
|
18282
|
+
width: item.width || "auto"
|
|
18283
|
+
}, {
|
|
18284
|
+
default: withCtx((scope) => [
|
|
18285
|
+
scope.$index >= 0 ? renderSlot(_ctx.$slots, item.key, {
|
|
18286
|
+
key: 0,
|
|
18287
|
+
data: getRowEntity(scope),
|
|
18288
|
+
index: scope.$index
|
|
18289
|
+
}, () => [
|
|
18290
|
+
item.prefixText ? (openBlock(), createElementBlock("span", _hoisted_5$1, toDisplayString(item.prefixText), 1)) : createCommentVNode("", true),
|
|
18291
|
+
unref(getDictionary)(unref(EntityClass), item.key) ? (openBlock(), createBlock(unref(EnumColumn), {
|
|
18284
18292
|
key: 1,
|
|
18285
|
-
|
|
18286
|
-
|
|
18287
|
-
|
|
18288
|
-
|
|
18289
|
-
|
|
18290
|
-
|
|
18291
|
-
|
|
18292
|
-
|
|
18293
|
-
|
|
18294
|
-
|
|
18295
|
-
|
|
18296
|
-
|
|
18297
|
-
|
|
18298
|
-
|
|
18299
|
-
|
|
18300
|
-
|
|
18293
|
+
column: item,
|
|
18294
|
+
data: scope.row,
|
|
18295
|
+
dictionary: unref(getDictionary)(unref(EntityClass), item.key)
|
|
18296
|
+
}, null, 8, ["column", "data", "dictionary"])) : item.phone ? (openBlock(), createBlock(unref(APhone), {
|
|
18297
|
+
key: 2,
|
|
18298
|
+
desensitize: item.desensitize,
|
|
18299
|
+
phone: getValue(scope, item.key)
|
|
18300
|
+
}, null, 8, ["desensitize", "phone"])) : item.datetime ? (openBlock(), createBlock(unref(ADateTime), {
|
|
18301
|
+
key: 3,
|
|
18302
|
+
formatter: item.datetime === true ? unref(DateTimeFormatter).FULL_DATE_TIME : item.datetime,
|
|
18303
|
+
"milli-second": getValue(scope, item.key)
|
|
18304
|
+
}, null, 8, ["formatter", "milli-second"])) : item.money ? (openBlock(), createBlock(unref(AMoney), {
|
|
18305
|
+
key: 4,
|
|
18306
|
+
money: getValue(scope, item.key)
|
|
18307
|
+
}, null, 8, ["money"])) : item.payload ? (openBlock(), createElementBlock(Fragment, { key: 5 }, [
|
|
18308
|
+
item.array ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
18309
|
+
createTextVNode(toDisplayString(getPayloadArray(scope, item.key).map((payload) => payload.getPayloadLabel()).join(",")), 1)
|
|
18310
|
+
], 64)) : (openBlock(), createBlock(unref(APayload), {
|
|
18311
|
+
key: 1,
|
|
18312
|
+
payload: getValue(scope, item.key)
|
|
18313
|
+
}, null, 8, ["payload"]))
|
|
18314
|
+
], 64)) : item.desensitize ? (openBlock(), createBlock(unref(ADesensitize), {
|
|
18315
|
+
key: 6,
|
|
18316
|
+
content: getValue(scope, item.key),
|
|
18317
|
+
type: item.desensitize
|
|
18318
|
+
}, null, 8, ["content", "type"])) : item.copy ? (openBlock(), createBlock(unref(_sfc_main$4), {
|
|
18319
|
+
key: 7,
|
|
18320
|
+
column: item,
|
|
18321
|
+
data: scope.row
|
|
18322
|
+
}, null, 8, ["column", "data"])) : (openBlock(), createElementBlock("div", {
|
|
18323
|
+
key: 8,
|
|
18324
|
+
class: normalizeClass([item.wrap ? "" : "nowrap", "a-table-column"])
|
|
18325
|
+
}, toDisplayString(getStringValue(getValue(scope, item.key)) ?? item.emptyValue), 3)),
|
|
18326
|
+
item.suffixText ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(item.suffixText), 1)) : createCommentVNode("", true)
|
|
18327
|
+
]) : createCommentVNode("", true)
|
|
18328
|
+
]),
|
|
18329
|
+
_: 2
|
|
18330
|
+
}, 1032, ["align", "fixed", "label", "min-width", "prop", "sortable", "width"]);
|
|
18331
|
+
}), 128)),
|
|
18332
|
+
!__props.hideCtrl ? (openBlock(), createBlock(unref(ElTableColumn), {
|
|
18333
|
+
key: 2,
|
|
18334
|
+
width: __props.ctrlWidth || "90px",
|
|
18335
|
+
align: "right",
|
|
18336
|
+
fixed: "right"
|
|
18337
|
+
}, {
|
|
18338
|
+
header: withCtx(() => [
|
|
18339
|
+
createTextVNode(toDisplayString(unref(WebI18n).get().Operation), 1)
|
|
18301
18340
|
]),
|
|
18302
|
-
|
|
18303
|
-
|
|
18304
|
-
|
|
18305
|
-
!__props.hideCtrl ? (openBlock(), createBlock(unref(ElTableColumn), {
|
|
18306
|
-
key: 2,
|
|
18307
|
-
width: __props.ctrlWidth || "90px",
|
|
18308
|
-
align: "right",
|
|
18309
|
-
fixed: "right"
|
|
18310
|
-
}, {
|
|
18311
|
-
header: withCtx(() => [
|
|
18312
|
-
createTextVNode(toDisplayString(unref(WebI18n).get().Operation), 1)
|
|
18313
|
-
]),
|
|
18314
|
-
default: withCtx((scope) => [
|
|
18315
|
-
createElementVNode("div", _hoisted_7, [
|
|
18316
|
-
scope.$index >= 0 ? renderSlot(_ctx.$slots, "customRow", {
|
|
18317
|
-
key: 0,
|
|
18318
|
-
data: getRowEntity(scope),
|
|
18319
|
-
index: scope.$index
|
|
18320
|
-
}) : createCommentVNode("", true),
|
|
18321
|
-
!__props.hideCtrl ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
18322
|
-
__props.showAddRow ? (openBlock(), createBlock(unref(ElLink), {
|
|
18341
|
+
default: withCtx((scope) => [
|
|
18342
|
+
createElementVNode("div", _hoisted_7, [
|
|
18343
|
+
scope.$index >= 0 ? renderSlot(_ctx.$slots, "customRow", {
|
|
18323
18344
|
key: 0,
|
|
18324
|
-
|
|
18325
|
-
|
|
18326
|
-
|
|
18327
|
-
},
|
|
18328
|
-
|
|
18329
|
-
createTextVNode(toDisplayString(unref(WebI18n).get().Add), 1)
|
|
18330
|
-
]),
|
|
18331
|
-
_: 2
|
|
18332
|
-
}, 1032, ["disabled", "onClick"])) : createCommentVNode("", true),
|
|
18333
|
-
!props.hideEdit ? (openBlock(), createBlock(unref(ElLink), {
|
|
18334
|
-
key: 1,
|
|
18335
|
-
disabled: unref(isEditDisabled)(getRowEntity(scope)),
|
|
18336
|
-
underline: false,
|
|
18337
|
-
onClick: ($event) => emits("edit", getRowEntity(scope))
|
|
18338
|
-
}, {
|
|
18339
|
-
default: withCtx(() => [
|
|
18340
|
-
createTextVNode(toDisplayString(unref(WebI18n).get().Update), 1)
|
|
18341
|
-
]),
|
|
18342
|
-
_: 2
|
|
18343
|
-
}, 1032, ["disabled", "onClick"])) : createCommentVNode("", true),
|
|
18344
|
-
__props.showDetail ? (openBlock(), createBlock(unref(ElLink), {
|
|
18345
|
-
key: 2,
|
|
18346
|
-
disabled: unref(isDetailDisabled)(getRowEntity(scope)),
|
|
18347
|
-
underline: false,
|
|
18348
|
-
onClick: ($event) => emits("detail", getRowEntity(scope))
|
|
18349
|
-
}, {
|
|
18350
|
-
default: withCtx(() => [
|
|
18351
|
-
createTextVNode(toDisplayString(unref(WebI18n).get().Detail), 1)
|
|
18352
|
-
]),
|
|
18353
|
-
_: 2
|
|
18354
|
-
}, 1032, ["disabled", "onClick"])) : createCommentVNode("", true),
|
|
18355
|
-
__props.showEnableAndDisable ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
18356
|
-
getRowEntity(scope).isDisabled ? (openBlock(), createBlock(unref(ElLink), {
|
|
18345
|
+
data: getRowEntity(scope),
|
|
18346
|
+
index: scope.$index
|
|
18347
|
+
}) : createCommentVNode("", true),
|
|
18348
|
+
!__props.hideCtrl ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
18349
|
+
__props.showAddRow ? (openBlock(), createBlock(unref(ElLink), {
|
|
18357
18350
|
key: 0,
|
|
18358
|
-
disabled: unref(
|
|
18351
|
+
disabled: unref(isAddRowDisabled)(getRowEntity(scope)),
|
|
18359
18352
|
underline: false,
|
|
18360
|
-
onClick: ($event) => emits("
|
|
18353
|
+
onClick: ($event) => emits("addRow", getRowEntity(scope))
|
|
18361
18354
|
}, {
|
|
18362
18355
|
default: withCtx(() => [
|
|
18363
|
-
createTextVNode(toDisplayString(unref(WebI18n).get().
|
|
18356
|
+
createTextVNode(toDisplayString(unref(WebI18n).get().Add), 1)
|
|
18364
18357
|
]),
|
|
18365
18358
|
_: 2
|
|
18366
|
-
}, 1032, ["disabled", "onClick"])) : (
|
|
18359
|
+
}, 1032, ["disabled", "onClick"])) : createCommentVNode("", true),
|
|
18360
|
+
!props.hideEdit ? (openBlock(), createBlock(unref(ElLink), {
|
|
18367
18361
|
key: 1,
|
|
18368
|
-
disabled: unref(
|
|
18362
|
+
disabled: unref(isEditDisabled)(getRowEntity(scope)),
|
|
18363
|
+
underline: false,
|
|
18364
|
+
onClick: ($event) => unref(hook) ? unref(hook).onEdit(getRowEntity(scope)) : emits("edit", getRowEntity(scope))
|
|
18365
|
+
}, {
|
|
18366
|
+
default: withCtx(() => [
|
|
18367
|
+
createTextVNode(toDisplayString(unref(WebI18n).get().Update), 1)
|
|
18368
|
+
]),
|
|
18369
|
+
_: 2
|
|
18370
|
+
}, 1032, ["disabled", "onClick"])) : createCommentVNode("", true),
|
|
18371
|
+
__props.showDetail ? (openBlock(), createBlock(unref(ElLink), {
|
|
18372
|
+
key: 2,
|
|
18373
|
+
disabled: unref(isDetailDisabled)(getRowEntity(scope)),
|
|
18374
|
+
underline: false,
|
|
18375
|
+
onClick: ($event) => unref(hook) ? unref(hook).onDetail(getRowEntity(scope)) : emits("detail", getRowEntity(scope))
|
|
18376
|
+
}, {
|
|
18377
|
+
default: withCtx(() => [
|
|
18378
|
+
createTextVNode(toDisplayString(unref(WebI18n).get().Detail), 1)
|
|
18379
|
+
]),
|
|
18380
|
+
_: 2
|
|
18381
|
+
}, 1032, ["disabled", "onClick"])) : createCommentVNode("", true),
|
|
18382
|
+
__props.showEnableAndDisable ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
18383
|
+
getRowEntity(scope).isDisabled ? (openBlock(), createBlock(unref(ElLink), {
|
|
18384
|
+
key: 0,
|
|
18385
|
+
disabled: unref(isDisableChangeStatus)(getRowEntity(scope)),
|
|
18386
|
+
underline: false,
|
|
18387
|
+
onClick: ($event) => unref(hook) ? unref(hook).onEnable(getRowEntity(scope)) : emits("enable", getRowEntity(scope))
|
|
18388
|
+
}, {
|
|
18389
|
+
default: withCtx(() => [
|
|
18390
|
+
createTextVNode(toDisplayString(unref(WebI18n).get().Enable), 1)
|
|
18391
|
+
]),
|
|
18392
|
+
_: 2
|
|
18393
|
+
}, 1032, ["disabled", "onClick"])) : (openBlock(), createBlock(unref(ElLink), {
|
|
18394
|
+
key: 1,
|
|
18395
|
+
disabled: unref(isDisableChangeStatus)(getRowEntity(scope)),
|
|
18396
|
+
underline: false,
|
|
18397
|
+
type: "warning",
|
|
18398
|
+
onClick: ($event) => unref(hook) ? unref(hook).onDisable(getRowEntity(scope)) : emits("disable", getRowEntity(scope))
|
|
18399
|
+
}, {
|
|
18400
|
+
default: withCtx(() => [
|
|
18401
|
+
createTextVNode(toDisplayString(unref(WebI18n).get().Disable), 1)
|
|
18402
|
+
]),
|
|
18403
|
+
_: 2
|
|
18404
|
+
}, 1032, ["disabled", "onClick"]))
|
|
18405
|
+
], 64)) : createCommentVNode("", true),
|
|
18406
|
+
!__props.hideDelete ? (openBlock(), createBlock(unref(ElLink), {
|
|
18407
|
+
key: 4,
|
|
18408
|
+
disabled: unref(isDeleteDisabled)(getRowEntity(scope)),
|
|
18369
18409
|
underline: false,
|
|
18370
|
-
type: "
|
|
18371
|
-
onClick: ($event) =>
|
|
18410
|
+
type: "danger",
|
|
18411
|
+
onClick: ($event) => handleDelete(getRowEntity(scope))
|
|
18372
18412
|
}, {
|
|
18373
18413
|
default: withCtx(() => [
|
|
18374
|
-
createTextVNode(toDisplayString(unref(WebI18n).get().
|
|
18414
|
+
createTextVNode(toDisplayString(unref(WebI18n).get().Delete), 1)
|
|
18375
18415
|
]),
|
|
18376
18416
|
_: 2
|
|
18377
|
-
}, 1032, ["disabled", "onClick"]))
|
|
18417
|
+
}, 1032, ["disabled", "onClick"])) : createCommentVNode("", true)
|
|
18378
18418
|
], 64)) : createCommentVNode("", true),
|
|
18379
|
-
|
|
18380
|
-
key:
|
|
18381
|
-
|
|
18382
|
-
|
|
18383
|
-
|
|
18384
|
-
|
|
18385
|
-
|
|
18386
|
-
|
|
18387
|
-
|
|
18388
|
-
|
|
18389
|
-
|
|
18390
|
-
|
|
18391
|
-
|
|
18392
|
-
|
|
18393
|
-
|
|
18394
|
-
|
|
18395
|
-
|
|
18396
|
-
|
|
18397
|
-
|
|
18398
|
-
|
|
18399
|
-
|
|
18400
|
-
|
|
18419
|
+
scope.index >= 0 ? renderSlot(_ctx.$slots, "endRow", {
|
|
18420
|
+
key: 2,
|
|
18421
|
+
data: getRowEntity(scope),
|
|
18422
|
+
index: scope.$index
|
|
18423
|
+
}) : createCommentVNode("", true)
|
|
18424
|
+
])
|
|
18425
|
+
]),
|
|
18426
|
+
_: 3
|
|
18427
|
+
}, 8, ["width"])) : createCommentVNode("", true)
|
|
18428
|
+
]),
|
|
18429
|
+
_: 3
|
|
18430
|
+
}, 8, ["data", "row-key"])), [
|
|
18431
|
+
[_directive_loading, isLoadingRef.value]
|
|
18432
|
+
]) : createCommentVNode("", true)
|
|
18433
|
+
], 4),
|
|
18434
|
+
createElementVNode("div", _hoisted_8, [
|
|
18435
|
+
createElementVNode("div", _hoisted_9, [
|
|
18436
|
+
renderSlot(_ctx.$slots, "beforePage"),
|
|
18437
|
+
!__props.disablePage && unref(hook) ? (openBlock(), createBlock(unref(_sfc_main$h), {
|
|
18438
|
+
key: 0,
|
|
18439
|
+
response: unref(hook).response.value,
|
|
18440
|
+
class: "a-table-page",
|
|
18441
|
+
onChanged: _cache[6] || (_cache[6] = ($event) => unref(hook).onPageChanged($event))
|
|
18442
|
+
}, null, 8, ["response"])) : createCommentVNode("", true),
|
|
18443
|
+
renderSlot(_ctx.$slots, "afterPage")
|
|
18401
18444
|
]),
|
|
18402
|
-
|
|
18403
|
-
|
|
18404
|
-
|
|
18445
|
+
createElementVNode("div", _hoisted_10, [
|
|
18446
|
+
renderSlot(_ctx.$slots, "footerRight")
|
|
18447
|
+
])
|
|
18448
|
+
])
|
|
18449
|
+
], 64);
|
|
18405
18450
|
};
|
|
18406
18451
|
}
|
|
18407
18452
|
});
|
|
@@ -19004,7 +19049,7 @@ class WebValidator {
|
|
|
19004
19049
|
ifEmpty() {
|
|
19005
19050
|
this.required = true;
|
|
19006
19051
|
if (!this.message) {
|
|
19007
|
-
this.message = WebI18n.get().
|
|
19052
|
+
this.message = WebI18n.get().ConfirmToComplete;
|
|
19008
19053
|
}
|
|
19009
19054
|
return this;
|
|
19010
19055
|
}
|