diff --git a/src/components/base-detail-page/index.vue b/src/components/base-detail-page/index.vue index 351d6a7..5688371 100644 --- a/src/components/base-detail-page/index.vue +++ b/src/components/base-detail-page/index.vue @@ -140,8 +140,8 @@ export default { if (!name) return null // for i18n const defaultNames = { - name: '名称', - code: '编码', + name: i18n.t('name'), + code: i18n.t('code'), remark: i18n.t('remark'), description: i18n.t('desc'), specifications: '规格' @@ -164,8 +164,8 @@ export default { btnName, btnType, defaultNames: { - name: '名称', - code: '编码', + name: i18n.t('name'), + code: i18n.t('code'), remark: i18n.t('remark'), description: i18n.t('desc'), specifications: '规格' diff --git a/src/components/base-dialog/addOrUpdate/index.vue b/src/components/base-dialog/addOrUpdate/index.vue index e05f121..96fcd63 100644 --- a/src/components/base-dialog/addOrUpdate/index.vue +++ b/src/components/base-dialog/addOrUpdate/index.vue @@ -155,8 +155,8 @@ export default { if (!name) return null // for i18n const defaultNames = { - name: '名称', - code: '编码', + name: i18n.t('name'), + code: i18n.t('code'), remark: i18n.t('remark'), description: i18n.t('desc'), specifications: '规格' @@ -179,8 +179,8 @@ export default { btnName, btnType, defaultNames: { - name: '名称', - code: '编码', + name: i18n.t('name'), + code: i18n.t('code'), remark: i18n.t('remark'), description: i18n.t('desc'), specifications: '规格' diff --git a/src/i18n/en.js b/src/i18n/en.js index 58fdbf0..73147aa 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -35,8 +35,8 @@ t.updatorName = 'Updator\'s name' t.updateTime = 'Update Time' t.version = 'Version' t.search = 'Search' -t.countPerPage = '每页数' -t.currentPage = '当前页' +t.countPerPage = '每页数' // ? +t.currentPage = '当前页' // ? t.fetchList = '获取数据列表' // ? t.multi = '多选' // ? t.do = '进行' // ? @@ -77,4 +77,15 @@ t.endTime = 'End Time' t.today = 'Today' + +t.login = {} +t.login.title = 'Login' +t.login.username = 'Username' +t.login.password = 'Password' +t.login.captcha = 'Validation Code' +t.login.demo = 'Demo' +t.login.copyright = 'CNBM' + + + export default t \ No newline at end of file diff --git a/src/i18n/zh-CN.js b/src/i18n/zh-CN.js index 1c240fc..028811a 100644 --- a/src/i18n/zh-CN.js +++ b/src/i18n/zh-CN.js @@ -7,6 +7,10 @@ t.brand = {} t.brand.lg = '生产监控系统' t.brand.mini = '监控' +// 1 代表 '' 号的替换完成 +// 2 代表 "" 号的替换完成 +// ? 代表需要单独review + t.add = '新增' // 1 t.delete = '删除' // 1 t.deleteBatch = '批量删除' // 1 @@ -44,37 +48,37 @@ t.submit = '表单提交' // ? t.desc = '描述' // 1 t.disable = '停用' // 1 t.equipment = '设备' // 1 -t.enabled = '启用状态' -t.cannotempty = '不能为空' -t.parameter = '参数名' -t.enable = '启用' -t.index = '序号' -t.relation = '关联' -t.fetchInfo = '获取信息' -t.name = '名称' -t.code = '编码' -t.attrName = '属性名称' -t.attrValue = '属性值' -t.unit = '单位' -t.table = '表' -t.table2 = '表格' -t.downloadurl = '下载地址' -t.recordTime = '记录时间' -t.notCollect = '不采集' -t.collect = '采集' -t.required = '必填' -t.paramUrl = '参数地址' -t.enname = '英文名称' -t.collectOrNot = '是否采集' -t.min = '最小值' -t.max = '最大值' -t.status = '状态', - t.normal = '正常' -t.addr = '地址' -t.planStop = '计划停机' -t.startTime = '开始时间' -t.endTime = '结束时间' -t.today = '今天' +t.enabled = '启用状态' // ? +t.cannotempty = '不能为空' // ? +t.parameter = '参数名' // 1 +t.enable = '启用' // 1 +t.index = '序号' // 1 +t.relation = '关联' // ? +t.fetchInfo = '获取信息' // ? +t.name = '名称' // 1 +t.code = '编码' // 1 +t.attrName = '属性名称' // 1 +t.attrValue = '属性值' // 1 +t.unit = '单位' // 1 +t.table = '表' // 1 +t.table2 = '表格' // 1 +t.downloadurl = '下载地址' // 1 +t.recordTime = '记录时间' // 1 +t.notCollect = '不采集' // 1 +t.collect = '采集' // 1 +t.required = '必填' // 1 +t.paramUrl = '参数地址' // 1 +t.enname = '英文名称' // 1 +t.collectOrNot = '是否采集' // 1 +t.min = '最小值' // 1 +t.max = '最大值' // 1 +t.status = '状态' // 1 +t.normal = '正常' // ? +t.addr = '地址' // 1 +t.planStop = '计划停机' // ? +t.startTime = '开始时间' // 1 +t.endTime = '结束时间' // 1 +t.today = '今天' // 1 t.alarm = {} diff --git a/src/views/modules/monitoring/equipment.vue b/src/views/modules/monitoring/equipment.vue index 20ba1ba..7028c31 100644 --- a/src/views/modules/monitoring/equipment.vue +++ b/src/views/modules/monitoring/equipment.vue @@ -40,7 +40,7 @@ import { timeFilter } from '@/utils/filters' const tableConfigs = [ { type: 'index', - name: '序号' + name: i18n.t('index') // more: { // index: function(index) { // return (index + 1) * 2 @@ -56,7 +56,7 @@ const tableConfigs = [ { prop: 'code', name: '设备编码' }, { prop: 'equipmentTypeName', name: '设备类型' }, { prop: 'groupName', name: '设备分组' }, - { prop: 'enName', name: '英文名称' }, + { prop: 'enName', name: i18n.t('enname') }, { prop: 'abbr', name: '缩写' }, { prop: 'details', @@ -80,7 +80,7 @@ const addOrUpdateConfigs = { fields: [ { name: 'name', label: '设备名称', required: true }, { name: 'code', label: '设备编码' }, - { name: 'enName', label: '英文名称' }, + { name: 'enName', label: i18n.t('enname') }, { name: 'abbr', label: '缩写' }, { name: 'equipmentTypeId', @@ -209,10 +209,10 @@ const addOrUpdateConfigs = { url: '/monitoring/equipmentAttr', relatedField: 'equipmentId', tableConfigs: [ - { type: 'index', name: '序号' }, + { type: 'index', name: i18n.t('index') }, { prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter }, - { prop: 'attrName', name: '属性名称', formField: true }, - { prop: 'attrValue', name: '属性值', formField: true }, + { prop: 'attrName', name: i18n.t('attrName'), formField: true }, + { prop: 'attrValue', name: i18n.t('attrValue'), formField: true }, { prop: 'operations', name: i18n.t('handle'), diff --git a/src/views/modules/monitoring/equipmentAlarmLog.vue b/src/views/modules/monitoring/equipmentAlarmLog.vue index 30a15ea..f454dea 100644 --- a/src/views/modules/monitoring/equipmentAlarmLog.vue +++ b/src/views/modules/monitoring/equipmentAlarmLog.vue @@ -2,7 +2,7 @@
- + {{ $t('query') }} diff --git a/src/views/modules/monitoring/equipmentFile.vue b/src/views/modules/monitoring/equipmentFile.vue index 44f4ac0..ead306f 100644 --- a/src/views/modules/monitoring/equipmentFile.vue +++ b/src/views/modules/monitoring/equipmentFile.vue @@ -2,7 +2,7 @@
- + {{ $t('query') }} @@ -51,7 +51,7 @@ const tableConfigs = [ { prop: 'version', name: '版本号' }, { prop: 'typeCode', name: '文件类型编号' }, { prop: 'fileName', name: '文件名字' }, - { prop: 'fileUrl', name: '下载地址' }, + { prop: 'fileUrl', name: i18n.t('downloadurl') }, { prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } ] diff --git a/src/views/modules/monitoring/equipmentGroupAlarm.vue b/src/views/modules/monitoring/equipmentGroupAlarm.vue index 0fbb728..f003e12 100644 --- a/src/views/modules/monitoring/equipmentGroupAlarm.vue +++ b/src/views/modules/monitoring/equipmentGroupAlarm.vue @@ -9,7 +9,7 @@ {{ $route.params.groupCode }}
diff --git a/src/views/modules/monitoring/equipmentPlc.vue b/src/views/modules/monitoring/equipmentPlc.vue index 2d81963..9071023 100644 --- a/src/views/modules/monitoring/equipmentPlc.vue +++ b/src/views/modules/monitoring/equipmentPlc.vue @@ -37,13 +37,13 @@ import TableOperateComponent from '@/components/base-table/components/operationC import TableTextComponent from '@/components/base-table/components/detailComponent' const tableConfigs = [ - { type: 'index', name: '序号' }, - { prop: 'code', name: '编码' }, - { prop: 'name', name: '名称' }, - { prop: 'enName', name: '英文名称' }, + { type: 'index', name: i18n.t('index') }, + { prop: 'code', name: i18n.t('code') }, + { prop: 'name', name: i18n.t('name') }, + { prop: 'enName', name: i18n.t('enname') }, { prop: 'description', name: i18n.t('desc') }, { prop: 'barcode', name: 'plc条码' }, - { prop: 'collection', name: '是否采集', filter: val => ({ 0: '不采集', 1: '采集' }[val]) }, + { prop: 'collection', name: i18n.t('collectOrNot'), filter: val => ({ 0: i18n.t('notCollect'), 1: i18n.t('collect') }[val]) }, { prop: 'ip', name: 'IP' }, { prop: 'port', name: '端口号' }, { prop: 'remark', name: i18n.t('remark') }, @@ -56,15 +56,15 @@ const addOrUpdateConfigs = { fields: [ { name: 'name', required: true }, { name: 'code', required: true }, - { name: 'enName', label: '英文名称' }, + { name: 'enName', label: i18n.t('enname') }, { name: 'collection', - label: '是否采集', + label: i18n.t('collectOrNot'), required: true, type: 'select', options: [ - { label: '采集', value: 1 }, - { label: '不采集', value: 0 } + { label: i18n.t('collect'), value: 1 }, + { label: i18n.t('notCollect'), value: 0 } ] }, { name: 'ip', label: 'IP', required: true, placeholder: '0.0.0.0' }, diff --git a/src/views/modules/monitoring/equipmentPlcConnect.vue b/src/views/modules/monitoring/equipmentPlcConnect.vue index 10ba3a7..9c10a98 100644 --- a/src/views/modules/monitoring/equipmentPlcConnect.vue +++ b/src/views/modules/monitoring/equipmentPlcConnect.vue @@ -40,7 +40,7 @@ import { dictFilter } from '@/utils/filters' // import axios from '@/utils/request.js' const tableConfigs = [ - { type: 'index', name: '序号' }, + { type: 'index', name: i18n.t('index') }, { prop: 'lineName', name: '产线' }, { prop: 'sectionName', name: '工段' }, { prop: 'equName', name: i18n.t('equipment') }, @@ -73,41 +73,41 @@ const addOrUpdateConfigs = { url: '/monitoring/equipmentPlcParam', relatedField: 'plcConId', tableConfigs: [ - { type: 'index', name: '序号' }, + { type: 'index', name: i18n.t('index') }, // { prop: 'plcConId', name: 'plc连接表ID' }, - { prop: 'paramCode', name: '参数编码', formField: true, rules: [{ required: true, message: '必填', trigger: 'blur' }] }, - { prop: 'paramName', name: '参数名称', formField: true, rules: [{ required: true, message: '必填', trigger: 'blur' }] }, - { prop: 'paramAddress', name: '参数地址', formField: true }, - { prop: 'unitDictValue', name: '单位', filter: dictFilter(UnitDictTypeId), formField: true, formType: 'select', formOptions: getUnitList() }, - { prop: 'minValue', name: '最小值', formField: true }, - { prop: 'maxValue', name: '最大值', formField: true }, + { prop: 'paramCode', name: '参数编码', formField: true, rules: [{ required: true, message: i18n.t('required'), trigger: 'blur' }] }, + { prop: 'paramName', name: '参数名称', formField: true, rules: [{ required: true, message: i18n.t('required'), trigger: 'blur' }] }, + { prop: 'paramAddress', name: i18n.t('paramUrl'), formField: true }, + { prop: 'unitDictValue', name: i18n.t('unit'), filter: dictFilter(UnitDictTypeId), formField: true, formType: 'select', formOptions: getUnitList() }, + { prop: 'minValue', name: i18n.t('min'), formField: true }, + { prop: 'maxValue', name: i18n.t('max'), formField: true }, { prop: 'defaultValue', name: '参数设定标准值', formField: true }, { prop: 'description', name: i18n.t('desc'), formField: true }, { prop: 'enabled', - name: '启用状态', - filter: val => [i18n.t('disable'), '启用'][+val], - // filter: val => ({0:i18n.t('disable'), 1:'启用'}[+val]), - rules: [{ required: true, message: '必填', trigger: 'blur' }], + name: i18n.t('enabled'), + filter: val => [i18n.t('disable'), i18n.t('enable')][+val], + // filter: val => ({0:i18n.t('disable'), 1:i18n.t('enable')}[+val]), + rules: [{ required: true, message: i18n.t('required'), trigger: 'blur' }], formField: true, formType: 'select', formOptions: [ { value: 0, label: i18n.t('disable') }, - { value: 1, label: '启用' } + { value: 1, label: i18n.t('enable') } ] }, { prop: 'remark', name: i18n.t('remark'), formField: true }, // { prop: 'createTime', name: i18n.t('createTime') }, { prop: 'collection', - name: '是否采集', - filter: val => ['不采集', '采集'][+val], - rules: [{ required: true, message: '必填', trigger: 'blur' }], + name: i18n.t('collectOrNot'), + filter: val => [i18n.t('notCollect'), i18n.t('collect')][+val], + rules: [{ required: true, message: i18n.t('required'), trigger: 'blur' }], formField: true, formType: 'select', formOptions: [ - { value: 0, label: '不采集' }, - { value: 1, label: '采集' } + { value: 0, label: i18n.t('notCollect') }, + { value: 1, label: i18n.t('collect') } ] }, { prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } diff --git a/src/views/modules/monitoring/equipmentPlcParam.vue b/src/views/modules/monitoring/equipmentPlcParam.vue index 8559b09..a27441e 100644 --- a/src/views/modules/monitoring/equipmentPlcParam.vue +++ b/src/views/modules/monitoring/equipmentPlcParam.vue @@ -2,7 +2,7 @@
- + {{ $t('query') }} @@ -39,19 +39,19 @@ import { dictFilter } from '@/utils/filters' const UnitDictTypeId = '1557173812109242370' const tableConfigs = [ - { type: 'index', name: '序号' }, + { type: 'index', name: i18n.t('index') }, { prop: 'plcConId', name: 'plc连接表ID' }, { prop: 'paramCode', name: '参数编码' }, { prop: 'paramName', name: '参数名称' }, - { prop: 'paramAddress', name: '参数地址' }, - { prop: 'unitDictValue', name: '单位', filter: dictFilter(UnitDictTypeId) }, - { prop: 'minValue', name: '最小值' }, - { prop: 'maxValue', name: '最大值' }, + { prop: 'paramAddress', name: i18n.t('paramUrl') }, + { prop: 'unitDictValue', name: i18n.t('unit'), filter: dictFilter(UnitDictTypeId) }, + { prop: 'minValue', name: i18n.t('min') }, + { prop: 'maxValue', name: i18n.t('max') }, { prop: 'defaultValue', name: '参数设定标准值' }, { prop: 'description', name: i18n.t('desc') }, - { prop: 'enabled', name: '启用状态', filter: val => [i18n.t('disable'), '启用'][+val] }, + { prop: 'enabled', name: i18n.t('enabled'), filter: val => [i18n.t('disable'), i18n.t('enable')][+val] }, { prop: 'remark', name: i18n.t('remark') }, - { prop: 'collection', name: '是否采集', filter: val => ['不采集', '采集'][+val] } + { prop: 'collection', name: i18n.t('collectOrNot'), filter: val => [i18n.t('notCollect'), i18n.t('collect')][+val] } ] export default { diff --git a/src/views/modules/monitoring/equipmentQuantity-add-or-update.vue b/src/views/modules/monitoring/equipmentQuantity-add-or-update.vue index c7c1b77..f2d791c 100644 --- a/src/views/modules/monitoring/equipmentQuantity-add-or-update.vue +++ b/src/views/modules/monitoring/equipmentQuantity-add-or-update.vue @@ -90,9 +90,9 @@ export default { equipmentName: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }], inQuantity: [{ required: true, message: '进入设备的数量不能为空', trigger: 'blur' }], outQuantity: [{ required: true, message: '离开设备的数量,若plc只记录一个生产数量,也写入该字段不能为空', trigger: 'blur' }], - okQuantity: [{ required: true, message: '不能为空', trigger: 'blur' }], + okQuantity: [{ required: true, message: i18n.t('cannotempty'), trigger: 'blur' }], nokQuantity: [{ required: true, message: '设备上报的报废数量不能为空', trigger: 'blur' }], - description: [{ required: true, message: '不能为空', trigger: 'blur' }], + description: [{ required: true, message: i18n.t('cannotempty'), trigger: 'blur' }], remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }], valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }], creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }], diff --git a/src/views/modules/monitoring/equipmentQuantity.vue b/src/views/modules/monitoring/equipmentQuantity.vue index 1c3ad76..654a50a 100644 --- a/src/views/modules/monitoring/equipmentQuantity.vue +++ b/src/views/modules/monitoring/equipmentQuantity.vue @@ -2,7 +2,7 @@
- + {{ $t('query') }} diff --git a/src/views/modules/monitoring/equipmentStatusLog.vue b/src/views/modules/monitoring/equipmentStatusLog.vue index cf67622..f449657 100644 --- a/src/views/modules/monitoring/equipmentStatusLog.vue +++ b/src/views/modules/monitoring/equipmentStatusLog.vue @@ -2,7 +2,7 @@
- + {{ $t('query') }} @@ -43,7 +43,7 @@ const tableConfigs = [ { prop: 'equipmentId', name: '设备id' }, { prop: 'equipmentName', name: '设备名称' }, { prop: 'status', name: '状态,0正常 1计划停机 2故障' }, - { prop: 'logTime', name: '记录时间' }, + { prop: 'logTime', name: i18n.t('recordTime') }, { prop: 'remark', name: i18n.t('remark') }, { prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' }, { prop: 'creatorId', name: '创建人' }, diff --git a/src/views/modules/monitoring/equipmentTypeFile.vue b/src/views/modules/monitoring/equipmentTypeFile.vue index ed6e856..71ecd21 100644 --- a/src/views/modules/monitoring/equipmentTypeFile.vue +++ b/src/views/modules/monitoring/equipmentTypeFile.vue @@ -2,7 +2,7 @@
- + {{ $t('query') }} @@ -41,7 +41,7 @@ const tableConfigs = [ { prop: 'fileId', name: '文件ID' }, { prop: 'typeCode', name: '文件类型编码' }, { prop: 'fileName', name: '文件名称' }, - { prop: 'fileUrl', name: '下载地址' }, + { prop: 'fileUrl', name: i18n.t('downloadurl') }, { prop: 'description', name: i18n.t('desc') }, { prop: 'enabled', name: '启用状态:0 、停用,1、启用' }, { prop: 'remark', name: i18n.t('remark') }, diff --git a/src/views/modules/monitoring/equipmentattr.vue b/src/views/modules/monitoring/equipmentattr.vue index 1b415dd..75543d2 100644 --- a/src/views/modules/monitoring/equipmentattr.vue +++ b/src/views/modules/monitoring/equipmentattr.vue @@ -2,7 +2,7 @@
- + {{ $t('query') }} @@ -39,7 +39,7 @@ const tableConfigs = [ { prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter }, { prop: 'equipmentId', name: '设备ID' }, { prop: 'attrName', name: '属性名' }, - { prop: 'attrValue', name: '属性值' }, + { prop: 'attrValue', name: i18n.t('attrValue') }, { prop: 'operations', name: i18n.t('handle'), diff --git a/src/views/modules/monitoring/factory.vue b/src/views/modules/monitoring/factory.vue index 8e9b11b..76f557c 100644 --- a/src/views/modules/monitoring/factory.vue +++ b/src/views/modules/monitoring/factory.vue @@ -40,7 +40,7 @@ const tableConfigs = [ { prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter }, { prop: 'name', name: '工厂名称' }, { prop: 'code', name: '工厂编码' }, - { prop: 'address', name: '地址' }, + { prop: 'address', name: i18n.t('addr') }, { prop: 'remark', name: i18n.t('remark') }, { prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } ] @@ -56,7 +56,7 @@ const addOrUpdateConfigs = { }, { name: 'address', - label: '地址', + label: i18n.t('addr'), placeholder: '请输入地址' }, 'remark' diff --git a/src/views/modules/monitoring/product.vue b/src/views/modules/monitoring/product.vue index 0493e77..4c50d36 100644 --- a/src/views/modules/monitoring/product.vue +++ b/src/views/modules/monitoring/product.vue @@ -46,12 +46,12 @@ import { dictFilter } from '@/utils/filters' const UnitDictTypeId = '1557173812109242370' const ProductTypeDictTypeId = '1557179530308616193' const tableConfigs = [ - { type: 'index', name: '序号' }, + { type: 'index', name: i18n.t('index') }, { prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter }, { prop: 'name', name: '产品名称' }, { prop: 'code', name: '产品编码' }, { prop: 'specifications', name: '规格' }, - { prop: 'unitDictValue', name: '单位', filter: dictFilter(UnitDictTypeId) }, + { prop: 'unitDictValue', name: i18n.t('unit'), filter: dictFilter(UnitDictTypeId) }, { prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['viewAttr', 'delete'] } ] @@ -89,7 +89,7 @@ const addOrUpdateConfigs = { }, { name: 'unitDictValue', - label: '单位', + label: i18n.t('unit'), type: 'select', // placeholder: '请选择单位', options: [ @@ -116,10 +116,10 @@ const addOrUpdateConfigs = { url: '/monitoring/productArrt', relatedField: 'productId', tableConfigs: [ - { type: 'index', name: '序号' }, + { type: 'index', name: i18n.t('index') }, { prop: 'createTime', name: i18n.t('createTime'), filter: val => (val ? moment(val).format('YYYY-MM-DD hh:mm:ss') : '-') }, - { prop: 'name', name: '属性名', formField: true, rules: [{ required: true, message: '必填', trigger: 'blur' }] }, - { prop: 'code', name: '属性值', formField: true }, + { prop: 'name', name: '属性名', formField: true, rules: [{ required: true, message: i18n.t('required'), trigger: 'blur' }] }, + { prop: 'code', name: i18n.t('attrValue'), formField: true }, { prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } ] } diff --git a/src/views/modules/monitoring/productArrt.vue b/src/views/modules/monitoring/productArrt.vue index 535ee1a..c229985 100644 --- a/src/views/modules/monitoring/productArrt.vue +++ b/src/views/modules/monitoring/productArrt.vue @@ -2,7 +2,7 @@
- + {{ $t('query') }} @@ -38,10 +38,10 @@ import TableOperateComponent from '@/components/base-table/components/operationC const tableConfigs = [ { prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter }, - { prop: 'name', name: '属性名称' }, + { prop: 'name', name: i18n.t('attrName') }, { prop: 'code', name: '属性编码' }, { prop: 'productId', name: '产品id' }, - { prop: 'value', name: '属性值' }, + { prop: 'value', name: i18n.t('attrValue') }, { prop: 'description', name: i18n.t('desc') }, { prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } ] @@ -52,7 +52,7 @@ const addOrUpdateConfigs = { fields: [ { name: 'name', - label: '属性名称', + label: i18n.t('attrName'), placeholder: '请输入属性名称' }, { @@ -68,7 +68,7 @@ const addOrUpdateConfigs = { }, { name: 'value', - label: '属性值', + label: i18n.t('attrValue'), placeholder: '请输入属性值' }, { diff --git a/src/views/modules/monitoring/productionLineRecSch.vue b/src/views/modules/monitoring/productionLineRecSch.vue index 2d9b304..9496ed0 100644 --- a/src/views/modules/monitoring/productionLineRecSch.vue +++ b/src/views/modules/monitoring/productionLineRecSch.vue @@ -2,7 +2,7 @@
- + {{ $t('query') }} @@ -40,7 +40,7 @@ const tableConfigs = [ { prop: 'productionLineId', name: '产线id' }, { prop: 'inputNum', name: '上一次记录时间至该条记录时间端内上片数量' }, { prop: 'outputNum', name: '上一次记录时间至该条记录时间端内下片数量' }, - { prop: 'recordTime', name: '记录时间' }, + { prop: 'recordTime', name: i18n.t('recordTime') }, { prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' }, { prop: 'sumInputNum', name: '该记录时间点的累计上片数量' }, { prop: 'sumOutputNum', name: '该记录时间点的累计下片数量' }, diff --git a/src/views/modules/monitoring/qualityInspectionCurrent.vue b/src/views/modules/monitoring/qualityInspectionCurrent.vue index 2d16278..d82abce 100644 --- a/src/views/modules/monitoring/qualityInspectionCurrent.vue +++ b/src/views/modules/monitoring/qualityInspectionCurrent.vue @@ -69,14 +69,14 @@ import SmallTitle from '@/components/small-title' import * as echarts from 'echarts' const tableConfigStatic = [ - { type: 'index', name: '序号' }, + { type: 'index', name: i18n.t('index') }, { name: '上片总数', prop: 'sumUp' }, { name: '下片总数', prop: 'sumDown' }, { name: '检测总数', prop: 'sumCheck' }, { name: '比例', prop: 'scrapRatio', filter: val => (val || val === 0 ? `${val}%` : '-') } ] const tableConfigDynamic = [ - { type: 'index', name: '序号' }, + { type: 'index', name: i18n.t('index') }, { name: '检测类型', prop: 'inspectionContent' }, /** dynamic */ { name: '检测类型总数', prop: '' }, @@ -192,7 +192,7 @@ const FakeChart = { } } -const dict = ['表格', '图形'] +const dict = [i18n.t('table2'), '图形'] export default { name: 'QualityInspectionCurrent', components: { BaseTable, SmallTitle, FakeChart }, @@ -209,7 +209,7 @@ export default { quickOptions: { shortcuts: [ { - text: '今天', + text: i18n.t('today'), onClick(picker) { const baseTime = moment().set({ hour: 0, minute: 0, second: 0, millisecond: 0 }) const startTime = baseTime.format('yyyy-MM-DDTHH:mm:ss') @@ -233,7 +233,7 @@ export default { }, getDataList() { this.showGraph = false - this.dataType = '表格' + this.dataType = i18n.t('table2') this.echartCategories = null this.echartCheckTypes.splice(0) /** 设置默认日期 */ @@ -280,7 +280,7 @@ export default { } this.tableConfigDynamic = [ - { type: 'index', name: '序号' }, + { type: 'index', name: i18n.t('index') }, { name: '检测类型', prop: 'inspectionContent' }, ...subProps, { name: '检测类型总数', prop: 'sumInput' }, diff --git a/src/views/modules/monitoring/qualityInspectionRecord.vue b/src/views/modules/monitoring/qualityInspectionRecord.vue index fb10902..201149d 100644 --- a/src/views/modules/monitoring/qualityInspectionRecord.vue +++ b/src/views/modules/monitoring/qualityInspectionRecord.vue @@ -2,7 +2,7 @@
{{ $t('query') }} diff --git a/src/views/modules/monitoring/reportDetail.vue b/src/views/modules/monitoring/reportDetail.vue index 4bfc97a..de8f0a0 100644 --- a/src/views/modules/monitoring/reportDetail.vue +++ b/src/views/modules/monitoring/reportDetail.vue @@ -117,7 +117,7 @@ export default { if (res.data && res.data.list) { const categories = res.data.list.map(item => ({ label: item.name, value: item.id })) this.tableConfigs = [ - { type: 'index', name: '序号' }, + { type: 'index', name: i18n.t('index') }, { prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter, width: 200 }, { prop: 'fileName', name: '报表名称' }, { prop: 'category', name: '报表分类', subcomponent: CategoryList, options: categories }, diff --git a/src/views/modules/monitoring/reportSheet.vue b/src/views/modules/monitoring/reportSheet.vue index 8071554..d9cb527 100644 --- a/src/views/modules/monitoring/reportSheet.vue +++ b/src/views/modules/monitoring/reportSheet.vue @@ -2,7 +2,7 @@
- + {{ $t('query') }} diff --git a/src/views/modules/monitoring/reportSheetCategory.vue b/src/views/modules/monitoring/reportSheetCategory.vue index e05bbb1..d810969 100644 --- a/src/views/modules/monitoring/reportSheetCategory.vue +++ b/src/views/modules/monitoring/reportSheetCategory.vue @@ -2,7 +2,7 @@
- + {{ $t('query') }} diff --git a/src/views/modules/monitoring/sysfile.vue b/src/views/modules/monitoring/sysfile.vue index 16ed309..70f9d72 100644 --- a/src/views/modules/monitoring/sysfile.vue +++ b/src/views/modules/monitoring/sysfile.vue @@ -2,7 +2,7 @@
- + {{ $t('query') }} diff --git a/src/views/modules/monitoring/sysfileType.vue b/src/views/modules/monitoring/sysfileType.vue index 836ed70..2a70a65 100644 --- a/src/views/modules/monitoring/sysfileType.vue +++ b/src/views/modules/monitoring/sysfileType.vue @@ -2,7 +2,7 @@
- + {{ $t('query') }} diff --git a/src/views/modules/monitoring/testMultiBaseTable.vue b/src/views/modules/monitoring/testMultiBaseTable.vue index fd5a43c..c2a6415 100644 --- a/src/views/modules/monitoring/testMultiBaseTable.vue +++ b/src/views/modules/monitoring/testMultiBaseTable.vue @@ -15,9 +15,9 @@ export default { return { configs: [ { prop: 'createTime', name: '创建日期' }, - { prop: 'name', name: '名称' }, + { prop: 'name', name: i18n.t('name') }, { - label: '地址', + label: i18n.t('addr'), children: [ { prop: 'province', name: '省' }, { @@ -30,7 +30,7 @@ export default { } ] }, - { prop: 'status', name: '状态', filter: val => ['激活', '注销'][val] } + { prop: 'status', name: i18n.t('status'), filter: val => ['激活', '注销'][val] } ], dataList: [ { createTime: '2022-01-01', name: '奥特曼', province: '北京', city: '昌平', county: '怀宁', downtown: '石牌', status: 0 }, diff --git a/src/views/modules/monitoring/workShopSectionEquipment.vue b/src/views/modules/monitoring/workShopSectionEquipment.vue index e21ad8e..897474c 100644 --- a/src/views/modules/monitoring/workShopSectionEquipment.vue +++ b/src/views/modules/monitoring/workShopSectionEquipment.vue @@ -2,7 +2,7 @@
- + {{ $t('query') }}