前端页面改造基本完成 待优化
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { formatTimeToStr } from '@/utils/date'
|
||||
import { getDict } from '@/utils/dictionary'
|
||||
|
||||
export const formatBoolean = (bool) => {
|
||||
if (bool !== null) {
|
||||
@@ -15,3 +16,13 @@ export const formatDate = (time) => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
export const filterDict = (value, options) => {
|
||||
const rowLabel = options && options.filter(item => item.value === value)
|
||||
return rowLabel && rowLabel[0] && rowLabel[0].label
|
||||
}
|
||||
|
||||
export const getDictFunc = async(type) => {
|
||||
const dicts = await getDict(type)
|
||||
return dicts
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user