@utogether/udp-core 1.0.1-beta.1 → 1.0.1-beta.10
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 +39 -32
- package/dist/{403-Dp617CWX.js → 403-Ctxjn4q8.js} +1 -1
- package/dist/{404-Cz_Axb6Y.js → 404-W5yzyiZ9.js} +1 -1
- package/dist/{500-BGCtRNse.js → 500-DXuGEOm4.js} +1 -1
- package/dist/{AuthorityInfo-DGGfm7IS.js → AuthorityInfo-C2tflCt8.js} +1 -1
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-SVgy3HX7.js +100 -0
- package/dist/{Company-IV3GTnzY.js → Company-PLez5GoH.js} +3 -3
- package/dist/{CompanyPanel-qV-_VtoL.js → CompanyPanel-CIGaQooL.js} +16 -16
- package/dist/{Department-B3W-OxW8.js → Department-B9wLsXFm.js} +3 -3
- package/dist/{DepartmentPanel-Cw3OWxE7.js → DepartmentPanel-DSM4lTaz.js} +1 -1
- package/dist/{DesignPanel-BFxR2fHJ.js → DesignPanel-B6a9wW_A.js} +1 -1
- package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-DljbeFba.js → DesignPanel.vue_vue_type_style_index_0_lang-DtHfoDQk.js} +24 -26
- package/dist/DictView-DhFbQxdJ.js +110 -0
- package/dist/InvOrganization-D90AbR3b.js +66 -0
- package/dist/Org-DxBkYabD.js +39 -0
- package/dist/{Preview-BlDMmpdR.js → Preview-BFtRpBxw.js} +1 -1
- package/dist/{ReportDefine-Cub_85LA.js → ReportDefine-BIa2QryC.js} +1 -1
- package/dist/{ReportDesign-hFhq5UVE.js → ReportDesign-CnyjI-WD.js} +43 -43
- package/dist/{ReportQuery-ChkWEyxT.js → ReportQuery-BiK7yEhV.js} +1 -1
- package/dist/{ReportQueryFrom-KVyD_8Dj.js → ReportQueryFrom-C2rqdFTm.js} +1 -1
- package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-CLNODquq.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-Ba9HLnXQ.js} +1 -1
- package/dist/{ReportTemplate-ag9NDvh2.js → ReportTemplate-DdkLscP3.js} +28 -28
- package/dist/{Role-_q3lQ8CZ.js → Role-BrsxgK8D.js} +6 -6
- package/dist/{RoleAssign-DZb9IRsm.js → RoleAssign-DiqwJqDa.js} +8 -8
- package/dist/{RolePanel-CsLsz-Ds.js → RolePanel-BDusGyo7.js} +1 -1
- package/dist/{RolePanel-BQb1LlhD.js → RolePanel-Dqx5dI3f.js} +1 -1
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-2Z1q_5uW.js +132 -0
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-BrnRgHEk.js → RolePanel.vue_vue_type_script_setup_true_lang-B5lUnaMI.js} +44 -38
- package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-CaFKRwXu.js → ScrollPanel.vue_vue_type_style_index_0_lang-vSP23fEq.js} +21 -21
- package/dist/{Staff-BSf9Ypbk.js → Staff-Cwi9LQiZ.js} +3 -3
- package/dist/{StaffInfo-BNKasyMF.js → StaffInfo-XjVtyaMv.js} +1 -1
- package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-DDZ7ukd0.js → StaffInfo.vue_vue_type_script_setup_true_lang-wSrAuyet.js} +11 -11
- package/dist/{StaffPanel-Bpq0WVlH.js → StaffPanel-C-wYcFdv.js} +1 -1
- package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-BhiJ0Q-Q.js → StaffPanel.vue_vue_type_script_setup_true_lang-DZNArmnC.js} +2 -2
- package/dist/{SysUser-FAABuNti.js → SysUser-O4tvr-Ur.js} +2 -2
- package/dist/{SysUserPanel-PxJeOgHm.js → SysUserPanel-B853docZ.js} +1 -1
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-DhiYYC97.js +294 -0
- package/dist/{SystemMenu-C-7NAGon.js → SystemMenu-CXR6mrXr.js} +26 -26
- package/dist/{UserInfo-ClXKtyGo.js → UserInfo-BkP8pE2a.js} +1 -1
- package/dist/{UserInfo.vue_vue_type_style_index_0_lang-8N7P4Hl7.js → UserInfo.vue_vue_type_style_index_0_lang-D4r_umjV.js} +39 -37
- package/dist/{childView-C_HmDQNd.js → childView-D0HwbgDT.js} +1 -1
- package/dist/{childView-uUlBcTza.js → childView-TRqUkSDC.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-Ckjmw6wJ.js → childView.vue_vue_type_style_index_0_lang-BzISq0Jf.js} +40 -40
- package/dist/{childView.vue_vue_type_style_index_0_lang-y0sDvYx5.js → childView.vue_vue_type_style_index_0_lang-DQRgNsJY.js} +1 -1
- package/dist/{code-rule-AgCVDKFy.js → code-rule-BV7PQWhK.js} +9 -10
- package/dist/core.es.js +14 -11
- package/dist/{cron-task-C6FgQxTi.js → cron-task-9ZS9bi7K.js} +1 -1
- package/dist/{frameView-BDgISK7N.js → frameView-DE83AN50.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-DVARtten.js +2623 -0
- package/dist/{layoutView-yb3DV2DQ.js → layoutView-D1U-c4By.js} +111 -110
- package/dist/{login-log-CvVnyGi3.js → login-log-kqKzKTto.js} +1 -1
- package/dist/{login-RRpljbkm.js → login-sPCEiTGT.js} +106 -113
- package/dist/{lov-view-C9-rjzZR.js → lov-view-76NcYTYl.js} +2 -2
- package/dist/{menuInfo-CzPQyFhp.js → menuInfo-CxjfjFpm.js} +1 -1
- package/dist/{menuInfo.vue_vue_type_style_index_0_lang-BumXunCg.js → menuInfo.vue_vue_type_style_index_0_lang-C2qahH3r.js} +100 -97
- package/dist/{pda-app-Dvy3U-b6.js → pda-app-BUH16bLj.js} +211 -197
- package/dist/{resource-Fy0lFkSV.js → resource-CCuHzoA6.js} +15 -15
- package/dist/{su-welcome-DYvSCUST.js → su-welcome-mRArONsd.js} +109 -110
- package/dist/{sys-config-DJ1vNQTy.js → sys-config-Cvt05yF6.js} +7 -7
- package/dist/udp-core.css +2 -2
- package/dist/{utogether-CjmJiHoE.js → utogether-Dm_VBQHR.js} +1 -1
- package/index.ts +40 -36
- package/package.json +1 -1
- package/src/App.vue +65 -70
- package/src/api/index.ts +1 -1
- package/src/components/SuCharts/src/UserInfo.vue +78 -78
- package/src/components/SuScrollTree/ScrollPanel.vue +3 -3
- package/src/components/udp/count-down.vue +536 -0
- package/src/components/udp/flip-down/FlipCard/flip-card.vue +251 -0
- package/src/components/udp/flip-down/FlipCard/interfaces.ts +4 -0
- package/src/components/udp/flip-down/FlipClock/flip-clock.vue +113 -0
- package/src/components/udp/form-upload.vue +414 -64
- package/src/components/udp/form.vue +112 -0
- package/src/components/udp/grid.vue +495 -0
- package/src/components/udp/index.ts +10 -4
- package/src/components/udp/lov.vue +388 -0
- package/src/components/udp/modal-form.vue +11 -2
- package/src/components/udp/modal-grid.vue +288 -0
- package/src/components/udp/upload.vue +423 -0
- package/src/components/udp/utils.ts +447 -40
- package/src/directives/permission/index.ts +1 -1
- 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-search/index.vue +25 -25
- 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 +23 -13
- package/src/plugins/i18n/en.ts +302 -289
- package/src/plugins/i18n/zh.ts +348 -337
- package/src/plugins/vxe-table/index.ts +53 -46
- package/src/plugins/vxe-table/render.tsx +956 -817
- package/src/router/index.ts +187 -183
- package/src/router/modules/remaining.ts +58 -83
- package/src/style/button.scss +85 -78
- package/src/style/tailwind.css +1 -68
- package/src/style/vxetable.scss +44 -11
- package/src/utils/authority/index.ts +1 -1
- package/src/utils/{http → udp/http}/index.ts +8 -24
- package/src/utils/{http → udp/http}/types.d.ts +8 -5
- package/src/utils/udp/useRender.ts +17 -6
- package/src/views/login/login-view.vue +2 -2
- package/src/views/organization/company/CompanyPanel.vue +259 -259
- package/src/views/organization/inv-org/InvOrganization.vue +2 -3
- package/src/views/organization/org/Org.vue +9 -5
- package/src/views/system/menu/SystemMenu.vue +183 -197
- package/src/views/system/menu/menuInfo.vue +363 -371
- 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 +195 -193
- package/src/views/system/role-assign/RoleAssign.vue +57 -57
- package/src/views/system/role-assign/RolePanel.vue +139 -136
- package/src/views/system/sys/sys-config.vue +1 -1
- package/src/views/system/sysUser/SysUserPanel.vue +278 -278
- package/src/views/uapp/pda/pda-app.vue +208 -176
- package/src/views/udev/dict/DictView.vue +118 -106
- package/src/views/udev/dict/childView.vue +7 -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/su-welcome.vue +3 -3
- package/src/views/ulogin/login.vue +14 -9
- package/src/views/upms/user/login-log.vue +1 -1
- package/src/views/urpt/design/DesignPanel.vue +507 -526
- package/src/views/urpt/design/ReportDesign.vue +15 -19
- package/src/views/urpt/static-resource/resource.vue +3 -3
- package/src/views/urpt/template/ReportTemplate.vue +7 -7
- package/types/global.d.ts +2 -1
- package/vite.config.ts +6 -2
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-BqccGW7v.js +0 -102
- package/dist/DictView-C-i7e4hZ.js +0 -95
- package/dist/InvOrganization-cfT6riGU.js +0 -260
- package/dist/Org-CA7vTDIF.js +0 -35
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-cmW7zBLu.js +0 -126
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-njefUln5.js +0 -288
- package/dist/index-DzOzUkf6.js +0 -3388
|
@@ -1,176 +1,208 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: wei.li
|
|
3
|
-
* @Date: 2021-12-23 11:22:51
|
|
4
|
-
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2025-
|
|
6
|
-
* @Description: 托盘管理
|
|
7
|
-
-->
|
|
8
|
-
|
|
9
|
-
<template>
|
|
10
|
-
<div>
|
|
11
|
-
<ut-grid ref="xgrid" :columns="columns" :url="url" mode="form" @buttonClick="onButtonClick" />
|
|
12
|
-
<ut-modal-form
|
|
13
|
-
v-if="showModalForm"
|
|
14
|
-
:record="record"
|
|
15
|
-
:items="items"
|
|
16
|
-
:width="
|
|
17
|
-
:height="
|
|
18
|
-
:title="$t('message.title.appAdd')"
|
|
19
|
-
:url="url"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
@
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
import {
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
//
|
|
50
|
-
// { field: '
|
|
51
|
-
// { field: '
|
|
52
|
-
// { field: '
|
|
53
|
-
// { field: '
|
|
54
|
-
//
|
|
55
|
-
|
|
56
|
-
//
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
{
|
|
61
|
-
{ field: '
|
|
62
|
-
{ field: '
|
|
63
|
-
{
|
|
64
|
-
field: '
|
|
65
|
-
title: 'message.
|
|
66
|
-
width:
|
|
67
|
-
formatter: ({ row }) => (row.
|
|
68
|
-
},
|
|
69
|
-
{ field: '
|
|
70
|
-
{
|
|
71
|
-
field: '
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
//
|
|
106
|
-
//
|
|
107
|
-
//
|
|
108
|
-
//
|
|
109
|
-
//
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2021-12-23 11:22:51
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2025-08-16 18:01:55
|
|
6
|
+
* @Description: 托盘管理
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<div>
|
|
11
|
+
<ut-grid ref="xgrid" :columns="columns" :url="url" mode="form" @buttonClick="onButtonClick" />
|
|
12
|
+
<ut-modal-form
|
|
13
|
+
v-if="showModalForm"
|
|
14
|
+
:record="record"
|
|
15
|
+
:items="items"
|
|
16
|
+
:width="420"
|
|
17
|
+
:height="450"
|
|
18
|
+
:title="$t('message.title.appAdd')"
|
|
19
|
+
:url="url"
|
|
20
|
+
class="ut-app-form"
|
|
21
|
+
data-status="add"
|
|
22
|
+
@close="showModalForm = false"
|
|
23
|
+
@confirm="onConfirm"
|
|
24
|
+
/>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
<script lang="tsx">
|
|
28
|
+
export default { name: 'PdaApp' };
|
|
29
|
+
</script>
|
|
30
|
+
<script setup lang="tsx">
|
|
31
|
+
import { ref } from 'vue';
|
|
32
|
+
import { useI18n } from 'vue-i18n';
|
|
33
|
+
import to from 'await-to-js';
|
|
34
|
+
import { getBaseURL, getServiceApi } from '../../../api';
|
|
35
|
+
// import { useRender } from '../../../utils/udp/useRender';
|
|
36
|
+
import { useRender } from '@utogether/utils';
|
|
37
|
+
import { clone } from 'xe-utils';
|
|
38
|
+
import SuQrcode from '../../../components/SuQrcode';
|
|
39
|
+
|
|
40
|
+
const baseURL = getBaseURL();
|
|
41
|
+
|
|
42
|
+
const renderHook = useRender();
|
|
43
|
+
|
|
44
|
+
const { t } = useI18n();
|
|
45
|
+
const url = '/upms/v1/app-manage';
|
|
46
|
+
const xgrid = ref(null);
|
|
47
|
+
const record = ref({});
|
|
48
|
+
|
|
49
|
+
// const formItems = [
|
|
50
|
+
// { field: 'organizationName', itemRender: renderHook.renderInvOrg() },
|
|
51
|
+
// { field: 'trayTypeCode', itemRender: renderHook.renderDict('SU.TRAY.TYPE') },
|
|
52
|
+
// { field: 'trayCode' },
|
|
53
|
+
// { field: 'materialCode' },
|
|
54
|
+
// { field: 'materialName' },
|
|
55
|
+
// { field: 'packCode', title: 'message.boxSignCode' }
|
|
56
|
+
// ];
|
|
57
|
+
|
|
58
|
+
// 列字段
|
|
59
|
+
const columns = [
|
|
60
|
+
{ type: 'checkbox', width: 45, align: 'center' },
|
|
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 },
|
|
70
|
+
{
|
|
71
|
+
field: 'enabled',
|
|
72
|
+
title: 'message.status',
|
|
73
|
+
width: 90,
|
|
74
|
+
formatter: ({ row }) => (row.enabled === '1' ? t('message.appupper') : t('message.applower'))
|
|
75
|
+
},
|
|
76
|
+
{ field: 'creationDate', width: 140 },
|
|
77
|
+
{
|
|
78
|
+
field: 'operate',
|
|
79
|
+
width: 260,
|
|
80
|
+
fixed: 'right',
|
|
81
|
+
slots: {
|
|
82
|
+
default: ({ row }) => {
|
|
83
|
+
const content = row.enabled === '1' ? 'applower' : 'appupper';
|
|
84
|
+
const status = row.enabled === '1' ? 'warning' : 'primary';
|
|
85
|
+
const icon = row.enabled === '1' ? 'ri-inbox-archive-line' : 'ri-inbox-unarchive-line';
|
|
86
|
+
if (row.enabled !== '1') {
|
|
87
|
+
return [<ut-button content={content} icon={icon} status={status} onTap={() => handleChild(row)} />];
|
|
88
|
+
}
|
|
89
|
+
return [
|
|
90
|
+
<>
|
|
91
|
+
<div style="display: flex; justify-content: space-between;">
|
|
92
|
+
<ut-button content={content} icon={icon} status={status} onTap={() => handleChild(row)} />
|
|
93
|
+
<el-popover
|
|
94
|
+
placement="left"
|
|
95
|
+
v-slots={{
|
|
96
|
+
reference: () => <el-button type="success">{t('message.btn.scan')}</el-button>
|
|
97
|
+
}}
|
|
98
|
+
>
|
|
99
|
+
<>
|
|
100
|
+
<SuQrcode text={baseURL + '/ufil/' + row.downloadUrl} />
|
|
101
|
+
</>
|
|
102
|
+
</el-popover>
|
|
103
|
+
</div>
|
|
104
|
+
</>
|
|
105
|
+
// <el-popover
|
|
106
|
+
// placement="left"
|
|
107
|
+
// v-slots={{
|
|
108
|
+
// reference: () => <el-button type="primary">外网下载</el-button>
|
|
109
|
+
// }}
|
|
110
|
+
// >
|
|
111
|
+
// <>
|
|
112
|
+
// <SuQrcode text={'http://jemes.uzuo.cn/gateway/ufil/' + row.downloadUrl} />
|
|
113
|
+
// </>
|
|
114
|
+
// </el-popover>
|
|
115
|
+
];
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
];
|
|
120
|
+
|
|
121
|
+
// 启用/禁用
|
|
122
|
+
// async function handleClick({ row }) {
|
|
123
|
+
// await to(getServiceApi().put(url, row));
|
|
124
|
+
// xgrid.value.refreshData();
|
|
125
|
+
// }
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* @param {*} row 数据源
|
|
129
|
+
*/
|
|
130
|
+
const handleChild = async row => {
|
|
131
|
+
const body = clone(row, true);
|
|
132
|
+
body.enabled = row.enabled === '1' ? '0' : '1';
|
|
133
|
+
await to(getServiceApi().put(url, body));
|
|
134
|
+
xgrid.value.refreshData();
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @description:监听grid事件
|
|
139
|
+
* @return {*}
|
|
140
|
+
*/
|
|
141
|
+
const onButtonClick = code => {
|
|
142
|
+
code === 'add' && handleAdd();
|
|
143
|
+
code === 'del' && handleDel();
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
const items = [
|
|
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
|
+
},
|
|
166
|
+
{
|
|
167
|
+
field: 'downloadUrl',
|
|
168
|
+
required: false,
|
|
169
|
+
title: 'message.udp.downloadUrl',
|
|
170
|
+
itemRender: renderHook.renderUpload()
|
|
171
|
+
}
|
|
172
|
+
];
|
|
173
|
+
|
|
174
|
+
const showModalForm = ref(false);
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* @description: 添加
|
|
178
|
+
*/
|
|
179
|
+
const handleAdd = () => {
|
|
180
|
+
record.value = {
|
|
181
|
+
// downloadUrl: 'https://vxeui.com/resource/img/fj577.jpg'
|
|
182
|
+
// downloadUrl: '/resource/image/20250817/15806d21e3f445dcae0e2e0825c76a79.jpg'
|
|
183
|
+
};
|
|
184
|
+
showModalForm.value = true;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
const handleDel = () => {
|
|
188
|
+
xgrid.value.getInstance().commitProxy('delete');
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
// const handleDownFile = row => {
|
|
192
|
+
// clipboardRef.value = baseURL + '/ufil/' + row.downloadUrl;
|
|
193
|
+
// successMessage('复制成功,快试试右键粘贴吧');
|
|
194
|
+
// };
|
|
195
|
+
|
|
196
|
+
// const buttons = [{ code: 'del', status: 'danger', icon: 'ri-delete-bin-line', auth: 'del' }];
|
|
197
|
+
|
|
198
|
+
const onConfirm = () => {
|
|
199
|
+
xgrid.value.refreshData();
|
|
200
|
+
};
|
|
201
|
+
</script>
|
|
202
|
+
<style lang="scss" scoped>
|
|
203
|
+
.ut-app-form {
|
|
204
|
+
::v-deep(.vxe-switch--label) {
|
|
205
|
+
width: 100%;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
</style>
|
|
@@ -1,106 +1,118 @@
|
|
|
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
|
-
|
|
15
|
-
:events="onGridEvents"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
</
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
{ field: '
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
{
|
|
63
|
-
field: '
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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
|
+
:check-method="checkMethod"
|
|
15
|
+
:events="onGridEvents"
|
|
16
|
+
url="/upfm/v1/lov"
|
|
17
|
+
/>
|
|
18
|
+
<child-view v-if="shouDrawer" :show="shouDrawer" :record="record" @onClose="handleClose" />
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script lang="tsx">
|
|
23
|
+
export default { name: 'DictView' };
|
|
24
|
+
</script>
|
|
25
|
+
<script setup lang="tsx">
|
|
26
|
+
import { ref, nextTick } from 'vue';
|
|
27
|
+
import childView from './childView.vue';
|
|
28
|
+
import { useRender } from '@utogether/utils';
|
|
29
|
+
// import { useRender } from '../../../utils/udp/useRender';
|
|
30
|
+
|
|
31
|
+
const xgrid = ref(null);
|
|
32
|
+
// const renderOption = useRenderOption();
|
|
33
|
+
|
|
34
|
+
const formItems = [
|
|
35
|
+
{ field: 'dictCode', title: 'message.udp.dictCode' },
|
|
36
|
+
{ field: 'dictName', title: 'message.udp.dictName' },
|
|
37
|
+
{ field: 'dictType', title: 'message.udp.dictType', code: 'SU.DICT.TYPE' }
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
const renderHook = useRender();
|
|
41
|
+
// 列字段
|
|
42
|
+
const columns = [
|
|
43
|
+
{ type: 'checkbox', width: 40, align: 'center' },
|
|
44
|
+
|
|
45
|
+
{
|
|
46
|
+
field: 'dictCode',
|
|
47
|
+
title: 'message.udp.dictCode',
|
|
48
|
+
required: true,
|
|
49
|
+
editRender: renderHook.renderInput()
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
field: 'dictName',
|
|
53
|
+
title: 'message.udp.dictName',
|
|
54
|
+
required: true,
|
|
55
|
+
editRender: renderHook.renderInput()
|
|
56
|
+
},
|
|
57
|
+
// {
|
|
58
|
+
// field: 'userName',
|
|
59
|
+
// width: 300,
|
|
60
|
+
// editRender: renderHook.renderUpload()
|
|
61
|
+
// },
|
|
62
|
+
{
|
|
63
|
+
field: 'dictType',
|
|
64
|
+
title: 'message.udp.dictType',
|
|
65
|
+
required: true,
|
|
66
|
+
editRender: renderHook.renderDict('SU.DICT.TYPE'),
|
|
67
|
+
formatter: ['formatDict', 'SU.DICT.TYPE']
|
|
68
|
+
},
|
|
69
|
+
{ field: 'dictDesc', title: 'message.remark', editRender: renderHook.renderInput() },
|
|
70
|
+
{
|
|
71
|
+
field: 'enabled',
|
|
72
|
+
width: 90,
|
|
73
|
+
editRender: renderHook.renderDict({ code: 'SU.ENABLE', defaultValue: '1' }),
|
|
74
|
+
formatter: ['formatDict', 'SU.ENABLE']
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
field: 'operate',
|
|
78
|
+
width: 80,
|
|
79
|
+
slots: {
|
|
80
|
+
default: ({ row }) => {
|
|
81
|
+
if (!row.id) return null;
|
|
82
|
+
return [<ut-button content="lov" onClick={() => hanldeDipose(row)} />];
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
];
|
|
87
|
+
|
|
88
|
+
const shouDrawer = ref(false);
|
|
89
|
+
const record = ref(null);
|
|
90
|
+
const hanldeDipose = row => {
|
|
91
|
+
nextTick(() => {
|
|
92
|
+
shouDrawer.value = true;
|
|
93
|
+
record.value = row;
|
|
94
|
+
record.value.total = row.children?.length;
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
const handleClose = () => {
|
|
98
|
+
xgrid.value.refreshData();
|
|
99
|
+
shouDrawer.value = false;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const onGridEvents = {
|
|
103
|
+
editActived({ row }) {
|
|
104
|
+
columns[1].editRender.props.disabled = !!row.id;
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
// function onChange(e) {
|
|
109
|
+
// console.log('onChange', e);
|
|
110
|
+
// }
|
|
111
|
+
// function onFocus(e) {
|
|
112
|
+
// console.log('onFocus', e);
|
|
113
|
+
// }
|
|
114
|
+
|
|
115
|
+
const checkMethod = row => {
|
|
116
|
+
return row.dictType !== '0';
|
|
117
|
+
};
|
|
118
|
+
</script>
|
|
@@ -46,12 +46,7 @@
|
|
|
46
46
|
<template #default="{ row }">
|
|
47
47
|
<ut-button status="primary" content="edit" @tap="onEdit(row)" />
|
|
48
48
|
<ut-button status="warning" content="delete" @tap="onDel(row)" />
|
|
49
|
-
<ut-button
|
|
50
|
-
status="success"
|
|
51
|
-
content="add"
|
|
52
|
-
:disabled="row.enabled !== '1'"
|
|
53
|
-
@tap="onChildren(row)"
|
|
54
|
-
/>
|
|
49
|
+
<ut-button status="success" content="add" :disabled="row.enabled !== '1'" @tap="onChildren(row)" />
|
|
55
50
|
</template>
|
|
56
51
|
</vxe-table-column>
|
|
57
52
|
</vxe-table>
|
|
@@ -110,6 +105,7 @@ const showModal = ref(false);
|
|
|
110
105
|
const subRecord = ref<IRecord>({});
|
|
111
106
|
const temp = ref<IRecord>({});
|
|
112
107
|
const modalType = ref('add');
|
|
108
|
+
|
|
113
109
|
const subItems = [
|
|
114
110
|
{ field: 'dictCode', title: 'message.udp.dictCode', required: true },
|
|
115
111
|
{ field: 'dictName', title: 'message.udp.dictName', required: true },
|
|
@@ -179,7 +175,11 @@ const onConfirm = async () => {
|
|
|
179
175
|
loading.value = false;
|
|
180
176
|
if (!err) {
|
|
181
177
|
console.log({ res });
|
|
182
|
-
|
|
178
|
+
if (modalType.value === 'edit') {
|
|
179
|
+
showModal.value = false;
|
|
180
|
+
} else {
|
|
181
|
+
subRecord.value = { enabled: '1' };
|
|
182
|
+
}
|
|
183
183
|
successMessage();
|
|
184
184
|
getDict();
|
|
185
185
|
}
|