Skip to content

Commit fb08357

Browse files
committed
Merge branch 'master' of https://gitee.com/yudaocode/yudao-ui-admin-vue3 into dev
# Conflicts: # src/views/ai/mindmap/index/components/Right.vue # src/views/ai/mindmap/index/index.vue
2 parents 485e3fa + 270f414 commit fb08357

File tree

32 files changed

+187
-129
lines changed

32 files changed

+187
-129
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ node_modules
22
.DS_Store
33
dist
44
dist-ssr
5-
*.local
65
/dist*
76
pnpm-debug
87
auto-*.d.ts

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "yudao-ui-admin-vue3",
3-
"version": "2.1.0-snapshot",
3+
"version": "2.2.0-snapshot",
44
"description": "基于vue3、vite4、element-plus、typesScript",
55
"author": "xingyu",
66
"private": false,

src/api/bpm/definition/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import request from '@/config/axios'
22

3-
export const getProcessDefinition = async (id: number, key: string) => {
3+
export const getProcessDefinition = async (id?: string, key?: string) => {
44
return await request.get({
55
url: '/bpm/process-definition/get',
66
params: { id, key }

src/api/bpm/model/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export type ProcessDefinitionVO = {
55
version: number
66
deploymentTIme: string
77
suspensionState: number
8+
formType?: number
89
}
910

1011
export type ModelVO = {

src/api/bpm/processInstance/index.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import request from '@/config/axios'
2+
import { ProcessDefinitionVO } from '@/api/bpm/model'
23

34
export type Task = {
45
id: string
@@ -18,17 +19,7 @@ export type ProcessInstanceVO = {
1819
businessKey: string
1920
createTime: string
2021
endTime: string
21-
}
22-
23-
export type ProcessInstanceCopyVO = {
24-
type: number
25-
taskName: string
26-
taskKey: string
27-
processInstanceName: string
28-
processInstanceKey: string
29-
startUserId: string
30-
options: string[]
31-
reason: string
22+
processDefinition?: ProcessDefinitionVO
3223
}
3324

3425
export const getProcessInstanceMyPage = async (params: any) => {

src/components/ConfigGlobal/src/ConfigGlobal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const currentLocale = computed(() => localeStore.currentLocale)
5454
<ElConfigProvider
5555
:namespace="variables.elNamespace"
5656
:locale="currentLocale.elLocale"
57-
:message="{ max: 1 }"
57+
:message="{ max: 5 }"
5858
:size="size"
5959
>
6060
<slot></slot>

src/components/DictTag/src/DictTag.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ export default defineComponent({
2222
const dictOptions = getDictOptions(dictType)
2323
dictOptions.forEach((dict: DictDataType) => {
2424
if (dict.value === value) {
25-
if (dict.colorType + '' === 'primary' || dict.colorType + '' === 'default') {
26-
dict.colorType = ''
25+
if (dict.colorType + '' === 'default') {
26+
dict.colorType = 'info'
2727
}
2828
dictData.value = dict
2929
}

src/components/DiyEditor/components/ComponentLibrary.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ const handleCloneComponent = (component: DiyComponent<any>) => {
9595
.editor-left {
9696
z-index: 1;
9797
flex-shrink: 0;
98+
user-select: none;
9899
box-shadow: 8px 0 8px -8px rgb(0 0 0 / 12%);
99100
100101
:deep(.el-collapse) {

src/components/Editor/src/Editor.vue

Lines changed: 49 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,13 @@ const editorConfig = computed((): IEditorConfig => {
9696
// 选择文件时的类型限制,默认为 ['image/*'] 。如不想限制,则设置为 []
9797
allowedFileTypes: ['image/*'],
9898
99-
// 自定义上传参数,例如传递验证的 token 等。参数会被添加到 formData 中,一起上传到服务端。
100-
meta: { updateSupport: 0 },
101-
// 将 meta 拼接到 url 参数中,默认 false
102-
metaWithUrl: true,
103-
10499
// 自定义增加 http header
105100
headers: {
106101
Accept: '*',
107102
Authorization: 'Bearer ' + getAccessToken(),
108103
'tenant-id': getTenantId()
109104
},
110105
111-
// 跨域是否传递 cookie ,默认为 false
112-
withCredentials: true,
113-
114106
// 超时时间,默认为 10 秒
115107
timeout: 5 * 1000, // 5 秒
116108
@@ -119,7 +111,7 @@ const editorConfig = computed((): IEditorConfig => {
119111
120112
// 上传之前触发
121113
onBeforeUpload(file: File) {
122-
console.log(file)
114+
// console.log(file)
123115
return file
124116
},
125117
// 上传进度的回调函数
@@ -142,6 +134,54 @@ const editorConfig = computed((): IEditorConfig => {
142134
customInsert(res: any, insertFn: InsertFnType) {
143135
insertFn(res.data, 'image', res.data)
144136
}
137+
},
138+
['uploadVideo']: {
139+
server: import.meta.env.VITE_UPLOAD_URL,
140+
// 单个文件的最大体积限制,默认为 10M
141+
maxFileSize: 10 * 1024 * 1024,
142+
// 最多可上传几个文件,默认为 100
143+
maxNumberOfFiles: 10,
144+
// 选择文件时的类型限制,默认为 ['video/*'] 。如不想限制,则设置为 []
145+
allowedFileTypes: ['video/*'],
146+
147+
// 自定义增加 http header
148+
headers: {
149+
Accept: '*',
150+
Authorization: 'Bearer ' + getAccessToken(),
151+
'tenant-id': getTenantId()
152+
},
153+
154+
// 超时时间,默认为 30 秒
155+
timeout: 15 * 1000, // 15 秒
156+
157+
// form-data fieldName,后端接口参数名称,默认值wangeditor-uploaded-image
158+
fieldName: 'file',
159+
160+
// 上传之前触发
161+
onBeforeUpload(file: File) {
162+
// console.log(file)
163+
return file
164+
},
165+
// 上传进度的回调函数
166+
onProgress(progress: number) {
167+
// progress 是 0-100 的数字
168+
console.log('progress', progress)
169+
},
170+
onSuccess(file: File, res: any) {
171+
console.log('onSuccess', file, res)
172+
},
173+
onFailed(file: File, res: any) {
174+
alert(res.message)
175+
console.log('onFailed', file, res)
176+
},
177+
onError(file: File, err: any, res: any) {
178+
alert(err.message)
179+
console.error('onError', file, err, res)
180+
},
181+
// 自定义插入图片
182+
customInsert(res: any, insertFn: InsertFnType) {
183+
insertFn(res.data, 'mp4', res.data)
184+
}
145185
}
146186
},
147187
uploadImgShowBase64: true

src/components/UploadFile/src/UploadFile.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
格式为 <b style="color: #f56c6c">{{ fileType.join('/') }}</b> 的文件
3333
</div>
3434
</template>
35+
<!-- TODO @puhui999:1)表单展示的时候,位置会偏掉,已发微信;2)disable 的时候,应该把【删除】按钮也隐藏掉? -->
3536
<template #file="row">
3637
<div class="flex items-center">
3738
<span>{{ row.file.name }}</span>

0 commit comments

Comments
 (0)