mooho-base-admin-plus 2.4.28 → 2.4.29
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 +3 -0
- package/package/mooho-base-admin-plus.min.esm.js +100 -20
- package/package/mooho-base-admin-plus.min.js +7 -7
- package/package.json +1 -1
- package/src/api/customPage.js +17 -0
- package/src/components/view/view-form.vue +0 -10
- package/src/components/view/view-table.vue +1 -1
- package/src/mixins/page.js +0 -2
- package/src/pages/system/customPage.vue +33 -2
- package/src/pages/system/openUser.vue +19 -2
package/history.md
CHANGED
|
@@ -22597,6 +22597,20 @@ var customPageApi = {
|
|
|
22597
22597
|
id
|
|
22598
22598
|
}
|
|
22599
22599
|
});
|
|
22600
|
+
},
|
|
22601
|
+
async exportFile(ids) {
|
|
22602
|
+
const result2 = await service({
|
|
22603
|
+
url: `api/${res$j}/exportFile`,
|
|
22604
|
+
method: "post",
|
|
22605
|
+
responseType: "blob",
|
|
22606
|
+
data: {
|
|
22607
|
+
ids
|
|
22608
|
+
}
|
|
22609
|
+
});
|
|
22610
|
+
const blob = new Blob([result2], {
|
|
22611
|
+
type: "application/octet-stream"
|
|
22612
|
+
});
|
|
22613
|
+
saveAs(blob, "CustomPage-" + format$3(new Date(), "yyyyMMddHHmmss") + ".cp");
|
|
22600
22614
|
}
|
|
22601
22615
|
};
|
|
22602
22616
|
var viewPage$1 = {
|
|
@@ -23085,7 +23099,6 @@ var mixinPage = {
|
|
|
23085
23099
|
return lodash$1.exports.get(model2, expression2);
|
|
23086
23100
|
},
|
|
23087
23101
|
setData(model2, expression2, value) {
|
|
23088
|
-
console.log("setData", expression2, value);
|
|
23089
23102
|
lodash$1.exports.set(model2, expression2, value);
|
|
23090
23103
|
},
|
|
23091
23104
|
parseDateTimeData(model2, expression2) {
|
|
@@ -25777,11 +25790,33 @@ const _sfc_main$1i = {
|
|
|
25777
25790
|
computed: {},
|
|
25778
25791
|
created() {
|
|
25779
25792
|
},
|
|
25780
|
-
methods: {
|
|
25793
|
+
methods: {
|
|
25794
|
+
exportFile() {
|
|
25795
|
+
let ids = this.$refs.table.getSelected().map((x2) => {
|
|
25796
|
+
return x2.id;
|
|
25797
|
+
});
|
|
25798
|
+
if (ids.length > 0) {
|
|
25799
|
+
customPageApi.exportFile(ids);
|
|
25800
|
+
} else {
|
|
25801
|
+
this.error("Front_Msg_Please_Select_Export_Item");
|
|
25802
|
+
}
|
|
25803
|
+
},
|
|
25804
|
+
importFileSuccess(res2) {
|
|
25805
|
+
if (res2.code == 0) {
|
|
25806
|
+
this.success("Front_Msg_Success", () => {
|
|
25807
|
+
this.$refs.table.loadData();
|
|
25808
|
+
});
|
|
25809
|
+
} else {
|
|
25810
|
+
this.error(res2.message);
|
|
25811
|
+
}
|
|
25812
|
+
}
|
|
25813
|
+
}
|
|
25781
25814
|
};
|
|
25782
25815
|
const _hoisted_1$12 = { class: "i-layout-page-header" };
|
|
25783
25816
|
function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
25784
25817
|
const _component_PageHeader = resolveComponent("PageHeader");
|
|
25818
|
+
const _component_Button = resolveComponent("Button");
|
|
25819
|
+
const _component_file_upload = resolveComponent("file-upload");
|
|
25785
25820
|
const _component_view_table = resolveComponent("view-table");
|
|
25786
25821
|
const _component_Card = resolveComponent("Card");
|
|
25787
25822
|
const _component_modal_form = resolveComponent("modal-form");
|
|
@@ -25802,9 +25837,42 @@ function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25802
25837
|
createVNode$1(_component_view_table, {
|
|
25803
25838
|
ref: "table",
|
|
25804
25839
|
"view-code": "CustomPage",
|
|
25805
|
-
|
|
25806
|
-
|
|
25840
|
+
selectEnable: true,
|
|
25841
|
+
onCreate: _cache[1] || (_cache[1] = ($event) => _ctx.$refs.form.open()),
|
|
25842
|
+
onEdit: _cache[2] || (_cache[2] = ({ row, index: index2 }) => _ctx.$refs.form.open(row))
|
|
25807
25843
|
}, {
|
|
25844
|
+
filterCommand: withCtx(() => [
|
|
25845
|
+
createVNode$1(_component_Button, {
|
|
25846
|
+
size: "small",
|
|
25847
|
+
type: "info",
|
|
25848
|
+
"custom-icon": "fa fa-cloud-download-alt",
|
|
25849
|
+
onClick: _cache[0] || (_cache[0] = ($event) => $options.exportFile())
|
|
25850
|
+
}, {
|
|
25851
|
+
default: withCtx(() => [
|
|
25852
|
+
createTextVNode(toDisplayString$1(_ctx.$t("Front_Btn_Export")), 1)
|
|
25853
|
+
]),
|
|
25854
|
+
_: 1
|
|
25855
|
+
}),
|
|
25856
|
+
createVNode$1(_component_file_upload, {
|
|
25857
|
+
url: "api/CustomPage/importFile",
|
|
25858
|
+
accept: ".cp",
|
|
25859
|
+
onOnSuccess: $options.importFileSuccess
|
|
25860
|
+
}, {
|
|
25861
|
+
default: withCtx(() => [
|
|
25862
|
+
createVNode$1(_component_Button, {
|
|
25863
|
+
type: "primary",
|
|
25864
|
+
"custom-icon": "fa fa-cloud-upload-alt",
|
|
25865
|
+
size: "small"
|
|
25866
|
+
}, {
|
|
25867
|
+
default: withCtx(() => [
|
|
25868
|
+
createTextVNode(toDisplayString$1(_ctx.$t("Front_Btn_Import")), 1)
|
|
25869
|
+
]),
|
|
25870
|
+
_: 1
|
|
25871
|
+
})
|
|
25872
|
+
]),
|
|
25873
|
+
_: 1
|
|
25874
|
+
}, 8, ["onOnSuccess"])
|
|
25875
|
+
]),
|
|
25808
25876
|
command: withCtx(({}) => [
|
|
25809
25877
|
createCommentVNode(' <Button size="small"\r\n title="\u9875\u9762\u7EC4\u4EF6"\r\n type="info"\r\n custom-icon="fa fa-window-maximize"\r\n @click="$refs.componentTable.open({customPageID: row.id})"></Button>\r\n <Button size="small"\r\n title="\u9875\u9762\u63A7\u4EF6"\r\n type="info"\r\n custom-icon="fa fa-clone"\r\n @click="$refs.controlTable.open({customPageID: row.id})"></Button> ')
|
|
25810
25878
|
]),
|
|
@@ -25816,7 +25884,7 @@ function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25816
25884
|
createVNode$1(_component_modal_form, {
|
|
25817
25885
|
ref: "form",
|
|
25818
25886
|
"view-code": "CustomPageEdit",
|
|
25819
|
-
onOnAfterSave: _cache[
|
|
25887
|
+
onOnAfterSave: _cache[3] || (_cache[3] = ($event) => _ctx.$refs.table.loadData())
|
|
25820
25888
|
}, null, 512),
|
|
25821
25889
|
createCommentVNode(' <modal-table ref="componentTable"\r\n view-code="CustomPageComponent"\r\n @create="(param)=>$refs.componentForm.openDefault(param)"\r\n @edit="({row, index})=>$refs.componentForm.open(row)">\r\n <template slot-scope="{ row }"\r\n slot="command">\r\n <Button size="small"\r\n title="\u9875\u9762\u63A7\u4EF6"\r\n type="info"\r\n custom-icon="fa fa-clone"\r\n @click="$refs.controlTable.open({customPageID: row.customPageID, customPageComponentID: row.id})"></Button>\r\n </template>\r\n </modal-table>\r\n <modal-form ref="componentForm"\r\n view-code="CustomPageComponentEdit"\r\n @on-after-save="$refs.componentTable.loadData()" />\r\n <modal-table ref="controlTable"\r\n view-code="CustomPageControl"\r\n @create="(param)=>$refs.controlForm.openDefault(param)"\r\n @edit="({row, index})=>$refs.controlForm.open(row)" />\r\n <modal-form ref="controlForm"\r\n view-code="CustomPageControlEdit"\r\n @on-after-save="$refs.controlTable.loadData()" /> ')
|
|
25822
25890
|
]);
|
|
@@ -27117,6 +27185,10 @@ const _sfc_main$16 = {
|
|
|
27117
27185
|
created() {
|
|
27118
27186
|
},
|
|
27119
27187
|
methods: {
|
|
27188
|
+
edit({ row, index: index2 }) {
|
|
27189
|
+
row.password = "$$$$$$$$";
|
|
27190
|
+
this.$refs.form.open(row);
|
|
27191
|
+
},
|
|
27120
27192
|
async openApiTableOpen(row) {
|
|
27121
27193
|
this.openUserID = row.id;
|
|
27122
27194
|
let openApis = await openApiPermissionApi.queryForCheck(row.id);
|
|
@@ -27148,6 +27220,7 @@ function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27148
27220
|
const _component_Button = resolveComponent("Button");
|
|
27149
27221
|
const _component_view_table = resolveComponent("view-table");
|
|
27150
27222
|
const _component_Card = resolveComponent("Card");
|
|
27223
|
+
const _component_Input = resolveComponent("Input");
|
|
27151
27224
|
const _component_modal_form = resolveComponent("modal-form");
|
|
27152
27225
|
const _component_modal_table = resolveComponent("modal-table");
|
|
27153
27226
|
return openBlock(), createElementBlock("div", null, [
|
|
@@ -27168,7 +27241,7 @@ function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27168
27241
|
ref: "table",
|
|
27169
27242
|
"view-code": "OpenUser",
|
|
27170
27243
|
onCreate: _cache[0] || (_cache[0] = ($event) => _ctx.$refs.form.open()),
|
|
27171
|
-
onEdit:
|
|
27244
|
+
onEdit: $options.edit
|
|
27172
27245
|
}, {
|
|
27173
27246
|
command: withCtx(({ row }) => [
|
|
27174
27247
|
createVNode$1(_component_Button, {
|
|
@@ -27180,15 +27253,28 @@ function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27180
27253
|
}, null, 8, ["title", "onClick"])
|
|
27181
27254
|
]),
|
|
27182
27255
|
_: 1
|
|
27183
|
-
},
|
|
27256
|
+
}, 8, ["onEdit"])
|
|
27184
27257
|
]),
|
|
27185
27258
|
_: 1
|
|
27186
27259
|
}),
|
|
27187
27260
|
createVNode$1(_component_modal_form, {
|
|
27188
27261
|
ref: "form",
|
|
27189
27262
|
"view-code": "OpenUserEdit",
|
|
27190
|
-
onOnAfterSave: _cache[
|
|
27191
|
-
},
|
|
27263
|
+
onOnAfterSave: _cache[1] || (_cache[1] = ($event) => _ctx.$refs.table.loadData())
|
|
27264
|
+
}, {
|
|
27265
|
+
column: withCtx(({ data: data2, column, code: code2 }) => [
|
|
27266
|
+
code2 == "password" ? (openBlock(), createBlock(_component_Input, {
|
|
27267
|
+
key: 0,
|
|
27268
|
+
type: "password",
|
|
27269
|
+
"model-value": _ctx.parseData(data2, column.code),
|
|
27270
|
+
"onUpdate:modelValue": ($event) => _ctx.setData(data2, column.code, $event),
|
|
27271
|
+
readonly: _ctx.readonly || column.isReadonly,
|
|
27272
|
+
style: normalizeStyle$1({ width: column.controlWidth == null ? null : column.controlWidth + "px" }),
|
|
27273
|
+
maxlength: column.maxLength
|
|
27274
|
+
}, null, 8, ["model-value", "onUpdate:modelValue", "readonly", "style", "maxlength"])) : createCommentVNode("v-if", true)
|
|
27275
|
+
]),
|
|
27276
|
+
_: 1
|
|
27277
|
+
}, 512),
|
|
27192
27278
|
createVNode$1(_component_modal_table, {
|
|
27193
27279
|
ref: "openApiTable",
|
|
27194
27280
|
"view-code": "OpenApiCheck",
|
|
@@ -27200,7 +27286,7 @@ function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27200
27286
|
createVNode$1(_component_Button, {
|
|
27201
27287
|
type: "primary",
|
|
27202
27288
|
"custom-icon": "fa fa-save",
|
|
27203
|
-
onClick: _cache[
|
|
27289
|
+
onClick: _cache[2] || (_cache[2] = ($event) => $options.saveOpenApiPermission())
|
|
27204
27290
|
}, {
|
|
27205
27291
|
default: withCtx(() => [
|
|
27206
27292
|
createTextVNode(toDisplayString$1(_ctx.$t("Front_Btn_Save")), 1)
|
|
@@ -27210,7 +27296,7 @@ function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27210
27296
|
createVNode$1(_component_Button, {
|
|
27211
27297
|
type: "default",
|
|
27212
27298
|
"custom-icon": "fa fa-times",
|
|
27213
|
-
onClick: _cache[
|
|
27299
|
+
onClick: _cache[3] || (_cache[3] = ($event) => _ctx.$refs.openApiTable.close())
|
|
27214
27300
|
}, {
|
|
27215
27301
|
default: withCtx(() => [
|
|
27216
27302
|
createTextVNode(toDisplayString$1(_ctx.$t("Front_Btn_Close")), 1)
|
|
@@ -37625,7 +37711,6 @@ const _sfc_main$w = {
|
|
|
37625
37711
|
},
|
|
37626
37712
|
parseComboData(model2, column) {
|
|
37627
37713
|
let value = this.parseData(model2, column.code);
|
|
37628
|
-
console.log("parseComboData", column.code, value);
|
|
37629
37714
|
this.loadComboDataLabel(model2, column, value);
|
|
37630
37715
|
return value;
|
|
37631
37716
|
},
|
|
@@ -37642,10 +37727,8 @@ const _sfc_main$w = {
|
|
|
37642
37727
|
if (column.isStaticItem || column.dataType && column.dataType.startsWith("Enum:")) {
|
|
37643
37728
|
return;
|
|
37644
37729
|
}
|
|
37645
|
-
console.log("loadComboDataLabel", column.code, data2);
|
|
37646
37730
|
if (this.$refs["control_" + column.code] && data2) {
|
|
37647
37731
|
let values = this.$refs["control_" + column.code][0].$data.values;
|
|
37648
|
-
console.log("values", values);
|
|
37649
37732
|
let pendings = [];
|
|
37650
37733
|
if (column.controlType == "MultiComboSelect") {
|
|
37651
37734
|
data2.forEach((value) => {
|
|
@@ -37663,11 +37746,9 @@ const _sfc_main$w = {
|
|
|
37663
37746
|
}
|
|
37664
37747
|
}
|
|
37665
37748
|
if (pendings.length > 0) {
|
|
37666
|
-
console.log("pendings", pendings);
|
|
37667
37749
|
let param = this.getParam(model2, column);
|
|
37668
37750
|
param[column.sourceDataCode] = pendings.map((item) => item.value).join(",");
|
|
37669
37751
|
let res2;
|
|
37670
|
-
console.log("param", param);
|
|
37671
37752
|
if (column.isSourceCustom) {
|
|
37672
37753
|
res2 = await customModelApi.query(column.source, param);
|
|
37673
37754
|
} else {
|
|
@@ -37676,9 +37757,8 @@ const _sfc_main$w = {
|
|
|
37676
37757
|
res2.data.forEach((item) => {
|
|
37677
37758
|
let v = this.parseData(item, column.sourceDataCode);
|
|
37678
37759
|
let label = this.parseData(item, column.sourceDisplayCode);
|
|
37679
|
-
if (column.controlType == "ComboSelect")
|
|
37680
|
-
|
|
37681
|
-
}
|
|
37760
|
+
if (column.controlType == "ComboSelect")
|
|
37761
|
+
;
|
|
37682
37762
|
let newValue = pendings.find((i3) => i3.value == v);
|
|
37683
37763
|
if (newValue) {
|
|
37684
37764
|
newValue.label = label;
|
|
@@ -43781,7 +43861,7 @@ const _sfc_main$q = {
|
|
|
43781
43861
|
if (!this.staticData.some((item) => {
|
|
43782
43862
|
return item[batchSelectDataCode] == selected[i3].id;
|
|
43783
43863
|
})) {
|
|
43784
|
-
let item =
|
|
43864
|
+
let item = this.getDefaultData();
|
|
43785
43865
|
item[batchSelectDataCode] = selected[i3].id;
|
|
43786
43866
|
item[key] = selected[i3];
|
|
43787
43867
|
this.staticData.push(item);
|