|
|
@@ -117,6 +117,8 @@ onMounted(async ()=>{
|
|
|
await getActionNoticeData()
|
|
|
const data=await SopApi.selectSopById(route.query.id)
|
|
|
enableNotifications.value = data.enableNotifications
|
|
|
+ console.log('noticeList:', noticeList.value)
|
|
|
+
|
|
|
})
|
|
|
|
|
|
// 返回
|
|
|
@@ -168,23 +170,31 @@ const getNotifyData = async () => {
|
|
|
const notifyTimeTypeLabel = getDictLabel(dictMap.notifyTimeType, item.notifyTimeType)
|
|
|
let notifyTimeDisplay = notifyTimeTypeLabel
|
|
|
|
|
|
- if (item.notifyTimeType === 0 || item.notifyTimeType === 2) {
|
|
|
+ if (item.notifyTimeType == 0 || item.notifyTimeType == 2) {
|
|
|
// 转换为分钟展示
|
|
|
const minutes = Math.floor(item.notifyTime / 60)
|
|
|
notifyTimeDisplay += `(${minutes}分钟)`
|
|
|
}
|
|
|
|
|
|
// ✅ 通知角色与模板显示拼接(status === 1 且一行一个)
|
|
|
+ // const detailDisplay = (item.notifyConfigDetailRespVOList || [])
|
|
|
+ // .filter(d => d.status == 1)
|
|
|
+ // .map(d => {
|
|
|
+ // let role = d.roleName
|
|
|
+ // if (d.isClient == 1) {
|
|
|
+ // role += '(当事人)'
|
|
|
+ // }
|
|
|
+ // return `${role}:${d.notifyTemplateName || '-'}`
|
|
|
+ // })
|
|
|
+ // .join('<br/>') // ✅ 多行显示,用 <br/> 拼接
|
|
|
+
|
|
|
const detailDisplay = (item.notifyConfigDetailRespVOList || [])
|
|
|
- .filter(d => d.status === 1)
|
|
|
+ .filter(d => d.isClient == 1) // 过滤当事人
|
|
|
.map(d => {
|
|
|
- let role = d.roleName
|
|
|
- if (d.isClient === 1) {
|
|
|
- role += '(当事人)'
|
|
|
- }
|
|
|
- return `${role}:${d.notifyTemplateName || '-'}`
|
|
|
+ const role = `${d.roleName || '未知角色'}(当事人)`; // 这里就直接拼接了
|
|
|
+ return `${role}:${d.notifyTemplateName || '-'}`;
|
|
|
})
|
|
|
- .join('<br/>') // ✅ 多行显示,用 <br/> 拼接
|
|
|
+ .join('<br/>');
|
|
|
|
|
|
return {
|
|
|
...item,
|
|
|
@@ -243,7 +253,7 @@ const openForm = ({type, id, rowId, workstationId,}: { type: string
|
|
|
rowId?: number
|
|
|
workstationId?: number
|
|
|
}) => {
|
|
|
- if (type === 'create') {
|
|
|
+ if (type == 'create') {
|
|
|
router.push({
|
|
|
name: 'NotificationUpdate',
|
|
|
query: {
|
|
|
@@ -252,7 +262,7 @@ const openForm = ({type, id, rowId, workstationId,}: { type: string
|
|
|
type: 'create',
|
|
|
},
|
|
|
})
|
|
|
- } else if (type === 'update') {
|
|
|
+ } else if (type == 'update') {
|
|
|
router.push({
|
|
|
name: 'NotificationUpdate',
|
|
|
query: {
|