@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
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
:columns="columns"
|
|
6
6
|
:items="formItems"
|
|
7
7
|
:url="url"
|
|
8
|
-
:
|
|
9
|
-
:
|
|
8
|
+
:auto-load="false"
|
|
9
|
+
:default-params="defaultParams"
|
|
10
|
+
mode="form"
|
|
11
|
+
@buttonClick="onButtonClick"
|
|
10
12
|
/>
|
|
11
13
|
<!-- 编辑用户信息 -->
|
|
12
14
|
<vxe-modal v-model="data.showModelView" title="用户信息" width="300">
|
|
@@ -15,12 +17,7 @@
|
|
|
15
17
|
<vxe-form-item :title="$t('message.unitName')" field="unitId" span="24">
|
|
16
18
|
<template #default="{ data }">
|
|
17
19
|
<vxe-select v-model="data.unitId">
|
|
18
|
-
<vxe-option
|
|
19
|
-
v-for="unit in treeList"
|
|
20
|
-
:key="unit.id"
|
|
21
|
-
:value="unit.id"
|
|
22
|
-
:label="unit.unitName"
|
|
23
|
-
/>
|
|
20
|
+
<vxe-option v-for="unit in treeList" :key="unit.id" :value="unit.id" :label="unit.unitName" />
|
|
24
21
|
</vxe-select>
|
|
25
22
|
</template>
|
|
26
23
|
</vxe-form-item>
|
|
@@ -30,12 +27,7 @@
|
|
|
30
27
|
field="userName"
|
|
31
28
|
span="24"
|
|
32
29
|
/>
|
|
33
|
-
<vxe-form-item
|
|
34
|
-
:title="$t('message.userName')"
|
|
35
|
-
field="name"
|
|
36
|
-
span="24"
|
|
37
|
-
:item-render="{ name: 'input' }"
|
|
38
|
-
/>
|
|
30
|
+
<vxe-form-item :title="$t('message.userName')" field="name" span="24" :item-render="{ name: 'input' }" />
|
|
39
31
|
<vxe-form-item
|
|
40
32
|
v-if="data.dataStatus === 'add'"
|
|
41
33
|
:title="$t('message.userPwd')"
|
|
@@ -53,7 +45,7 @@
|
|
|
53
45
|
</template>
|
|
54
46
|
</vxe-modal>
|
|
55
47
|
<!-- 用户角色 -->
|
|
56
|
-
<vxe-modal v-model="data.showUserRole" :title="$t('message.title.roleInfo')" width="600">
|
|
48
|
+
<vxe-modal v-model="data.showUserRole" :loading="loading" :title="$t('message.title.roleInfo')" width="600">
|
|
57
49
|
<template #default>
|
|
58
50
|
<vxe-table height="300" :data="data.roleList" border>
|
|
59
51
|
<vxe-column type="seq" width="60" />
|
|
@@ -62,27 +54,49 @@
|
|
|
62
54
|
</vxe-table>
|
|
63
55
|
</template>
|
|
64
56
|
</vxe-modal>
|
|
65
|
-
|
|
57
|
+
|
|
58
|
+
<vxe-modal
|
|
59
|
+
v-model="data.showAuth"
|
|
60
|
+
:loading="loading"
|
|
61
|
+
:title="$t('message.title.authority', { role: data.record.name || '88888' })"
|
|
62
|
+
height="620"
|
|
63
|
+
width="560"
|
|
64
|
+
>
|
|
66
65
|
<template #default>
|
|
67
66
|
<el-tree-v2
|
|
68
67
|
ref="xTree"
|
|
69
68
|
:data="data.roleList"
|
|
70
69
|
:props="{ children: 'children', label: 'menuName' }"
|
|
71
|
-
:height="
|
|
70
|
+
:height="560"
|
|
72
71
|
node-key="id"
|
|
73
72
|
/>
|
|
74
73
|
</template>
|
|
75
74
|
</vxe-modal>
|
|
75
|
+
|
|
76
|
+
<ut-modal-form
|
|
77
|
+
v-if="data.showModal"
|
|
78
|
+
:record="data.record"
|
|
79
|
+
:items="data.items"
|
|
80
|
+
:width="360"
|
|
81
|
+
:height="data.height"
|
|
82
|
+
:method="!data.record.id ? 'post' : 'put'"
|
|
83
|
+
:data-process-method="dataProcessMethod"
|
|
84
|
+
:title="$t('message.title.userInfo')"
|
|
85
|
+
data-status="update"
|
|
86
|
+
:url="url"
|
|
87
|
+
@close="data.showModal = false"
|
|
88
|
+
@confirm="onConfirm"
|
|
89
|
+
/>
|
|
76
90
|
</div>
|
|
77
91
|
</template>
|
|
78
92
|
|
|
79
93
|
<script setup lang="tsx">
|
|
80
94
|
import { useI18n } from 'vue-i18n';
|
|
81
|
-
import { ref, reactive, inject,
|
|
95
|
+
import { ref, reactive, inject, onMounted } from 'vue';
|
|
82
96
|
import to from 'await-to-js';
|
|
83
|
-
import { useRender, errorMessage, warnMessage } from '@utogether/utils';
|
|
97
|
+
import { useRender, errorMessage, warnMessage, delay, getDictChildren } from '@utogether/utils';
|
|
84
98
|
import { VxeUI, VxeFormPropTypes } from 'vxe-pc-ui';
|
|
85
|
-
import { isEmpty } from 'xe-utils';
|
|
99
|
+
import { clone, isEmpty } from 'xe-utils';
|
|
86
100
|
import { getServiceApi } from '../../../api';
|
|
87
101
|
|
|
88
102
|
const data = reactive<IRecord>({
|
|
@@ -90,9 +104,11 @@ const data = reactive<IRecord>({
|
|
|
90
104
|
listQuery: {},
|
|
91
105
|
dataList: [],
|
|
92
106
|
roleList: [],
|
|
107
|
+
items: [],
|
|
93
108
|
submitLoading: false,
|
|
94
109
|
showModelView: false,
|
|
95
110
|
showUserRole: false,
|
|
111
|
+
showModal: false,
|
|
96
112
|
showAuth: false,
|
|
97
113
|
dataStatus: ''
|
|
98
114
|
});
|
|
@@ -127,57 +143,42 @@ const rules: VxeFormPropTypes.Rules = {
|
|
|
127
143
|
]
|
|
128
144
|
};
|
|
129
145
|
const renderHook = useRender();
|
|
130
|
-
const
|
|
146
|
+
const defaultParams = ref({});
|
|
131
147
|
const treeList: IRecord[] = inject('treeList');
|
|
148
|
+
const loading = ref(false);
|
|
132
149
|
|
|
133
150
|
const url = '/uums/user';
|
|
151
|
+
let defaultPassword = '';
|
|
134
152
|
|
|
135
153
|
const xgrid = ref(null);
|
|
136
154
|
|
|
137
155
|
const formItems = [
|
|
138
|
-
{ field: 'name', title: 'message.userName' },
|
|
139
|
-
{ field: 'userName', title: 'message.userCode' }
|
|
156
|
+
{ field: 'name', title: 'message.udp.userName' },
|
|
157
|
+
{ field: 'userName', title: 'message.udp.userCode' },
|
|
158
|
+
{ field: 'type', title: 'message.udp.userType', code: 'SU.USER.TYPE' }
|
|
140
159
|
];
|
|
141
160
|
|
|
142
161
|
const columns = [
|
|
143
162
|
{ type: 'checkbox', width: 40, align: 'center' },
|
|
144
|
-
{ field: 'userName', title: 'message.userCode'
|
|
145
|
-
{ field: 'name', title: 'message.userName'
|
|
163
|
+
{ field: 'userName', title: 'message.udp.userCode' },
|
|
164
|
+
{ field: 'name', title: 'message.udp.userName' },
|
|
146
165
|
{
|
|
147
166
|
field: 'type',
|
|
148
|
-
title: 'message.
|
|
149
|
-
formatter: ['formatDict', 'SU.
|
|
150
|
-
editRender: renderHook.renderDict('SU.USER.TYPE')
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
field: 'userPwd',
|
|
154
|
-
required: true,
|
|
155
|
-
width: 150,
|
|
156
|
-
editRender: renderHook.renderInput(),
|
|
157
|
-
formatter: () => '*******'
|
|
167
|
+
title: 'message.udp.userType',
|
|
168
|
+
formatter: ['formatDict', 'SU.USER.TYPE']
|
|
158
169
|
},
|
|
159
170
|
{ field: 'enabled', width: 80, cellRender: renderHook.renderEnabled(handleClick) },
|
|
160
171
|
{
|
|
161
172
|
field: 'operate',
|
|
162
|
-
width:
|
|
173
|
+
width: 150,
|
|
163
174
|
fixed: 'right',
|
|
164
175
|
slots: {
|
|
165
176
|
default: ({ row }) => {
|
|
166
177
|
return [
|
|
167
178
|
<>
|
|
168
|
-
<ut-button icon="ri-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
content="auth"
|
|
172
|
-
status="success"
|
|
173
|
-
onTap={() => handleAuth(row)}
|
|
174
|
-
/>
|
|
175
|
-
<ut-button
|
|
176
|
-
icon="ri-lock-fill"
|
|
177
|
-
content="passwordReset"
|
|
178
|
-
status="warning"
|
|
179
|
-
onTap={() => handleResetPwd(row)}
|
|
180
|
-
/>
|
|
179
|
+
<ut-button content="edit" icon="ri-edit-line" onTap={() => handleEdit(row)} />
|
|
180
|
+
|
|
181
|
+
<ut-dropdown buttons={getButtons()} onCommand={code => handleCommand(row, code)} />
|
|
181
182
|
</>
|
|
182
183
|
];
|
|
183
184
|
}
|
|
@@ -185,6 +186,60 @@ const columns = [
|
|
|
185
186
|
}
|
|
186
187
|
];
|
|
187
188
|
|
|
189
|
+
const handleCommand = (row, code) => {
|
|
190
|
+
code === 'role' && handleRole(row);
|
|
191
|
+
code === 'auth' && handleAuth(row);
|
|
192
|
+
code === 'passwordReset' && handleResetPwd(row);
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
const getButtons = () => {
|
|
196
|
+
// 项目延期
|
|
197
|
+
const buttons = [
|
|
198
|
+
{ code: 'role', icon: 'ri-user-fill' },
|
|
199
|
+
{ code: 'auth', icon: 'ri-lock-fill' },
|
|
200
|
+
{ code: 'passwordReset', icon: 'ri-lock-password-line' }
|
|
201
|
+
];
|
|
202
|
+
return buttons;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
const items = [
|
|
206
|
+
{ field: 'userName', title: 'message.udp.userCode', required: true, disabled: false },
|
|
207
|
+
{ field: 'name', title: 'message.udp.userName', required: true },
|
|
208
|
+
{ field: 'type', required: true, title: 'message.udp.userType', code: 'SU.USER.TYPE' },
|
|
209
|
+
{ field: 'userPwd', required: true, visibleMethod: ({ data }) => !data.id }
|
|
210
|
+
];
|
|
211
|
+
|
|
212
|
+
const handleAdd = () => {
|
|
213
|
+
data.record = {
|
|
214
|
+
userPwd: defaultPassword,
|
|
215
|
+
...defaultParams.value,
|
|
216
|
+
type: 'system'
|
|
217
|
+
};
|
|
218
|
+
debugger;
|
|
219
|
+
data.items = clone(items, true);
|
|
220
|
+
data.height = 280;
|
|
221
|
+
data.showModal = true;
|
|
222
|
+
};
|
|
223
|
+
const handleEdit = row => {
|
|
224
|
+
data.record = clone(row, true);
|
|
225
|
+
data.items = clone(items, true);
|
|
226
|
+
data.items[0].disabled = true;
|
|
227
|
+
data.height = 240;
|
|
228
|
+
data.showModal = true;
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
const handleDel = () => {
|
|
232
|
+
xgrid.value.getInstance().commitProxy('delete');
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
const dataProcessMethod = data => {
|
|
236
|
+
return [data];
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
const onConfirm = () => {
|
|
240
|
+
xgrid.value.refreshData();
|
|
241
|
+
};
|
|
242
|
+
|
|
188
243
|
// 启用/禁用
|
|
189
244
|
async function handleClick({ row }) {
|
|
190
245
|
await to(serviceApi.put(url, [row]));
|
|
@@ -197,11 +252,14 @@ async function handleClick({ row }) {
|
|
|
197
252
|
* @return {*}
|
|
198
253
|
*/
|
|
199
254
|
const handleRole = async (row: any) => {
|
|
255
|
+
data.roleList = [];
|
|
256
|
+
data.showUserRole = true;
|
|
257
|
+
loading.value = true;
|
|
200
258
|
const serverData = await serviceApi.get(url + '/getUserRole', { userName: row.userName });
|
|
259
|
+
loading.value = false;
|
|
201
260
|
data.roleList = serverData[0]?.sysRoles;
|
|
202
|
-
nextTick(() => {
|
|
203
|
-
|
|
204
|
-
});
|
|
261
|
+
// nextTick(() => {
|
|
262
|
+
// });
|
|
205
263
|
};
|
|
206
264
|
/**
|
|
207
265
|
* @description: 密码重置
|
|
@@ -210,7 +268,7 @@ const handleRole = async (row: any) => {
|
|
|
210
268
|
*/
|
|
211
269
|
const handleResetPwd = async (row: Object) => {
|
|
212
270
|
await serviceApi.put(url + '/resetPwd', row);
|
|
213
|
-
await VxeUI.modal.alert(t('message.tip.initPassword'));
|
|
271
|
+
await VxeUI.modal.alert(t('message.tip.initPassword', { code: defaultPassword }));
|
|
214
272
|
};
|
|
215
273
|
// 启用/禁用
|
|
216
274
|
// const handleUpdate = async (record: IRecord) => {
|
|
@@ -224,23 +282,21 @@ const handleResetPwd = async (row: Object) => {
|
|
|
224
282
|
* @return {*}
|
|
225
283
|
*/
|
|
226
284
|
const handleAuth = async row => {
|
|
285
|
+
data.roleList = [];
|
|
286
|
+
data.showAuth = true;
|
|
287
|
+
loading.value = true;
|
|
288
|
+
data.record = row;
|
|
227
289
|
const [err, res] = await to(serviceApi.get(url + '/getUserRole', { userName: row.userName }));
|
|
290
|
+
loading.value = false;
|
|
228
291
|
if (!err) {
|
|
229
292
|
if (!isEmpty(res)) {
|
|
230
293
|
data.roleList = res[0]?.sysMenuExts;
|
|
231
|
-
data.showAuth = true;
|
|
232
294
|
} else {
|
|
233
295
|
warnMessage(t('message.tip.emptyAuth'));
|
|
234
296
|
}
|
|
235
297
|
}
|
|
236
298
|
};
|
|
237
299
|
|
|
238
|
-
const onGridEvents = {
|
|
239
|
-
editActived({ row }) {
|
|
240
|
-
columns[1].editRender.props.disabled = !!row.id;
|
|
241
|
-
columns[4].editRender.props.disabled = !!row.id;
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
300
|
const xForm = ref(null);
|
|
245
301
|
// const xSarchFrom = ref(null);
|
|
246
302
|
|
|
@@ -261,18 +317,32 @@ const onSubmit = () => {
|
|
|
261
317
|
const handleClose = () => {
|
|
262
318
|
data.showModelView = false;
|
|
263
319
|
};
|
|
320
|
+
|
|
321
|
+
const onButtonClick = code => {
|
|
322
|
+
code === 'add' && handleAdd();
|
|
323
|
+
code === 'del' && handleDel();
|
|
324
|
+
};
|
|
325
|
+
|
|
264
326
|
const getUnitList = () => {
|
|
265
327
|
serviceApi
|
|
266
328
|
.get('/uums/unit', { pageSize: 10 })
|
|
267
|
-
.then(res => {
|
|
268
|
-
|
|
329
|
+
.then(async res => {
|
|
330
|
+
defaultParams.value = { unitId: res[0].id, enabled: '1' };
|
|
331
|
+
await delay(100);
|
|
332
|
+
xgrid.value.refreshData();
|
|
269
333
|
})
|
|
270
334
|
.catch(() => {
|
|
271
335
|
errorMessage('获取租户失败,刷新后重试');
|
|
272
336
|
});
|
|
273
337
|
};
|
|
274
338
|
|
|
339
|
+
const getDefaultPassword = () => {
|
|
340
|
+
const dict = getDictChildren('SU.DEFAULT_PASSWORD')?.find(f => f.dictCode === 'default');
|
|
341
|
+
defaultPassword = dict.dictName;
|
|
342
|
+
};
|
|
343
|
+
|
|
275
344
|
onMounted(() => {
|
|
345
|
+
getDefaultPassword();
|
|
276
346
|
getUnitList();
|
|
277
347
|
});
|
|
278
348
|
</script>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: wei.li
|
|
3
3
|
* @Date: 2021-12-23 11:22:51
|
|
4
4
|
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2025-
|
|
5
|
+
* @LastEditTime: 2025-08-16 18:01:55
|
|
6
6
|
* @Description: 托盘管理
|
|
7
7
|
-->
|
|
8
8
|
|
|
@@ -13,10 +13,11 @@
|
|
|
13
13
|
v-if="showModalForm"
|
|
14
14
|
:record="record"
|
|
15
15
|
:items="items"
|
|
16
|
-
:width="
|
|
17
|
-
:height="
|
|
16
|
+
:width="420"
|
|
17
|
+
:height="450"
|
|
18
18
|
:title="$t('message.title.appAdd')"
|
|
19
19
|
:url="url"
|
|
20
|
+
class="ut-app-form"
|
|
20
21
|
data-status="add"
|
|
21
22
|
@close="showModalForm = false"
|
|
22
23
|
@confirm="onConfirm"
|
|
@@ -31,6 +32,7 @@ import { ref } from 'vue';
|
|
|
31
32
|
import { useI18n } from 'vue-i18n';
|
|
32
33
|
import to from 'await-to-js';
|
|
33
34
|
import { getBaseURL, getServiceApi } from '../../../api';
|
|
35
|
+
// import { useRender } from '../../../utils/udp/useRender';
|
|
34
36
|
import { useRender } from '@utogether/utils';
|
|
35
37
|
import { clone } from 'xe-utils';
|
|
36
38
|
import SuQrcode from '../../../components/SuQrcode';
|
|
@@ -56,15 +58,20 @@ const record = ref({});
|
|
|
56
58
|
// 列字段
|
|
57
59
|
const columns = [
|
|
58
60
|
{ type: 'checkbox', width: 45, align: 'center' },
|
|
59
|
-
|
|
60
|
-
{ field: '
|
|
61
|
-
{
|
|
62
|
-
|
|
61
|
+
{ field: 'appVersion', title: 'message.udp.appVersion', width: 110 },
|
|
62
|
+
{ field: 'buildNo', title: 'message.udp.buildNo', width: 130 },
|
|
63
|
+
{
|
|
64
|
+
field: 'isForceUpdate',
|
|
65
|
+
title: 'message.udp.isForceUpdate',
|
|
66
|
+
width: 130,
|
|
67
|
+
formatter: ({ row }) => (row.isForceUpdate === 'Y' ? t('message.udp.forceUpdate') : t('message.udp.freeUpdate'))
|
|
68
|
+
},
|
|
69
|
+
{ field: 'versionInfo', title: 'message.udp.versionInfo', miWidth: 200 },
|
|
63
70
|
{
|
|
64
71
|
field: 'enabled',
|
|
65
72
|
title: 'message.status',
|
|
66
73
|
width: 90,
|
|
67
|
-
formatter: ({ row }) => (row.enabled === '1' ? t('message.appupper') : t('message.applower'))
|
|
74
|
+
formatter: ({ row }) => (row.enabled === '1' ? t('message.udp.appupper') : t('message.udp.applower'))
|
|
68
75
|
},
|
|
69
76
|
{ field: 'creationDate', width: 140 },
|
|
70
77
|
{
|
|
@@ -77,9 +84,7 @@ const columns = [
|
|
|
77
84
|
const status = row.enabled === '1' ? 'warning' : 'primary';
|
|
78
85
|
const icon = row.enabled === '1' ? 'ri-inbox-archive-line' : 'ri-inbox-unarchive-line';
|
|
79
86
|
if (row.enabled !== '1') {
|
|
80
|
-
return [
|
|
81
|
-
<ut-button content={content} icon={icon} status={status} onTap={() => handleChild(row)} />
|
|
82
|
-
];
|
|
87
|
+
return [<ut-button content={content} icon={icon} status={status} onTap={() => handleChild(row)} />];
|
|
83
88
|
}
|
|
84
89
|
return [
|
|
85
90
|
<>
|
|
@@ -139,13 +144,30 @@ const onButtonClick = code => {
|
|
|
139
144
|
};
|
|
140
145
|
|
|
141
146
|
const items = [
|
|
142
|
-
{ field: 'appVersion', required: true },
|
|
143
|
-
{ field: 'buildNo', required: true },
|
|
144
|
-
{
|
|
147
|
+
{ field: 'appVersion', title: 'message.udp.appVersion', required: true },
|
|
148
|
+
{ field: 'buildNo', title: 'message.udp.buildNo', required: true },
|
|
149
|
+
{
|
|
150
|
+
field: 'isForceUpdate',
|
|
151
|
+
title: 'message.udp.isForceUpdate',
|
|
152
|
+
required: true,
|
|
153
|
+
itemRender: renderHook.renderSwitch({
|
|
154
|
+
openLabel: t('message.udp.forceUpdate'),
|
|
155
|
+
closeLabel: t('message.udp.freeUpdate'),
|
|
156
|
+
openValue: 'Y',
|
|
157
|
+
closeValue: 'N'
|
|
158
|
+
})
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
field: 'versionInfo',
|
|
162
|
+
title: 'message.udp.versionInfo',
|
|
163
|
+
required: true,
|
|
164
|
+
itemRender: renderHook.renderTextarea()
|
|
165
|
+
},
|
|
145
166
|
{
|
|
146
167
|
field: 'downloadUrl',
|
|
147
168
|
required: false,
|
|
148
|
-
|
|
169
|
+
title: 'message.udp.downloadUrl',
|
|
170
|
+
itemRender: renderHook.renderUpload()
|
|
149
171
|
}
|
|
150
172
|
];
|
|
151
173
|
|
|
@@ -155,7 +177,10 @@ const showModalForm = ref(false);
|
|
|
155
177
|
* @description: 添加
|
|
156
178
|
*/
|
|
157
179
|
const handleAdd = () => {
|
|
158
|
-
record.value = {
|
|
180
|
+
record.value = {
|
|
181
|
+
// downloadUrl: 'https://vxeui.com/resource/img/fj577.jpg'
|
|
182
|
+
// downloadUrl: '/resource/image/20250817/15806d21e3f445dcae0e2e0825c76a79.jpg'
|
|
183
|
+
};
|
|
159
184
|
showModalForm.value = true;
|
|
160
185
|
};
|
|
161
186
|
|
|
@@ -174,3 +199,10 @@ const onConfirm = () => {
|
|
|
174
199
|
xgrid.value.refreshData();
|
|
175
200
|
};
|
|
176
201
|
</script>
|
|
202
|
+
<style lang="scss" scoped>
|
|
203
|
+
.ut-app-form {
|
|
204
|
+
::v-deep(.vxe-switch--label) {
|
|
205
|
+
width: 100%;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
</style>
|