@utogether/udp-core 1.0.1-beta.2 → 1.0.1-beta.3
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 +6 -1
- package/dist/{403-BBQoJwTM.js → 403-BuP9jvH9.js} +1 -1
- package/dist/{404-BbJPSIWM.js → 404-DfQk8kKl.js} +1 -1
- package/dist/{500-BtFL9R4M.js → 500-OgROWdiZ.js} +1 -1
- package/dist/{AuthorityInfo-DhiwCeLN.js → AuthorityInfo-q2ksfkWH.js} +1 -1
- package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-Duyweh89.js → AuthorityInfo.vue_vue_type_style_index_0_lang-Bwsf6lMH.js} +1 -1
- package/dist/{Company-CGqmslx-.js → Company-DgqowAxc.js} +3 -3
- package/dist/{CompanyPanel-hlDsxD-6.js → CompanyPanel-BNb1rUhD.js} +16 -16
- package/dist/{Department-BZyJtacc.js → Department-Cl8CROSU.js} +3 -3
- package/dist/{DepartmentPanel-D-a_EBFt.js → DepartmentPanel-D5VkqKeP.js} +1 -1
- package/dist/{DesignPanel-Bl4luWDV.js → DesignPanel-BGvEusHC.js} +1 -1
- package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-I8C3iGvz.js → DesignPanel.vue_vue_type_style_index_0_lang-BQF1uQ7w.js} +2 -2
- package/dist/{DictView-B4a7Hs1X.js → DictView-BnxfaOBv.js} +13 -12
- package/dist/InvOrganization-5y79ZLdY.js +66 -0
- package/dist/{Org-BTGTrAVz.js → Org-2oBAXN2r.js} +1 -1
- package/dist/{Preview-pHD84xqI.js → Preview-BaGmXH7r.js} +1 -1
- package/dist/{ReportDefine-DnnCNQWS.js → ReportDefine-DkQdBErt.js} +1 -1
- package/dist/{ReportDesign-BnI_Q4pg.js → ReportDesign-DzB_A_G6.js} +2 -2
- package/dist/{ReportQuery-Dby2MmtM.js → ReportQuery-DRcMb6ya.js} +1 -1
- package/dist/{ReportQueryFrom-Blm1N8P1.js → ReportQueryFrom-CeA9xhR4.js} +1 -1
- package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-CnG_Ybnt.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-CgGtcs5V.js} +1 -1
- package/dist/{ReportTemplate-D65RXRY_.js → ReportTemplate-qaiTMQuT.js} +1 -1
- package/dist/{Role-eFZoTpXc.js → Role-DsFulAjq.js} +3 -3
- package/dist/{RoleAssign-D9-Y3UNz.js → RoleAssign-DMRdocpa.js} +3 -3
- package/dist/{RolePanel-DlFw6HSf.js → RolePanel-B9POS_pg.js} +1 -1
- package/dist/{RolePanel-CoUOc3sX.js → RolePanel-wXVysDHM.js} +1 -1
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-Clwk-MHw.js → RolePanel.vue_vue_type_script_setup_true_lang-CleVvkcY.js} +3 -3
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-DKHgNWQP.js → RolePanel.vue_vue_type_script_setup_true_lang-t6S_0zmJ.js} +1 -1
- package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-M2FQJwPU.js → ScrollPanel.vue_vue_type_style_index_0_lang-DlXUs0j9.js} +1 -1
- package/dist/{Staff-DFBLCsAd.js → Staff-Cq4V7ruC.js} +3 -3
- package/dist/{StaffInfo-d2CK0oBA.js → StaffInfo-CJDKMbud.js} +1 -1
- package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-4m8wK9tq.js → StaffInfo.vue_vue_type_script_setup_true_lang-DQ4DL1KY.js} +1 -1
- package/dist/{StaffPanel-D6aWLKN3.js → StaffPanel-CG-uggdr.js} +1 -1
- package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-C7YT2CVb.js → StaffPanel.vue_vue_type_script_setup_true_lang-DAgN7zN2.js} +2 -2
- package/dist/{SysUser-BdZvYxQH.js → SysUser-kwnzRNdD.js} +2 -2
- package/dist/{SysUserPanel-BIVa6LLr.js → SysUserPanel-DTlZf3vk.js} +1 -1
- package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-BsBKpYR7.js → SysUserPanel.vue_vue_type_script_setup_true_lang-BW6PlGjM.js} +1 -1
- package/dist/{SystemMenu-C-5VKlHK.js → SystemMenu-BVT0n-L2.js} +9 -9
- package/dist/{UserInfo-DqXCRZts.js → UserInfo-BbTQ9Zat.js} +1 -1
- package/dist/{UserInfo.vue_vue_type_style_index_0_lang-N3TwfpPx.js → UserInfo.vue_vue_type_style_index_0_lang-D_bpYDmI.js} +1 -1
- package/dist/{childView-B2lSsqS3.js → childView-BJbIhjmf.js} +1 -1
- package/dist/{childView-DRUNqgjI.js → childView-DCsGFrG-.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-B9XBDDU_.js → childView.vue_vue_type_style_index_0_lang-BCDxpVoD.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-oGriyFTv.js → childView.vue_vue_type_style_index_0_lang-CDtsalCm.js} +1 -1
- package/dist/{code-rule-DZC9T6cl.js → code-rule-DePU6cdp.js} +1 -1
- package/dist/core.es.js +1 -1
- package/dist/{cron-task-BJwPeA5F.js → cron-task-DUM1SIGL.js} +1 -1
- package/dist/{frameView-C6wkvok-.js → frameView-CEUTDtSm.js} +1 -1
- package/dist/img/l_img.svg +1 -1
- package/dist/img/minicolors.png +0 -0
- package/dist/img/v_img.svg +1 -1
- package/dist/index-ZdgOD7cF.js +3399 -0
- package/dist/{layoutView-CeJBpZb_.js → layoutView-PCjwVwkX.js} +109 -108
- package/dist/{login-BOxwzwdB.js → login-B1CjWVKu.js} +2 -2
- package/dist/{lov-view-DRF-99U4.js → lov-view-D8wwkxFJ.js} +2 -2
- package/dist/{menuInfo-3Sjvs9nM.js → menuInfo-B5JKVwrB.js} +1 -1
- package/dist/{menuInfo.vue_vue_type_style_index_0_lang-DrQ560nm.js → menuInfo.vue_vue_type_style_index_0_lang-CcM9WX4n.js} +27 -27
- package/dist/{pda-app-B9tn7jdv.js → pda-app-DIa1p1Ww.js} +1 -1
- package/dist/{resource-BqnxbQNe.js → resource-CCQ7Dd-5.js} +1 -1
- package/dist/{su-welcome-VwifUK_O.js → su-welcome-CLp9YaJa.js} +1 -1
- package/dist/{sys-config-C0-gSBFO.js → sys-config-BBmf_SqF.js} +1 -1
- package/dist/udp-core.css +2 -2
- package/dist/{utogether-Di1byIum.js → utogether-Bkptx2lB.js} +1 -1
- package/package.json +1 -1
- package/src/App.vue +70 -70
- package/src/components/udp/grid.vue +500 -0
- package/src/components/udp/index.ts +7 -4
- package/src/components/udp/lov.vue +410 -0
- package/src/components/udp/modal-form.vue +2 -2
- package/src/components/udp/modal-grid.vue +297 -0
- package/src/components/udp/utils.ts +379 -40
- package/src/layout/components/lay-navbar/index.vue +1 -1
- package/src/layout/components/lay-panel/index.vue +150 -150
- package/src/layout/components/lay-sidebar/breadCrumb.vue +1 -1
- package/src/layout/components/lay-tag/index.vue +625 -625
- package/src/layout/layoutView.vue +215 -215
- package/src/main.ts +110 -109
- package/src/plugins/i18n/en.ts +291 -289
- package/src/plugins/i18n/zh.ts +338 -337
- package/src/plugins/vxe-table/index.ts +3 -3
- package/src/plugins/vxe-table/render.tsx +4 -2
- package/src/style/button.scss +85 -78
- package/src/style/tailwind.css +1 -68
- package/src/style/vxetable.scss +258 -256
- package/src/views/organization/company/CompanyPanel.vue +259 -259
- package/src/views/organization/inv-org/InvOrganization.vue +2 -3
- package/src/views/system/menu/SystemMenu.vue +1 -1
- package/src/views/system/menu/menuInfo.vue +372 -373
- package/src/views/udev/dict/DictView.vue +106 -106
- package/src/views/udev/lov/lov-view.vue +91 -91
- package/vite.config.ts +4 -1
- package/dist/InvOrganization-q4T3y8dQ.js +0 -260
- package/dist/index-DZc3qRTx.js +0 -2650
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: wei.li
|
|
3
|
-
* @Date: 2021-12-23 17:33:21
|
|
4
|
-
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2025-07-
|
|
6
|
-
* @Description: 数据字典
|
|
7
|
-
-->
|
|
8
|
-
<template>
|
|
9
|
-
<div>
|
|
10
|
-
<ut-grid
|
|
11
|
-
ref="xgrid"
|
|
12
|
-
:items="formItems"
|
|
13
|
-
:columns="columns"
|
|
14
|
-
url="/upfm/v1/lov"
|
|
15
|
-
:events="onGridEvents"
|
|
16
|
-
/>
|
|
17
|
-
<child-view v-if="shouDrawer" :show="shouDrawer" :record="record" @onClose="handleClose" />
|
|
18
|
-
</div>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script lang="tsx">
|
|
22
|
-
export default { name: 'DictView' };
|
|
23
|
-
</script>
|
|
24
|
-
<script setup lang="tsx">
|
|
25
|
-
import { ref, nextTick } from 'vue';
|
|
26
|
-
import childView from './childView.vue';
|
|
27
|
-
import { useRender } from '@utogether/utils';
|
|
28
|
-
|
|
29
|
-
const xgrid = ref(null);
|
|
30
|
-
// const renderOption = useRenderOption();
|
|
31
|
-
|
|
32
|
-
const formItems = [
|
|
33
|
-
{ field: 'dictCode', title: 'message.udp.dictCode' },
|
|
34
|
-
{ field: 'dictName', title: 'message.udp.dictName' },
|
|
35
|
-
{ field: 'dictType', title: 'message.udp.dictType' }
|
|
36
|
-
];
|
|
37
|
-
|
|
38
|
-
const renderHook = useRender();
|
|
39
|
-
// 列字段
|
|
40
|
-
const columns = [
|
|
41
|
-
{ type: 'checkbox', width: 40, align: 'center' },
|
|
42
|
-
{
|
|
43
|
-
field: 'dictCode',
|
|
44
|
-
title: 'message.udp.dictCode',
|
|
45
|
-
required: true,
|
|
46
|
-
editRender: renderHook.renderInput()
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
field: 'dictName',
|
|
50
|
-
title: 'message.udp.dictName',
|
|
51
|
-
required: true,
|
|
52
|
-
editRender: renderHook.renderInput()
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
field: 'dictType',
|
|
56
|
-
title: 'message.udp.dictType',
|
|
57
|
-
required: true,
|
|
58
|
-
editRender: renderHook.renderDict('SU.DICT.TYPE'),
|
|
59
|
-
formatter: ['formatDict', 'SU.DICT.TYPE']
|
|
60
|
-
},
|
|
61
|
-
{ field: 'dictDesc', title: 'message.remark', editRender: renderHook.renderInput() },
|
|
62
|
-
{
|
|
63
|
-
field: 'enabled',
|
|
64
|
-
width: 90,
|
|
65
|
-
editRender: renderHook.renderDict({ code: 'SU.ENABLE', defaultValue: '1' }),
|
|
66
|
-
formatter: ['formatDict', 'SU.ENABLE']
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
field: 'operate',
|
|
70
|
-
width: 80,
|
|
71
|
-
slots: {
|
|
72
|
-
default: ({ row }) => {
|
|
73
|
-
if (!row.id) return null;
|
|
74
|
-
return [<ut-button content="lov" onClick={() => hanldeDipose(row)} />];
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
];
|
|
79
|
-
|
|
80
|
-
const shouDrawer = ref(false);
|
|
81
|
-
const record = ref(null);
|
|
82
|
-
const hanldeDipose = row => {
|
|
83
|
-
nextTick(() => {
|
|
84
|
-
shouDrawer.value = true;
|
|
85
|
-
record.value = row;
|
|
86
|
-
record.value.total = row.children?.length;
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
const handleClose = () => {
|
|
90
|
-
xgrid.value.refreshData();
|
|
91
|
-
shouDrawer.value = false;
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
const onGridEvents = {
|
|
95
|
-
editActived({ row }) {
|
|
96
|
-
columns[1].editRender.props.disabled = !!row.id;
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
// function onChange(e) {
|
|
101
|
-
// console.log('onChange', e);
|
|
102
|
-
// }
|
|
103
|
-
// function onFocus(e) {
|
|
104
|
-
// console.log('onFocus', e);
|
|
105
|
-
// }
|
|
106
|
-
</script>
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2021-12-23 17:33:21
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2025-07-24 10:16:17
|
|
6
|
+
* @Description: 数据字典
|
|
7
|
+
-->
|
|
8
|
+
<template>
|
|
9
|
+
<div>
|
|
10
|
+
<ut-grid
|
|
11
|
+
ref="xgrid"
|
|
12
|
+
:items="formItems"
|
|
13
|
+
:columns="columns"
|
|
14
|
+
url="/upfm/v1/lov"
|
|
15
|
+
:events="onGridEvents"
|
|
16
|
+
/>
|
|
17
|
+
<child-view v-if="shouDrawer" :show="shouDrawer" :record="record" @onClose="handleClose" />
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script lang="tsx">
|
|
22
|
+
export default { name: 'DictView' };
|
|
23
|
+
</script>
|
|
24
|
+
<script setup lang="tsx">
|
|
25
|
+
import { ref, nextTick } from 'vue';
|
|
26
|
+
import childView from './childView.vue';
|
|
27
|
+
import { useRender } from '@utogether/utils';
|
|
28
|
+
|
|
29
|
+
const xgrid = ref(null);
|
|
30
|
+
// const renderOption = useRenderOption();
|
|
31
|
+
|
|
32
|
+
const formItems = [
|
|
33
|
+
{ field: 'dictCode', title: 'message.udp.dictCode' },
|
|
34
|
+
{ field: 'dictName', title: 'message.udp.dictName' },
|
|
35
|
+
{ field: 'dictType', title: 'message.udp.dictType', code: 'SU.DICT.TYPE' }
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
const renderHook = useRender();
|
|
39
|
+
// 列字段
|
|
40
|
+
const columns = [
|
|
41
|
+
{ type: 'checkbox', width: 40, align: 'center' },
|
|
42
|
+
{
|
|
43
|
+
field: 'dictCode',
|
|
44
|
+
title: 'message.udp.dictCode',
|
|
45
|
+
required: true,
|
|
46
|
+
editRender: renderHook.renderInput()
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
field: 'dictName',
|
|
50
|
+
title: 'message.udp.dictName',
|
|
51
|
+
required: true,
|
|
52
|
+
editRender: renderHook.renderInput()
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
field: 'dictType',
|
|
56
|
+
title: 'message.udp.dictType',
|
|
57
|
+
required: true,
|
|
58
|
+
editRender: renderHook.renderDict('SU.DICT.TYPE'),
|
|
59
|
+
formatter: ['formatDict', 'SU.DICT.TYPE']
|
|
60
|
+
},
|
|
61
|
+
{ field: 'dictDesc', title: 'message.remark', editRender: renderHook.renderInput() },
|
|
62
|
+
{
|
|
63
|
+
field: 'enabled',
|
|
64
|
+
width: 90,
|
|
65
|
+
editRender: renderHook.renderDict({ code: 'SU.ENABLE', defaultValue: '1' }),
|
|
66
|
+
formatter: ['formatDict', 'SU.ENABLE']
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
field: 'operate',
|
|
70
|
+
width: 80,
|
|
71
|
+
slots: {
|
|
72
|
+
default: ({ row }) => {
|
|
73
|
+
if (!row.id) return null;
|
|
74
|
+
return [<ut-button content="lov" onClick={() => hanldeDipose(row)} />];
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
];
|
|
79
|
+
|
|
80
|
+
const shouDrawer = ref(false);
|
|
81
|
+
const record = ref(null);
|
|
82
|
+
const hanldeDipose = row => {
|
|
83
|
+
nextTick(() => {
|
|
84
|
+
shouDrawer.value = true;
|
|
85
|
+
record.value = row;
|
|
86
|
+
record.value.total = row.children?.length;
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
const handleClose = () => {
|
|
90
|
+
xgrid.value.refreshData();
|
|
91
|
+
shouDrawer.value = false;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const onGridEvents = {
|
|
95
|
+
editActived({ row }) {
|
|
96
|
+
columns[1].editRender.props.disabled = !!row.id;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
// function onChange(e) {
|
|
101
|
+
// console.log('onChange', e);
|
|
102
|
+
// }
|
|
103
|
+
// function onFocus(e) {
|
|
104
|
+
// console.log('onFocus', e);
|
|
105
|
+
// }
|
|
106
|
+
</script>
|
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: wei.li
|
|
3
|
-
* @Date: 2022-08-10 09:10:39
|
|
4
|
-
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2025-04-08 15:31:20
|
|
6
|
-
* @Description: 值集视图
|
|
7
|
-
-->
|
|
8
|
-
<template>
|
|
9
|
-
<div>
|
|
10
|
-
<ut-grid ref="xgrid" :items="formItems" :columns="columns" :url="url" :events="onEvents" />
|
|
11
|
-
<child-view v-if="shouDrawer" :show="shouDrawer" :record="record" @onClose="handleClose" />
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script setup lang="tsx">
|
|
16
|
-
import { ref, nextTick } from 'vue';
|
|
17
|
-
// import { VxeGridInstance } from 'vxe-table';
|
|
18
|
-
import to from 'await-to-js';
|
|
19
|
-
import { getServiceApi } from '../../../api';
|
|
20
|
-
import childView from './childView.vue';
|
|
21
|
-
import { useRender } from '@utogether/utils';
|
|
22
|
-
|
|
23
|
-
defineOptions({ name: 'LovView' });
|
|
24
|
-
|
|
25
|
-
const xgrid = ref(null);
|
|
26
|
-
|
|
27
|
-
const formItems = [{ field: 'lovCode' }, { field: 'lovName' }];
|
|
28
|
-
|
|
29
|
-
const renderHook = useRender();
|
|
30
|
-
|
|
31
|
-
const url = '/upfm/v1/lovViewHeader';
|
|
32
|
-
|
|
33
|
-
// 列字段
|
|
34
|
-
const columns = [
|
|
35
|
-
{ type: 'checkbox', width: 50, align: 'center' },
|
|
36
|
-
{
|
|
37
|
-
field: 'lovCode',
|
|
38
|
-
required: true,
|
|
39
|
-
editRender: renderHook.renderInput()
|
|
40
|
-
},
|
|
41
|
-
{ field: 'lovName', required: true, editRender: renderHook.renderInput() },
|
|
42
|
-
{ field: 'valueField', required: true, editRender: renderHook.renderInput() },
|
|
43
|
-
{ field: 'lovTitle', editRender: renderHook.renderInput() },
|
|
44
|
-
{
|
|
45
|
-
field: 'lovType',
|
|
46
|
-
editRender: renderHook.renderDict('SU.LOV.TYPE'),
|
|
47
|
-
required: true,
|
|
48
|
-
formatter: ['formatDict', 'SU.LOV.TYPE']
|
|
49
|
-
},
|
|
50
|
-
{ field: 'remarks', title: 'message.remark', editRender: renderHook.renderInput() },
|
|
51
|
-
{ field: 'enabled', width: 80, cellRender: renderHook.renderEnabled(handleClick) },
|
|
52
|
-
{
|
|
53
|
-
field: 'operate',
|
|
54
|
-
width: 100,
|
|
55
|
-
fixed: 'right',
|
|
56
|
-
slots: {
|
|
57
|
-
default: ({ row }) => {
|
|
58
|
-
if (!row.id) return null;
|
|
59
|
-
return [<ut-button content="config" icon="ri-edit-box-line" onTap={() => hanldeDipose(row)} />];
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
];
|
|
64
|
-
|
|
65
|
-
const shouDrawer = ref(false);
|
|
66
|
-
const record = ref(null);
|
|
67
|
-
const hanldeDipose = row => {
|
|
68
|
-
nextTick(() => {
|
|
69
|
-
shouDrawer.value = true;
|
|
70
|
-
record.value = row;
|
|
71
|
-
// record.value.total = row.children.length;
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
|
-
const handleClose = () => {
|
|
75
|
-
xgrid.value.refreshData();
|
|
76
|
-
shouDrawer.value = false;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
// 启用/禁用
|
|
80
|
-
async function handleClick(row) {
|
|
81
|
-
const [err] = await to(getServiceApi().put(url, [row]));
|
|
82
|
-
!err && xgrid.value.refreshData();
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
const onEvents = {
|
|
86
|
-
editActived({ row }) {
|
|
87
|
-
columns[1].editRender.props.disabled = !!row.id;
|
|
88
|
-
xgrid.value.refreshColumn();
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
</script>
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2022-08-10 09:10:39
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2025-04-08 15:31:20
|
|
6
|
+
* @Description: 值集视图
|
|
7
|
+
-->
|
|
8
|
+
<template>
|
|
9
|
+
<div>
|
|
10
|
+
<ut-grid ref="xgrid" :items="formItems" :columns="columns" :url="url" :events="onEvents" />
|
|
11
|
+
<child-view v-if="shouDrawer" :show="shouDrawer" :record="record" @onClose="handleClose" />
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup lang="tsx">
|
|
16
|
+
import { ref, nextTick } from 'vue';
|
|
17
|
+
// import { VxeGridInstance } from 'vxe-table';
|
|
18
|
+
import to from 'await-to-js';
|
|
19
|
+
import { getServiceApi } from '../../../api';
|
|
20
|
+
import childView from './childView.vue';
|
|
21
|
+
import { useRender } from '@utogether/utils';
|
|
22
|
+
|
|
23
|
+
defineOptions({ name: 'LovView' });
|
|
24
|
+
|
|
25
|
+
const xgrid = ref(null);
|
|
26
|
+
|
|
27
|
+
const formItems = [{ field: 'lovCode' }, { field: 'lovName' }];
|
|
28
|
+
|
|
29
|
+
const renderHook = useRender();
|
|
30
|
+
|
|
31
|
+
const url = '/upfm/v1/lovViewHeader';
|
|
32
|
+
|
|
33
|
+
// 列字段
|
|
34
|
+
const columns = [
|
|
35
|
+
{ type: 'checkbox', width: 50, align: 'center' },
|
|
36
|
+
{
|
|
37
|
+
field: 'lovCode',
|
|
38
|
+
required: true,
|
|
39
|
+
editRender: renderHook.renderInput()
|
|
40
|
+
},
|
|
41
|
+
{ field: 'lovName', required: true, editRender: renderHook.renderInput() },
|
|
42
|
+
{ field: 'valueField', required: true, editRender: renderHook.renderInput() },
|
|
43
|
+
{ field: 'lovTitle', editRender: renderHook.renderInput() },
|
|
44
|
+
{
|
|
45
|
+
field: 'lovType',
|
|
46
|
+
editRender: renderHook.renderDict('SU.LOV.TYPE'),
|
|
47
|
+
required: true,
|
|
48
|
+
formatter: ['formatDict', 'SU.LOV.TYPE']
|
|
49
|
+
},
|
|
50
|
+
{ field: 'remarks', title: 'message.remark', editRender: renderHook.renderInput() },
|
|
51
|
+
{ field: 'enabled', width: 80, cellRender: renderHook.renderEnabled(handleClick) },
|
|
52
|
+
{
|
|
53
|
+
field: 'operate',
|
|
54
|
+
width: 100,
|
|
55
|
+
fixed: 'right',
|
|
56
|
+
slots: {
|
|
57
|
+
default: ({ row }) => {
|
|
58
|
+
if (!row.id) return null;
|
|
59
|
+
return [<ut-button content="config" icon="ri-edit-box-line" onTap={() => hanldeDipose(row)} />];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
const shouDrawer = ref(false);
|
|
66
|
+
const record = ref(null);
|
|
67
|
+
const hanldeDipose = row => {
|
|
68
|
+
nextTick(() => {
|
|
69
|
+
shouDrawer.value = true;
|
|
70
|
+
record.value = row;
|
|
71
|
+
// record.value.total = row.children.length;
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
const handleClose = () => {
|
|
75
|
+
xgrid.value.refreshData();
|
|
76
|
+
shouDrawer.value = false;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// 启用/禁用
|
|
80
|
+
async function handleClick(row) {
|
|
81
|
+
const [err] = await to(getServiceApi().put(url, [row]));
|
|
82
|
+
!err && xgrid.value.refreshData();
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const onEvents = {
|
|
86
|
+
editActived({ row }) {
|
|
87
|
+
columns[1].editRender.props.disabled = !!row.id;
|
|
88
|
+
xgrid.value.refreshColumn();
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
</script>
|
package/vite.config.ts
CHANGED
|
@@ -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-07-
|
|
5
|
+
* @LastEditTime: 2025-07-26 09:34:47
|
|
6
6
|
* @Description: file content
|
|
7
7
|
*/
|
|
8
8
|
import { resolve } from 'path';
|
|
@@ -74,6 +74,9 @@ export default () => {
|
|
|
74
74
|
formats: ['es'],
|
|
75
75
|
name: '@utogether/udp-core',
|
|
76
76
|
fileName: format => `core.${format}.js`
|
|
77
|
+
},
|
|
78
|
+
define: {
|
|
79
|
+
to: null
|
|
77
80
|
}
|
|
78
81
|
}
|
|
79
82
|
};
|
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
import { defineComponent as E, ref as q, reactive as D, resolveComponent as M, createBlock as T, openBlock as H } from "vue";
|
|
2
|
-
import { t as Y } from "./await-to-js.es5-BtRbN2QH.js";
|
|
3
|
-
import { isFunction as s, isObject as f, isEmpty as W, isString as y } from "xe-utils";
|
|
4
|
-
import { storageLocal as C } from "@utogether/utils";
|
|
5
|
-
import { q as A } from "./index-DZc3qRTx.js";
|
|
6
|
-
const G = () => {
|
|
7
|
-
const O = { value: "dictCode", label: "dictName" }, m = (e, o) => {
|
|
8
|
-
var P;
|
|
9
|
-
const n = i(o);
|
|
10
|
-
let l = {
|
|
11
|
-
clearable: !0,
|
|
12
|
-
disabled: !1,
|
|
13
|
-
showValue: !1,
|
|
14
|
-
placeholder: null
|
|
15
|
-
}, c, u;
|
|
16
|
-
f(e) ? (l = Object.assign(l, e), c = e.defaultValue, u = e == null ? void 0 : e.code) : u = e;
|
|
17
|
-
const d = (P = C.getItem("kLov")[u]) == null ? void 0 : P.children, b = d ? d.filter((B) => B.enabled === "1") : [];
|
|
18
|
-
return {
|
|
19
|
-
name: "#select",
|
|
20
|
-
optionProps: O,
|
|
21
|
-
options: b,
|
|
22
|
-
props: l,
|
|
23
|
-
defaultValue: c,
|
|
24
|
-
events: n
|
|
25
|
-
};
|
|
26
|
-
}, r = (e, o) => {
|
|
27
|
-
const n = i(o);
|
|
28
|
-
return {
|
|
29
|
-
name: "#SuSelect",
|
|
30
|
-
optionProps: (e == null ? void 0 : e.optionProps) || { label: "label", value: "value" },
|
|
31
|
-
props: e == null ? void 0 : e.props,
|
|
32
|
-
options: (e == null ? void 0 : e.options) || [],
|
|
33
|
-
events: n
|
|
34
|
-
};
|
|
35
|
-
}, a = (e, o) => {
|
|
36
|
-
const n = {
|
|
37
|
-
optionProps: { extLabel: "userName", value: "employeeName" },
|
|
38
|
-
props: {
|
|
39
|
-
attrs: { disabled: e == null ? void 0 : e.disabled },
|
|
40
|
-
disabled: e == null ? void 0 : e.disabled,
|
|
41
|
-
defaultValue: e == null ? void 0 : e.defaultValue,
|
|
42
|
-
mapField: e == null ? void 0 : e.mapField,
|
|
43
|
-
code: "SYS037",
|
|
44
|
-
url: "/uums/employee/listEmployeeIsUser",
|
|
45
|
-
fetchField: "employeeName"
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
return r(n, o);
|
|
49
|
-
}, v = (e) => {
|
|
50
|
-
const o = {
|
|
51
|
-
optionProps: { extLabel: "userName", value: "name" },
|
|
52
|
-
props: {
|
|
53
|
-
code: "sys/listUsers",
|
|
54
|
-
url: "/uums/user",
|
|
55
|
-
fetchField: "name",
|
|
56
|
-
mapField: e == null ? void 0 : e.mapField
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
return r(o);
|
|
60
|
-
}, V = (e, o) => {
|
|
61
|
-
const n = {
|
|
62
|
-
label: "organizationName",
|
|
63
|
-
value: (e == null ? void 0 : e.field) || "organizationName"
|
|
64
|
-
}, l = {
|
|
65
|
-
mapField: {},
|
|
66
|
-
defaultParams: e == null ? void 0 : e.defaultParams,
|
|
67
|
-
url: "/uums/cusOrganization",
|
|
68
|
-
fetchField: "organizationName"
|
|
69
|
-
}, c = {
|
|
70
|
-
organizationId: "id",
|
|
71
|
-
organizationCode: "organizationCode"
|
|
72
|
-
};
|
|
73
|
-
return Object.assign(l.mapField, c, (e == null ? void 0 : e.mapField) || {}), { name: "#SuSelect", props: l, optionProps: n, options: [], methods: o };
|
|
74
|
-
}, S = (e, o) => {
|
|
75
|
-
const n = {
|
|
76
|
-
label: "orgName",
|
|
77
|
-
value: (e == null ? void 0 : e.field) || "orgName"
|
|
78
|
-
}, l = {
|
|
79
|
-
mapField: {},
|
|
80
|
-
defaultParams: e == null ? void 0 : e.defaultParams,
|
|
81
|
-
url: "/uums/org",
|
|
82
|
-
fetchField: "orgName"
|
|
83
|
-
}, c = { orgId: "id", orgCode: "orgCode" };
|
|
84
|
-
return Object.assign(l.mapField, c, (e == null ? void 0 : e.mapField) || {}), { name: "#SuSelect", props: l, optionProps: n, options: [], methods: o };
|
|
85
|
-
}, x = (e, o) => {
|
|
86
|
-
const n = Object.assign({ disabled: !1 }, e), l = n == null ? void 0 : n.defaultValue;
|
|
87
|
-
return {
|
|
88
|
-
name: "VxeInput",
|
|
89
|
-
props: n,
|
|
90
|
-
defaultValue: l,
|
|
91
|
-
events: i(o)
|
|
92
|
-
};
|
|
93
|
-
}, t = (e, o) => {
|
|
94
|
-
const n = Object.assign({ disabled: !1, rows: 3 }, e), l = n == null ? void 0 : n.defaultValue;
|
|
95
|
-
return {
|
|
96
|
-
name: "VxeTextarea",
|
|
97
|
-
props: n,
|
|
98
|
-
defaultValue: l,
|
|
99
|
-
events: i(o)
|
|
100
|
-
};
|
|
101
|
-
}, g = (e, o) => {
|
|
102
|
-
const n = "VxeCheckbox", { defaultValue: l, options: c, props: u } = I(e);
|
|
103
|
-
return { name: n, defaultValue: l, options: c, props: u, events: i(o) };
|
|
104
|
-
}, F = (e, o) => {
|
|
105
|
-
const n = "VxeRadio", { defaultValue: l, options: c, props: u } = I(e);
|
|
106
|
-
return { name: n, defaultValue: l, options: c, props: u, events: i(o) };
|
|
107
|
-
}, I = (e) => {
|
|
108
|
-
var d;
|
|
109
|
-
let o = { disabled: !1 }, n;
|
|
110
|
-
const l = C.getItem("kLov");
|
|
111
|
-
let c = "";
|
|
112
|
-
f(e) ? (n = e.defaultValue, c = e.code, o = Object.assign(o, e || {})) : y(e) && (c = e);
|
|
113
|
-
const u = c ? (d = l[c]) == null ? void 0 : d.children.map((b) => ({ label: b.dictName, value: b.dictCode })) : [];
|
|
114
|
-
return { props: o, defaultValue: n, options: u };
|
|
115
|
-
}, j = (e, o) => {
|
|
116
|
-
const n = i(o);
|
|
117
|
-
return {
|
|
118
|
-
name: "VxeInput",
|
|
119
|
-
props: Object.assign(
|
|
120
|
-
{ type: "number", clearable: !0, min: 0, controls: !1 },
|
|
121
|
-
e || {}
|
|
122
|
-
),
|
|
123
|
-
defaultValue: e == null ? void 0 : e.defaultValue,
|
|
124
|
-
events: n
|
|
125
|
-
};
|
|
126
|
-
}, z = (e, o) => {
|
|
127
|
-
const n = i(o), l = "yyyy-MM-dd HH:mm:ss", c = e == null ? void 0 : e.defaultValue;
|
|
128
|
-
return { name: "VxeInput", props: Object.assign({ type: "date", valueFormat: l, clearable: !0 }, e || {}), defaultValue: c, events: n };
|
|
129
|
-
}, _ = (e, o) => {
|
|
130
|
-
const n = i(o);
|
|
131
|
-
return { name: "#lov", props: Object.assign({}, e || {}), events: n };
|
|
132
|
-
}, L = (e, o) => {
|
|
133
|
-
const n = i(o), l = (e == null ? void 0 : e.optionProps) || {
|
|
134
|
-
label: "label",
|
|
135
|
-
value: "value"
|
|
136
|
-
}, c = Object.assign({ clearable: !0, disabled: !1, showValue: !1 }, e || {});
|
|
137
|
-
return console.log("itemRender"), {
|
|
138
|
-
name: "#select",
|
|
139
|
-
optionProps: l,
|
|
140
|
-
options: (e == null ? void 0 : e.options) || [],
|
|
141
|
-
props: c,
|
|
142
|
-
events: n
|
|
143
|
-
};
|
|
144
|
-
}, N = (e, o) => {
|
|
145
|
-
let n = {
|
|
146
|
-
openLabel: "是",
|
|
147
|
-
closeLabel: "否",
|
|
148
|
-
openValue: "Y",
|
|
149
|
-
closeValue: "N"
|
|
150
|
-
}, l = "Y";
|
|
151
|
-
f(e) && !s(e) ? (n = Object.assign(n, e || {}), l = e.defaultValue || l) : !W(e) && y(e) && (l = e, n = Object.assign(n, { defaultValue: l }));
|
|
152
|
-
const c = s(e) ? i(e) : i(o);
|
|
153
|
-
return { name: "VxeSwitch", props: n, defaultValue: l, events: c };
|
|
154
|
-
}, k = (e, o) => ({ name: "#tag", props: { code: e, tagMap: o } }), w = (e, o) => {
|
|
155
|
-
const n = {
|
|
156
|
-
openLabel: "启用",
|
|
157
|
-
closeLabel: "禁用",
|
|
158
|
-
openValue: "1",
|
|
159
|
-
closeValue: "0",
|
|
160
|
-
defaultValue: "1"
|
|
161
|
-
};
|
|
162
|
-
!s(e) && f(e) && Object.assign(n, e);
|
|
163
|
-
const l = s(e) ? e : o;
|
|
164
|
-
return N(n, l);
|
|
165
|
-
}, R = () => ({ name: "#iconSelect" }), U = (e = [], o = {}, n) => ({ name: "#treeSelect", sourceData: e, props: o, events: n }), i = (e) => {
|
|
166
|
-
let o = {};
|
|
167
|
-
return f(e) && !s(e) ? o = {
|
|
168
|
-
change: (e == null ? void 0 : e.change) || p,
|
|
169
|
-
blur: (e == null ? void 0 : e.blur) || p,
|
|
170
|
-
focus: (e == null ? void 0 : e.focus) || p,
|
|
171
|
-
input: (e == null ? void 0 : e.input) || p,
|
|
172
|
-
clear: (e == null ? void 0 : e.clear) || p,
|
|
173
|
-
filterMethod: e == null ? void 0 : e.filterMethod
|
|
174
|
-
} : e && (o = { change: e }), o;
|
|
175
|
-
};
|
|
176
|
-
function p() {
|
|
177
|
-
}
|
|
178
|
-
return {
|
|
179
|
-
renderDict: m,
|
|
180
|
-
renderSelect: r,
|
|
181
|
-
renderInput: x,
|
|
182
|
-
renderTextarea: t,
|
|
183
|
-
renderCheckBox: g,
|
|
184
|
-
renderRadio: F,
|
|
185
|
-
renderUser: a,
|
|
186
|
-
renderSysUser: v,
|
|
187
|
-
renderInvOrg: V,
|
|
188
|
-
renderBU: S,
|
|
189
|
-
renderNumber: j,
|
|
190
|
-
renderLov: _,
|
|
191
|
-
renderSelectLocal: L,
|
|
192
|
-
renderDate: z,
|
|
193
|
-
renderSwitch: N,
|
|
194
|
-
renderCellTag: k,
|
|
195
|
-
renderEnabled: w,
|
|
196
|
-
renderIconSelect: R,
|
|
197
|
-
renderTreeSelect: U
|
|
198
|
-
};
|
|
199
|
-
}, J = {
|
|
200
|
-
name: "InvOrganization"
|
|
201
|
-
}, h = /* @__PURE__ */ E({
|
|
202
|
-
...J,
|
|
203
|
-
setup(O) {
|
|
204
|
-
const m = "/uums/cusOrganization", r = q(null), a = G(), v = [{
|
|
205
|
-
field: "organizationCode"
|
|
206
|
-
}, {
|
|
207
|
-
field: "organizationName"
|
|
208
|
-
}], V = [{
|
|
209
|
-
type: "checkbox",
|
|
210
|
-
width: 40,
|
|
211
|
-
align: "center"
|
|
212
|
-
}, {
|
|
213
|
-
field: "organizationCode",
|
|
214
|
-
width: 120,
|
|
215
|
-
required: !0,
|
|
216
|
-
editRender: a.renderInput()
|
|
217
|
-
}, {
|
|
218
|
-
field: "organizationName",
|
|
219
|
-
minWidth: 120,
|
|
220
|
-
required: !0,
|
|
221
|
-
editRender: a.renderInput()
|
|
222
|
-
}, {
|
|
223
|
-
field: "orgName",
|
|
224
|
-
minWidth: 170,
|
|
225
|
-
required: !0,
|
|
226
|
-
editRender: a.renderBU()
|
|
227
|
-
}, {
|
|
228
|
-
field: "orgCode",
|
|
229
|
-
width: 110
|
|
230
|
-
}, {
|
|
231
|
-
field: "enabled",
|
|
232
|
-
width: 80,
|
|
233
|
-
cellRender: a.renderEnabled(S)
|
|
234
|
-
}];
|
|
235
|
-
async function S(t) {
|
|
236
|
-
const [g] = await Y(A().put(m, [t]));
|
|
237
|
-
!g && r.value.refreshData();
|
|
238
|
-
}
|
|
239
|
-
const x = D({
|
|
240
|
-
columns: V
|
|
241
|
-
});
|
|
242
|
-
return (t, g) => {
|
|
243
|
-
const F = M("ut-grid");
|
|
244
|
-
return H(), T(F, {
|
|
245
|
-
ref_key: "xgrid",
|
|
246
|
-
ref: r,
|
|
247
|
-
items: v,
|
|
248
|
-
"default-params": {
|
|
249
|
-
organizationId: "",
|
|
250
|
-
orgId: ""
|
|
251
|
-
},
|
|
252
|
-
columns: x.columns,
|
|
253
|
-
url: m
|
|
254
|
-
}, null, 8, ["columns"]);
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
export {
|
|
259
|
-
h as default
|
|
260
|
-
};
|