From d67ba690e49ce6674f048ceb8831df770f5b9e21 Mon Sep 17 00:00:00 2001
From: CD配唱片 <CD配唱片>
Date: 星期二, 29 四月 2025 15:12:23 +0800
Subject: [PATCH] 提交钣金计划大表i18n配置中英文
---
.env.development | 2
src/utils/i18n/locales/en.json | 84 ++
src/main.js | 1
src/layout/components/Navbar.vue | 110 ++-
src/views/mainPlan/platePlanList/index.vue | 233 ++++----
src/utils/i18n/locales/zh.json | 75 ++
src/views/mainPlan/platePlan/index.vue | 1058 +++++++++++++++++++++------------------
src/components/RightToolbar/index.vue | 4
src/store/modules/language.js | 13
9 files changed, 933 insertions(+), 647 deletions(-)
diff --git a/.env.development b/.env.development
index 605a602..9028dae 100644
--- a/.env.development
+++ b/.env.development
@@ -10,4 +10,4 @@
# 閰嶅悎鍚庣鏈嶅姟
# VITE_APP_LOCAL = 'int'
# VITE_APP_LOCAL = 'zhl'
-VITE_APP_LOCAL = 'hjy'
\ No newline at end of file
+VITE_APP_LOCAL = 'int'
\ No newline at end of file
diff --git a/src/components/RightToolbar/index.vue b/src/components/RightToolbar/index.vue
index 5a53dd4..4e3028e 100644
--- a/src/components/RightToolbar/index.vue
+++ b/src/components/RightToolbar/index.vue
@@ -1,10 +1,10 @@
<template>
<div class="top-right-btn" :style="style">
<el-row>
- <el-tooltip class="item" effect="dark" :content="showSearch ? '闅愯棌鎼滅储' : '鏄剧ず鎼滅储'" placement="top" v-if="search">
+ <el-tooltip class="item" effect="dark" :content="showSearch ? $t('page.common.hideSearch') : $t('page.common.showSearch')" placement="top" v-if="search">
<el-button circle icon="Search" @click="toggleSearch()" />
</el-tooltip>
- <el-tooltip class="item" effect="dark" content="鍒锋柊" placement="top">
+ <el-tooltip class="item" effect="dark" :content="$t('page.common.refresh')" placement="top">
<el-button circle icon="Refresh" @click="refresh()" />
</el-tooltip>
<el-tooltip class="item" effect="dark" content="鏄鹃殣鍒�" placement="top" v-if="columns">
diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 7c59d72..94099fc 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -1,15 +1,34 @@
<template>
<div class="navbar">
- <hamburger id="hamburger-container" :is-active="appStore.sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
- <breadcrumb v-if="!settingsStore.topNav" id="breadcrumb-container" class="breadcrumb-container" />
- <top-nav v-if="settingsStore.topNav" id="topmenu-container" class="topmenu-container" />
+ <hamburger
+ id="hamburger-container"
+ :is-active="appStore.sidebar.opened"
+ class="hamburger-container"
+ @toggleClick="toggleSideBar"
+ />
+ <breadcrumb
+ v-if="!settingsStore.topNav"
+ id="breadcrumb-container"
+ class="breadcrumb-container"
+ />
+ <top-nav
+ v-if="settingsStore.topNav"
+ id="topmenu-container"
+ class="topmenu-container"
+ />
<div class="right-menu">
- <template v-if="appStore.device !== 'mobile'">
-
- </template>
+ <template v-if="appStore.device !== 'mobile'"> </template>
+ <div class="mt5">
+ <el-button @click="changeLanguage('zh')">涓枃</el-button>
+ <el-button @click="changeLanguage('en')">English</el-button>
+ </div>
<div class="avatar-container">
- <el-dropdown @command="handleCommand" class="right-menu-item hover-effect" trigger="click">
+ <el-dropdown
+ @command="handleCommand"
+ class="right-menu-item hover-effect"
+ trigger="click"
+ >
<div class="avatar-wrapper">
<img :src="userStore.avatar" class="user-avatar" />
<el-icon><caret-bottom /></el-icon>
@@ -17,13 +36,13 @@
<template #dropdown>
<el-dropdown-menu>
<router-link to="/user/profile">
- <el-dropdown-item>{{$t(`topNav.center`)}}</el-dropdown-item>
+ <el-dropdown-item>{{ $t(`topNav.center`) }}</el-dropdown-item>
</router-link>
<!-- <el-dropdown-item command="setLayout" v-if="settingsStore.showSettings">
<span>甯冨眬璁剧疆</span>
</el-dropdown-item> -->
<el-dropdown-item divided command="logout">
- <span>{{$t(`topNav.logout`)}}</span>
+ <span>{{ $t(`topNav.logout`) }}</span>
</el-dropdown-item>
</el-dropdown-menu>
</template>
@@ -34,25 +53,32 @@
</template>
<script setup>
-import { ElMessageBox } from 'element-plus'
-import Breadcrumb from '@/components/Breadcrumb'
-import TopNav from '@/components/TopNav'
-import Hamburger from '@/components/Hamburger'
-import Screenfull from '@/components/Screenfull'
-import SizeSelect from '@/components/SizeSelect'
-import HeaderSearch from '@/components/HeaderSearch'
-import RuoYiGit from '@/components/RuoYi/Git'
-import RuoYiDoc from '@/components/RuoYi/Doc'
-import useAppStore from '@/store/modules/app'
-import useUserStore from '@/store/modules/user'
-import useSettingsStore from '@/store/modules/settings'
-
-const appStore = useAppStore()
-const userStore = useUserStore()
-const settingsStore = useSettingsStore()
+import { ElMessageBox } from "element-plus";
+import Breadcrumb from "@/components/Breadcrumb";
+import TopNav from "@/components/TopNav";
+import Hamburger from "@/components/Hamburger";
+import Screenfull from "@/components/Screenfull";
+import SizeSelect from "@/components/SizeSelect";
+import HeaderSearch from "@/components/HeaderSearch";
+import RuoYiGit from "@/components/RuoYi/Git";
+import RuoYiDoc from "@/components/RuoYi/Doc";
+import useAppStore from "@/store/modules/app";
+import useUserStore from "@/store/modules/user";
+import useSettingsStore from "@/store/modules/settings";
+import useLanguageStore from "@/store/modules/language"
+import { useI18n } from 'vue-i18n'//瑕佸湪js涓娇鐢ㄥ浗闄呭寲
+const appStore = useAppStore();
+const userStore = useUserStore();
+const settingsStore = useSettingsStore();
+const languageStore = useLanguageStore();
+const { proxy } = getCurrentInstance();
+function changeLanguage(type) {
+ proxy.$i18n.locale = type;
+ languageStore.setLocale(type)
+}
function toggleSideBar() {
- appStore.toggleSideBar()
+ appStore.toggleSideBar();
}
function handleCommand(command) {
@@ -69,28 +95,30 @@
}
function logout() {
- ElMessageBox.confirm('纭畾娉ㄩ攢骞堕��鍑虹郴缁熷悧锛�', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- userStore.logOut().then(() => {
- location.href = '/index';
+ ElMessageBox.confirm("纭畾娉ㄩ攢骞堕��鍑虹郴缁熷悧锛�", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ userStore.logOut().then(() => {
+ location.href = "/index";
+ });
})
- }).catch(() => { });
+ .catch(() => {});
}
-const emits = defineEmits(['setLayout'])
+const emits = defineEmits(["setLayout"]);
function setLayout() {
- emits('setLayout');
+ emits("setLayout");
}
function toggleTheme() {
- settingsStore.toggleTheme()
+ settingsStore.toggleTheme();
}
</script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
.navbar {
height: 50px;
overflow: hidden;
@@ -130,7 +158,9 @@
height: 100%;
line-height: 50px;
display: flex;
-
+ .mt5{
+ margin-top:5px;
+ }
&:focus {
outline: none;
}
@@ -158,7 +188,7 @@
svg {
transition: transform 0.3s;
-
+
&:hover {
transform: scale(1.15);
}
diff --git a/src/main.js b/src/main.js
index 8ed84c8..496881d 100644
--- a/src/main.js
+++ b/src/main.js
@@ -48,7 +48,6 @@
import VxeUITable from 'vxe-table'
import 'vxe-table/lib/style.css'
import i18n from '@/utils/i18n' // 寮曞叆 i18n 閰嶇疆鏂囦欢
-
const app = createApp(App)
// 鍏ㄥ眬鏂规硶鎸傝浇
diff --git a/src/store/modules/language.js b/src/store/modules/language.js
new file mode 100644
index 0000000..f12a558
--- /dev/null
+++ b/src/store/modules/language.js
@@ -0,0 +1,13 @@
+const useLanguageStore = defineStore("language", {
+ state: () => ({
+ locale: "zh",
+ }),
+ actions: {
+ setLocale(locale) {
+ this.locale = locale; // 璁剧疆璇█骞舵洿鏂扮姸鎬�
+ console.log(this.locale,"this.localethis.locale")
+ }
+ },
+});
+
+export default useLanguageStore;
diff --git a/src/utils/i18n/locales/en.json b/src/utils/i18n/locales/en.json
index 043a2a5..689d08c 100644
--- a/src/utils/i18n/locales/en.json
+++ b/src/utils/i18n/locales/en.json
@@ -1,5 +1,81 @@
{
- "topNav":{
- "center":""
- }
-}
\ No newline at end of file
+ "topNav": {
+ "center": "Personal Center",
+ "logout": "Logout"
+ },
+ "page": {
+ "common": {
+ "import":"Import",
+ "export": "Export",
+ "update": "Update",
+ "query": "Query",
+ "reset": "Reset",
+ "hideSearch":"Hide Search",
+ "showSearch":"Display search",
+ "refresh":"Refresh",
+ "column": "Explicit implicit column"
+ },
+ "placeholder":{
+ "startDate":"Start date",
+ "endDate":"End date",
+ "documentNumber":"Please enter the document number",
+ "customer":"Please enter the customer name"
+ },
+ "btns":{
+ "batchPlanStartDay":"Batch modification of planned start date",
+ "batchPlanEndDay":"Batch modification plan completion date"
+ },
+ "query":{
+ "daterangePlanStartDay":"Planned start date",
+ "daterangePlanEndDay":"Planned completion date",
+ "documentNumber":"Document number",
+ "customer":"Customer Name"
+ },
+ "table": {
+ "mainPartNumber": "Main part number",
+ "businessType": "Business type",
+ "documentNumber": "Document number",
+ "requirementType": "Requirements classification",
+ "documentStatus": "Document Status",
+ "updateBy": "Audit time",
+ "workCenter": "Current process",
+ "department": "Current process leader",
+ "opStatus": "Current process status",
+ "nextOpName": "Next process",
+ "nextProcessDeparment": "Next Process Manager",
+ "itemNumber": "Item number",
+ "drawingNo": "Drawing No",
+ "versionNumber": "version number",
+ "cheaperCode": "Low order code",
+ "productionQuantity": "production quantity",
+ "planworkOrderTime": "Work order plan issuance time",
+ "planEndDay": "System completion time",
+ "seq":"Serial Number",
+ "masterPlanner":"master scheduler",
+ "weekDay":"Sunday",
+ "weekCycle":"week cycle",
+ "mainPartDrawingNumber":"Main component drawing number",
+ "customer":"Customer Name",
+ "goodProductsQuantity":"Quantity of good products",
+ "processNumber":"Process number",
+ "factoryCenter":"work center",
+ "dependencyDepartment":"Department",
+ "planStartDay":"Planned commencement date",
+ "planEndDayDate":"Planned completion date",
+ "standbyNumber":"Material preparation part number",
+ "standbyName":"Material name",
+ "standbyStock":"澶囨枡搴撳瓨",
+ "departmentToNextProcessBelongs":"Material preparation inventory",
+ "isSuspended":"Is it suspended",
+ "isOutsourcing":"Outsourcing identification",
+ "account":"Account set",
+ "workOrderNo":"Work order number",
+ "processName":"Process name",
+ "startDateOfProcessPlan":"Start date of process plan",
+ "endDateOfProcessPlan":"End date of process plan",
+ "standardTime":"Standard working hours",
+ "processOrder":"Process sorting",
+ "integrationDay":"Integration date"
+ }
+ }
+}
diff --git a/src/utils/i18n/locales/zh.json b/src/utils/i18n/locales/zh.json
index 3cb1c3d..d1c4d60 100644
--- a/src/utils/i18n/locales/zh.json
+++ b/src/utils/i18n/locales/zh.json
@@ -2,5 +2,80 @@
"topNav":{
"center":"涓汉涓績",
"logout":"閫�鍑虹櫥褰�"
+ },
+ "page":{
+ "common":{
+ "import":"瀵煎叆",
+ "export":"瀵煎嚭",
+ "update":"鏇存柊",
+ "query":"鏌ヨ",
+ "reset":"閲嶇疆",
+ "hideSearch":"闅愯棌鎼滅储",
+ "showSearch":"鏄剧ず鎼滅储",
+ "refresh":"鍒锋柊",
+ "column": "鏄鹃殣鍒�"
+ },
+ "placeholder":{
+ "startDate":"寮�濮嬫棩鏈�",
+ "endDate":"缁撴潫鏃ユ湡",
+ "documentNumber":"璇疯緭鍏ュ崟鎹彿",
+ "customer":"璇疯緭鍏ュ鎴峰悕绉�"
+ },
+ "btns":{
+ "batchPlanStartDay":"鎵归噺淇敼璁″垝寮�宸ユ棩",
+ "batchPlanEndDay":"鎵归噺淇敼璁″垝瀹屽伐鏃�"
+ },
+ "query":{
+ "daterangePlanStartDay":"璁″垝寮�宸ユ棩",
+ "daterangePlanEndDay":"璁″垝瀹屽伐鏃�",
+ "documentNumber":"鍗曟嵁鍙�",
+ "customer":"瀹㈡埛鍚嶇О"
+ },
+ "table":{
+ "mainPartNumber":"涓讳欢鏂欏彿",
+ "businessType":"涓氬姟绫诲瀷",
+ "documentNumber":"鍗曟嵁鍙�",
+ "requirementType":"闇�姹傚垎绫�",
+ "documentStatus":"鍗曟嵁鐘舵��",
+ "updateBy":"瀹℃牳鏃堕棿",
+ "workCenter":"褰撳墠宸ュ簭",
+ "department":"褰撳墠宸ュ簭璐熻矗浜�",
+ "opStatus":"褰撳墠宸ュ簭鐘舵��",
+ "nextOpName":"涓嬩竴宸ュ簭",
+ "nextProcessDeparment":"涓嬩竴宸ュ簭璐熻矗浜�",
+ "itemNumber":"鏂欏彿",
+ "drawingNo":"鍥惧彿",
+ "versionNumber":"鐗堟湰鍙�",
+ "cheaperCode":"浣庨樁鐮�",
+ "productionQuantity":"鐢熶骇鏁伴噺",
+ "planworkOrderTime":"宸ュ崟璁″垝涓嬪彂鏃堕棿",
+ "planEndDay":"绯荤粺瀹屽伐鏃堕棿",
+ "seq":"搴忓彿",
+ "masterPlanner":"涓昏鍒掑憳",
+ "weekDay":"鍛ㄦ棩",
+ "weekCycle":"鍛ㄥ害",
+ "mainPartDrawingNumber":"涓讳欢鍥惧彿",
+ "customer":"瀹㈡埛鍚嶇О",
+ "goodProductsQuantity":"鑹搧鏁伴噺",
+ "processNumber":"宸ュ簭鍙�",
+ "factoryCenter":"宸ヤ綔涓績",
+ "dependencyDepartment":"鎵�灞為儴闂�",
+ "planStartDay":"璁″垝寮�宸ユ棩",
+ "planEndDayDate":"璁″垝瀹屽伐鏃�",
+ "standbyNumber":"澶囨枡鏂欏彿",
+ "standbyName":"澶囨枡鍚嶇О",
+ "standbyStock":"澶囨枡搴撳瓨",
+ "departmentToNextProcessBelongs":"涓嬮亾宸ュ簭鎵�灞為儴闂�",
+ "isSuspended":"鏄惁鎸傝捣",
+ "isOutsourcing":"澶栧崗鏍囪瘑",
+ "account":"璐﹀",
+ "workOrderNo":"宸ュ崟鍙�",
+ "processName":"宸ュ簭鍚嶇О",
+ "startDateOfProcessPlan":"宸ュ簭璁″垝寮�濮嬫棩鏈�",
+ "endDateOfProcessPlan":"宸ュ簭璁″垝缁撴潫鏃ユ湡",
+ "standardTime":"鏍囧噯宸ユ椂",
+ "processOrder":"宸ュ簭鎺掑簭",
+ "integrationDay":"闆嗘垚鏃ユ湡"
+ }
}
}
\ No newline at end of file
diff --git a/src/views/mainPlan/platePlan/index.vue b/src/views/mainPlan/platePlan/index.vue
index 38fc61f..291efa1 100644
--- a/src/views/mainPlan/platePlan/index.vue
+++ b/src/views/mainPlan/platePlan/index.vue
@@ -1,61 +1,65 @@
<template>
<div class="app-container">
- <el-row :gutter="20"> <el-col>
- <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="90px">
- <el-row :gutter="20">
- <el-col :span="6">
- <el-form-item label="璁″垝寮�宸ユ棩" style="width: 100%;">
+ <el-row :gutter="10" class="mb8">
+ <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" :label-width="locale==='zh'?'90px':'180px'" label-position="left">
+ <!-- <el-row :gutter="20">
+ <el-col :span="6"> -->
+ <el-form-item :label="$t('page.query.daterangePlanStartDay')">
<el-date-picker
+ style="width: 240px;"
v-model="daterangePlanStartDay"
value-format="YYYY-MM-DD"
type="daterange"
range-separator="-"
- start-placeholder="寮�濮嬫棩鏈�"
- end-placeholder="缁撴潫鏃ユ湡"
+ :start-placeholder="$t('page.placeholder.startDate')"
+ :end-placeholder="$t('page.placeholder.endDate')"
></el-date-picker>
</el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="璁″垝瀹屽伐鏃�" style="width: 100%;">
+ <!-- </el-col>
+ <el-col :span="6"> -->
+ <el-form-item :label="$t('page.query.daterangePlanEndDay')">
<el-date-picker
+ style="width: 240px;"
v-model="daterangePlanEndDay"
value-format="YYYY-MM-DD"
type="daterange"
range-separator="-"
- start-placeholder="寮�濮嬫棩鏈�"
- end-placeholder="缁撴潫鏃ユ湡"
+ :start-placeholder="$t('page.placeholder.startDate')"
+ :end-placeholder="$t('page.placeholder.endDate')"
></el-date-picker>
</el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="鍗曟嵁鍙�" prop="documentNumber" style="width: 100%;">
+ <!-- </el-col>
+ <el-col :span="6"> -->
+ <el-form-item :label="$t('page.query.documentNumber')" prop="documentNumber" >
<el-input
+ style="width: 240px;"
v-model="queryParams.documentNumber"
- placeholder="璇疯緭鍏ュ崟鎹彿"
+ :placeholder="$t('page.placeholder.documentNumber')"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="瀹㈡埛鍚嶇О" prop="customer" style="width: 100%;">
+ <!-- </el-col>
+ <el-col :span="6"> -->
+ <el-form-item :label="$t('page.query.customer')" prop="customer">
<el-input
+ style="width: 240px;"
v-model="queryParams.customer"
- placeholder="璇疯緭鍏ュ鎴峰悕绉�"
+ :placeholder="$t('page.placeholder.customer')"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
- </el-col>
- <el-col :span="24" style="text-align: right;">
+ <!-- </el-col>
+ <el-col :span="24" style="text-align: right;"> -->
<el-form-item>
- <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("page.common.query")}}</el-button>
+ <el-button icon="Refresh" @click="resetQuery">{{$t("page.common.reset")}}</el-button>
</el-form-item>
- </el-col>
- </el-row>
+ <!-- </el-col> -->
+ <!-- </el-row> -->
</el-form>
- </el-col> </el-row>
+ </el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
@@ -65,7 +69,7 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['apsPlatePlan:edit']"
- >鎵归噺淇敼璁″垝寮�宸ユ棩</el-button>
+ >{{$t("page.btns.batchPlanStartDay")}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@@ -75,7 +79,7 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['apsPlatePlan:edit']"
- >鎵归噺淇敼璁″垝瀹屽伐鏃�</el-button>
+ >{{$t("page.btns.batchPlanEndDay")}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@@ -84,7 +88,7 @@
icon="Upload"
@click="handleImport"
v-hasPermi="['apsPlatePlan:import']"
- >瀵煎叆</el-button>
+ >{{$t("page.common.import")}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@@ -93,7 +97,7 @@
icon="Download"
@click="handleExport"
v-hasPermi="['apsPlatePlan:export']"
- >瀵煎嚭</el-button>
+ >{{$t("page.common.export")}}</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@@ -204,11 +208,10 @@
import { ref } from "vue";
import { getToken } from "@/utils/auth.js";
import {ElMessage} from "element-plus";
-
+import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲
const { proxy } = getCurrentInstance();
-
+const { t, locale } = useI18n();
const { aps_is_suspended, aps_document_status, aps_account, aps_business_type } = proxy.useDict('aps_is_suspended', 'aps_document_status', 'aps_account', 'aps_business_type');
-
const exampleList = ref([]);
const planList = ref([]);
const loading = ref(true);
@@ -242,380 +245,6 @@
// 涓婁紶鐨勫湴鍧�
url: import.meta.env.VITE_APP_BASE_API + "/aps/apsPlatePlan/importData"
});
-
-// 琛ㄦ牸閰嶇疆
-const exampleColumns = ref([
- { type: 'seq', title: '搴忓彿', width: 60 },
- {
- title: '涓昏鍒掑憳',
- field: 'masterPlanner',
- width: 100,
- },
- {
- title: '鍛ㄦ棩',
- field: 'weekDay',
- width: 100,
- formatter: (({ cellValue, row, column }) => {
- if (cellValue) {
- const weekDay = new Date(cellValue);
- const year = weekDay.getFullYear();
- const month = String(weekDay.getMonth() + 1).padStart(2, '0');
- const day = String(weekDay.getDate()).padStart(2, '0');
- return `${month}-${day}`;
- }
- return '';
- })
- },
- {
- title: '鍛ㄥ害',
- field: 'weekCycle',
- width: 80,
- },
- {
- title: '涓讳欢鏂欏彿',
- field: 'mainPartNumber',
- width: 150,
- },
- {
- title: '涓讳欢鍥惧彿',
- field: 'mainPartDrawingNumber',
- width: 150,
- },
- {
- title: '瀹㈡埛鍚嶇О',
- field: 'customer',
- width: 200,
- },
- {
- title: '涓氬姟绫诲瀷',
- field: 'businessType',
- width: 150,
- },
- {
- title: '鍗曟嵁鍙�',
- field: 'documentNumber',
- width: 150,
- },
- {
- title: '闇�姹傚垎绫�',
- field: 'requirementType',
- width: 150,
- },
- {
- title: '鍗曟嵁鐘舵��',
- field: 'documentStatus',
- width: 100,
- },
- {
- title: '鏂欏彿',
- field: 'itemNumber',
- width: 150,
- },
- {
- title: '鍥惧彿',
- field: 'drawingNo',
- width: 150,
- },
- {
- title: '鐗堟湰鍙�',
- field: 'versionNumber',
- width: 100,
- },
- {
- title: '鐢熶骇鏁伴噺',
- field: 'productionQuantity',
- width: 100,
- },
- {
- title: '鑹搧鏁伴噺',
- field: 'goodProductsQuantity',
- width: 100,
- },
- {
- title: '宸ュ簭鍙�',
- field: 'processNumber',
- width: 150,
- },
- {
- title: '宸ヤ綔涓績',
- field: 'workCenter',
- width: 150,
- },
- {
- title: '鎵�灞為儴闂�',
- field: 'department',
- width: 100,
- },
- {
- title: '璁″垝寮�宸ユ棩',
- field: 'planStartDay',
- width: 100,
- },
- {
- title: '璁″垝瀹屽伐鏃�',
- field: 'planEndDay',
- width: 100,
- },
- {
- title: '澶囨枡鏂欏彿',
- field: 'standbyNumber',
- width: 100,
- },
- {
- title: '澶囨枡鍚嶇О',
- field: 'standbyName',
- width: 200,
- },
- {
- title: '澶囨枡搴撳瓨',
- field: 'standbyStock',
- width: 100,
- },
- {
- title: '涓嬮亾宸ュ簭鎵�灞為儴闂�',
- field: 'nextProcessDeparment',
- width: 180,
- },
- {
- title: '鏄惁鎸傝捣',
- field: 'isSuspended',
- width: 100,
- },
- {
- title: '澶栧崗鏍囪瘑',
- field: 'isOutsourcing',
- width: 100,
- },
- {
- title: '璐﹀',
- field: 'account',
- width: 100,
- },
- // {
- // title: '涓婇樁鐗╂枡',
- // field: 'advancedMaterials',
- // width: 100,
- // },
- // {
- // title: '涓婇樁鍗曟嵁鍙�',
- // field: 'advancedDocumentNumber',
- // width: 100,
- // },
- // {
- // title: '涓婇樁闇�姹傛棩鏈�',
- // field: 'advancedRequirementDay',
- // width: 150,
- // },
- // {
- // title: '璁″垝榻愬',
- // field: 'isPlanComplete',
- // width: 100,
- // },
- // {
- // title: '搴撳瓨榻愬',
- // field: 'isStockComplete',
- // width: 100,
- // },
- // {
- // title: '鏄惁鏈夋姌杩斿伐搴�',
- // field: 'hasTurnback',
- // width: 150,
- // },
- // {
- // title: '椋庨櫓鏍囪瘑',
- // field: 'hasRisk',
- // width: 100,
- // },
-]);
-
-// 琛ㄦ牸閰嶇疆
-const columns = ref([
- { field: 'expand', type: 'expand', width: 60, align: 'center', slots: { content: 'expandContent' } },
- { type: 'checkbox', width: 60, align:"center"},
- { type: 'seq', title: '搴忓彿', width: 60 },
- // {
- // title: '涓昏鍒掑憳',
- // field: 'masterPlanner',
- // width: 100,
- // },
- // {
- // title: '鍛ㄦ棩',
- // field: 'weekDay',
- // width: 100,
- // formatter: (({ cellValue, row, column }) => {
- // if (cellValue) {
- // const weekDay = new Date(cellValue);
- // const year = weekDay.getFullYear();
- // const month = String(weekDay.getMonth() + 1).padStart(2, '0');
- // const day = String(weekDay.getDate()).padStart(2, '0');
- // return `${month}-${day}`;
- // }
- // return '';
- // })
- // },
- // {
- // title: '鍛ㄥ害',
- // field: 'weekCycle',
- // width: 80,
- // },
- {
- title: '涓讳欢鏂欏彿',
- field: 'mainPartNumber',
- width: 150,
- },
- // {
- // title: '涓讳欢鍥惧彿',
- // field: 'mainPartDrawingNumber',
- // width: 150,
- // },
- // {
- // title: '瀹㈡埛鍚嶇О',
- // field: 'customer',
- // width: 200,
- // },
- {
- title: '涓氬姟绫诲瀷',
- field: 'businessType',
- width: 100,
- },
- {
- title: '鍗曟嵁鍙�',
- field: 'documentNumber',
- width: 140,
- },
- {
- title: '闇�姹傚垎绫�',
- field: 'requirementType',
- width: 100,
- },
- {
- title: '鍗曟嵁鐘舵��',
- field: 'documentStatus',
- width: 100,
- },
- {
- title: '鏂欏彿',
- field: 'itemNumber',
- width: 100,
- },
- {
- title: '鍥惧彿',
- field: 'drawingNo',
- width: 100,
- },
- // {
- // title: '鐗堟湰鍙�',
- // field: 'versionNumber',
- // width: 100,
- // },
- {
- title: '鐢熶骇鏁伴噺',
- field: 'productionQuantity',
- width: 100,
- },
- // {
- // title: '鑹搧鏁伴噺',
- // field: 'goodProductsQuantity',
- // width: 100,
- // },
- {
- title: '宸ュ簭鍙�',
- field: 'processNumber',
- width: 100,
- },
- {
- title: '宸ヤ綔涓績',
- field: 'workCenter',
- width: 180,
- },
- // {
- // title: '鎵�灞為儴闂�',
- // field: 'department',
- // width: 100,
- // },
- // {
- // title: '璁″垝寮�宸ユ棩',
- // field: 'planStartDay',
- // width: 100,
- // },
- {
- title: '璁″垝瀹屽伐鏃�',
- field: 'planEndDay',
- width: 100,
- },
- // {
- // title: '澶囨枡鏂欏彿',
- // field: 'standbyNumber',
- // width: 100,
- // },
- // {
- // title: '澶囨枡鍚嶇О',
- // field: 'standbyName',
- // width: 100,
- // },
- // {
- // title: '澶囨枡搴撳瓨',
- // field: 'standbyStock',
- // width: 100,
- // },
- // {
- // title: '涓嬮亾宸ュ簭鎵�灞為儴闂�',
- // field: 'nextProcessDeparment',
- // width: 160,
- // },
- // {
- // title: '鏄惁鎸傝捣',
- // field: 'isSuspended',
- // width: 100,
- // },
- // {
- // title: '澶栧崗鏍囪瘑',
- // field: 'isOutsourcing',
- // width: 100,
- // },
- // {
- // title: '璐﹀',
- // field: 'account',
- // width: 100,
- // },
- // {
- // title: '涓婇樁鐗╂枡',
- // field: 'advancedMaterials',
- // width: 100,
- // },
- // {
- // title: '涓婇樁鍗曟嵁鍙�',
- // field: 'advancedDocumentNumber',
- // width: 100,
- // },
- // {
- // title: '涓婇樁闇�姹傛棩鏈�',
- // field: 'advancedRequirementDay',
- // width: 100,
- // },
- // {
- // title: '璁″垝榻愬',
- // field: 'isPlanComplete',
- // width: 100,
- // },
- // {
- // title: '搴撳瓨榻愬',
- // field: 'isStockComplete',
- // width: 100,
- // },
- // {
- // title: '鏄惁鏈夋姌杩斿伐搴�',
- // field: 'hasTurnback',
- // width: 120,
- // },
- // {
- // title: '椋庨櫓鏍囪瘑',
- // field: 'hasRisk',
- // width: 100,
- // },
-]);
-
-
const data = reactive({
form: {},
queryParams: {
@@ -632,6 +261,462 @@
});
const { queryParams } = toRefs(data);
+const exampleColumns = ref([]);
+const columns = ref([]);
+const subGridOptions = ref({
+ border: true,
+ showOverflow: true,
+ columns: []
+})
+
+watch(locale, (newLocale) => {
+ // 閲嶆柊鑾峰彇缈昏瘧鏂囨湰
+ // 琛ㄦ牸閰嶇疆
+ exampleColumns.value = [
+ { type: 'seq', title: t('page.table.seq'), width: 60 },
+ {
+ title: t('page.table.masterPlanner'),
+ field: 'masterPlanner',
+ width: 100,
+ },
+ {
+ title: t('page.table.weekDay'),
+ field: 'weekDay',
+ width: 100,
+ formatter: (({ cellValue, row, column }) => {
+ if (cellValue) {
+ const weekDay = new Date(cellValue);
+ const year = weekDay.getFullYear();
+ const month = String(weekDay.getMonth() + 1).padStart(2, '0');
+ const day = String(weekDay.getDate()).padStart(2, '0');
+ return `${month}-${day}`;
+ }
+ return '';
+ })
+ },
+ {
+ title: t('page.table.weekCycle'),
+ field: 'weekCycle',
+ width: 80,
+ },
+ {
+ title: t('page.table.mainPartNumber'),
+ field: 'mainPartNumber',
+ width: 150,
+ },
+ {
+ title: t('page.table.mainPartDrawingNumber'),
+ field: 'mainPartDrawingNumber',
+ width: 150,
+ },
+ {
+ title: t('page.table.customer'),
+ field: 'customer',
+ width: 200,
+ },
+ {
+ title: t('page.table.businessType'),
+ field: 'businessType',
+ width: 150,
+ },
+ {
+ title: t('page.table.documentNumber'),
+ field: 'documentNumber',
+ width: 150,
+ },
+ {
+ title: t('page.table.requirementType'),
+ field: 'requirementType',
+ width: 150,
+ },
+ {
+ title: t('page.table.documentStatus'),
+ field: 'documentStatus',
+ width: 100,
+ },
+ {
+ title: t('page.table.itemNumber'),
+ field: 'itemNumber',
+ width: 150,
+ },
+ {
+ title: t('page.table.drawingNo'),
+ field: 'drawingNo',
+ width: 150,
+ },
+ {
+ title: t('page.table.versionNumber'),
+ field: 'versionNumber',
+ width: 100,
+ },
+ {
+ title: t('page.table.productionQuantity'),
+ field: 'productionQuantity',
+ width: 100,
+ },
+ {
+ title: t('page.table.goodProductsQuantity'),
+ field: 'goodProductsQuantity',
+ width: 100,
+ },
+ {
+ title: t('page.table.processNumber'),
+ field: 'processNumber',
+ width: 150,
+ },
+ {
+ title: t('page.table.factoryCenter'),
+ field: 'workCenter',
+ width: 150,
+ },
+ {
+ title: t('page.table.dependencyDepartment'),
+ field: 'department',
+ width: 100,
+ },
+ {
+ title: t('page.table.planStartDay'),
+ field: 'planStartDay',
+ width: 100,
+ },
+ {
+ title: t('page.table.planEndDayDate'),
+ field: 'planEndDay',
+ width: 100,
+ },
+ {
+ title: t('page.table.standbyNumber'),
+ field: 'standbyNumber',
+ width: 100,
+ },
+ {
+ title: t('page.table.standbyName'),
+ field: 'standbyName',
+ width: 200,
+ },
+ {
+ title: t('page.table.standbyStock'),
+ field: 'standbyStock',
+ width: 100,
+ },
+ {
+ title: t('page.table.departmentToNextProcessBelongs'),
+ field: 'nextProcessDeparment',
+ width: 180,
+ },
+ {
+ title: t('page.table.isSuspended'),
+ field: 'isSuspended',
+ width: 100,
+ },
+ {
+ title: t('page.table.isOutsourcing'),
+ field: 'isOutsourcing',
+ width: 100,
+ },
+ {
+ title: t('page.table.account'),
+ field: 'account',
+ width: 100,
+ },
+ // {
+ // title: '涓婇樁鐗╂枡',
+ // field: 'advancedMaterials',
+ // width: 100,
+ // },
+ // {
+ // title: '涓婇樁鍗曟嵁鍙�',
+ // field: 'advancedDocumentNumber',
+ // width: 100,
+ // },
+ // {
+ // title: '涓婇樁闇�姹傛棩鏈�',
+ // field: 'advancedRequirementDay',
+ // width: 150,
+ // },
+ // {
+ // title: '璁″垝榻愬',
+ // field: 'isPlanComplete',
+ // width: 100,
+ // },
+ // {
+ // title: '搴撳瓨榻愬',
+ // field: 'isStockComplete',
+ // width: 100,
+ // },
+ // {
+ // title: '鏄惁鏈夋姌杩斿伐搴�',
+ // field: 'hasTurnback',
+ // width: 150,
+ // },
+ // {
+ // title: '椋庨櫓鏍囪瘑',
+ // field: 'hasRisk',
+ // width: 100,
+ // },
+ ];
+ // 琛ㄦ牸閰嶇疆
+ columns.value = [
+ { field: 'expand', type: 'expand', width: 60, align: 'center', slots: { content: 'expandContent' } },
+ { type: 'checkbox', width: 60, align:"center"},
+ { type: 'seq', title: t('page.table.seq'), width: 60 },
+ // {
+ // title: '涓昏鍒掑憳',
+ // field: 'masterPlanner',
+ // width: 100,
+ // },
+ // {
+ // title: '鍛ㄦ棩',
+ // field: 'weekDay',
+ // width: 100,
+ // formatter: (({ cellValue, row, column }) => {
+ // if (cellValue) {
+ // const weekDay = new Date(cellValue);
+ // const year = weekDay.getFullYear();
+ // const month = String(weekDay.getMonth() + 1).padStart(2, '0');
+ // const day = String(weekDay.getDate()).padStart(2, '0');
+ // return `${month}-${day}`;
+ // }
+ // return '';
+ // })
+ // },
+ // {
+ // title: '鍛ㄥ害',
+ // field: 'weekCycle',
+ // width: 80,
+ // },
+ {
+ title: t('page.table.mainPartNumber'),
+ field: 'mainPartNumber',
+ width: 150,
+ },
+ // {
+ // title: '涓讳欢鍥惧彿',
+ // field: 'mainPartDrawingNumber',
+ // width: 150,
+ // },
+ // {
+ // title: '瀹㈡埛鍚嶇О',
+ // field: 'customer',
+ // width: 200,
+ // },
+ {
+ title: t('page.table.businessType'),
+ field: 'businessType',
+ width: 100,
+ },
+ {
+ title: t('page.table.documentNumber'),
+ field: 'documentNumber',
+ width: 140,
+ },
+ {
+ title: t('page.table.requirementType'),
+ field: 'requirementType',
+ width: 100,
+ },
+ {
+ title: t('page.table.documentStatus'),
+ field: 'documentStatus',
+ width: 100,
+ },
+ {
+ title: t('page.table.itemNumber'),
+ field: 'itemNumber',
+ width: 100,
+ },
+ {
+ title: t('page.table.drawingNo'),
+ field: 'drawingNo',
+ width: 100,
+ },
+ // {
+ // title: '鐗堟湰鍙�',
+ // field: 'versionNumber',
+ // width: 100,
+ // },
+ {
+ title: t('page.table.productionQuantity'),
+ field: 'productionQuantity',
+ width: 100,
+ },
+ // {
+ // title: '鑹搧鏁伴噺',
+ // field: 'goodProductsQuantity',
+ // width: 100,
+ // },
+ {
+ title: t('page.table.processNumber'),
+ field: 'processNumber',
+ width: 100,
+ },
+ {
+ title: t('page.table.factoryCenter'),
+ field: 'workCenter',
+ width: 180,
+ },
+ // {
+ // title: '鎵�灞為儴闂�',
+ // field: 'department',
+ // width: 100,
+ // },
+ // {
+ // title: '璁″垝寮�宸ユ棩',
+ // field: 'planStartDay',
+ // width: 100,
+ // },
+ {
+ title: t('page.table.planEndDayDate'),
+ field: 'planEndDay',
+ width: 100,
+ },
+ // {
+ // title: '澶囨枡鏂欏彿',
+ // field: 'standbyNumber',
+ // width: 100,
+ // },
+ // {
+ // title: '澶囨枡鍚嶇О',
+ // field: 'standbyName',
+ // width: 100,
+ // },
+ // {
+ // title: '澶囨枡搴撳瓨',
+ // field: 'standbyStock',
+ // width: 100,
+ // },
+ // {
+ // title: '涓嬮亾宸ュ簭鎵�灞為儴闂�',
+ // field: 'nextProcessDeparment',
+ // width: 160,
+ // },
+ // {
+ // title: '鏄惁鎸傝捣',
+ // field: 'isSuspended',
+ // width: 100,
+ // },
+ // {
+ // title: '澶栧崗鏍囪瘑',
+ // field: 'isOutsourcing',
+ // width: 100,
+ // },
+ // {
+ // title: '璐﹀',
+ // field: 'account',
+ // width: 100,
+ // },
+ // {
+ // title: '涓婇樁鐗╂枡',
+ // field: 'advancedMaterials',
+ // width: 100,
+ // },
+ // {
+ // title: '涓婇樁鍗曟嵁鍙�',
+ // field: 'advancedDocumentNumber',
+ // width: 100,
+ // },
+ // {
+ // title: '涓婇樁闇�姹傛棩鏈�',
+ // field: 'advancedRequirementDay',
+ // width: 100,
+ // },
+ // {
+ // title: '璁″垝榻愬',
+ // field: 'isPlanComplete',
+ // width: 100,
+ // },
+ // {
+ // title: '搴撳瓨榻愬',
+ // field: 'isStockComplete',
+ // width: 100,
+ // },
+ // {
+ // title: '鏄惁鏈夋姌杩斿伐搴�',
+ // field: 'hasTurnback',
+ // width: 120,
+ // },
+ // {
+ // title: '椋庨櫓鏍囪瘑',
+ // field: 'hasRisk',
+ // width: 100,
+ // },
+ ];
+ subGridOptions.value.columns = [
+ {
+ title: t('page.table.itemNumber'),
+ field: 'itemNo',
+ width: 150,
+ align:"center",
+ },
+ {
+ title: t('page.table.workOrderNo'),
+ field: 'workOrderNo',
+ width: 150,
+ align:"center",
+ },
+ {
+ title: t('page.table.processNumber'),
+ field: 'processNumber',
+ width: 150,
+ align:"center",
+ },
+ {
+ title: t('page.table.processName'),
+ field: 'processName',
+ width: 150,
+ align:"center",
+ },
+ {
+ title: t('page.table.startDateOfProcessPlan'),
+ field: 'processPlanStartDay',
+ width: 200,
+ align:"center",
+ },
+ {
+ title: t('page.table.endDateOfProcessPlan'),
+ field: 'processPlanEndDay',
+ width: 200,
+ align:"center",
+ },
+ // {
+ // title: '鏈紑宸ユ暟閲�',
+ // field: 'notStartWorkCount',
+ // width: 90,
+ // align:"center",
+ // },
+ // {
+ // title: '宸插畬鎴愭暟閲�',
+ // field: 'completedCount',
+ // width: 90,
+ // align:"center",
+ // },
+ // {
+ // title: '搴熷純鏁伴噺',
+ // field: 'discardCount',
+ // width: 90,
+ // align:"center",
+ // },
+ {
+ title: t('page.table.standardTime'),
+ field: 'standardTime',
+ width: 90,
+ align:"center",
+ },
+ {
+ title: t('page.table.processOrder'),
+ field: 'processOrder',
+ width: 90,
+ align:"center",
+ },
+ {
+ title: t('page.table.integrationDay'),
+ field: 'integrationDay',
+ width: 160,
+ align:"center",
+ }
+ ]
+ getList();
+},{immediate:true, deep:true})
/** 鏌ヨ閽i噾璁″垝涓存椂绠$悊鍒楄〃 */
function getExampleList() {
loading.value = true;
@@ -768,84 +853,85 @@
}
/*瀹氫箟涓嬫媺浜岀骇琛�*/
-const subGridOptions = reactive({
- border: true,
- showOverflow: true,
- columns: [
- {
- title: '鏂欏彿',
- field: 'itemNo',
- width: 150,
- align:"center",
- },
- {
- title: '宸ュ崟鍙�',
- field: 'workOrderNo',
- width: 150,
- align:"center",
- },
- {
- title: '宸ュ簭搴忓彿',
- field: 'processNumber',
- width: 100,
- align:"center",
- },
- {
- title: '宸ュ簭鍚嶇О',
- field: 'processName',
- width: 150,
- align:"center",
- },
- {
- title: '宸ュ簭璁″垝寮�濮嬫棩鏈�',
- field: 'processPlanStartDay',
- width: 200,
- align:"center",
- },
- {
- title: '宸ュ簭璁″垝缁撴潫鏃ユ湡',
- field: 'processPlanEndDay',
- width: 200,
- align:"center",
- },
- // {
- // title: '鏈紑宸ユ暟閲�',
- // field: 'notStartWorkCount',
- // width: 90,
- // align:"center",
- // },
- // {
- // title: '宸插畬鎴愭暟閲�',
- // field: 'completedCount',
- // width: 90,
- // align:"center",
- // },
- // {
- // title: '搴熷純鏁伴噺',
- // field: 'discardCount',
- // width: 90,
- // align:"center",
- // },
- {
- title: '鏍囧噯宸ユ椂',
- field: 'standardTime',
- width: 90,
- align:"center",
- },
- {
- title: '宸ュ簭鎺掑簭',
- field: 'processOrder',
- width: 90,
- align:"center",
- },
- {
- title: '闆嗘垚鏃ユ湡',
- field: 'integrationDay',
- width: 160,
- align:"center",
- }
- ]
-})
+// const subGridOptions = ref({
+// border: true,
+// showOverflow: true,
+// columns: [
+// {
+// title: t('page.table.itemNumber'),
+// field: 'itemNo',
+// width: 150,
+// align:"center",
+// },
+// {
+// title: t('page.table.workOrderNo'),
+// field: 'workOrderNo',
+// width: 150,
+// align:"center",
+// },
+// {
+// title: t('page.table.processNumber'),
+// field: 'processNumber',
+// width: 100,
+// align:"center",
+// },
+// {
+// title: t('page.table.processName'),
+// field: 'processName',
+// width: 150,
+// align:"center",
+// },
+// {
+// title: t('page.table.startDateOfProcessPlan'),
+// field: 'processPlanStartDay',
+// width: 200,
+// align:"center",
+// },
+// {
+// title: '宸ュ簭璁″垝缁撴潫鏃ユ湡',
+// field: 'processPlanEndDay',
+// width: 200,
+// align:"center",
+// },
+// // {
+// // title: '鏈紑宸ユ暟閲�',
+// // field: 'notStartWorkCount',
+// // width: 90,
+// // align:"center",
+// // },
+// // {
+// // title: '宸插畬鎴愭暟閲�',
+// // field: 'completedCount',
+// // width: 90,
+// // align:"center",
+// // },
+// // {
+// // title: '搴熷純鏁伴噺',
+// // field: 'discardCount',
+// // width: 90,
+// // align:"center",
+// // },
+// {
+// title: '鏍囧噯宸ユ椂',
+// field: 'standardTime',
+// width: 90,
+// align:"center",
+// },
+// {
+// title: '宸ュ簭鎺掑簭',
+// field: 'processOrder',
+// width: 90,
+// align:"center",
+// },
+// {
+// title: '闆嗘垚鏃ユ湡',
+// field: 'integrationDay',
+// width: 160,
+// align:"center",
+// }
+// ]
+// })
+
const expandConfig = ref({
lazy: true,
loadMethod ({ row }) {
diff --git a/src/views/mainPlan/platePlanList/index.vue b/src/views/mainPlan/platePlanList/index.vue
index 4297ece..acb6fe0 100644
--- a/src/views/mainPlan/platePlanList/index.vue
+++ b/src/views/mainPlan/platePlanList/index.vue
@@ -40,7 +40,7 @@
icon="Download"
@click="handleExport"
v-hasPermi="['plateProcessShopStat:export']"
- >瀵煎嚭</el-button
+ >{{ $t(`page.common.export`) }}</el-button
>
</el-col>
<el-col :span="1.5">
@@ -50,7 +50,7 @@
icon="Edit"
@click="handleUpdate"
v-hasPermi="['plateProcessShopStat:update']"
- >鏇存柊</el-button
+ >{{ $t(`page.common.update`) }}</el-button
>
</el-col>
@@ -68,7 +68,7 @@
>
</HxlhTable>
<!-- 娣诲姞鎴栦慨鏀归挘閲戠粺璁″璇濇 -->
- <el-dialog :title="title" v-model="open" width="500px" append-to-body>
+ <!-- <el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form
ref="aps_plate_process_statRef"
:model="form"
@@ -103,7 +103,7 @@
<el-button @click="cancel">鍙� 娑�</el-button>
</div>
</template>
- </el-dialog>
+ </el-dialog> -->
</div>
</template>
@@ -116,8 +116,12 @@
import { getToken } from "@/utils/auth";
import { nextTick, onMounted, ref } from "vue";
import { ElMessage } from "element-plus";
+import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲
+// import i18n from "@/utils/i18n";
+// const t = i18n.global.t
+const { t, locale } = useI18n();
const { proxy } = getCurrentInstance();
-
+// console.log(proxy.$i18n.locale, "indexPlanList");
const aps_plate_process_statList = ref([]);
const dynamicList = ref([]);
const generateColumnList = ref([]);
@@ -150,114 +154,117 @@
// },
// rules: {},
});
+const columns = ref([]);
const xGrid = ref();
const { queryParams, form, rules } = toRefs(data);
-
-// 琛ㄦ牸閰嶇疆
-const columns = ref([
- /* { type: 'seq', title: '搴忓彿', width: 60 },*/
- {
- title: "涓讳欢鏂欏彿",
- field: "mainPartNumber",
- width: 150,
- fixed: "left",
- },
- {
- title: "涓氬姟绫诲瀷",
- field: "businessType",
- width: 120,
- fixed: "left",
- },
- {
- title: "鍗曟嵁鍙�",
- field: "documentNumber",
- width: 160,
- fixed: "left",
- },
- {
- title: "闇�姹傚垎绫�",
- field: "requirementType",
- width: 100,
- fixed: "left",
- },
- {
- title: "鍗曟嵁鐘舵��",
- field: "documentStatus",
- width: 100,
- fixed: "left",
- },
- {
- title: "瀹℃牳鏃堕棿",
- field: "updateBy",
- width: 100,
- },
- {
- title: "褰撳墠宸ュ簭",
- field: "workCenter",
- width: 200,
- },
- {
- title: "褰撳墠宸ュ簭璐熻矗浜�",
- field: "department",
- width: 200,
- },
- {
- title: "褰撳墠宸ュ簭鐘舵��",
- field: "opStatus",
- width: 200,
- },
- {
- title: "涓嬩竴宸ュ簭",
- field: "nextOpName",
- width: 100,
- },
- {
- title: "涓嬩竴宸ュ簭璐熻矗浜�",
- field: "nextProcessDeparment",
- width: 200,
- },
- {
- title: "鏂欏彿",
- field: "itemNumber",
- width: 150,
- type: "html",
- },
- {
- title: "鍥惧彿",
- field: "drawingNo",
- width: 150,
- // format: 'YYYY-MM-DD'
- },
- {
- title: "鐗堟湰鍙�",
- field: "versionNumber",
- width: 100,
- type: "html",
- },
- {
- title: "浣庨樁鐮�",
- field: "updateBy",
- width: 100,
- },
- {
- title: "鐢熶骇鏁伴噺",
- field: "productionQuantity",
- width: 100,
- type: "html",
- },
- {
- title: "宸ュ崟璁″垝涓嬪彂鏃堕棿",
- field: "updateBy",
- width: 200,
- },
- {
- title: "绯荤粺瀹屽伐鏃堕棿",
- field: "planEndDay",
- width: 150,
- format: "YYYY-MM-DD hh:mm:ss",
- },
-]);
-
+watch(locale, (newLocale) => {
+ // 閲嶆柊鑾峰彇缈昏瘧鏂囨湰
+ // 琛ㄦ牸閰嶇疆
+ columns.value = [
+ /* { type: 'seq', title: '搴忓彿', width: 60 },*/
+ {
+ title: t("page.table.mainPartNumber"),
+ field: "mainPartNumber",
+ width: 150,
+ fixed: "left",
+ },
+ {
+ title: t("page.table.businessType"),
+ field: "businessType",
+ width: 120,
+ fixed: "left",
+ },
+ {
+ title: t("page.table.documentNumber"),
+ field: "documentNumber",
+ width: 160,
+ fixed: "left",
+ },
+ {
+ title: t("page.table.requirementType"),
+ field: "requirementType",
+ width: 100,
+ fixed: "left",
+ },
+ {
+ title: t("page.table.documentStatus"),
+ field: "documentStatus",
+ width: 100,
+ fixed: "left",
+ },
+ {
+ title: t("page.table.updateBy"),
+ field: "updateBy",
+ width: 100,
+ },
+ {
+ title: t("page.table.workCenter"),
+ field: "workCenter",
+ width: 200,
+ },
+ {
+ title: t("page.table.department"),
+ field: "department",
+ width: 200,
+ },
+ {
+ title: t("page.table.opStatus"),
+ field: "opStatus",
+ width: 200,
+ },
+ {
+ title: t("page.table.nextOpName"),
+ field: "nextOpName",
+ width: 100,
+ },
+ {
+ title: t("page.table.nextProcessDeparment"),
+ field: "nextProcessDeparment",
+ width: 200,
+ },
+ {
+ title: t("page.table.itemNumber"),
+ field: "itemNumber",
+ width: 150,
+ type: "html",
+ },
+ {
+ title: t("page.table.drawingNo"),
+ field: "drawingNo",
+ width: 150,
+ // format: 'YYYY-MM-DD'
+ },
+ {
+ title: t("page.table.versionNumber"),
+ field: "versionNumber",
+ width: 100,
+ type: "html",
+ },
+ {
+ title: t("page.table.cheaperCode"),
+ field: "cheaperCode",
+ width: 100,
+ },
+ {
+ title: t("page.table.productionQuantity"),
+ field: "productionQuantity",
+ width: 100,
+ type: "html",
+ },
+ {
+ title: t("page.table.planworkOrderTime"),
+ field: "planworkOrderTime",
+ width: 200,
+ },
+ {
+ title: t("page.table.planEndDay"),
+ field: "planEndDay",
+ width: 150,
+ format: "YYYY-MM-DD hh:mm:ss",
+ },
+ ]
+ getList();
+},{immediate:true, deep:true});
/** 鏌ヨ閽i噾缁熻鍒楄〃 */
async function getList() {
loading.value = true;
@@ -279,7 +286,6 @@
};
}
);
- console.log(aps_plate_process_statList.value, "resDataresDataresData");
let newArray = [];
newArray = dynamicList.value.flatMap((item, index) => [
{
@@ -421,7 +427,8 @@
}
getList();
// onMounted(async () => {
-//
+// await nextTick();
+
// });
</script>
<style lang="scss" scoped>
--
Gitblit v1.9.3