@utogether/udp-core 1.0.1-beta.3 → 1.0.1-beta.31
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 +3 -3
- package/dist/{403-BuP9jvH9.js → 403-DdjDWbkf.js} +1 -1
- package/dist/{404-DfQk8kKl.js → 404-D9vF2gFz.js} +1 -1
- package/dist/{500-OgROWdiZ.js → 500-mVaDmUjL.js} +1 -1
- package/dist/{AuthorityInfo-q2ksfkWH.js → AuthorityInfo-DOUJ_Zrj.js} +1 -1
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-B12sAzqt.js +100 -0
- package/dist/{Company-DgqowAxc.js → Company-DY__kM9F.js} +3 -3
- package/dist/{CompanyPanel-BNb1rUhD.js → CompanyPanel-C5N8QcMA.js} +17 -17
- package/dist/{Department-Cl8CROSU.js → Department-DsuDZdy5.js} +3 -3
- package/dist/{DepartmentPanel-D5VkqKeP.js → DepartmentPanel-CdwI7Rzu.js} +25 -25
- package/dist/{DesignPanel-BGvEusHC.js → DesignPanel-B50-g0TL.js} +1 -1
- package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-BQF1uQ7w.js → DesignPanel.vue_vue_type_style_index_0_lang-KV8JOZ6v.js} +28 -30
- package/dist/DictView-Be2Z5Obk.js +110 -0
- package/dist/InvOrganization-Lui1q3Ou.js +74 -0
- package/dist/Org-qO5ExsPN.js +39 -0
- package/dist/{Preview-BaGmXH7r.js → Preview-Dq4dfV2D.js} +2 -2
- package/dist/{ReportDefine-DkQdBErt.js → ReportDefine-DH3FvbS1.js} +1 -1
- package/dist/{ReportDesign-DzB_A_G6.js → ReportDesign-Bou01Jbr.js} +43 -43
- package/dist/{ReportQuery-DRcMb6ya.js → ReportQuery-BBkmPPSw.js} +1 -1
- package/dist/{ReportQueryFrom-CeA9xhR4.js → ReportQueryFrom-BCY8lTJ7.js} +1 -1
- package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-CgGtcs5V.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-CpktcM8J.js} +1 -1
- package/dist/{ReportTemplate-qaiTMQuT.js → ReportTemplate-C_yJXxQ-.js} +28 -28
- package/dist/{Role-DsFulAjq.js → Role-CTatYsrC.js} +6 -6
- package/dist/{RoleAssign-DMRdocpa.js → RoleAssign-Cqt3CelK.js} +9 -9
- package/dist/{RolePanel-wXVysDHM.js → RolePanel-C3JMpNu8.js} +1 -1
- package/dist/{RolePanel-B9POS_pg.js → RolePanel-brKRJIhD.js} +1 -1
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-DD8u9pq8.js +132 -0
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-CleVvkcY.js → RolePanel.vue_vue_type_script_setup_true_lang-i6Gq4r5B.js} +44 -38
- package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-DlXUs0j9.js → ScrollPanel.vue_vue_type_style_index_0_lang-CiWKyjm3.js} +23 -23
- package/dist/{Staff-Cq4V7ruC.js → Staff-Cd3twQ6Y.js} +3 -3
- package/dist/{StaffInfo-CJDKMbud.js → StaffInfo-DJp0a0qd.js} +1 -1
- package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-DQ4DL1KY.js → StaffInfo.vue_vue_type_script_setup_true_lang-Dp2AhJ4I.js} +16 -16
- package/dist/{StaffPanel-CG-uggdr.js → StaffPanel-B93hClzs.js} +1 -1
- package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-DAgN7zN2.js → StaffPanel.vue_vue_type_script_setup_true_lang-CXjUzq7n.js} +2 -2
- package/dist/{SysUser-kwnzRNdD.js → SysUser-BvI6vaqI.js} +2 -2
- package/dist/{SysUserPanel-DTlZf3vk.js → SysUserPanel-C9V8X-Ek.js} +1 -1
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-bMqTui07.js +343 -0
- package/dist/{SystemMenu-BVT0n-L2.js → SystemMenu-D4WME5d0.js} +27 -27
- package/dist/{UserInfo-BbTQ9Zat.js → UserInfo-D-AfdfJs.js} +1 -1
- package/dist/{UserInfo.vue_vue_type_style_index_0_lang-D_bpYDmI.js → UserInfo.vue_vue_type_style_index_0_lang-C-JQYIxe.js} +41 -39
- package/dist/{childView-BJbIhjmf.js → childView--WMSo-wH.js} +1 -1
- package/dist/{childView-DCsGFrG-.js → childView-1MTl6Kaj.js} +1 -1
- package/dist/childView.vue_vue_type_style_index_0_lang-B8Losc4Y.js +170 -0
- package/dist/{childView.vue_vue_type_style_index_0_lang-BCDxpVoD.js → childView.vue_vue_type_style_index_0_lang-BAVKNIXs.js} +1 -1
- package/dist/{code-rule-DePU6cdp.js → code-rule-D-RqrQB6.js} +42 -41
- package/dist/core.es.js +19 -10
- package/dist/{cron-task-DUM1SIGL.js → cron-task-D-X-KFZm.js} +11 -11
- package/dist/flow-task-B07st2aD.js +10 -0
- package/dist/{frameView-CEUTDtSm.js → frameView-MAW_-GHJ.js} +1 -1
- package/dist/index-Bc9vCX7z.js +2904 -0
- package/dist/{layoutView-PCjwVwkX.js → layoutView-De2QIEr2.js} +1639 -1629
- package/dist/{log-in-e7D5Ss1P.js → log-in-CpGqc33f.js} +5 -4
- package/dist/{log-out--RRncZhN.js → log-out-D1b4VRMZ.js} +30 -24
- package/dist/{login-log-CvVnyGi3.js → login-log-BNRXLeMi.js} +4 -3
- package/dist/login-rdZ0GPYc.js +249 -0
- package/dist/{lov-view-D8wwkxFJ.js → lov-view-Ao7LMspL.js} +5 -5
- package/dist/{menuInfo-B5JKVwrB.js → menuInfo-DmOcK6An.js} +1 -1
- package/dist/{menuInfo.vue_vue_type_style_index_0_lang-CcM9WX4n.js → menuInfo.vue_vue_type_style_index_0_lang-Ln-zFWV7.js} +121 -99
- package/dist/{pda-app-DIa1p1Ww.js → pda-app-DY63mQ2T.js} +202 -188
- package/dist/{resource-CCQ7Dd-5.js → resource-B21uV58T.js} +18 -18
- package/dist/{su-welcome-CLp9YaJa.js → su-welcome-DgjzJeDF.js} +122 -121
- package/dist/sys-config-DOtK2I32.js +370 -0
- package/dist/udp-core.css +1 -9
- package/dist/utogether-MlnyYtNS.js +4 -0
- package/index.ts +19 -6
- package/package.json +1 -1
- package/src/App.vue +65 -70
- package/src/api/http.ts +1 -4
- package/src/api/index.ts +5 -3
- package/src/api/user.ts +2 -2
- package/src/components/SuCharts/src/UserInfo.vue +3 -3
- package/src/components/SuScrollTree/ScrollPanel.vue +4 -9
- package/src/components/udp/content/index.vue +88 -0
- package/src/components/udp/form/form.vue +109 -0
- package/src/components/udp/{grid.vue → grid/index.vue} +524 -500
- package/src/components/udp/index.ts +4 -6
- package/src/components/udp/ut-stamp-badge/index.vue +272 -0
- package/src/components/udp/utils.ts +408 -379
- package/src/directives/permission/index.ts +1 -1
- package/src/layout/components/lay-navbar/index.vue +8 -6
- package/src/layout/components/lay-panel/index.vue +150 -150
- package/src/layout/components/lay-search/index.vue +1 -1
- package/src/layout/components/lay-select-org/index.vue +4 -9
- package/src/layout/components/lay-sidebar/horizontal.vue +8 -6
- package/src/layout/components/lay-sidebar/mixNav.vue +260 -258
- package/src/layout/components/lay-sidebar/sidebar-logo.vue +8 -12
- package/src/layout/components/lay-tag/index.vue +596 -625
- package/src/layout/hooks/useTag.ts +12 -18
- package/src/layout/types.ts +3 -2
- package/src/main.ts +115 -110
- package/src/plugins/i18n/en.ts +302 -291
- package/src/plugins/i18n/module/u-workflow.ts +1 -1
- package/src/plugins/i18n/zh.ts +362 -338
- package/src/plugins/vxe-table/index.ts +116 -53
- package/src/plugins/vxe-table/render.tsx +183 -57
- package/src/router/index.ts +101 -97
- package/src/router/modules/flow.ts +35 -0
- package/src/router/modules/remaining.ts +1 -26
- package/src/router/utils.ts +50 -7
- package/src/store/modules/app.ts +1 -3
- package/src/store/modules/multiTags.ts +15 -14
- package/src/store/modules/permission.ts +25 -15
- package/src/store/modules/system.ts +1 -3
- package/src/style/button.scss +85 -85
- package/src/style/login.css +1 -1
- package/src/style/vxetable.scss +348 -258
- package/src/utils/authority/index.ts +1 -1
- package/src/utils/index.ts +3 -1
- package/src/utils/propTypes.ts +1 -6
- package/src/utils/{http → udp/http}/index.ts +27 -30
- package/src/utils/{http → udp/http}/types.d.ts +2 -6
- package/src/views/login/login-view.vue +6 -20
- package/src/views/organization/company/CompanyPanel.vue +259 -259
- package/src/views/organization/department/DepartmentPanel.vue +6 -20
- package/src/views/organization/inv-org/InvOrganization.vue +22 -7
- package/src/views/organization/org/Org.vue +9 -5
- package/src/views/system/cron/cron-task.vue +2 -12
- package/src/views/system/menu/SystemMenu.vue +185 -197
- package/src/views/system/menu/menuInfo.vue +384 -372
- package/src/views/system/role/AuthorityInfo.vue +19 -15
- package/src/views/system/role/Role.vue +1 -5
- package/src/views/system/role/RolePanel.vue +11 -2
- package/src/views/system/role/UserInfo.vue +11 -9
- package/src/views/system/role-assign/RoleAssign.vue +2 -2
- package/src/views/system/role-assign/RolePanel.vue +12 -9
- package/src/views/system/sys/sys-config.vue +70 -21
- package/src/views/system/sysUser/SysUserPanel.vue +132 -62
- package/src/views/uapp/pda/pda-app.vue +48 -16
- package/src/views/udev/coderule/code-rule.vue +132 -121
- package/src/views/udev/dict/DictView.vue +118 -106
- package/src/views/udev/dict/childView.vue +71 -111
- package/src/views/udev/lov/childView.vue +1 -7
- package/src/views/udev/lov/lov-view.vue +91 -91
- package/src/views/ufile/aggregation/File.vue +5 -5
- package/src/views/ufile/file/water-mark.vue +14 -14
- package/src/views/uhome/components/menu-favorite.vue +314 -331
- package/src/views/uhome/su-welcome.vue +3 -3
- package/src/views/ulogin/login.vue +19 -12
- package/src/views/upms/interface/log-in.vue +2 -8
- package/src/views/upms/interface/log-out.vue +2 -8
- package/src/views/upms/user/login-log.vue +2 -8
- package/src/views/urpt/design/DesignPanel.vue +16 -35
- package/src/views/urpt/design/Preview.vue +1 -0
- package/src/views/urpt/design/ReportDesign.vue +17 -23
- package/src/views/urpt/static-resource/resource.vue +3 -3
- package/src/views/urpt/template/ReportTemplate.vue +7 -7
- package/src/views/utask/flow-task.vue +18 -0
- package/types/global.d.ts +4 -9
- package/vite.config.ts +2 -1
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-Bwsf6lMH.js +0 -102
- package/dist/DictView-BnxfaOBv.js +0 -96
- package/dist/InvOrganization-5y79ZLdY.js +0 -66
- package/dist/Org-2oBAXN2r.js +0 -35
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-t6S_0zmJ.js +0 -126
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-BW6PlGjM.js +0 -288
- package/dist/childView.vue_vue_type_style_index_0_lang-CDtsalCm.js +0 -187
- package/dist/index-ZdgOD7cF.js +0 -3399
- package/dist/login-B1CjWVKu.js +0 -252
- package/dist/sys-config-BBmf_SqF.js +0 -277
- package/dist/utogether-Bkptx2lB.js +0 -182
- package/src/components/udp/form-upload.vue +0 -183
- package/src/components/udp/lov.vue +0 -410
- package/src/components/udp/modal-form.vue +0 -180
- package/src/components/udp/modal-grid.vue +0 -297
- package/src/utils/udp/useRender.ts +0 -420
|
@@ -1,259 +1,259 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: wei.li
|
|
3
|
-
* @Date: 2021-11-19 21:14:41
|
|
4
|
-
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2025-04-08 15:48:36
|
|
6
|
-
* @Description: 租户管理
|
|
7
|
-
-->
|
|
8
|
-
|
|
9
|
-
<template>
|
|
10
|
-
<div class="page-content">
|
|
11
|
-
<!-- 工具栏 -->
|
|
12
|
-
<vxe-toolbar perfect class="">
|
|
13
|
-
<template #buttons>
|
|
14
|
-
<ut-button status="u-cyan" icon="ri-add-line" content="add" @tap="handleAdd()" />
|
|
15
|
-
<ut-button status="primary" icon="ri-edit-box-line" content="edit" @tap="handleEdit('update')" />
|
|
16
|
-
<ut-button status="danger" icon="ri-close-fill" content="delete" @tap="handleDelete()" />
|
|
17
|
-
</template>
|
|
18
|
-
</vxe-toolbar>
|
|
19
|
-
<el-row
|
|
20
|
-
v-if="data.dialogFormVisible"
|
|
21
|
-
type="flex"
|
|
22
|
-
justify="center"
|
|
23
|
-
align="middle"
|
|
24
|
-
class="w-departInfo-wrapper"
|
|
25
|
-
>
|
|
26
|
-
<el-card width="60%" shadow="always" class="box-card w-card-wrapper">
|
|
27
|
-
<div class="clearfix">
|
|
28
|
-
<span class="w-card-title" />
|
|
29
|
-
</div>
|
|
30
|
-
<el-row>
|
|
31
|
-
<vxe-form ref="xForm" :data="data.record" :rules="rules" label-width="80px">
|
|
32
|
-
<vxe-form-item
|
|
33
|
-
:title="$t('message.udp.unitName')"
|
|
34
|
-
field="unitName"
|
|
35
|
-
:item-render="{ name: '$input', props: { disabled: data.dataStatus === 'detail' } }"
|
|
36
|
-
:span="24"
|
|
37
|
-
/>
|
|
38
|
-
<vxe-form-item
|
|
39
|
-
:title="$t('message.udp.unitCode')"
|
|
40
|
-
field="unitCode"
|
|
41
|
-
:item-render="{ name: '$input', props: { disabled: data.dataStatus !== 'add' } }"
|
|
42
|
-
:span="24"
|
|
43
|
-
/>
|
|
44
|
-
<vxe-form-item
|
|
45
|
-
:title="$t('message.udp.unitNote')"
|
|
46
|
-
field="unitNote"
|
|
47
|
-
:item-render="{ name: '$input', props: { disabled: data.dataStatus === 'detail' } }"
|
|
48
|
-
:span="24"
|
|
49
|
-
/>
|
|
50
|
-
</vxe-form>
|
|
51
|
-
</el-row>
|
|
52
|
-
<el-row type="flex" justify="center">
|
|
53
|
-
<vxe-checkbox
|
|
54
|
-
v-if="data.dataStatus === 'add'"
|
|
55
|
-
v-model="data.isChecked"
|
|
56
|
-
style="padding-top: 5px; margin-right: 8px"
|
|
57
|
-
>{{ $t('message.udp.continueAdd') }}</vxe-checkbox
|
|
58
|
-
>
|
|
59
|
-
<vxe-button
|
|
60
|
-
v-if="data.dataStatus !== 'detail'"
|
|
61
|
-
status="primary"
|
|
62
|
-
:content="$t('message.btn.confirm')"
|
|
63
|
-
@click="handleComfirm"
|
|
64
|
-
/>
|
|
65
|
-
<vxe-button
|
|
66
|
-
v-if="data.dataStatus !== 'detail'"
|
|
67
|
-
status="warning"
|
|
68
|
-
:content="$t('message.btn.cancel')"
|
|
69
|
-
@click="handleCancle"
|
|
70
|
-
/>
|
|
71
|
-
</el-row>
|
|
72
|
-
</el-card>
|
|
73
|
-
</el-row>
|
|
74
|
-
<el-row v-else class="w-noclick-wrapper">
|
|
75
|
-
<!-- <span class="w-department-header">{{ $t('setting.deartment.organization') }}</span> -->
|
|
76
|
-
<div class="w-content-wrapper">
|
|
77
|
-
<ul>
|
|
78
|
-
<li class="w-department-line">
|
|
79
|
-
<div>● 点击新建,新建租户信息。</div>
|
|
80
|
-
<div style="margin: 0; text-indent: 2em">
|
|
81
|
-
已点击树结构上的租户名称,默认创建为当前租户的下属租户
|
|
82
|
-
</div>
|
|
83
|
-
<div style="margin: 0; text-indent: 2em">未点击树结构上的租户名称,则创建为一级租户</div>
|
|
84
|
-
</li>
|
|
85
|
-
<li class="w-department-line">● 点击树结构上的租户名称,点击修改按钮,修改租户信息。</li>
|
|
86
|
-
<li class="w-department-line">
|
|
87
|
-
<div>● 点击树结构上的租户名称,点击删除按钮,删除租户信息。</div>
|
|
88
|
-
<div style="text-indent: 2em">当租户下有单位存在时,不允许删除租户信息。</div>
|
|
89
|
-
</li>
|
|
90
|
-
</ul>
|
|
91
|
-
</div>
|
|
92
|
-
</el-row>
|
|
93
|
-
</div>
|
|
94
|
-
</template>
|
|
95
|
-
|
|
96
|
-
<script setup lang="ts">
|
|
97
|
-
import { useI18n } from 'vue-i18n';
|
|
98
|
-
import { reactive, watch, inject } from 'vue';
|
|
99
|
-
import { VxeUI } from 'vxe-table';
|
|
100
|
-
import { templateRef } from '@vueuse/core';
|
|
101
|
-
import { clone } from 'xe-utils';
|
|
102
|
-
import { successMessage, warnMessage } from '@utogether/utils';
|
|
103
|
-
import { getServiceApi } from '../../../api';
|
|
104
|
-
|
|
105
|
-
const data = reactive<IRecord>({
|
|
106
|
-
record: {},
|
|
107
|
-
dataList: [],
|
|
108
|
-
submitLoading: false,
|
|
109
|
-
dialogFormVisible: false,
|
|
110
|
-
isChecked: false,
|
|
111
|
-
dataStatus: ''
|
|
112
|
-
});
|
|
113
|
-
const { t } = useI18n();
|
|
114
|
-
const rules = {
|
|
115
|
-
unitName: [
|
|
116
|
-
{
|
|
117
|
-
required: true,
|
|
118
|
-
message: `${t('message.required')}${t('message.udp.unitName')}`
|
|
119
|
-
}
|
|
120
|
-
],
|
|
121
|
-
unitCode: [
|
|
122
|
-
{
|
|
123
|
-
required: true,
|
|
124
|
-
message: `${t('message.required')}${t('message.udp.unitCode')}`
|
|
125
|
-
}
|
|
126
|
-
]
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
const active: IRecord = inject('active');
|
|
130
|
-
const scrollPanelChange: IRecord = inject('scrollPanelChange');
|
|
131
|
-
|
|
132
|
-
const serviceApi = getServiceApi();
|
|
133
|
-
const url = '/uums/unit';
|
|
134
|
-
|
|
135
|
-
watch(
|
|
136
|
-
() => active.value,
|
|
137
|
-
(newVal, oldVal) => {
|
|
138
|
-
data.record = active.value;
|
|
139
|
-
newVal?.id && oldVal?.id && newVal !== oldVal && handleEdit('detail');
|
|
140
|
-
}
|
|
141
|
-
);
|
|
142
|
-
|
|
143
|
-
// 新增子类型
|
|
144
|
-
const handleAdd = () => {
|
|
145
|
-
data.dataStatus = 'add';
|
|
146
|
-
data.record = {};
|
|
147
|
-
data.record.parentId = active.value?.id;
|
|
148
|
-
data.isChecked = false;
|
|
149
|
-
data.dialogFormVisible = true;
|
|
150
|
-
};
|
|
151
|
-
// 编辑
|
|
152
|
-
const handleEdit = dataStatus => {
|
|
153
|
-
data.dataStatus = dataStatus;
|
|
154
|
-
data.record = clone(active.value, true);
|
|
155
|
-
data.dialogFormVisible = true;
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
const xForm = templateRef<any>('xForm', null);
|
|
159
|
-
const handleComfirm = () => {
|
|
160
|
-
xForm.value.validate(async valid => {
|
|
161
|
-
if (!valid) {
|
|
162
|
-
const { record, dataStatus } = data;
|
|
163
|
-
if (dataStatus === 'add') {
|
|
164
|
-
await serviceApi.post(url, record);
|
|
165
|
-
} else {
|
|
166
|
-
await serviceApi.put(url, record);
|
|
167
|
-
}
|
|
168
|
-
actionComplete();
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
const handleDelete = async () => {
|
|
174
|
-
const { record } = data;
|
|
175
|
-
if (record.children?.length) return warnMessage(t('message.deletePartment'));
|
|
176
|
-
const type = await VxeUI.modal.confirm(t('message.tip.del', { msg: 'aaaaa' }));
|
|
177
|
-
if (type === 'confirm') {
|
|
178
|
-
await serviceApi.delete(url, record);
|
|
179
|
-
actionComplete();
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
const actionComplete = () => {
|
|
184
|
-
scrollPanelChange.value = true;
|
|
185
|
-
successMessage(t('message.operateSuccess'));
|
|
186
|
-
handleClose();
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
const handleCancle = () => {
|
|
190
|
-
data.dialogFormVisible = false;
|
|
191
|
-
data.dataStatus = '';
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
const handleClose = () => {
|
|
195
|
-
data.dialogFormVisible = false;
|
|
196
|
-
};
|
|
197
|
-
</script>
|
|
198
|
-
<style lang="scss" scoped>
|
|
199
|
-
.page-content {
|
|
200
|
-
background-color: #fff;
|
|
201
|
-
|
|
202
|
-
.w-departInfo-wrapper {
|
|
203
|
-
width: 96%;
|
|
204
|
-
height: 75vh;
|
|
205
|
-
|
|
206
|
-
.w-card-wrapper {
|
|
207
|
-
width: 40%;
|
|
208
|
-
|
|
209
|
-
.el-card__header {
|
|
210
|
-
padding: 10px 20px;
|
|
211
|
-
|
|
212
|
-
.w-card-title {
|
|
213
|
-
position: relative;
|
|
214
|
-
top: 5px;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.el-form-item {
|
|
220
|
-
margin-bottom: 12px;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.w-noclick-wrapper {
|
|
225
|
-
display: flex;
|
|
226
|
-
flex-wrap: wrap;
|
|
227
|
-
align-items: center;
|
|
228
|
-
justify-content: center;
|
|
229
|
-
height: 100%;
|
|
230
|
-
|
|
231
|
-
.w-content-wrapper {
|
|
232
|
-
display: flex;
|
|
233
|
-
align-items: center;
|
|
234
|
-
justify-content: center;
|
|
235
|
-
height: 75vh;
|
|
236
|
-
|
|
237
|
-
ul {
|
|
238
|
-
padding: 24px;
|
|
239
|
-
border: 1px solid #ccc;
|
|
240
|
-
border-radius: 10px;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.w-department-header {
|
|
245
|
-
padding-right: 20px;
|
|
246
|
-
font-size: 26px;
|
|
247
|
-
font-weight: bolder;
|
|
248
|
-
color: #69c;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.w-department-line {
|
|
252
|
-
font-size: 16px;
|
|
253
|
-
line-height: 35px;
|
|
254
|
-
color: #999;
|
|
255
|
-
list-style: none;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
</style>
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2021-11-19 21:14:41
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2025-04-08 15:48:36
|
|
6
|
+
* @Description: 租户管理
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<div class="page-content">
|
|
11
|
+
<!-- 工具栏 -->
|
|
12
|
+
<vxe-toolbar perfect class="">
|
|
13
|
+
<template #buttons>
|
|
14
|
+
<ut-button status="u-cyan" icon="ri-add-line" content="add" @tap="handleAdd()" />
|
|
15
|
+
<ut-button status="primary" icon="ri-edit-box-line" content="edit" @tap="handleEdit('update')" />
|
|
16
|
+
<ut-button status="danger" icon="ri-close-fill" content="delete" @tap="handleDelete()" />
|
|
17
|
+
</template>
|
|
18
|
+
</vxe-toolbar>
|
|
19
|
+
<el-row
|
|
20
|
+
v-if="data.dialogFormVisible"
|
|
21
|
+
type="flex"
|
|
22
|
+
justify="center"
|
|
23
|
+
align="middle"
|
|
24
|
+
class="w-departInfo-wrapper"
|
|
25
|
+
>
|
|
26
|
+
<el-card width="60%" shadow="always" class="box-card w-card-wrapper">
|
|
27
|
+
<div class="clearfix">
|
|
28
|
+
<span class="w-card-title" />
|
|
29
|
+
</div>
|
|
30
|
+
<el-row>
|
|
31
|
+
<vxe-form ref="xForm" :data="data.record" :rules="rules" label-width="80px">
|
|
32
|
+
<vxe-form-item
|
|
33
|
+
:title="$t('message.udp.unitName')"
|
|
34
|
+
field="unitName"
|
|
35
|
+
:item-render="{ name: '$input', props: { disabled: data.dataStatus === 'detail' } }"
|
|
36
|
+
:span="24"
|
|
37
|
+
/>
|
|
38
|
+
<vxe-form-item
|
|
39
|
+
:title="$t('message.udp.unitCode')"
|
|
40
|
+
field="unitCode"
|
|
41
|
+
:item-render="{ name: '$input', props: { disabled: data.dataStatus !== 'add' } }"
|
|
42
|
+
:span="24"
|
|
43
|
+
/>
|
|
44
|
+
<vxe-form-item
|
|
45
|
+
:title="$t('message.udp.unitNote')"
|
|
46
|
+
field="unitNote"
|
|
47
|
+
:item-render="{ name: '$input', props: { disabled: data.dataStatus === 'detail' } }"
|
|
48
|
+
:span="24"
|
|
49
|
+
/>
|
|
50
|
+
</vxe-form>
|
|
51
|
+
</el-row>
|
|
52
|
+
<el-row type="flex" justify="center">
|
|
53
|
+
<vxe-checkbox
|
|
54
|
+
v-if="data.dataStatus === 'add'"
|
|
55
|
+
v-model="data.isChecked"
|
|
56
|
+
style="padding-top: 5px; margin-right: 8px"
|
|
57
|
+
>{{ $t('message.udp.continueAdd') }}</vxe-checkbox
|
|
58
|
+
>
|
|
59
|
+
<vxe-button
|
|
60
|
+
v-if="data.dataStatus !== 'detail'"
|
|
61
|
+
status="primary"
|
|
62
|
+
:content="$t('message.btn.confirm')"
|
|
63
|
+
@click="handleComfirm"
|
|
64
|
+
/>
|
|
65
|
+
<vxe-button
|
|
66
|
+
v-if="data.dataStatus !== 'detail'"
|
|
67
|
+
status="warning"
|
|
68
|
+
:content="$t('message.btn.cancel')"
|
|
69
|
+
@click="handleCancle"
|
|
70
|
+
/>
|
|
71
|
+
</el-row>
|
|
72
|
+
</el-card>
|
|
73
|
+
</el-row>
|
|
74
|
+
<el-row v-else class="w-noclick-wrapper">
|
|
75
|
+
<!-- <span class="w-department-header">{{ $t('setting.deartment.organization') }}</span> -->
|
|
76
|
+
<div class="w-content-wrapper">
|
|
77
|
+
<ul>
|
|
78
|
+
<li class="w-department-line">
|
|
79
|
+
<div>● 点击新建,新建租户信息。</div>
|
|
80
|
+
<div style="margin: 0; text-indent: 2em">
|
|
81
|
+
已点击树结构上的租户名称,默认创建为当前租户的下属租户
|
|
82
|
+
</div>
|
|
83
|
+
<div style="margin: 0; text-indent: 2em">未点击树结构上的租户名称,则创建为一级租户</div>
|
|
84
|
+
</li>
|
|
85
|
+
<li class="w-department-line">● 点击树结构上的租户名称,点击修改按钮,修改租户信息。</li>
|
|
86
|
+
<li class="w-department-line">
|
|
87
|
+
<div>● 点击树结构上的租户名称,点击删除按钮,删除租户信息。</div>
|
|
88
|
+
<div style="text-indent: 2em">当租户下有单位存在时,不允许删除租户信息。</div>
|
|
89
|
+
</li>
|
|
90
|
+
</ul>
|
|
91
|
+
</div>
|
|
92
|
+
</el-row>
|
|
93
|
+
</div>
|
|
94
|
+
</template>
|
|
95
|
+
|
|
96
|
+
<script setup lang="ts">
|
|
97
|
+
import { useI18n } from 'vue-i18n';
|
|
98
|
+
import { reactive, watch, inject } from 'vue';
|
|
99
|
+
import { VxeUI } from 'vxe-table';
|
|
100
|
+
import { templateRef } from '@vueuse/core';
|
|
101
|
+
import { clone } from 'xe-utils';
|
|
102
|
+
import { successMessage, warnMessage } from '@utogether/utils';
|
|
103
|
+
import { getServiceApi } from '../../../api';
|
|
104
|
+
|
|
105
|
+
const data = reactive<IRecord>({
|
|
106
|
+
record: {},
|
|
107
|
+
dataList: [],
|
|
108
|
+
submitLoading: false,
|
|
109
|
+
dialogFormVisible: false,
|
|
110
|
+
isChecked: false,
|
|
111
|
+
dataStatus: ''
|
|
112
|
+
});
|
|
113
|
+
const { t } = useI18n();
|
|
114
|
+
const rules = {
|
|
115
|
+
unitName: [
|
|
116
|
+
{
|
|
117
|
+
required: true,
|
|
118
|
+
message: `${t('message.required')}${t('message.udp.unitName')}`
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
unitCode: [
|
|
122
|
+
{
|
|
123
|
+
required: true,
|
|
124
|
+
message: `${t('message.required')}${t('message.udp.unitCode')}`
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const active: IRecord = inject('active');
|
|
130
|
+
const scrollPanelChange: IRecord = inject('scrollPanelChange');
|
|
131
|
+
|
|
132
|
+
const serviceApi = getServiceApi();
|
|
133
|
+
const url = '/uums/unit';
|
|
134
|
+
|
|
135
|
+
watch(
|
|
136
|
+
() => active.value,
|
|
137
|
+
(newVal, oldVal) => {
|
|
138
|
+
data.record = active.value;
|
|
139
|
+
newVal?.id && oldVal?.id && newVal !== oldVal && handleEdit('detail');
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
// 新增子类型
|
|
144
|
+
const handleAdd = () => {
|
|
145
|
+
data.dataStatus = 'add';
|
|
146
|
+
data.record = {};
|
|
147
|
+
data.record.parentId = active.value?.id;
|
|
148
|
+
data.isChecked = false;
|
|
149
|
+
data.dialogFormVisible = true;
|
|
150
|
+
};
|
|
151
|
+
// 编辑
|
|
152
|
+
const handleEdit = dataStatus => {
|
|
153
|
+
data.dataStatus = dataStatus;
|
|
154
|
+
data.record = clone(active.value, true);
|
|
155
|
+
data.dialogFormVisible = true;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
const xForm = templateRef<any>('xForm', null);
|
|
159
|
+
const handleComfirm = () => {
|
|
160
|
+
xForm.value.validate(async valid => {
|
|
161
|
+
if (!valid) {
|
|
162
|
+
const { record, dataStatus } = data;
|
|
163
|
+
if (dataStatus === 'add') {
|
|
164
|
+
await serviceApi.post(url, record);
|
|
165
|
+
} else {
|
|
166
|
+
await serviceApi.put(url, record);
|
|
167
|
+
}
|
|
168
|
+
actionComplete();
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
const handleDelete = async () => {
|
|
174
|
+
const { record } = data;
|
|
175
|
+
if (record.children?.length) return warnMessage(t('message.deletePartment'));
|
|
176
|
+
const type = await VxeUI.modal.confirm(t('message.tip.del', { msg: 'aaaaa' }));
|
|
177
|
+
if (type === 'confirm') {
|
|
178
|
+
await serviceApi.delete(url, record);
|
|
179
|
+
actionComplete();
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
const actionComplete = () => {
|
|
184
|
+
scrollPanelChange.value = true;
|
|
185
|
+
successMessage(t('message.operateSuccess'));
|
|
186
|
+
handleClose();
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
const handleCancle = () => {
|
|
190
|
+
data.dialogFormVisible = false;
|
|
191
|
+
data.dataStatus = '';
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
const handleClose = () => {
|
|
195
|
+
data.dialogFormVisible = false;
|
|
196
|
+
};
|
|
197
|
+
</script>
|
|
198
|
+
<style lang="scss" scoped>
|
|
199
|
+
.page-content {
|
|
200
|
+
background-color: #fff;
|
|
201
|
+
|
|
202
|
+
.w-departInfo-wrapper {
|
|
203
|
+
width: 96%;
|
|
204
|
+
height: 75vh;
|
|
205
|
+
|
|
206
|
+
.w-card-wrapper {
|
|
207
|
+
width: 40%;
|
|
208
|
+
|
|
209
|
+
.el-card__header {
|
|
210
|
+
padding: 10px 20px;
|
|
211
|
+
|
|
212
|
+
.w-card-title {
|
|
213
|
+
position: relative;
|
|
214
|
+
top: 5px;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.el-form-item {
|
|
220
|
+
margin-bottom: 12px;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.w-noclick-wrapper {
|
|
225
|
+
display: flex;
|
|
226
|
+
flex-wrap: wrap;
|
|
227
|
+
align-items: center;
|
|
228
|
+
justify-content: center;
|
|
229
|
+
height: 100%;
|
|
230
|
+
|
|
231
|
+
.w-content-wrapper {
|
|
232
|
+
display: flex;
|
|
233
|
+
align-items: center;
|
|
234
|
+
justify-content: center;
|
|
235
|
+
height: 75vh;
|
|
236
|
+
|
|
237
|
+
ul {
|
|
238
|
+
padding: 24px;
|
|
239
|
+
border: 1px solid #ccc;
|
|
240
|
+
border-radius: 10px;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.w-department-header {
|
|
245
|
+
padding-right: 20px;
|
|
246
|
+
font-size: 26px;
|
|
247
|
+
font-weight: bolder;
|
|
248
|
+
color: #69c;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.w-department-line {
|
|
252
|
+
font-size: 16px;
|
|
253
|
+
line-height: 35px;
|
|
254
|
+
color: #999;
|
|
255
|
+
list-style: none;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
</style>
|
|
@@ -62,18 +62,8 @@
|
|
|
62
62
|
style="padding-top: 5px; margin-right: 8px"
|
|
63
63
|
>{{ $t('message.udp.continueAdd') }}</vxe-checkbox
|
|
64
64
|
>
|
|
65
|
-
<ut-button
|
|
66
|
-
|
|
67
|
-
status="primary"
|
|
68
|
-
content="confirm"
|
|
69
|
-
@tap="handleComfirm"
|
|
70
|
-
/>
|
|
71
|
-
<ut-button
|
|
72
|
-
v-if="data.dataStatus !== 'detail'"
|
|
73
|
-
status="warning"
|
|
74
|
-
content="cancel"
|
|
75
|
-
@click="handleCancle"
|
|
76
|
-
/>
|
|
65
|
+
<ut-button v-if="data.dataStatus !== 'detail'" status="primary" content="confirm" @tap="handleComfirm" />
|
|
66
|
+
<ut-button v-if="data.dataStatus !== 'detail'" status="warning" content="cancel" @click="handleCancle" />
|
|
77
67
|
</el-row>
|
|
78
68
|
</el-card>
|
|
79
69
|
</el-row>
|
|
@@ -83,9 +73,7 @@
|
|
|
83
73
|
<ul>
|
|
84
74
|
<li class="w-department-line">
|
|
85
75
|
<div>● 点击新建,新建部门信息。</div>
|
|
86
|
-
<div style="margin: 0; text-indent: 2em">
|
|
87
|
-
已点击树结构上的部门名称,默认创建为当前部门的下属部门
|
|
88
|
-
</div>
|
|
76
|
+
<div style="margin: 0; text-indent: 2em">已点击树结构上的部门名称,默认创建为当前部门的下属部门</div>
|
|
89
77
|
<div style="margin: 0; text-indent: 2em">未点击树结构上的部门名称,则创建为一级部门</div>
|
|
90
78
|
</li>
|
|
91
79
|
<li class="w-department-line">● 点击树结构上的部门名称,点击修改按钮,修改部门信息。</li>
|
|
@@ -105,7 +93,7 @@ import { reactive, watch, inject } from 'vue';
|
|
|
105
93
|
import { templateRef } from '@vueuse/core';
|
|
106
94
|
import { clone } from 'xe-utils';
|
|
107
95
|
import to from 'await-to-js';
|
|
108
|
-
import { VXETable
|
|
96
|
+
import { VXETable } from 'vxe-table';
|
|
109
97
|
import { successMessage, warnMessage } from '@utogether/utils';
|
|
110
98
|
import { useSystemStoreHook } from '../../../store/modules/system';
|
|
111
99
|
import { getServiceApi } from '../../../api';
|
|
@@ -123,7 +111,7 @@ const dataDict = useSystemStoreHook().getDataDict;
|
|
|
123
111
|
const { t } = useI18n();
|
|
124
112
|
const serviceApi = getServiceApi();
|
|
125
113
|
|
|
126
|
-
const rules
|
|
114
|
+
const rules = {
|
|
127
115
|
deptName: [
|
|
128
116
|
{
|
|
129
117
|
required: true,
|
|
@@ -180,9 +168,7 @@ const handleComfirm = () => {
|
|
|
180
168
|
const { record, dataStatus } = data;
|
|
181
169
|
data.loading = true;
|
|
182
170
|
const [err] =
|
|
183
|
-
dataStatus === 'add'
|
|
184
|
-
? await to(serviceApi.post(url, record))
|
|
185
|
-
: await to(serviceApi.put(url, record));
|
|
171
|
+
dataStatus === 'add' ? await to(serviceApi.post(url, record)) : await to(serviceApi.put(url, record));
|
|
186
172
|
data.loading = false;
|
|
187
173
|
if (!err) {
|
|
188
174
|
actionComplete();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: wei.li
|
|
3
3
|
* @Date: 2021-11-29 11:32:07
|
|
4
4
|
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2025-
|
|
5
|
+
* @LastEditTime: 2025-09-05 10:49:38
|
|
6
6
|
* @Description: 库存组织
|
|
7
7
|
-->
|
|
8
8
|
<template>
|
|
@@ -29,20 +29,35 @@ const url = '/uums/cusOrganization';
|
|
|
29
29
|
const xgrid = ref(null);
|
|
30
30
|
const renderHook = useRender();
|
|
31
31
|
|
|
32
|
-
const formItems = [
|
|
32
|
+
const formItems = [
|
|
33
|
+
{ field: 'organizationCode', title: 'message.udp.organizationCode' },
|
|
34
|
+
{ field: 'organizationName', title: 'message.udp.organizationName' }
|
|
35
|
+
];
|
|
33
36
|
|
|
34
37
|
// 列字段
|
|
35
38
|
const columns = [
|
|
36
39
|
{ type: 'checkbox', width: 40, align: 'center' },
|
|
37
|
-
{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
{
|
|
41
|
+
field: 'organizationCode',
|
|
42
|
+
width: 120,
|
|
43
|
+
title: 'message.udp.organizationCode',
|
|
44
|
+
required: true,
|
|
45
|
+
editRender: renderHook.renderInput()
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
field: 'organizationName',
|
|
49
|
+
minWidth: 120,
|
|
50
|
+
title: 'message.udp.organizationName',
|
|
51
|
+
required: true,
|
|
52
|
+
editRender: renderHook.renderInput()
|
|
53
|
+
},
|
|
54
|
+
{ field: 'orgName', minWidth: 170, title: 'message.udp.orgName', required: true, editRender: renderHook.renderBU() },
|
|
55
|
+
{ field: 'orgCode', width: 110, title: 'message.udp.orgCode' },
|
|
41
56
|
{ field: 'enabled', width: 80, cellRender: renderHook.renderEnabled(handleClick) }
|
|
42
57
|
];
|
|
43
58
|
|
|
44
59
|
// 启用/禁用
|
|
45
|
-
async function handleClick(row) {
|
|
60
|
+
async function handleClick({ row }) {
|
|
46
61
|
const [err] = await to(getServiceApi().put(url, [row]));
|
|
47
62
|
!err && xgrid.value.refreshData();
|
|
48
63
|
}
|
|
@@ -24,14 +24,18 @@ const url = '/uums/org';
|
|
|
24
24
|
const xgrid = ref(null);
|
|
25
25
|
const renderHook = useRender();
|
|
26
26
|
|
|
27
|
-
const formItems = [
|
|
27
|
+
const formItems = [
|
|
28
|
+
{ field: 'orgCode', title: 'message.udp.orgCode' },
|
|
29
|
+
{ field: 'orgName', title: 'message.udp.orgName' },
|
|
30
|
+
{ field: 'orgAlias', title: 'message.udp.orgAlias' }
|
|
31
|
+
];
|
|
28
32
|
// 列字段
|
|
29
33
|
const columns = [
|
|
30
34
|
{ type: 'checkbox', width: 50, align: 'center' },
|
|
31
|
-
{ field: 'orgCode', required: true, editRender: { name: '$input' } },
|
|
32
|
-
{ field: 'orgName', required: true, minWidth: 200, editRender: { name: '$input' } },
|
|
33
|
-
{ field: 'orgAlias', editRender: { name: '$input' } },
|
|
34
|
-
{ field: 'orgDesc', editRender: { name: '$input' } },
|
|
35
|
+
{ field: 'orgCode', title: 'message.udp.orgCode', required: true, editRender: { name: '$input' } },
|
|
36
|
+
{ field: 'orgName', title: 'message.udp.orgName', required: true, minWidth: 200, editRender: { name: '$input' } },
|
|
37
|
+
{ field: 'orgAlias', title: 'message.udp.orgAlias', editRender: { name: '$input' } },
|
|
38
|
+
{ field: 'orgDesc', title: 'message.udp.orgDesc', editRender: { name: '$input' } },
|
|
35
39
|
{ field: 'enabled', width: 80, cellRender: renderHook.renderEnabled(handleClick) }
|
|
36
40
|
];
|
|
37
41
|
|