@utogether/udp-core 1.0.1-beta.16 → 1.0.1-beta.17
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 -39
- package/dist/{403-RBzulrcG.js → 403-C3cfjZIT.js} +1 -1
- package/dist/{404-DX-dU_6C.js → 404-Bg3j7QIo.js} +1 -1
- package/dist/{500-BCTk0__d.js → 500-CMT7Zyy7.js} +1 -1
- package/dist/{AuthorityInfo-BADTOenq.js → AuthorityInfo-B1mvqs4x.js} +1 -1
- package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-Cv46yAx_.js → AuthorityInfo.vue_vue_type_style_index_0_lang-DwoW7QWO.js} +1 -1
- package/dist/{Company-B-61KrWd.js → Company-qTguidK8.js} +3 -3
- package/dist/{CompanyPanel-CawSrEff.js → CompanyPanel-BBC-o-k3.js} +8 -8
- package/dist/{Department-CrzJPtvP.js → Department-C3mKZOnK.js} +3 -3
- package/dist/{DepartmentPanel-DYuL8H-j.js → DepartmentPanel-CNdpOHBT.js} +3 -3
- package/dist/{DesignPanel-DEAv6V68.js → DesignPanel-D9jrRCoG.js} +1 -1
- package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-BsnXZ2td.js → DesignPanel.vue_vue_type_style_index_0_lang-A-Aj1Hl0.js} +2 -2
- package/dist/{DictView-BuO-2b-c.js → DictView-CgdVkSiP.js} +1 -1
- package/dist/{InvOrganization-CBgKBJAn.js → InvOrganization-RE7s3vBq.js} +1 -1
- package/dist/{Org-BaQw2r-o.js → Org-wXDGvTrS.js} +1 -1
- package/dist/{Preview-DvCrmKNk.js → Preview-Pvt1__BV.js} +1 -1
- package/dist/{ReportDefine-DyhWz0as.js → ReportDefine-xEQsgFyv.js} +1 -1
- package/dist/{ReportDesign-DgZ2f2zv.js → ReportDesign-jOSuEFH9.js} +2 -2
- package/dist/{ReportQuery-DTZYbCDi.js → ReportQuery-DxEmmGiN.js} +1 -1
- package/dist/{ReportQueryFrom-B-vtJegP.js → ReportQueryFrom-CFlxfS5M.js} +1 -1
- package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-D6izgxph.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-iHpiYz8f.js} +1 -1
- package/dist/{ReportTemplate-DA1ZqKGf.js → ReportTemplate-Dtz3aet7.js} +1 -1
- package/dist/{Role-mbqoav5t.js → Role-B_NsHIyE.js} +3 -3
- package/dist/{RoleAssign-ltEJIEcr.js → RoleAssign-C9wm4zq4.js} +8 -8
- package/dist/{RolePanel-u90v9eS0.js → RolePanel-BlHidBR0.js} +1 -1
- package/dist/{RolePanel-1g1a-G8D.js → RolePanel-DWM9mfNs.js} +1 -1
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-D9YxpGnt.js → RolePanel.vue_vue_type_script_setup_true_lang-Cn4RRzXm.js} +1 -1
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-LC4Egk-Q.js → RolePanel.vue_vue_type_script_setup_true_lang-DVQ9aqb1.js} +3 -3
- package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-DZ3W1epK.js → ScrollPanel.vue_vue_type_style_index_0_lang-CCm-_i8O.js} +1 -1
- package/dist/{Staff-CJ2GgCL3.js → Staff-BfDc61QS.js} +3 -3
- package/dist/{StaffInfo-3KkodDCK.js → StaffInfo-BaJFo4mg.js} +1 -1
- package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-CW-isIxJ.js → StaffInfo.vue_vue_type_script_setup_true_lang-Bwj4x1wu.js} +1 -1
- package/dist/{StaffPanel-DoXPSoY5.js → StaffPanel-B6I2ZS6A.js} +1 -1
- package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-DvhGnOMZ.js → StaffPanel.vue_vue_type_script_setup_true_lang-vbyS4w3V.js} +2 -2
- package/dist/{SysUser-BuIZhMPh.js → SysUser-B_r9LYc5.js} +2 -2
- package/dist/{SysUserPanel-t1GJcJGM.js → SysUserPanel-C4ajcHPV.js} +1 -1
- package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-CDDkFLlN.js → SysUserPanel.vue_vue_type_script_setup_true_lang-8Q0VvC9B.js} +43 -39
- package/dist/{SystemMenu-DuLEL6_l.js → SystemMenu-CyPG23uP.js} +2 -2
- package/dist/{UserInfo-WWby4lts.js → UserInfo-BkoGt4ib.js} +1 -1
- package/dist/{UserInfo.vue_vue_type_style_index_0_lang-B06ZSrJV.js → UserInfo.vue_vue_type_style_index_0_lang-DrzF1YYG.js} +1 -1
- package/dist/{childView-B0-EAoAi.js → childView-9vEO8ymO.js} +1 -1
- package/dist/{childView-IYY4L8VK.js → childView-Dh0NyiQe.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-CjF8nZuj.js → childView.vue_vue_type_style_index_0_lang-BOeoZuAK.js} +2 -2
- package/dist/{childView.vue_vue_type_style_index_0_lang-B56v6yK7.js → childView.vue_vue_type_style_index_0_lang-CMOjfXBX.js} +1 -1
- package/dist/{code-rule-DDLdi3pP.js → code-rule-C7jI_1gJ.js} +1 -1
- package/dist/core.es.js +1 -1
- package/dist/{cron-task-p3-AFN1w.js → cron-task-Dg9DJXvv.js} +1 -1
- package/dist/{frameView-B_WAZErD.js → frameView-CeR-_hjB.js} +1 -1
- package/dist/{index-24fnvUBy.js → index-Bb7gIEvu.js} +611 -569
- package/dist/{layoutView-CoEp2afn.js → layoutView-wsLHrEeX.js} +1340 -1337
- package/dist/{login-DP0oP70W.js → login-CluzzdqH.js} +2 -2
- package/dist/{lov-view-BDoZRK-v.js → lov-view-BvQCvwbW.js} +2 -2
- package/dist/{menuInfo-5Xls76qB.js → menuInfo-B8RLelIC.js} +1 -1
- package/dist/{menuInfo.vue_vue_type_style_index_0_lang-BfZczW9a.js → menuInfo.vue_vue_type_style_index_0_lang-DvkapEZr.js} +1 -1
- package/dist/{pda-app-DxGYn4G7.js → pda-app-D3LNmD9a.js} +2 -2
- package/dist/{resource-BnYWe_-Q.js → resource-D8JA_03-.js} +1 -1
- package/dist/{su-welcome-B2rNhhDH.js → su-welcome-BjxeEKSo.js} +1 -1
- package/dist/{sys-config-Bb4WkxZK.js → sys-config-sbeLk9bP.js} +1 -1
- package/dist/udp-core.css +1 -9
- package/index.ts +48 -48
- package/package.json +1 -1
- package/src/App.vue +65 -65
- package/src/components/SuCharts/src/UserInfo.vue +78 -78
- package/src/components/SuScrollTree/ScrollPanel.vue +170 -175
- package/src/components/udp/{grid.vue → grid/index.vue} +27 -24
- package/src/components/udp/index.ts +2 -9
- package/src/components/udp/utils.ts +60 -107
- package/src/layout/components/lay-navbar/index.vue +239 -239
- 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-select-org/index.vue +64 -64
- package/src/layout/components/lay-sidebar/horizontal.vue +190 -190
- package/src/layout/components/lay-sidebar/mixNav.vue +260 -260
- package/src/layout/components/lay-sidebar/sidebar-logo.vue +92 -92
- package/src/layout/components/lay-tag/index.vue +20 -48
- package/src/layout/hooks/useNav.ts +173 -173
- package/src/layout/hooks/useTag.ts +5 -3
- package/src/layout/types.ts +3 -2
- package/src/main.ts +9 -6
- package/src/plugins/i18n/en.ts +302 -302
- package/src/plugins/i18n/zh.ts +356 -354
- package/src/plugins/vxe-table/index.ts +116 -53
- package/src/plugins/vxe-table/render.tsx +956 -956
- package/src/router/index.ts +186 -177
- package/src/router/modules/remaining.ts +58 -58
- package/src/router/utils.ts +393 -377
- package/src/store/modules/app.ts +1 -3
- package/src/store/modules/multiTags.ts +110 -109
- package/src/store/modules/permission.ts +113 -100
- package/src/style/button.scss +85 -85
- package/src/style/login.css +336 -336
- package/src/style/vxetable.scss +13 -3
- package/src/views/organization/company/CompanyPanel.vue +259 -259
- package/src/views/organization/department/DepartmentPanel.vue +269 -283
- package/src/views/system/menu/SystemMenu.vue +183 -183
- package/src/views/system/menu/menuInfo.vue +363 -363
- package/src/views/system/role/UserInfo.vue +195 -195
- package/src/views/system/role-assign/RoleAssign.vue +57 -57
- package/src/views/system/role-assign/RolePanel.vue +139 -139
- package/src/views/system/sys/sys-config.vue +336 -336
- package/src/views/system/sysUser/SysUserPanel.vue +279 -278
- package/src/views/uapp/pda/pda-app.vue +208 -208
- package/src/views/udev/dict/DictView.vue +118 -118
- package/src/views/udev/dict/childView.vue +1 -1
- package/src/views/udev/lov/lov-view.vue +91 -91
- package/src/views/ulogin/login.vue +323 -323
- package/src/views/upms/interface/log-out.vue +101 -101
- package/src/views/urpt/design/DesignPanel.vue +507 -507
- package/types/global.d.ts +230 -230
- package/src/components/udp/count-down.vue +0 -536
- package/src/components/udp/flip-down/FlipCard/flip-card.vue +0 -251
- package/src/components/udp/flip-down/FlipCard/interfaces.ts +0 -4
- package/src/components/udp/flip-down/FlipClock/flip-clock.vue +0 -113
- package/src/components/udp/form-upload.vue +0 -482
- package/src/components/udp/form.vue +0 -112
- package/src/components/udp/lov.vue +0 -388
- package/src/components/udp/modal-form.vue +0 -190
- package/src/components/udp/modal-grid.vue +0 -298
- package/src/components/udp/upload.vue +0 -423
- package/src/utils/udp/http/index.ts +0 -294
- package/src/utils/udp/http/types.d.ts +0 -49
- package/src/utils/udp/useRender.ts +0 -431
|
@@ -1,175 +1,170 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="u-scroll-panel" @click.prevent="handleClickPanel">
|
|
3
|
-
<div class="u-panel-header">
|
|
4
|
-
<h2>{{ title }}</h2>
|
|
5
|
-
<ut-button v-if="showAllButton" content="BtnExpand" @click="handleExpand(data, true)" />
|
|
6
|
-
<ut-button
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
|
|
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
|
-
|
|
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
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.u-panel
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
// height: 100% !important;
|
|
172
|
-
// }
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="u-scroll-panel" @click.prevent="handleClickPanel">
|
|
3
|
+
<div class="u-panel-header">
|
|
4
|
+
<h2>{{ title }}</h2>
|
|
5
|
+
<ut-button v-if="showAllButton" content="BtnExpand" @click="handleExpand(data, true)" />
|
|
6
|
+
<ut-button v-if="showAllButton" status="warning" content="BtnCollapse" @click="handleExpand(data, false)" />
|
|
7
|
+
<vxe-button icon="vxe-icon-refresh" @click="onRefresh" />
|
|
8
|
+
</div>
|
|
9
|
+
<div class="u-panel-content system-scrollbar">
|
|
10
|
+
<el-tree
|
|
11
|
+
ref="tree"
|
|
12
|
+
:data="data"
|
|
13
|
+
:props="treeOtions"
|
|
14
|
+
:expand-on-click-node="false"
|
|
15
|
+
style="background-color: #fff"
|
|
16
|
+
class="u-tree-panel"
|
|
17
|
+
node-key="id"
|
|
18
|
+
highlight-current
|
|
19
|
+
@node-click="handleNodeClick"
|
|
20
|
+
>
|
|
21
|
+
<template #default="{ node }">
|
|
22
|
+
<span class="prefix" :class="{ 'is-leaf': node.isLeaf }">
|
|
23
|
+
<i class="ri-folder-2-fill ri-lg mr-1" style="color: #fadb14" />
|
|
24
|
+
</span>
|
|
25
|
+
<span>{{ node.label }}</span>
|
|
26
|
+
</template>
|
|
27
|
+
</el-tree>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script lang="ts" setup>
|
|
33
|
+
import { getServiceApi } from '../../api';
|
|
34
|
+
import type { Ref } from 'vue';
|
|
35
|
+
import { ref, inject, watch, nextTick } from 'vue';
|
|
36
|
+
|
|
37
|
+
interface IProps {
|
|
38
|
+
title: string;
|
|
39
|
+
url: string;
|
|
40
|
+
showAllButton?: boolean;
|
|
41
|
+
treeOtions: Object;
|
|
42
|
+
defaultParams?: Object;
|
|
43
|
+
}
|
|
44
|
+
const props = withDefaults(defineProps<IProps>(), {
|
|
45
|
+
treeOtions: () => {
|
|
46
|
+
return {
|
|
47
|
+
children: 'children',
|
|
48
|
+
label: 'label'
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
defaultParams: () => {
|
|
52
|
+
return {};
|
|
53
|
+
},
|
|
54
|
+
showAllButton: false
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const data = ref<any>([]);
|
|
58
|
+
const tree: Ref<any | null> = ref(null);
|
|
59
|
+
// 当前激活item
|
|
60
|
+
const active: IRecord = inject('active');
|
|
61
|
+
// tree面板变更
|
|
62
|
+
const scrollPanelChange: IRecord = inject('scrollPanelChange');
|
|
63
|
+
// tree 列表
|
|
64
|
+
const treeList: IRecord = inject('treeList');
|
|
65
|
+
|
|
66
|
+
watch(
|
|
67
|
+
() => scrollPanelChange.value,
|
|
68
|
+
() => {
|
|
69
|
+
scrollPanelChange.value && getDataList();
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
const getDataList = async (params = {}) => {
|
|
74
|
+
const query = Object.assign(params, props.defaultParams);
|
|
75
|
+
const serverData = (await getServiceApi().get(props.url, query)) as IResponseData;
|
|
76
|
+
data.value = serverData.list || serverData;
|
|
77
|
+
treeList.value = serverData.list || serverData;
|
|
78
|
+
active.value = serverData.list ? serverData.list[0] : serverData[0];
|
|
79
|
+
nextTick(() => {
|
|
80
|
+
tree.value && tree?.value.setCurrentKey(active.value?.id || '');
|
|
81
|
+
});
|
|
82
|
+
scrollPanelChange.value = false;
|
|
83
|
+
};
|
|
84
|
+
const handleNodeClick = (row: any) => {
|
|
85
|
+
active.value = row;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const handleClickPanel = () => {
|
|
89
|
+
active.value = {};
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const handleExpand = (array, expanded) => {
|
|
93
|
+
array.forEach(el => {
|
|
94
|
+
tree.value.store.nodesMap[el.id].expanded = expanded;
|
|
95
|
+
if (el.children?.length) {
|
|
96
|
+
handleExpand(el.children, expanded);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
console.log('[ tree.value ] >', tree.value);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const onRefresh = () => {
|
|
103
|
+
getDataList();
|
|
104
|
+
};
|
|
105
|
+
defineExpose({
|
|
106
|
+
onRefresh
|
|
107
|
+
});
|
|
108
|
+
getDataList();
|
|
109
|
+
</script>
|
|
110
|
+
|
|
111
|
+
<style lang="scss">
|
|
112
|
+
.u-scroll-panel {
|
|
113
|
+
display: flex;
|
|
114
|
+
flex-direction: column;
|
|
115
|
+
width: 100%;
|
|
116
|
+
height: 100%;
|
|
117
|
+
background: #fff;
|
|
118
|
+
|
|
119
|
+
.u-panel-header {
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
padding: 10px;
|
|
123
|
+
border-bottom: 1px solid #eee;
|
|
124
|
+
|
|
125
|
+
h2 {
|
|
126
|
+
// display: box;
|
|
127
|
+
height: 30px;
|
|
128
|
+
padding: 0;
|
|
129
|
+
margin: 0;
|
|
130
|
+
margin-right: 20px;
|
|
131
|
+
overflow: hidden;
|
|
132
|
+
-webkit-line-clamp: 1;
|
|
133
|
+
font-size: 14px;
|
|
134
|
+
line-height: 30px;
|
|
135
|
+
-webkit-box-orient: vertical;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.el-input {
|
|
139
|
+
flex: 1;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.u-panel-content {
|
|
144
|
+
flex: 1;
|
|
145
|
+
overflow: auto;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.u-tree-panel {
|
|
149
|
+
height: 100%; // 0630
|
|
150
|
+
:deep(.el-tree-node__content) {
|
|
151
|
+
height: 36px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
:deep(.el-tree-node.is-current > .el-tree-node__content) {
|
|
155
|
+
background-color: rgb(64 158 255 / 40%);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
:deep(.el-tree-node > .el-tree-node__content) {
|
|
159
|
+
transition: 0.2s;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.el-vl__window {
|
|
164
|
+
height: 360px !important;
|
|
165
|
+
// &:first-child {
|
|
166
|
+
// height: 100% !important;
|
|
167
|
+
// }
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
</style>
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* @Author: wei.li
|
|
3
3
|
* @Date: 2021-11-17 16:33:37
|
|
4
4
|
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2025-
|
|
5
|
+
* @LastEditTime: 2025-10-18 15:18:16
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
8
|
<template>
|
|
9
|
-
<div style="width: 100%">
|
|
9
|
+
<div style="width: 100%; height: 100%">
|
|
10
10
|
<vxe-grid
|
|
11
11
|
ref="xgrid"
|
|
12
12
|
v-bind="data"
|
|
@@ -46,9 +46,8 @@ import {
|
|
|
46
46
|
defaultColums,
|
|
47
47
|
onCheckMethod,
|
|
48
48
|
getAttrs
|
|
49
|
-
} from '
|
|
49
|
+
} from '../utils';
|
|
50
50
|
// import SearchScheme from '../components/SuSearch.vue';
|
|
51
|
-
// import type { IRecord, IFormItemProps, ITableColProps } from '../../types';
|
|
52
51
|
|
|
53
52
|
defineOptions({
|
|
54
53
|
name: 'UtGrid'
|
|
@@ -142,7 +141,7 @@ const getColumns = () => {
|
|
|
142
141
|
}
|
|
143
142
|
const act_columns = attrs.gridId ? formatColums(columns) : columns;
|
|
144
143
|
|
|
145
|
-
return i18nColums(act_columns);
|
|
144
|
+
return i18nColums(act_columns, attrs.sortable);
|
|
146
145
|
};
|
|
147
146
|
|
|
148
147
|
dbstorage.getItem(kSTORECOLUM).then(value => {
|
|
@@ -159,7 +158,7 @@ const data = reactive<VxeGridProps>({
|
|
|
159
158
|
columnConfig: { useKey: true },
|
|
160
159
|
toolbarConfig: { enabled: false },
|
|
161
160
|
sortConfig: { multiple: true, trigger: 'cell' },
|
|
162
|
-
height: $mode ? undefined : window.innerHeight -
|
|
161
|
+
height: $mode ? undefined : window.innerHeight - 92,
|
|
163
162
|
|
|
164
163
|
checkboxConfig: {
|
|
165
164
|
checkMethod: ({ row }) => onCheckMethod(row, props),
|
|
@@ -170,19 +169,20 @@ const data = reactive<VxeGridProps>({
|
|
|
170
169
|
proxyConfig: {
|
|
171
170
|
form: true, // 查询是需要启用表单代理
|
|
172
171
|
autoLoad: props.autoLoad,
|
|
172
|
+
showResponseMsgvxe: false,
|
|
173
|
+
showActionMsgvxe: false,
|
|
173
174
|
// 接收 Promise
|
|
174
175
|
ajax: {
|
|
175
176
|
queryAll: ({ form }) => queryAll(props, serviceApi, form),
|
|
176
177
|
query: ({ page, form }) => query(props, form, page, serviceApi, $mode),
|
|
177
178
|
delete: ({ body: { removeRecords } }) => del(serviceApi, removeRecords, props),
|
|
178
179
|
save: ({ body }) => Promise.all(save(serviceApi, body, props)),
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
saveError: response => callback('saveError', response)
|
|
180
|
+
querySuccess: ({ response }) => callback('querySuccess', response),
|
|
181
|
+
queryError: ({ response }) => callback('queryError', response),
|
|
182
|
+
deleteSuccess: ({ response }) => callback('deleteSuccess', response),
|
|
183
|
+
deleteError: ({ response }) => callback('deleteError', response),
|
|
184
|
+
saveSuccess: ({ response }) => callback('saveSuccess', response),
|
|
185
|
+
saveError: ({ response }) => callback('saveError', response)
|
|
186
186
|
}
|
|
187
187
|
},
|
|
188
188
|
columns: !attrs.gridId ? getColumns() : [],
|
|
@@ -389,11 +389,15 @@ const columnDrop = () => {
|
|
|
389
389
|
* @description 常用查询面板确认查询
|
|
390
390
|
* @param data 常用查询条件
|
|
391
391
|
*/
|
|
392
|
-
const onSearch = data => {
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
392
|
+
// const onSearch = data => {
|
|
393
|
+
// showModal.value = false;
|
|
394
|
+
// const { form } = xgrid.value.getProxyInfo();
|
|
395
|
+
// Object.assign(form, data);
|
|
396
|
+
// refreshData();
|
|
397
|
+
// };
|
|
398
|
+
|
|
399
|
+
const reloadGrid = () => {
|
|
400
|
+
setGridConfig();
|
|
397
401
|
};
|
|
398
402
|
|
|
399
403
|
/**
|
|
@@ -406,7 +410,8 @@ defineExpose({
|
|
|
406
410
|
refreshColumn,
|
|
407
411
|
getInstance,
|
|
408
412
|
showLoading,
|
|
409
|
-
hiddenLoading
|
|
413
|
+
hiddenLoading,
|
|
414
|
+
reloadGrid
|
|
410
415
|
});
|
|
411
416
|
|
|
412
417
|
const toolbarButtonClick = ({ code }) => {
|
|
@@ -428,13 +433,11 @@ const editEctivated = e => {
|
|
|
428
433
|
const addResizeListener = () => {
|
|
429
434
|
window.onresize = () => {
|
|
430
435
|
return (() => {
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
if (attrs?.mode === 'form' && !attrs?.height) {
|
|
436
|
+
let height = attrs?.height || window.innerHeight - 90;
|
|
437
|
+
if (attrs.mode !== 'inline' && !attrs?.height) {
|
|
434
438
|
height = window.innerHeight - 180;
|
|
435
439
|
}
|
|
436
440
|
data.height = height < 240 ? 240 : height;
|
|
437
|
-
console.log(data.height);
|
|
438
441
|
})();
|
|
439
442
|
};
|
|
440
443
|
};
|
|
@@ -446,7 +449,6 @@ nextTick(() => {
|
|
|
446
449
|
columnDrop();
|
|
447
450
|
}, 500);
|
|
448
451
|
});
|
|
449
|
-
|
|
450
452
|
/**
|
|
451
453
|
* @description Vue实例卸载
|
|
452
454
|
*/
|
|
@@ -488,6 +490,7 @@ const emit = defineEmits<{
|
|
|
488
490
|
}
|
|
489
491
|
}
|
|
490
492
|
}
|
|
493
|
+
|
|
491
494
|
.vxe-grid--layout-body-content-wrapper {
|
|
492
495
|
overflow: hidden;
|
|
493
496
|
}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import FormUpload2 from './form-upload.vue';
|
|
3
|
-
import utLov2 from './lov.vue';
|
|
4
|
-
import UtModalGrid2 from './modal-grid.vue';
|
|
5
|
-
import UtGrid2 from './grid.vue';
|
|
6
|
-
import UtForm2 from './form.vue';
|
|
7
|
-
import UtUpload2 from './upload.vue';
|
|
8
|
-
// import UtCountdown2 from './flip-down/FlipClock/flip-clock.vue';
|
|
1
|
+
import UtGrid2 from './grid/index.vue';
|
|
9
2
|
|
|
10
|
-
export { UtGrid2
|
|
3
|
+
export { UtGrid2 };
|