|
@@ -27,14 +27,19 @@ $(document).ready(() => {
|
|
const id = $(this).attr('msg-id');
|
|
const id = $(this).attr('msg-id');
|
|
const msgInfo = _.find(msgList, {id: parseInt(id)});
|
|
const msgInfo = _.find(msgList, {id: parseInt(id)});
|
|
$('#title').html(msgInfo.title);
|
|
$('#title').html(msgInfo.title);
|
|
- $('#creator').html(msgInfo.creator);
|
|
|
|
$('#release_time').html(moment(msgInfo.release_time * 1000).format('YYYY-MM-DD'));
|
|
$('#release_time').html(moment(msgInfo.release_time * 1000).format('YYYY-MM-DD'));
|
|
$('#content').html(msgInfo.content);
|
|
$('#content').html(msgInfo.content);
|
|
- $('#view-msg .modal-title').text('项目通知');
|
|
|
|
$('#user_permission').html('');
|
|
$('#user_permission').html('');
|
|
- if (userMsgPermission && parseInt(uid) === msgInfo.create_uid) {
|
|
|
|
- const permissionHtml = '<a href="/dashboard/msg/add/' + msgInfo.id + '" class="btn btn-sm btn-outline-primary">编辑</a>';
|
|
|
|
- $('#user_permission').html(permissionHtml);
|
|
|
|
|
|
+ if (type && parseInt(type) === 1) {
|
|
|
|
+ $('#creator').html(msgInfo.creator);
|
|
|
|
+ $('#view-msg .modal-title').text('项目通知');
|
|
|
|
+ if (userMsgPermission && parseInt(uid) === msgInfo.create_uid) {
|
|
|
|
+ const permissionHtml = '<a href="/dashboard/msg/add/' + msgInfo.id + '" class="btn btn-sm btn-outline-primary">编辑</a>';
|
|
|
|
+ $('#user_permission').html(permissionHtml);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ $('#creator').html('');
|
|
|
|
+ $('#view-msg .modal-title').text('系统通知');
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
@@ -46,5 +51,6 @@ $(document).ready(() => {
|
|
$('#release_time').html(moment(msgInfo.release_time * 1000).format('YYYY-MM-DD'));
|
|
$('#release_time').html(moment(msgInfo.release_time * 1000).format('YYYY-MM-DD'));
|
|
$('#content').html(msgInfo.content);
|
|
$('#content').html(msgInfo.content);
|
|
$('#view-msg .modal-title').text('系统通知');
|
|
$('#view-msg .modal-title').text('系统通知');
|
|
|
|
+ $('#user_permission').html('');
|
|
})
|
|
})
|
|
});
|
|
});
|