@utogether/udp-core 1.0.0 → 1.0.1-beta.1
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/build/plugins.ts +8 -2
- package/dist/{403-B1R-4vXw.js → 403-Dp617CWX.js} +9 -8
- package/dist/{404-fXPl8csw.js → 404-Cz_Axb6Y.js} +15 -14
- package/dist/{500-eI5842YB.js → 500-BGCtRNse.js} +11 -10
- package/dist/{AuthorityInfo-CfVH6PaB.js → AuthorityInfo-DGGfm7IS.js} +1 -1
- package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-DbK-f8jH.js → AuthorityInfo.vue_vue_type_style_index_0_lang-BqccGW7v.js} +3 -3
- package/dist/{AuthorityPanel-BaLMwMgW.js → AuthorityPanel-BeBNiwqc.js} +1 -1
- package/dist/{AuthorityPanel.vue_vue_type_style_index_0_lang-C_bkqLD9.js → AuthorityPanel.vue_vue_type_style_index_0_lang-CIYmnP9-.js} +6 -6
- package/dist/{Company-CYC9Avfz.js → Company-IV3GTnzY.js} +3 -3
- package/dist/{CompanyPanel-B4MzoqN_.js → CompanyPanel-qV-_VtoL.js} +10 -10
- package/dist/{Department-B4BNSiYx.js → Department-B3W-OxW8.js} +3 -3
- package/dist/{DepartmentPanel-zJO89L2O.js → DepartmentPanel-Cw3OWxE7.js} +23 -23
- package/dist/{DesignPanel-S8P0J97f.js → DesignPanel-BFxR2fHJ.js} +1 -1
- package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-DW-_Vqrr.js → DesignPanel.vue_vue_type_style_index_0_lang-DljbeFba.js} +6 -6
- package/dist/{DictView-bIS5-rK-.js → DictView-C-i7e4hZ.js} +9 -9
- package/dist/InvOrganization-cfT6riGU.js +260 -0
- package/dist/{Org-kXHSjsgJ.js → Org-CA7vTDIF.js} +3 -3
- package/dist/{Preview-CRyiwUIR.js → Preview-BlDMmpdR.js} +1 -1
- package/dist/{ReportDefine-WZYIx8Sm.js → ReportDefine-Cub_85LA.js} +1 -1
- package/dist/{ReportDesign-D-7GKgpb.js → ReportDesign-hFhq5UVE.js} +10 -10
- package/dist/{ReportQuery-BIIJny6w.js → ReportQuery-ChkWEyxT.js} +5 -5
- package/dist/{ReportQueryFrom-OoUl7N2O.js → ReportQueryFrom-KVyD_8Dj.js} +1 -1
- package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-B878fgj8.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-CLNODquq.js} +6 -5
- package/dist/{ReportTemplate-Cfeq9US-.js → ReportTemplate-ag9NDvh2.js} +11 -11
- package/dist/{Role-BwTV2QMH.js → Role-_q3lQ8CZ.js} +3 -3
- package/dist/{RoleAssign-De1JjOun.js → RoleAssign-DZb9IRsm.js} +3 -3
- package/dist/{RolePanel-pUBXsqCM.js → RolePanel-BQb1LlhD.js} +1 -1
- package/dist/{RolePanel-E3RcdByM.js → RolePanel-CsLsz-Ds.js} +1 -1
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-B2pQwHb0.js → RolePanel.vue_vue_type_script_setup_true_lang-BrnRgHEk.js} +12 -12
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-CTIad9_Q.js → RolePanel.vue_vue_type_script_setup_true_lang-cmW7zBLu.js} +4 -4
- package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-vMR1fBi0.js → ScrollPanel.vue_vue_type_style_index_0_lang-CaFKRwXu.js} +8 -8
- package/dist/{Staff-Czm7A8vI.js → Staff-BSf9Ypbk.js} +3 -3
- package/dist/StaffInfo-BNKasyMF.js +4 -0
- package/dist/{StaffInfo.vue_vue_type_style_index_0_lang-DMTL7KCh.js → StaffInfo.vue_vue_type_script_setup_true_lang-DDZ7ukd0.js} +7 -7
- package/dist/{StaffPanel-CHk60LEz.js → StaffPanel-Bpq0WVlH.js} +1 -1
- package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-iPKLb5wG.js → StaffPanel.vue_vue_type_script_setup_true_lang-BhiJ0Q-Q.js} +46 -49
- package/dist/{SysUser-BGwbttRn.js → SysUser-FAABuNti.js} +2 -2
- package/dist/{SysUserPanel-BCbKoLKt.js → SysUserPanel-PxJeOgHm.js} +1 -1
- package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-0QUjnhjF.js → SysUserPanel.vue_vue_type_script_setup_true_lang-njefUln5.js} +1 -2
- package/dist/{SystemMenu-BkqZSDKl.js → SystemMenu-C-7NAGon.js} +47 -45
- package/dist/{UserInfo-BsyAcT2d.js → UserInfo-ClXKtyGo.js} +1 -1
- package/dist/{UserInfo.vue_vue_type_style_index_0_lang-D0-KDxAh.js → UserInfo.vue_vue_type_style_index_0_lang-8N7P4Hl7.js} +13 -13
- package/dist/{childView-CyuLTUqC.js → childView-C_HmDQNd.js} +1 -1
- package/dist/{childView-CF83nhxb.js → childView-uUlBcTza.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-CNSgGda3.js → childView.vue_vue_type_style_index_0_lang-Ckjmw6wJ.js} +6 -6
- package/dist/{childView.vue_vue_type_style_index_0_lang-Cch4lE-i.js → childView.vue_vue_type_style_index_0_lang-y0sDvYx5.js} +1 -1
- package/dist/{code-rule-Bz-gnktN.js → code-rule-AgCVDKFy.js} +6 -6
- package/dist/core.es.js +4 -4
- package/dist/{cron-task-CIifSUdW.js → cron-task-C6FgQxTi.js} +11 -11
- package/dist/{frameView-_d2mqjjQ.js → frameView-BDgISK7N.js} +15 -14
- package/dist/index-DzOzUkf6.js +3388 -0
- package/dist/{layoutView-DLKVepB8.js → layoutView-yb3DV2DQ.js} +658 -653
- package/dist/{login-LREiDfFU.js → login-RRpljbkm.js} +26 -25
- package/dist/{lov-view-DDrIVILB.js → lov-view-C9-rjzZR.js} +5 -5
- package/dist/{menuInfo-B1FUV-Sk.js → menuInfo-CzPQyFhp.js} +1 -1
- package/dist/{menuInfo.vue_vue_type_style_index_0_lang-Cnk3vdtD.js → menuInfo.vue_vue_type_style_index_0_lang-BumXunCg.js} +17 -17
- package/dist/pda-app-Dvy3U-b6.js +696 -0
- package/dist/redirect-BqegffKC.js +15 -0
- package/dist/{resource-BCwx9fEv.js → resource-Fy0lFkSV.js} +7 -7
- package/dist/{su-welcome-189A7N4r.js → su-welcome-DYvSCUST.js} +41 -40
- package/dist/{sys-config-BZ3sejow.js → sys-config-DJ1vNQTy.js} +18 -18
- package/dist/udp-core.css +2 -2
- package/dist/{utogether-r08LNiIZ.js → utogether-CjmJiHoE.js} +6 -6
- package/package.json +4 -2
- package/src/App.vue +3 -3
- package/src/components/udp/form-upload.vue +132 -0
- package/src/components/udp/index.ts +4 -0
- package/src/components/udp/modal-form.vue +180 -0
- package/src/components/udp/utils.ts +40 -0
- package/src/main.ts +5 -4
- package/src/plugins/vxe-table/index.ts +3 -3
- package/src/plugins/vxe-table/render.tsx +604 -184
- package/src/utils/udp/useRender.ts +420 -0
- package/src/views/organization/inv-org/InvOrganization.vue +2 -1
- package/src/views/organization/staff/StaffInfo.vue +0 -30
- package/src/views/organization/staff/StaffPanel.vue +4 -3
- package/src/views/system/menu/AuthorityPanel.vue +2 -2
- package/src/views/system/menu/SystemMenu.vue +9 -3
- package/src/views/system/menu/menuInfo.vue +6 -3
- package/src/views/system/role/AuthorityInfo.vue +1 -19
- package/src/views/system/sysUser/SysUserPanel.vue +1 -1
- package/src/views/udev/dict/DictView.vue +2 -2
- package/src/views/uhome/components/menu-favorite.vue +1 -1
- package/src/views/uhome/su-welcome.vue +1 -1
- package/src/views/ulogin/login.vue +1 -1
- package/types/global.d.ts +0 -1
- package/vite.config.ts +9 -2
- package/dist/InvOrganization-MuM2jtsG.js +0 -66
- package/dist/StaffInfo-DJzvBuxy.js +0 -4
- package/dist/core.umd.js +0 -173
- package/dist/index-BKIw8tSn.js +0 -9195
- package/dist/pda-app-CRhVGijN.js +0 -2209
- package/dist/redirect-DiaNDu8F.js +0 -15
- package/src/assets/images/empty.png +0 -0
- package/src/assets/images/logo.png +0 -0
- package/src/components/ReCountTo/README.md +0 -2
- package/src/components/ReCountTo/index.ts +0 -18
- package/src/components/ReCountTo/src/normal/index.tsx +0 -165
- package/src/components/ReCountTo/src/normal/props.ts +0 -37
- package/src/components/ReCountTo/src/rebound/index.tsx +0 -67
- package/src/components/ReCountTo/src/rebound/props.ts +0 -14
- package/src/components/ReCountTo/src/rebound/rebound.css +0 -77
- package/src/components/ReCropper/index.ts +0 -14
- package/src/components/ReCropper/src/index.tsx +0 -141
- package/src/components/ReFlicker/index.css +0 -39
- package/src/components/ReFlicker/index.ts +0 -50
- package/src/components/ReFlop/index.ts +0 -14
- package/src/components/ReFlop/src/Filpper.tsx +0 -99
- package/src/components/ReFlop/src/filpper.css +0 -184
- package/src/components/ReFlop/src/index.vue +0 -126
- package/src/components/ReFlowChart/index.ts +0 -24
- package/src/components/ReFlowChart/src/Control.vue +0 -139
- package/src/components/ReFlowChart/src/DataDialog.vue +0 -12
- package/src/components/ReFlowChart/src/NodePanel.vue +0 -151
- package/src/components/ReFlowChart/src/adpterForTurbo.ts +0 -160
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.css +0 -49
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.eot +0 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.js +0 -61
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.json +0 -58
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.svg +0 -47
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.ttf +0 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff +0 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff2 +0 -0
- package/src/components/ReFlowChart/src/config.ts +0 -62
- package/src/components/ReSplitPane/index.css +0 -49
- package/src/components/ReSplitPane/index.tsx +0 -119
- package/src/components/ReSplitPane/resizer.css +0 -45
- package/src/components/ReSplitPane/resizer.tsx +0 -30
- package/src/components/SuCommon/card/components/Card.vue +0 -148
- package/src/components/SuCommon/card/components/DialogForm.vue +0 -127
- package/src/components/SuCommon/card/index.vue +0 -142
- package/src/components/SuCommon/icon-select/index.vue +0 -241
- package/src/components/SuCommon/table/index.vue +0 -208
- package/src/components/SuCommon/utils/index.ts +0 -103
- package/src/components/SuCommon/utils/slot.tsx +0 -50
- package/src/views/components/contextmenu/basic.vue +0 -74
- package/src/views/components/contextmenu/context-menu.vue +0 -40
- package/src/views/components/contextmenu/menuDynamic.vue +0 -99
- package/src/views/components/contextmenu/menuGroup.vue +0 -71
- package/src/views/components/count-to/index.vue +0 -43
- package/src/views/components/cropping/index.vue +0 -59
- package/src/views/components/cropping/picture.jpeg +0 -0
- package/src/views/components/split-pane/index.vue +0 -82
- package/src/views/components/video/index.vue +0 -57
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2021-11-29 18:18:00
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2025-04-18 11:09:01
|
|
6
|
+
* @Description: file content
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
declare interface Fn<T = any, R = T> {
|
|
10
|
+
(...arg: T[]): R;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface IAttrs {
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
code?: string;
|
|
17
|
+
[x: string]: any;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface IEvents {
|
|
21
|
+
change?: Fn;
|
|
22
|
+
clear?: Fn;
|
|
23
|
+
blur?: Fn;
|
|
24
|
+
focus?: Fn;
|
|
25
|
+
input?: Fn;
|
|
26
|
+
filterMethod?: Fn;
|
|
27
|
+
}
|
|
28
|
+
import { isObject, isEmpty, isString, isFunction } from 'xe-utils';
|
|
29
|
+
import { storageLocal } from '@utogether/utils';
|
|
30
|
+
|
|
31
|
+
export const useRender = () => {
|
|
32
|
+
const optionProps = { value: 'dictCode', label: 'dictName' };
|
|
33
|
+
/**
|
|
34
|
+
* @description: 字典下拉渲染
|
|
35
|
+
* @param {*} attrs string|object string时默认未code
|
|
36
|
+
* @param {*} methods fn|object 回调函数 fn默认为onChange
|
|
37
|
+
*/
|
|
38
|
+
const renderDict = (attrs: IAttrs | string, methods?) => {
|
|
39
|
+
const events = getEvents(methods);
|
|
40
|
+
let props = {
|
|
41
|
+
clearable: true,
|
|
42
|
+
disabled: false,
|
|
43
|
+
showValue: false,
|
|
44
|
+
placeholder: null
|
|
45
|
+
};
|
|
46
|
+
let defaultValue;
|
|
47
|
+
let dictCode;
|
|
48
|
+
if (isObject(attrs)) {
|
|
49
|
+
props = Object.assign(props, attrs);
|
|
50
|
+
defaultValue = attrs.defaultValue;
|
|
51
|
+
dictCode = attrs?.code;
|
|
52
|
+
// keyValue = attrs?.keyValue;
|
|
53
|
+
} else {
|
|
54
|
+
dictCode = attrs;
|
|
55
|
+
}
|
|
56
|
+
const opts = storageLocal.getItem('kLov')[dictCode]?.children;
|
|
57
|
+
const options = opts ? opts.filter(opt => opt.enabled === '1') : [];
|
|
58
|
+
return {
|
|
59
|
+
name: '#select',
|
|
60
|
+
optionProps,
|
|
61
|
+
options,
|
|
62
|
+
props,
|
|
63
|
+
defaultValue,
|
|
64
|
+
events
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* @description: 远程搜索下拉选择-编辑
|
|
69
|
+
* @param {*} attrs attrs
|
|
70
|
+
* @return {*}
|
|
71
|
+
*/
|
|
72
|
+
const renderSelect = (attrs, methods?) => {
|
|
73
|
+
const events = getEvents(methods);
|
|
74
|
+
return {
|
|
75
|
+
name: '#SuSelect',
|
|
76
|
+
optionProps: attrs?.optionProps || { label: 'label', value: 'value' },
|
|
77
|
+
props: attrs?.props,
|
|
78
|
+
options: attrs?.options || [],
|
|
79
|
+
events
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* @description: 查询关联了用户的员工
|
|
84
|
+
* @param {*} attr '渲染器属性'
|
|
85
|
+
* @param {*} callback 回调函数
|
|
86
|
+
* @return {*} 渲染组件
|
|
87
|
+
*/
|
|
88
|
+
const renderUser = (attr?, callback?) => {
|
|
89
|
+
const attrs = {
|
|
90
|
+
optionProps: { extLabel: 'userName', value: 'employeeName' },
|
|
91
|
+
props: {
|
|
92
|
+
attrs: { disabled: attr?.disabled },
|
|
93
|
+
disabled: attr?.disabled,
|
|
94
|
+
defaultValue: attr?.defaultValue,
|
|
95
|
+
mapField: attr?.mapField,
|
|
96
|
+
code: 'SYS037',
|
|
97
|
+
url: '/uums/employee/listEmployeeIsUser',
|
|
98
|
+
fetchField: 'employeeName'
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
return renderSelect(attrs, callback);
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* @description: 系统用户下拉
|
|
105
|
+
* @param {*} options 映射字段
|
|
106
|
+
* @return {*}
|
|
107
|
+
*/
|
|
108
|
+
const renderSysUser = (options?) => {
|
|
109
|
+
const attrs = {
|
|
110
|
+
optionProps: { extLabel: 'userName', value: 'name' },
|
|
111
|
+
props: {
|
|
112
|
+
code: 'sys/listUsers',
|
|
113
|
+
url: '/uums/user',
|
|
114
|
+
fetchField: 'name',
|
|
115
|
+
mapField: options?.mapField
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
return renderSelect(attrs);
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @description: 查询库存组织
|
|
123
|
+
* @param {*} name '渲染器属性'
|
|
124
|
+
* @param {*} callback 回调函数
|
|
125
|
+
* @return {*} 渲染组件
|
|
126
|
+
*/
|
|
127
|
+
const renderInvOrg = (attrs?, methods?) => {
|
|
128
|
+
const optionProps = {
|
|
129
|
+
label: 'organizationName',
|
|
130
|
+
value: attrs?.field || 'organizationName'
|
|
131
|
+
};
|
|
132
|
+
const props = {
|
|
133
|
+
mapField: {},
|
|
134
|
+
defaultParams: attrs?.defaultParams,
|
|
135
|
+
url: '/uums/cusOrganization',
|
|
136
|
+
fetchField: 'organizationName'
|
|
137
|
+
};
|
|
138
|
+
const mapField = {
|
|
139
|
+
organizationId: 'id',
|
|
140
|
+
organizationCode: 'organizationCode'
|
|
141
|
+
};
|
|
142
|
+
Object.assign(props.mapField, mapField, attrs?.mapField || {});
|
|
143
|
+
return { name: '#SuSelect', props, optionProps, options: [], methods };
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* @description: 查询业务单元
|
|
147
|
+
* @param {*} name '渲染器属性'
|
|
148
|
+
* @param {*} callback 回调函数
|
|
149
|
+
* @return {*} 渲染组件
|
|
150
|
+
*/
|
|
151
|
+
const renderBU = (attrs?, methods?) => {
|
|
152
|
+
const optionProps = {
|
|
153
|
+
label: 'orgName',
|
|
154
|
+
value: attrs?.field || 'orgName'
|
|
155
|
+
};
|
|
156
|
+
const props = {
|
|
157
|
+
mapField: {},
|
|
158
|
+
defaultParams: attrs?.defaultParams,
|
|
159
|
+
url: '/uums/org',
|
|
160
|
+
fetchField: 'orgName'
|
|
161
|
+
};
|
|
162
|
+
const mapField = { orgId: 'id', orgCode: 'orgCode' };
|
|
163
|
+
Object.assign(props.mapField, mapField, attrs?.mapField || {});
|
|
164
|
+
return { name: '#SuSelect', props, optionProps, options: [], methods };
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* @description: item input渲染器
|
|
168
|
+
* @param {*} name 渲染器名称
|
|
169
|
+
* @param {*} props 渲染的参数(请查看目标渲染的 Props)
|
|
170
|
+
* @return {*} item 渲染器
|
|
171
|
+
*/
|
|
172
|
+
const renderInput = (attrs?, methods?) => {
|
|
173
|
+
const props = Object.assign({ disabled: false }, attrs);
|
|
174
|
+
const defaultValue = props?.defaultValue;
|
|
175
|
+
return {
|
|
176
|
+
name: 'VxeInput',
|
|
177
|
+
props,
|
|
178
|
+
defaultValue,
|
|
179
|
+
events: getEvents(methods)
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* @description: item input渲染器
|
|
184
|
+
* @param {*} name 渲染器名称
|
|
185
|
+
* @param {*} props 渲染的参数(请查看目标渲染的 Props)
|
|
186
|
+
* @return {*} item 渲染器
|
|
187
|
+
*/
|
|
188
|
+
const renderTextarea = (attrs?, methods?) => {
|
|
189
|
+
const props = Object.assign({ disabled: false, rows: 3 }, attrs);
|
|
190
|
+
const defaultValue = props?.defaultValue;
|
|
191
|
+
return {
|
|
192
|
+
name: 'VxeTextarea',
|
|
193
|
+
props,
|
|
194
|
+
defaultValue,
|
|
195
|
+
events: getEvents(methods)
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* @description: checkbox
|
|
200
|
+
* @param {*} attrs
|
|
201
|
+
* @return {*} checkbox渲染器
|
|
202
|
+
*/
|
|
203
|
+
const renderCheckBox = (attrs, methods?) => {
|
|
204
|
+
const name = 'VxeCheckbox';
|
|
205
|
+
const { defaultValue, options, props } = commonProps(attrs);
|
|
206
|
+
return { name, defaultValue, options, props, events: getEvents(methods) };
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* @description: radio
|
|
210
|
+
* @param {*} attrs
|
|
211
|
+
* @param {*} methods 事件
|
|
212
|
+
* @return {*} radio渲染器
|
|
213
|
+
*/
|
|
214
|
+
const renderRadio = (attrs: string | IAttrs, methods?) => {
|
|
215
|
+
const name = 'VxeRadio';
|
|
216
|
+
const { defaultValue, options, props } = commonProps(attrs);
|
|
217
|
+
return { name, defaultValue, options, props, events: getEvents(methods) };
|
|
218
|
+
};
|
|
219
|
+
const commonProps = (attrs: string | IAttrs) => {
|
|
220
|
+
let props = { disabled: false };
|
|
221
|
+
let defaultValue;
|
|
222
|
+
const dictData = storageLocal.getItem('kLov');
|
|
223
|
+
let code = '';
|
|
224
|
+
if (isObject(attrs)) {
|
|
225
|
+
defaultValue = attrs.defaultValue;
|
|
226
|
+
code = attrs.code!;
|
|
227
|
+
props = Object.assign(props, attrs || {});
|
|
228
|
+
} else if (isString(attrs)) {
|
|
229
|
+
code = attrs;
|
|
230
|
+
}
|
|
231
|
+
const options = code
|
|
232
|
+
? dictData[code]?.children.map(m => {
|
|
233
|
+
return { label: m.dictName, value: m.dictCode };
|
|
234
|
+
})
|
|
235
|
+
: [];
|
|
236
|
+
return { props, defaultValue, options };
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* @description: 数值录入
|
|
240
|
+
* @param {*} attrs 渲染的参数(请查看目标渲染的props)
|
|
241
|
+
* @param {*} methods 渲染目标的events,
|
|
242
|
+
* @return {*} editRender
|
|
243
|
+
*/
|
|
244
|
+
const renderNumber = (attrs?, methods?) => {
|
|
245
|
+
const events = getEvents(methods);
|
|
246
|
+
const props = Object.assign(
|
|
247
|
+
{ type: 'number', clearable: true, min: 0, controls: false },
|
|
248
|
+
attrs || {}
|
|
249
|
+
);
|
|
250
|
+
|
|
251
|
+
return {
|
|
252
|
+
name: 'VxeInput',
|
|
253
|
+
props,
|
|
254
|
+
defaultValue: attrs?.defaultValue,
|
|
255
|
+
events
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
/**
|
|
259
|
+
* @description: 时间日期
|
|
260
|
+
* @param {*} attrs 渲染的参数(请查看目标渲染的props)
|
|
261
|
+
* @param {*} methods 渲染目标的events,
|
|
262
|
+
* @return {*} editRender
|
|
263
|
+
*/
|
|
264
|
+
const renderDate = (attrs?, methods?) => {
|
|
265
|
+
const events = getEvents(methods);
|
|
266
|
+
const valueFormat = 'yyyy-MM-dd HH:mm:ss';
|
|
267
|
+
const defaultValue = attrs?.defaultValue;
|
|
268
|
+
const prop = { type: 'date', valueFormat, clearable: true };
|
|
269
|
+
const props = Object.assign(prop, attrs || {});
|
|
270
|
+
return { name: 'VxeInput', props, defaultValue, events };
|
|
271
|
+
};
|
|
272
|
+
/**
|
|
273
|
+
* @description: 值集视图
|
|
274
|
+
* @param {*} attrs 渲染的参数
|
|
275
|
+
* @param {*} methods 渲染目标的events,
|
|
276
|
+
* @return {*} editRender
|
|
277
|
+
*/
|
|
278
|
+
const renderLov = (attrs, methods?) => {
|
|
279
|
+
const events = getEvents(methods);
|
|
280
|
+
const props = Object.assign({}, attrs || {});
|
|
281
|
+
return { name: '#lov', props, events };
|
|
282
|
+
};
|
|
283
|
+
/**
|
|
284
|
+
* @description: 本地下拉选择
|
|
285
|
+
* @param {*} attrs 同ElSelect
|
|
286
|
+
* @param {*} methods 事件, 默认为change事件
|
|
287
|
+
* @return {*}
|
|
288
|
+
*/
|
|
289
|
+
const renderSelectLocal = (attrs, methods?) => {
|
|
290
|
+
const events = getEvents(methods);
|
|
291
|
+
const optionProps = attrs?.optionProps || {
|
|
292
|
+
label: 'label',
|
|
293
|
+
value: 'value'
|
|
294
|
+
};
|
|
295
|
+
const props = Object.assign({ clearable: true, disabled: false, showValue: false }, attrs || {});
|
|
296
|
+
console.log('itemRender');
|
|
297
|
+
return {
|
|
298
|
+
name: '#select',
|
|
299
|
+
optionProps,
|
|
300
|
+
options: attrs?.options || [],
|
|
301
|
+
props,
|
|
302
|
+
events
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
/**
|
|
306
|
+
* @description: 渲染成switch
|
|
307
|
+
* @param {*} attrs 请查看目标渲染的props
|
|
308
|
+
* @param {*} methods 请查看目标渲染的event
|
|
309
|
+
* @return {*} switchRender
|
|
310
|
+
*/
|
|
311
|
+
const renderSwitch = (attrs?: string | IAttrs, methods?) => {
|
|
312
|
+
let props = {
|
|
313
|
+
openLabel: '是',
|
|
314
|
+
closeLabel: '否',
|
|
315
|
+
openValue: 'Y',
|
|
316
|
+
closeValue: 'N'
|
|
317
|
+
};
|
|
318
|
+
let defaultValue = 'Y';
|
|
319
|
+
if (isObject(attrs) && !isFunction(attrs)) {
|
|
320
|
+
props = Object.assign(props, attrs || {});
|
|
321
|
+
defaultValue = attrs.defaultValue || defaultValue;
|
|
322
|
+
} else if (!isEmpty(attrs) && isString(attrs)) {
|
|
323
|
+
defaultValue = attrs;
|
|
324
|
+
props = Object.assign(props, { defaultValue });
|
|
325
|
+
}
|
|
326
|
+
// @ts-ignore
|
|
327
|
+
const events = isFunction(attrs) ? getEvents(attrs) : getEvents(methods);
|
|
328
|
+
return { name: 'VxeSwitch', props, defaultValue, events };
|
|
329
|
+
};
|
|
330
|
+
/**
|
|
331
|
+
* @description: 表格渲染el-tag组件
|
|
332
|
+
* @param {*} code 数据字典code
|
|
333
|
+
* @param {*} tagMap 渲染tag对应的type {1: 'success'}
|
|
334
|
+
* @return {*} table cellRender
|
|
335
|
+
*/
|
|
336
|
+
const renderCellTag = (code, tagMap) => {
|
|
337
|
+
return { name: '#tag', props: { code, tagMap } };
|
|
338
|
+
};
|
|
339
|
+
/**
|
|
340
|
+
* @description: cell渲染成el-switch
|
|
341
|
+
* @param {*} attrs 请查看目标渲染的props
|
|
342
|
+
* @param {*} methods 请查看目标渲染的event
|
|
343
|
+
* @return {*} cellRender
|
|
344
|
+
*/
|
|
345
|
+
const renderEnabled = (options?, methods?) => {
|
|
346
|
+
const props: IAttrs = {
|
|
347
|
+
openLabel: '启用',
|
|
348
|
+
closeLabel: '禁用',
|
|
349
|
+
openValue: '1',
|
|
350
|
+
closeValue: '0',
|
|
351
|
+
defaultValue: '1'
|
|
352
|
+
};
|
|
353
|
+
if (!isFunction(options) && isObject(options)) {
|
|
354
|
+
Object.assign(props, options);
|
|
355
|
+
}
|
|
356
|
+
const fun = isFunction(options) ? options : methods;
|
|
357
|
+
return renderSwitch(props, fun);
|
|
358
|
+
// return { name: "#switch", props, events };
|
|
359
|
+
};
|
|
360
|
+
/**
|
|
361
|
+
* icon选择器
|
|
362
|
+
* @returns render 函数
|
|
363
|
+
*/
|
|
364
|
+
const renderIconSelect = () => {
|
|
365
|
+
return { name: '#iconSelect' };
|
|
366
|
+
};
|
|
367
|
+
/**
|
|
368
|
+
* 树形选择器
|
|
369
|
+
* @param sourceData 展示数据
|
|
370
|
+
* @param props 请查看element plus的TreeSelect渲染的props
|
|
371
|
+
* @param events 事件
|
|
372
|
+
* @returns render 函数
|
|
373
|
+
*/
|
|
374
|
+
const renderTreeSelect = (sourceData: IRecord[] = [], props = {}, events?) => {
|
|
375
|
+
return { name: '#treeSelect', sourceData, props, events };
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
const getEvents = (methods: IEvents | Fn) => {
|
|
379
|
+
let events: any = {};
|
|
380
|
+
if (isObject(methods) && !isFunction(methods)) {
|
|
381
|
+
events = {
|
|
382
|
+
change: methods?.change || cb,
|
|
383
|
+
blur: methods?.blur || cb,
|
|
384
|
+
focus: methods?.focus || cb,
|
|
385
|
+
input: methods?.input || cb,
|
|
386
|
+
clear: methods?.clear || cb,
|
|
387
|
+
filterMethod: methods?.filterMethod
|
|
388
|
+
};
|
|
389
|
+
} else if (methods) {
|
|
390
|
+
events = { change: methods };
|
|
391
|
+
}
|
|
392
|
+
return events;
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
function cb() {}
|
|
396
|
+
// 回调函数
|
|
397
|
+
// const callback = (e) => cb && cb(e);
|
|
398
|
+
|
|
399
|
+
return {
|
|
400
|
+
renderDict,
|
|
401
|
+
renderSelect,
|
|
402
|
+
renderInput,
|
|
403
|
+
renderTextarea,
|
|
404
|
+
renderCheckBox,
|
|
405
|
+
renderRadio,
|
|
406
|
+
renderUser,
|
|
407
|
+
renderSysUser,
|
|
408
|
+
renderInvOrg,
|
|
409
|
+
renderBU,
|
|
410
|
+
renderNumber,
|
|
411
|
+
renderLov,
|
|
412
|
+
renderSelectLocal,
|
|
413
|
+
renderDate,
|
|
414
|
+
renderSwitch,
|
|
415
|
+
renderCellTag,
|
|
416
|
+
renderEnabled,
|
|
417
|
+
renderIconSelect,
|
|
418
|
+
renderTreeSelect
|
|
419
|
+
};
|
|
420
|
+
};
|
|
@@ -21,7 +21,8 @@ export default { name: 'InvOrganization' };
|
|
|
21
21
|
<script setup lang="tsx">
|
|
22
22
|
import { ref, reactive } from 'vue';
|
|
23
23
|
import to from 'await-to-js';
|
|
24
|
-
import { useRender } from '@utogether/utils';
|
|
24
|
+
// import { useRender } from '@utogether/utils';
|
|
25
|
+
import { useRender } from '../../../utils/udp/useRender';
|
|
25
26
|
import { getServiceApi } from '../../../api';
|
|
26
27
|
|
|
27
28
|
const url = '/uums/cusOrganization';
|
|
@@ -131,33 +131,3 @@ onMounted(() => {
|
|
|
131
131
|
data.value = props.record;
|
|
132
132
|
});
|
|
133
133
|
</script>
|
|
134
|
-
|
|
135
|
-
<style lang="scss">
|
|
136
|
-
.u-menu-prefix.vxe-input {
|
|
137
|
-
height: 34px;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.u-menu-prefix.vxe-input .vxe-input--prefix {
|
|
141
|
-
top: 1px;
|
|
142
|
-
width: 150px;
|
|
143
|
-
height: 32px;
|
|
144
|
-
text-align: center;
|
|
145
|
-
background-color: #f5f7fa;
|
|
146
|
-
border-right: 1px solid #dcdfe6;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.u-menu-prefix.vxe-input .vxe-input--inner {
|
|
150
|
-
padding-left: 160px;
|
|
151
|
-
border: 1px solid #dcdfe6;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.my-dropdown2 {
|
|
155
|
-
background-color: #fff;
|
|
156
|
-
border: 1px solid #dcdfe6;
|
|
157
|
-
border-radius: 4px;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.list-item2:hover {
|
|
161
|
-
background-color: #f5f7fa;
|
|
162
|
-
}
|
|
163
|
-
</style>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: wei.li
|
|
3
3
|
* @Date: 2021-11-17 16:42:14
|
|
4
4
|
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2025-
|
|
5
|
+
* @LastEditTime: 2025-07-16 15:30:33
|
|
6
6
|
* @Description: 员工管理
|
|
7
7
|
-->
|
|
8
8
|
|
|
@@ -60,7 +60,7 @@ watch(
|
|
|
60
60
|
const formItems = [{ field: 'employeeCode' }, { field: 'employeeName' }];
|
|
61
61
|
// 列字段
|
|
62
62
|
const columns = [
|
|
63
|
-
|
|
63
|
+
{ type: 'checkbox', width: 50, align: 'center' },
|
|
64
64
|
{ field: 'employeeCode' },
|
|
65
65
|
{ field: 'employeeName', width: 150 },
|
|
66
66
|
{ field: 'gender', width: 100, formatter: ['formatDict', 'SU.GENDER'] },
|
|
@@ -71,7 +71,7 @@ const columns = [
|
|
|
71
71
|
fixed: 'right',
|
|
72
72
|
slots: {
|
|
73
73
|
default: ({ row }) => {
|
|
74
|
-
const content = ['1', 'Y'].includes(row.enabled) ? 'disabled' : '
|
|
74
|
+
const content = ['1', 'Y'].includes(row.enabled) ? 'disabled' : 'enable';
|
|
75
75
|
const icon = ['1', 'Y'].includes(row.enabled) ? 'ri-stop-circle-fill' : 'ri-play-circle-fill';
|
|
76
76
|
const status = ['1', 'Y'].includes(row.enabled) ? 'warning' : 'success';
|
|
77
77
|
return [
|
|
@@ -119,6 +119,7 @@ const handleUpdate = async (record: IRecord) => {
|
|
|
119
119
|
xgrid.value.showLoading();
|
|
120
120
|
body.enabled = body.enabled === '1' ? '0' : '1';
|
|
121
121
|
await getServiceApi().put(url, body);
|
|
122
|
+
xgrid.value.hiddenLoading();
|
|
122
123
|
xgrid.value.refreshData();
|
|
123
124
|
};
|
|
124
125
|
|
|
@@ -108,10 +108,10 @@ const onInput = record => {
|
|
|
108
108
|
record.permissionCode = `${prefixCode.value}.${record.dispalyCode}`;
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
-
const emit = defineEmits<{ (e: '
|
|
111
|
+
const emit = defineEmits<{ (e: 'close'): void }>();
|
|
112
112
|
// 抽屉关闭
|
|
113
113
|
function handleClose() {
|
|
114
|
-
emit('
|
|
114
|
+
emit('close');
|
|
115
115
|
}
|
|
116
116
|
</script>
|
|
117
117
|
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
:show="data.showDrawer"
|
|
21
21
|
:record="data.record"
|
|
22
22
|
:data-status="data.dataStatus"
|
|
23
|
-
@
|
|
23
|
+
@close="onClose"
|
|
24
24
|
/>
|
|
25
|
-
<AuthorityPanel :show="data.showAuthority" :record="data.record" @
|
|
25
|
+
<AuthorityPanel :show="data.showAuthority" :record="data.record" @close="onClose" />
|
|
26
26
|
</div>
|
|
27
27
|
</template>
|
|
28
28
|
|
|
@@ -63,6 +63,8 @@ const xgrid = ref(null);
|
|
|
63
63
|
|
|
64
64
|
const url = '/uums/menu';
|
|
65
65
|
|
|
66
|
+
let row;
|
|
67
|
+
|
|
66
68
|
// const buttons = [{ code: 'add', status: 'u-cyan', icon: 'plus', auth: 'add' }];
|
|
67
69
|
|
|
68
70
|
const columns = [
|
|
@@ -150,6 +152,9 @@ const handleAdd = (record?: IRecord) => {
|
|
|
150
152
|
data.record.menuCategory = !record ? '0' : '';
|
|
151
153
|
data.record.parentId = record?.id;
|
|
152
154
|
data.record.hasChildren = record?.hasChildren;
|
|
155
|
+
data.record.children = data.record.children || [];
|
|
156
|
+
console.log(data.record);
|
|
157
|
+
row = record;
|
|
153
158
|
};
|
|
154
159
|
|
|
155
160
|
// 编辑
|
|
@@ -183,7 +188,8 @@ const handleAuthorityPanel = record => {
|
|
|
183
188
|
data.record.dispalyCode = record.permissionCode;
|
|
184
189
|
};
|
|
185
190
|
|
|
186
|
-
const onClose = () => {
|
|
191
|
+
const onClose = (type?) => {
|
|
192
|
+
type === 'submit' && xgrid.value.getInstance().reloadTreeExpand(row);
|
|
187
193
|
data.record = {};
|
|
188
194
|
data.showDrawer = false;
|
|
189
195
|
data.showAuthority = false;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: wei.li
|
|
3
3
|
* @Date: 2021-11-17 16:44:08
|
|
4
4
|
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2025-
|
|
5
|
+
* @LastEditTime: 2025-07-16 16:45:56
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
8
|
|
|
@@ -242,7 +242,7 @@ const authority = ref(['fetch']);
|
|
|
242
242
|
const url = '/uums/menu';
|
|
243
243
|
|
|
244
244
|
const emit = defineEmits<{
|
|
245
|
-
(e: '
|
|
245
|
+
(e: 'close', type): void;
|
|
246
246
|
}>();
|
|
247
247
|
|
|
248
248
|
const getPrefixCode = () => {
|
|
@@ -277,6 +277,9 @@ const onSubmit = () => {
|
|
|
277
277
|
};
|
|
278
278
|
});
|
|
279
279
|
await to(serviceApi.post(url, dataList));
|
|
280
|
+
// if (!err && record.children?.length) {
|
|
281
|
+
// // props.record.children.push(...res);
|
|
282
|
+
// }
|
|
280
283
|
}
|
|
281
284
|
loading.value = false;
|
|
282
285
|
} else {
|
|
@@ -305,7 +308,7 @@ const getLovList = code => {
|
|
|
305
308
|
};
|
|
306
309
|
// 抽屉关闭
|
|
307
310
|
function handleClose(type) {
|
|
308
|
-
emit('
|
|
311
|
+
emit('close', type);
|
|
309
312
|
}
|
|
310
313
|
</script>
|
|
311
314
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: wei.li
|
|
3
3
|
* @Date: 2021-11-22 19:50:48
|
|
4
4
|
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2025-
|
|
5
|
+
* @LastEditTime: 2025-07-14 14:58:13
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
8
|
|
|
@@ -113,24 +113,6 @@ onBeforeMount(() => {
|
|
|
113
113
|
</script>
|
|
114
114
|
|
|
115
115
|
<style lang="scss">
|
|
116
|
-
.u-menu-prefix.vxe-input {
|
|
117
|
-
height: 34px;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.u-menu-prefix.vxe-input .vxe-input--prefix {
|
|
121
|
-
top: 1px;
|
|
122
|
-
width: 150px;
|
|
123
|
-
height: 32px;
|
|
124
|
-
text-align: center;
|
|
125
|
-
background-color: #f5f7fa;
|
|
126
|
-
border-right: 1px solid #dcdfe6;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.u-menu-prefix.vxe-input .vxe-input--inner {
|
|
130
|
-
padding-left: 160px;
|
|
131
|
-
border: 1px solid #dcdfe6;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
116
|
.my-dropdown2 {
|
|
135
117
|
background-color: #fff;
|
|
136
118
|
border: 1px solid #dcdfe6;
|
|
@@ -265,7 +265,7 @@ const getUnitList = () => {
|
|
|
265
265
|
serviceApi
|
|
266
266
|
.get('/uums/unit', { pageSize: 10 })
|
|
267
267
|
.then(res => {
|
|
268
|
-
paramExt.value = { unitId: res[0].id,
|
|
268
|
+
paramExt.value = { unitId: res[0].id, enabled: '1' };
|
|
269
269
|
})
|
|
270
270
|
.catch(() => {
|
|
271
271
|
errorMessage('获取租户失败,刷新后重试');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: wei.li
|
|
3
3
|
* @Date: 2021-12-23 17:33:21
|
|
4
4
|
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2025-
|
|
5
|
+
* @LastEditTime: 2025-07-16 15:26:43
|
|
6
6
|
* @Description: 数据字典
|
|
7
7
|
-->
|
|
8
8
|
<template>
|
|
@@ -47,7 +47,7 @@ const columns = [
|
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
field: 'dictName',
|
|
50
|
-
title: 'message.udp.
|
|
50
|
+
title: 'message.udp.dictName',
|
|
51
51
|
required: true,
|
|
52
52
|
editRender: renderHook.renderInput()
|
|
53
53
|
},
|
|
@@ -160,7 +160,7 @@ const loading = ref(false);
|
|
|
160
160
|
const checkboxModel = ref<IRecord>({});
|
|
161
161
|
// const cacheCheckModel = {}; // 缓存最初选中的数据
|
|
162
162
|
|
|
163
|
-
const url = '/
|
|
163
|
+
const url = '/upfm/v1/menuFavority';
|
|
164
164
|
|
|
165
165
|
const getCacheMenuList = async () => {
|
|
166
166
|
menuList.value = await dbstorage.getItem(`U-${props.userName}-ROUTES`);
|
|
@@ -215,7 +215,7 @@ const getLunarDay = () => {
|
|
|
215
215
|
|
|
216
216
|
/** 查询收藏菜单功能 */
|
|
217
217
|
const getMenuList = () => {
|
|
218
|
-
const url = '/
|
|
218
|
+
const url = '/upfm/v1/menuFavority';
|
|
219
219
|
loading.value = true;
|
|
220
220
|
const query = { pageSize: 20, pageNum: 1, userName: cookies.get(kLOGINER) };
|
|
221
221
|
getServiceApi()
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
SHENZHEN U-TOGETHER CO. LTD
|
|
95
95
|
</a>
|
|
96
96
|
</span>
|
|
97
|
-
<span class="flex items-center text-white" style="width:
|
|
97
|
+
<span class="flex items-center text-white" style="width: 75px; font-size: 10px">技术支持</span>
|
|
98
98
|
</span>
|
|
99
99
|
</div>
|
|
100
100
|
</div>
|