前端页面改造基本完成 待优化

This commit is contained in:
piexlmax
2021-12-30 22:41:53 +08:00
parent 8c2b6b2bc0
commit df9dc477ed
20 changed files with 729 additions and 720 deletions
+11
View File
@@ -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
}