From 5e4dc3af68c2bb0a5a33fcb395e7704207125ce8 Mon Sep 17 00:00:00 2001 From: CD配唱片 <CD配唱片> Date: 星期二, 06 五月 2025 18:49:19 +0800 Subject: [PATCH] 提交中英文 --- src/views/mainPlan/sheetMetalRedundantReport/index.vue | 178 ++++++++++++++++++++++++++++++++--------------------------- 1 files changed, 96 insertions(+), 82 deletions(-) diff --git a/src/views/mainPlan/sheetMetalRedundantReport/index.vue b/src/views/mainPlan/sheetMetalRedundantReport/index.vue index 858de3e..0681d75 100644 --- a/src/views/mainPlan/sheetMetalRedundantReport/index.vue +++ b/src/views/mainPlan/sheetMetalRedundantReport/index.vue @@ -6,44 +6,50 @@ ref="queryRef" :inline="true" v-show="showSearch" - label-width="90px" + :label-width="locale === 'zh' ? '90px' : '200px'" > <el-row type="flex" justify="left"> - <el-col :span="5"> - <el-form-item label="闇�姹傝拷婧疘D" prop="description"> + <el-col :span="locale === 'zh' ? 5 : 10"> + <el-form-item + :label="$t('plan.query.requireTraceID')" + prop="description" + > <el-input - style="width: 140px" + :style="{ width: locale === 'zh' ? '140px' : '300px' }" v-model="queryParams.description" - placeholder="璇疯緭鍏ラ渶姹傝拷婧疘D" + :placeholder="`${$t('plan.placeholder.requireTraceID')}`" clearable @keyup.enter="handleQuery" /> </el-form-item> </el-col> - <el-col :span="5"> - <el-form-item label="鏂欏彿" prop="description"> + <el-col :span="locale === 'zh' ? 8 : 9"> + <el-form-item :label="$t('plan.query.itemNumber')" prop="description"> <el-input - style="width: 140px" + :style="{ width: locale === 'zh' ? '140px' : '210px' }" v-model="queryParams.description" - placeholder="璇疯緭鍏ユ枡鍙�" + :placeholder="`${$t('common.common.placeholder')}${$t( + 'plan.query.itemNumber' + )}`" clearable @keyup.enter="handleQuery" /> </el-form-item> </el-col> - <el-col :span="14" style="text-align: right"> + <el-col :span="locale === 'zh' ? 11 : 5" style="text-align: right"> <el-form-item class="column-with-margin"> - <el-button type="primary" icon="Search" @click="handleQuery" - >鏌ヨ</el-button - > - <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button> + <el-button type="primary" icon="Search" @click="handleQuery">{{ + $t("common.common.query") + }}</el-button> + <el-button icon="Refresh" @click="resetQuery">{{ + $t("common.common.reset") + }}</el-button> </el-form-item> </el-col> </el-row> </el-form> <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> <el-button type="warning" @@ -51,7 +57,7 @@ icon="Download" @click="handleExport" v-hasPermi="['core:calendar:export']" - >瀵煎嚭</el-button + >{{ $t("common.common.export") }}</el-button > </el-col> <right-toolbar @@ -89,6 +95,8 @@ import { listAll_plant } from "@/api/basicData/plant"; import { listAll_shop, listAps_shop } from "@/api/basicData/shop"; import { selectProcessNameList } from "@/api/basicData/processRoute.js"; +import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲 +const { t, locale } = useI18n(); const { proxy } = getCurrentInstance(); const tableRef = ref(); const calendarList = ref([]); @@ -124,78 +132,84 @@ const processList = ref([]); const height = ref(document.documentElement.clientHeight - 220 + "px;"); // 琛ㄦ牸閰嶇疆-鍒楄〃 -const columns = ref([ - { - title: "宸ュ崟鍙�", - field: "description", - width: 150, - align: "center" - }, - { - title: "瀛愪欢鏂欏彿", - field: "type", - width: 200, - align: "center" - }, - { - title: "鐢熶骇鏁伴噺", - field: "effectiveDate", - width: 200, - align: "center", - }, - { - title: "鏈尮閰嶇敓浜ф暟閲�", - field: "expiringDate", - width: 200, - align: "center" - }, - { - title: "閫傜敤宸ュ巶", - field: "applicableFactory", - width: 200, - align: "center", - formatter: ({ cellValue, row, column }) => { - if (cellValue) { - for (let i = 0; i < plantList.value.length; i++) { - if (cellValue === plantList.value[i].plantCode) { - return plantList.value[i].plantName; - } - } - } - }, - }, - { - title: "鐢熶骇鍩哄湴", - field: "expiringDate", - width: 200, - align: "center" - }, - { - title: "璁″垝寮�宸ユ棩", - field: "createTime", - width: 200, - align: "center", - }, - { - title: "璁″垝瀹屽伐鏃�", - field: "updateTime", - width: 100, - align: "center", - }, - { - title: "宸ュ崟鍒涘缓鏃堕棿", - field: "updateTime", - width: 100, - align: "center", - }, -]); +const columns = ref([]); // 鍒嗛〉灞炴�� const page = ref({ total: 0, current: 1, size: 10, }); - +watch( + locale, + (newLocale) => { + columns.value = [ + { + title: t("plan.table.workOrderNo"), + field: "description", + width: 150, + align: "center", + }, + { + title: t("plan.table.subItemPartNumber"), + field: "type", + width: 200, + align: "center", + }, + { + title: t("plan.table.productionQuantity"), + field: "effectiveDate", + width: 200, + align: "center", + }, + { + title: t("plan.table.mismatchedProductionQuantity"), + field: "expiringDate", + width: 200, + align: "center", + }, + { + title: t("plan.table.applicableFactories"), + field: "applicableFactory", + width: 200, + align: "center", + formatter: ({ cellValue, row, column }) => { + if (cellValue) { + for (let i = 0; i < plantList.value.length; i++) { + if (cellValue === plantList.value[i].plantCode) { + return plantList.value[i].plantName; + } + } + } + }, + }, + { + title: t("plan.table.productionBase"), + field: "expiringDate", + width: 200, + align: "center", + }, + { + title: t("plan.table.planStartDay"), + field: "createTime", + width: 200, + align: "center", + }, + { + title: t("plan.table.planEndDayDate"), + field: "updateTime", + width: 100, + align: "center", + }, + { + title: t("plan.table.workorderCreationTime"), + field: "updateTime", + width: 100, + align: "center", + }, + ]; + }, + { immediate: true, deep: true } +); /** 鏌ヨ鏃ュ巻绠$悊鍒楄〃 */ function getList() { loading.value = true; -- Gitblit v1.9.3