yuang-framework-ui-pc 1.1.70 → 1.1.72
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/es/yu-uims-organization-dialog/index.js +1 -13
- package/es/yu-uims-role-dialog/components/role-dialog.js +24 -10
- package/es/yu-uims-role-dialog/components/role-list.d.ts +10 -36
- package/es/yu-uims-role-dialog/components/role-list.js +47 -6
- package/es/yu-uims-role-dialog/index.js +11 -9
- package/es/yu-uims-user-dialog/components/user-dialog.js +28 -15
- package/es/yu-uims-user-dialog/components/user-list.d.ts +10 -92
- package/es/yu-uims-user-dialog/components/user-list.js +46 -7
- package/es/yu-uims-user-dialog/index.js +14 -10
- package/lib/yu-uims-organization-dialog/index.cjs +0 -12
- package/lib/yu-uims-role-dialog/components/role-dialog.cjs +23 -9
- package/lib/yu-uims-role-dialog/components/role-list.cjs +46 -5
- package/lib/yu-uims-role-dialog/components/role-list.d.ts +10 -36
- package/lib/yu-uims-role-dialog/index.cjs +11 -9
- package/lib/yu-uims-user-dialog/components/user-dialog.cjs +27 -14
- package/lib/yu-uims-user-dialog/components/user-list.cjs +45 -6
- package/lib/yu-uims-user-dialog/components/user-list.d.ts +10 -92
- package/lib/yu-uims-user-dialog/index.cjs +14 -10
- package/package.json +1 -1
|
@@ -19,6 +19,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19
19
|
const emit = __emit;
|
|
20
20
|
const modelValue = useModel(__props, "modelValue");
|
|
21
21
|
const initList = ref([]);
|
|
22
|
+
const initSelectionList = ref([]);
|
|
22
23
|
const inputValue = ref("");
|
|
23
24
|
const isShowDialog = ref(false);
|
|
24
25
|
const isInitSuccess = ref(false);
|
|
@@ -26,8 +27,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
27
|
modelValue: modelValue.value,
|
|
27
28
|
isMultiple: true,
|
|
28
29
|
isShowInput: true,
|
|
30
|
+
// 是否禁止选择已存在的角色
|
|
31
|
+
isDisableSelectExistsRole: true,
|
|
29
32
|
...props.param,
|
|
30
|
-
initList: initList.value
|
|
33
|
+
initList: initList.value,
|
|
34
|
+
initSelectionList: initSelectionList.value
|
|
31
35
|
}));
|
|
32
36
|
const init = async () => {
|
|
33
37
|
if (modelValue.value) {
|
|
@@ -64,26 +68,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
64
68
|
}
|
|
65
69
|
isShowDialog.value = false;
|
|
66
70
|
};
|
|
67
|
-
const handleChange = (
|
|
68
|
-
console.log("
|
|
71
|
+
const handleChange = (selectionList) => {
|
|
72
|
+
console.log("selectionList", selectionList);
|
|
69
73
|
modelValue.value = "";
|
|
70
74
|
inputValue.value = "";
|
|
71
|
-
if (
|
|
75
|
+
if (selectionList.length > 0) {
|
|
72
76
|
if (!componentParam.value.isMultiple) {
|
|
73
|
-
modelValue.value =
|
|
74
|
-
inputValue.value =
|
|
77
|
+
modelValue.value = selectionList[0].id;
|
|
78
|
+
inputValue.value = selectionList[0].name;
|
|
75
79
|
} else {
|
|
76
80
|
let modelValueValue = "";
|
|
77
81
|
let inputValueValue = "";
|
|
78
|
-
for (let index in
|
|
79
|
-
modelValueValue +=
|
|
80
|
-
inputValueValue +=
|
|
82
|
+
for (let index in selectionList) {
|
|
83
|
+
modelValueValue += selectionList[index].id + "|";
|
|
84
|
+
inputValueValue += selectionList[index].name + "、";
|
|
81
85
|
}
|
|
82
86
|
modelValue.value = "|" + modelValueValue;
|
|
83
87
|
inputValue.value = inputValueValue.substring(0, inputValueValue.length - 1);
|
|
84
88
|
}
|
|
85
89
|
}
|
|
86
|
-
emit("change",
|
|
90
|
+
emit("change", selectionList);
|
|
87
91
|
hideDialog();
|
|
88
92
|
};
|
|
89
93
|
watch(
|
|
@@ -17,18 +17,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
17
17
|
emits: /* @__PURE__ */ vue.mergeModels(["change"], ["update:modelValue"]),
|
|
18
18
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
19
19
|
const props = __props;
|
|
20
|
-
vue.watch(
|
|
21
|
-
() => props.modelValue,
|
|
22
|
-
() => {
|
|
23
|
-
init();
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
vue.watch(
|
|
27
|
-
() => props.param,
|
|
28
|
-
() => {
|
|
29
|
-
init();
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
20
|
const emit = __emit;
|
|
33
21
|
const modelValue = vue.useModel(__props, "modelValue");
|
|
34
22
|
const initList = vue.ref([]);
|
|
@@ -6,6 +6,7 @@ const core = require("../../utils/core");
|
|
|
6
6
|
const httpConfig = require("yuang-framework-ui-common/lib/config/httpConfig");
|
|
7
7
|
const applicationConfig = require("yuang-framework-ui-common/lib/config/applicationConfig");
|
|
8
8
|
const icons = require("../../icons");
|
|
9
|
+
const objectUtils = require("yuang-framework-ui-common/lib/utils/objectUtils");
|
|
9
10
|
const _hoisted_1 = { style: { "padding": "0 16px 12px 0" } };
|
|
10
11
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
11
12
|
...{ name: "UimsRoleV2" },
|
|
@@ -29,6 +30,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
29
30
|
const isShowTree = vue.ref(true);
|
|
30
31
|
const selectedApplication = vue.ref(null);
|
|
31
32
|
const applicationName = vue.ref("");
|
|
33
|
+
const selectionList = vue.ref([]);
|
|
34
|
+
vue.onMounted(() => {
|
|
35
|
+
selectionList.value = objectUtils.deepClone(props.param.initList ?? []);
|
|
36
|
+
});
|
|
32
37
|
const queryPage = async () => {
|
|
33
38
|
let data = { parentIdForEqual: "0", nameForLike: applicationName.value };
|
|
34
39
|
isLoading.value = true;
|
|
@@ -78,9 +83,16 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
78
83
|
};
|
|
79
84
|
const handleSure = () => {
|
|
80
85
|
handleCancel();
|
|
81
|
-
emit("change",
|
|
86
|
+
emit("change", selectionList.value);
|
|
82
87
|
};
|
|
83
88
|
queryPage();
|
|
89
|
+
vue.watch(
|
|
90
|
+
() => selectionList.value,
|
|
91
|
+
() => {
|
|
92
|
+
console.log("selectionList.value", selectionList.value);
|
|
93
|
+
},
|
|
94
|
+
{ deep: true }
|
|
95
|
+
);
|
|
84
96
|
return (_ctx, _cache) => {
|
|
85
97
|
const _component_el_input = vue.resolveComponent("el-input");
|
|
86
98
|
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
@@ -95,7 +107,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
95
107
|
form: "",
|
|
96
108
|
width: "85%",
|
|
97
109
|
modelValue: isOpenDialog.value,
|
|
98
|
-
"onUpdate:modelValue": _cache[
|
|
110
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isOpenDialog.value = $event),
|
|
99
111
|
title: "选择角色",
|
|
100
112
|
class: "yu-big-dialog"
|
|
101
113
|
}, {
|
|
@@ -104,11 +116,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
104
116
|
icon: vue.unref(iconsVue.Close),
|
|
105
117
|
onClick: handleCancel
|
|
106
118
|
}, {
|
|
107
|
-
default: vue.withCtx(() => _cache[
|
|
119
|
+
default: vue.withCtx(() => _cache[3] || (_cache[3] = [
|
|
108
120
|
vue.createTextVNode("取消")
|
|
109
121
|
])),
|
|
110
122
|
_: 1,
|
|
111
|
-
__: [
|
|
123
|
+
__: [3]
|
|
112
124
|
}, 8, ["icon"]),
|
|
113
125
|
vue.createVNode(_component_el_button, {
|
|
114
126
|
type: "primary",
|
|
@@ -116,11 +128,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
116
128
|
loading: isLoading.value,
|
|
117
129
|
onClick: handleSure
|
|
118
130
|
}, {
|
|
119
|
-
default: vue.withCtx(() => _cache[
|
|
131
|
+
default: vue.withCtx(() => _cache[4] || (_cache[4] = [
|
|
120
132
|
vue.createTextVNode(" 确认 ")
|
|
121
133
|
])),
|
|
122
134
|
_: 1,
|
|
123
|
-
__: [
|
|
135
|
+
__: [4]
|
|
124
136
|
}, 8, ["icon", "loading"])
|
|
125
137
|
]),
|
|
126
138
|
default: vue.withCtx(() => [
|
|
@@ -151,9 +163,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
151
163
|
key: 0,
|
|
152
164
|
ref_key: "roleListRef",
|
|
153
165
|
ref: roleListRef,
|
|
154
|
-
|
|
155
|
-
param: props.param
|
|
156
|
-
|
|
166
|
+
uimsApplication: selectedApplication.value,
|
|
167
|
+
param: props.param,
|
|
168
|
+
selectionList: selectionList.value,
|
|
169
|
+
"onUpdate:selectionList": _cache[1] || (_cache[1] = ($event) => selectionList.value = $event)
|
|
170
|
+
}, null, 8, ["uimsApplication", "param", "selectionList"])) : vue.createCommentVNode("", true)
|
|
157
171
|
]),
|
|
158
172
|
default: vue.withCtx(() => [
|
|
159
173
|
vue.createElementVNode("div", _hoisted_1, [
|
|
@@ -3,15 +3,19 @@ const vue = require("vue");
|
|
|
3
3
|
const RoleQuery = require("./role-query");
|
|
4
4
|
const httpConfig = require("yuang-framework-ui-common/lib/config/httpConfig");
|
|
5
5
|
const applicationConfig = require("yuang-framework-ui-common/lib/config/applicationConfig");
|
|
6
|
+
const objectUtils = require("yuang-framework-ui-common/lib/utils/objectUtils");
|
|
6
7
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
7
8
|
...{ name: "UimsUserList" },
|
|
8
9
|
__name: "role-list",
|
|
9
10
|
props: {
|
|
10
11
|
param: {},
|
|
11
|
-
|
|
12
|
+
uimsApplication: {},
|
|
13
|
+
selectionList: {}
|
|
12
14
|
},
|
|
13
|
-
|
|
15
|
+
emits: ["update:selectionList"],
|
|
16
|
+
setup(__props, { emit: __emit }) {
|
|
14
17
|
const props = __props;
|
|
18
|
+
const emit = __emit;
|
|
15
19
|
const queryRef = vue.ref(null);
|
|
16
20
|
const tableRef = vue.ref(null);
|
|
17
21
|
const columns = vue.ref([
|
|
@@ -108,10 +112,29 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
108
112
|
}
|
|
109
113
|
]);
|
|
110
114
|
const selections = vue.ref([]);
|
|
115
|
+
const tableList = vue.ref([]);
|
|
116
|
+
vue.onMounted(() => {
|
|
117
|
+
initSelectionList();
|
|
118
|
+
});
|
|
119
|
+
const initSelectionList = () => {
|
|
120
|
+
selections.value = objectUtils.deepClone(props.selectionList ?? []);
|
|
121
|
+
console.log("props.param", props.param);
|
|
122
|
+
console.log("selections.value", selections.value);
|
|
123
|
+
};
|
|
111
124
|
const datasource = async ({ queryParam, pageParam, orderParamList }) => {
|
|
112
125
|
var _a, _b;
|
|
113
|
-
const data = {
|
|
126
|
+
const data = {
|
|
127
|
+
...queryParam,
|
|
128
|
+
...pageParam,
|
|
129
|
+
orderParamList,
|
|
130
|
+
uimsApplicationIdForEqual: props.uimsApplication.id,
|
|
131
|
+
// 查询角色存在的用户id
|
|
132
|
+
selectRoleExistsUserIdForEqual: ((_a = props.param) == null ? void 0 : _a.isDisableSelectExistsUser) && ((_b = props.param) == null ? void 0 : _b.selectRoleExistsUserId),
|
|
133
|
+
// 是否排除所有人角色
|
|
134
|
+
isExcludeEveryOne: true
|
|
135
|
+
};
|
|
114
136
|
const res = await httpConfig.http.post(`${applicationConfig.application.gatewayServerBaseUrl}/uims-api/admin/uims-role/selectPage`, data);
|
|
137
|
+
tableList.value = res.data.data.records;
|
|
115
138
|
return res.data.data;
|
|
116
139
|
};
|
|
117
140
|
const queryPage = () => {
|
|
@@ -120,14 +143,32 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
120
143
|
(_c = (_a = tableRef.value) == null ? void 0 : _a.reload) == null ? void 0 : _c.call(_a, { currentPage: 1, queryParam: (_b = queryRef.value) == null ? void 0 : _b.queryForm });
|
|
121
144
|
};
|
|
122
145
|
vue.watch(
|
|
123
|
-
() => props.
|
|
146
|
+
() => props.uimsApplication.id,
|
|
124
147
|
() => {
|
|
125
148
|
var _a, _b;
|
|
126
149
|
(_b = (_a = queryRef.value) == null ? void 0 : _a.resetFields) == null ? void 0 : _b.call(_a);
|
|
127
150
|
queryPage();
|
|
151
|
+
initSelectionList();
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
vue.watch(
|
|
155
|
+
() => selections.value,
|
|
156
|
+
(newSelections) => {
|
|
157
|
+
let tempSelections = objectUtils.deepClone(newSelections ?? []);
|
|
158
|
+
let updateSelectionList = objectUtils.deepClone(props.selectionList ?? []);
|
|
159
|
+
tempSelections.forEach((item) => {
|
|
160
|
+
const isRepeat = updateSelectionList.some((old) => old.id === item.id);
|
|
161
|
+
if (!isRepeat) {
|
|
162
|
+
updateSelectionList.push(item);
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
updateSelectionList = updateSelectionList.filter((item) => {
|
|
166
|
+
return tempSelections.some((newItem) => newItem.id === item.id) || !tableList.value.some((t) => t.id === item.id);
|
|
167
|
+
});
|
|
168
|
+
console.log("updateSelectionList", updateSelectionList);
|
|
169
|
+
emit("update:selectionList", updateSelectionList);
|
|
128
170
|
}
|
|
129
171
|
);
|
|
130
|
-
__expose({ selections });
|
|
131
172
|
return (_ctx, _cache) => {
|
|
132
173
|
const _component_el_tag = vue.resolveComponent("el-tag");
|
|
133
174
|
const _component_ele_pro_table = vue.resolveComponent("ele-pro-table");
|
|
@@ -4,44 +4,18 @@ import { UimsRole } from 'yuang-framework-ui-common/lib/interface/uims/uimsRole'
|
|
|
4
4
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
5
|
param: any;
|
|
6
6
|
/** 应用 */
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
status?: number | undefined;
|
|
13
|
-
id?: string | undefined;
|
|
14
|
-
parentId?: string | undefined;
|
|
15
|
-
uimsApplicationId?: string | undefined;
|
|
16
|
-
sequence?: number | undefined;
|
|
17
|
-
remark?: string | undefined;
|
|
18
|
-
createUserAccount?: string | undefined;
|
|
19
|
-
createUserName?: string | undefined;
|
|
20
|
-
createTime?: string | undefined;
|
|
21
|
-
lastUpdateUserAccount?: string | undefined;
|
|
22
|
-
lastUpdateUserName?: string | undefined;
|
|
23
|
-
lastUpdateTime?: Date | undefined;
|
|
24
|
-
}[], UimsRole[] | {
|
|
25
|
-
code?: string | undefined;
|
|
26
|
-
name?: string | undefined;
|
|
27
|
-
status?: number | undefined;
|
|
28
|
-
id?: string | undefined;
|
|
29
|
-
parentId?: string | undefined;
|
|
30
|
-
uimsApplicationId?: string | undefined;
|
|
31
|
-
sequence?: number | undefined;
|
|
32
|
-
remark?: string | undefined;
|
|
33
|
-
createUserAccount?: string | undefined;
|
|
34
|
-
createUserName?: string | undefined;
|
|
35
|
-
createTime?: string | undefined;
|
|
36
|
-
lastUpdateUserAccount?: string | undefined;
|
|
37
|
-
lastUpdateUserName?: string | undefined;
|
|
38
|
-
lastUpdateTime?: Date | undefined;
|
|
39
|
-
}[]>;
|
|
40
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
7
|
+
uimsApplication: UimsApplication;
|
|
8
|
+
selectionList: UimsRole[];
|
|
9
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
"update:selectionList": (changeList: UimsRole[]) => void;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
41
12
|
param: any;
|
|
42
13
|
/** 应用 */
|
|
43
|
-
|
|
44
|
-
|
|
14
|
+
uimsApplication: UimsApplication;
|
|
15
|
+
selectionList: UimsRole[];
|
|
16
|
+
}>>> & Readonly<{
|
|
17
|
+
"onUpdate:selectionList"?: ((changeList: UimsRole[]) => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
45
19
|
export default _default;
|
|
46
20
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
47
21
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -27,6 +27,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
27
27
|
modelValue: modelValue.value,
|
|
28
28
|
isMultiple: true,
|
|
29
29
|
isShowInput: true,
|
|
30
|
+
// 是否禁止选择已存在的用户
|
|
31
|
+
isDisableSelectExistsUser: true,
|
|
30
32
|
...props.param,
|
|
31
33
|
initList: initList.value
|
|
32
34
|
}));
|
|
@@ -65,26 +67,26 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
65
67
|
}
|
|
66
68
|
isShowDialog.value = false;
|
|
67
69
|
};
|
|
68
|
-
const handleChange = (
|
|
69
|
-
console.log("
|
|
70
|
+
const handleChange = (selectionList) => {
|
|
71
|
+
console.log("selectionList", selectionList);
|
|
70
72
|
modelValue.value = "";
|
|
71
73
|
inputValue.value = "";
|
|
72
|
-
if (
|
|
74
|
+
if (selectionList.length > 0) {
|
|
73
75
|
if (!componentParam.value.isMultiple) {
|
|
74
|
-
modelValue.value =
|
|
75
|
-
inputValue.value =
|
|
76
|
+
modelValue.value = selectionList[0].id;
|
|
77
|
+
inputValue.value = selectionList[0].name;
|
|
76
78
|
} else {
|
|
77
79
|
let modelValueValue = "";
|
|
78
80
|
let inputValueValue = "";
|
|
79
|
-
for (let index in
|
|
80
|
-
modelValueValue +=
|
|
81
|
-
inputValueValue +=
|
|
81
|
+
for (let index in selectionList) {
|
|
82
|
+
modelValueValue += selectionList[index].id + "|";
|
|
83
|
+
inputValueValue += selectionList[index].name + "、";
|
|
82
84
|
}
|
|
83
85
|
modelValue.value = "|" + modelValueValue;
|
|
84
86
|
inputValue.value = inputValueValue.substring(0, inputValueValue.length - 1);
|
|
85
87
|
}
|
|
86
88
|
}
|
|
87
|
-
emit("change",
|
|
89
|
+
emit("change", selectionList);
|
|
88
90
|
hideDialog();
|
|
89
91
|
};
|
|
90
92
|
vue.watch(
|
|
@@ -28,8 +28,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
28
28
|
const userListRef = vue.ref(null);
|
|
29
29
|
const isLoading = vue.ref(true);
|
|
30
30
|
const isShowTree = vue.ref(true);
|
|
31
|
-
const
|
|
31
|
+
const uimsOrganization = vue.ref(null);
|
|
32
32
|
const orgName = vue.ref("");
|
|
33
|
+
const selectionList = vue.ref([]);
|
|
34
|
+
vue.onMounted(() => {
|
|
35
|
+
selectionList.value = objectUtils.deepClone(props.param.initList ?? []);
|
|
36
|
+
});
|
|
33
37
|
const loadTreeNode = async (node, resolve) => {
|
|
34
38
|
var _a, _b;
|
|
35
39
|
let data = {};
|
|
@@ -47,8 +51,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
47
51
|
isLoading.value = false;
|
|
48
52
|
}
|
|
49
53
|
let listData = res.data.data.records;
|
|
50
|
-
listData.forEach((
|
|
51
|
-
|
|
54
|
+
listData.forEach((organization) => {
|
|
55
|
+
organization.isLeaf = !organization.isHasChildren;
|
|
52
56
|
});
|
|
53
57
|
vue.nextTick(() => {
|
|
54
58
|
if (node.level == 0) {
|
|
@@ -79,10 +83,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
79
83
|
const handleNodeClick = (row) => {
|
|
80
84
|
var _a, _b;
|
|
81
85
|
if (row && row.id) {
|
|
82
|
-
|
|
86
|
+
uimsOrganization.value = row;
|
|
83
87
|
(_b = (_a = treeRef.value) == null ? void 0 : _a.setCurrentKey) == null ? void 0 : _b.call(_a, row.id);
|
|
84
88
|
} else {
|
|
85
|
-
|
|
89
|
+
uimsOrganization.value = null;
|
|
86
90
|
}
|
|
87
91
|
};
|
|
88
92
|
let queryCondition = null;
|
|
@@ -101,8 +105,15 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
101
105
|
};
|
|
102
106
|
const handleSure = () => {
|
|
103
107
|
handleCancel();
|
|
104
|
-
emit("change",
|
|
108
|
+
emit("change", selectionList.value);
|
|
105
109
|
};
|
|
110
|
+
vue.watch(
|
|
111
|
+
() => selectionList.value,
|
|
112
|
+
() => {
|
|
113
|
+
console.log("selectionList.value", selectionList.value);
|
|
114
|
+
},
|
|
115
|
+
{ deep: true }
|
|
116
|
+
);
|
|
106
117
|
return (_ctx, _cache) => {
|
|
107
118
|
const _component_el_input = vue.resolveComponent("el-input");
|
|
108
119
|
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
@@ -117,7 +128,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
117
128
|
form: "",
|
|
118
129
|
width: "85%",
|
|
119
130
|
modelValue: isOpenDialog.value,
|
|
120
|
-
"onUpdate:modelValue": _cache[
|
|
131
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isOpenDialog.value = $event),
|
|
121
132
|
title: "选择用户",
|
|
122
133
|
class: "yu-big-dialog"
|
|
123
134
|
}, {
|
|
@@ -126,11 +137,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
126
137
|
icon: vue.unref(iconsVue.Close),
|
|
127
138
|
onClick: handleCancel
|
|
128
139
|
}, {
|
|
129
|
-
default: vue.withCtx(() => _cache[
|
|
140
|
+
default: vue.withCtx(() => _cache[3] || (_cache[3] = [
|
|
130
141
|
vue.createTextVNode("取消")
|
|
131
142
|
])),
|
|
132
143
|
_: 1,
|
|
133
|
-
__: [
|
|
144
|
+
__: [3]
|
|
134
145
|
}, 8, ["icon"]),
|
|
135
146
|
vue.createVNode(_component_el_button, {
|
|
136
147
|
type: "primary",
|
|
@@ -138,11 +149,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
138
149
|
loading: isLoading.value,
|
|
139
150
|
onClick: handleSure
|
|
140
151
|
}, {
|
|
141
|
-
default: vue.withCtx(() => _cache[
|
|
152
|
+
default: vue.withCtx(() => _cache[4] || (_cache[4] = [
|
|
142
153
|
vue.createTextVNode(" 确认 ")
|
|
143
154
|
])),
|
|
144
155
|
_: 1,
|
|
145
|
-
__: [
|
|
156
|
+
__: [4]
|
|
146
157
|
}, 8, ["icon", "loading"])
|
|
147
158
|
]),
|
|
148
159
|
default: vue.withCtx(() => [
|
|
@@ -169,13 +180,15 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
169
180
|
style: { height: "100%", overflow: "visible" }
|
|
170
181
|
}, {
|
|
171
182
|
body: vue.withCtx(() => [
|
|
172
|
-
|
|
183
|
+
uimsOrganization.value && uimsOrganization.value.id ? (vue.openBlock(), vue.createBlock(UserList, {
|
|
173
184
|
key: 0,
|
|
174
185
|
ref_key: "userListRef",
|
|
175
186
|
ref: userListRef,
|
|
176
187
|
param: props.param,
|
|
177
|
-
|
|
178
|
-
|
|
188
|
+
uimsOrganization: uimsOrganization.value,
|
|
189
|
+
selectionList: selectionList.value,
|
|
190
|
+
"onUpdate:selectionList": _cache[1] || (_cache[1] = ($event) => selectionList.value = $event)
|
|
191
|
+
}, null, 8, ["param", "uimsOrganization", "selectionList"])) : vue.createCommentVNode("", true)
|
|
179
192
|
]),
|
|
180
193
|
default: vue.withCtx(() => [
|
|
181
194
|
vue.createElementVNode("div", _hoisted_1, [
|
|
@@ -5,15 +5,19 @@ const UserQuery = require("./user-query");
|
|
|
5
5
|
const icons = require("../../icons");
|
|
6
6
|
const httpConfig = require("yuang-framework-ui-common/lib/config/httpConfig");
|
|
7
7
|
const applicationConfig = require("yuang-framework-ui-common/lib/config/applicationConfig");
|
|
8
|
+
const objectUtils = require("yuang-framework-ui-common/lib/utils/objectUtils");
|
|
8
9
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
9
10
|
...{ name: "UimsUserList" },
|
|
10
11
|
__name: "user-list",
|
|
11
12
|
props: {
|
|
12
13
|
param: {},
|
|
13
|
-
|
|
14
|
+
uimsOrganization: {},
|
|
15
|
+
selectionList: {}
|
|
14
16
|
},
|
|
15
|
-
|
|
17
|
+
emits: ["update:selectionList"],
|
|
18
|
+
setup(__props, { emit: __emit }) {
|
|
16
19
|
const props = __props;
|
|
20
|
+
const emit = __emit;
|
|
17
21
|
const queryRef = vue.ref(null);
|
|
18
22
|
const tableRef = vue.ref(null);
|
|
19
23
|
const columns = vue.ref([
|
|
@@ -24,7 +28,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
24
28
|
align: "center",
|
|
25
29
|
fixed: "left",
|
|
26
30
|
selectable: (row) => {
|
|
27
|
-
return !row.
|
|
31
|
+
return !row.isRoleExistsUser;
|
|
28
32
|
}
|
|
29
33
|
},
|
|
30
34
|
{
|
|
@@ -132,10 +136,27 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
132
136
|
}
|
|
133
137
|
]);
|
|
134
138
|
const selections = vue.ref([]);
|
|
139
|
+
const tableList = vue.ref([]);
|
|
140
|
+
vue.onMounted(() => {
|
|
141
|
+
initSelectionList();
|
|
142
|
+
});
|
|
143
|
+
const initSelectionList = () => {
|
|
144
|
+
selections.value = objectUtils.deepClone(props.selectionList ?? []);
|
|
145
|
+
console.log("props.param", props.param);
|
|
146
|
+
console.log("selections.value", selections.value);
|
|
147
|
+
};
|
|
135
148
|
const datasource = async ({ queryParam, pageParam, orderParamList }) => {
|
|
136
149
|
var _a, _b;
|
|
137
|
-
const data = {
|
|
150
|
+
const data = {
|
|
151
|
+
...queryParam,
|
|
152
|
+
...pageParam,
|
|
153
|
+
orderParamList,
|
|
154
|
+
organizationIdForEqual: props.uimsOrganization.id,
|
|
155
|
+
// 查询用户存在的角色id
|
|
156
|
+
selectUserExistsRoleIdForEqual: ((_a = props.param) == null ? void 0 : _a.isDisableSelectExistsRole) && ((_b = props.param) == null ? void 0 : _b.selectUserExistsRoleId)
|
|
157
|
+
};
|
|
138
158
|
const res = await httpConfig.http.post(`${applicationConfig.application.gatewayServerBaseUrl}/uims-api/admin/uims-user/selectPage`, data);
|
|
159
|
+
tableList.value = res.data.data.records;
|
|
139
160
|
return res.data.data;
|
|
140
161
|
};
|
|
141
162
|
const queryPage = () => {
|
|
@@ -144,14 +165,32 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
144
165
|
(_c = (_a = tableRef.value) == null ? void 0 : _a.reload) == null ? void 0 : _c.call(_a, { currentPage: 1, queryParam: (_b = queryRef.value) == null ? void 0 : _b.queryForm });
|
|
145
166
|
};
|
|
146
167
|
vue.watch(
|
|
147
|
-
() => props.
|
|
168
|
+
() => props.uimsOrganization.id,
|
|
148
169
|
() => {
|
|
149
170
|
var _a, _b;
|
|
150
171
|
(_b = (_a = queryRef.value) == null ? void 0 : _a.resetFields) == null ? void 0 : _b.call(_a);
|
|
151
172
|
queryPage();
|
|
173
|
+
initSelectionList();
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
vue.watch(
|
|
177
|
+
() => selections.value,
|
|
178
|
+
(newSelections) => {
|
|
179
|
+
let tempSelections = objectUtils.deepClone(newSelections ?? []);
|
|
180
|
+
let updateSelectionList = objectUtils.deepClone(props.selectionList ?? []);
|
|
181
|
+
tempSelections.forEach((item) => {
|
|
182
|
+
const isRepeat = updateSelectionList.some((old) => old.id === item.id);
|
|
183
|
+
if (!isRepeat) {
|
|
184
|
+
updateSelectionList.push(item);
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
updateSelectionList = updateSelectionList.filter((item) => {
|
|
188
|
+
return tempSelections.some((newItem) => newItem.id === item.id) || !tableList.value.some((t) => t.id === item.id);
|
|
189
|
+
});
|
|
190
|
+
console.log("updateSelectionList", updateSelectionList);
|
|
191
|
+
emit("update:selectionList", updateSelectionList);
|
|
152
192
|
}
|
|
153
193
|
);
|
|
154
|
-
__expose({ selections });
|
|
155
194
|
return (_ctx, _cache) => {
|
|
156
195
|
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
157
196
|
const _component_el_tag = vue.resolveComponent("el-tag");
|
|
@@ -4,100 +4,18 @@ import { UimsOrganization } from 'yuang-framework-ui-common/lib/interface/uims/u
|
|
|
4
4
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
5
|
param: any;
|
|
6
6
|
/** 机构 */
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
gender?: string | undefined;
|
|
13
|
-
status?: number | undefined;
|
|
14
|
-
organizationId?: string | undefined;
|
|
15
|
-
isRecursiveOrganization?: {
|
|
16
|
-
valueOf: () => boolean;
|
|
17
|
-
} | undefined;
|
|
18
|
-
mobile?: string | undefined;
|
|
19
|
-
email?: string | undefined;
|
|
20
|
-
birthday?: string | undefined;
|
|
21
|
-
idCard?: string | undefined;
|
|
22
|
-
address?: string | undefined;
|
|
23
|
-
avatarCode?: string | undefined;
|
|
24
|
-
avatarUrl?: string | undefined;
|
|
25
|
-
ssoUser?: {
|
|
26
|
-
password?: string | undefined;
|
|
27
|
-
surePassword?: string | undefined;
|
|
28
|
-
rsaAesKey?: string | undefined;
|
|
29
|
-
id?: string | undefined;
|
|
30
|
-
parentId?: string | undefined;
|
|
31
|
-
uimsApplicationId?: string | undefined;
|
|
32
|
-
sequence?: number | undefined;
|
|
33
|
-
remark?: string | undefined;
|
|
34
|
-
createUserAccount?: string | undefined;
|
|
35
|
-
createUserName?: string | undefined;
|
|
36
|
-
createTime?: string | undefined;
|
|
37
|
-
lastUpdateUserAccount?: string | undefined;
|
|
38
|
-
lastUpdateUserName?: string | undefined;
|
|
39
|
-
lastUpdateTime?: Date | undefined;
|
|
40
|
-
} | undefined;
|
|
41
|
-
id?: string | undefined;
|
|
42
|
-
parentId?: string | undefined;
|
|
43
|
-
uimsApplicationId?: string | undefined;
|
|
44
|
-
sequence?: number | undefined;
|
|
45
|
-
remark?: string | undefined;
|
|
46
|
-
createUserAccount?: string | undefined;
|
|
47
|
-
createUserName?: string | undefined;
|
|
48
|
-
createTime?: string | undefined;
|
|
49
|
-
lastUpdateUserAccount?: string | undefined;
|
|
50
|
-
lastUpdateUserName?: string | undefined;
|
|
51
|
-
lastUpdateTime?: Date | undefined;
|
|
52
|
-
}[], UimsUser[] | {
|
|
53
|
-
account?: string | undefined;
|
|
54
|
-
name?: string | undefined;
|
|
55
|
-
gender?: string | undefined;
|
|
56
|
-
status?: number | undefined;
|
|
57
|
-
organizationId?: string | undefined;
|
|
58
|
-
isRecursiveOrganization?: {
|
|
59
|
-
valueOf: () => boolean;
|
|
60
|
-
} | undefined;
|
|
61
|
-
mobile?: string | undefined;
|
|
62
|
-
email?: string | undefined;
|
|
63
|
-
birthday?: string | undefined;
|
|
64
|
-
idCard?: string | undefined;
|
|
65
|
-
address?: string | undefined;
|
|
66
|
-
avatarCode?: string | undefined;
|
|
67
|
-
avatarUrl?: string | undefined;
|
|
68
|
-
ssoUser?: {
|
|
69
|
-
password?: string | undefined;
|
|
70
|
-
surePassword?: string | undefined;
|
|
71
|
-
rsaAesKey?: string | undefined;
|
|
72
|
-
id?: string | undefined;
|
|
73
|
-
parentId?: string | undefined;
|
|
74
|
-
uimsApplicationId?: string | undefined;
|
|
75
|
-
sequence?: number | undefined;
|
|
76
|
-
remark?: string | undefined;
|
|
77
|
-
createUserAccount?: string | undefined;
|
|
78
|
-
createUserName?: string | undefined;
|
|
79
|
-
createTime?: string | undefined;
|
|
80
|
-
lastUpdateUserAccount?: string | undefined;
|
|
81
|
-
lastUpdateUserName?: string | undefined;
|
|
82
|
-
lastUpdateTime?: Date | undefined;
|
|
83
|
-
} | undefined;
|
|
84
|
-
id?: string | undefined;
|
|
85
|
-
parentId?: string | undefined;
|
|
86
|
-
uimsApplicationId?: string | undefined;
|
|
87
|
-
sequence?: number | undefined;
|
|
88
|
-
remark?: string | undefined;
|
|
89
|
-
createUserAccount?: string | undefined;
|
|
90
|
-
createUserName?: string | undefined;
|
|
91
|
-
createTime?: string | undefined;
|
|
92
|
-
lastUpdateUserAccount?: string | undefined;
|
|
93
|
-
lastUpdateUserName?: string | undefined;
|
|
94
|
-
lastUpdateTime?: Date | undefined;
|
|
95
|
-
}[]>;
|
|
96
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
7
|
+
uimsOrganization: UimsOrganization;
|
|
8
|
+
selectionList: UimsUser[];
|
|
9
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
"update:selectionList": (changeList: UimsUser[]) => void;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
97
12
|
param: any;
|
|
98
13
|
/** 机构 */
|
|
99
|
-
|
|
100
|
-
|
|
14
|
+
uimsOrganization: UimsOrganization;
|
|
15
|
+
selectionList: UimsUser[];
|
|
16
|
+
}>>> & Readonly<{
|
|
17
|
+
"onUpdate:selectionList"?: ((changeList: UimsUser[]) => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
101
19
|
export default _default;
|
|
102
20
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
103
21
|
type __VLS_TypePropsToRuntimeProps<T> = {
|