@epie/bi-crud 2.0.17 → 2.0.23
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/lib/bi-crud.esm.js +575 -127
- package/lib/bi-crud.umd.js +574 -124
- package/lib/components/add-btn.d.ts +1 -1
- package/lib/components/adv-btn.d.ts +1 -1
- package/lib/components/adv-search.d.ts +2 -2
- package/lib/components/context-menu/index.d.ts +1 -1
- package/lib/components/crud/index.d.ts +1 -10
- package/lib/components/descriptions/descriptions.d.ts +2 -2
- package/lib/components/error-message.d.ts +1 -1
- package/lib/components/export-btn.d.ts +2 -2
- package/lib/components/filter-group.d.ts +1 -1
- package/lib/components/filter.d.ts +1 -1
- package/lib/components/flex1.d.ts +1 -1
- package/lib/components/form/form.d.ts +2 -2
- package/lib/components/form/index.d.ts +1 -1
- package/lib/components/inline-search/inlinesearch.d.ts +2 -2
- package/lib/components/multi-delete-btn.d.ts +1 -1
- package/lib/components/pagination.d.ts +1 -1
- package/lib/components/refresh-btn.d.ts +1 -1
- package/lib/components/upsert/index.d.ts +2 -2
- package/lib/hooks/core.d.ts +3 -0
- package/lib/hooks/i18n.d.ts +1 -0
- package/lib/locales/en-US.d.ts +73 -0
- package/lib/locales/zh-CN.d.ts +73 -0
- package/lib/types/base/crud.d.ts +11 -10
- package/lib/types/base/render.d.ts +3 -6
- package/lib/types/base/table.d.ts +1 -1
- package/lib/utils/form.d.ts +7 -0
- package/package.json +3 -2
package/lib/bi-crud.umd.js
CHANGED
|
@@ -8781,6 +8781,257 @@
|
|
|
8781
8781
|
|
|
8782
8782
|
};
|
|
8783
8783
|
|
|
8784
|
+
var en = {};
|
|
8785
|
+
|
|
8786
|
+
(function (exports) {
|
|
8787
|
+
|
|
8788
|
+
Object.defineProperty(exports, '__esModule', {
|
|
8789
|
+
value: true
|
|
8790
|
+
});
|
|
8791
|
+
var English = {
|
|
8792
|
+
name: "en",
|
|
8793
|
+
el: {
|
|
8794
|
+
colorpicker: {
|
|
8795
|
+
confirm: "OK",
|
|
8796
|
+
clear: "Clear",
|
|
8797
|
+
defaultLabel: "color picker",
|
|
8798
|
+
description: "current color is {color}. press enter to select a new color."
|
|
8799
|
+
},
|
|
8800
|
+
datepicker: {
|
|
8801
|
+
now: "Now",
|
|
8802
|
+
today: "Today",
|
|
8803
|
+
cancel: "Cancel",
|
|
8804
|
+
clear: "Clear",
|
|
8805
|
+
confirm: "OK",
|
|
8806
|
+
dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
|
|
8807
|
+
monthTablePrompt: "Use the arrow keys and enter to select the month",
|
|
8808
|
+
yearTablePrompt: "Use the arrow keys and enter to select the year",
|
|
8809
|
+
selectedDate: "Selected date",
|
|
8810
|
+
selectDate: "Select date",
|
|
8811
|
+
selectTime: "Select time",
|
|
8812
|
+
startDate: "Start Date",
|
|
8813
|
+
startTime: "Start Time",
|
|
8814
|
+
endDate: "End Date",
|
|
8815
|
+
endTime: "End Time",
|
|
8816
|
+
prevYear: "Previous Year",
|
|
8817
|
+
nextYear: "Next Year",
|
|
8818
|
+
prevMonth: "Previous Month",
|
|
8819
|
+
nextMonth: "Next Month",
|
|
8820
|
+
year: "",
|
|
8821
|
+
month1: "January",
|
|
8822
|
+
month2: "February",
|
|
8823
|
+
month3: "March",
|
|
8824
|
+
month4: "April",
|
|
8825
|
+
month5: "May",
|
|
8826
|
+
month6: "June",
|
|
8827
|
+
month7: "July",
|
|
8828
|
+
month8: "August",
|
|
8829
|
+
month9: "September",
|
|
8830
|
+
month10: "October",
|
|
8831
|
+
month11: "November",
|
|
8832
|
+
month12: "December",
|
|
8833
|
+
week: "week",
|
|
8834
|
+
weeks: {
|
|
8835
|
+
sun: "Sun",
|
|
8836
|
+
mon: "Mon",
|
|
8837
|
+
tue: "Tue",
|
|
8838
|
+
wed: "Wed",
|
|
8839
|
+
thu: "Thu",
|
|
8840
|
+
fri: "Fri",
|
|
8841
|
+
sat: "Sat"
|
|
8842
|
+
},
|
|
8843
|
+
weeksFull: {
|
|
8844
|
+
sun: "Sunday",
|
|
8845
|
+
mon: "Monday",
|
|
8846
|
+
tue: "Tuesday",
|
|
8847
|
+
wed: "Wednesday",
|
|
8848
|
+
thu: "Thursday",
|
|
8849
|
+
fri: "Friday",
|
|
8850
|
+
sat: "Saturday"
|
|
8851
|
+
},
|
|
8852
|
+
months: {
|
|
8853
|
+
jan: "Jan",
|
|
8854
|
+
feb: "Feb",
|
|
8855
|
+
mar: "Mar",
|
|
8856
|
+
apr: "Apr",
|
|
8857
|
+
may: "May",
|
|
8858
|
+
jun: "Jun",
|
|
8859
|
+
jul: "Jul",
|
|
8860
|
+
aug: "Aug",
|
|
8861
|
+
sep: "Sep",
|
|
8862
|
+
oct: "Oct",
|
|
8863
|
+
nov: "Nov",
|
|
8864
|
+
dec: "Dec"
|
|
8865
|
+
}
|
|
8866
|
+
},
|
|
8867
|
+
inputNumber: {
|
|
8868
|
+
decrease: "decrease number",
|
|
8869
|
+
increase: "increase number"
|
|
8870
|
+
},
|
|
8871
|
+
select: {
|
|
8872
|
+
loading: "Loading",
|
|
8873
|
+
noMatch: "No matching data",
|
|
8874
|
+
noData: "No data",
|
|
8875
|
+
placeholder: "Select"
|
|
8876
|
+
},
|
|
8877
|
+
dropdown: {
|
|
8878
|
+
toggleDropdown: "Toggle Dropdown"
|
|
8879
|
+
},
|
|
8880
|
+
cascader: {
|
|
8881
|
+
noMatch: "No matching data",
|
|
8882
|
+
loading: "Loading",
|
|
8883
|
+
placeholder: "Select",
|
|
8884
|
+
noData: "No data"
|
|
8885
|
+
},
|
|
8886
|
+
pagination: {
|
|
8887
|
+
goto: "Go to",
|
|
8888
|
+
pagesize: "/page",
|
|
8889
|
+
total: "Total {total}",
|
|
8890
|
+
pageClassifier: "",
|
|
8891
|
+
deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
|
|
8892
|
+
},
|
|
8893
|
+
dialog: {
|
|
8894
|
+
close: "Close this dialog"
|
|
8895
|
+
},
|
|
8896
|
+
drawer: {
|
|
8897
|
+
close: "Close this dialog"
|
|
8898
|
+
},
|
|
8899
|
+
messagebox: {
|
|
8900
|
+
title: "Message",
|
|
8901
|
+
confirm: "OK",
|
|
8902
|
+
cancel: "Cancel",
|
|
8903
|
+
error: "Illegal input",
|
|
8904
|
+
close: "Close this dialog"
|
|
8905
|
+
},
|
|
8906
|
+
upload: {
|
|
8907
|
+
deleteTip: "press delete to remove",
|
|
8908
|
+
delete: "Delete",
|
|
8909
|
+
preview: "Preview",
|
|
8910
|
+
continue: "Continue"
|
|
8911
|
+
},
|
|
8912
|
+
slider: {
|
|
8913
|
+
defaultLabel: "slider between {min} and {max}",
|
|
8914
|
+
defaultRangeStartLabel: "pick start value",
|
|
8915
|
+
defaultRangeEndLabel: "pick end value"
|
|
8916
|
+
},
|
|
8917
|
+
table: {
|
|
8918
|
+
emptyText: "No Data",
|
|
8919
|
+
confirmFilter: "Confirm",
|
|
8920
|
+
resetFilter: "Reset",
|
|
8921
|
+
clearFilter: "All",
|
|
8922
|
+
sumText: "Sum"
|
|
8923
|
+
},
|
|
8924
|
+
tree: {
|
|
8925
|
+
emptyText: "No Data"
|
|
8926
|
+
},
|
|
8927
|
+
transfer: {
|
|
8928
|
+
noMatch: "No matching data",
|
|
8929
|
+
noData: "No data",
|
|
8930
|
+
titles: ["List 1", "List 2"],
|
|
8931
|
+
filterPlaceholder: "Enter keyword",
|
|
8932
|
+
noCheckedFormat: "{total} items",
|
|
8933
|
+
hasCheckedFormat: "{checked}/{total} checked"
|
|
8934
|
+
},
|
|
8935
|
+
image: {
|
|
8936
|
+
error: "FAILED"
|
|
8937
|
+
},
|
|
8938
|
+
pageHeader: {
|
|
8939
|
+
title: "Back"
|
|
8940
|
+
},
|
|
8941
|
+
popconfirm: {
|
|
8942
|
+
confirmButtonText: "Yes",
|
|
8943
|
+
cancelButtonText: "No"
|
|
8944
|
+
}
|
|
8945
|
+
}
|
|
8946
|
+
};
|
|
8947
|
+
exports["default"] = English;
|
|
8948
|
+
})(en);
|
|
8949
|
+
|
|
8950
|
+
var English = /*@__PURE__*/getDefaultExportFromCjs(en);
|
|
8951
|
+
|
|
8952
|
+
var EnglishEpie = {
|
|
8953
|
+
epie: {
|
|
8954
|
+
crud: {
|
|
8955
|
+
add: "add",
|
|
8956
|
+
refresh: "refresh",
|
|
8957
|
+
edit: "edit",
|
|
8958
|
+
delete: "delete",
|
|
8959
|
+
multidelete: "multi-delete",
|
|
8960
|
+
select: "select",
|
|
8961
|
+
unselect: "unselect",
|
|
8962
|
+
action: "action",
|
|
8963
|
+
nomethodinservice: "no {name} method in service",
|
|
8964
|
+
responseformaterror: "reponse format error",
|
|
8965
|
+
order: {
|
|
8966
|
+
desc: "{name} - desc",
|
|
8967
|
+
asc: "{name} - asc"
|
|
8968
|
+
},
|
|
8969
|
+
actiondel: {
|
|
8970
|
+
tip: "tip",
|
|
8971
|
+
prompt: "This operation will permanently delete the selected data, continue?",
|
|
8972
|
+
cancel: "cancel",
|
|
8973
|
+
ok: "ok",
|
|
8974
|
+
success: "success"
|
|
8975
|
+
},
|
|
8976
|
+
descriptions: {
|
|
8977
|
+
title: "{title} - info"
|
|
8978
|
+
},
|
|
8979
|
+
form: {
|
|
8980
|
+
show: "show more",
|
|
8981
|
+
hide: "hide",
|
|
8982
|
+
title: "custom form",
|
|
8983
|
+
save: "save",
|
|
8984
|
+
cancel: "cancel",
|
|
8985
|
+
cannotbeempty: "{name} is required"
|
|
8986
|
+
},
|
|
8987
|
+
inlinesearch: {
|
|
8988
|
+
search: "search",
|
|
8989
|
+
reset: "reset"
|
|
8990
|
+
},
|
|
8991
|
+
upsert: {
|
|
8992
|
+
success: "save success",
|
|
8993
|
+
invalid: "[invalid] epie-upsert compoment not exists",
|
|
8994
|
+
edit: "edit",
|
|
8995
|
+
add: "add"
|
|
8996
|
+
},
|
|
8997
|
+
advsearch: {
|
|
8998
|
+
title: "adv search",
|
|
8999
|
+
search: "search",
|
|
9000
|
+
reset: "reset",
|
|
9001
|
+
clear: "clear",
|
|
9002
|
+
close: "close"
|
|
9003
|
+
},
|
|
9004
|
+
export: {
|
|
9005
|
+
label: "export",
|
|
9006
|
+
success: "export success",
|
|
9007
|
+
failed: "export failed, {msg}",
|
|
9008
|
+
ok: "ok",
|
|
9009
|
+
cancel: "cancel",
|
|
9010
|
+
prompt: "Will be exported according to the latest query criteria"
|
|
9011
|
+
},
|
|
9012
|
+
filtergroup: {
|
|
9013
|
+
search: "search",
|
|
9014
|
+
reset: "reset"
|
|
9015
|
+
},
|
|
9016
|
+
searchkey: {
|
|
9017
|
+
pleaseinput: "please input",
|
|
9018
|
+
pleaseinputkey: "please input keyword",
|
|
9019
|
+
search: "search"
|
|
9020
|
+
}
|
|
9021
|
+
}
|
|
9022
|
+
}
|
|
9023
|
+
};
|
|
9024
|
+
|
|
9025
|
+
const useLocale = () => {
|
|
9026
|
+
const locale = elementPlus.useGlobalConfig('locale');
|
|
9027
|
+
return elementPlus.buildLocaleContext(vue.computed(() => locale.value || { ...English,
|
|
9028
|
+
...EnglishEpie
|
|
9029
|
+
}));
|
|
9030
|
+
};
|
|
9031
|
+
|
|
9032
|
+
const {
|
|
9033
|
+
t: t$e
|
|
9034
|
+
} = useLocale();
|
|
8784
9035
|
function useHelper({
|
|
8785
9036
|
mitt,
|
|
8786
9037
|
props,
|
|
@@ -8861,7 +9112,9 @@
|
|
|
8861
9112
|
|
|
8862
9113
|
if (!crud.service[reqName]) {
|
|
8863
9114
|
done();
|
|
8864
|
-
return reject(
|
|
9115
|
+
return reject(t$e("epie.crud.nomethodinservice", {
|
|
9116
|
+
name: reqName
|
|
9117
|
+
}));
|
|
8865
9118
|
}
|
|
8866
9119
|
|
|
8867
9120
|
await crud.service[reqName](params).then(res => {
|
|
@@ -8870,7 +9123,7 @@
|
|
|
8870
9123
|
}
|
|
8871
9124
|
|
|
8872
9125
|
if (isString(res)) {
|
|
8873
|
-
return reject("
|
|
9126
|
+
return reject(t$e("epie.crud.responseformaterror"));
|
|
8874
9127
|
}
|
|
8875
9128
|
|
|
8876
9129
|
if (isArray(res)) {
|
|
@@ -8952,22 +9205,24 @@
|
|
|
8952
9205
|
|
|
8953
9206
|
function next(params) {
|
|
8954
9207
|
return new Promise((resolve, reject) => {
|
|
8955
|
-
elementPlus.ElMessageBox.confirm("
|
|
9208
|
+
elementPlus.ElMessageBox.confirm(t$e("epie.crud.actiondel.prompt"), t$e("epie.crud.actiondel.tip"), {
|
|
8956
9209
|
type: "warning",
|
|
8957
|
-
cancelButtonText: "
|
|
8958
|
-
confirmButtonText: "
|
|
9210
|
+
cancelButtonText: t$e("epie.crud.actiondel.cancel"),
|
|
9211
|
+
confirmButtonText: t$e("epie.crud.actiondel.ok")
|
|
8959
9212
|
}).then(res => {
|
|
8960
9213
|
if (res === "confirm") {
|
|
8961
9214
|
// 验证方法
|
|
8962
9215
|
if (!crud.service[reqName]) {
|
|
8963
|
-
return reject(
|
|
9216
|
+
return reject(t$e("epie.crud.nomethodinservice", {
|
|
9217
|
+
name: reqName
|
|
9218
|
+
}));
|
|
8964
9219
|
} // 发送请求
|
|
8965
9220
|
|
|
8966
9221
|
|
|
8967
9222
|
crud.service[reqName](params).then(res => {
|
|
8968
9223
|
// 重新刷新
|
|
8969
9224
|
refresh();
|
|
8970
|
-
elementPlus.ElMessage.success("
|
|
9225
|
+
elementPlus.ElMessage.success(t$e("epie.crud.actiondel.success"));
|
|
8971
9226
|
resolve(res);
|
|
8972
9227
|
}).catch(err => {
|
|
8973
9228
|
elementPlus.ElMessage.error(err.msg);
|
|
@@ -9144,26 +9399,25 @@
|
|
|
9144
9399
|
sort: {
|
|
9145
9400
|
order: "order",
|
|
9146
9401
|
prop: "prop"
|
|
9147
|
-
}
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9155
|
-
|
|
9156
|
-
|
|
9402
|
+
} //label: {
|
|
9403
|
+
// add: "新增",
|
|
9404
|
+
// delete: "删除",
|
|
9405
|
+
// multiDelete: "删除",
|
|
9406
|
+
// update: "编辑",
|
|
9407
|
+
// refresh: "刷新",
|
|
9408
|
+
// advSearch: "高级搜索",
|
|
9409
|
+
// export: "导出"
|
|
9410
|
+
//}
|
|
9411
|
+
|
|
9157
9412
|
},
|
|
9158
9413
|
// 权限
|
|
9159
|
-
permission: {
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
|
-
|
|
9165
|
-
|
|
9166
|
-
export: true
|
|
9414
|
+
permission: {// update: true,
|
|
9415
|
+
// page: true,
|
|
9416
|
+
// info: true,
|
|
9417
|
+
// list: true,
|
|
9418
|
+
// add: true,
|
|
9419
|
+
// delete: true,
|
|
9420
|
+
// export: true,
|
|
9167
9421
|
}
|
|
9168
9422
|
}, global?.crud)); // 集合
|
|
9169
9423
|
|
|
@@ -9228,6 +9482,7 @@
|
|
|
9228
9482
|
} = options || {};
|
|
9229
9483
|
const Crud = vue.ref();
|
|
9230
9484
|
useParent("epie-crud", Crud);
|
|
9485
|
+
const allPermission = usePermission();
|
|
9231
9486
|
vue.watch(() => Crud.value, val => {
|
|
9232
9487
|
if (val) {
|
|
9233
9488
|
if (options) {
|
|
@@ -9237,7 +9492,27 @@
|
|
|
9237
9492
|
});
|
|
9238
9493
|
val.set("dict", dict);
|
|
9239
9494
|
val.set("service", service);
|
|
9240
|
-
|
|
9495
|
+
|
|
9496
|
+
if (permission !== undefined) {
|
|
9497
|
+
const permToSet = {};
|
|
9498
|
+
|
|
9499
|
+
for (let key in permission) {
|
|
9500
|
+
permToSet[key] = allPermission.indexOf(permission[key]) > 0;
|
|
9501
|
+
}
|
|
9502
|
+
|
|
9503
|
+
val.set("permission", permToSet);
|
|
9504
|
+
} else {
|
|
9505
|
+
const permToSet = {
|
|
9506
|
+
update: true,
|
|
9507
|
+
page: true,
|
|
9508
|
+
info: true,
|
|
9509
|
+
list: true,
|
|
9510
|
+
add: true,
|
|
9511
|
+
delete: true,
|
|
9512
|
+
export: true
|
|
9513
|
+
};
|
|
9514
|
+
val.set("permission", permToSet);
|
|
9515
|
+
}
|
|
9241
9516
|
}
|
|
9242
9517
|
|
|
9243
9518
|
if (cb && Crud.value) {
|
|
@@ -9338,6 +9613,14 @@
|
|
|
9338
9613
|
crud,
|
|
9339
9614
|
mitt
|
|
9340
9615
|
};
|
|
9616
|
+
} // 设置权限
|
|
9617
|
+
|
|
9618
|
+
function useSetPermission(app, permissions) {
|
|
9619
|
+
app.provide("epie-permission", permissions);
|
|
9620
|
+
}
|
|
9621
|
+
function usePermission() {
|
|
9622
|
+
const permissions = vue.inject("epie-permission");
|
|
9623
|
+
return permissions;
|
|
9341
9624
|
}
|
|
9342
9625
|
|
|
9343
9626
|
function useBrowser(app) {
|
|
@@ -9398,6 +9681,9 @@
|
|
|
9398
9681
|
});
|
|
9399
9682
|
}
|
|
9400
9683
|
|
|
9684
|
+
const {
|
|
9685
|
+
t: t$d
|
|
9686
|
+
} = useLocale();
|
|
9401
9687
|
var AddBtn = vue.defineComponent({
|
|
9402
9688
|
name: "epie-add-btn",
|
|
9403
9689
|
|
|
@@ -9416,7 +9702,7 @@
|
|
|
9416
9702
|
"size": style.size,
|
|
9417
9703
|
"onClick": crud.rowAdd
|
|
9418
9704
|
}, {
|
|
9419
|
-
default: () => [slots.default ? slots.default() : crud.
|
|
9705
|
+
default: () => [slots.default ? slots.default() : t$d("epie.crud.add")]
|
|
9420
9706
|
});
|
|
9421
9707
|
};
|
|
9422
9708
|
}
|
|
@@ -9509,6 +9795,9 @@
|
|
|
9509
9795
|
|
|
9510
9796
|
var search_default = /* @__PURE__ */export_helper_default(_sfc_main220, [["render", _sfc_render220], ["__file", "search.vue"]]); // src/components/select.vue
|
|
9511
9797
|
|
|
9798
|
+
const {
|
|
9799
|
+
t: t$c
|
|
9800
|
+
} = useLocale();
|
|
9512
9801
|
var AdvBtn = vue.defineComponent({
|
|
9513
9802
|
name: "epie-adv-btn",
|
|
9514
9803
|
components: {
|
|
@@ -9535,13 +9824,23 @@
|
|
|
9535
9824
|
"style": "margin-right: 5px"
|
|
9536
9825
|
}, {
|
|
9537
9826
|
default: () => [vue.createVNode(vue.resolveComponent("search"), null, null)]
|
|
9538
|
-
}), slots.default ? slots.default() : crud.
|
|
9827
|
+
}), slots.default ? slots.default() : t$c("epie.crud.advsearch.title")]
|
|
9539
9828
|
});
|
|
9540
9829
|
};
|
|
9541
9830
|
}
|
|
9542
9831
|
|
|
9543
9832
|
});
|
|
9544
9833
|
|
|
9834
|
+
const getLabel = src => {
|
|
9835
|
+
if (isString(src)) {
|
|
9836
|
+
return {
|
|
9837
|
+
text: src
|
|
9838
|
+
};
|
|
9839
|
+
}
|
|
9840
|
+
|
|
9841
|
+
return src;
|
|
9842
|
+
};
|
|
9843
|
+
|
|
9545
9844
|
const Regs = new Map();
|
|
9546
9845
|
/**
|
|
9547
9846
|
* 解析节点
|
|
@@ -9581,18 +9880,19 @@
|
|
|
9581
9880
|
|
|
9582
9881
|
Regs.set(vnode.name, { ...vnode.vm
|
|
9583
9882
|
});
|
|
9584
|
-
}
|
|
9883
|
+
}
|
|
9585
9884
|
|
|
9885
|
+
let vnodeProps = vnode.props; // 处理 props
|
|
9586
9886
|
|
|
9587
9887
|
if (isFunction(vnode.props)) {
|
|
9588
|
-
|
|
9888
|
+
vnodeProps = vnode.props({
|
|
9589
9889
|
scope,
|
|
9590
9890
|
...options._data
|
|
9591
9891
|
});
|
|
9592
9892
|
} // 组件参数
|
|
9593
9893
|
|
|
9594
9894
|
|
|
9595
|
-
const props = { ...
|
|
9895
|
+
const props = { ...vnodeProps,
|
|
9596
9896
|
..._data,
|
|
9597
9897
|
scope
|
|
9598
9898
|
}; // 添加双向绑定
|
|
@@ -9668,7 +9968,7 @@
|
|
|
9668
9968
|
|
|
9669
9969
|
if (placeholder) {
|
|
9670
9970
|
if (!item.component.props.placeholder) {
|
|
9671
|
-
item.component.props.placeholder = placeholder + item.label;
|
|
9971
|
+
item.component.props.placeholder = placeholder + getLabel(item.label).text;
|
|
9672
9972
|
}
|
|
9673
9973
|
}
|
|
9674
9974
|
}
|
|
@@ -9723,6 +10023,12 @@
|
|
|
9723
10023
|
|
|
9724
10024
|
if (isArray(vnode.options)) {
|
|
9725
10025
|
list = vnode.options;
|
|
10026
|
+
}
|
|
10027
|
+
|
|
10028
|
+
if (scope[prop] !== undefined || scope[prop] !== null) {
|
|
10029
|
+
if (!isArray(scope[prop]) && list.filter(item => item.value === scope[prop]).length == 0) {
|
|
10030
|
+
delete scope[prop];
|
|
10031
|
+
}
|
|
9726
10032
|
} // 设置内容
|
|
9727
10033
|
|
|
9728
10034
|
|
|
@@ -9856,10 +10162,13 @@
|
|
|
9856
10162
|
}
|
|
9857
10163
|
}
|
|
9858
10164
|
|
|
9859
|
-
function _isSlot$
|
|
10165
|
+
function _isSlot$7(s) {
|
|
9860
10166
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
9861
10167
|
}
|
|
9862
10168
|
|
|
10169
|
+
const {
|
|
10170
|
+
t: t$b
|
|
10171
|
+
} = useLocale();
|
|
9863
10172
|
function useAction({
|
|
9864
10173
|
conf,
|
|
9865
10174
|
form,
|
|
@@ -10033,35 +10342,62 @@
|
|
|
10033
10342
|
function renderForm() {
|
|
10034
10343
|
// 表单项列表
|
|
10035
10344
|
const children = ctx.conf.items.map(e => {
|
|
10345
|
+
// 是否隐藏
|
|
10346
|
+
e._hidden = Parse("hidden", {
|
|
10347
|
+
value: e.hidden,
|
|
10348
|
+
scope: ctx.form,
|
|
10349
|
+
data: ctx.conf._data
|
|
10350
|
+
}); // 隐藏
|
|
10351
|
+
|
|
10352
|
+
if (e._hidden) {
|
|
10353
|
+
return null;
|
|
10354
|
+
}
|
|
10355
|
+
|
|
10036
10356
|
if (e.type == "tabs") {
|
|
10037
10357
|
return vue.createVNode(vue.resolveComponent("epie-form-tabs"), vue.mergeProps({
|
|
10038
10358
|
"modelValue": ctx.tabActive,
|
|
10039
10359
|
"onUpdate:modelValue": $event => ctx.tabActive = $event
|
|
10040
10360
|
}, e.props), null);
|
|
10041
|
-
}
|
|
10042
|
-
|
|
10361
|
+
} else if (e.type == "divider") {
|
|
10362
|
+
return vue.createVNode(vue.resolveComponent("el-divider"), vue.mergeProps(e.props, {
|
|
10363
|
+
"content-position": "left"
|
|
10364
|
+
}), {
|
|
10365
|
+
default: () => [e.label]
|
|
10366
|
+
});
|
|
10367
|
+
}
|
|
10043
10368
|
|
|
10044
|
-
|
|
10045
|
-
value: e.hidden,
|
|
10046
|
-
scope: ctx.form,
|
|
10047
|
-
data: ctx.conf._data
|
|
10048
|
-
}); // 分组显示
|
|
10369
|
+
let label = getLabel(e.label); // 分组显示
|
|
10049
10370
|
|
|
10050
10371
|
const inGroup = isEmpty(ctx.tabActive) || isEmpty(e.group) ? true : e.group === ctx.tabActive; // 表单项
|
|
10051
10372
|
|
|
10052
10373
|
const FormItem = e.component ? vue.h(vue.withDirectives(vue.createVNode(vue.resolveComponent("el-form-item"), {
|
|
10053
10374
|
"label-width": ctx.inline ? "auto" : "",
|
|
10054
|
-
"label":
|
|
10375
|
+
"label": label.text,
|
|
10055
10376
|
"prop": e.prop,
|
|
10056
10377
|
"rules": e.rules
|
|
10057
10378
|
}, null), [[vue.vShow, inGroup]]), e.props, {
|
|
10058
10379
|
label() {
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
|
|
10064
|
-
|
|
10380
|
+
let _slot;
|
|
10381
|
+
|
|
10382
|
+
return vue.createVNode(vue.resolveComponent("el-tooltip"), {
|
|
10383
|
+
"effect": "dark",
|
|
10384
|
+
"placement": "top",
|
|
10385
|
+
"content": label.tip,
|
|
10386
|
+
"disabled": !label.tip
|
|
10387
|
+
}, {
|
|
10388
|
+
default: () => [vue.createVNode("span", {
|
|
10389
|
+
"style": "vertical-align: middle"
|
|
10390
|
+
}, [label.text, label.icon && vue.createVNode(vue.resolveComponent("el-icon"), {
|
|
10391
|
+
"class": "el-icon--right"
|
|
10392
|
+
}, _isSlot$7(_slot = vue.h(label.icon, {})) ? _slot : {
|
|
10393
|
+
default: () => [_slot]
|
|
10394
|
+
})])]
|
|
10395
|
+
}); // return renderNode(e.label, {
|
|
10396
|
+
// scope: ctx.form,
|
|
10397
|
+
// render: "slot",
|
|
10398
|
+
// slots: ctx.$slots,
|
|
10399
|
+
// _data: ctx.conf._data
|
|
10400
|
+
// });
|
|
10065
10401
|
},
|
|
10066
10402
|
|
|
10067
10403
|
default() {
|
|
@@ -10087,9 +10423,9 @@
|
|
|
10087
10423
|
}, [vue.createVNode(vue.resolveComponent("el-divider"), {
|
|
10088
10424
|
"content-position": "center"
|
|
10089
10425
|
}, {
|
|
10090
|
-
default: () => [e.collapse ? vue.createVNode("span", null, [
|
|
10426
|
+
default: () => [e.collapse ? vue.createVNode("span", null, [t$b('epie.crud.form.show'), vue.createVNode("i", {
|
|
10091
10427
|
"class": "el-icon-arrow-down"
|
|
10092
|
-
}, null)]) : vue.createVNode("span", null, [
|
|
10428
|
+
}, null)]) : vue.createVNode("span", null, [t$b('epie.crud.form.hide'), vue.createVNode("i", {
|
|
10093
10429
|
"class": "el-icon-arrow-up"
|
|
10094
10430
|
}, null)])]
|
|
10095
10431
|
})])]);
|
|
@@ -10108,7 +10444,7 @@
|
|
|
10108
10444
|
|
|
10109
10445
|
return vue.createVNode(vue.resolveComponent("el-col"), vue.mergeProps({
|
|
10110
10446
|
"span": baseSpan
|
|
10111
|
-
}, e), _isSlot$
|
|
10447
|
+
}, e), _isSlot$7(FormItem) ? FormItem : {
|
|
10112
10448
|
default: () => [FormItem]
|
|
10113
10449
|
});
|
|
10114
10450
|
}); // el-form
|
|
@@ -10127,7 +10463,7 @@
|
|
|
10127
10463
|
default: () => {
|
|
10128
10464
|
return ctx.inline ? children : vue.withDirectives(vue.createVNode(vue.resolveComponent("el-row"), {
|
|
10129
10465
|
"gutter": 10
|
|
10130
|
-
}, _isSlot$
|
|
10466
|
+
}, _isSlot$7(children) ? children : {
|
|
10131
10467
|
default: () => [children]
|
|
10132
10468
|
}), [[vue.resolveDirective("loading"), ctx.loading]]);
|
|
10133
10469
|
}
|
|
@@ -10155,14 +10491,14 @@
|
|
|
10155
10491
|
"onClick": () => {
|
|
10156
10492
|
ctx.submit();
|
|
10157
10493
|
}
|
|
10158
|
-
}, _isSlot$
|
|
10494
|
+
}, _isSlot$7(saveButtonText) ? saveButtonText : {
|
|
10159
10495
|
default: () => [saveButtonText]
|
|
10160
10496
|
});
|
|
10161
10497
|
} else if (vnode == "close") {
|
|
10162
10498
|
return vue.createVNode(vue.resolveComponent("el-button"), {
|
|
10163
10499
|
"size": style.size,
|
|
10164
10500
|
"onClick": ctx.close
|
|
10165
|
-
}, _isSlot$
|
|
10501
|
+
}, _isSlot$7(closeButtonText) ? closeButtonText : {
|
|
10166
10502
|
default: () => [closeButtonText]
|
|
10167
10503
|
});
|
|
10168
10504
|
} else {
|
|
@@ -10206,6 +10542,9 @@
|
|
|
10206
10542
|
};
|
|
10207
10543
|
}
|
|
10208
10544
|
|
|
10545
|
+
const {
|
|
10546
|
+
t: t$a
|
|
10547
|
+
} = useLocale();
|
|
10209
10548
|
var AdvSearch = vue.defineComponent({
|
|
10210
10549
|
name: "epie-adv-search",
|
|
10211
10550
|
components: {
|
|
@@ -10220,7 +10559,7 @@
|
|
|
10220
10559
|
// 标题
|
|
10221
10560
|
title: {
|
|
10222
10561
|
type: String,
|
|
10223
|
-
default: "
|
|
10562
|
+
default: ""
|
|
10224
10563
|
},
|
|
10225
10564
|
// 窗体大小
|
|
10226
10565
|
size: {
|
|
@@ -10336,10 +10675,10 @@
|
|
|
10336
10675
|
|
|
10337
10676
|
function renderFooter() {
|
|
10338
10677
|
const btns = {
|
|
10339
|
-
search: "
|
|
10340
|
-
reset: "
|
|
10341
|
-
clear: "
|
|
10342
|
-
close: "
|
|
10678
|
+
search: t$a("epie.crud.advsearch.search"),
|
|
10679
|
+
reset: t$a("epie.crud.advsearch.reset"),
|
|
10680
|
+
clear: t$a("epie.crud.advsearch.clear"),
|
|
10681
|
+
close: t$a("epie.crud.advsearch.close")
|
|
10343
10682
|
};
|
|
10344
10683
|
return ctx.op.map(e => {
|
|
10345
10684
|
if (btns[e]) {
|
|
@@ -10526,6 +10865,9 @@
|
|
|
10526
10865
|
|
|
10527
10866
|
};
|
|
10528
10867
|
|
|
10868
|
+
const {
|
|
10869
|
+
t: t$9
|
|
10870
|
+
} = useLocale();
|
|
10529
10871
|
var Form = vue.defineComponent({
|
|
10530
10872
|
name: "epie-form",
|
|
10531
10873
|
props: {
|
|
@@ -10545,7 +10887,7 @@
|
|
|
10545
10887
|
const tabActive = vue.ref(null); // 表单配置
|
|
10546
10888
|
|
|
10547
10889
|
const conf = vue.reactive({
|
|
10548
|
-
title: "
|
|
10890
|
+
title: t$9("epie.crud.form.title"),
|
|
10549
10891
|
width: "50%",
|
|
10550
10892
|
props: {
|
|
10551
10893
|
labelWidth: 100
|
|
@@ -10554,8 +10896,8 @@
|
|
|
10554
10896
|
on: {},
|
|
10555
10897
|
op: {
|
|
10556
10898
|
hidden: false,
|
|
10557
|
-
saveButtonText: "
|
|
10558
|
-
closeButtonText: "
|
|
10899
|
+
saveButtonText: t$9("epie.crud.form.save"),
|
|
10900
|
+
closeButtonText: t$9("epie.crud.form.cancel"),
|
|
10559
10901
|
buttons: ["close", "save"]
|
|
10560
10902
|
},
|
|
10561
10903
|
dialog: {
|
|
@@ -10763,8 +11105,31 @@
|
|
|
10763
11105
|
conf.items.map(e => {
|
|
10764
11106
|
if (e.prop) {
|
|
10765
11107
|
// 解析 prop
|
|
11108
|
+
// 先不处理
|
|
11109
|
+
const oldProp = e.prop;
|
|
11110
|
+
e.origProp = e.prop;
|
|
11111
|
+
|
|
10766
11112
|
if (e.prop.includes(".")) {
|
|
10767
11113
|
e.prop = e.prop.replace(/\./g, "-");
|
|
11114
|
+
let lastScope = form;
|
|
11115
|
+
let lastKey = oldProp;
|
|
11116
|
+
|
|
11117
|
+
if (oldProp.indexOf(".") > 0) {
|
|
11118
|
+
const keys = oldProp.split(".");
|
|
11119
|
+
lastKey = keys.pop();
|
|
11120
|
+
keys.forEach(sec => {
|
|
11121
|
+
lastScope[sec] = isObject(lastScope[sec]) ? lastScope[sec] : {};
|
|
11122
|
+
lastScope = lastScope[sec];
|
|
11123
|
+
});
|
|
11124
|
+
} else {
|
|
11125
|
+
lastScope = form;
|
|
11126
|
+
lastKey = oldProp;
|
|
11127
|
+
}
|
|
11128
|
+
|
|
11129
|
+
form[e.prop] = lastScope[lastKey]; // props.modelValue = lastScope[lastKey];
|
|
11130
|
+
//props["onUpdate:modelValue"] = function (val: any) {
|
|
11131
|
+
// lastScope[lastKey] = val;
|
|
11132
|
+
//};
|
|
10768
11133
|
} // prop 合并
|
|
10769
11134
|
|
|
10770
11135
|
|
|
@@ -10785,7 +11150,9 @@
|
|
|
10785
11150
|
if (e.required) {
|
|
10786
11151
|
e.rules = {
|
|
10787
11152
|
required: true,
|
|
10788
|
-
message:
|
|
11153
|
+
message: t$9("epie.crud.form.cannotbeempty", {
|
|
11154
|
+
name: getLabel(e.label).text || ""
|
|
11155
|
+
})
|
|
10789
11156
|
};
|
|
10790
11157
|
}
|
|
10791
11158
|
} // 设置 tabs 默认值
|
|
@@ -10812,10 +11179,29 @@
|
|
|
10812
11179
|
function bindForm(data) {
|
|
10813
11180
|
const d = {};
|
|
10814
11181
|
conf.items.forEach(e => {
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
|
|
10818
|
-
|
|
11182
|
+
if (e.prop) {
|
|
11183
|
+
let lastScope = data;
|
|
11184
|
+
let lastKey = e.origProp;
|
|
11185
|
+
|
|
11186
|
+
if ((e.origProp || e.prop).indexOf(".") > 0) {
|
|
11187
|
+
const keys = e.origProp.split(".");
|
|
11188
|
+
lastKey = keys.pop();
|
|
11189
|
+
keys.forEach(sec => {
|
|
11190
|
+
lastScope[sec] = isObject(lastScope[sec]) ? lastScope[sec] : {};
|
|
11191
|
+
lastScope = lastScope[sec];
|
|
11192
|
+
});
|
|
11193
|
+
} else {
|
|
11194
|
+
lastScope = data;
|
|
11195
|
+
lastKey = e.origProp || e.prop;
|
|
11196
|
+
}
|
|
11197
|
+
|
|
11198
|
+
data[e.prop] = lastScope[lastKey];
|
|
11199
|
+
d[e.prop] = e.hook ? FormHook.bind({
|
|
11200
|
+
hook: e.hook,
|
|
11201
|
+
value: data[e.prop],
|
|
11202
|
+
form: data
|
|
11203
|
+
}) : data[e.prop];
|
|
11204
|
+
}
|
|
10819
11205
|
});
|
|
10820
11206
|
Object.assign(form, data, d);
|
|
10821
11207
|
} // 切换 epie-form-tab
|
|
@@ -11033,6 +11419,9 @@
|
|
|
11033
11419
|
|
|
11034
11420
|
});
|
|
11035
11421
|
|
|
11422
|
+
const {
|
|
11423
|
+
t: t$8
|
|
11424
|
+
} = useLocale();
|
|
11036
11425
|
var MultiDeleteBtn = vue.defineComponent({
|
|
11037
11426
|
name: "epie-multi-delete-btn",
|
|
11038
11427
|
|
|
@@ -11054,7 +11443,7 @@
|
|
|
11054
11443
|
crud.rowDelete(...crud.selection);
|
|
11055
11444
|
}
|
|
11056
11445
|
}, {
|
|
11057
|
-
default: () => [slots.default ? slots.default() : crud.
|
|
11446
|
+
default: () => [slots.default ? slots.default() : t$8("epie.crud.multidelete")]
|
|
11058
11447
|
});
|
|
11059
11448
|
};
|
|
11060
11449
|
}
|
|
@@ -11244,6 +11633,9 @@
|
|
|
11244
11633
|
|
|
11245
11634
|
});
|
|
11246
11635
|
|
|
11636
|
+
const {
|
|
11637
|
+
t: t$7
|
|
11638
|
+
} = useLocale();
|
|
11247
11639
|
var RefreshBtn = vue.defineComponent({
|
|
11248
11640
|
name: "epie-refresh-btn",
|
|
11249
11641
|
|
|
@@ -11263,13 +11655,20 @@
|
|
|
11263
11655
|
crud.refresh();
|
|
11264
11656
|
}
|
|
11265
11657
|
}, {
|
|
11266
|
-
default: () => [slots.default ? slots.default() : crud.
|
|
11658
|
+
default: () => [slots.default ? slots.default() : t$7("epie.crud.refresh")]
|
|
11267
11659
|
});
|
|
11268
11660
|
};
|
|
11269
11661
|
}
|
|
11270
11662
|
|
|
11271
11663
|
});
|
|
11272
11664
|
|
|
11665
|
+
function _isSlot$6(s) {
|
|
11666
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
11667
|
+
}
|
|
11668
|
+
|
|
11669
|
+
const {
|
|
11670
|
+
t: t$6
|
|
11671
|
+
} = useLocale();
|
|
11273
11672
|
var ExportBtn = vue.defineComponent({
|
|
11274
11673
|
name: "epie-export-btn",
|
|
11275
11674
|
props: {
|
|
@@ -11334,13 +11733,15 @@
|
|
|
11334
11733
|
if (res && res.code === 0) {
|
|
11335
11734
|
elementPlus.ElMessage({
|
|
11336
11735
|
type: 'success',
|
|
11337
|
-
message:
|
|
11736
|
+
message: t$6("epie.crud.export.success")
|
|
11338
11737
|
});
|
|
11339
11738
|
window.open(res.data);
|
|
11340
11739
|
} else {
|
|
11341
11740
|
elementPlus.ElMessage({
|
|
11342
11741
|
type: 'error',
|
|
11343
|
-
message:
|
|
11742
|
+
message: t$6("epie.crud.export.failed", {
|
|
11743
|
+
msg: res.msg
|
|
11744
|
+
})
|
|
11344
11745
|
});
|
|
11345
11746
|
}
|
|
11346
11747
|
|
|
@@ -11353,7 +11754,9 @@
|
|
|
11353
11754
|
|
|
11354
11755
|
if (!crud.service[reqName]) {
|
|
11355
11756
|
done();
|
|
11356
|
-
return reject(
|
|
11757
|
+
return reject(t$6("epie.crud.nomethodinservice", {
|
|
11758
|
+
name: reqName
|
|
11759
|
+
}));
|
|
11357
11760
|
}
|
|
11358
11761
|
|
|
11359
11762
|
const data = paramsReplaceExport(crud.getParams()); // 发送请求
|
|
@@ -11386,7 +11789,7 @@
|
|
|
11386
11789
|
exportVisible,
|
|
11387
11790
|
exportLoading,
|
|
11388
11791
|
onExport,
|
|
11389
|
-
label: crud.
|
|
11792
|
+
label: t$6("epie.crud.export.label"),
|
|
11390
11793
|
slots: slots
|
|
11391
11794
|
};
|
|
11392
11795
|
},
|
|
@@ -11401,24 +11804,28 @@
|
|
|
11401
11804
|
}, null), {
|
|
11402
11805
|
visible: ctx.exportVisible
|
|
11403
11806
|
}, {
|
|
11404
|
-
default: () =>
|
|
11405
|
-
|
|
11406
|
-
|
|
11407
|
-
"
|
|
11408
|
-
|
|
11409
|
-
"
|
|
11410
|
-
|
|
11411
|
-
|
|
11412
|
-
|
|
11413
|
-
|
|
11414
|
-
"
|
|
11415
|
-
|
|
11416
|
-
"
|
|
11417
|
-
|
|
11418
|
-
|
|
11419
|
-
|
|
11420
|
-
|
|
11421
|
-
|
|
11807
|
+
default: () => {
|
|
11808
|
+
let _slot, _slot2;
|
|
11809
|
+
|
|
11810
|
+
return vue.createVNode(vue.Fragment, null, [vue.createVNode("p", null, [t$6("epie.crud.export.prompt")]), vue.createVNode("div", {
|
|
11811
|
+
"style": "text-align: right; margin-top: 8px;"
|
|
11812
|
+
}, [vue.createVNode(vue.resolveComponent("el-button"), {
|
|
11813
|
+
"size": "small",
|
|
11814
|
+
"type": "primary",
|
|
11815
|
+
"link": true,
|
|
11816
|
+
"onClick": () => ctx.exportVisible = false
|
|
11817
|
+
}, _isSlot$6(_slot = t$6("epie.crud.export.cancel")) ? _slot : {
|
|
11818
|
+
default: () => [_slot]
|
|
11819
|
+
}), vue.createVNode(vue.resolveComponent("el-button"), vue.mergeProps({
|
|
11820
|
+
"size": "small",
|
|
11821
|
+
"type": "primary",
|
|
11822
|
+
"onClick": ctx.onExport
|
|
11823
|
+
}, {
|
|
11824
|
+
loading: ctx.exportLoading
|
|
11825
|
+
}), _isSlot$6(_slot2 = t$6("epie.crud.export.ok")) ? _slot2 : {
|
|
11826
|
+
default: () => [_slot2]
|
|
11827
|
+
})])]);
|
|
11828
|
+
},
|
|
11422
11829
|
reference: () => vue.createVNode(vue.resolveComponent("el-button"), {
|
|
11423
11830
|
"type": "primary",
|
|
11424
11831
|
"size": style.size,
|
|
@@ -11430,10 +11837,13 @@
|
|
|
11430
11837
|
}
|
|
11431
11838
|
});
|
|
11432
11839
|
|
|
11433
|
-
function _isSlot$
|
|
11840
|
+
function _isSlot$5(s) {
|
|
11434
11841
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
11435
11842
|
}
|
|
11436
11843
|
|
|
11844
|
+
const {
|
|
11845
|
+
t: t$5
|
|
11846
|
+
} = useLocale();
|
|
11437
11847
|
var SearchKey = vue.defineComponent({
|
|
11438
11848
|
name: "epie-search-key",
|
|
11439
11849
|
props: {
|
|
@@ -11470,9 +11880,9 @@
|
|
|
11470
11880
|
return props.placeholder;
|
|
11471
11881
|
} else {
|
|
11472
11882
|
if (props.fieldList.length > 0) {
|
|
11473
|
-
return "
|
|
11883
|
+
return t$5("epie.crud.searchkey.pleaseinput");
|
|
11474
11884
|
} else {
|
|
11475
|
-
return "
|
|
11885
|
+
return t$5("epie.crud.searchkey.pleaseinputkey");
|
|
11476
11886
|
}
|
|
11477
11887
|
}
|
|
11478
11888
|
}); // 搜索内容
|
|
@@ -11542,7 +11952,7 @@
|
|
|
11542
11952
|
},
|
|
11543
11953
|
|
|
11544
11954
|
render(ctx) {
|
|
11545
|
-
let _slot;
|
|
11955
|
+
let _slot, _slot2;
|
|
11546
11956
|
|
|
11547
11957
|
const {
|
|
11548
11958
|
style
|
|
@@ -11556,7 +11966,7 @@
|
|
|
11556
11966
|
"modelValue": ctx.selectField,
|
|
11557
11967
|
"onUpdate:modelValue": $event => ctx.selectField = $event,
|
|
11558
11968
|
"onChange": ctx.onFieldChange
|
|
11559
|
-
}, _isSlot$
|
|
11969
|
+
}, _isSlot$5(_slot = ctx.fieldList.map((e, i) => vue.createVNode(vue.resolveComponent("el-option"), {
|
|
11560
11970
|
"key": i,
|
|
11561
11971
|
"label": e.label,
|
|
11562
11972
|
"value": e.value
|
|
@@ -11576,8 +11986,8 @@
|
|
|
11576
11986
|
"size": style.size,
|
|
11577
11987
|
"type": "primary",
|
|
11578
11988
|
"onClick": ctx.search
|
|
11579
|
-
}, {
|
|
11580
|
-
default: () => [
|
|
11989
|
+
}, _isSlot$5(_slot2 = t$5("epie.crud.searchkey.search")) ? _slot2 : {
|
|
11990
|
+
default: () => [_slot2]
|
|
11581
11991
|
})]);
|
|
11582
11992
|
}
|
|
11583
11993
|
|
|
@@ -11808,10 +12218,13 @@
|
|
|
11808
12218
|
|
|
11809
12219
|
};
|
|
11810
12220
|
|
|
11811
|
-
function _isSlot$
|
|
12221
|
+
function _isSlot$4(s) {
|
|
11812
12222
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
11813
12223
|
}
|
|
11814
12224
|
|
|
12225
|
+
const {
|
|
12226
|
+
t: t$4
|
|
12227
|
+
} = useLocale();
|
|
11815
12228
|
function useElTable({
|
|
11816
12229
|
Table
|
|
11817
12230
|
}) {
|
|
@@ -11940,7 +12353,7 @@
|
|
|
11940
12353
|
switch (e) {
|
|
11941
12354
|
case "refresh":
|
|
11942
12355
|
return {
|
|
11943
|
-
label: "
|
|
12356
|
+
label: t$4("epie.crud.refresh"),
|
|
11944
12357
|
|
|
11945
12358
|
callback(done) {
|
|
11946
12359
|
crud.refresh();
|
|
@@ -11952,7 +12365,7 @@
|
|
|
11952
12365
|
case "edit":
|
|
11953
12366
|
case "update":
|
|
11954
12367
|
return {
|
|
11955
|
-
label: "
|
|
12368
|
+
label: t$4("epie.crud.edit"),
|
|
11956
12369
|
hidden: !crud.getPermission("update"),
|
|
11957
12370
|
|
|
11958
12371
|
callback(done) {
|
|
@@ -11964,7 +12377,7 @@
|
|
|
11964
12377
|
|
|
11965
12378
|
case "delete":
|
|
11966
12379
|
return {
|
|
11967
|
-
label: "
|
|
12380
|
+
label: t$4("epie.crud.delete"),
|
|
11968
12381
|
hidden: !crud.getPermission("delete"),
|
|
11969
12382
|
|
|
11970
12383
|
callback(done) {
|
|
@@ -11976,7 +12389,7 @@
|
|
|
11976
12389
|
|
|
11977
12390
|
case "check":
|
|
11978
12391
|
return {
|
|
11979
|
-
label: crud.selection.find(e => e.id == row.id) ? "
|
|
12392
|
+
label: crud.selection.find(e => e.id == row.id) ? t$4("epie.crud.unselect") : t$4("epie.crud.select"),
|
|
11980
12393
|
hidden: !props.columns.find(e => e.type === "selection"),
|
|
11981
12394
|
|
|
11982
12395
|
callback(done) {
|
|
@@ -11988,7 +12401,9 @@
|
|
|
11988
12401
|
|
|
11989
12402
|
case "order-desc":
|
|
11990
12403
|
return {
|
|
11991
|
-
label:
|
|
12404
|
+
label: t$4("epie.crud.order.desc", {
|
|
12405
|
+
name: column.label
|
|
12406
|
+
}),
|
|
11992
12407
|
hidden: !column.sortable,
|
|
11993
12408
|
|
|
11994
12409
|
callback(done) {
|
|
@@ -12000,7 +12415,9 @@
|
|
|
12000
12415
|
|
|
12001
12416
|
case "order-asc":
|
|
12002
12417
|
return {
|
|
12003
|
-
label:
|
|
12418
|
+
label: t$4("epie.crud.order.asc", {
|
|
12419
|
+
name: column.label
|
|
12420
|
+
}),
|
|
12004
12421
|
hidden: !column.sortable,
|
|
12005
12422
|
|
|
12006
12423
|
callback(done) {
|
|
@@ -12114,7 +12531,7 @@
|
|
|
12114
12531
|
|
|
12115
12532
|
if (item.type === "op") {
|
|
12116
12533
|
return vue.h(ElTableColumn, {
|
|
12117
|
-
label: "
|
|
12534
|
+
label: t$4("epie.crud.action"),
|
|
12118
12535
|
width: "160px",
|
|
12119
12536
|
fixed: browser.isMini ? null : "right",
|
|
12120
12537
|
...item
|
|
@@ -12124,6 +12541,8 @@
|
|
|
12124
12541
|
"class": "epie-table__op"
|
|
12125
12542
|
}, [(item.buttons || ["edit", "delete"]).map(vnode => {
|
|
12126
12543
|
if (vnode === "edit") {
|
|
12544
|
+
let _slot;
|
|
12545
|
+
|
|
12127
12546
|
return vue.withDirectives(vue.createVNode(vue.resolveComponent("el-button"), {
|
|
12128
12547
|
"text": true,
|
|
12129
12548
|
"bg": true,
|
|
@@ -12132,10 +12551,12 @@
|
|
|
12132
12551
|
"onClick": () => {
|
|
12133
12552
|
crud.rowEdit(scope.row);
|
|
12134
12553
|
}
|
|
12135
|
-
}, {
|
|
12136
|
-
default: () => [
|
|
12554
|
+
}, _isSlot$4(_slot = t$4("epie.crud.edit")) ? _slot : {
|
|
12555
|
+
default: () => [_slot]
|
|
12137
12556
|
}), [[vue.vShow, crud.getPermission("update")]]);
|
|
12138
12557
|
} else if (vnode === "delete") {
|
|
12558
|
+
let _slot2;
|
|
12559
|
+
|
|
12139
12560
|
return vue.withDirectives(vue.createVNode(vue.resolveComponent("el-button"), {
|
|
12140
12561
|
"text": true,
|
|
12141
12562
|
"bg": true,
|
|
@@ -12144,8 +12565,8 @@
|
|
|
12144
12565
|
"onClick": () => {
|
|
12145
12566
|
crud.rowDelete(scope.row);
|
|
12146
12567
|
}
|
|
12147
|
-
}, {
|
|
12148
|
-
default: () => [
|
|
12568
|
+
}, _isSlot$4(_slot2 = t$4("epie.crud.delete")) ? _slot2 : {
|
|
12569
|
+
default: () => [_slot2]
|
|
12149
12570
|
}), [[vue.vShow, crud.getPermission("delete")]]);
|
|
12150
12571
|
} else {
|
|
12151
12572
|
return renderNode(vnode, {
|
|
@@ -12230,6 +12651,8 @@
|
|
|
12230
12651
|
return vue.h(ElTag, d, {
|
|
12231
12652
|
default: () => d.label
|
|
12232
12653
|
});
|
|
12654
|
+
} else if (vue.isVNode(d?.label)) {
|
|
12655
|
+
return vue.h(d?.label);
|
|
12233
12656
|
} else if (d) {
|
|
12234
12657
|
return vue.createVNode(vue.resolveComponent("el-tag"), {
|
|
12235
12658
|
"style": "margin: 0 2px"
|
|
@@ -12239,7 +12662,7 @@
|
|
|
12239
12662
|
} else if (!!v) {
|
|
12240
12663
|
return vue.createVNode(vue.resolveComponent("el-tag"), {
|
|
12241
12664
|
"style": "margin: 0 2px"
|
|
12242
|
-
}, _isSlot$
|
|
12665
|
+
}, _isSlot$4(v) ? v : {
|
|
12243
12666
|
default: () => [v]
|
|
12244
12667
|
});
|
|
12245
12668
|
} else {
|
|
@@ -12487,6 +12910,9 @@
|
|
|
12487
12910
|
|
|
12488
12911
|
});
|
|
12489
12912
|
|
|
12913
|
+
const {
|
|
12914
|
+
t: t$3
|
|
12915
|
+
} = useLocale();
|
|
12490
12916
|
var Upsert = vue.defineComponent({
|
|
12491
12917
|
name: "epie-upsert",
|
|
12492
12918
|
props: {
|
|
@@ -12566,13 +12992,15 @@
|
|
|
12566
12992
|
|
|
12567
12993
|
if (!crud.service[reqName]) {
|
|
12568
12994
|
done();
|
|
12569
|
-
return reject(
|
|
12995
|
+
return reject(t$3("epie.crud.nomethodinservice", {
|
|
12996
|
+
name: reqName
|
|
12997
|
+
}));
|
|
12570
12998
|
} // 发送请求
|
|
12571
12999
|
|
|
12572
13000
|
|
|
12573
13001
|
crud.service[reqName](data).then(res => {
|
|
12574
13002
|
if (res && res.code === 0) {
|
|
12575
|
-
elementPlus.ElMessage.success("
|
|
13003
|
+
elementPlus.ElMessage.success(t$3("epie.crud.upsert.success"));
|
|
12576
13004
|
done();
|
|
12577
13005
|
close();
|
|
12578
13006
|
crud.refresh();
|
|
@@ -12604,11 +13032,11 @@
|
|
|
12604
13032
|
function open() {
|
|
12605
13033
|
return new Promise(resolve => {
|
|
12606
13034
|
if (!Form.value) {
|
|
12607
|
-
return console.error("
|
|
13035
|
+
return console.error(t$3("epie.crud.upsert.invalid"));
|
|
12608
13036
|
}
|
|
12609
13037
|
|
|
12610
13038
|
Form.value?.open({
|
|
12611
|
-
title: isEdit.value ? "
|
|
13039
|
+
title: isEdit.value ? t$3("epie.crud.upsert.edit") : t$3("epie.crud.upsert.add"),
|
|
12612
13040
|
props: props.props,
|
|
12613
13041
|
op: props.op,
|
|
12614
13042
|
dialog: props.dialog,
|
|
@@ -12699,14 +13127,15 @@
|
|
|
12699
13127
|
|
|
12700
13128
|
if (!crud.service[reqName]) {
|
|
12701
13129
|
done();
|
|
12702
|
-
return reject(
|
|
13130
|
+
return reject(t$3("epie.crud.nomethodinservice", {
|
|
13131
|
+
name: reqName
|
|
13132
|
+
}));
|
|
12703
13133
|
} // 发送请求
|
|
12704
13134
|
|
|
12705
13135
|
|
|
12706
13136
|
await crud.service[reqName]({
|
|
12707
13137
|
id: data.id
|
|
12708
13138
|
}).then(res => {
|
|
12709
|
-
done(res.data);
|
|
12710
13139
|
resolve(res.data);
|
|
12711
13140
|
}).catch(err => {
|
|
12712
13141
|
elementPlus.ElMessage.error(err.msg);
|
|
@@ -12725,7 +13154,9 @@
|
|
|
12725
13154
|
done
|
|
12726
13155
|
});
|
|
12727
13156
|
} else {
|
|
12728
|
-
next(data)
|
|
13157
|
+
next(data).then(newdata => {
|
|
13158
|
+
done(newdata);
|
|
13159
|
+
});
|
|
12729
13160
|
}
|
|
12730
13161
|
} // 返回值
|
|
12731
13162
|
|
|
@@ -13018,6 +13449,13 @@
|
|
|
13018
13449
|
|
|
13019
13450
|
});
|
|
13020
13451
|
|
|
13452
|
+
function _isSlot$3(s) {
|
|
13453
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
13454
|
+
}
|
|
13455
|
+
|
|
13456
|
+
const {
|
|
13457
|
+
t: t$2
|
|
13458
|
+
} = useLocale();
|
|
13021
13459
|
var FilterGroup = vue.defineComponent({
|
|
13022
13460
|
name: "epie-filter-group",
|
|
13023
13461
|
props: {
|
|
@@ -13095,6 +13533,8 @@
|
|
|
13095
13533
|
},
|
|
13096
13534
|
|
|
13097
13535
|
render(ctx) {
|
|
13536
|
+
let _slot, _slot2;
|
|
13537
|
+
|
|
13098
13538
|
const {
|
|
13099
13539
|
style
|
|
13100
13540
|
} = useTools();
|
|
@@ -13113,13 +13553,13 @@
|
|
|
13113
13553
|
"loading": ctx.loading,
|
|
13114
13554
|
"size": style.size,
|
|
13115
13555
|
"onClick": ctx.search
|
|
13116
|
-
}, {
|
|
13117
|
-
default: () => [
|
|
13556
|
+
}, _isSlot$3(_slot = t$2("epie.crud.filtergroup.search")) ? _slot : {
|
|
13557
|
+
default: () => [_slot]
|
|
13118
13558
|
}), ctx.resetBtn && vue.createVNode(vue.resolveComponent("el-button"), {
|
|
13119
13559
|
"size": style.size,
|
|
13120
13560
|
"onClick": ctx.reset
|
|
13121
|
-
}, {
|
|
13122
|
-
default: () => [
|
|
13561
|
+
}, _isSlot$3(_slot2 = t$2("epie.crud.filtergroup.reset")) ? _slot2 : {
|
|
13562
|
+
default: () => [_slot2]
|
|
13123
13563
|
})])]);
|
|
13124
13564
|
}
|
|
13125
13565
|
|
|
@@ -13146,6 +13586,9 @@
|
|
|
13146
13586
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
13147
13587
|
}
|
|
13148
13588
|
|
|
13589
|
+
const {
|
|
13590
|
+
t: t$1
|
|
13591
|
+
} = useLocale();
|
|
13149
13592
|
function useRender$1(ctx) {
|
|
13150
13593
|
const {
|
|
13151
13594
|
browser,
|
|
@@ -13262,8 +13705,8 @@
|
|
|
13262
13705
|
|
|
13263
13706
|
function renderOp() {
|
|
13264
13707
|
const ButtonText = {
|
|
13265
|
-
search: "
|
|
13266
|
-
reset: "
|
|
13708
|
+
search: t$1("epie.crud.inlinesearch.search"),
|
|
13709
|
+
reset: t$1("epie.crud.inlinesearch.reset")
|
|
13267
13710
|
};
|
|
13268
13711
|
return ctx.op?.map(e => {
|
|
13269
13712
|
if (ButtonText[e]) {
|
|
@@ -13505,6 +13948,9 @@
|
|
|
13505
13948
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
13506
13949
|
}
|
|
13507
13950
|
|
|
13951
|
+
const {
|
|
13952
|
+
t
|
|
13953
|
+
} = useLocale();
|
|
13508
13954
|
const epieDescriptionsProps = () => ({
|
|
13509
13955
|
border: {
|
|
13510
13956
|
type: Boolean,
|
|
@@ -13701,7 +14147,9 @@
|
|
|
13701
14147
|
"onUpdate:modelValue": $event => ctx.show = $event,
|
|
13702
14148
|
"direction": "rtl",
|
|
13703
14149
|
"with-header": true,
|
|
13704
|
-
"title":
|
|
14150
|
+
"title": t("epie.crud.descriptions.title", {
|
|
14151
|
+
title: ctx.title || ""
|
|
14152
|
+
}),
|
|
13705
14153
|
"size": browser.isMini ? "100%" : ctx.size
|
|
13706
14154
|
}, null), {}, {
|
|
13707
14155
|
default: () => {
|
|
@@ -13967,8 +14415,10 @@
|
|
|
13967
14415
|
exports.useDescriptions = useDescriptions;
|
|
13968
14416
|
exports.useDialog = useDialog;
|
|
13969
14417
|
exports.useForm = useForm;
|
|
14418
|
+
exports.usePermission = usePermission;
|
|
13970
14419
|
exports.useProxy = useProxy;
|
|
13971
14420
|
exports.useRefs = useRefs;
|
|
14421
|
+
exports.useSetPermission = useSetPermission;
|
|
13972
14422
|
exports.useTable = useTable;
|
|
13973
14423
|
exports.useTools = useTools;
|
|
13974
14424
|
exports.useUpsert = useUpsert;
|