fix: 修复日期显示问题及用户应用授权更新路由问题

This commit is contained in:
Orange
2020-12-11 17:51:17 +08:00
committed by 老广
parent 2c95e5f10b
commit f5bc2842ec
2 changed files with 6 additions and 1 deletions

View File

@@ -73,6 +73,9 @@ function cleanDateStr(d) {
} }
export function toSafeLocalDateStr(d) { export function toSafeLocalDateStr(d) {
if (d === '') {
return ''
}
const date = safeDate(d) const date = safeDate(d)
// let date_s = date.toLocaleString(getUserLang(), {hour12: false}); // let date_s = date.toLocaleString(getUserLang(), {hour12: false});
const date_s = date.toLocaleString(getUserLang(), { hourCycle: 'h23' }) const date_s = date.toLocaleString(getUserLang(), { hourCycle: 'h23' })

View File

@@ -49,7 +49,9 @@ export default {
}, },
actions: { actions: {
formatterArgs: { formatterArgs: {
updateRoute: 'RemoteAppPermissionUpdate', onUpdate: ({ row, col, cellValue }) => {
this.$router.push({ name: 'ApplicationPermissionUpdate', params: { id: cellValue }})
},
performDelete: ({ row, col }) => { performDelete: ({ row, col }) => {
const id = row.id const id = row.id
const url = `/api/v1/perms/application-permissions/${id}/?user_id=${this.object.id}&draw=1` const url = `/api/v1/perms/application-permissions/${id}/?user_id=${this.object.id}&draw=1`