@utogether/udp-core 1.0.0 → 1.0.1
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/dist/{403-B1R-4vXw.js → 403-JWjatlxJ.js} +1 -1
- package/dist/{404-fXPl8csw.js → 404-BcdMJfPb.js} +1 -1
- package/dist/{500-eI5842YB.js → 500-bsa3F_cc.js} +1 -1
- package/dist/{AuthorityInfo-CfVH6PaB.js → AuthorityInfo-CqItgNs5.js} +1 -1
- package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-DbK-f8jH.js → AuthorityInfo.vue_vue_type_style_index_0_lang-32L40GY2.js} +1 -1
- package/dist/{Company-CYC9Avfz.js → Company-DVff9IA7.js} +3 -3
- package/dist/{CompanyPanel-B4MzoqN_.js → CompanyPanel-CNrdq4XE.js} +1 -1
- package/dist/{Department-B4BNSiYx.js → Department-CqcpfL4i.js} +3 -3
- package/dist/{DepartmentPanel-zJO89L2O.js → DepartmentPanel-Bvti4LGu.js} +1 -1
- package/dist/{DesignPanel-S8P0J97f.js → DesignPanel-CjykspE1.js} +1 -1
- package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-DW-_Vqrr.js → DesignPanel.vue_vue_type_style_index_0_lang-BK9EERdd.js} +2 -2
- package/dist/{DictView-bIS5-rK-.js → DictView-q7kR9K--.js} +9 -9
- package/dist/InvOrganization-DI45LqZV.js +260 -0
- package/dist/{Org-kXHSjsgJ.js → Org-CZju_ZiR.js} +1 -1
- package/dist/{Preview-CRyiwUIR.js → Preview-Cm_7RhYU.js} +1 -1
- package/dist/{ReportDefine-WZYIx8Sm.js → ReportDefine-CJVlQ--7.js} +1 -1
- package/dist/{ReportDesign-D-7GKgpb.js → ReportDesign-B0unlrkt.js} +2 -2
- package/dist/{ReportQuery-BIIJny6w.js → ReportQuery-BKuMCEvF.js} +2 -2
- package/dist/{ReportQueryFrom-OoUl7N2O.js → ReportQueryFrom-DAngMJLU.js} +1 -1
- package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-B878fgj8.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-CPpwmztJ.js} +1 -1
- package/dist/{ReportTemplate-Cfeq9US-.js → ReportTemplate-8YH3L8Pv.js} +1 -1
- package/dist/{Role-BwTV2QMH.js → Role-MxI30-0W.js} +3 -3
- package/dist/{RoleAssign-De1JjOun.js → RoleAssign-BzUY_y_y.js} +3 -3
- package/dist/{RolePanel-pUBXsqCM.js → RolePanel-CXdcvsR5.js} +1 -1
- package/dist/{RolePanel-E3RcdByM.js → RolePanel-DS_TErTn.js} +1 -1
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-CTIad9_Q.js → RolePanel.vue_vue_type_script_setup_true_lang-DJKu6PXz.js} +1 -1
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-B2pQwHb0.js → RolePanel.vue_vue_type_script_setup_true_lang-Ddl-A7Zh.js} +3 -3
- package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-vMR1fBi0.js → ScrollPanel.vue_vue_type_style_index_0_lang-DnchUgIF.js} +1 -1
- package/dist/{Staff-Czm7A8vI.js → Staff-D7tXo_Gn.js} +3 -3
- package/dist/StaffInfo-Bk8BY8PO.js +4 -0
- package/dist/{StaffInfo.vue_vue_type_style_index_0_lang-DMTL7KCh.js → StaffInfo.vue_vue_type_script_setup_true_lang-DqKwZi5f.js} +1 -1
- package/dist/{StaffPanel-CHk60LEz.js → StaffPanel-VtpGCTIq.js} +1 -1
- package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-iPKLb5wG.js → StaffPanel.vue_vue_type_script_setup_true_lang-C3Ixs12y.js} +46 -49
- package/dist/{SysUser-BGwbttRn.js → SysUser-D0Q6OvD7.js} +2 -2
- package/dist/{SysUserPanel-BCbKoLKt.js → SysUserPanel-1_vrsANQ.js} +1 -1
- package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-0QUjnhjF.js → SysUserPanel.vue_vue_type_script_setup_true_lang-C5XEmxsV.js} +1 -2
- package/dist/{SystemMenu-BkqZSDKl.js → SystemMenu-9PG3vESE.js} +2 -2
- package/dist/{UserInfo-BsyAcT2d.js → UserInfo-qgXUEGwi.js} +1 -1
- package/dist/{UserInfo.vue_vue_type_style_index_0_lang-D0-KDxAh.js → UserInfo.vue_vue_type_style_index_0_lang-CN0C5rVk.js} +1 -1
- package/dist/{childView-CyuLTUqC.js → childView-C7ZSA5fR.js} +1 -1
- package/dist/{childView-CF83nhxb.js → childView-yV2QLwfA.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-Cch4lE-i.js → childView.vue_vue_type_style_index_0_lang-DdKxPGdh.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-CNSgGda3.js → childView.vue_vue_type_style_index_0_lang-bkmucBUL.js} +1 -1
- package/dist/{code-rule-Bz-gnktN.js → code-rule-95K1jr-u.js} +1 -1
- package/dist/core.es.js +1 -1
- package/dist/core.umd.js +63 -63
- package/dist/{cron-task-CIifSUdW.js → cron-task-DGrQwOHs.js} +1 -1
- package/dist/{frameView-_d2mqjjQ.js → frameView-7SmME93D.js} +1 -1
- package/dist/index-OswH7SsT.js +9937 -0
- package/dist/{layoutView-DLKVepB8.js → layoutView-C6WIVWGZ.js} +2 -2
- package/dist/{login-LREiDfFU.js → login-BhCMeCLS.js} +4 -4
- package/dist/{lov-view-DDrIVILB.js → lov-view-DoF5LqFQ.js} +2 -2
- package/dist/{menuInfo-B1FUV-Sk.js → menuInfo-CNzGQwOD.js} +1 -1
- package/dist/{menuInfo.vue_vue_type_style_index_0_lang-Cnk3vdtD.js → menuInfo.vue_vue_type_style_index_0_lang-51SYxVc_.js} +1 -1
- package/dist/{pda-app-CRhVGijN.js → pda-app-nn3llDUx.js} +1 -1
- package/dist/{redirect-DiaNDu8F.js → redirect-CmMplDV4.js} +1 -1
- package/dist/{resource-BCwx9fEv.js → resource-gVFFMO9l.js} +1 -1
- package/dist/{su-welcome-189A7N4r.js → su-welcome-BN_s_RX_.js} +1 -1
- package/dist/{sys-config-BZ3sejow.js → sys-config-DGutV-VX.js} +1 -1
- package/dist/udp-core.css +2 -2
- package/dist/{utogether-r08LNiIZ.js → utogether-wFDCI28t.js} +1 -1
- package/package.json +2 -1
- package/src/components/udp/form-upload.vue +132 -0
- package/src/components/udp/index.ts +4 -0
- package/src/components/udp/modal-form.vue +180 -0
- package/src/components/udp/utils.ts +40 -0
- package/src/main.ts +5 -4
- package/src/plugins/vxe-table/index.ts +3 -3
- package/src/plugins/vxe-table/render.tsx +604 -184
- package/src/utils/udp/useRender.ts +420 -0
- package/src/views/organization/inv-org/InvOrganization.vue +2 -1
- package/src/views/organization/staff/StaffInfo.vue +0 -30
- package/src/views/organization/staff/StaffPanel.vue +4 -3
- package/src/views/system/role/AuthorityInfo.vue +1 -19
- package/src/views/system/sysUser/SysUserPanel.vue +1 -1
- package/src/views/udev/dict/DictView.vue +2 -2
- package/src/views/ulogin/login.vue +1 -1
- package/dist/InvOrganization-MuM2jtsG.js +0 -66
- package/dist/StaffInfo-DJzvBuxy.js +0 -4
- package/dist/index-BKIw8tSn.js +0 -9195
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed as W, ref as L } from "vue";
|
|
2
2
|
import { useGlobal as E, storageLocal as u, deviceDetection as H, cookies as C, storageSession as M } from "@utogether/utils";
|
|
3
|
-
import { C as P, m as g, s as j, g as h, x as d, D as J, n as K, o as R, p as V, d as S, r as G, q as O, E as x, G as Z } from "./index-
|
|
3
|
+
import { C as P, m as g, s as j, g as h, x as d, D as J, n as K, o as R, p as V, d as S, r as G, q as O, E as x, G as Z } from "./index-OswH7SsT.js";
|
|
4
4
|
import { useI18n as f } from "vue-i18n";
|
|
5
5
|
import { defineStore as v } from "pinia";
|
|
6
6
|
function I() {
|
package/package.json
CHANGED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2022-11-04 14:53:36
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2025-07-14 18:32:47
|
|
6
|
+
* @Description: form upload
|
|
7
|
+
-->
|
|
8
|
+
<template>
|
|
9
|
+
<div v-spinning="loading" class="ut-upload-wrapper">
|
|
10
|
+
<el-upload
|
|
11
|
+
v-model:file-list="fileList"
|
|
12
|
+
:action="baseUrl + '/ufil/file/uploadMultipart'"
|
|
13
|
+
list-type="picture-card"
|
|
14
|
+
:headers="headers"
|
|
15
|
+
:before-upload="beforeUpload"
|
|
16
|
+
:on-success="onSuccess"
|
|
17
|
+
:on-preview="onPreview"
|
|
18
|
+
:on-remove="handleRemove"
|
|
19
|
+
>
|
|
20
|
+
<template #default>
|
|
21
|
+
<i class="ri-add-line" />
|
|
22
|
+
</template>
|
|
23
|
+
</el-upload>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script lang="ts">
|
|
28
|
+
export default { name: 'FormUpload' };
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<script setup lang="ts">
|
|
32
|
+
import { ref, computed, getCurrentInstance } from 'vue';
|
|
33
|
+
import { cookies } from '@utogether/utils';
|
|
34
|
+
// import type { UploadProps } from "element-plus";
|
|
35
|
+
// import { loadEnv } from "@build/index";
|
|
36
|
+
|
|
37
|
+
// const { VITE_BASE_URL } = loadEnv();
|
|
38
|
+
|
|
39
|
+
export interface IProps {
|
|
40
|
+
record: object;
|
|
41
|
+
field: string;
|
|
42
|
+
limit?: number;
|
|
43
|
+
beforeUpload?: Function;
|
|
44
|
+
onSuccess?: Function;
|
|
45
|
+
onRemove?: Function;
|
|
46
|
+
}
|
|
47
|
+
const props = withDefaults(defineProps<IProps>(), {
|
|
48
|
+
record: () => {
|
|
49
|
+
return {};
|
|
50
|
+
},
|
|
51
|
+
field: '',
|
|
52
|
+
limit: 1
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const instance = getCurrentInstance()!;
|
|
56
|
+
const baseUrl = instance.appContext.config.globalProperties.$url;
|
|
57
|
+
|
|
58
|
+
const headers = computed(() => {
|
|
59
|
+
const kTOKENKEY = 'authorized-token';
|
|
60
|
+
const token = cookies.get(kTOKENKEY)!;
|
|
61
|
+
const data = JSON.parse(token);
|
|
62
|
+
const headers = {
|
|
63
|
+
Authorization: 'Bearer ' + data.accessToken
|
|
64
|
+
};
|
|
65
|
+
return headers;
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
const fileList = ref([]);
|
|
69
|
+
const loading = ref(false);
|
|
70
|
+
const display = ref('flex');
|
|
71
|
+
|
|
72
|
+
const beforeUpload = file => {
|
|
73
|
+
if (props.beforeUpload) {
|
|
74
|
+
return props.beforeUpload(file);
|
|
75
|
+
}
|
|
76
|
+
console.log(file);
|
|
77
|
+
loading.value = true;
|
|
78
|
+
return true;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const onSuccess = response => {
|
|
82
|
+
loading.value = false;
|
|
83
|
+
if (props.onSuccess) {
|
|
84
|
+
return props.onSuccess(response);
|
|
85
|
+
} else {
|
|
86
|
+
const field = props.field;
|
|
87
|
+
Object.assign(props.record, { [field]: response.data });
|
|
88
|
+
display.value = props.limit > fileList.value.length ? 'flex' : 'none';
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const handleRemove = (uploadFile, uploadFiles) => {
|
|
93
|
+
if (props.onRemove) {
|
|
94
|
+
return props.onRemove(uploadFile, fileList);
|
|
95
|
+
}
|
|
96
|
+
loading.value = false;
|
|
97
|
+
console.log(uploadFile, uploadFiles);
|
|
98
|
+
display.value = 'flex';
|
|
99
|
+
emit('remove', uploadFile, fileList);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const onPreview = () => {
|
|
103
|
+
console.log('....');
|
|
104
|
+
};
|
|
105
|
+
const emit = defineEmits<{
|
|
106
|
+
(e: 'remove', file: File, fileList: any): void;
|
|
107
|
+
}>();
|
|
108
|
+
</script>
|
|
109
|
+
|
|
110
|
+
<style lang="scss">
|
|
111
|
+
.ut-upload-wrapper {
|
|
112
|
+
.el-upload--picture-card {
|
|
113
|
+
display: v-bind(display);
|
|
114
|
+
width: 60px !important;
|
|
115
|
+
height: 60px !important;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.el-upload-list--picture-card .el-upload-list__item {
|
|
119
|
+
width: 60px !important;
|
|
120
|
+
height: 60px !important;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.el-upload-list--picture-card .el-progress {
|
|
124
|
+
width: 50px !important;
|
|
125
|
+
|
|
126
|
+
.el-progress-circle {
|
|
127
|
+
width: 50px !important;
|
|
128
|
+
height: 50px !important;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
</style>
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2021-11-29 21:02:43
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2025-07-14 17:38:19
|
|
6
|
+
* @Description: file content
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<div>
|
|
11
|
+
<vxe-modal
|
|
12
|
+
v-model="showModal"
|
|
13
|
+
:title="title"
|
|
14
|
+
:width="width"
|
|
15
|
+
:height="height"
|
|
16
|
+
:loading="loading"
|
|
17
|
+
:show-footer="dataStatus !== 'detail'"
|
|
18
|
+
v-bind="modalAttrs"
|
|
19
|
+
min-width="240"
|
|
20
|
+
min-height="300"
|
|
21
|
+
destroy-on-close
|
|
22
|
+
resize
|
|
23
|
+
@close="onClose"
|
|
24
|
+
>
|
|
25
|
+
<template #default>
|
|
26
|
+
<vxe-form
|
|
27
|
+
ref="xForm"
|
|
28
|
+
:data="record"
|
|
29
|
+
:items="formItems"
|
|
30
|
+
:rules="rules"
|
|
31
|
+
title-align="right"
|
|
32
|
+
:title-width="formAttrs.titleWidth || 90"
|
|
33
|
+
v-bind="formAttrs"
|
|
34
|
+
/>
|
|
35
|
+
</template>
|
|
36
|
+
<template #footer>
|
|
37
|
+
<ut-button status="warning" content="cancel" icon="ri-close-line" @tap="onClose" />
|
|
38
|
+
<ut-button status="u-cyan" content="confirm" icon="ri-save-3-line" @tap="onConfirm" />
|
|
39
|
+
</template>
|
|
40
|
+
</vxe-modal>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script lang="ts">
|
|
45
|
+
export default {
|
|
46
|
+
name: 'UtModalForm'
|
|
47
|
+
};
|
|
48
|
+
</script>
|
|
49
|
+
<script lang="ts" setup>
|
|
50
|
+
import { onBeforeMount, ref, computed, getCurrentInstance, useAttrs } from 'vue';
|
|
51
|
+
import { useI18n } from 'vue-i18n';
|
|
52
|
+
import { getAttrs, formatItems } from './utils';
|
|
53
|
+
import to from 'await-to-js';
|
|
54
|
+
import { formatRules, successMessage } from '@utogether/utils';
|
|
55
|
+
|
|
56
|
+
// import type { IRecord, IFormItemProps } from '../../types';
|
|
57
|
+
|
|
58
|
+
export interface IProps {
|
|
59
|
+
record: IRecord; // 数据对象
|
|
60
|
+
formAttrs?: IRecord;
|
|
61
|
+
modalAttrs?: IRecord;
|
|
62
|
+
items: Array<IFormItemProps>; // form item
|
|
63
|
+
url?: string; // 服务路径
|
|
64
|
+
method?: string; // 请求方式
|
|
65
|
+
title?: string; // 标题
|
|
66
|
+
dataStatus?: string; // 状态
|
|
67
|
+
width?: number;
|
|
68
|
+
height?: number;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const props = withDefaults(defineProps<IProps>(), {
|
|
72
|
+
record: (): IRecord => {
|
|
73
|
+
return {};
|
|
74
|
+
},
|
|
75
|
+
formAttrs: (): IRecord => {
|
|
76
|
+
return {};
|
|
77
|
+
},
|
|
78
|
+
items: () => [],
|
|
79
|
+
title: '数据记录',
|
|
80
|
+
width: 420,
|
|
81
|
+
height: 360,
|
|
82
|
+
dataStatus: 'detail',
|
|
83
|
+
url: '',
|
|
84
|
+
method: 'post'
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
const attrs: IRecord = getAttrs(useAttrs());
|
|
88
|
+
|
|
89
|
+
const loading = ref(false);
|
|
90
|
+
const instance = getCurrentInstance()!;
|
|
91
|
+
|
|
92
|
+
const serviceApi = instance.appContext.config.globalProperties.$serviceApi;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @description: 根据items 获取必填选
|
|
96
|
+
*/
|
|
97
|
+
const rules = computed(() => {
|
|
98
|
+
if (!props.items.length) return {};
|
|
99
|
+
return formatRules(props.items, t);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
const formItems = computed(() => {
|
|
103
|
+
if (!props.items.length) return props.items;
|
|
104
|
+
return formatItems(props.items, props.dataStatus);
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
const { t } = useI18n();
|
|
108
|
+
const showModal = ref(false);
|
|
109
|
+
|
|
110
|
+
const xForm = ref(null);
|
|
111
|
+
/**
|
|
112
|
+
* @description: 弹框确认
|
|
113
|
+
*/
|
|
114
|
+
const onConfirm = () => {
|
|
115
|
+
// @ts-ignore
|
|
116
|
+
xForm.value.validate(async (valid: boolean) => {
|
|
117
|
+
if (!valid) {
|
|
118
|
+
const { record, url, method } = props;
|
|
119
|
+
if (url) {
|
|
120
|
+
showLoading();
|
|
121
|
+
const body = attrs?.dataProcessMethod ? attrs?.dataProcessMethod(record) : record;
|
|
122
|
+
if (url) {
|
|
123
|
+
const [err, data] = await to(serviceApi[method](url, body));
|
|
124
|
+
if (!err) {
|
|
125
|
+
successMessage();
|
|
126
|
+
emit('confirm', data);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
hiddenLoading();
|
|
130
|
+
onClose();
|
|
131
|
+
} else {
|
|
132
|
+
emit('confirm');
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @description: 显示加载框
|
|
140
|
+
*/
|
|
141
|
+
const showLoading = () => {
|
|
142
|
+
loading.value = true;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* @description: 关闭加载框
|
|
147
|
+
*/
|
|
148
|
+
const hiddenLoading = () => {
|
|
149
|
+
loading.value = false;
|
|
150
|
+
};
|
|
151
|
+
const validateForm = (cb: Function) => {
|
|
152
|
+
// @ts-ignore
|
|
153
|
+
xForm.value.validate(cb);
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* @description: 关闭弹框
|
|
158
|
+
*/
|
|
159
|
+
const onClose = () => {
|
|
160
|
+
showModal.value = false;
|
|
161
|
+
emit('close');
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* @description: 打开弹框
|
|
165
|
+
*/
|
|
166
|
+
const openModal = () => {
|
|
167
|
+
showModal.value = true;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
const emit = defineEmits<{
|
|
171
|
+
(e: 'close'): void;
|
|
172
|
+
(e: 'confirm', record?: any): void;
|
|
173
|
+
}>();
|
|
174
|
+
|
|
175
|
+
defineExpose({ showLoading, hiddenLoading, openModal, validateForm });
|
|
176
|
+
|
|
177
|
+
onBeforeMount(() => {
|
|
178
|
+
openModal();
|
|
179
|
+
});
|
|
180
|
+
</script>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useRender } from '@utogether/utils';
|
|
2
|
+
|
|
3
|
+
export const getAttrs = attrs => {
|
|
4
|
+
const data = {};
|
|
5
|
+
Object.keys(attrs).forEach(key => {
|
|
6
|
+
const nKey = key.replace(/-(\w)/g, str => str.slice(1).toUpperCase());
|
|
7
|
+
data[nKey] = attrs[key];
|
|
8
|
+
});
|
|
9
|
+
return data;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const formatItems = (items, status, span = 24) => {
|
|
13
|
+
const renderHook = useRender();
|
|
14
|
+
|
|
15
|
+
if (!items.length) return items;
|
|
16
|
+
return items.map(item => {
|
|
17
|
+
item.title = item.title || `message.${item.field}`;
|
|
18
|
+
item.span = item.span || span;
|
|
19
|
+
let disabled = false;
|
|
20
|
+
if (status === 'detail') {
|
|
21
|
+
disabled = true;
|
|
22
|
+
item.placeholder = null;
|
|
23
|
+
} else {
|
|
24
|
+
disabled =
|
|
25
|
+
item.disabled === false ? item.disabled : item.disabled || item.itemRender?.props?.disabled;
|
|
26
|
+
}
|
|
27
|
+
let itemRender = {
|
|
28
|
+
name: 'VxeInput',
|
|
29
|
+
props: { disabled, placeholder: disabled ? '' : item.placeholder }
|
|
30
|
+
};
|
|
31
|
+
if (item.code && !item.itemRender) {
|
|
32
|
+
itemRender = renderHook.renderDict(item.code);
|
|
33
|
+
}
|
|
34
|
+
item.itemRender = item.itemRender || itemRender;
|
|
35
|
+
item.itemRender['props'] = Object.assign(item.itemRender.props || {}, {
|
|
36
|
+
disabled
|
|
37
|
+
});
|
|
38
|
+
return item;
|
|
39
|
+
});
|
|
40
|
+
};
|
package/src/main.ts
CHANGED
|
@@ -35,7 +35,8 @@ import VueViewer from 'v-viewer';
|
|
|
35
35
|
// UtButton,
|
|
36
36
|
// UGrid,
|
|
37
37
|
// UtDivider,
|
|
38
|
-
//
|
|
38
|
+
// UtModalForm2,
|
|
39
|
+
// FormUpload2
|
|
39
40
|
// UtForm,
|
|
40
41
|
// UtModalGrid,
|
|
41
42
|
// UtContent,
|
|
@@ -43,7 +44,7 @@ import VueViewer from 'v-viewer';
|
|
|
43
44
|
// UtIconSelect,
|
|
44
45
|
// UtCalendar
|
|
45
46
|
// uAttachment
|
|
46
|
-
// } from '
|
|
47
|
+
// } from './components/udp';
|
|
47
48
|
|
|
48
49
|
const app = createApp(App);
|
|
49
50
|
|
|
@@ -72,7 +73,6 @@ const setGlobalDirective = app => {
|
|
|
72
73
|
app.directive(key, (directives as { [key: string]: Directive })[key]);
|
|
73
74
|
});
|
|
74
75
|
};
|
|
75
|
-
console.log('ucore--process', process.env);
|
|
76
76
|
|
|
77
77
|
const init = ({ config, lang, views, env, tableConfig }) => {
|
|
78
78
|
app.use(router);
|
|
@@ -87,7 +87,8 @@ const init = ({ config, lang, views, env, tableConfig }) => {
|
|
|
87
87
|
app.component('FontIcon', FontIcon);
|
|
88
88
|
// app.component('uAttachment', uAttachment).component('UGrid', UGrid);
|
|
89
89
|
// .component('UtDivider', UtDivider)
|
|
90
|
-
//
|
|
90
|
+
// .component('UtModalForm2', UtModalForm2)
|
|
91
|
+
// .component('FormUpload2', FormUpload2);
|
|
91
92
|
// .component('UtForm', UtForm)
|
|
92
93
|
// .component('UtContent', UtContent)
|
|
93
94
|
// .component('UtIconSelect', UtIconSelect)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: levi7754 levi7754@163.com
|
|
3
3
|
* @Date: 2024-06-05 14:32:03
|
|
4
4
|
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2025-
|
|
5
|
+
* @LastEditTime: 2025-07-16 15:36:56
|
|
6
6
|
* @FilePath: /udp-front/packages/udp-core/src/plugins/vxe-table/index.ts
|
|
7
7
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
8
8
|
*/
|
|
@@ -10,8 +10,8 @@ import 'xe-utils';
|
|
|
10
10
|
import { merge } from 'xe-utils';
|
|
11
11
|
import { geti18n, transformI18n } from '../i18n/index';
|
|
12
12
|
// import { storageLocal } from '@utogether/utils';
|
|
13
|
-
import { VxetableRender } from '@utogether/utils';
|
|
14
|
-
|
|
13
|
+
// import { VxetableRender } from '@utogether/utils';
|
|
14
|
+
import { VxetableRender } from './render';
|
|
15
15
|
import { getServiceApi } from '../../api';
|
|
16
16
|
|
|
17
17
|
import VXETable, { VxeUI } from 'vxe-table';
|