diff --git a/dolphinscheduler-ui/src/views/security/token-manage/components/token-modal.tsx b/dolphinscheduler-ui/src/views/security/token-manage/components/token-modal.tsx index 8c75a68eae..b5fa4cc707 100644 --- a/dolphinscheduler-ui/src/views/security/token-manage/components/token-modal.tsx +++ b/dolphinscheduler-ui/src/views/security/token-manage/components/token-modal.tsx @@ -15,7 +15,13 @@ * limitations under the License. */ -import { defineComponent, getCurrentInstance, PropType, toRefs, watch } from 'vue' +import { + defineComponent, + getCurrentInstance, + PropType, + toRefs, + watch +} from 'vue' import Modal from '@/components/modal' import { NForm, @@ -192,7 +198,7 @@ const TokenModal = defineComponent({ renderTableTime(row.expireTime) }, { title: t('security.token.create_time'), - key: 'createTime' + key: 'createTime', + render: (row: any) => renderTableTime(row.createTime) }, { title: t('security.token.update_time'), - key: 'updateTime' + key: 'updateTime', + render: (row: any) => renderTableTime(row.updateTime) }, { title: t('security.token.operation'), @@ -166,23 +168,7 @@ export function useTable() { variables.loadingRef = true const { state } = useAsyncState( queryAccessTokenList({ ...params }).then((res: TokenRes) => { - variables.tableData = res.totalList.map((item, unused) => { - item.expireTime = format( - parseTime(item.expireTime), - 'yyyy-MM-dd HH:mm:ss' - ) - item.createTime = format( - parseTime(item.createTime), - 'yyyy-MM-dd HH:mm:ss' - ) - item.updateTime = format( - parseTime(item.updateTime), - 'yyyy-MM-dd HH:mm:ss' - ) - return { - ...item - } - }) as any + variables.tableData = res.totalList as any variables.totalPage = res.totalPage variables.loadingRef = false }),