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,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const _export_sfc = (sfc, props) => {
|
|
4
|
+
const target = sfc.__vccOpts || sfc;
|
|
5
|
+
for (const [key, val] of props) {
|
|
6
|
+
target[key] = val;
|
|
7
|
+
}
|
|
8
|
+
return target;
|
|
9
|
+
};
|
|
10
|
+
const _sfc_main = {};
|
|
11
|
+
const _hoisted_1 = {
|
|
12
|
+
t: "1734245624524",
|
|
13
|
+
class: "icon",
|
|
14
|
+
viewBox: "0 0 1024 1024",
|
|
15
|
+
version: "1.1",
|
|
16
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17
|
+
"p-id": "1490",
|
|
18
|
+
width: "200",
|
|
19
|
+
height: "200"
|
|
20
|
+
};
|
|
21
|
+
function _sfc_render(_ctx, _cache) {
|
|
22
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1, _cache[0] || (_cache[0] = [
|
|
23
|
+
vue.createElementVNode("path", {
|
|
24
|
+
d: "M323.7632 812.672H270.592c-9.216 0-16.77824 7.0912-16.77824 15.60064v50.0992c0 8.98048 7.56736 16.07168 16.77824 16.07168h53.17632c9.216 0 16.77824-7.0912 16.77824-16.07168v-50.0992c0-8.51456-7.56736-15.60064-16.78336-15.60064z m0-378.59328H270.592c-9.216 0-16.77824 7.0912-16.77824 15.83104v50.33984c0 8.50944 7.56736 15.60064 16.77824 15.60064h53.17632c9.216 0 16.77824-7.0912 16.77824-15.60064v-50.33984c0-8.73984-7.56736-15.83104-16.78336-15.83104z m0 126.19264H270.592c-9.216 0-16.77824 7.0912-16.77824 15.84128v49.85856c0 8.75008 7.56736 16.07168 16.77824 16.07168h53.17632c9.216 0 16.77824-7.3216 16.77824-16.07168v-50.0992c0-8.50944-7.56736-15.60064-16.78336-15.60064z m0 126.19776H270.592c-9.216 0-16.77824 7.0912-16.77824 15.60064v50.0992c0 8.98048 7.56736 16.07168 16.77824 16.07168h53.17632c9.216 0 16.77824-7.0912 16.77824-16.07168v-50.0992c0-8.50944-7.56736-15.60064-16.78336-15.60064z m0-378.58816H270.592c-9.216 0-16.77824 7.0912-16.77824 15.83104v50.33984c0 8.50944 7.56736 15.60064 16.77824 15.60064h53.17632c9.216 0 16.77824-7.0912 16.77824-15.60064v-50.33984c0-8.73984-7.56736-15.83104-16.78336-15.83104z m635.96032 668.8H64.27648c-9.45152 0-17.01376-7.0912-17.01376-16.07168v-51.04128c0-8.98048 7.56736-16.07168 17.01376-16.07168h50.10432V253.99296c0-17.96096 11.3408-34.02752 28.83072-41.11872L439.56736 50.75456a51.7888 51.7888 0 0 1 44.90752 3.78368c13.2352 8.27392 21.02784 22.21568 21.02784 37.34016v801.62304h53.65248V163.71712c0-16.07168 8.98048-30.72 23.6288-38.28736a49.3568 49.3568 0 0 1 47.26272 0l256.1792 140.8512c14.65344 8.03328 23.15776 22.68672 23.15776 38.28736v589.39904h50.57536c9.22112 0 16.77824 7.0912 16.77824 15.60064v51.04128c-0.2304 8.98048-7.79776 16.07168-17.01376 16.07168z m-200.40192-411.4432h-53.17632c-9.216 0-16.77824 7.0912-16.77824 15.83104v49.85856c0 8.75008 7.56736 15.84128 16.77824 15.84128h53.17632c9.216 0 16.77824-7.0912 16.77824-15.84128v-50.0992c0-8.73984-7.56736-15.5904-16.77824-15.5904z m0-252.63104h-53.17632c-9.216 0-16.77824 7.0912-16.77824 16.07168v50.10432c0 8.4992 7.56736 15.5904 16.77824 15.5904h53.17632c9.216 0 16.77824-7.0912 16.77824-15.5904v-50.10432c0-8.9856-7.56736-16.07168-16.77824-16.07168z m0 378.59328h-53.17632c-9.216 0-16.77824 7.0912-16.77824 15.83104v50.0992c0 8.75008 7.56736 15.84128 16.77824 15.84128h53.17632c9.216 0 16.77824-7.0912 16.77824-15.84128v-50.0992c0-8.73984-7.56736-15.83104-16.77824-15.83104z m0 126.19776h-53.17632c-9.216 0-16.77824 7.0912-16.77824 15.83104v50.0992c0 8.75008 7.56736 15.84128 16.77824 15.84128h53.17632c9.216 0 16.77824-7.0912 16.77824-15.84128v-50.0992c0-8.73984-7.56736-15.83104-16.77824-15.83104z m0-378.5984h-53.17632c-9.216 0-16.77824 7.33184-16.77824 16.07168v50.10944c0 8.4992 7.56736 15.83104 16.77824 15.83104h53.17632c9.216 0 16.77824-7.33184 16.77824-15.83104v-50.10944c0-8.73984-7.56736-16.07168-16.77824-16.07168z m0 0",
|
|
25
|
+
fill: "#606267",
|
|
26
|
+
"p-id": "1491"
|
|
27
|
+
}, null, -1)
|
|
28
|
+
]));
|
|
29
|
+
}
|
|
30
|
+
const OrganizationUnit = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
31
|
+
module.exports = OrganizationUnit;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
package/lib/icons/index.cjs
CHANGED
|
@@ -117,6 +117,11 @@ const ZoomInOutlined = require("./ZoomInOutlined");
|
|
|
117
117
|
const ZoomOutOutlined = require("./ZoomOutOutlined");
|
|
118
118
|
const SliderArrowStatic = require("./SliderArrowStatic");
|
|
119
119
|
const SliderArrowSlide = require("./SliderArrowSlide");
|
|
120
|
+
const OrganizationOrg = require("./OrganizationOrg");
|
|
121
|
+
const OrganizationUnit = require("./OrganizationUnit");
|
|
122
|
+
const OrganizationDept = require("./OrganizationDept");
|
|
123
|
+
const ApiTeam = require("./ApiTeam");
|
|
124
|
+
const ApiItem = require("./ApiItem");
|
|
120
125
|
exports.AnalysisOutlined = AnalysisOutlined;
|
|
121
126
|
exports.ApplicationOutlined = ApplicationOutlined;
|
|
122
127
|
exports.AppstoreAddOutlined = AppstoreAddOutlined;
|
|
@@ -234,3 +239,8 @@ exports.ZoomInOutlined = ZoomInOutlined;
|
|
|
234
239
|
exports.ZoomOutOutlined = ZoomOutOutlined;
|
|
235
240
|
exports.SliderArrowStatic = SliderArrowStatic;
|
|
236
241
|
exports.SliderArrowSlide = SliderArrowSlide;
|
|
242
|
+
exports.OrganizationOrg = OrganizationOrg;
|
|
243
|
+
exports.OrganizationUnit = OrganizationUnit;
|
|
244
|
+
exports.OrganizationDept = OrganizationDept;
|
|
245
|
+
exports.ApiTeam = ApiTeam;
|
|
246
|
+
exports.ApiItem = ApiItem;
|
package/lib/icons/index.d.ts
CHANGED
|
@@ -115,3 +115,8 @@ export { default as ZoomInOutlined } from './ZoomInOutlined';
|
|
|
115
115
|
export { default as ZoomOutOutlined } from './ZoomOutOutlined';
|
|
116
116
|
export { default as SliderArrowStatic } from './SliderArrowStatic';
|
|
117
117
|
export { default as SliderArrowSlide } from './SliderArrowSlide';
|
|
118
|
+
export { default as OrganizationOrg } from './OrganizationOrg';
|
|
119
|
+
export { default as OrganizationUnit } from './OrganizationUnit';
|
|
120
|
+
export { default as OrganizationDept } from './OrganizationDept';
|
|
121
|
+
export { default as ApiTeam } from './ApiTeam';
|
|
122
|
+
export { default as ApiItem } from './ApiItem';
|
|
@@ -157,24 +157,22 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
157
157
|
};
|
|
158
158
|
return (_ctx, _cache) => {
|
|
159
159
|
const _component_ele_upload_list = vue.resolveComponent("ele-upload-list");
|
|
160
|
-
return vue.openBlock(), vue.
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}, null, 8, ["modelValue", "limit", "listType", "accept", "readonly", "disabled"])
|
|
177
|
-
]);
|
|
160
|
+
return vue.openBlock(), vue.createBlock(_component_ele_upload_list, {
|
|
161
|
+
drag: true,
|
|
162
|
+
tools: true,
|
|
163
|
+
modelValue: images.value,
|
|
164
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => images.value = $event),
|
|
165
|
+
limit: _ctx.param.maxCount,
|
|
166
|
+
listType: listType.value,
|
|
167
|
+
accept: accept.value,
|
|
168
|
+
readonly: isLoading.value,
|
|
169
|
+
disabled: _ctx.param.type != "edit",
|
|
170
|
+
sortable: { forceFallback: true },
|
|
171
|
+
onUpload: handleUpload,
|
|
172
|
+
onRetry: handleRetryUpload,
|
|
173
|
+
onRemove: handleRemove,
|
|
174
|
+
onEditUpload: handleEditUpload
|
|
175
|
+
}, null, 8, ["modelValue", "limit", "listType", "accept", "readonly", "disabled"]);
|
|
178
176
|
};
|
|
179
177
|
}
|
|
180
178
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ComponentParam } from '@/model/component/param';
|
|
2
|
-
import { FrameworkAttachment } from '@/interface/framework/frameworkAttachment';
|
|
3
2
|
|
|
4
3
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
4
|
modelValue: import('vue').PropType<any>;
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const icons = require("../../icons");
|
|
4
|
+
const objectUtils = require("yuang-framework-ui-common/lib/utils/objectUtils");
|
|
5
|
+
const iconsVue = require("@element-plus/icons-vue");
|
|
6
|
+
const uimsOrganization = require("yuang-framework-ui-common/lib/hooks/uims/uimsOrganization");
|
|
7
|
+
const uuidUtils = require("yuang-framework-ui-common/lib/utils/uuidUtils");
|
|
8
|
+
const httpConfig = require("yuang-framework-ui-common/lib/config/httpConfig");
|
|
9
|
+
const applicationConfig = require("yuang-framework-ui-common/lib/config/applicationConfig");
|
|
10
|
+
const _hoisted_1 = { style: { "padding": "0 16px 12px 0" } };
|
|
11
|
+
const _hoisted_2 = { class: "yu-dialog-tag" };
|
|
12
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
13
|
+
...{ name: "UimsUserV2" },
|
|
14
|
+
__name: "organization-dialog",
|
|
15
|
+
props: /* @__PURE__ */ vue.mergeModels({
|
|
16
|
+
param: {}
|
|
17
|
+
}, {
|
|
18
|
+
"modelValue": { type: Boolean },
|
|
19
|
+
"modelModifiers": {}
|
|
20
|
+
}),
|
|
21
|
+
emits: /* @__PURE__ */ vue.mergeModels(["change"], ["update:modelValue"]),
|
|
22
|
+
setup(__props, { emit: __emit }) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
const emit = __emit;
|
|
25
|
+
const isOpenDialog = vue.useModel(__props, "modelValue");
|
|
26
|
+
const splitRef = vue.ref(null);
|
|
27
|
+
const treeRef = vue.ref(null);
|
|
28
|
+
const treeId = vue.ref(`tree-${uuidUtils.getShortUuid()}`);
|
|
29
|
+
const isLoading = vue.ref(true);
|
|
30
|
+
const isShowTree = vue.ref(true);
|
|
31
|
+
const selections = vue.ref([]);
|
|
32
|
+
const checkedKeys = vue.ref([]);
|
|
33
|
+
const orgName = vue.ref("");
|
|
34
|
+
vue.onMounted(async () => {
|
|
35
|
+
if (props.param.modelValue) {
|
|
36
|
+
vue.nextTick(async () => {
|
|
37
|
+
let res = await httpConfig.http.get(`${applicationConfig.application.gatewayServerBaseUrl}/uims-api/admin/uims-organization/selectInfo`, { params: { id: props.param.modelValue } });
|
|
38
|
+
const organization = res.data.data;
|
|
39
|
+
selections.value.push({
|
|
40
|
+
id: organization.id,
|
|
41
|
+
code: organization.code,
|
|
42
|
+
name: organization.name
|
|
43
|
+
});
|
|
44
|
+
checkedKeys.value.push(props.param.modelValue);
|
|
45
|
+
uimsOrganization.handleOrganizationTreeDefaultExpandNode({ id: props.param.modelValue, treeId: treeId.value });
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const loadTreeNode = async (node, resolve) => {
|
|
50
|
+
var _a, _b;
|
|
51
|
+
let data = {};
|
|
52
|
+
if (!queryCondition) {
|
|
53
|
+
data = { parentId: ((_a = node == null ? void 0 : node.data) == null ? void 0 : _a.id) || "0" };
|
|
54
|
+
} else {
|
|
55
|
+
data = objectUtils.deepClone(queryCondition);
|
|
56
|
+
data.parentId = ((_b = node == null ? void 0 : node.data) == null ? void 0 : _b.id) || "0";
|
|
57
|
+
}
|
|
58
|
+
if (node.level == 0) {
|
|
59
|
+
isLoading.value = true;
|
|
60
|
+
}
|
|
61
|
+
const res = await httpConfig.http.post(`${applicationConfig.application.gatewayServerBaseUrl}/uims-api/admin/uims-organization/selectPage`, data);
|
|
62
|
+
if (node.level == 0) {
|
|
63
|
+
isLoading.value = false;
|
|
64
|
+
}
|
|
65
|
+
let listData = res.data.data.records;
|
|
66
|
+
listData.forEach((organization) => {
|
|
67
|
+
organization.isLeaf = !organization.isHasChildren;
|
|
68
|
+
});
|
|
69
|
+
vue.nextTick(() => {
|
|
70
|
+
if (listData.length == 1 && listData[0].isHasChildren) {
|
|
71
|
+
vue.nextTick(() => {
|
|
72
|
+
const nodeList = document.querySelectorAll(`#${treeId.value}.el-tree [data-key='${listData[0].id}'] .el-tree-node__expand-icon`);
|
|
73
|
+
for (let i = 0; i < nodeList.length; i++) {
|
|
74
|
+
if (!nodeList[i].classList.contains("expanded")) {
|
|
75
|
+
nodeList[i] && nodeList[i].click();
|
|
76
|
+
} else {
|
|
77
|
+
if (queryCondition) {
|
|
78
|
+
queryCondition.parentId = listData[0].id || "0";
|
|
79
|
+
queryCondition.levelNum = listData[0].levelNum + 1;
|
|
80
|
+
httpConfig.http.post(`${applicationConfig.application.gatewayServerBaseUrl}/uims-api/admin/uims-organization/selectPage`, queryCondition).then((res2) => {
|
|
81
|
+
var _a2;
|
|
82
|
+
(_a2 = treeRef == null ? void 0 : treeRef.value) == null ? void 0 : _a2.updateKeyChildren(queryCondition == null ? void 0 : queryCondition.parentId, res2.data.data.records);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
return resolve(listData);
|
|
91
|
+
};
|
|
92
|
+
const handleCheck = (data, checkedData, checked) => {
|
|
93
|
+
if (props.param.isMultiple) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (typeof checked == "undefined") {
|
|
97
|
+
checked = false;
|
|
98
|
+
let checkedKeys2 = checkedData.checkedKeys;
|
|
99
|
+
checkedKeys2.forEach((id) => {
|
|
100
|
+
if (data.id == id) {
|
|
101
|
+
checked = true;
|
|
102
|
+
} else {
|
|
103
|
+
treeRef.value.setChecked(id, false, false);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
selections.value.forEach((item) => {
|
|
108
|
+
handleDeleteTag(item);
|
|
109
|
+
});
|
|
110
|
+
if (checked) {
|
|
111
|
+
selections.value.push({
|
|
112
|
+
id: data.id,
|
|
113
|
+
code: data.code,
|
|
114
|
+
name: data.name
|
|
115
|
+
});
|
|
116
|
+
treeRef.value.setChecked(data.id, checked, false);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
const handleCheckChange = (data, checked, indeterminate) => {
|
|
120
|
+
if (!props.param.isMultiple) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
selections.value = selections.value.filter((item) => {
|
|
124
|
+
return item.id !== data.id;
|
|
125
|
+
});
|
|
126
|
+
if (checked) {
|
|
127
|
+
selections.value.push({
|
|
128
|
+
id: data.id,
|
|
129
|
+
code: data.code,
|
|
130
|
+
name: data.name
|
|
131
|
+
});
|
|
132
|
+
treeRef.value.setChecked(data.id, checked, false);
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
const handleNodeClick = (row, node) => {
|
|
136
|
+
let checked = !node.checked;
|
|
137
|
+
if (!props.param.isMultiple) {
|
|
138
|
+
handleCheck(row, { checkedKeys: [row.id] }, checked);
|
|
139
|
+
if (checked) {
|
|
140
|
+
treeRef.value.setChecked(row.id, checked, false);
|
|
141
|
+
}
|
|
142
|
+
} else {
|
|
143
|
+
handleCheckChange(row, checked);
|
|
144
|
+
treeRef.value.setChecked(row.id, checked, false);
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
let queryCondition = null;
|
|
148
|
+
const initQueryPage = async () => {
|
|
149
|
+
queryCondition = orgName.value ? { queryFor: "treePart", parentId: "0", name: orgName.value } : null;
|
|
150
|
+
reloadTree();
|
|
151
|
+
};
|
|
152
|
+
const reloadTree = () => {
|
|
153
|
+
isShowTree.value = false;
|
|
154
|
+
vue.nextTick(() => {
|
|
155
|
+
isShowTree.value = true;
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
const handleDeleteTag = (item) => {
|
|
159
|
+
selections.value = selections.value.filter((organization) => organization.code !== item.code);
|
|
160
|
+
treeRef.value.setChecked(item.id, false, false);
|
|
161
|
+
};
|
|
162
|
+
const handleCancel = () => {
|
|
163
|
+
isOpenDialog.value = false;
|
|
164
|
+
};
|
|
165
|
+
const handleSure = () => {
|
|
166
|
+
handleCancel();
|
|
167
|
+
emit("change", selections.value);
|
|
168
|
+
};
|
|
169
|
+
return (_ctx, _cache) => {
|
|
170
|
+
const _component_el_input = vue.resolveComponent("el-input");
|
|
171
|
+
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
172
|
+
const _component_el_tree = vue.resolveComponent("el-tree");
|
|
173
|
+
const _component_ele_loading = vue.resolveComponent("ele-loading");
|
|
174
|
+
const _component_el_tag = vue.resolveComponent("el-tag");
|
|
175
|
+
const _component_ele_split_panel = vue.resolveComponent("ele-split-panel");
|
|
176
|
+
const _component_ele_card = vue.resolveComponent("ele-card");
|
|
177
|
+
const _component_ele_page = vue.resolveComponent("ele-page");
|
|
178
|
+
const _component_el_button = vue.resolveComponent("el-button");
|
|
179
|
+
const _component_ele_dialog = vue.resolveComponent("ele-dialog");
|
|
180
|
+
return vue.openBlock(), vue.createBlock(_component_ele_dialog, {
|
|
181
|
+
form: "",
|
|
182
|
+
width: "50%",
|
|
183
|
+
modelValue: isOpenDialog.value,
|
|
184
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isOpenDialog.value = $event),
|
|
185
|
+
title: "选择机构",
|
|
186
|
+
class: "yu-big-dialog"
|
|
187
|
+
}, {
|
|
188
|
+
footer: vue.withCtx(() => [
|
|
189
|
+
vue.createVNode(_component_el_button, {
|
|
190
|
+
icon: vue.unref(iconsVue.Close),
|
|
191
|
+
onClick: handleCancel
|
|
192
|
+
}, {
|
|
193
|
+
default: vue.withCtx(() => _cache[2] || (_cache[2] = [
|
|
194
|
+
vue.createTextVNode("取消")
|
|
195
|
+
])),
|
|
196
|
+
_: 1,
|
|
197
|
+
__: [2]
|
|
198
|
+
}, 8, ["icon"]),
|
|
199
|
+
vue.createVNode(_component_el_button, {
|
|
200
|
+
type: "primary",
|
|
201
|
+
icon: vue.unref(iconsVue.Check),
|
|
202
|
+
loading: isLoading.value,
|
|
203
|
+
onClick: handleSure
|
|
204
|
+
}, {
|
|
205
|
+
default: vue.withCtx(() => _cache[3] || (_cache[3] = [
|
|
206
|
+
vue.createTextVNode(" 确认 ")
|
|
207
|
+
])),
|
|
208
|
+
_: 1,
|
|
209
|
+
__: [3]
|
|
210
|
+
}, 8, ["icon", "loading"])
|
|
211
|
+
]),
|
|
212
|
+
default: vue.withCtx(() => [
|
|
213
|
+
vue.createVNode(_component_ele_page, {
|
|
214
|
+
"flex-table": "",
|
|
215
|
+
"multi-card": false,
|
|
216
|
+
"hide-footer": "",
|
|
217
|
+
style: { "min-height": "600px" }
|
|
218
|
+
}, {
|
|
219
|
+
default: vue.withCtx(() => [
|
|
220
|
+
vue.createVNode(_component_ele_card, {
|
|
221
|
+
"flex-table": "",
|
|
222
|
+
"body-style": { padding: "0 0 0 16px", overflow: "hidden" }
|
|
223
|
+
}, {
|
|
224
|
+
default: vue.withCtx(() => [
|
|
225
|
+
vue.createVNode(_component_ele_split_panel, {
|
|
226
|
+
ref_key: "splitRef",
|
|
227
|
+
ref: splitRef,
|
|
228
|
+
"flex-table": "",
|
|
229
|
+
size: "256px",
|
|
230
|
+
"allow-collapse": "",
|
|
231
|
+
"custom-style": { borderWidth: "0 1px 0 0", padding: "16px 0" },
|
|
232
|
+
"body-style": { padding: "16px 16px 0 0", overflow: "hidden" },
|
|
233
|
+
style: { height: "100%", overflow: "visible" }
|
|
234
|
+
}, {
|
|
235
|
+
body: vue.withCtx(() => [
|
|
236
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
237
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(selections.value, (item, index) => {
|
|
238
|
+
return vue.openBlock(), vue.createBlock(_component_el_tag, {
|
|
239
|
+
type: "success",
|
|
240
|
+
size: "large",
|
|
241
|
+
"disable-transitions": true,
|
|
242
|
+
closable: "",
|
|
243
|
+
key: index,
|
|
244
|
+
onClick: ($event) => handleDeleteTag(item),
|
|
245
|
+
onClose: ($event) => handleDeleteTag(item)
|
|
246
|
+
}, {
|
|
247
|
+
default: vue.withCtx(() => [
|
|
248
|
+
vue.createTextVNode(vue.toDisplayString(item.name), 1)
|
|
249
|
+
]),
|
|
250
|
+
_: 2
|
|
251
|
+
}, 1032, ["onClick", "onClose"]);
|
|
252
|
+
}), 128))
|
|
253
|
+
])
|
|
254
|
+
]),
|
|
255
|
+
default: vue.withCtx(() => [
|
|
256
|
+
vue.createElementVNode("div", _hoisted_1, [
|
|
257
|
+
vue.createVNode(_component_el_input, {
|
|
258
|
+
modelValue: orgName.value,
|
|
259
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => orgName.value = $event),
|
|
260
|
+
placeholder: "输入机构名称后按回车搜索",
|
|
261
|
+
"prefix-icon": vue.unref(icons.SearchOutlined),
|
|
262
|
+
clearable: "",
|
|
263
|
+
maxlength: 20,
|
|
264
|
+
onKeyup: vue.withKeys(initQueryPage, ["enter"]),
|
|
265
|
+
onClear: initQueryPage
|
|
266
|
+
}, null, 8, ["modelValue", "prefix-icon"])
|
|
267
|
+
]),
|
|
268
|
+
vue.createVNode(_component_ele_loading, {
|
|
269
|
+
loading: isLoading.value,
|
|
270
|
+
style: { flex: 1, paddingRight: "16px", overflow: "auto" }
|
|
271
|
+
}, {
|
|
272
|
+
default: vue.withCtx(() => [
|
|
273
|
+
isShowTree.value ? (vue.openBlock(), vue.createBlock(_component_el_tree, {
|
|
274
|
+
key: 0,
|
|
275
|
+
ref_key: "treeRef",
|
|
276
|
+
ref: treeRef,
|
|
277
|
+
id: treeId.value,
|
|
278
|
+
"node-key": "id",
|
|
279
|
+
lazy: "",
|
|
280
|
+
load: loadTreeNode,
|
|
281
|
+
"show-checkbox": "",
|
|
282
|
+
"check-strictly": true,
|
|
283
|
+
"highlight-current": "",
|
|
284
|
+
props: { label: "name", children: "children", isLeaf: "isLeaf" },
|
|
285
|
+
"default-checked-keys": checkedKeys.value,
|
|
286
|
+
"expand-on-click-node": false,
|
|
287
|
+
style: { "--ele-tree-item-height": "34px" },
|
|
288
|
+
onCheck: handleCheck,
|
|
289
|
+
onCheckChange: handleCheckChange,
|
|
290
|
+
onNodeClick: handleNodeClick
|
|
291
|
+
}, {
|
|
292
|
+
default: vue.withCtx(({ data }) => [
|
|
293
|
+
vue.createElementVNode("span", null, [
|
|
294
|
+
vue.createVNode(_component_el_icon, {
|
|
295
|
+
size: 15,
|
|
296
|
+
style: { "margin-right": "8px", "vertical-align": "-2px" }
|
|
297
|
+
}, {
|
|
298
|
+
default: vue.withCtx(() => [
|
|
299
|
+
data.parentId == "0" ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(icons.ClusterOutlined)), { key: 0 })) : data.type == "org" ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(icons.OrganizationOrg)), { key: 1 })) : data.type == "unit" ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(icons.OrganizationUnit)), { key: 2 })) : data.type == "dept" ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(icons.OrganizationDept)), { key: 3 })) : vue.createCommentVNode("", true)
|
|
300
|
+
]),
|
|
301
|
+
_: 2
|
|
302
|
+
}, 1024),
|
|
303
|
+
vue.createElementVNode("span", null, vue.toDisplayString(data.name), 1)
|
|
304
|
+
])
|
|
305
|
+
]),
|
|
306
|
+
_: 1
|
|
307
|
+
}, 8, ["id", "default-checked-keys"])) : vue.createCommentVNode("", true)
|
|
308
|
+
]),
|
|
309
|
+
_: 1
|
|
310
|
+
}, 8, ["loading"])
|
|
311
|
+
]),
|
|
312
|
+
_: 1
|
|
313
|
+
}, 512)
|
|
314
|
+
]),
|
|
315
|
+
_: 1
|
|
316
|
+
})
|
|
317
|
+
]),
|
|
318
|
+
_: 1
|
|
319
|
+
})
|
|
320
|
+
]),
|
|
321
|
+
_: 1
|
|
322
|
+
}, 8, ["modelValue"]);
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
module.exports = _sfc_main;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { UimsOrganization } from 'yuang-framework-ui-common/lib/interface/uims/uimsOrganization';
|
|
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: (uimsOrganizationList: UimsOrganization[]) => 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?: ((uimsOrganizationList: UimsOrganization[]) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const OrganizationDialog = require("./components/organization-dialog");
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
5
|
+
...{ name: "YuUimsOrganizationDialog" },
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: {},
|
|
9
|
+
param: { default: {
|
|
10
|
+
isMultiple: true
|
|
11
|
+
} }
|
|
12
|
+
},
|
|
13
|
+
emits: ["change"],
|
|
14
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
15
|
+
const props = __props;
|
|
16
|
+
vue.watch(
|
|
17
|
+
() => props.modelValue,
|
|
18
|
+
() => {
|
|
19
|
+
init();
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
vue.watch(
|
|
23
|
+
() => props.param,
|
|
24
|
+
() => {
|
|
25
|
+
init();
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
const emit = __emit;
|
|
29
|
+
vue.onBeforeMount(() => {
|
|
30
|
+
init();
|
|
31
|
+
});
|
|
32
|
+
const init = () => {
|
|
33
|
+
props.param.isMultiple = props.param.isMultiple ?? true;
|
|
34
|
+
props.param.modelValue = props.modelValue;
|
|
35
|
+
};
|
|
36
|
+
const isShowDialog = vue.ref(false);
|
|
37
|
+
const showDialog = () => {
|
|
38
|
+
isShowDialog.value = true;
|
|
39
|
+
};
|
|
40
|
+
const hideDialog = () => {
|
|
41
|
+
isShowDialog.value = false;
|
|
42
|
+
};
|
|
43
|
+
const handleChange = (selections) => {
|
|
44
|
+
emit("change", selections);
|
|
45
|
+
hideDialog();
|
|
46
|
+
};
|
|
47
|
+
__expose({
|
|
48
|
+
showDialog
|
|
49
|
+
});
|
|
50
|
+
return (_ctx, _cache) => {
|
|
51
|
+
const _component_el_input = vue.resolveComponent("el-input");
|
|
52
|
+
return vue.openBlock(), vue.createElementBlock("div", null, [
|
|
53
|
+
vue.withDirectives(vue.createVNode(_component_el_input, { onClick: showDialog }, null, 512), [
|
|
54
|
+
[vue.vShow, false]
|
|
55
|
+
]),
|
|
56
|
+
isShowDialog.value ? (vue.openBlock(), vue.createBlock(OrganizationDialog, {
|
|
57
|
+
key: 0,
|
|
58
|
+
modelValue: isShowDialog.value,
|
|
59
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isShowDialog.value = $event),
|
|
60
|
+
param: props.param,
|
|
61
|
+
onChange: handleChange
|
|
62
|
+
}, null, 8, ["modelValue", "param"])) : vue.createCommentVNode("", true)
|
|
63
|
+
]);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
module.exports = _sfc_main;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { UimsOrganization } from 'yuang-framework-ui-common/lib/interface/uims/uimsOrganization';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
modelValue?: string;
|
|
5
|
+
param?: object;
|
|
6
|
+
}>, {
|
|
7
|
+
model: string;
|
|
8
|
+
param: {
|
|
9
|
+
isMultiple: boolean;
|
|
10
|
+
};
|
|
11
|
+
}>>, {
|
|
12
|
+
showDialog: () => void;
|
|
13
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
+
change: (uimsOrganizationList: UimsOrganization[]) => void;
|
|
15
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
16
|
+
modelValue?: string;
|
|
17
|
+
param?: object;
|
|
18
|
+
}>, {
|
|
19
|
+
model: string;
|
|
20
|
+
param: {
|
|
21
|
+
isMultiple: boolean;
|
|
22
|
+
};
|
|
23
|
+
}>>> & Readonly<{
|
|
24
|
+
onChange?: ((uimsOrganizationList: UimsOrganization[]) => any) | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
param: object;
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
30
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
31
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
32
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
33
|
+
} : {
|
|
34
|
+
type: import('vue').PropType<T[K]>;
|
|
35
|
+
required: true;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
type __VLS_WithDefaults<P, D> = {
|
|
39
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
40
|
+
default: D[K];
|
|
41
|
+
}> : P[K];
|
|
42
|
+
};
|
|
43
|
+
type __VLS_Prettify<T> = {
|
|
44
|
+
[K in keyof T]: T[K];
|
|
45
|
+
} & {};
|