/* * @Date: 2020-12-29 16:49:28 * @LastEditors: zwq * @LastEditTime: 2023-01-05 15:49:17 * @FilePath: \basic-admin\src\filters\basicData\index.js * @Description: */ import moment from 'moment' const table = { eightDisciplineType: { 1: '客诉问题', 2: '重大质量问题', 0: '重复发生问题', }, examineStatus: { 1: '需要审批', 0: '不需要审批', } } export function timeFormatter(timeObj) { if (timeObj) { return moment(timeObj).format('YYYY-MM-DD HH:mm:ss') } else { return '-' } } export default function(dictTable) { return function(val) { return table?.[dictTable]?.[val] } }