mooho-base-admin-plus 0.4.59 → 0.4.61
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/mooho-base-admin-plus.min.esm.js +95 -17
- package/dist/mooho-base-admin-plus.min.js +16 -16
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/view/view-table.vue +36 -0
- package/src/pages/common/task-form.vue +14 -26
- package/src/pages/system/permission.vue +57 -0
|
@@ -20933,11 +20933,7 @@ const _sfc_main$1l = {
|
|
|
20933
20933
|
} else {
|
|
20934
20934
|
this.model = await modelApi.get(applicationType2.model, row.processInst.modelID);
|
|
20935
20935
|
}
|
|
20936
|
-
this.
|
|
20937
|
-
this.form.data = this.model;
|
|
20938
|
-
this.form.onDataChange();
|
|
20939
|
-
this.form.clearValidate();
|
|
20940
|
-
this.readonly = !this.task.activityInst.activity.isEditable;
|
|
20936
|
+
this.customComponentReady();
|
|
20941
20937
|
this.opened = true;
|
|
20942
20938
|
});
|
|
20943
20939
|
} else if (this.task.activityInst.activity.pageMode == "Form") {
|
|
@@ -20971,11 +20967,7 @@ const _sfc_main$1l = {
|
|
|
20971
20967
|
} else {
|
|
20972
20968
|
this.model = await modelApi.get(applicationType2.model, row.processInst.modelID);
|
|
20973
20969
|
}
|
|
20974
|
-
this.
|
|
20975
|
-
this.form.data = this.model;
|
|
20976
|
-
this.form.onDataChange();
|
|
20977
|
-
this.form.clearValidate();
|
|
20978
|
-
this.readonly = !this.task.activityInst.activity.isEditable;
|
|
20970
|
+
this.customComponentReady();
|
|
20979
20971
|
this.opened = true;
|
|
20980
20972
|
});
|
|
20981
20973
|
} else if (applicationType2.pageMode == "Form") {
|
|
@@ -21005,10 +20997,17 @@ const _sfc_main$1l = {
|
|
|
21005
20997
|
this.outcomes = res2.data;
|
|
21006
20998
|
});
|
|
21007
20999
|
},
|
|
21008
|
-
customComponentReady(
|
|
21009
|
-
this.
|
|
21010
|
-
|
|
21011
|
-
|
|
21000
|
+
customComponentReady() {
|
|
21001
|
+
if (this.$refs.customComponent.form) {
|
|
21002
|
+
this.form = this.$refs.customComponent.form;
|
|
21003
|
+
this.form.data = this.model;
|
|
21004
|
+
this.form.onDataChange();
|
|
21005
|
+
this.form.clearValidate();
|
|
21006
|
+
this.readonly = !this.task.activityInst.activity.isEditable;
|
|
21007
|
+
this.width = this.form.formView.width || "800";
|
|
21008
|
+
this.name = this.form.formView.name;
|
|
21009
|
+
this.description = this.form.formView.description;
|
|
21010
|
+
}
|
|
21012
21011
|
},
|
|
21013
21012
|
async action(outcome) {
|
|
21014
21013
|
let isOK = await this.form.validate();
|
|
@@ -23698,6 +23697,51 @@ const _sfc_main$11 = {
|
|
|
23698
23697
|
} else {
|
|
23699
23698
|
this.$refs.table.loadData();
|
|
23700
23699
|
}
|
|
23700
|
+
},
|
|
23701
|
+
beforeLoadData() {
|
|
23702
|
+
if (!(this.filter["keyword"] || "").trim()) {
|
|
23703
|
+
this.filter["parentID"] = "null";
|
|
23704
|
+
} else {
|
|
23705
|
+
this.filter["parentID"] = null;
|
|
23706
|
+
}
|
|
23707
|
+
},
|
|
23708
|
+
async onLoadData() {
|
|
23709
|
+
if (!!(this.filter["keyword"] || "").trim()) {
|
|
23710
|
+
let data2 = this.$refs.table.data;
|
|
23711
|
+
if (data2.length > 0) {
|
|
23712
|
+
let dataWithParent = [];
|
|
23713
|
+
for (let i2 = 0; i2 < data2.length; i2++) {
|
|
23714
|
+
await this.loadParentData(data2[i2], dataWithParent);
|
|
23715
|
+
}
|
|
23716
|
+
dataWithParent.forEach((item) => {
|
|
23717
|
+
if (item.parentID) {
|
|
23718
|
+
let parent = dataWithParent.find((p) => p.id == item.parentID);
|
|
23719
|
+
if (!parent.children) {
|
|
23720
|
+
parent.children = [];
|
|
23721
|
+
}
|
|
23722
|
+
parent.children.push(item);
|
|
23723
|
+
parent._showChildren = true;
|
|
23724
|
+
}
|
|
23725
|
+
});
|
|
23726
|
+
data2.length = 0;
|
|
23727
|
+
dataWithParent.filter((item) => item.parentID == null).forEach((item) => {
|
|
23728
|
+
data2.push(item);
|
|
23729
|
+
});
|
|
23730
|
+
}
|
|
23731
|
+
}
|
|
23732
|
+
},
|
|
23733
|
+
async loadParentData(data2, dataWithParent) {
|
|
23734
|
+
dataWithParent.push(data2);
|
|
23735
|
+
if (data2.parentID && !dataWithParent.some((item) => item.id == data2.parentID)) {
|
|
23736
|
+
let res2 = await modelApi.query("Permission", {
|
|
23737
|
+
id: data2.parentID,
|
|
23738
|
+
page: 1,
|
|
23739
|
+
per: 1
|
|
23740
|
+
});
|
|
23741
|
+
await this.loadParentData(res2.data[0], dataWithParent);
|
|
23742
|
+
} else {
|
|
23743
|
+
return;
|
|
23744
|
+
}
|
|
23701
23745
|
}
|
|
23702
23746
|
}
|
|
23703
23747
|
};
|
|
@@ -23733,6 +23777,8 @@ function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
23733
23777
|
"has-children": (row) => {
|
|
23734
23778
|
return row.hasChildren;
|
|
23735
23779
|
},
|
|
23780
|
+
"before-load-data": $options.beforeLoadData,
|
|
23781
|
+
onOnLoadData: $options.onLoadData,
|
|
23736
23782
|
onCreate: _cache[1] || (_cache[1] = ($event) => $options.create()),
|
|
23737
23783
|
onEdit: _cache[2] || (_cache[2] = ({ row, index: index2 }) => $options.edit(row))
|
|
23738
23784
|
}, {
|
|
@@ -23784,7 +23830,7 @@ function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
23784
23830
|
}, toDisplayString$1(_ctx.showData(row, column)), 5)) : createCommentVNode("", true)
|
|
23785
23831
|
]),
|
|
23786
23832
|
_: 1
|
|
23787
|
-
}, 8, ["filter", "tree-load", "has-children"])
|
|
23833
|
+
}, 8, ["filter", "tree-load", "has-children", "before-load-data", "onOnLoadData"])
|
|
23788
23834
|
]),
|
|
23789
23835
|
_: 1
|
|
23790
23836
|
}),
|
|
@@ -37597,7 +37643,7 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
37597
37643
|
]);
|
|
37598
37644
|
}
|
|
37599
37645
|
var tableFilter = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$r]]);
|
|
37600
|
-
var viewTable_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".image-group[data-v-
|
|
37646
|
+
var viewTable_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".image-group[data-v-730c0bd7]{display:flex}.image-group .image[data-v-730c0bd7]{border:solid 1px #ccc;width:75px;height:75px;margin:2px 1px;cursor:pointer}.image-group .image img[data-v-730c0bd7]{width:75px;height:75px}\n")();
|
|
37601
37647
|
var getColumns = (view, item) => {
|
|
37602
37648
|
let children = view.viewColumns.filter((i2) => {
|
|
37603
37649
|
return i2.parentCode == item.code;
|
|
@@ -38853,6 +38899,22 @@ const _sfc_main$q = {
|
|
|
38853
38899
|
return column.name;
|
|
38854
38900
|
}
|
|
38855
38901
|
}
|
|
38902
|
+
},
|
|
38903
|
+
up(row, index2) {
|
|
38904
|
+
let data2 = this.$refs.table.data;
|
|
38905
|
+
if (index2 > 0) {
|
|
38906
|
+
data2.splice(index2, 1);
|
|
38907
|
+
data2.splice(index2 - 1, 0, row);
|
|
38908
|
+
this.$refs.table.loadData(data2);
|
|
38909
|
+
}
|
|
38910
|
+
},
|
|
38911
|
+
down(row, index2) {
|
|
38912
|
+
let data2 = this.$refs.table.data;
|
|
38913
|
+
if (index2 < data2.length - 1) {
|
|
38914
|
+
data2.splice(index2, 1);
|
|
38915
|
+
data2.splice(index2 + 1, 0, row);
|
|
38916
|
+
this.$refs.table.loadData(data2);
|
|
38917
|
+
}
|
|
38856
38918
|
}
|
|
38857
38919
|
}
|
|
38858
38920
|
};
|
|
@@ -39437,6 +39499,22 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
39437
39499
|
"custom-icon": "fa fa-trash-alt",
|
|
39438
39500
|
onClick: ($event) => $options.remove($options.rowData(row, index2), index2)
|
|
39439
39501
|
}, null, 8, ["title", "onClick"])) : createCommentVNode("", true),
|
|
39502
|
+
this.static && $data.tableView.adjustEnable && !$props.readonly ? (openBlock(), createBlock(_component_Button, {
|
|
39503
|
+
key: 2,
|
|
39504
|
+
size: "small",
|
|
39505
|
+
title: _ctx.$t("Front_Btn_Up"),
|
|
39506
|
+
type: "primary",
|
|
39507
|
+
"custom-icon": "fa fa-chevron-up",
|
|
39508
|
+
onClick: ($event) => $options.up($options.rowData(row, index2), index2)
|
|
39509
|
+
}, null, 8, ["title", "onClick"])) : createCommentVNode("", true),
|
|
39510
|
+
this.static && $data.tableView.adjustEnable && !$props.readonly ? (openBlock(), createBlock(_component_Button, {
|
|
39511
|
+
key: 3,
|
|
39512
|
+
size: "small",
|
|
39513
|
+
title: _ctx.$t("Front_Btn_Down"),
|
|
39514
|
+
type: "primary",
|
|
39515
|
+
"custom-icon": "fa fa-chevron-down",
|
|
39516
|
+
onClick: ($event) => $options.down($options.rowData(row, index2), index2)
|
|
39517
|
+
}, null, 8, ["title", "onClick"])) : createCommentVNode("", true),
|
|
39440
39518
|
(openBlock(true), createElementBlock(Fragment, null, renderList($data.commandButtons, (item, index3) => {
|
|
39441
39519
|
return openBlock(), createBlock(_component_Button, {
|
|
39442
39520
|
key: index3,
|
|
@@ -39596,7 +39674,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
39596
39674
|
], 2)
|
|
39597
39675
|
], 2);
|
|
39598
39676
|
}
|
|
39599
|
-
var ViewTable = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$q], ["__scopeId", "data-v-
|
|
39677
|
+
var ViewTable = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$q], ["__scopeId", "data-v-730c0bd7"]]);
|
|
39600
39678
|
const _sfc_main$p = {
|
|
39601
39679
|
mixins: [mixinPage],
|
|
39602
39680
|
components: { columnSelect, columnEdit },
|