Skip to content

Commit 13706de

Browse files
committed
Merge branch 'master' of https://gitee.com/yudaocode/yudao-ui-admin-vue3 into dev
2 parents d10a3af + 5ef5ee6 commit 13706de

File tree

84 files changed

+8490
-3064
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+8490
-3064
lines changed

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "yudao-ui-admin-vue3",
3-
"version": "2.2.0-snapshot",
3+
"version": "2.3.0-snapshot",
44
"description": "基于vue3、vite4、element-plus、typesScript",
55
"author": "xingyu",
66
"private": false,
@@ -9,11 +9,11 @@
99
"dev": "vite --mode env.local",
1010
"dev-server": "vite --mode dev",
1111
"ts:check": "vue-tsc --noEmit",
12-
"build:local": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build",
13-
"build:dev": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode dev",
14-
"build:test": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode test",
15-
"build:stage": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode stage",
16-
"build:prod": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode prod",
12+
"build:local": "node ./node_modules/vite/bin/vite.js build",
13+
"build:dev": "node ./node_modules/vite/bin/vite.js build --mode dev",
14+
"build:test": "node ./node_modules/vite/bin/vite.js build --mode test",
15+
"build:stage": "node ./node_modules/vite/bin/vite.js build --mode stage",
16+
"build:prod": "node ./node_modules/vite/bin/vite.js build --mode prod",
1717
"serve:dev": "vite preview --mode dev",
1818
"serve:prod": "vite preview --mode prod",
1919
"preview": "pnpm build:local && vite preview",
@@ -26,8 +26,8 @@
2626
},
2727
"dependencies": {
2828
"@element-plus/icons-vue": "^2.1.0",
29-
"@form-create/designer": "^3.1.3",
30-
"@form-create/element-ui": "^3.1.24",
29+
"@form-create/designer": "^3.2.6",
30+
"@form-create/element-ui": "^3.2.11",
3131
"@iconify/iconify": "^3.1.1",
3232
"@microsoft/fetch-event-source": "^2.0.1",
3333
"@videojs-player/vue": "^1.0.0",
@@ -47,7 +47,7 @@
4747
"driver.js": "^1.3.1",
4848
"echarts": "^5.5.0",
4949
"echarts-wordcloud": "^2.1.0",
50-
"element-plus": "2.8.0",
50+
"element-plus": "2.8.4",
5151
"fast-xml-parser": "^4.3.2",
5252
"highlight.js": "^11.9.0",
5353
"jsencrypt": "^3.3.2",
@@ -67,7 +67,7 @@
6767
"steady-xml": "^0.1.0",
6868
"url": "^0.11.3",
6969
"video.js": "^7.21.5",
70-
"vue": "3.4.21",
70+
"vue": "3.5.12",
7171
"vue-dompurify-html": "^4.1.4",
7272
"vue-i18n": "9.10.2",
7373
"vue-router": "^4.3.0",
@@ -130,7 +130,7 @@
130130
"vite-plugin-progress": "^0.0.7",
131131
"vite-plugin-purge-icons": "^0.10.0",
132132
"vite-plugin-svg-icons": "^2.0.1",
133-
"vite-plugin-top-level-await": "^1.3.1",
133+
"vite-plugin-top-level-await": "^1.4.4",
134134
"vue-eslint-parser": "^9.3.2",
135135
"vue-tsc": "^1.8.27"
136136
},

pnpm-lock.yaml

Lines changed: 402 additions & 326 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/api/bpm/model/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,18 @@ export const getModelPage = async (params) => {
3030
return await request.get({ url: '/bpm/model/page', params })
3131
}
3232

33-
export const getModel = async (id: number) => {
33+
export const getModel = async (id: string) => {
3434
return await request.get({ url: '/bpm/model/get?id=' + id })
3535
}
3636

3737
export const updateModel = async (data: ModelVO) => {
3838
return await request.put({ url: '/bpm/model/update', data: data })
3939
}
4040

41+
export const updateModelBpmn = async (data: ModelVO) => {
42+
return await request.put({ url: '/bpm/model/update-bpmn', data: data })
43+
}
44+
4145
// 任务状态修改
4246
export const updateModelState = async (id: number, state: number) => {
4347
const data = {

src/api/bpm/processInstance/index.ts

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import request from '@/config/axios'
22
import { ProcessDefinitionVO } from '@/api/bpm/model'
3-
3+
import { NodeType } from '@/components/SimpleProcessDesignerV2/src/consts'
44
export type Task = {
55
id: string
66
name: string
@@ -22,6 +22,35 @@ export type ProcessInstanceVO = {
2222
processDefinition?: ProcessDefinitionVO
2323
}
2424

25+
// 用户信息
26+
export type User = {
27+
id: number,
28+
nickname: string,
29+
avatar: string
30+
}
31+
32+
// 审批任务信息
33+
export type ApprovalTaskInfo = {
34+
id: number,
35+
ownerUser: User,
36+
assigneeUser: User,
37+
status: number,
38+
reason: string
39+
40+
}
41+
42+
// 审批节点信息
43+
export type ApprovalNodeInfo = {
44+
id : number
45+
name: string
46+
nodeType: NodeType
47+
status: number
48+
startTime?: Date
49+
endTime?: Date
50+
candidateUserList?: User[]
51+
tasks: ApprovalTaskInfo[]
52+
}
53+
2554
export const getProcessInstanceMyPage = async (params: any) => {
2655
return await request.get({ url: '/bpm/process-instance/my-page', params })
2756
}
@@ -57,3 +86,14 @@ export const getProcessInstance = async (id: string) => {
5786
export const getProcessInstanceCopyPage = async (params: any) => {
5887
return await request.get({ url: '/bpm/process-instance/copy/page', params })
5988
}
89+
90+
// 获取审批详情
91+
export const getApprovalDetail = async (processInstanceId?:string, processDefinitionId?:string) => {
92+
const param = processInstanceId ? '?processInstanceId='+ processInstanceId : '?processDefinitionId='+ processDefinitionId
93+
return await request.get({ url: 'bpm/process-instance/get-approval-detail'+ param })
94+
}
95+
96+
// 获取表单字段权限
97+
export const getFormFieldsPermission = async (params: any) => {
98+
return await request.get({ url: '/bpm/process-instance/get-form-fields-permission', params })
99+
}

src/api/bpm/simple/index.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import request from '@/config/axios'
2+
3+
4+
export const updateBpmSimpleModel = async (data) => {
5+
return await request.post({
6+
url: '/bpm/model/simple/update',
7+
data: data
8+
})
9+
}
10+
11+
export const getBpmSimpleModel = async (id) => {
12+
return await request.get({
13+
url: '/bpm/model/simple/get?id=' + id
14+
})
15+
}

src/api/bpm/task/index.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,51 @@
11
import request from '@/config/axios'
22

3+
/**
4+
* 任务状态枚举
5+
*/
6+
export enum TaskStatusEnum {
7+
/**
8+
* 未开始
9+
*/
10+
NOT_START = -1,
11+
12+
/**
13+
* 待审批
14+
*/
15+
WAIT = 0,
16+
/**
17+
* 审批中
18+
*/
19+
RUNNING = 1,
20+
/**
21+
* 审批通过
22+
*/
23+
APPROVE = 2,
24+
25+
/**
26+
* 审批不通过
27+
*/
28+
REJECT = 3,
29+
30+
/**
31+
* 已取消
32+
*/
33+
CANCEL = 4,
34+
/**
35+
* 已退回
36+
*/
37+
RETURN = 5,
38+
/**
39+
* 委派中
40+
*/
41+
DELEGATE = 6,
42+
/**
43+
* 审批通过中
44+
*/
45+
APPROVING = 7,
46+
47+
}
48+
349
export type TaskVO = {
450
id: number
551
}

src/api/iot/device/index.ts

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
import request from '@/config/axios'
2+
3+
// IoT 设备 VO
4+
export interface DeviceVO {
5+
id: number // 设备 ID,主键,自增
6+
deviceKey: string // 设备唯一标识符
7+
deviceName: string // 设备名称
8+
productId: number // 产品编号
9+
productKey: string // 产品标识
10+
deviceType: number // 设备类型
11+
nickname: string // 设备备注名称
12+
gatewayId: number // 网关设备 ID
13+
status: number // 设备状态
14+
statusLastUpdateTime: Date // 设备状态最后更新时间
15+
lastOnlineTime: Date // 最后上线时间
16+
lastOfflineTime: Date // 最后离线时间
17+
activeTime: Date // 设备激活时间
18+
createTime: Date // 创建时间
19+
ip: string // 设备的 IP 地址
20+
firmwareVersion: string // 设备的固件版本
21+
deviceSecret: string // 设备密钥,用于设备认证,需安全存储
22+
mqttClientId: string // MQTT 客户端 ID
23+
mqttUsername: string // MQTT 用户名
24+
mqttPassword: string // MQTT 密码
25+
authType: string // 认证类型
26+
latitude: number // 设备位置的纬度
27+
longitude: number // 设备位置的经度
28+
areaId: number // 地区编码
29+
address: string // 设备详细地址
30+
serialNumber: string // 设备序列号
31+
}
32+
33+
export interface DeviceUpdateStatusVO {
34+
id: number // 设备 ID,主键,自增
35+
status: number // 设备状态
36+
}
37+
38+
// 设备 API
39+
export const DeviceApi = {
40+
// 查询设备分页
41+
getDevicePage: async (params: any) => {
42+
return await request.get({ url: `/iot/device/page`, params })
43+
},
44+
45+
// 查询设备详情
46+
getDevice: async (id: number) => {
47+
return await request.get({ url: `/iot/device/get?id=` + id })
48+
},
49+
50+
// 新增设备
51+
createDevice: async (data: DeviceVO) => {
52+
return await request.post({ url: `/iot/device/create`, data })
53+
},
54+
55+
// 修改设备
56+
updateDevice: async (data: DeviceVO) => {
57+
return await request.put({ url: `/iot/device/update`, data })
58+
},
59+
60+
// 修改设备状态
61+
updateDeviceStatus: async (data: DeviceUpdateStatusVO) => {
62+
return await request.put({ url: `/iot/device/update-status`, data })
63+
},
64+
65+
// 删除设备
66+
deleteDevice: async (id: number) => {
67+
return await request.delete({ url: `/iot/device/delete?id=` + id })
68+
},
69+
70+
// 获取设备数量
71+
getDeviceCount: async (productId: number) => {
72+
return await request.get({ url: `/iot/device/count?productId=` + productId })
73+
}
74+
}

src/api/iot/product/index.ts

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import request from '@/config/axios'
2+
3+
// IoT 产品 VO
4+
export interface ProductVO {
5+
id: number // 产品编号
6+
name: string // 产品名称
7+
productKey: string // 产品标识
8+
protocolId: number // 协议编号
9+
categoryId: number // 产品所属品类标识符
10+
description: string // 产品描述
11+
validateType: number // 数据校验级别
12+
status: number // 产品状态
13+
deviceType: number // 设备类型
14+
netType: number // 联网方式
15+
protocolType: number // 接入网关协议
16+
dataFormat: number // 数据格式
17+
deviceCount: number // 设备数量
18+
createTime: Date // 创建时间
19+
}
20+
21+
// IoT 产品 API
22+
export const ProductApi = {
23+
// 查询产品分页
24+
getProductPage: async (params: any) => {
25+
return await request.get({ url: `/iot/product/page`, params })
26+
},
27+
28+
// 查询产品详情
29+
getProduct: async (id: number) => {
30+
return await request.get({ url: `/iot/product/get?id=` + id })
31+
},
32+
33+
// 新增产品
34+
createProduct: async (data: ProductVO) => {
35+
return await request.post({ url: `/iot/product/create`, data })
36+
},
37+
38+
// 修改产品
39+
updateProduct: async (data: ProductVO) => {
40+
return await request.put({ url: `/iot/product/update`, data })
41+
},
42+
43+
// 删除产品
44+
deleteProduct: async (id: number) => {
45+
return await request.delete({ url: `/iot/product/delete?id=` + id })
46+
},
47+
48+
// 导出产品 Excel
49+
exportProduct: async (params) => {
50+
return await request.download({ url: `/iot/product/export-excel`, params })
51+
},
52+
53+
// 更新产品状态
54+
updateProductStatus: async (id: number, status: number) => {
55+
return await request.put({ url: `/iot/product/update-status?id=` + id + `&status=` + status })
56+
},
57+
58+
// 查询产品(精简)列表
59+
getSimpleProductList() {
60+
return request.get({ url: '/iot/product/list-all-simple' })
61+
}
62+
}

0 commit comments

Comments
 (0)