Skip to content

Commit d73b843

Browse files
committed
Merge branch 'master' of https://gitee.com/yudaocode/yudao-ui-admin-vue3 into dev
� Conflicts: � src/views/infra/fileConfig/fileConfig.data.ts � src/views/system/sms/smsChannel/sms.channel.data.ts
2 parents 262874a + aad49fd commit d73b843

File tree

29 files changed

+518
-524
lines changed

29 files changed

+518
-524
lines changed

src/api/system/notice/index.ts

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

33
export interface NoticeVO {
4-
id: number
4+
id: number | undefined
55
title: string
66
type: number
77
content: string
@@ -11,32 +11,27 @@ export interface NoticeVO {
1111
createTime: Date
1212
}
1313

14-
export interface NoticePageReqVO extends PageParam {
15-
title?: string
16-
status?: number
17-
}
18-
1914
// 查询公告列表
20-
export const getNoticePageApi = (params: NoticePageReqVO) => {
15+
export const getNoticePage = (params: PageParam) => {
2116
return request.get({ url: '/system/notice/page', params })
2217
}
2318

2419
// 查询公告详情
25-
export const getNoticeApi = (id: number) => {
20+
export const getNotice = (id: number) => {
2621
return request.get({ url: '/system/notice/get?id=' + id })
2722
}
2823

2924
// 新增公告
30-
export const createNoticeApi = (data: NoticeVO) => {
25+
export const createNotice = (data: NoticeVO) => {
3126
return request.post({ url: '/system/notice/create', data })
3227
}
3328

3429
// 修改公告
35-
export const updateNoticeApi = (data: NoticeVO) => {
30+
export const updateNotice = (data: NoticeVO) => {
3631
return request.put({ url: '/system/notice/update', data })
3732
}
3833

3934
// 删除公告
40-
export const deleteNoticeApi = (id: number) => {
35+
export const deleteNotice = (id: number) => {
4136
return request.delete({ url: '/system/notice/delete?id=' + id })
4237
}

src/api/system/sms/smsLog/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ export const getSmsLogPageApi = (params: SmsLogPageReqVO) => {
5353

5454
// 导出短信日志
5555
export const exportSmsLogApi = (params: SmsLogExportReqVO) => {
56-
return request.download({ url: '/system/sms-log/export', params })
56+
return request.download({ url: '/system/sms-log/export-excel', params })
5757
}

src/components/Icon/src/IconSelect.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,22 @@ const tabsList = [
4545
const pageList = computed(() => {
4646
if (currentPage.value === 1) {
4747
return copyIconList[currentActiveType.value]
48-
.filter((v) => v.includes(filterValue.value))
48+
?.filter((v) => v.includes(filterValue.value))
4949
.slice(currentPage.value - 1, pageSize.value)
5050
} else {
5151
return copyIconList[currentActiveType.value]
52-
.filter((v) => v.includes(filterValue.value))
52+
?.filter((v) => v.includes(filterValue.value))
5353
.slice(
5454
pageSize.value * (currentPage.value - 1),
5555
pageSize.value * (currentPage.value - 1) + pageSize.value
5656
)
5757
}
5858
})
59+
const iconCount = computed(() => {
60+
return copyIconList[currentActiveType.value] == undefined
61+
? 0
62+
: copyIconList[currentActiveType.value].length
63+
})
5964
6065
const iconItemStyle = computed((): ParameterCSSProperties => {
6166
return (item) => {
@@ -159,7 +164,7 @@ watch(
159164

160165
<ElPagination
161166
small
162-
:total="copyIconList[currentActiveType].length as unknown as number"
167+
:total="iconCount"
163168
:page-size="pageSize"
164169
:current-page="currentPage"
165170
background

src/components/XTable/src/XTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ const getColumnsConfig = (options: XTableProps) => {
128128
proxyForm = true
129129
options.formConfig = {
130130
enabled: true,
131-
titleWidth: 100,
131+
titleWidth: 180,
132132
titleAlign: 'right',
133133
items: allSchemas.searchSchema
134134
}

src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="my-process-designer">
3-
<div class="my-process-designer__header">
3+
<div class="my-process-designer__header" style="display: table-row-group; z-index: 999">
44
<slot name="control-header"></slot>
55
<template v-if="!$slots['control-header']">
66
<ElButtonGroup key="file-control">

src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
<el-form label-width="90px">
44
<el-form-item label="回路特性">
55
<el-select v-model="loopCharacteristics" @change="changeLoopCharacteristicsType">
6-
<!--bpmn:MultiInstanceLoopCharacteristics-->
76
<el-option label="并行多重事件" value="ParallelMultiInstance" />
87
<el-option label="时序多重事件" value="SequentialMultiInstance" />
9-
<!--bpmn:StandardLoopCharacteristics-->
108
<el-option label="循环事件" value="StandardLoop" />
119
<el-option label="" value="Null" />
1210
</el-select>

src/permission.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ router.beforeEach(async (to, from, next) => {
3535
const userStore = useUserStoreWithOut()
3636
const permissionStore = usePermissionStoreWithOut()
3737
if (!dictStore.getIsSetDict) {
38-
dictStore.setDictMap()
38+
await dictStore.setDictMap()
3939
}
4040
if (!userStore.getIsSetUser) {
4141
isRelogin.show = true

src/utils/permission.ts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
2+
3+
const { t } = useI18n() // 国际化
4+
5+
/**
6+
* 字符权限校验
7+
* @param {Array} value 校验值
8+
* @returns {Boolean}
9+
*/
10+
export function checkPermi(value: string[]) {
11+
if (value && value instanceof Array && value.length > 0) {
12+
const { wsCache } = useCache()
13+
const permissionDatas = value
14+
const all_permission = '*:*:*'
15+
const permissions = wsCache.get(CACHE_KEY.USER).permissions
16+
const hasPermission = permissions.some((permission) => {
17+
return all_permission === permission || permissionDatas.includes(permission)
18+
})
19+
return !!hasPermission
20+
} else {
21+
console.error(t('permission.hasPermission'))
22+
return false
23+
}
24+
}
25+
26+
/**
27+
* 角色权限校验
28+
* @param {string[]} value 校验值
29+
* @returns {Boolean}
30+
*/
31+
export function checkRole(value: string[]) {
32+
if (value && value instanceof Array && value.length > 0) {
33+
const { wsCache } = useCache()
34+
const permissionRoles = value
35+
const super_admin = 'admin'
36+
const roles = wsCache.get(CACHE_KEY.USER).roles
37+
const hasRole = roles.some((role) => {
38+
return super_admin === role || permissionRoles.includes(role)
39+
})
40+
return !!hasRole
41+
} else {
42+
console.error(t('permission.hasRole'))
43+
return false
44+
}
45+
}

src/views/bpm/form/form.data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const rules = reactive({
1010
// CrudSchema
1111
const crudSchemas = reactive<VxeCrudSchema>({
1212
primaryKey: 'id',
13-
primaryType: 'seq',
13+
primaryType: 'id',
1414
primaryTitle: '表单编号',
1515
action: true,
1616
columns: [

src/views/bpm/model/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
name="bpmnFile"
251251
:data="importForm"
252252
>
253-
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
253+
<Icon class="el-icon--upload" icon="ep:upload-filled" />
254254
<div class="el-upload__text"> 将文件拖到此处,或 <em>点击上传</em> </div>
255255
<template #tip>
256256
<div class="el-upload__tip" style="color: red">

0 commit comments

Comments
 (0)