修改bug
This commit is contained in:
31
src/filters/code-filter.js
Normal file
31
src/filters/code-filter.js
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
/*
|
||||
* @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: '重复发生问题',
|
||||
}
|
||||
}
|
||||
|
||||
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]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user