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