Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigDataSystem
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
bigDataSystem
Commits
a6b9495d
Commit
a6b9495d
authored
Nov 11, 2024
by
baiyinhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改审计中心等页面
parent
c9455459
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
870 additions
and
78 deletions
+870
-78
audi.data.ts
src/views/auditLog/audi.data.ts
+11
-23
audiModal.data.ts
src/views/auditLog/audiModal.data.ts
+44
-0
audiModalClean.vue
src/views/auditLog/audiModalClean.vue
+109
-0
index.vue
src/views/auditLog/index.vue
+5
-11
mock.ts
src/views/auditLog/mock.ts
+20
-0
index.vue
src/views/notifications/noticeManage/index.vue
+24
-16
nodiModalDetail.data.ts
src/views/notifications/noticeManage/nodiModalDetail.data.ts
+78
-0
noti.data.ts
src/views/notifications/noticeManage/noti.data.ts
+36
-17
notiModal.vue
src/views/notifications/noticeManage/notiModal.vue
+2
-3
notiModalDetail.vue
src/views/notifications/noticeManage/notiModalDetail.vue
+114
-0
notiModalEmail.vue
src/views/notifications/noticeManage/notiModalEmail.vue
+2
-3
notiModalNew.vue
src/views/notifications/noticeManage/notiModalNew.vue
+71
-0
index.vue
src/views/processCenter/index.vue
+5
-5
processCenter.data.ts
src/views/processCenter/processCenter.data.ts
+232
-0
processCenterModalReview.vue
src/views/processCenter/processCenterModalReview.vue
+117
-0
No files found.
src/views/auditLog/audi.data.ts
View file @
a6b9495d
...
@@ -26,15 +26,9 @@ export const columns: BasicColumn[] = [
...
@@ -26,15 +26,9 @@ export const columns: BasicColumn[] = [
title
:
'对象名称'
,
title
:
'对象名称'
,
dataIndex
:
'ObjectName'
,
dataIndex
:
'ObjectName'
,
width
:
200
,
width
:
200
,
customRender
:
({
record
})
=>
{
// customRender: ({ record }) => {
return
h
(
// return h('a', {}, record.ObjectName);
'a'
,
// },
{
style
:
{
color
:
'#1890ff'
,
cursor
:
'pointer'
},
},
record
.
ObjectName
,
);
},
},
},
// {
// {
// title: '对象名称',
// title: '对象名称',
...
@@ -101,15 +95,9 @@ export const columnstab2: BasicColumn[] = [
...
@@ -101,15 +95,9 @@ export const columnstab2: BasicColumn[] = [
title
:
'数据源名称'
,
title
:
'数据源名称'
,
dataIndex
:
'dataSourceName'
,
dataIndex
:
'dataSourceName'
,
width
:
100
,
width
:
100
,
customRender
:
({
record
})
=>
{
// customRender: ({ record }) => {
return
h
(
// return h('a', {}, record.dataSourceName);
'a'
,
// },
{
style
:
{
color
:
'#1890ff'
,
cursor
:
'pointer'
},
},
record
.
dataSourceName
,
);
},
},
},
// {
// {
// title: '数据源名称',
// title: '数据源名称',
...
@@ -169,7 +157,7 @@ export const searchFormSchema: FormSchema[] = [
...
@@ -169,7 +157,7 @@ export const searchFormSchema: FormSchema[] = [
componentProps
:
{
componentProps
:
{
placeholder
:
'搜索'
,
placeholder
:
'搜索'
,
},
},
colProps
:
{
span
:
4
},
colProps
:
{
span
:
2
},
},
},
{
{
field
:
'objectType'
,
field
:
'objectType'
,
...
@@ -182,7 +170,7 @@ export const searchFormSchema: FormSchema[] = [
...
@@ -182,7 +170,7 @@ export const searchFormSchema: FormSchema[] = [
],
],
placeholder
:
'请选择'
,
placeholder
:
'请选择'
,
},
},
colProps
:
{
span
:
4
},
colProps
:
{
span
:
3
},
},
},
{
{
field
:
'manageType'
,
field
:
'manageType'
,
...
@@ -195,7 +183,7 @@ export const searchFormSchema: FormSchema[] = [
...
@@ -195,7 +183,7 @@ export const searchFormSchema: FormSchema[] = [
],
],
placeholder
:
'请选择'
,
placeholder
:
'请选择'
,
},
},
colProps
:
{
span
:
4
},
colProps
:
{
span
:
3
},
},
},
{
{
field
:
'manageResult'
,
field
:
'manageResult'
,
...
@@ -208,7 +196,7 @@ export const searchFormSchema: FormSchema[] = [
...
@@ -208,7 +196,7 @@ export const searchFormSchema: FormSchema[] = [
],
],
placeholder
:
'请选择'
,
placeholder
:
'请选择'
,
},
},
colProps
:
{
span
:
4
},
colProps
:
{
span
:
3
},
},
},
{
{
field
:
'timeRange'
,
field
:
'timeRange'
,
...
@@ -217,7 +205,7 @@ export const searchFormSchema: FormSchema[] = [
...
@@ -217,7 +205,7 @@ export const searchFormSchema: FormSchema[] = [
componentProps
:
{
componentProps
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
placeholder
:
[
'开始时间'
,
'结束时间'
],
},
},
colProps
:
{
span
:
8
},
colProps
:
{
span
:
6
},
},
},
];
];
export
const
searchFormSchematab2
:
FormSchema
[]
=
[
export
const
searchFormSchematab2
:
FormSchema
[]
=
[
...
...
src/views/auditLog/audiModal.data.ts
View file @
a6b9495d
...
@@ -5,6 +5,7 @@ import { getAllRoleList, setRoleStatus } from '@/api/system/role/role';
...
@@ -5,6 +5,7 @@ import { getAllRoleList, setRoleStatus } from '@/api/system/role/role';
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
Icon
from
'@/components/Icon/Icon.vue'
;
import
Icon
from
'@/components/Icon/Icon.vue'
;
import
{
setMenuStatus
}
from
'@/api/system/menu/menu'
;
import
{
setMenuStatus
}
from
'@/api/system/menu/menu'
;
import
{
min
}
from
'xe-utils'
;
type
CheckedType
=
boolean
|
string
|
number
;
type
CheckedType
=
boolean
|
string
|
number
;
export
const
columns
:
BasicColumn
[]
=
[
export
const
columns
:
BasicColumn
[]
=
[
...
@@ -89,3 +90,46 @@ export const ModelFormSchema: FormSchema[] = [
...
@@ -89,3 +90,46 @@ export const ModelFormSchema: FormSchema[] = [
ifShow
:
false
,
ifShow
:
false
,
},
},
];
];
export
const
physicalModelFormSchema
:
any
[]
=
[
{
field
:
'Selection'
,
label
:
'清理选择'
,
component
:
'Select'
,
colProps
:
{
span
:
24
},
componentProps
:
{
options
:
[
{
value
:
'1'
,
label
:
'保留全部日志'
,
},
{
value
:
'2'
,
label
:
'保留某日开始的全部日志'
,
},
{
value
:
'3'
,
label
:
'设定日志最长保留多少天'
,
},
],
},
},
{
field
:
'date'
,
label
:
'日期'
,
component
:
'DatePicker'
,
ifShow
:
({
values
})
=>
values
.
Selection
===
'2'
,
componentProps
:
{
placeholder
:
'请输入日期'
,
},
},
{
field
:
'days'
,
label
:
'天数'
,
component
:
'InputNumber'
,
ifShow
:
({
values
})
=>
values
.
Selection
===
'3'
,
componentProps
:
{
placeholder
:
'请输入天数'
,
min
:
1
,
},
},
];
src/views/auditLog/audiModalClean.vue
0 → 100644
View file @
a6b9495d
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
physicalModelFormSchema
}
from
'./audiModal.data'
;
import
{
getDeptList
}
from
'@/api/system/dept/dept'
;
import
{
addUserApi
,
UserDetailApi
,
UserUpdataApi
}
from
'@/api/system/user/user'
;
import
{
encryptTwo
}
from
'../../../../src/utils/jsencrypt.js'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
TableData
}
from
'./mock'
;
import
{
router
}
from
'@/router'
;
defineOptions
({
name
:
'ModelModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
isUpdate
=
ref
(
true
);
const
isMove
=
ref
(
false
);
const
rowId
=
ref
(
''
);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
schemas
:
physicalModelFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
// setModalProps({ confirmLoading: false });
// isUpdate.value = !!data?.isUpdate;
// isMove.value = !!data?.isMove;
// if (unref(isUpdate)) {
// // 获取行数据的id
// rowId.value = data.record.businessId;
// // 塞值
// setFieldsValue({
// ...data.record,
// });
// }
// const treeList = handleTree(TableData, 'businessId', undefined, undefined, undefined);
// console.log('treeList', treeList);
// updateSchema([
// {
// field: 'modelId',
// componentProps: {
// tableData: treeList,
// },
// },
// ]);
});
const
getTitle
=
computed
(()
=>
(
!
unref
(
isUpdate
)
?
'新建主题域'
:
'编辑主题域'
));
function
handleTree
(
data
,
id
,
parentId
,
children
,
rootId
)
{
id
=
id
||
'id'
;
parentId
=
parentId
||
'parentId'
;
children
=
children
||
'children'
;
rootId
=
rootId
||
Math
.
min
.
apply
(
Math
,
data
.
map
((
item
)
=>
{
return
item
[
parentId
];
}),
)
||
0
;
// 对源数据深度克隆
const
cloneData
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
// 循环所有项
const
treeData
=
cloneData
.
filter
((
father
)
=>
{
const
branchArr
=
cloneData
.
filter
((
child
)
=>
{
// 返回每一项的子级数组
return
father
[
id
]
===
child
[
parentId
];
});
branchArr
.
length
>
0
?
(
father
.
children
=
branchArr
)
:
''
;
// 返回第一层
return
father
[
parentId
]
===
rootId
;
});
return
treeData
!==
''
?
treeData
:
data
;
}
/**确定按钮*/
async
function
handleSubmit
()
{
const
values
=
await
validate
();
// router.push({
// path: '/metaModel/physicsModel/EditRowTable',
// query: {},
// });
closeModal
();
}
</
script
>
src/views/auditLog/index.vue
View file @
a6b9495d
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
<!--
<a-button
type=
"primary"
@
click=
"handleExport"
>
导出
</a-button>
-->
<!--
<a-button
type=
"primary"
@
click=
"handleExport"
>
导出
</a-button>
-->
<!--
<Alert
message=
"请先配置用于发送告警通知的邮箱/短信"
show-icon
type=
"warning"
/>
-->
<!--
<Alert
message=
"请先配置用于发送告警通知的邮箱/短信"
show-icon
type=
"warning"
/>
-->
<a-button
type=
"primary"
@
click=
"handleExporttab2"
>
日志下载
</a-button>
<a-button
type=
"primary"
@
click=
"handleExporttab2"
>
日志下载
</a-button>
<a-button
type=
"primary"
>
日志清理配置
</a-button>
<a-button
type=
"primary"
@
click=
"handleExportClear"
>
日志清理配置
</a-button>
</
template
>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
<template
v-if=
"column.key === 'action'"
>
...
@@ -83,6 +83,7 @@
...
@@ -83,6 +83,7 @@
<AudiDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/>
<AudiDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/>
<AudiModal
@
register=
"registerModal"
@
success=
"handleSuccess"
/>
<AudiModal
@
register=
"registerModal"
@
success=
"handleSuccess"
/>
<AudiModalEmail
@
register=
"registerModalEmail"
@
success=
"handleSuccess"
/>
<AudiModalEmail
@
register=
"registerModalEmail"
@
success=
"handleSuccess"
/>
<AudiModalClean
@
register=
"registerModalClean"
@
success=
"handleSuccess"
/>
</div>
</div>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
...
@@ -99,6 +100,7 @@
...
@@ -99,6 +100,7 @@
import
{
useUserStore
}
from
'@/store/modules/user'
;
import
{
useUserStore
}
from
'@/store/modules/user'
;
import
AudiModal
from
'./audiModal.vue'
;
import
AudiModal
from
'./audiModal.vue'
;
import
AudiModalEmail
from
'./audiModalEmail.vue'
;
import
AudiModalEmail
from
'./audiModalEmail.vue'
;
import
AudiModalClean
from
'./audiModalClean.vue'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
getMenuListByPage
}
from
'@/api/system/menu/menu'
;
import
{
getMenuListByPage
}
from
'@/api/system/menu/menu'
;
import
{
Tabs
,
Descriptions
,
Alert
,
Modal
,
message
}
from
'ant-design-vue'
;
import
{
Tabs
,
Descriptions
,
Alert
,
Modal
,
message
}
from
'ant-design-vue'
;
...
@@ -115,6 +117,7 @@
...
@@ -115,6 +117,7 @@
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerModalEmail
,
{
openModal
:
openModalEmail
}]
=
useModal
();
const
[
registerModalEmail
,
{
openModal
:
openModalEmail
}]
=
useModal
();
const
[
registerModalClean
,
{
openModal
:
openModalClean
}]
=
useModal
();
const
[
registerTable
,
{
reload
,
getForm
,
getRowSelection
}]
=
useTable
({
const
[
registerTable
,
{
reload
,
getForm
,
getRowSelection
}]
=
useTable
({
title
:
'审计日志'
,
title
:
'审计日志'
,
api
:
async
(
params
)
=>
{
api
:
async
(
params
)
=>
{
...
@@ -212,16 +215,7 @@
...
@@ -212,16 +215,7 @@
}
}
/** 日志清理配置按钮*/
/** 日志清理配置按钮*/
async
function
handleExportClear
()
{
async
function
handleExportClear
()
{
Modal
.
confirm
({
openModalClean
(
true
,
{});
title
:
'日志清理'
,
content
:
'是否清理日志?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onOk
:
()
=>
{
console
.
log
(
'日志清理'
);
message
.
success
(
'清理成功'
);
},
});
}
}
/** tab2导出按钮*/
/** tab2导出按钮*/
async
function
handleExporttab2
()
{
async
function
handleExporttab2
()
{
...
...
src/views/auditLog/mock.ts
View file @
a6b9495d
...
@@ -15,6 +15,8 @@ export const tableListtab1: any[] = [
...
@@ -15,6 +15,8 @@ export const tableListtab1: any[] = [
triggerType
:
'触发方式1'
,
triggerType
:
'触发方式1'
,
alarmType
:
'通知方式2'
,
alarmType
:
'通知方式2'
,
alarmLevel
:
'紧急程度1'
,
alarmLevel
:
'紧急程度1'
,
businessId
:
400
,
institutionId
:
null
,
},
},
{
{
createDate
:
'2024-10-24 10:04:06'
,
createDate
:
'2024-10-24 10:04:06'
,
...
@@ -32,6 +34,8 @@ export const tableListtab1: any[] = [
...
@@ -32,6 +34,8 @@ export const tableListtab1: any[] = [
triggerType
:
'触发方式2'
,
triggerType
:
'触发方式2'
,
alarmType
:
'通知方式1'
,
alarmType
:
'通知方式1'
,
alarmLevel
:
'紧急程度1'
,
alarmLevel
:
'紧急程度1'
,
businessId
:
401
,
institutionId
:
null
,
},
},
{
{
createDate
:
'2024-10-24 10:04:07'
,
createDate
:
'2024-10-24 10:04:07'
,
...
@@ -49,6 +53,8 @@ export const tableListtab1: any[] = [
...
@@ -49,6 +53,8 @@ export const tableListtab1: any[] = [
triggerType
:
'触发方式1'
,
triggerType
:
'触发方式1'
,
alarmType
:
'通知方式1'
,
alarmType
:
'通知方式1'
,
alarmLevel
:
'紧急程度1'
,
alarmLevel
:
'紧急程度1'
,
businessId
:
402
,
institutionId
:
null
,
},
},
{
{
createDate
:
'2024-10-24 10:04:08'
,
createDate
:
'2024-10-24 10:04:08'
,
...
@@ -66,6 +72,8 @@ export const tableListtab1: any[] = [
...
@@ -66,6 +72,8 @@ export const tableListtab1: any[] = [
triggerType
:
'触发方式1'
,
triggerType
:
'触发方式1'
,
alarmType
:
'通知方式1'
,
alarmType
:
'通知方式1'
,
alarmLevel
:
'紧急程度2'
,
alarmLevel
:
'紧急程度2'
,
businessId
:
403
,
institutionId
:
null
,
},
},
{
{
createDate
:
'2024-10-24 10:04:09'
,
createDate
:
'2024-10-24 10:04:09'
,
...
@@ -83,6 +91,8 @@ export const tableListtab1: any[] = [
...
@@ -83,6 +91,8 @@ export const tableListtab1: any[] = [
triggerType
:
'触发方式2'
,
triggerType
:
'触发方式2'
,
alarmType
:
'通知方式2'
,
alarmType
:
'通知方式2'
,
alarmLevel
:
'紧急程度2'
,
alarmLevel
:
'紧急程度2'
,
businessId
:
404
,
institutionId
:
null
,
},
},
];
];
export
const
tableListtab2
:
any
[]
=
[
export
const
tableListtab2
:
any
[]
=
[
...
@@ -97,6 +107,8 @@ export const tableListtab2: any[] = [
...
@@ -97,6 +107,8 @@ export const tableListtab2: any[] = [
endTime
:
'执行结束时间1'
,
endTime
:
'执行结束时间1'
,
costTime
:
'执行耗时1'
,
costTime
:
'执行耗时1'
,
result
:
'成功'
,
result
:
'成功'
,
businessId
:
400
,
institutionId
:
null
,
},
},
{
{
createDate
:
'2024-10-25 10:04:05'
,
createDate
:
'2024-10-25 10:04:05'
,
...
@@ -109,6 +121,8 @@ export const tableListtab2: any[] = [
...
@@ -109,6 +121,8 @@ export const tableListtab2: any[] = [
endTime
:
'执行结束时间1'
,
endTime
:
'执行结束时间1'
,
costTime
:
'执行耗时1'
,
costTime
:
'执行耗时1'
,
result
:
'成功'
,
result
:
'成功'
,
businessId
:
401
,
institutionId
:
null
,
},
},
{
{
createDate
:
'2024-10-25 10:04:05'
,
createDate
:
'2024-10-25 10:04:05'
,
...
@@ -121,6 +135,8 @@ export const tableListtab2: any[] = [
...
@@ -121,6 +135,8 @@ export const tableListtab2: any[] = [
endTime
:
'执行结束时间1'
,
endTime
:
'执行结束时间1'
,
costTime
:
'执行耗时1'
,
costTime
:
'执行耗时1'
,
result
:
'成功'
,
result
:
'成功'
,
businessId
:
402
,
institutionId
:
null
,
},
},
{
{
createDate
:
'2024-10-25 10:04:05'
,
createDate
:
'2024-10-25 10:04:05'
,
...
@@ -133,6 +149,8 @@ export const tableListtab2: any[] = [
...
@@ -133,6 +149,8 @@ export const tableListtab2: any[] = [
endTime
:
'执行结束时间1'
,
endTime
:
'执行结束时间1'
,
costTime
:
'执行耗时1'
,
costTime
:
'执行耗时1'
,
result
:
'成功'
,
result
:
'成功'
,
businessId
:
403
,
institutionId
:
null
,
},
},
{
{
createDate
:
'2024-10-25 10:04:05'
,
createDate
:
'2024-10-25 10:04:05'
,
...
@@ -145,5 +163,7 @@ export const tableListtab2: any[] = [
...
@@ -145,5 +163,7 @@ export const tableListtab2: any[] = [
endTime
:
'执行结束时间1'
,
endTime
:
'执行结束时间1'
,
costTime
:
'执行耗时1'
,
costTime
:
'执行耗时1'
,
result
:
'成功'
,
result
:
'成功'
,
businessId
:
404
,
institutionId
:
null
,
},
},
];
];
src/views/notifications/noticeManage/index.vue
View file @
a6b9495d
...
@@ -4,8 +4,6 @@
...
@@ -4,8 +4,6 @@
<Tabs
.
TabPane
key=
"1"
tab=
" 通知记录"
>
<Tabs
.
TabPane
key=
"1"
tab=
" 通知记录"
>
<BasicTable
@
register=
"registerTable"
class=
"p-2"
>
<BasicTable
@
register=
"registerTable"
class=
"p-2"
>
<template
#
toolbar
>
<template
#
toolbar
>
<!--
<a-button
type=
"primary"
@
click=
"handleCreate"
>
新增角色
</a-button>
<a-button
type=
"primary"
@
click=
"handleExport"
>
导出
</a-button>
-->
<a-button
type=
"error"
@
click=
"handleDeleteBatch"
>
删除选中的通知
</a-button>
<a-button
type=
"error"
@
click=
"handleDeleteBatch"
>
删除选中的通知
</a-button>
</
template
>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<
template
#
bodyCell=
"{ column, record }"
>
...
@@ -16,7 +14,7 @@
...
@@ -16,7 +14,7 @@
icon: 'ant-design:search-outlined',
icon: 'ant-design:search-outlined',
label: '',
label: '',
tooltip: '查看详情', // 悬停显示的文本
tooltip: '查看详情', // 悬停显示的文本
onClick: handleView.bind(null, record),
onClick: handleView
Detail
.bind(null, record),
},
},
{
{
icon: 'ant-design:delete-outlined',
icon: 'ant-design:delete-outlined',
...
@@ -39,8 +37,6 @@
...
@@ -39,8 +37,6 @@
<!-- 未解决问题:原型截图上无法看出在哪里显示通知已读状态 -->
<!-- 未解决问题:原型截图上无法看出在哪里显示通知已读状态 -->
<BasicTable
@
register=
"registerTable2"
>
<BasicTable
@
register=
"registerTable2"
>
<
template
#
toolbar
>
<
template
#
toolbar
>
<!--
<a-button
type=
"primary"
@
click=
"handleCreate"
>
新增角色
</a-button>
<a-button
type=
"primary"
@
click=
"handleExport"
>
导出
</a-button>
-->
<Alert
message=
"请先配置用于发送告警通知的邮箱/短信"
show-icon
type=
"warning"
/>
<Alert
message=
"请先配置用于发送告警通知的邮箱/短信"
show-icon
type=
"warning"
/>
<a-button
type=
"primary"
@
click=
"handleCreate"
>
新建通知规则
</a-button>
<a-button
type=
"primary"
@
click=
"handleCreate"
>
新建通知规则
</a-button>
<a-button
type=
"primary"
@
click=
"handleEmail"
>
邮箱/短信配置
</a-button>
<a-button
type=
"primary"
@
click=
"handleEmail"
>
邮箱/短信配置
</a-button>
...
@@ -50,11 +46,12 @@
...
@@ -50,11 +46,12 @@
<template
v-if=
"column.key === 'action'"
>
<template
v-if=
"column.key === 'action'"
>
<TableAction
<TableAction
:actions=
"[
:actions=
"[
//
{
{
// // icon: 'clarity:note-edit-line',
icon: 'clarity:note-edit-line',
// label: '编22222222222辑',
// label: '编22222222222辑',
// onClick: handleEdit.bind(null, record),
tooltip: '编辑',
// },
onClick: handleEdit.bind(null, record),
},
// {
// {
// // icon: 'clarity:note-edit-line',
// // icon: 'clarity:note-edit-line',
// label: '数据222222222222222权限',
// label: '数据222222222222222权限',
...
@@ -63,8 +60,9 @@
...
@@ -63,8 +60,9 @@
{
{
icon: 'ant-design:delete-outlined',
icon: 'ant-design:delete-outlined',
label: '删除',
//
label: '删除',
color: 'error',
color: 'error',
tooltip: '删除',
popConfirm: {
popConfirm: {
title: '是否确认删除',
title: '是否确认删除',
placement: 'left',
placement: 'left',
...
@@ -80,7 +78,9 @@
...
@@ -80,7 +78,9 @@
</tabs>
</tabs>
<NotiDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/>
<NotiDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/>
<NotiModal
@
register=
"registerModal"
@
success=
"handleSuccess"
/>
<NotiModal
@
register=
"registerModal"
@
success=
"handleSuccess"
/>
<notiModalEmail
@
register=
"registerModalEmail"
@
success=
"handleSuccess"
/>
<NotiModalEmail
@
register=
"registerModalEmail"
@
success=
"handleSuccess"
/>
<NotiModalDetail
@
register=
"registerModalDetail"
@
success=
"handleSuccess"
/>
<NotiModalNew
@
register=
"registerModalNew"
@
success=
"handleSuccess"
/>
</div>
</div>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
...
@@ -96,7 +96,9 @@
...
@@ -96,7 +96,9 @@
import
{
useFilterStore
}
from
'@/store/modules/filterData'
;
import
{
useFilterStore
}
from
'@/store/modules/filterData'
;
import
{
useUserStore
}
from
'@/store/modules/user'
;
import
{
useUserStore
}
from
'@/store/modules/user'
;
import
NotiModal
from
'./notiModal.vue'
;
import
NotiModal
from
'./notiModal.vue'
;
import
notiModalEmail
from
'./notiModalEmail.vue'
;
import
NotiModalEmail
from
'./notiModalEmail.vue'
;
import
NotiModalDetail
from
'./notiModalDetail.vue'
;
import
NotiModalNew
from
'./notiModalNew.vue'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
getMenuListByPage
}
from
'@/api/system/menu/menu'
;
import
{
getMenuListByPage
}
from
'@/api/system/menu/menu'
;
import
{
Tabs
,
Descriptions
,
Alert
,
Popconfirm
,
message
,
Modal
}
from
'ant-design-vue'
;
import
{
Tabs
,
Descriptions
,
Alert
,
Popconfirm
,
message
,
Modal
}
from
'ant-design-vue'
;
...
@@ -114,6 +116,8 @@
...
@@ -114,6 +116,8 @@
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerModalEmail
,
{
openModal
:
openModalEmail
}]
=
useModal
();
const
[
registerModalEmail
,
{
openModal
:
openModalEmail
}]
=
useModal
();
const
[
registerModalDetail
,
{
openModal
:
openModalDetail
}]
=
useModal
();
const
[
registerModalNew
,
{
openModal
:
openModalNew
}]
=
useModal
();
const
[
registerTable
,
{
reload
,
getForm
,
getRowSelection
}]
=
useTable
({
const
[
registerTable
,
{
reload
,
getForm
,
getRowSelection
}]
=
useTable
({
title
:
'通知列表'
,
title
:
'通知列表'
,
api
:
async
(
params
)
=>
{
api
:
async
(
params
)
=>
{
...
@@ -191,9 +195,10 @@
...
@@ -191,9 +195,10 @@
});
});
/***新增规则按钮*/
/***新增规则按钮*/
function
handleCreate
()
{
function
handleCreate
()
{
open
Drawer
(
true
,
{
open
ModalNew
(
true
,
{
isUpdate
:
false
,
isUpdate
:
false
,
});
});
console
.
log
(
isUpdate
,
'11'
);
}
}
//**邮箱短信配置按钮*/
//**邮箱短信配置按钮*/
function
handleEmail
()
{
function
handleEmail
()
{
...
@@ -202,6 +207,10 @@
...
@@ -202,6 +207,10 @@
isNewEmail
:
true
,
isNewEmail
:
true
,
});
});
}
}
/**查看详情按钮*/
function
handleViewDetail
()
{
openModalDetail
(
true
,
{});
}
/** 导出按钮*/
/** 导出按钮*/
async
function
handleExport
()
{
async
function
handleExport
()
{
console
.
log
(
'导出----'
);
console
.
log
(
'导出----'
);
...
@@ -219,7 +228,7 @@
...
@@ -219,7 +228,7 @@
}
}
/**编辑按钮*/
/**编辑按钮*/
function
handleEdit
(
record
:
Recordable
)
{
function
handleEdit
(
record
:
Recordable
)
{
open
Drawer
(
true
,
{
open
ModalNew
(
true
,
{
record
,
record
,
isUpdate
:
true
,
isUpdate
:
true
,
});
});
...
@@ -228,7 +237,6 @@
...
@@ -228,7 +237,6 @@
/**数据权限按钮*/
/**数据权限按钮*/
function
dataPermiss
(
record
:
Recordable
)
{
function
dataPermiss
(
record
:
Recordable
)
{
openModal
(
true
,
{
openModal
(
true
,
{
isPermiss
:
true
,
record
,
record
,
});
});
}
}
...
...
src/views/notifications/noticeManage/nodiModalDetail.data.ts
0 → 100644
View file @
a6b9495d
import
{
BasicColumn
,
FormSchema
}
from
'@/components/Table'
;
import
{
h
}
from
'vue'
;
import
{
Switch
,
Button
,
Input
}
from
'ant-design-vue'
;
import
{
getAllRoleList
,
setRoleStatus
}
from
'@/api/system/role/role'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
Icon
from
'@/components/Icon/Icon.vue'
;
import
{
setMenuStatus
}
from
'@/api/system/menu/menu'
;
import
{
last
}
from
'xe-utils'
;
type
CheckedType
=
boolean
|
string
|
number
;
export
const
columns
:
BasicColumn
[]
=
[
{
title
:
'菜单名称'
,
dataIndex
:
'menuName'
,
width
:
50
,
align
:
'left'
,
colProps
:
{
span
:
8
},
},
];
export
const
physicalModelFormSchema
:
FormSchema
[]
=
[
{
field
:
'missionName'
,
label
:
'任务名称'
,
component
:
'Input'
,
componentProps
:
{
disabled
:
true
,
},
colProps
:
{
span
:
12
,
},
},
// ...
{
field
:
'createDate'
,
label
:
'通知触发时间'
,
component
:
'Input'
,
componentProps
:
{
disabled
:
true
,
},
colProps
:
{
span
:
12
,
},
},
{
field
:
'alarmLevel'
,
label
:
'紧急程度'
,
component
:
'Input'
,
componentProps
:
{
disabled
:
true
,
},
colProps
:
{
span
:
12
,
},
},
{
field
:
'alarmRuleName'
,
label
:
'通知规则'
,
component
:
'Input'
,
componentProps
:
{
disabled
:
true
,
},
colProps
:
{
span
:
12
,
},
},
{
field
:
'alarmDetail'
,
label
:
'通知详情'
,
component
:
'InputTextArea'
,
componentProps
:
{
disabled
:
true
,
},
colProps
:
{
span
:
24
,
},
},
];
src/views/notifications/noticeManage/noti.data.ts
View file @
a6b9495d
...
@@ -64,7 +64,7 @@ export const searchFormSchema: FormSchema[] = [
...
@@ -64,7 +64,7 @@ export const searchFormSchema: FormSchema[] = [
componentProps
:
{
componentProps
:
{
placeholder
:
'请输入关键字'
,
placeholder
:
'请输入关键字'
,
},
},
colProps
:
{
span
:
5
},
colProps
:
{
span
:
4
},
},
},
// {
// {
// field: 'alarmScope',
// field: 'alarmScope',
...
@@ -92,7 +92,7 @@ export const searchFormSchema: FormSchema[] = [
...
@@ -92,7 +92,7 @@ export const searchFormSchema: FormSchema[] = [
],
],
placeholder
:
'请选择通知规则'
,
placeholder
:
'请选择通知规则'
,
},
},
colProps
:
{
span
:
5
},
colProps
:
{
span
:
4
},
},
},
{
{
field
:
'resourceType'
,
field
:
'resourceType'
,
...
@@ -100,12 +100,18 @@ export const searchFormSchema: FormSchema[] = [
...
@@ -100,12 +100,18 @@ export const searchFormSchema: FormSchema[] = [
component
:
'Select'
,
component
:
'Select'
,
componentProps
:
{
componentProps
:
{
options
:
[
options
:
[
{
label
:
'资源类型1'
,
value
:
'1'
},
{
label
:
'数据加载'
,
value
:
'1'
},
{
label
:
'资源类型2'
,
value
:
'2'
},
{
label
:
'数据同步'
,
value
:
'2'
},
{
label
:
'工作流'
,
value
:
'3'
},
{
label
:
'标签'
,
value
:
'4'
},
{
label
:
'数据质量任务'
,
value
:
'5'
},
{
label
:
'落标检查任务'
,
value
:
'6'
},
{
label
:
'元数据变更'
,
value
:
'7'
},
{
label
:
'标准版本变更'
,
value
:
'8'
},
],
],
placeholder
:
'请选择资源类型'
,
placeholder
:
'请选择资源类型'
,
},
},
colProps
:
{
span
:
5
},
colProps
:
{
span
:
4
},
},
},
{
{
field
:
'alarmLevel'
,
field
:
'alarmLevel'
,
...
@@ -118,7 +124,7 @@ export const searchFormSchema: FormSchema[] = [
...
@@ -118,7 +124,7 @@ export const searchFormSchema: FormSchema[] = [
],
],
placeholder
:
'请选择紧急程度'
,
placeholder
:
'请选择紧急程度'
,
},
},
colProps
:
{
span
:
5
},
colProps
:
{
span
:
4
},
},
},
];
];
export
const
searchFormSchematab2
:
FormSchema
[]
=
[
export
const
searchFormSchematab2
:
FormSchema
[]
=
[
...
@@ -129,7 +135,7 @@ export const searchFormSchematab2: FormSchema[] = [
...
@@ -129,7 +135,7 @@ export const searchFormSchematab2: FormSchema[] = [
componentProps
:
{
componentProps
:
{
placeholder
:
'请输入关键字'
,
placeholder
:
'请输入关键字'
,
},
},
colProps
:
{
span
:
5
},
colProps
:
{
span
:
4
},
},
},
{
{
field
:
'resourceType'
,
field
:
'resourceType'
,
...
@@ -137,12 +143,18 @@ export const searchFormSchematab2: FormSchema[] = [
...
@@ -137,12 +143,18 @@ export const searchFormSchematab2: FormSchema[] = [
component
:
'Select'
,
component
:
'Select'
,
componentProps
:
{
componentProps
:
{
options
:
[
options
:
[
{
label
:
'资源类型1'
,
value
:
'资源类型1'
},
{
label
:
'数据加载'
,
value
:
'1'
},
{
label
:
'资源类型2'
,
value
:
'资源类型2'
},
{
label
:
'数据同步'
,
value
:
'2'
},
{
label
:
'工作流'
,
value
:
'3'
},
{
label
:
'标签'
,
value
:
'4'
},
{
label
:
'数据质量任务'
,
value
:
'5'
},
{
label
:
'落标检查任务'
,
value
:
'6'
},
{
label
:
'元数据变更'
,
value
:
'7'
},
{
label
:
'标准版本变更'
,
value
:
'8'
},
],
],
placeholder
:
'请选择资源类型'
,
placeholder
:
'请选择资源类型'
,
},
},
colProps
:
{
span
:
5
},
colProps
:
{
span
:
4
},
},
},
{
{
field
:
'alarmLevel'
,
field
:
'alarmLevel'
,
...
@@ -155,7 +167,7 @@ export const searchFormSchematab2: FormSchema[] = [
...
@@ -155,7 +167,7 @@ export const searchFormSchematab2: FormSchema[] = [
],
],
placeholder
:
'请选择紧急程度'
,
placeholder
:
'请选择紧急程度'
,
},
},
colProps
:
{
span
:
5
},
colProps
:
{
span
:
4
},
},
},
{
{
field
:
'status'
,
field
:
'status'
,
...
@@ -168,7 +180,7 @@ export const searchFormSchematab2: FormSchema[] = [
...
@@ -168,7 +180,7 @@ export const searchFormSchematab2: FormSchema[] = [
],
],
placeholder
:
'请选择状态'
,
placeholder
:
'请选择状态'
,
},
},
colProps
:
{
span
:
5
},
colProps
:
{
span
:
4
},
},
},
];
];
...
@@ -201,8 +213,14 @@ export const formSchema: FormSchema[] = [
...
@@ -201,8 +213,14 @@ export const formSchema: FormSchema[] = [
component
:
'Select'
,
component
:
'Select'
,
componentProps
:
{
componentProps
:
{
options
:
[
options
:
[
{
label
:
'资源类型1'
,
value
:
'1'
},
{
label
:
'数据加载'
,
value
:
'1'
},
{
label
:
'资源类型2'
,
value
:
'2'
},
{
label
:
'数据同步'
,
value
:
'2'
},
{
label
:
'工作流'
,
value
:
'3'
},
{
label
:
'标签'
,
value
:
'4'
},
{
label
:
'数据质量任务'
,
value
:
'5'
},
{
label
:
'落标检查任务'
,
value
:
'6'
},
{
label
:
'元数据变更'
,
value
:
'7'
},
{
label
:
'标准版本变更'
,
value
:
'8'
},
],
],
},
},
},
},
...
@@ -244,11 +262,12 @@ export const formSchema: FormSchema[] = [
...
@@ -244,11 +262,12 @@ export const formSchema: FormSchema[] = [
{
{
field
:
'alarmType'
,
field
:
'alarmType'
,
label
:
'通知方式'
,
label
:
'通知方式'
,
component
:
'
RadioGroup
'
,
component
:
'
Select
'
,
componentProps
:
{
componentProps
:
{
options
:
[
options
:
[
{
label
:
'元数据变更'
,
value
:
'1'
},
{
label
:
'站内信'
,
value
:
'1'
},
{
label
:
'元数据处理'
,
value
:
'2'
},
{
label
:
'邮件'
,
value
:
'2'
},
{
label
:
'短信通知'
,
value
:
'3'
},
],
],
},
},
rules
:
[
rules
:
[
...
...
src/views/notifications/noticeManage/notiModal.vue
View file @
a6b9495d
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
const
dataSource
=
ref
([]);
const
dataSource
=
ref
([]);
const
treeData
=
ref
();
const
treeData
=
ref
();
const
roleId
=
ref
();
const
roleId
=
ref
();
const
isPermiss
=
ref
(
true
);
const
getTitle
=
ref
(
'数据权限信息'
);
const
getTitle
=
ref
(
'数据权限信息'
);
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
emit
=
defineEmits
([
'success'
,
'register'
]);
...
@@ -92,7 +92,6 @@
...
@@ -92,7 +92,6 @@
});
});
const
[
registerModal
,
{
closeModal
,
setModalProps
}]
=
useModalInner
(
async
(
data
)
=>
{
const
[
registerModal
,
{
closeModal
,
setModalProps
}]
=
useModalInner
(
async
(
data
)
=>
{
isPermiss
.
value
=
data
.
record
.
isPermiss
;
roleId
.
value
=
data
.
record
.
businessId
;
roleId
.
value
=
data
.
record
.
businessId
;
roleDetailApi
(
roleId
.
value
).
then
((
res
)
=>
{
roleDetailApi
(
roleId
.
value
).
then
((
res
)
=>
{
formData
.
value
=
res
.
data
;
formData
.
value
=
res
.
data
;
...
@@ -218,7 +217,7 @@
...
@@ -218,7 +217,7 @@
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
createMessage
.
success
(
'新增成功'
);
createMessage
.
success
(
'新增成功'
);
closeModal
();
closeModal
();
emit
(
'success'
,
{
isUpdate
:
unref
(
is
Permiss
),
values
:
{
...
values
}
});
emit
(
'success'
,
{
isUpdate
:
unref
(
is
Update
),
values
:
{
...
values
}
});
}
}
});
});
reload
();
reload
();
...
...
src/views/notifications/noticeManage/notiModalDetail.vue
0 → 100644
View file @
a6b9495d
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
physicalModelFormSchema
}
from
'./nodiModalDetail.data'
;
import
{
getDeptList
}
from
'@/api/system/dept/dept'
;
import
{
addUserApi
,
UserDetailApi
,
UserUpdataApi
}
from
'@/api/system/user/user'
;
import
{
encryptTwo
}
from
'../../../../src/utils/jsencrypt.js'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
TreeData
}
from
'@/views/ArchitecturePlan/dataTiering/mock'
;
import
{
router
}
from
'@/router'
;
defineOptions
({
name
:
'ModelModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
isUpdate
=
ref
(
true
);
const
isMove
=
ref
(
false
);
const
rowId
=
ref
(
''
);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
schemas
:
physicalModelFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
isUpdate
.
value
=
!!
data
?.
isUpdate
;
isMove
.
value
=
!!
data
?.
isMove
;
if
(
unref
(
isUpdate
))
{
// 获取行数据的id
rowId
.
value
=
data
.
record
.
businessId
;
// 塞值
setFieldsValue
({
createDate
:
data
.
record
.
createDate
,
alarmRule
:
data
.
record
.
alarmRule
,
alarmLevel
:
data
.
record
.
alarmLevel
,
resourceType
:
data
.
record
.
resourceType
,
triggerType
:
data
.
record
.
triggerType
,
businessId
:
data
.
record
.
businessId
,
institutionId
:
data
.
record
.
institutionId
,
});
}
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
);
console
.
log
(
'treeList'
,
treeList
);
updateSchema
([
{
field
:
'modelId'
,
componentProps
:
{
treeData
:
treeList
,
},
},
]);
});
const
getTitle
=
computed
(()
=>
(
!
unref
(
isUpdate
)
?
'查看详情'
:
'查看详情'
));
function
handleTree
(
data
,
id
,
parentId
,
children
,
rootId
)
{
id
=
id
||
'id'
;
parentId
=
parentId
||
'parentId'
;
children
=
children
||
'children'
;
rootId
=
rootId
||
Math
.
min
.
apply
(
Math
,
data
.
map
((
item
)
=>
{
return
item
[
parentId
];
}),
)
||
0
;
// 对源数据深度克隆
const
cloneData
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
// 循环所有项
const
treeData
=
cloneData
.
filter
((
father
)
=>
{
const
branchArr
=
cloneData
.
filter
((
child
)
=>
{
// 返回每一项的子级数组
return
father
[
id
]
===
child
[
parentId
];
});
branchArr
.
length
>
0
?
(
father
.
children
=
branchArr
)
:
''
;
// 返回第一层
return
father
[
parentId
]
===
rootId
;
});
return
treeData
!==
''
?
treeData
:
data
;
}
/**确定按钮*/
async
function
handleSubmit
()
{
const
values
=
await
validate
();
router
.
push
({
path
:
'/notifications/noticeManage'
,
query
:
{},
});
closeModal
();
}
</
script
>
src/views/notifications/noticeManage/notiModalEmail.vue
View file @
a6b9495d
...
@@ -82,8 +82,8 @@
...
@@ -82,8 +82,8 @@
const
dataSource
=
ref
([]);
const
dataSource
=
ref
([]);
const
treeData
=
ref
();
const
treeData
=
ref
();
const
roleId
=
ref
();
const
roleId
=
ref
();
const
isPermiss
=
ref
(
true
);
const
getTitle
=
ref
(
'
数据权限信息
'
);
const
getTitle
=
ref
(
'
邮箱/短信配置
'
);
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
formData
=
ref
({});
const
formData
=
ref
({});
...
@@ -121,7 +121,6 @@
...
@@ -121,7 +121,6 @@
activeKey
.
value
=
key
;
activeKey
.
value
=
key
;
};
};
const
[
registerModal
,
{
closeModal
,
setModalProps
}]
=
useModalInner
(
async
(
data
)
=>
{
const
[
registerModal
,
{
closeModal
,
setModalProps
}]
=
useModalInner
(
async
(
data
)
=>
{
isPermiss
.
value
=
data
.
record
.
isPermiss
;
roleId
.
value
=
data
.
record
.
businessId
;
roleId
.
value
=
data
.
record
.
businessId
;
roleDetailApi
(
roleId
.
value
).
then
((
res
)
=>
{
roleDetailApi
(
roleId
.
value
).
then
((
res
)
=>
{
formData
.
value
=
res
.
data
;
formData
.
value
=
res
.
data
;
...
...
src/views/notifications/noticeManage/notiModalNew.vue
0 → 100644
View file @
a6b9495d
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
formSchema
}
from
'./noti.data'
;
import
{
BasicDrawer
,
useDrawerInner
}
from
'@/components/Drawer'
;
import
{
BasicTree
,
TreeItem
}
from
'@/components/Tree'
;
import
{
roleDetailApi
,
roleUpdataApi
,
addRoleApi
}
from
'@/api/system/role/role'
;
import
{
getMenuSelect
,
getRoleMenuSelected
}
from
'@/api/system/menu/menu'
;
import
{
encryptTwo
}
from
'@/utils/jsencrypt'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
getDeptList
}
from
'@/api/system/dept/dept'
;
import
{
addUserApi
,
UserDetailApi
,
UserUpdataApi
}
from
'@/api/system/user/user'
;
import
{
tableListtab1
}
from
'@/views/notifications/noticeManage/mock'
;
import
{
router
}
from
'@/router'
;
const
getTitle
=
computed
(()
=>
(
!
unref
(
isUpdate
)
?
'新建通知规则'
:
'编辑通知规则'
));
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
isUpdate
=
ref
(
true
);
const
roleId
=
ref
(
''
);
const
treeData
=
ref
<
TreeItem
[]
>
([]);
async
function
handleSubmit
()
{
const
values
=
await
validate
();
router
.
push
({
path
:
'/notifications/noticeManage'
,
query
:
{},
});
closeModal
();
}
const
[
registerForm
,
{
resetFields
,
setFieldsValue
,
validate
}]
=
useForm
({
labelWidth
:
90
,
baseColProps
:
{
span
:
24
},
schemas
:
formSchema
,
showActionButtonGroup
:
false
,
});
const
[
registerModal
,
{
closeModal
,
setModalProps
}]
=
useModalInner
(
async
(
data
)
=>
{
roleId
.
value
=
data
.
record
.
businessId
;
const
form
=
{
ruleName
:
data
.
record
.
ruleName
,
description
:
data
.
record
.
description
,
roleStatus
:
data
.
record
.
roleStatus
,
resourceType
:
data
.
record
.
resourceType
,
alarmRange
:
data
.
record
.
alarmRange
,
triggerType
:
data
.
record
.
triggerType
,
alarmType
:
data
.
record
.
alarmType
,
alarmLevel
:
data
.
record
.
alarmLevel
,
};
setFieldsValue
({
...
form
,
});
if
(
unref
(
treeData
).
length
===
0
)
{
const
treeRes
=
await
getMenuSelect
();
treeData
.
value
=
treeRes
.
data
as
any
as
TreeItem
[];
}
});
</
script
>
src/views/processCenter/index.vue
View file @
a6b9495d
...
@@ -106,6 +106,7 @@
...
@@ -106,6 +106,7 @@
<ProCenterDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/>
<ProCenterDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/>
<ProCenterModal
@
register=
"registerModal"
@
success=
"handleSuccess"
/>
<ProCenterModal
@
register=
"registerModal"
@
success=
"handleSuccess"
/>
<ProCenterModalEmail
@
register=
"registerModalEmail"
@
success=
"handleSuccess"
/>
<ProCenterModalEmail
@
register=
"registerModalEmail"
@
success=
"handleSuccess"
/>
<ProCenterModalReview
@
register=
"registerModalReview"
@
success=
"handleSuccess"
/>
</div>
</div>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
...
@@ -129,6 +130,7 @@
...
@@ -129,6 +130,7 @@
import
{
useUserStore
}
from
'@/store/modules/user'
;
import
{
useUserStore
}
from
'@/store/modules/user'
;
import
ProCenterModal
from
'./processCenterModal.vue'
;
import
ProCenterModal
from
'./processCenterModal.vue'
;
import
ProcenterModalEmail
from
'./processCenterModalEmail.vue'
;
import
ProcenterModalEmail
from
'./processCenterModalEmail.vue'
;
import
ProCenterModalReview
from
'./processCenterModalReview.vue'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
getMenuListByPage
}
from
'@/api/system/menu/menu'
;
import
{
getMenuListByPage
}
from
'@/api/system/menu/menu'
;
import
{
Tabs
,
Descriptions
,
Alert
,
Modal
}
from
'ant-design-vue'
;
import
{
Tabs
,
Descriptions
,
Alert
,
Modal
}
from
'ant-design-vue'
;
...
@@ -146,6 +148,7 @@
...
@@ -146,6 +148,7 @@
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerModalEmail
,
{
openModal
:
openModalEmail
}]
=
useModal
();
const
[
registerModalEmail
,
{
openModal
:
openModalEmail
}]
=
useModal
();
const
[
registerModalReview
,
{
openModal
:
openModalReview
}]
=
useModal
();
const
[
registerTable
,
{
reload
,
getForm
,
getRowSelection
}]
=
useTable
({
const
[
registerTable
,
{
reload
,
getForm
,
getRowSelection
}]
=
useTable
({
title
:
''
,
title
:
''
,
api
:
async
(
params
)
=>
{
api
:
async
(
params
)
=>
{
...
@@ -297,11 +300,8 @@
...
@@ -297,11 +300,8 @@
}
}
/**审批按钮*/
/**审批按钮*/
function
handleEdit
(
record
:
Recordable
)
{
function
handleEdit
(
record
:
Recordable
)
{
Modal
.
confirm
({
openModalReview
(
true
,
{
title
:
'确认审批内容'
,
record
,
content
:
`
${
record
.
title
}
审批通过`
,
okText
:
'确认'
,
cancelText
:
'取消'
,
});
});
}
}
...
...
src/views/processCenter/processCenter.data.ts
View file @
a6b9495d
...
@@ -356,3 +356,235 @@ export const formSchema: FormSchema[] = [
...
@@ -356,3 +356,235 @@ export const formSchema: FormSchema[] = [
},
},
},
},
];
];
export
const
columnsEdit
:
BasicColumn
[]
=
[
{
title
:
'序号'
,
dataIndex
:
'businessId'
,
width
:
50
,
},
{
title
:
'字典名称'
,
dataIndex
:
'dictName'
,
width
:
200
,
},
{
title
:
'字典类型'
,
dataIndex
:
'dictType'
,
width
:
180
,
customRender
:
({
record
})
=>
{
const
router
=
useRouter
();
// 获取路由实例
return
h
(
'a'
,
// 使用 <a> 标签实现点击跳转
{
style
:
{
color
:
'#1890ff'
,
cursor
:
'pointer'
},
// 设置样式
onClick
:
()
=>
{
router
.
push
({
path
:
'/dict/type/data'
,
query
:
{
dictType
:
record
.
dictType
,
},
});
},
},
record
.
dictType
,
);
},
},
{
title
:
'状态'
,
dataIndex
:
'flag'
,
width
:
180
,
customRender
:
({
record
})
=>
{
if
(
!
Reflect
.
has
(
record
,
'pendingStatus'
))
{
record
.
pendingStatus
=
false
;
}
return
h
(
Switch
,
{
checked
:
record
.
flag
===
'1'
,
loading
:
record
.
pendingStatus
,
onChange
(
checked
:
CheckedType
)
{
record
.
pendingStatus
=
true
;
const
newStatus
=
checked
?
'1'
:
'0'
;
const
{
createMessage
}
=
useMessage
();
record
.
flag
=
newStatus
;
changeFlagApi
(
record
)
.
then
(()
=>
{
record
.
flag
=
newStatus
;
const
text
=
record
.
flag
===
'0'
?
'停用'
:
'启用'
;
createMessage
.
success
(
text
+
`成功`
);
})
.
catch
(()
=>
{
createMessage
.
error
(
'操作失败'
);
})
.
finally
(()
=>
{
record
.
pendingStatus
=
false
;
});
},
});
},
},
{
title
:
'备注'
,
dataIndex
:
'remarks'
,
width
:
180
,
},
{
title
:
'创建时间'
,
dataIndex
:
'createDate'
,
width
:
180
,
},
];
export
const
searchFormSchemaEdit
:
FormSchema
[]
=
[
{
field
:
'title'
,
label
:
'申请标题'
,
component
:
'Input'
,
colProps
:
{
span
:
7
},
},
{
field
:
'reason'
,
label
:
'申请理由'
,
component
:
'Input'
,
colProps
:
{
span
:
7
},
},
{
field
:
'createBy'
,
label
:
'申请人'
,
component
:
'Select'
,
componentProps
:
{
options
:
[
{
label
:
'申请人1'
,
value
:
'1'
},
{
label
:
'申请人2'
,
value
:
'0'
},
],
},
colProps
:
{
span
:
7
},
},
{
field
:
'deptName'
,
label
:
'申请人所属机构'
,
component
:
'Select'
,
componentProps
:
{
options
:
[
{
label
:
'机构1'
,
value
:
'1'
},
{
label
:
'机构2'
,
value
:
'0'
},
],
},
colProps
:
{
span
:
7
},
},
{
field
:
'type'
,
label
:
'申请类型'
,
component
:
'Select'
,
componentProps
:
{
options
:
[
{
label
:
'申请类型1'
,
value
:
'1'
},
{
label
:
'申请类型2'
,
value
:
'0'
},
],
},
colProps
:
{
span
:
7
},
},
{
field
:
'createTime'
,
label
:
'申请时间'
,
component
:
'DatePicker'
,
componentProps
:
{
valueFormat
:
'YYYY-MM-DD'
,
},
colProps
:
{
span
:
7
},
},
{
field
:
'status'
,
label
:
'申请状态'
,
component
:
'Select'
,
componentProps
:
{
options
:
[
{
label
:
'申请状态1'
,
value
:
'1'
},
{
label
:
'申请状态2'
,
value
:
'0'
},
],
},
colProps
:
{
span
:
7
},
},
];
export
const
formSchemaEdit
:
FormSchema
[]
=
[
{
field
:
'title'
,
label
:
'申请标题'
,
component
:
'Input'
,
colProps
:
{
span
:
24
},
componentProps
:
{
disabled
:
true
,
},
},
{
field
:
'reason'
,
label
:
'申请理由'
,
component
:
'Input'
,
colProps
:
{
span
:
24
},
componentProps
:
{
disabled
:
true
,
},
},
{
field
:
'createBy'
,
label
:
'申请人'
,
component
:
'Select'
,
componentProps
:
{
options
:
[
{
label
:
'申请人1'
,
value
:
'1'
},
{
label
:
'申请人2'
,
value
:
'0'
},
],
disabled
:
true
,
},
colProps
:
{
span
:
24
},
},
{
field
:
'deptName'
,
label
:
'申请人所属机构'
,
component
:
'Select'
,
componentProps
:
{
options
:
[
{
label
:
'机构1'
,
value
:
'1'
},
{
label
:
'机构2'
,
value
:
'0'
},
],
disabled
:
true
,
},
colProps
:
{
span
:
24
},
},
{
field
:
'type'
,
label
:
'申请类型'
,
component
:
'Select'
,
componentProps
:
{
options
:
[
{
label
:
'申请类型1'
,
value
:
'1'
},
{
label
:
'申请类型2'
,
value
:
'0'
},
],
disabled
:
true
,
},
colProps
:
{
span
:
24
},
},
{
field
:
'createTime'
,
label
:
'申请时间'
,
component
:
'DatePicker'
,
componentProps
:
{
valueFormat
:
'YYYY-MM-DD'
,
disabled
:
true
,
},
colProps
:
{
span
:
24
},
},
{
field
:
'status'
,
label
:
'申请状态'
,
component
:
'Select'
,
componentProps
:
{
options
:
[
{
label
:
'申请状态1'
,
value
:
'1'
},
{
label
:
'申请状态2'
,
value
:
'0'
},
],
disabled
:
true
,
},
colProps
:
{
span
:
24
},
},
];
src/views/processCenter/processCenterModalReview.vue
0 → 100644
View file @
a6b9495d
<
template
>
<BasicModal
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
formSchemaEdit
}
from
'./processCenter.data'
;
import
{
addDictType
,
changeFlagApi
,
DictDetailApi
,
getDictDataByType
,
getDictListByPage
,
}
from
'@/api/system/dict/dict'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
message
}
from
'ant-design-vue'
;
defineOptions
({
name
:
'DictModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
isUpdate
=
ref
(
true
);
const
dictId
=
ref
(
''
);
const
getTitle
=
computed
(()
=>
(
!
unref
(
isUpdate
)
?
'审批待办信息'
:
'审批待办信息'
));
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
span
:
24
},
schemas
:
formSchemaEdit
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
isUpdate
.
value
=
!!
data
?.
isUpdate
;
if
(
unref
(
isUpdate
))
{
//修改
// 获取行数据的id
dictId
.
value
=
data
.
record
.
businessId
;
// 通过id获取行详情信息
DictDetailApi
(
dictId
.
value
).
then
((
res
)
=>
{
const
form
=
res
.
data
;
// 塞值
setFieldsValue
({
...
form
,
});
});
}
//给父子典名称和数据赋值
var
options
=
[];
getDictListByPage
().
then
((
response
)
=>
{
options
=
response
.
data
.
map
((
item
)
=>
({
label
:
item
.
dictName
,
value
:
item
.
businessId
,
}));
updateSchema
({
field
:
'parentId'
,
componentProps
:
{
options
:
options
,
onChange
:
(
value
:
any
,
option
:
any
,
form
:
any
)
=>
{
//调用接口 返回的参数赋值给dictValue
if
(
value
!==
undefined
)
{
DictDetailApi
(
value
).
then
((
res
)
=>
{
const
dictType
=
res
.
data
.
dictType
;
// 调用接口获取 dictValue 列表
getDictDataByType
(
dictType
)
.
then
((
response
)
=>
{
const
dictData
=
response
.
data
||
[];
// 获取到的数据列表
// 更新 dictValue 字段的选项
//取出dictData里的dictLabel和dictValue
const
options
=
dictData
.
map
((
item
:
any
)
=>
({
label
:
item
.
dictLabel
,
value
:
item
.
businessId
,
}));
updateSchema
({
field
:
'dataId'
,
componentProps
:
{
options
:
options
,
},
ifShow
:
true
,
});
})
.
catch
((
error
)
=>
{
console
.
error
(
'Error fetching dict values:'
,
error
);
});
});
}
else
{
const
options
=
[];
updateSchema
({
field
:
'dataId'
,
componentProps
:
{
options
:
options
,
},
ifShow
:
false
,
});
}
},
},
});
});
});
async
function
handleSubmit
()
{
closeModal
();
message
.
success
(
'审批成功'
);
}
</
script
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment