diff --git a/public/index.html b/public/index.html index 2651e99..8ac36ad 100644 --- a/public/index.html +++ b/public/index.html @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2022-08-22 14:57:50 * @LastEditors: zwq - * @LastEditTime: 2023-04-10 13:55:02 + * @LastEditTime: 2023-06-20 16:49:12 * @Description: --> @@ -37,7 +37,7 @@ <% if (process.env.VUE_APP_NODE_ENV === 'dev') { %> @@ -45,19 +45,19 @@ <% if (process.env.VUE_APP_NODE_ENV === 'prod:sit') { %> <% } %> <% if (process.env.VUE_APP_NODE_ENV === 'prod:uat') { %> <% } %> <% if (process.env.VUE_APP_NODE_ENV === 'prod') { %> <% } %> diff --git a/src/i18n/en.js b/src/i18n/en.js index 9dc894e..26a4b50 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -1,4 +1,4 @@ -import module from './en' +import module from './eng' const t = {} t.module = module @@ -14,6 +14,8 @@ t.public.operation = 'operation' t.add = 'add' t.delete = 'delete' +t.edit = 'edit' +t.detail = 'detail' t.deleteBatch = 'deleteBatch' t.update = 'update' t.query = 'query' @@ -28,6 +30,11 @@ t.createDate = 'createDate' t.keyword = 'keyword:' t.choose = 'choose' +t.placeholder = {} +t.placeholder.name = 'Please enter name' +t.placeholder.code = 'Please enter code' +t.placeholder.sampleSize = 'Please enter sample size' + t.prompt = {} t.prompt.title = 'Tips' t.prompt.info = '确定进行[{handle}]操作?' diff --git a/src/i18n/en/basicData.js b/src/i18n/en/basicData.js deleted file mode 100644 index 7cb9c9f..0000000 --- a/src/i18n/en/basicData.js +++ /dev/null @@ -1,14 +0,0 @@ -/* - * @Author: zwq - * @Date: 2023-02-28 14:21:52 - * @LastEditors: zwq - * @LastEditTime: 2023-02-28 14:24:19 - * @Description: - */ - -export default { - name: 'name', - code: 'code', - status: 'status', - createTime: 'create time', -} diff --git a/src/i18n/eng/basicData.js b/src/i18n/eng/basicData.js new file mode 100644 index 0000000..6bfab6c --- /dev/null +++ b/src/i18n/eng/basicData.js @@ -0,0 +1,27 @@ +/* + * @Author: zwq + * @Date: 2023-02-28 14:21:52 + * @LastEditors: zwq + * @LastEditTime: 2023-02-28 14:24:19 + * @Description: + */ + +export default { + name: 'name', + code: 'code', + type: 'type', + address: 'address', + descs: 'description', + status: 'status', + site: 'site', + machine: 'machine', + specs: 'specs', + drawing: 'drawing', + productType: 'product type', + inspectionStandard: 'standard', + inspectionStage: 'stage', + platformGroup: 'site grouping', + measureType: 'measure type', + sampleSize: 'sample size', + createTime: 'create time', +} diff --git a/src/i18n/en/index.js b/src/i18n/eng/index.js similarity index 100% rename from src/i18n/en/index.js rename to src/i18n/eng/index.js diff --git a/src/i18n/zh-CN.js b/src/i18n/zh-CN.js index 6645a68..19a41df 100644 --- a/src/i18n/zh-CN.js +++ b/src/i18n/zh-CN.js @@ -11,6 +11,8 @@ t.brand.mini = 'spc' t.add = '新增' t.delete = '删除' +t.edit = '编辑' +t.detail = '详情' t.deleteBatch = '删除' t.update = '修改' t.query = '查询' @@ -25,6 +27,12 @@ t.createDate = '创建时间' t.keyword = '关键字:' t.choose = '请选择' + +t.placeholder = {} +t.placeholder.name = '请输入名称' +t.placeholder.code = '请输入编码' +t.placeholder.sampleSize = '请输入样本大小' + t.prompt = {} t.prompt.title = '提示' t.prompt.info = '确定进行[{handle}]操作?' diff --git a/src/i18n/zh/basicData.js b/src/i18n/zh/basicData.js index c3aa84c..285b1db 100644 --- a/src/i18n/zh/basicData.js +++ b/src/i18n/zh/basicData.js @@ -2,13 +2,26 @@ * @Author: zwq * @Date: 2023-02-28 14:21:52 * @LastEditors: zwq - * @LastEditTime: 2023-02-28 14:24:19 + * @LastEditTime: 2023-06-21 13:56:25 * @Description: */ export default { name: '名称', code: '编码', + type: '类型', + address: '联系地址', + descs: '描述', status: '状态', + site: '站点', + machine: '机台', + specs: '规格', + drawing: '图纸', + productType: '产品类型', + inspectionStandard: '检验标准', + inspectionStage: '检验阶段', + platformGroup: '站点分组', + measureType: '测量类型', + sampleSize: '样本大小', createTime: '添加时间', } diff --git a/src/mixins/basic-page.js b/src/mixins/basic-page.js index f8f15dd..c2cf9a6 100644 --- a/src/mixins/basic-page.js +++ b/src/mixins/basic-page.js @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2022-08-24 11:19:43 * @LastEditors: zwq - * @LastEditTime: 2023-04-20 10:48:23 + * @LastEditTime: 2023-06-21 16:28:38 * @Description: */ export default { @@ -68,7 +68,7 @@ export default { // 新增 / 修改 addOrUpdateHandle(id) { this.addOrUpdateVisible = true; - this.addOrEditTitle = "编辑"; + this.addOrEditTitle = this.$t('add'); this.$nextTick(() => { this.$refs.addOrUpdate.init(id); }); @@ -100,7 +100,7 @@ export default { handleClick(val) { if (val.type === "edit") { this.addOrUpdateVisible = true; - this.addOrEditTitle = "编辑"; + this.addOrEditTitle = this.$t('edit'); this.$nextTick(() => { this.$refs.addOrUpdate.init(val.data.id); }); @@ -147,7 +147,7 @@ export default { this.getDataList(); break; case "add": - this.addOrEditTitle = '新增' + this.addOrEditTitle = this.$t('add'); this.addOrUpdateVisible = true; this.addOrUpdateHandle() break; diff --git a/src/views/modules/job/schedule.vue b/src/views/modules/job/schedule.vue index 4c80685..54c1f96 100644 --- a/src/views/modules/job/schedule.vue +++ b/src/views/modules/job/schedule.vue @@ -13,7 +13,7 @@ v-if="tableBtn.length" slot="handleBtn" :width="200" - label="操作" + :label="$t('handle')" :method-list="tableBtn" @clickBtn="handleClick" /> @@ -72,7 +72,7 @@ const tableProps = [ const tableBtn = [ { type: "edit", - btnName: "编辑", + btnName: i18n.t("edit"), }, { type: "pause", @@ -88,7 +88,7 @@ const tableBtn = [ }, { type: "delete", - btnName: "删除", + btnName: i18n.t("delete"), }, ]; export default { @@ -115,13 +115,13 @@ export default { }, { type: "button", - btnName: "查询", + btnName: i18n.t("query"), name: "search", color: "primary", }, { type: "button", - btnName: "新增", + btnName: i18n.t("add"), name: "add", color: "primary", plain: true, @@ -149,7 +149,7 @@ export default { this.getDataList(); break; case "add": - this.addOrEditTitle = '新增' + this.addOrEditTitle = this.$t('add'); this.addOrUpdateVisible = true; this.addOrUpdateHandle() break; diff --git a/src/views/modules/sys/dept.vue b/src/views/modules/sys/dept.vue index afed196..049cf4c 100644 --- a/src/views/modules/sys/dept.vue +++ b/src/views/modules/sys/dept.vue @@ -21,7 +21,7 @@ v-if="tableBtn.length" slot="handleBtn" :width="100" - label="操作" + :label="$t('handle')" :method-list="tableBtn" @clickBtn="handleClick" /> @@ -61,11 +61,11 @@ const tableProps = [ const tableBtn = [ { type: "edit", - btnName: "编辑", + btnName: i18n.t("edit"), }, { type: "delete", - btnName: "删除", + btnName: i18n.t("delete"), }, ]; export default { @@ -81,7 +81,7 @@ export default { formConfig: [ { type: "button", - btnName: "新增", + btnName: i18n.t("add"), name: "add", color: "primary", plain: true, diff --git a/src/views/modules/sys/dict-data.vue b/src/views/modules/sys/dict-data.vue index d453b1b..fe5a88c 100644 --- a/src/views/modules/sys/dict-data.vue +++ b/src/views/modules/sys/dict-data.vue @@ -12,7 +12,7 @@ v-if="tableBtn.length" slot="handleBtn" :width="100" - label="操作" + :label="$t('handle')" :method-list="tableBtn" @clickBtn="handleClick" /> @@ -66,11 +66,11 @@ const tableProps = [ const tableBtn = [ { type: "edit", - btnName: "编辑", + btnName: i18n.t("edit"), }, { type: "delete", - btnName: "删除", + btnName: i18n.t("delete"), }, ]; export default { @@ -98,13 +98,13 @@ export default { }, { type: "button", - btnName: "查询", + btnName: i18n.t("query"), name: "search", color: "primary", }, { type: "button", - btnName: "新增", + btnName: i18n.t("add"), name: "add", color: "primary", plain: true, @@ -130,7 +130,7 @@ export default { this.getDataList(); break; case "add": - this.addOrEditTitle = '新增' + this.addOrEditTitle = this.$t('add'); this.addOrUpdateVisible = true; this.addOrUpdateHandle() break; diff --git a/src/views/modules/sys/dict-type.vue b/src/views/modules/sys/dict-type.vue index fb10e5d..7166615 100644 --- a/src/views/modules/sys/dict-type.vue +++ b/src/views/modules/sys/dict-type.vue @@ -12,7 +12,7 @@ v-if="tableBtn.length" slot="handleBtn" :width="100" - label="操作" + :label="$t('handle')" :method-list="tableBtn" @clickBtn="handleClick" /> @@ -68,11 +68,11 @@ const tableProps = [ const tableBtn = [ { type: "edit", - btnName: "编辑", + btnName: i18n.t("edit"), }, { type: "delete", - btnName: "删除", + btnName: i18n.t("delete"), }, ]; export default { @@ -100,13 +100,13 @@ export default { }, { type: "button", - btnName: "查询", + btnName: i18n.t("query"), name: "search", color: "primary", }, { type: "button", - btnName: "新增", + btnName: i18n.t("add"), name: "add", color: "primary", plain: true, @@ -128,7 +128,7 @@ export default { this.getDataList(); break; case "add": - this.addOrEditTitle = '新增' + this.addOrEditTitle = this.$t('add'); this.addOrUpdateVisible = true; this.addOrUpdateHandle() break; diff --git a/src/views/modules/sys/log-error.vue b/src/views/modules/sys/log-error.vue index 99b9e50..239e527 100644 --- a/src/views/modules/sys/log-error.vue +++ b/src/views/modules/sys/log-error.vue @@ -68,7 +68,7 @@ export default { formConfig: [ { type: "button", - btnName: "导出", + btnName: i18n.t("export"), name: "export", color: "primary", }, diff --git a/src/views/modules/sys/log-login.vue b/src/views/modules/sys/log-login.vue index 474ce57..761b5fc 100644 --- a/src/views/modules/sys/log-login.vue +++ b/src/views/modules/sys/log-login.vue @@ -76,7 +76,7 @@ export default { }, { type: "select", - label: "状态", + label: i18n.t("module.basicData.status"), selectOptions: [ { id: "0", name: i18n.t("logLogin.status0") }, { id: "1", name: i18n.t("logLogin.status1") }, @@ -89,7 +89,7 @@ export default { }, { type: "button", - btnName: "查询", + btnName: i18n.t("query"), name: "search", color: "primary", }, @@ -108,7 +108,7 @@ export default { this.getDataList(); break; case "add": - this.addOrEditTitle = '新增' + this.addOrEditTitle = this.$t('add'); this.addOrUpdateVisible = true; this.addOrUpdateHandle() break; diff --git a/src/views/modules/sys/log-operation.vue b/src/views/modules/sys/log-operation.vue index f8441f4..8b2c4ad 100644 --- a/src/views/modules/sys/log-operation.vue +++ b/src/views/modules/sys/log-operation.vue @@ -84,7 +84,7 @@ export default { formConfig: [ { type: "select", - label: "状态", + label: i18n.t("module.basicData.status"), selectOptions: [ { id: "0", name: i18n.t("logOperation.status0") }, { id: "1", name: i18n.t("logOperation.status1") }, @@ -96,7 +96,7 @@ export default { }, { type: "button", - btnName: "查询", + btnName: i18n.t("query"), name: "search", color: "primary", }, @@ -114,7 +114,7 @@ export default { this.getDataList(); break; case "add": - this.addOrEditTitle = '新增' + this.addOrEditTitle = this.$t('add'); this.addOrUpdateVisible = true; this.addOrUpdateHandle() break; diff --git a/src/views/modules/sys/menu.vue b/src/views/modules/sys/menu.vue index 8fdc821..2294a38 100644 --- a/src/views/modules/sys/menu.vue +++ b/src/views/modules/sys/menu.vue @@ -21,7 +21,7 @@ v-if="tableBtn.length" slot="handleBtn" :width="100" - label="操作" + :label="$t('handle')" :method-list="tableBtn" @clickBtn="handleClick" /> @@ -75,11 +75,11 @@ const tableProps = [ const tableBtn = [ { type: "edit", - btnName: "编辑", + btnName: i18n.t("edit"), }, { type: "delete", - btnName: "删除", + btnName: i18n.t("delete"), }, ]; export default { @@ -95,7 +95,7 @@ export default { formConfig: [ { type: "button", - btnName: "新增", + btnName: i18n.t("add"), name: "add", color: "primary", plain: true, diff --git a/src/views/modules/sys/params.vue b/src/views/modules/sys/params.vue index 43219da..fa72c3f 100644 --- a/src/views/modules/sys/params.vue +++ b/src/views/modules/sys/params.vue @@ -12,7 +12,7 @@ v-if="tableBtn.length" slot="handleBtn" :width="100" - label="操作" + :label="$t('handle')" :method-list="tableBtn" @clickBtn="handleClick" /> @@ -58,11 +58,11 @@ const tableProps = [ const tableBtn = [ { type: "edit", - btnName: "编辑", + btnName: i18n.t("edit"), }, { type: "delete", - btnName: "删除", + btnName: i18n.t("delete"), }, ]; export default { @@ -84,13 +84,13 @@ export default { }, { type: "button", - btnName: "查询", + btnName: i18n.t("query"), name: "search", color: "primary", }, { type: "button", - btnName: "新增", + btnName: i18n.t("add"), name: "add", color: "primary", plain: true, @@ -111,7 +111,7 @@ export default { this.getDataList(); break; case "add": - this.addOrEditTitle = '新增' + this.addOrEditTitle = this.$t('add'); this.addOrUpdateVisible = true; this.addOrUpdateHandle() break; diff --git a/src/views/modules/sys/role.vue b/src/views/modules/sys/role.vue index cf7106e..f20972c 100644 --- a/src/views/modules/sys/role.vue +++ b/src/views/modules/sys/role.vue @@ -12,7 +12,7 @@ v-if="tableBtn.length" slot="handleBtn" :width="100" - label="操作" + :label="$t('handle')" :method-list="tableBtn" @clickBtn="handleClick" /> @@ -58,11 +58,11 @@ const tableProps = [ const tableBtn = [ { type: "edit", - btnName: "编辑", + btnName: i18n.t("edit"), }, { type: "delete", - btnName: "删除", + btnName: i18n.t("delete"), }, ]; export default { @@ -84,13 +84,13 @@ export default { }, { type: "button", - btnName: "查询", + btnName: i18n.t("query"), name: "search", color: "primary", }, { type: "button", - btnName: "新增", + btnName: i18n.t("add"), name: "add", color: "primary", plain: true, @@ -111,7 +111,7 @@ export default { this.getDataList(); break; case "add": - this.addOrEditTitle = '新增' + this.addOrEditTitle = this.$t('add'); this.addOrUpdateVisible = true; this.addOrUpdateHandle() break; diff --git a/src/views/modules/sys/user.vue b/src/views/modules/sys/user.vue index c54fd99..4d7b0e8 100644 --- a/src/views/modules/sys/user.vue +++ b/src/views/modules/sys/user.vue @@ -12,7 +12,7 @@ v-if="tableBtn.length" slot="handleBtn" :width="100" - label="操作" + :label="$t('handle')" :method-list="tableBtn" @clickBtn="handleClick" /> @@ -77,11 +77,11 @@ const tableProps = [ const tableBtn = [ { type: "edit", - btnName: "编辑", + btnName: i18n.t("edit"), }, { type: "delete", - btnName: "删除", + btnName: i18n.t("delete"), }, ]; export default { @@ -104,13 +104,13 @@ export default { }, { type: "button", - btnName: "查询", + btnName: i18n.t("query"), name: "search", color: "primary", }, { type: "button", - btnName: "新增", + btnName: i18n.t("add"), name: "add", color: "primary", plain: true, @@ -131,7 +131,7 @@ export default { this.getDataList(); break; case "add": - this.addOrEditTitle = '新增' + this.addOrEditTitle = this.$t('add'); this.addOrUpdateVisible = true; this.addOrUpdateHandle() break; diff --git a/src/views/process-inspection/components/detail-table.vue b/src/views/process-inspection/components/detail-table.vue index 81798b3..55d80a3 100644 --- a/src/views/process-inspection/components/detail-table.vue +++ b/src/views/process-inspection/components/detail-table.vue @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2021-11-18 14:16:25 * @LastEditors: zwq - * @LastEditTime: 2023-01-06 14:30:12 + * @LastEditTime: 2023-06-21 13:31:02 * @Description: --> @@ -143,24 +143,25 @@ export default { // label: "批次号", // }, ]; - this.featuresList.forEach((item) => { + this.featuresList.forEach((item,index) => { let obj = { - prop: item.name, + prop: item.name + index, label: item.name, fType: item.type, lsl: item.lsl, usl: item.usl, + }; this.tableProps.push(obj); - this.dataList[0][item.name] = this.workingProcedureName + this.dataList[0][item.name + index] = this.workingProcedureName ? this.workingProcedureName : item.workingProcedureName; - this.dataList[1][item.name] = { 1: "计量型", 2: "计数型" }[item.type]; - this.dataList[2][item.name] = item.lsl; - this.dataList[3][item.name] = item.usl; - this.dataList[4][item.name] = item.sampleSize; - this.dataList[5][item.name] = item.specifications; - this.dataList[6][item.name] = item.samplingFrequency; + this.dataList[1][item.name + index] = { 1: "计量型", 2: "计数型" }[item.type]; + this.dataList[2][item.name + index] = item.lsl; + this.dataList[3][item.name + index] = item.usl; + this.dataList[4][item.name + index] = item.sampleSize; + this.dataList[5][item.name + index] = item.specifications; + this.dataList[6][item.name + index] = item.samplingFrequency; }); this.getInfluxdb(); this.dataListLoading = false; diff --git a/src/views/process-inspection/generalOperation.vue b/src/views/process-inspection/generalOperation.vue index a393155..211238f 100644 --- a/src/views/process-inspection/generalOperation.vue +++ b/src/views/process-inspection/generalOperation.vue @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2022-09-15 10:44:29 * @LastEditors: zwq - * @LastEditTime: 2023-04-20 10:58:45 + * @LastEditTime: 2023-06-21 16:27:24 * @Description: --> @@ -148,7 +148,7 @@ v-if="tableBtn.length" slot="handleBtn" :width="150" - label="操作" + :label="$t('handle')" :method-list="tableBtn" @clickBtn="handleClick" /> @@ -172,6 +172,7 @@ import basicPage from "@/mixins/basic-page"; import AddOrUpdate from './components/generalOperation-add' import basicFilter from "@/filters/basic-filter"; +import i18n from "@/i18n"; const tableProps = [ { @@ -193,7 +194,7 @@ const tableProps = [ }, { prop: "machineName", - label: "机台", + label: i18n.t("module.basicData.machine"), }, { prop: "workingProcedureName", @@ -221,17 +222,17 @@ const tableProps = [ }, { prop: "remark", - label: "备注", + label: i18n.t("schedule.remark"), }, ]; const tableBtn = [ { type: "edit", - btnName: "编辑", + btnName: i18n.t("edit"), }, { type: "delete", - btnName: "删除", + btnName: i18n.t("delete"), }, ]; export default { diff --git a/src/views/quality-planning/components/interpretationScheme-add.vue b/src/views/quality-planning/components/interpretationScheme-add.vue index 3b98016..b7db198 100644 --- a/src/views/quality-planning/components/interpretationScheme-add.vue +++ b/src/views/quality-planning/components/interpretationScheme-add.vue @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2021-11-18 14:16:25 * @LastEditors: zwq - * @LastEditTime: 2023-04-10 15:09:23 + * @LastEditTime: 2023-06-21 16:26:26 * @Description: --> @@ -13,7 +13,7 @@ > - {{ !dataForm.id ? '新增' : '修改' }} + {{ !dataForm.id ? $t('add') : $t('edit') }} diff --git a/src/views/quality-planning/controlGraph.vue b/src/views/quality-planning/controlGraph.vue index 588da7a..711b897 100644 --- a/src/views/quality-planning/controlGraph.vue +++ b/src/views/quality-planning/controlGraph.vue @@ -31,19 +31,20 @@ \ No newline at end of file + diff --git a/src/views/spc-basic/processDefine.vue b/src/views/spc-basic/processDefine.vue index a290668..9238611 100644 --- a/src/views/spc-basic/processDefine.vue +++ b/src/views/spc-basic/processDefine.vue @@ -12,7 +12,7 @@ v-if="tableBtn.length" slot="handleBtn" :width="220" - label="操作" + :label="$t('handle')" :method-list="tableBtn" @clickBtn="handleClick" /> @@ -47,38 +47,39 @@ import AddOrUpdate from './components/processDefine-add' import BindMachine from './components/processDefine-machine' import basicPage from '@/mixins/basic-page' import basicFilter from "@/filters/basic-filter"; +import i18n from "@/i18n"; const tableProps = [ { prop: "name", - label: "名称", + label: i18n.t("role.name"), }, { prop: "code", - label: "编码", + label: i18n.t("params.paramCode"), }, { prop: "workingProcedureTypeName", - label: "类型", + label: i18n.t("oss.type"), }, { prop: "machineName", - label: "机台", + label: i18n.t("module.basicData.machine"), }, { prop: "status", - label: "状态", + label: i18n.t("module.basicData.status"), filter: basicFilter("status"), }, ]; const tableBtn = [ { type: "edit", - btnName: "编辑", + btnName: i18n.t("edit"), }, { type: "delete", - btnName: "删除", + btnName: i18n.t("delete"), }, { type: "change", @@ -107,32 +108,32 @@ export default { formConfig: [ { type: "input", - label: "名称", - placeholder: "请输入名称", + label: i18n.t("role.name"), + placeholder: i18n.t("placeholder.name"), param: "name", }, { type: "input", - label: "编码", - placeholder: "请输入编码", + label: i18n.t("params.paramCode"), + placeholder: i18n.t("placeholder.code"), param: "code", }, { type: "button", - btnName: "查询", + btnName: i18n.t("query"), name: "search", color: "primary", }, { type: "button", - btnName: "新增", + btnName: i18n.t("add"), name: "add", color: "primary", plain: true, }, { type: "button", - btnName: "导出", + btnName: i18n.t("export"), name: "export", color: "primary", plain: true, @@ -155,7 +156,7 @@ export default { this.getDataList(); break; case "add": - this.addOrEditTitle = '新增' + this.addOrEditTitle = this.$t('add'); this.addOrUpdateVisible = true; this.addOrUpdateHandle() break; diff --git a/src/views/spc-basic/processType.vue b/src/views/spc-basic/processType.vue index 9d094ac..17cd835 100644 --- a/src/views/spc-basic/processType.vue +++ b/src/views/spc-basic/processType.vue @@ -12,7 +12,7 @@ v-if="tableBtn.length" slot="handleBtn" :width="150" - label="操作" + :label="$t('handle')" :method-list="tableBtn" @clickBtn="handleClick" /> @@ -41,30 +41,31 @@ import AddOrUpdate from './components/processType-add' import basicPage from '@/mixins/basic-page' import basicFilter from "@/filters/basic-filter"; +import i18n from "@/i18n"; const tableProps = [ { prop: "name", - label: "名称", + label: i18n.t("role.name"), }, { prop: "code", - label: "编码", + label: i18n.t("params.paramCode"), }, { prop: "status", - label: "状态", + label: i18n.t("module.basicData.status"), filter: basicFilter('status'), }, ]; const tableBtn = [ { type: "edit", - btnName: "编辑", + btnName: i18n.t("edit"), }, { type: "delete", - btnName: "删除", + btnName: i18n.t("delete"), }, { type: "change", @@ -88,32 +89,32 @@ export default { formConfig: [ { type: "input", - label: "名称", - placeholder: "请输入名称", + label: i18n.t("role.name"), + placeholder: i18n.t("placeholder.name"), param: "name", }, { type: "input", - label: "编码", - placeholder: "请输入编码", + label: i18n.t("params.paramCode"), + placeholder: i18n.t("placeholder.code"), param: "code", }, { type: "button", - btnName: "查询", + btnName: i18n.t("query"), name: "search", color: "primary", }, { type: "button", - btnName: "新增", + btnName: i18n.t("add"), name: "add", color: "primary", plain: true, }, { type: "button", - btnName: "导出", + btnName: i18n.t("export"), name: "export", color: "primary", plain: true, @@ -135,7 +136,7 @@ export default { this.getDataList(); break; case "add": - this.addOrEditTitle = '新增' + this.addOrEditTitle = this.$t('add'); this.addOrUpdateVisible = true; this.addOrUpdateHandle() break; diff --git a/src/views/spc-basic/productList.vue b/src/views/spc-basic/productList.vue index 9d4f46c..c09d1a2 100644 --- a/src/views/spc-basic/productList.vue +++ b/src/views/spc-basic/productList.vue @@ -12,7 +12,7 @@ v-if="tableBtn.length" slot="handleBtn" :width="150" - label="操作" + :label="$t('handle')" :method-list="tableBtn" @clickBtn="handleClick" /> @@ -24,73 +24,74 @@ @pagination="getDataList" /> - +