mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-17 12:25:07 +08:00
Vue3 重构:REVIEW 短信日志
This commit is contained in:
@ -69,6 +69,13 @@ export const getDictObj = (dictType: string, value: any) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得字典数据的文本展示
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @param value 字典数据的值
|
||||
*/
|
||||
export const getDictLabel = (dictType: string, value: any) => {
|
||||
const dictOptions: DictDataType[] = getDictOptions(dictType)
|
||||
const dictLabel = ref('')
|
||||
@ -79,6 +86,7 @@ export const getDictLabel = (dictType: string, value: any) => {
|
||||
})
|
||||
return dictLabel.value
|
||||
}
|
||||
|
||||
export enum DICT_TYPE {
|
||||
USER_TYPE = 'user_type',
|
||||
COMMON_STATUS = 'common_status',
|
||||
|
@ -11,9 +11,19 @@ import dayjs from 'dayjs'
|
||||
* @description format 季度 + 星期 + 几周:"YYYY-mm-dd HH:MM:SS WWW QQQQ ZZZ"
|
||||
* @returns 返回拼接后的时间字符串
|
||||
*/
|
||||
export function formatDate(date: Date, format: string): string {
|
||||
export function formatDate(date: Date, format?: string): string {
|
||||
// 日期不存在,则返回空
|
||||
if (!date) {
|
||||
return ''
|
||||
}
|
||||
// 日期存在,则进行格式化
|
||||
if (format === undefined) {
|
||||
format = 'YYYY-MM-DD HH:mm:ss'
|
||||
}
|
||||
return dayjs(date).format(format)
|
||||
}
|
||||
|
||||
// TODO 芋艿:稍后去掉
|
||||
// 日期格式化
|
||||
export function parseTime(time: any, pattern?: string) {
|
||||
if (arguments.length === 0 || !time) {
|
||||
|
Reference in New Issue
Block a user