diff --git a/src/filters/code-filter.js b/src/filters/code-filter.js new file mode 100644 index 0000000..6803696 --- /dev/null +++ b/src/filters/code-filter.js @@ -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] + } +} \ No newline at end of file diff --git a/src/i18n/zh-CN.js b/src/i18n/zh-CN.js index d4dcc55..ee88d1a 100644 --- a/src/i18n/zh-CN.js +++ b/src/i18n/zh-CN.js @@ -573,13 +573,12 @@ t.code.code = '编码' t.code.description = '描述' t.code.eightDisciplineType = '8D类型' t.code.problemStatus = '状态' -t.code.eightDisciplineStatus = '状态' t.code.actualResponsePeriod = '实际响应周期' t.code.batchNumber = '批次数' t.code.customName = '客户' t.code.defectSource = '缺陷来源' t.code.eightDisciplineId = '8D来源id' -t.code.eightDisciplineStatus = '8D类型' +t.code.eightDisciplineStatus = '8D状态' t.code.productName = '产品名' t.code.orderNo = '订单号' t.code.productType = '产品类型' diff --git a/src/views/modules/code/components/available.vue b/src/views/modules/code/components/available.vue index eabbfa0..4188044 100644 --- a/src/views/modules/code/components/available.vue +++ b/src/views/modules/code/components/available.vue @@ -7,7 +7,7 @@ --> diff --git a/src/views/modules/code/components/eightDiscipline-add.vue b/src/views/modules/code/components/eightDiscipline-add.vue index 0a40e39..8ab83a1 100644 --- a/src/views/modules/code/components/eightDiscipline-add.vue +++ b/src/views/modules/code/components/eightDiscipline-add.vue @@ -1,8 +1,8 @@