@witlink/usercenter 1.2.68 → 1.2.70
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/usercenter.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './assets/main.
|
|
1
|
+
import './assets/main.fd32ea2f.css';var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => {
|
|
4
4
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -32237,7 +32237,8 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
32237
32237
|
placeholder: _ctx.$t("uc_common.plsEnter"),
|
|
32238
32238
|
value: formState.value.helperId,
|
|
32239
32239
|
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => formState.value.helperId = $event),
|
|
32240
|
-
autocomplete: "off"
|
|
32240
|
+
autocomplete: "off",
|
|
32241
|
+
maxlength: 36
|
|
32241
32242
|
}, null, 8, ["placeholder", "value"])
|
|
32242
32243
|
]),
|
|
32243
32244
|
_: 1
|
|
@@ -33790,40 +33791,52 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
33790
33791
|
const handleSelect = (value, option) => {
|
|
33791
33792
|
queryParam.value.name = value;
|
|
33792
33793
|
queryParam.value.id = option.id;
|
|
33794
|
+
queryById();
|
|
33793
33795
|
};
|
|
33794
33796
|
const selfId = ref(null);
|
|
33795
|
-
const
|
|
33796
|
-
const
|
|
33797
|
+
const fetchSearchInitList = async (parentRow) => {
|
|
33798
|
+
const res = await getRegionListAsync({
|
|
33797
33799
|
parentId: parentRow.id,
|
|
33798
|
-
page:
|
|
33800
|
+
page: 1,
|
|
33799
33801
|
size: 10,
|
|
33800
|
-
id: selfId.value
|
|
33801
|
-
};
|
|
33802
|
-
return getRegionListAsync(params).then((res) => {
|
|
33803
|
-
if (res.code === 0) {
|
|
33804
|
-
const childs = res.result.list;
|
|
33805
|
-
if (queryParam.value.id && queryParam.value.id === selfId.value) {
|
|
33806
|
-
childs.push({
|
|
33807
|
-
id: parentRow.id + "_loadMore_" + (j - 1),
|
|
33808
|
-
parentId: parentRow.id,
|
|
33809
|
-
name: t2("uc_organ.loadMore")
|
|
33810
|
-
});
|
|
33811
|
-
} else {
|
|
33812
|
-
if (childs.length > 0 && res.result.hasMore) {
|
|
33813
|
-
childs.push({
|
|
33814
|
-
id: parentRow.id + "_loadMore_" + j,
|
|
33815
|
-
parentId: parentRow.id,
|
|
33816
|
-
name: t2("uc_organ.loadMore")
|
|
33817
|
-
});
|
|
33818
|
-
}
|
|
33819
|
-
}
|
|
33820
|
-
selfId.value = null;
|
|
33821
|
-
return childs;
|
|
33822
|
-
} else {
|
|
33823
|
-
selfId.value = null;
|
|
33824
|
-
return [];
|
|
33825
|
-
}
|
|
33802
|
+
id: selfId.value
|
|
33826
33803
|
});
|
|
33804
|
+
if (res.code !== 0)
|
|
33805
|
+
return [];
|
|
33806
|
+
const list = res.result.list || [];
|
|
33807
|
+
if (queryParam.value.id && queryParam.value.id === selfId.value) {
|
|
33808
|
+
list.push({
|
|
33809
|
+
id: `${parentRow.id}_loadMore_search`,
|
|
33810
|
+
parentId: parentRow.id,
|
|
33811
|
+
name: t2("uc_organ.loadMore"),
|
|
33812
|
+
_isLoadMore: true
|
|
33813
|
+
});
|
|
33814
|
+
selfId.value = null;
|
|
33815
|
+
}
|
|
33816
|
+
return list;
|
|
33817
|
+
};
|
|
33818
|
+
const fetchChildListApi = async (parentRow, page) => {
|
|
33819
|
+
const res = await getRegionListAsync({
|
|
33820
|
+
parentId: parentRow.id,
|
|
33821
|
+
page,
|
|
33822
|
+
size: 10,
|
|
33823
|
+
id: null
|
|
33824
|
+
});
|
|
33825
|
+
if (res.code !== 0)
|
|
33826
|
+
return [];
|
|
33827
|
+
let list = res.result.list || [];
|
|
33828
|
+
if (queryParam.value.id) {
|
|
33829
|
+
list = list.filter((item) => item.id !== queryParam.value.id);
|
|
33830
|
+
}
|
|
33831
|
+
if (res.result.hasMore) {
|
|
33832
|
+
list.push({
|
|
33833
|
+
id: `${parentRow.id}_loadMore_${page}`,
|
|
33834
|
+
parentId: parentRow.id,
|
|
33835
|
+
name: t2("uc_organ.loadMore"),
|
|
33836
|
+
_isLoadMore: true
|
|
33837
|
+
});
|
|
33838
|
+
}
|
|
33839
|
+
return list;
|
|
33827
33840
|
};
|
|
33828
33841
|
const treeConfig = reactive({
|
|
33829
33842
|
transform: true,
|
|
@@ -33831,31 +33844,33 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
33831
33844
|
parentField: "parentId",
|
|
33832
33845
|
lazy: true,
|
|
33833
33846
|
hasChild: "hasChild",
|
|
33834
|
-
|
|
33835
|
-
|
|
33836
|
-
|
|
33847
|
+
async loadMethod({ row }) {
|
|
33848
|
+
if (selfId.value && !row._searchInitLoaded) {
|
|
33849
|
+
row._searchInitLoaded = true;
|
|
33850
|
+
row._page = 1;
|
|
33851
|
+
const list2 = await fetchSearchInitList(row);
|
|
33852
|
+
row._lazyChildren = list2;
|
|
33853
|
+
return row._lazyChildren;
|
|
33854
|
+
}
|
|
33855
|
+
const page = row._page || 1;
|
|
33856
|
+
const list = await fetchChildListApi(row, page);
|
|
33857
|
+
if (!row._lazyChildren) {
|
|
33858
|
+
row._lazyChildren = [];
|
|
33859
|
+
}
|
|
33860
|
+
row._lazyChildren = row._lazyChildren.filter((item) => !item._isLoadMore);
|
|
33861
|
+
row._lazyChildren.push(...list);
|
|
33862
|
+
row._page = page + 1;
|
|
33863
|
+
return row._lazyChildren;
|
|
33837
33864
|
}
|
|
33838
33865
|
});
|
|
33839
33866
|
const showMore = async (record) => {
|
|
33840
33867
|
const parentRow = tableRef.value.getRowById(record.parentId);
|
|
33841
|
-
|
|
33842
|
-
|
|
33843
|
-
parentRow,
|
|
33844
|
-
parseInt(recordIdStr.split("_loadMore_")[1]) + 1
|
|
33845
|
-
);
|
|
33846
|
-
if (queryParam.value.id) {
|
|
33847
|
-
for (let i = 0; i < childs.length; i++) {
|
|
33848
|
-
if (childs[i].id === queryParam.value.id) {
|
|
33849
|
-
childs.splice(i, 1);
|
|
33850
|
-
break;
|
|
33851
|
-
}
|
|
33852
|
-
}
|
|
33853
|
-
}
|
|
33854
|
-
tableRef.value.insertChildAt(childs, parentRow, record);
|
|
33855
|
-
if (queryParam.value.id) {
|
|
33856
|
-
parentRow.hasChild = false;
|
|
33857
|
-
}
|
|
33868
|
+
if (!parentRow)
|
|
33869
|
+
return;
|
|
33858
33870
|
tableRef.value.remove(record);
|
|
33871
|
+
parentRow._treeLoaded = false;
|
|
33872
|
+
await tableRef.value.setTreeExpand(parentRow, false);
|
|
33873
|
+
await tableRef.value.setTreeExpand(parentRow, true);
|
|
33859
33874
|
};
|
|
33860
33875
|
const showMoreOperation = (record) => {
|
|
33861
33876
|
return [0, 1].includes(record.type) && (addShow.value || removeShow.value && record.deleteStatus == 0) && hideButtonArr.value.indexOf(record.id) === -1;
|
|
@@ -34003,17 +34018,13 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
34003
34018
|
}
|
|
34004
34019
|
};
|
|
34005
34020
|
async function addOrDeleRefresh(row) {
|
|
34006
|
-
|
|
34007
|
-
|
|
34008
|
-
|
|
34009
|
-
|
|
34010
|
-
|
|
34011
|
-
|
|
34012
|
-
|
|
34013
|
-
nextTick(() => {
|
|
34014
|
-
tableRef.value.setTreeExpand(treeExpandRecords, true);
|
|
34015
|
-
});
|
|
34016
|
-
}
|
|
34021
|
+
row._page = 1;
|
|
34022
|
+
row._lazyChildren = [];
|
|
34023
|
+
const treeExpandRecords = tableRef.value.getTreeExpandRecords();
|
|
34024
|
+
await tableRef.value.clearTreeExpandLoaded(row);
|
|
34025
|
+
nextTick(() => {
|
|
34026
|
+
tableRef.value.setTreeExpand(treeExpandRecords, true);
|
|
34027
|
+
});
|
|
34017
34028
|
}
|
|
34018
34029
|
const onDelete = (record) => {
|
|
34019
34030
|
if (record.type == "3") {
|
|
@@ -34080,7 +34091,6 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
34080
34091
|
return (_ctx, _cache) => {
|
|
34081
34092
|
const _component_a_auto_complete = AutoComplete;
|
|
34082
34093
|
const _component_a_form_item = FormItem;
|
|
34083
|
-
const _component_uc_btn_search = resolveComponent("uc-btn-search");
|
|
34084
34094
|
const _component_a_button = Button$1;
|
|
34085
34095
|
const _component_a_form = Form;
|
|
34086
34096
|
const _component_a_tooltip = Tooltip;
|
|
@@ -34121,10 +34131,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
34121
34131
|
_: 1
|
|
34122
34132
|
}, 8, ["label"]),
|
|
34123
34133
|
createElementVNode("div", _hoisted_3$7, [
|
|
34124
|
-
|
|
34125
|
-
onClick: queryById,
|
|
34126
|
-
showInput: false
|
|
34127
|
-
}),
|
|
34134
|
+
createCommentVNode(' <uc-btn-search\r\n @click="queryById"\r\n :showInput="false"\r\n ></uc-btn-search> '),
|
|
34128
34135
|
createVNode(_component_a_button, {
|
|
34129
34136
|
onClick: handleReset,
|
|
34130
34137
|
style: { "margin-left": "8px" }
|
|
@@ -34173,7 +34180,8 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
34173
34180
|
}, toDisplayString(_ctx.$t("uc_organ.type" + row.type)), 3),
|
|
34174
34181
|
withDirectives(createVNode(_component_a_button, {
|
|
34175
34182
|
type: "link",
|
|
34176
|
-
onClick: ($event) => onDetail(row)
|
|
34183
|
+
onClick: ($event) => onDetail(row),
|
|
34184
|
+
class: "wrap-btn"
|
|
34177
34185
|
}, {
|
|
34178
34186
|
default: withCtx(() => [
|
|
34179
34187
|
createTextVNode(toDisplayString(row.name), 1)
|
|
@@ -34182,7 +34190,10 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
34182
34190
|
}, 1032, ["onClick"]), [
|
|
34183
34191
|
[vShow, !row.operationPermissions && row.type != "3"]
|
|
34184
34192
|
]),
|
|
34185
|
-
withDirectives(createElementVNode("span", {
|
|
34193
|
+
withDirectives(createElementVNode("span", {
|
|
34194
|
+
style: { "padding-left": "16px" },
|
|
34195
|
+
class: "wrap-btn"
|
|
34196
|
+
}, toDisplayString(row.name), 513), [
|
|
34186
34197
|
[vShow, !row.operationPermissions && row.type == "3"]
|
|
34187
34198
|
]),
|
|
34188
34199
|
createVNode(_component_a_tooltip, { placement: "top" }, {
|