yuang-framework-ui-pc 1.1.52 → 1.1.53
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/core-components.d.ts +3 -0
- package/es/core-components.js +7 -1
- package/es/ele-admin-layout/components/layout-tabs.d.ts +4 -4
- package/es/ele-dropdown/components/pro-dropdown.d.ts +2 -2
- package/es/ele-pro-layout/index.d.ts +4 -4
- package/es/ele-tab-wrap/components/tab-dropdown.d.ts +4 -4
- package/es/icons/ApiItem.d.ts +2 -0
- package/es/icons/ApiItem.js +32 -0
- package/es/icons/ApiTeam.d.ts +2 -0
- package/es/icons/ApiTeam.js +42 -0
- package/es/icons/OrganizationDept.d.ts +2 -0
- package/es/icons/OrganizationDept.js +33 -0
- package/es/icons/OrganizationOrg.d.ts +2 -0
- package/es/icons/OrganizationOrg.js +32 -0
- package/es/icons/OrganizationUnit.d.ts +2 -0
- package/es/icons/OrganizationUnit.js +32 -0
- package/es/icons/index.d.ts +5 -0
- package/es/icons/index.js +10 -0
- package/es/yu-framework-attachment-upload/index.d.ts +0 -1
- package/es/yu-framework-attachment-upload/index.js +17 -19
- package/es/yu-uims-organization-dialog/components/organization-dialog.d.ts +20 -0
- package/es/yu-uims-organization-dialog/components/organization-dialog.js +327 -0
- package/es/yu-uims-organization-dialog/index.d.ts +45 -0
- package/es/yu-uims-organization-dialog/index.js +68 -0
- package/es/yu-uims-role-dialog/components/role-dialog.d.ts +20 -0
- package/es/yu-uims-role-dialog/components/role-dialog.js +224 -0
- package/es/yu-uims-role-dialog/components/role-list.d.ts +54 -0
- package/es/yu-uims-role-dialog/components/role-list.js +188 -0
- package/es/yu-uims-role-dialog/components/role-query.d.ts +28 -0
- package/es/yu-uims-role-dialog/components/role-query.js +132 -0
- package/es/yu-uims-role-dialog/index.d.ts +23 -0
- package/es/yu-uims-role-dialog/index.js +42 -0
- package/es/yu-uims-user-dialog/components/user-dialog.d.ts +20 -0
- package/es/yu-uims-user-dialog/components/user-dialog.js +247 -0
- package/es/yu-uims-user-dialog/components/user-list.d.ts +84 -0
- package/es/yu-uims-user-dialog/components/user-list.js +232 -0
- package/es/yu-uims-user-dialog/components/user-query.d.ts +30 -0
- package/es/yu-uims-user-dialog/components/user-query.js +167 -0
- package/es/yu-uims-user-dialog/index.d.ts +23 -0
- package/es/yu-uims-user-dialog/index.js +42 -0
- package/lib/core-components.cjs +6 -0
- package/lib/core-components.d.ts +3 -0
- package/lib/ele-admin-layout/components/layout-tabs.d.ts +4 -4
- package/lib/ele-dropdown/components/pro-dropdown.d.ts +2 -2
- package/lib/ele-pro-layout/index.d.ts +4 -4
- package/lib/ele-tab-wrap/components/tab-dropdown.d.ts +4 -4
- package/lib/icons/ApiItem.cjs +31 -0
- package/lib/icons/ApiItem.d.ts +2 -0
- package/lib/icons/ApiTeam.cjs +41 -0
- package/lib/icons/ApiTeam.d.ts +2 -0
- package/lib/icons/OrganizationDept.cjs +32 -0
- package/lib/icons/OrganizationDept.d.ts +2 -0
- package/lib/icons/OrganizationOrg.cjs +31 -0
- package/lib/icons/OrganizationOrg.d.ts +2 -0
- package/lib/icons/OrganizationUnit.cjs +31 -0
- package/lib/icons/OrganizationUnit.d.ts +2 -0
- package/lib/icons/index.cjs +10 -0
- package/lib/icons/index.d.ts +5 -0
- package/lib/yu-framework-attachment-upload/index.cjs +16 -18
- package/lib/yu-framework-attachment-upload/index.d.ts +0 -1
- package/lib/yu-uims-organization-dialog/components/organization-dialog.cjs +326 -0
- package/lib/yu-uims-organization-dialog/components/organization-dialog.d.ts +20 -0
- package/lib/yu-uims-organization-dialog/index.cjs +67 -0
- package/lib/yu-uims-organization-dialog/index.d.ts +45 -0
- package/lib/yu-uims-role-dialog/components/role-dialog.cjs +223 -0
- package/lib/yu-uims-role-dialog/components/role-dialog.d.ts +20 -0
- package/lib/yu-uims-role-dialog/components/role-list.cjs +187 -0
- package/lib/yu-uims-role-dialog/components/role-list.d.ts +54 -0
- package/lib/yu-uims-role-dialog/components/role-query.cjs +131 -0
- package/lib/yu-uims-role-dialog/components/role-query.d.ts +28 -0
- package/lib/yu-uims-role-dialog/index.cjs +41 -0
- package/lib/yu-uims-role-dialog/index.d.ts +23 -0
- package/lib/yu-uims-user-dialog/components/user-dialog.cjs +246 -0
- package/lib/yu-uims-user-dialog/components/user-dialog.d.ts +20 -0
- package/lib/yu-uims-user-dialog/components/user-list.cjs +231 -0
- package/lib/yu-uims-user-dialog/components/user-list.d.ts +84 -0
- package/lib/yu-uims-user-dialog/components/user-query.cjs +166 -0
- package/lib/yu-uims-user-dialog/components/user-query.d.ts +30 -0
- package/lib/yu-uims-user-dialog/index.cjs +41 -0
- package/lib/yu-uims-user-dialog/index.d.ts +23 -0
- package/package.json +2 -2
- package/typings/global.d.ts +3 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const iconsVue = require("@element-plus/icons-vue");
|
|
4
|
+
const RoleList = require("./role-list");
|
|
5
|
+
const core = require("../../utils/core");
|
|
6
|
+
const httpConfig = require("yuang-framework-ui-common/lib/config/httpConfig");
|
|
7
|
+
const applicationConfig = require("yuang-framework-ui-common/lib/config/applicationConfig");
|
|
8
|
+
const icons = require("../../icons");
|
|
9
|
+
const _hoisted_1 = { style: { "padding": "0 16px 12px 0" } };
|
|
10
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
11
|
+
...{ name: "UimsRoleV2" },
|
|
12
|
+
__name: "role-dialog",
|
|
13
|
+
props: /* @__PURE__ */ vue.mergeModels({
|
|
14
|
+
param: {}
|
|
15
|
+
}, {
|
|
16
|
+
"modelValue": { type: Boolean },
|
|
17
|
+
"modelModifiers": {}
|
|
18
|
+
}),
|
|
19
|
+
emits: /* @__PURE__ */ vue.mergeModels(["change"], ["update:modelValue"]),
|
|
20
|
+
setup(__props, { emit: __emit }) {
|
|
21
|
+
const props = __props;
|
|
22
|
+
const emit = __emit;
|
|
23
|
+
const isOpenDialog = vue.useModel(__props, "modelValue");
|
|
24
|
+
const splitRef = vue.ref(null);
|
|
25
|
+
const treeRef = vue.ref(null);
|
|
26
|
+
const treeData = vue.ref([]);
|
|
27
|
+
const roleListRef = vue.ref(null);
|
|
28
|
+
const isLoading = vue.ref(true);
|
|
29
|
+
const isShowTree = vue.ref(true);
|
|
30
|
+
const selectedApplication = vue.ref(null);
|
|
31
|
+
const applicationName = vue.ref("");
|
|
32
|
+
const queryPage = async () => {
|
|
33
|
+
let data = { parentId: "0", name: applicationName.value };
|
|
34
|
+
isLoading.value = true;
|
|
35
|
+
const res = await httpConfig.http.post(`${applicationConfig.application.gatewayServerBaseUrl}/uims-api/admin/uims-application/selectPage`, data);
|
|
36
|
+
isLoading.value = false;
|
|
37
|
+
const listData = [
|
|
38
|
+
{
|
|
39
|
+
id: "0",
|
|
40
|
+
name: "全部应用",
|
|
41
|
+
isHasChildren: true,
|
|
42
|
+
isLeaf: false,
|
|
43
|
+
levelNum: 0,
|
|
44
|
+
parentId: ""
|
|
45
|
+
},
|
|
46
|
+
...res.data.data.records
|
|
47
|
+
];
|
|
48
|
+
treeData.value = core.toTree({
|
|
49
|
+
data: listData,
|
|
50
|
+
idField: "id",
|
|
51
|
+
parentIdField: "parentId"
|
|
52
|
+
});
|
|
53
|
+
vue.nextTick(() => {
|
|
54
|
+
handleNodeClick(listData[0] || { id: "0" });
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
const handleNodeClick = (row) => {
|
|
58
|
+
var _a, _b;
|
|
59
|
+
if (row && row.id) {
|
|
60
|
+
selectedApplication.value = row;
|
|
61
|
+
(_b = (_a = treeRef.value) == null ? void 0 : _a.setCurrentKey) == null ? void 0 : _b.call(_a, row.id);
|
|
62
|
+
} else {
|
|
63
|
+
selectedApplication.value = null;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const initQueryPage = async () => {
|
|
67
|
+
applicationName.value ? { queryFor: "treePart", parentId: "0", name: applicationName.value } : null;
|
|
68
|
+
reloadTree();
|
|
69
|
+
};
|
|
70
|
+
const reloadTree = () => {
|
|
71
|
+
isShowTree.value = false;
|
|
72
|
+
vue.nextTick(() => {
|
|
73
|
+
isShowTree.value = true;
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
const handleCancel = () => {
|
|
77
|
+
isOpenDialog.value = false;
|
|
78
|
+
};
|
|
79
|
+
const handleSure = () => {
|
|
80
|
+
handleCancel();
|
|
81
|
+
emit("change", roleListRef.value.selections);
|
|
82
|
+
};
|
|
83
|
+
queryPage();
|
|
84
|
+
return (_ctx, _cache) => {
|
|
85
|
+
const _component_el_input = vue.resolveComponent("el-input");
|
|
86
|
+
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
87
|
+
const _component_el_tree = vue.resolveComponent("el-tree");
|
|
88
|
+
const _component_ele_loading = vue.resolveComponent("ele-loading");
|
|
89
|
+
const _component_ele_split_panel = vue.resolveComponent("ele-split-panel");
|
|
90
|
+
const _component_ele_card = vue.resolveComponent("ele-card");
|
|
91
|
+
const _component_ele_page = vue.resolveComponent("ele-page");
|
|
92
|
+
const _component_el_button = vue.resolveComponent("el-button");
|
|
93
|
+
const _component_ele_dialog = vue.resolveComponent("ele-dialog");
|
|
94
|
+
return vue.openBlock(), vue.createBlock(_component_ele_dialog, {
|
|
95
|
+
form: "",
|
|
96
|
+
width: "85%",
|
|
97
|
+
modelValue: isOpenDialog.value,
|
|
98
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isOpenDialog.value = $event),
|
|
99
|
+
title: "选择角色",
|
|
100
|
+
class: "yu-big-dialog"
|
|
101
|
+
}, {
|
|
102
|
+
footer: vue.withCtx(() => [
|
|
103
|
+
vue.createVNode(_component_el_button, {
|
|
104
|
+
icon: vue.unref(iconsVue.Close),
|
|
105
|
+
onClick: handleCancel
|
|
106
|
+
}, {
|
|
107
|
+
default: vue.withCtx(() => _cache[2] || (_cache[2] = [
|
|
108
|
+
vue.createTextVNode("取消")
|
|
109
|
+
])),
|
|
110
|
+
_: 1,
|
|
111
|
+
__: [2]
|
|
112
|
+
}, 8, ["icon"]),
|
|
113
|
+
vue.createVNode(_component_el_button, {
|
|
114
|
+
type: "primary",
|
|
115
|
+
icon: vue.unref(iconsVue.Check),
|
|
116
|
+
loading: isLoading.value,
|
|
117
|
+
onClick: handleSure
|
|
118
|
+
}, {
|
|
119
|
+
default: vue.withCtx(() => _cache[3] || (_cache[3] = [
|
|
120
|
+
vue.createTextVNode(" 确认 ")
|
|
121
|
+
])),
|
|
122
|
+
_: 1,
|
|
123
|
+
__: [3]
|
|
124
|
+
}, 8, ["icon", "loading"])
|
|
125
|
+
]),
|
|
126
|
+
default: vue.withCtx(() => [
|
|
127
|
+
vue.createVNode(_component_ele_page, {
|
|
128
|
+
"flex-table": "",
|
|
129
|
+
"multi-card": false,
|
|
130
|
+
"hide-footer": "",
|
|
131
|
+
style: { "min-height": "600px" }
|
|
132
|
+
}, {
|
|
133
|
+
default: vue.withCtx(() => [
|
|
134
|
+
vue.createVNode(_component_ele_card, {
|
|
135
|
+
"flex-table": "",
|
|
136
|
+
"body-style": { padding: "0 0 0 16px", overflow: "hidden" }
|
|
137
|
+
}, {
|
|
138
|
+
default: vue.withCtx(() => [
|
|
139
|
+
vue.createVNode(_component_ele_split_panel, {
|
|
140
|
+
ref_key: "splitRef",
|
|
141
|
+
ref: splitRef,
|
|
142
|
+
"flex-table": "",
|
|
143
|
+
size: "256px",
|
|
144
|
+
"allow-collapse": "",
|
|
145
|
+
"custom-style": { borderWidth: "0 1px 0 0", padding: "16px 0" },
|
|
146
|
+
"body-style": { padding: "16px 16px 0 0", overflow: "hidden" },
|
|
147
|
+
style: { height: "100%", overflow: "visible" }
|
|
148
|
+
}, {
|
|
149
|
+
body: vue.withCtx(() => [
|
|
150
|
+
selectedApplication.value && selectedApplication.value.id ? (vue.openBlock(), vue.createBlock(RoleList, {
|
|
151
|
+
key: 0,
|
|
152
|
+
ref_key: "roleListRef",
|
|
153
|
+
ref: roleListRef,
|
|
154
|
+
application: selectedApplication.value,
|
|
155
|
+
param: props.param
|
|
156
|
+
}, null, 8, ["application", "param"])) : vue.createCommentVNode("", true)
|
|
157
|
+
]),
|
|
158
|
+
default: vue.withCtx(() => [
|
|
159
|
+
vue.createElementVNode("div", _hoisted_1, [
|
|
160
|
+
vue.createVNode(_component_el_input, {
|
|
161
|
+
modelValue: applicationName.value,
|
|
162
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => applicationName.value = $event),
|
|
163
|
+
placeholder: "输入应用名称后按回车搜索",
|
|
164
|
+
"prefix-icon": vue.unref(icons.SearchOutlined),
|
|
165
|
+
clearable: "",
|
|
166
|
+
maxlength: 20,
|
|
167
|
+
onKeyup: vue.withKeys(initQueryPage, ["enter"]),
|
|
168
|
+
onClear: initQueryPage
|
|
169
|
+
}, null, 8, ["modelValue", "prefix-icon"])
|
|
170
|
+
]),
|
|
171
|
+
vue.createVNode(_component_ele_loading, {
|
|
172
|
+
loading: isLoading.value,
|
|
173
|
+
style: { flex: 1, paddingRight: "16px", overflow: "auto" }
|
|
174
|
+
}, {
|
|
175
|
+
default: vue.withCtx(() => [
|
|
176
|
+
isShowTree.value ? (vue.openBlock(), vue.createBlock(_component_el_tree, {
|
|
177
|
+
key: 0,
|
|
178
|
+
ref_key: "treeRef",
|
|
179
|
+
ref: treeRef,
|
|
180
|
+
"node-key": "id",
|
|
181
|
+
data: treeData.value,
|
|
182
|
+
"highlight-current": "",
|
|
183
|
+
props: { label: "name", children: "children", isLeaf: "isLeaf" },
|
|
184
|
+
"expand-on-click-node": false,
|
|
185
|
+
style: { "--ele-tree-item-height": "34px" },
|
|
186
|
+
"default-expand-all": true,
|
|
187
|
+
onNodeClick: handleNodeClick
|
|
188
|
+
}, {
|
|
189
|
+
default: vue.withCtx(({ data }) => [
|
|
190
|
+
vue.createElementVNode("span", null, [
|
|
191
|
+
vue.createVNode(_component_el_icon, {
|
|
192
|
+
size: 15,
|
|
193
|
+
style: { "margin-right": "8px", "vertical-align": "-2px" }
|
|
194
|
+
}, {
|
|
195
|
+
default: vue.withCtx(() => [
|
|
196
|
+
data.id == "0" ? (vue.openBlock(), vue.createBlock(vue.unref(icons.ApplicationOutlined), { key: 0 })) : (vue.openBlock(), vue.createBlock(vue.unref(iconsVue.Monitor), { key: 1 }))
|
|
197
|
+
]),
|
|
198
|
+
_: 2
|
|
199
|
+
}, 1024),
|
|
200
|
+
vue.createElementVNode("span", null, vue.toDisplayString(data.name), 1)
|
|
201
|
+
])
|
|
202
|
+
]),
|
|
203
|
+
_: 1
|
|
204
|
+
}, 8, ["data"])) : vue.createCommentVNode("", true)
|
|
205
|
+
]),
|
|
206
|
+
_: 1
|
|
207
|
+
}, 8, ["loading"])
|
|
208
|
+
]),
|
|
209
|
+
_: 1
|
|
210
|
+
}, 512)
|
|
211
|
+
]),
|
|
212
|
+
_: 1
|
|
213
|
+
})
|
|
214
|
+
]),
|
|
215
|
+
_: 1
|
|
216
|
+
})
|
|
217
|
+
]),
|
|
218
|
+
_: 1
|
|
219
|
+
}, 8, ["modelValue"]);
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
module.exports = _sfc_main;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { UimsRole } from 'yuang-framework-ui-common/lib/interface/uims/uimsRole';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
modelValue: import('vue').PropType<any>;
|
|
5
|
+
param: {
|
|
6
|
+
type: import('vue').PropType<any>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
change: (uimsRoleList: UimsRole[]) => void;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
12
|
+
modelValue: import('vue').PropType<any>;
|
|
13
|
+
param: {
|
|
14
|
+
type: import('vue').PropType<any>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
}>> & Readonly<{
|
|
18
|
+
onChange?: ((uimsRoleList: UimsRole[]) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const RoleQuery = require("./role-query");
|
|
4
|
+
const httpConfig = require("yuang-framework-ui-common/lib/config/httpConfig");
|
|
5
|
+
const applicationConfig = require("yuang-framework-ui-common/lib/config/applicationConfig");
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
7
|
+
...{ name: "UimsUserList" },
|
|
8
|
+
__name: "role-list",
|
|
9
|
+
props: {
|
|
10
|
+
param: {},
|
|
11
|
+
application: {}
|
|
12
|
+
},
|
|
13
|
+
setup(__props, { expose: __expose }) {
|
|
14
|
+
const props = __props;
|
|
15
|
+
const queryRef = vue.ref(null);
|
|
16
|
+
const tableRef = vue.ref(null);
|
|
17
|
+
const columns = vue.ref([
|
|
18
|
+
{
|
|
19
|
+
type: "selection",
|
|
20
|
+
columnKey: "selection",
|
|
21
|
+
width: 50,
|
|
22
|
+
align: "center",
|
|
23
|
+
fixed: "left",
|
|
24
|
+
selectable: (row) => {
|
|
25
|
+
return !row.isRoleExistsUser;
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
type: "index",
|
|
30
|
+
columnKey: "index",
|
|
31
|
+
label: "编号",
|
|
32
|
+
width: 70,
|
|
33
|
+
align: "center",
|
|
34
|
+
fixed: "left"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
prop: "name",
|
|
38
|
+
label: "角色名称",
|
|
39
|
+
sortable: "custom",
|
|
40
|
+
minWidth: 200,
|
|
41
|
+
align: "left",
|
|
42
|
+
slot: "name"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
prop: "code",
|
|
46
|
+
label: "角色代码",
|
|
47
|
+
sortable: "custom",
|
|
48
|
+
minWidth: 180,
|
|
49
|
+
align: "left"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
prop: "status",
|
|
53
|
+
label: "状态",
|
|
54
|
+
width: 90,
|
|
55
|
+
align: "center",
|
|
56
|
+
sortable: "custom",
|
|
57
|
+
slot: "status",
|
|
58
|
+
formatter: (row) => row.status == 1 ? "正常" : "禁用"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
prop: "remark",
|
|
62
|
+
label: "备注",
|
|
63
|
+
minWidth: 240,
|
|
64
|
+
align: "center"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
prop: "sequence",
|
|
68
|
+
label: "排序号",
|
|
69
|
+
sortable: "custom",
|
|
70
|
+
width: 100,
|
|
71
|
+
align: "center"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
prop: "createUserName",
|
|
75
|
+
label: "创建人",
|
|
76
|
+
sortable: "custom",
|
|
77
|
+
width: 100,
|
|
78
|
+
align: "center"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
prop: "createTime",
|
|
82
|
+
label: "创建时间",
|
|
83
|
+
sortable: "custom",
|
|
84
|
+
width: 180,
|
|
85
|
+
align: "center"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
prop: "lastUpdateUserName",
|
|
89
|
+
label: "最后更新人",
|
|
90
|
+
sortable: "custom",
|
|
91
|
+
width: 120,
|
|
92
|
+
align: "center"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
prop: "lastUpdateTime",
|
|
96
|
+
label: "最后更新时间",
|
|
97
|
+
sortable: "custom",
|
|
98
|
+
width: 180,
|
|
99
|
+
align: "center"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
columnKey: "action",
|
|
103
|
+
label: "操作",
|
|
104
|
+
width: 80,
|
|
105
|
+
align: "center",
|
|
106
|
+
slot: "action",
|
|
107
|
+
fixed: "right"
|
|
108
|
+
}
|
|
109
|
+
]);
|
|
110
|
+
const selections = vue.ref([]);
|
|
111
|
+
const datasource = async ({ queryParam, pageParam, orderParamList }) => {
|
|
112
|
+
var _a, _b;
|
|
113
|
+
const data = { ...queryParam, ...pageParam, orderParamList, ...{ uimsApplicationId: props.application.id, selectIsRoleExistsUserId: ((_a = props.param) == null ? void 0 : _a.isDisableSelectExistsUser) && ((_b = props.param) == null ? void 0 : _b.selectIsRoleExistsUserId) } };
|
|
114
|
+
const res = await httpConfig.http.post(`${applicationConfig.application.gatewayServerBaseUrl}/uims-api/admin/uims-role/selectPage`, data);
|
|
115
|
+
return res.data.data;
|
|
116
|
+
};
|
|
117
|
+
const queryPage = () => {
|
|
118
|
+
var _a, _b, _c;
|
|
119
|
+
selections.value = [];
|
|
120
|
+
(_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
|
+
};
|
|
122
|
+
vue.watch(
|
|
123
|
+
() => props.application.id,
|
|
124
|
+
() => {
|
|
125
|
+
var _a, _b;
|
|
126
|
+
(_b = (_a = queryRef.value) == null ? void 0 : _a.resetFields) == null ? void 0 : _b.call(_a);
|
|
127
|
+
queryPage();
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
__expose({ selections });
|
|
131
|
+
return (_ctx, _cache) => {
|
|
132
|
+
const _component_el_tag = vue.resolveComponent("el-tag");
|
|
133
|
+
const _component_ele_pro_table = vue.resolveComponent("ele-pro-table");
|
|
134
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
135
|
+
vue.createVNode(RoleQuery, {
|
|
136
|
+
ref_key: "queryRef",
|
|
137
|
+
ref: queryRef,
|
|
138
|
+
style: { "margin-bottom": "-14px" },
|
|
139
|
+
onQuery: queryPage
|
|
140
|
+
}, null, 512),
|
|
141
|
+
vue.createVNode(_component_ele_pro_table, {
|
|
142
|
+
ref_key: "tableRef",
|
|
143
|
+
ref: tableRef,
|
|
144
|
+
"row-key": "id",
|
|
145
|
+
border: "",
|
|
146
|
+
sticky: false,
|
|
147
|
+
columns: columns.value,
|
|
148
|
+
datasource,
|
|
149
|
+
"show-overflow-tooltip": true,
|
|
150
|
+
selections: selections.value,
|
|
151
|
+
"onUpdate:selections": _cache[0] || (_cache[0] = ($event) => selections.value = $event),
|
|
152
|
+
"highlight-current-row": true,
|
|
153
|
+
"header-cell-style": { "text-align": "center" },
|
|
154
|
+
"footer-style": { paddingBottom: "16px" }
|
|
155
|
+
}, {
|
|
156
|
+
name: vue.withCtx(({ row }) => [
|
|
157
|
+
vue.createTextVNode(vue.toDisplayString(row.name) + " ", 1),
|
|
158
|
+
row.isSystemRole ? (vue.openBlock(), vue.createBlock(_component_el_tag, {
|
|
159
|
+
key: 0,
|
|
160
|
+
type: "warning",
|
|
161
|
+
"disable-transitions": true
|
|
162
|
+
}, {
|
|
163
|
+
default: vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
164
|
+
vue.createTextVNode("系统角色")
|
|
165
|
+
])),
|
|
166
|
+
_: 1,
|
|
167
|
+
__: [1]
|
|
168
|
+
})) : vue.createCommentVNode("", true)
|
|
169
|
+
]),
|
|
170
|
+
status: vue.withCtx(({ row }) => [
|
|
171
|
+
vue.createVNode(_component_el_tag, {
|
|
172
|
+
type: row.status === 1 ? "success" : "danger",
|
|
173
|
+
"disable-transitions": true
|
|
174
|
+
}, {
|
|
175
|
+
default: vue.withCtx(() => [
|
|
176
|
+
vue.createTextVNode(vue.toDisplayString(row.status === 1 ? "正常" : "禁用"), 1)
|
|
177
|
+
]),
|
|
178
|
+
_: 2
|
|
179
|
+
}, 1032, ["type"])
|
|
180
|
+
]),
|
|
181
|
+
_: 1
|
|
182
|
+
}, 8, ["columns", "selections"])
|
|
183
|
+
], 64);
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
module.exports = _sfc_main;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { UimsApplication } from 'yuang-framework-ui-common/lib/interface/uims/uimsApplication';
|
|
2
|
+
import { UimsRole } from 'yuang-framework-ui-common/lib/interface/uims/uimsRole';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
+
param: any;
|
|
6
|
+
/** 应用 */
|
|
7
|
+
application: UimsApplication;
|
|
8
|
+
}>>, {
|
|
9
|
+
selections: import('vue').Ref<{
|
|
10
|
+
code?: string | undefined;
|
|
11
|
+
name?: string | undefined;
|
|
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<{
|
|
41
|
+
param: any;
|
|
42
|
+
/** 应用 */
|
|
43
|
+
application: UimsApplication;
|
|
44
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
45
|
+
export default _default;
|
|
46
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
47
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
48
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
49
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
50
|
+
} : {
|
|
51
|
+
type: import('vue').PropType<T[K]>;
|
|
52
|
+
required: true;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const iconsVue = require("@element-plus/icons-vue");
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
5
|
+
__name: "role-query",
|
|
6
|
+
emits: ["query"],
|
|
7
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
8
|
+
const emit = __emit;
|
|
9
|
+
const getInitQueryForm = () => {
|
|
10
|
+
return {
|
|
11
|
+
name: "",
|
|
12
|
+
code: ""
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
const queryForm = vue.ref(getInitQueryForm());
|
|
16
|
+
const queryPage = () => {
|
|
17
|
+
emit("query");
|
|
18
|
+
};
|
|
19
|
+
const reset = () => {
|
|
20
|
+
queryForm.value = getInitQueryForm();
|
|
21
|
+
queryPage();
|
|
22
|
+
};
|
|
23
|
+
__expose({ queryForm });
|
|
24
|
+
return (_ctx, _cache) => {
|
|
25
|
+
const _component_el_input = vue.resolveComponent("el-input");
|
|
26
|
+
const _component_el_form_item = vue.resolveComponent("el-form-item");
|
|
27
|
+
const _component_el_col = vue.resolveComponent("el-col");
|
|
28
|
+
const _component_el_button = vue.resolveComponent("el-button");
|
|
29
|
+
const _component_el_row = vue.resolveComponent("el-row");
|
|
30
|
+
const _component_el_form = vue.resolveComponent("el-form");
|
|
31
|
+
return vue.openBlock(), vue.createBlock(_component_el_form, {
|
|
32
|
+
"label-width": "72px",
|
|
33
|
+
onKeyup: vue.withKeys(vue.withModifiers(queryPage, ["prevent"]), ["enter"]),
|
|
34
|
+
onSubmit: _cache[2] || (_cache[2] = vue.withModifiers(() => {
|
|
35
|
+
}, ["prevent"]))
|
|
36
|
+
}, {
|
|
37
|
+
default: vue.withCtx(() => [
|
|
38
|
+
vue.createVNode(_component_el_row, { gutter: 8 }, {
|
|
39
|
+
default: vue.withCtx(() => [
|
|
40
|
+
vue.createVNode(_component_el_col, {
|
|
41
|
+
lg: 6,
|
|
42
|
+
md: 8,
|
|
43
|
+
sm: 12,
|
|
44
|
+
xs: 24
|
|
45
|
+
}, {
|
|
46
|
+
default: vue.withCtx(() => [
|
|
47
|
+
vue.createVNode(_component_el_form_item, { label: "角色名称" }, {
|
|
48
|
+
default: vue.withCtx(() => [
|
|
49
|
+
vue.createVNode(_component_el_input, {
|
|
50
|
+
clearable: "",
|
|
51
|
+
modelValue: queryForm.value.name,
|
|
52
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => queryForm.value.name = $event),
|
|
53
|
+
modelModifiers: { trim: true },
|
|
54
|
+
placeholder: "请输入角色名称"
|
|
55
|
+
}, null, 8, ["modelValue"])
|
|
56
|
+
]),
|
|
57
|
+
_: 1
|
|
58
|
+
})
|
|
59
|
+
]),
|
|
60
|
+
_: 1
|
|
61
|
+
}),
|
|
62
|
+
vue.createVNode(_component_el_col, {
|
|
63
|
+
lg: 6,
|
|
64
|
+
md: 8,
|
|
65
|
+
sm: 12,
|
|
66
|
+
xs: 24
|
|
67
|
+
}, {
|
|
68
|
+
default: vue.withCtx(() => [
|
|
69
|
+
vue.createVNode(_component_el_form_item, { label: "角色代码" }, {
|
|
70
|
+
default: vue.withCtx(() => [
|
|
71
|
+
vue.createVNode(_component_el_input, {
|
|
72
|
+
clearable: "",
|
|
73
|
+
modelValue: queryForm.value.code,
|
|
74
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => queryForm.value.code = $event),
|
|
75
|
+
modelModifiers: { trim: true },
|
|
76
|
+
placeholder: "请输入角色代码"
|
|
77
|
+
}, null, 8, ["modelValue"])
|
|
78
|
+
]),
|
|
79
|
+
_: 1
|
|
80
|
+
})
|
|
81
|
+
]),
|
|
82
|
+
_: 1
|
|
83
|
+
}),
|
|
84
|
+
vue.createVNode(_component_el_col, {
|
|
85
|
+
lg: 6,
|
|
86
|
+
md: 8,
|
|
87
|
+
sm: 24,
|
|
88
|
+
xs: 24
|
|
89
|
+
}, {
|
|
90
|
+
default: vue.withCtx(() => [
|
|
91
|
+
vue.createVNode(_component_el_form_item, { "label-width": "16px" }, {
|
|
92
|
+
default: vue.withCtx(() => [
|
|
93
|
+
vue.createVNode(_component_el_button, {
|
|
94
|
+
type: "primary",
|
|
95
|
+
icon: vue.unref(iconsVue.Search),
|
|
96
|
+
class: "ele-btn-icon",
|
|
97
|
+
onClick: queryPage
|
|
98
|
+
}, {
|
|
99
|
+
default: vue.withCtx(() => _cache[3] || (_cache[3] = [
|
|
100
|
+
vue.createTextVNode("查询")
|
|
101
|
+
])),
|
|
102
|
+
_: 1,
|
|
103
|
+
__: [3]
|
|
104
|
+
}, 8, ["icon"]),
|
|
105
|
+
vue.createVNode(_component_el_button, {
|
|
106
|
+
icon: vue.unref(iconsVue.RefreshRight),
|
|
107
|
+
class: "ele-btn-icon",
|
|
108
|
+
onClick: reset
|
|
109
|
+
}, {
|
|
110
|
+
default: vue.withCtx(() => _cache[4] || (_cache[4] = [
|
|
111
|
+
vue.createTextVNode("重置")
|
|
112
|
+
])),
|
|
113
|
+
_: 1,
|
|
114
|
+
__: [4]
|
|
115
|
+
}, 8, ["icon"])
|
|
116
|
+
]),
|
|
117
|
+
_: 1
|
|
118
|
+
})
|
|
119
|
+
]),
|
|
120
|
+
_: 1
|
|
121
|
+
})
|
|
122
|
+
]),
|
|
123
|
+
_: 1
|
|
124
|
+
})
|
|
125
|
+
]),
|
|
126
|
+
_: 1
|
|
127
|
+
}, 8, ["onKeyup"]);
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
module.exports = _sfc_main;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { UimsRoleQueryParam } from 'yuang-framework-ui-common/lib/interface/uims/uimsRole';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<{}, {
|
|
4
|
+
queryForm: import('vue').Ref<{
|
|
5
|
+
nameForLike?: string | undefined;
|
|
6
|
+
codeForLike?: string | undefined;
|
|
7
|
+
currentPage?: number | undefined;
|
|
8
|
+
pageSize?: number | undefined;
|
|
9
|
+
queryFor?: string | undefined;
|
|
10
|
+
levelNum?: number | undefined;
|
|
11
|
+
uimsApplicationId?: string | undefined;
|
|
12
|
+
parentId?: string | undefined;
|
|
13
|
+
}, UimsRoleQueryParam | {
|
|
14
|
+
nameForLike?: string | undefined;
|
|
15
|
+
codeForLike?: string | undefined;
|
|
16
|
+
currentPage?: number | undefined;
|
|
17
|
+
pageSize?: number | undefined;
|
|
18
|
+
queryFor?: string | undefined;
|
|
19
|
+
levelNum?: number | undefined;
|
|
20
|
+
uimsApplicationId?: string | undefined;
|
|
21
|
+
parentId?: string | undefined;
|
|
22
|
+
}>;
|
|
23
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
24
|
+
query: () => void;
|
|
25
|
+
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
26
|
+
onQuery?: (() => any) | undefined;
|
|
27
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const RoleDialog = require("./components/role-dialog");
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
5
|
+
...{ name: "YuUimsRoleDialog" },
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
param: {}
|
|
9
|
+
},
|
|
10
|
+
emits: ["change"],
|
|
11
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
12
|
+
const props = __props;
|
|
13
|
+
const emit = __emit;
|
|
14
|
+
const isShowDialog = vue.ref(false);
|
|
15
|
+
const showDialog = () => {
|
|
16
|
+
isShowDialog.value = true;
|
|
17
|
+
};
|
|
18
|
+
const handleChange = (selections) => {
|
|
19
|
+
emit("change", selections);
|
|
20
|
+
};
|
|
21
|
+
__expose({
|
|
22
|
+
showDialog
|
|
23
|
+
});
|
|
24
|
+
return (_ctx, _cache) => {
|
|
25
|
+
const _component_el_input = vue.resolveComponent("el-input");
|
|
26
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
27
|
+
vue.withDirectives(vue.createVNode(_component_el_input, { onClick: showDialog }, null, 512), [
|
|
28
|
+
[vue.vShow, false]
|
|
29
|
+
]),
|
|
30
|
+
isShowDialog.value ? (vue.openBlock(), vue.createBlock(RoleDialog, {
|
|
31
|
+
key: 0,
|
|
32
|
+
modelValue: isShowDialog.value,
|
|
33
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isShowDialog.value = $event),
|
|
34
|
+
param: props.param,
|
|
35
|
+
onChange: handleChange
|
|
36
|
+
}, null, 8, ["modelValue", "param"])) : vue.createCommentVNode("", true)
|
|
37
|
+
], 64);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
module.exports = _sfc_main;
|