From 960ed35de06e571da5656050fa39106b2a3d2dba Mon Sep 17 00:00:00 2001 From: CD配唱片 <CD配唱片> Date: 星期四, 08 五月 2025 11:32:35 +0800 Subject: [PATCH] 提交钣金异常页面,前端项目自动导入element组件,i18n文件修改 --- src/views/mainPlan/abnormalProcessAnalysis/index.vue | 2 src/views/mainPlan/plateProcessStat/index.vue | 2 src/layout/components/Navbar.vue | 2 src/views/basicData/processRoute/index.vue | 2 src/views/basicData/gasMaterialUsage/index.vue | 2 src/views/basicData/resourceGroup/index.vue | 2 src/utils/i18n/locales/common/index.js | 6 src/views/mainPlan/gasPiping/index.vue | 2 src/views/mainPlan/gasProduceStatics/index.vue | 2 src/views/basicData/bom/index.vue | 2 src/views/register.vue | 2 vite/plugins/index.js | 37 + src/views/mainPlan/abnormalPartNumberReport/index.vue | 326 +++++++++++++++++++++++ src/views/mainPlan/gasPlanning/index.vue | 2 src/utils/i18n/locales/plan/index.js | 20 + src/views/basicData/processRouteDataPreparate/index.vue | 2 src/views/mainPlan/platePlan/index.vue | 2 src/permission.js | 2 src/views/mainPlan/pipeProduceStatics/index.vue | 2 src/views/basicData/sheetMetalParamConfig/index.vue | 2 src/views/mainPlan/sheetMetalOrderManage/index.vue | 341 ++++++++++++++---------- src/views/mainPlan/platePlanList/index.vue | 2 src/views/basicData/standardProcess/index.vue | 2 src/utils/i18n/index.js | 4 src/plugins/modal.js | 2 src/utils/request.js | 2 /dev/null | 12 src/main.js | 2 src/views/partPlan/index.vue | 2 package.json | 3 src/plugins/download.js | 2 src/layout/components/Settings/index.vue | 2 src/App.vue | 20 33 files changed, 612 insertions(+), 205 deletions(-) diff --git a/package.json b/package.json index 5d3a564..379ac1a 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,8 @@ "devDependencies": { "@vitejs/plugin-vue": "5.0.5", "sass": "1.77.5", - "unplugin-auto-import": "0.17.6", + "unplugin-auto-import": "^0.17.6", + "unplugin-vue-components": "^28.5.0", "unplugin-vue-setup-extend-plus": "1.0.1", "vite": "5.3.2", "vite-plugin-compression": "0.5.1", diff --git a/src/App.vue b/src/App.vue index 31839f2..9b83df5 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,15 +1,21 @@ <template> - <router-view /> + <el-config-provider :locale="locale==='zh'?zhCnEl:enUsEl"> + <router-view /> + </el-config-provider> </template> <script setup> -import useSettingsStore from '@/store/modules/settings' -import { handleThemeStyle } from '@/utils/theme' - +import { ElConfigProvider } from "element-plus"; +import zhCnEl from "element-plus/es/locale/lang/zh-cn"; +import enUsEl from "element-plus/es/locale/lang/en"; +import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲 +const { locale } = useI18n(); +import useSettingsStore from "@/store/modules/settings"; +import { handleThemeStyle } from "@/utils/theme"; onMounted(() => { nextTick(() => { // 鍒濆鍖栦富棰樻牱寮� - handleThemeStyle(useSettingsStore().theme) - }) -}) + handleThemeStyle(useSettingsStore().theme); + }); +}); </script> diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index a2de976..ca25744 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -63,7 +63,7 @@ </template> <script setup> -import { ElMessageBox } from "element-plus"; +// import { ElMessageBox } from "element-plus"; import Breadcrumb from "@/components/Breadcrumb"; import TopNav from "@/components/TopNav"; import Hamburger from "@/components/Hamburger"; diff --git a/src/layout/components/Settings/index.vue b/src/layout/components/Settings/index.vue index 4ef2437..cd86ba2 100644 --- a/src/layout/components/Settings/index.vue +++ b/src/layout/components/Settings/index.vue @@ -81,7 +81,7 @@ <script setup> import variables from '@/assets/styles/variables.module.scss' import axios from 'axios' -import { ElLoading, ElMessage } from 'element-plus' +// import { ElLoading, ElMessage } from 'element-plus' import { useDynamicTitle } from '@/utils/dynamicTitle' import useAppStore from '@/store/modules/app' import useSettingsStore from '@/store/modules/settings' diff --git a/src/main.js b/src/main.js index c68bb70..5b16285 100644 --- a/src/main.js +++ b/src/main.js @@ -54,7 +54,6 @@ VxeUITable.setI18n('zh-CN', zhCN) VxeUITable.setI18n('en-US', enUS) const app = createApp(App) - // 鍏ㄥ眬鏂规硶鎸傝浇 app.config.globalProperties.useDict = useDict app.config.globalProperties.download = download @@ -84,7 +83,6 @@ // 浣跨敤element-plus 骞朵笖璁剧疆鍏ㄥ眬鐨勫ぇ灏� app.use(ElementPlus, { - locale: locale, // 鏀寔 large銆乨efault銆乻mall size: Cookies.get('size') || 'default' }) diff --git a/src/permission.js b/src/permission.js index 7e3b5bf..dc6a740 100644 --- a/src/permission.js +++ b/src/permission.js @@ -1,5 +1,5 @@ import router from './router' -import { ElMessage } from 'element-plus' +// import { ElMessage } from 'element-plus' import NProgress from 'nprogress' import 'nprogress/nprogress.css' import { getToken } from '@/utils/auth' diff --git a/src/plugins/download.js b/src/plugins/download.js index 51216df..00feef7 100644 --- a/src/plugins/download.js +++ b/src/plugins/download.js @@ -1,5 +1,5 @@ 锘縤mport axios from 'axios' -import { ElLoading, ElMessage } from 'element-plus' +// import { ElLoading, ElMessage } from 'element-plus' import { saveAs } from 'file-saver' import { getToken } from '@/utils/auth' import errorCode from '@/utils/errorCode' diff --git a/src/plugins/modal.js b/src/plugins/modal.js index b59e14d..fbaf5b4 100644 --- a/src/plugins/modal.js +++ b/src/plugins/modal.js @@ -1,4 +1,4 @@ -import { ElMessage, ElMessageBox, ElNotification, ElLoading } from 'element-plus' +// import { ElMessage, ElMessageBox, ElNotification, ElLoading } from 'element-plus' let loadingInstance; diff --git a/src/utils/i18n/index.js b/src/utils/i18n/index.js index 0e58105..71e5ca8 100644 --- a/src/utils/i18n/index.js +++ b/src/utils/i18n/index.js @@ -7,12 +7,12 @@ let EN = { plan: planEn, common: commonEn, - basic: basicEn + basic: basicEn, } let ZH = { plan: planZh, common: commonZh, - basic: basicZh + basic: basicZh, } const i18n = createI18n({ locale: 'zh', // 璁剧疆榛樿璇█涓轰腑鏂� diff --git a/src/utils/i18n/locales/common/index.js b/src/utils/i18n/locales/common/index.js index fa1ef70..b11f7c8 100644 --- a/src/utils/i18n/locales/common/index.js +++ b/src/utils/i18n/locales/common/index.js @@ -20,7 +20,8 @@ cancel: "鍙栨秷", placeholder:"璇疯緭鍏�", view:"鏌ョ湅", - viewDetails:"鏌ョ湅璇︽儏" + viewDetails:"鏌ョ湅璇︽儏", + operate:"鎿嶄綔" }, }; export const en = { @@ -45,6 +46,7 @@ cancel: "Cancel", placeholder:"Please enter the ", view:"View", - viewDetails:"View details" + viewDetails:"View details", + operate:"Operate" }, }; diff --git a/src/utils/i18n/locales/plan/index.js b/src/utils/i18n/locales/plan/index.js index c916b2b..6da39b5 100644 --- a/src/utils/i18n/locales/plan/index.js +++ b/src/utils/i18n/locales/plan/index.js @@ -2,6 +2,10 @@ title: { pipePlanCapacity: "绠¤矾浜ц兘瑙勫垝", gasPlanCapacity: "姘旀煖瑙勫垝浜ц兘", + viewAssociatedRequirements:"鏌ョ湅鍏宠仈闇�姹�", + setMode:"璁剧疆妯″紡", + CustomizePlannedCompletionDate:"鑷畾涔夎鍒掑畬宸ユ棩", + tipsBugSheetMetal:"灏嗙敓鎴愮殑閽i噾闇�姹傜殑璁″垝寮�宸ユ棩鍜岃鍒掑畬宸ユ棩璧嬪�肩粰宸ュ崟" }, options: { monthlyStatic: "鎸夋湀缁熻", @@ -31,8 +35,11 @@ btns: { batchPlanStartDay: "鎵归噺淇敼璁″垝寮�宸ユ棩", batchPlanEndDay: "鎵归噺淇敼璁″垝瀹屽伐鏃�", + batchUpdateOrderDate:"鎵归噺鏇存柊宸ュ崟璁″垝鏃ユ湡", + generatePlanOrder:"鐢熸垚閽i噾璁″垝宸ュ崟", confirm: "纭畾", cancel: "鍙栨秷", + viewRequirement:"鏌ョ湅闇�姹�" }, query: { daterangePlanStartDay: "璁″垝寮�宸ユ棩", @@ -157,13 +164,18 @@ processRouteWorkingHours:"宸ヨ壓璺嚎宸ユ椂", demandQuantity:"闇�姹傛暟閲�", netRequirement:"鍑�闇�姹傞噺", - bomItemID: "椤� ID" + bomItemID: "椤� ID", + customizePlannedCompletionDate:"鑷畾涔夎鍒掑畬宸ユ棩" }, }; export const en = { title: { pipePlanCapacity: "Pipeline planning capacity", gasPlanCapacity: "Gas holder planning production capacity", + viewAssociatedRequirements:"View associated requirements", + setMode:"Set Mode", + CustomizePlannedCompletionDate:"Customize the planned completion date", + tipsBugSheetMetal:"Assign the planned start date and planned completion date of the generated sheet metal requirements to the work order" }, options: { monthlyStatic: "Monthly statistics", @@ -194,8 +206,11 @@ btns: { batchPlanStartDay: "Batch modification of planned start date", batchPlanEndDay: "Batch modification plan completion date", + batchUpdateOrderDate:"Batch update work order plan date", + generatePlanOrder:"Generate sheet metal plan work order", confirm: "Confirm", cancel: "Cancel", + viewRequirement:"View requirements" }, query: { daterangePlanStartDay: "Planned start date", @@ -319,6 +334,7 @@ processRouteWorkingHours:"Process route working hours", demandQuantity:"Demand Quantity", netRequirement:"Net Requirement", - bomItemID:"Item ID" + bomItemID:"Item ID", + customizePlannedCompletionDate:"Customize the planned completion date" }, }; diff --git a/src/utils/request.js b/src/utils/request.js index be37721..26411b0 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -1,5 +1,5 @@ import axios from 'axios' -import {ElLoading, ElMessage, ElMessageBox, ElNotification} from 'element-plus' +// import {ElLoading, ElMessage, ElMessageBox, ElNotification} from 'element-plus' import {getToken} from '@/utils/auth' import errorCode from '@/utils/errorCode' import {blobValidate, tansParams} from '@/utils/ruoyi' diff --git a/src/views/basicData/bom/index.vue b/src/views/basicData/bom/index.vue index a27ebfe..0d93fef 100644 --- a/src/views/basicData/bom/index.vue +++ b/src/views/basicData/bom/index.vue @@ -131,7 +131,7 @@ } from "@/api/basicData/bom/bom.js"; import { listAll_plant } from "@/api/basicData/plant"; import HxlhTable from "@/components/HxlhTable/index.vue"; -import { ElMessage } from "element-plus"; +// import { ElMessage } from "element-plus"; import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲 const { t, locale } = useI18n(); const { proxy } = getCurrentInstance(); diff --git a/src/views/basicData/gasMaterialUsage/index.vue b/src/views/basicData/gasMaterialUsage/index.vue index 143853d..c565a24 100644 --- a/src/views/basicData/gasMaterialUsage/index.vue +++ b/src/views/basicData/gasMaterialUsage/index.vue @@ -139,7 +139,7 @@ import HxlhTable from "@/components/HxlhTable/index.vue"; import {ref} from "vue"; import {getToken} from "@/utils/auth.js"; -import {ElMessage} from "element-plus"; +// import {ElMessage} from "element-plus"; const {proxy} = getCurrentInstance(); diff --git a/src/views/basicData/processRoute/index.vue b/src/views/basicData/processRoute/index.vue index e209bff..684cec3 100644 --- a/src/views/basicData/processRoute/index.vue +++ b/src/views/basicData/processRoute/index.vue @@ -206,7 +206,7 @@ import HxlhTable from "@/components/HxlhTable"; import { getToken } from "@/utils/auth"; import { ref } from "vue"; -import { ElMessage } from "element-plus"; +// import { ElMessage } from "element-plus"; const { proxy } = getCurrentInstance(); const processRouteList = ref([]); diff --git a/src/views/basicData/processRouteDataPreparate/index.vue b/src/views/basicData/processRouteDataPreparate/index.vue index afce936..dd00a50 100644 --- a/src/views/basicData/processRouteDataPreparate/index.vue +++ b/src/views/basicData/processRouteDataPreparate/index.vue @@ -134,7 +134,7 @@ import HxlhTable from "@/components/HxlhTable/index.vue"; import { ref } from "vue"; import { getToken } from "@/utils/auth.js"; -import { ElMessage } from "element-plus"; +// import { ElMessage } from "element-plus"; import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲 const { t, locale } = useI18n(); const { proxy } = getCurrentInstance(); diff --git a/src/views/basicData/resourceGroup/index.vue b/src/views/basicData/resourceGroup/index.vue index e949e26..1ba8e96 100644 --- a/src/views/basicData/resourceGroup/index.vue +++ b/src/views/basicData/resourceGroup/index.vue @@ -161,7 +161,7 @@ import HxlhTable from '@/components/HxlhTable/index.vue' import { getToken } from "@/utils/auth.js"; import { ref } from "vue"; -import { ElMessage } from 'element-plus' +// import { ElMessage } from 'element-plus' const { proxy } = getCurrentInstance(); const ApsResourceGroupList = ref([]); diff --git a/src/views/basicData/sheetMetalParamConfig/index.vue b/src/views/basicData/sheetMetalParamConfig/index.vue index e1c8a6f..62135fa 100644 --- a/src/views/basicData/sheetMetalParamConfig/index.vue +++ b/src/views/basicData/sheetMetalParamConfig/index.vue @@ -25,7 +25,7 @@ queryConfigParams, queryConfigParamsSave, } from "@/api/basicData/sheetMetalConfig/sheetMetalConfig"; -import { ElMessage } from "element-plus"; +// import { ElMessage } from "element-plus"; const { proxy } = getCurrentInstance(); // const { plate_plan_param } = proxy.useDict('plate_plan_param'); const ruleForm = ref({ diff --git a/src/views/basicData/standardProcess/index.vue b/src/views/basicData/standardProcess/index.vue index 6f58e01..9159628 100644 --- a/src/views/basicData/standardProcess/index.vue +++ b/src/views/basicData/standardProcess/index.vue @@ -324,7 +324,7 @@ import HxlhTable from "@/components/HxlhTable/index.vue"; import { getToken } from "@/utils/auth.js"; import { ref } from "vue"; -import { ElMessage } from "element-plus"; +// import { ElMessage } from "element-plus"; const { proxy } = getCurrentInstance(); // 鍒嗛〉灞炴�� diff --git a/src/views/mainPlan/abnormalPartNumberReport/index.vue b/src/views/mainPlan/abnormalPartNumberReport/index.vue new file mode 100644 index 0000000..0585e63 --- /dev/null +++ b/src/views/mainPlan/abnormalPartNumberReport/index.vue @@ -0,0 +1,326 @@ +<template> + <div class="app-container"> + <el-form + class="responsive-form" + :model="queryParams" + ref="queryRef" + :inline="true" + v-show="showSearch" + :label-width="locale === 'zh' ? '90px' : '200px'" + > + <el-row type="flex" justify="left"> + <el-col :span="locale === 'zh' ? 5 : 10"> + <el-form-item :label="$t('plan.query.itemNumber')" prop="itemNumber"> + <el-input + :style="{ width: locale === 'zh' ? '140px' : '300px' }" + v-model="queryParams.itemNumber" + :placeholder="`${$t('plan.placeholder.requireTraceID')}`" + clearable + @keyup.enter="handleQuery" + /> + </el-form-item> + </el-col> + <el-col :span="locale === 'zh' ? 8 : 9"> + <el-form-item + :label="$t('plan.query.workOrderNo')" + prop="documentNumber" + > + <el-input + :style="{ width: locale === 'zh' ? '140px' : '210px' }" + v-model="queryParams.documentNumber" + :placeholder="`${$t('common.common.placeholder')}${$t( + 'plan.query.itemNumber' + )}`" + clearable + @keyup.enter="handleQuery" + /> + </el-form-item> + </el-col> + <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">{{ + $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" + plain + icon="Download" + @click="handleExport" + v-hasPermi="['Aps:apsPlatePlan:redundantOrderListExport']" + >{{ $t("common.common.export") }}</el-button + > + </el-col> + <right-toolbar + v-model:showSearch="showSearch" + @queryTable="getList" + ></right-toolbar> + </el-row> + <HxlhTable + style="width: 100%" + :columns="columns" + :data="orderList" + :loading="loading" + :height="height" + ref="tableRef" + :page="page" + @changePageNo="changePageNo" + @changePageSize="changePageSize" + @on-checkbox="handleCheckboxChange" + class="auto-height-grid" + > + </HxlhTable> + </div> +</template> + +<script setup name="Calendar"> +import HxlhTable from "@/components/HxlhTable"; +import { + listCalendar, + getCalendar, + delCalendar, + addCalendar, + updateCalendar, +} from "@/api/basicData/calendar"; +import { redundantOrderList } from "@/api/basicData/sheetMetalConfig/sheetMetalConfig"; +import axios from "axios"; +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 orderList = ref([]); +const loading = ref(true); +const showSearch = ref(true); +const ids = ref([]); +const single = ref(true); +const multiple = ref(true); +const total = ref(0); +const title = ref(""); +const data = reactive({ + form: { + type: "1", + }, + queryParams: { + pageNum: 1, + pageSize: 10, + documentNumber: null, + itemNumber: null, + }, +}); +const { queryParams, form, rules } = toRefs(data); +const typeRadioNumber = ref(1); +const plantList = ref([]); +const shopList = ref([]); +const allShopList = ref([]); +const processList = ref([]); +const height = ref(document.documentElement.clientHeight - 220 + "px;"); +// 琛ㄦ牸閰嶇疆-鍒楄〃 +const columns = ref([]); +// 鍒嗛〉灞炴�� +const page = ref({ + total: 0, + current: 1, + size: 10, +}); +watch( + locale, + (newLocale) => { + columns.value = [ + { + title: t("plan.table.workOrderNo"), + field: "documentNumber", + width: 150, + align: "center", + }, + { + title: t("plan.table.subItemPartNumber"), + field: "itemNumber", + width: 200, + align: "center", + }, + { + title: t("plan.table.productionQuantity"), + field: "productionQuantity", + width: 200, + align: "center", + }, + { + title: t("plan.table.mismatchedProductionQuantity"), + field: "unmatchedQuantity", + width: 200, + align: "center", + }, + { + title: t("plan.table.applicableFactories"), + field: "plant", + 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: "productionBase", + width: 200, + align: "center", + }, + { + title: t("plan.table.planStartDay"), + field: "planStartDay", + width: 200, + align: "center", + }, + { + title: t("plan.table.planEndDayDate"), + field: "planEndDay", + width: 100, + align: "center", + }, + { + title: t("plan.table.workorderCreationTime"), + field: "orderCreateTime", + width: 100, + align: "center", + }, + ]; + }, + { immediate: true, deep: true } +); +/** 鏌ヨ鏃ュ巻绠$悊鍒楄〃 */ +function getList() { + loading.value = true; + redundantOrderList(queryParams.value).then((response) => { + orderList.value = response.rows; + page.value.total = response.total; + loading.value = false; + }).catch(()=>{ + loading.value = false; + }); +} + +// 琛ㄥ崟閲嶇疆 +function reset() { + proxy.resetForm("queryRef"); +} + +/** 鎼滅储鎸夐挳鎿嶄綔 */ +function handleQuery() { + queryParams.value.pageNum = 1; + page.value.current = 1; + getList(); +} + +/** 閲嶇疆鎸夐挳鎿嶄綔 */ +function resetQuery() { + proxy.resetForm("queryRef"); + handleQuery(); +} + +/** 瀵煎嚭鎸夐挳鎿嶄綔 */ +function handleExport() { + proxy.download( + "aps/apsPlatePlan/redundantOrderListExport", + { + ...queryParams.value, + }, + `redundantOrderList_${new Date().getTime()}.xlsx` + ); +} +function changePageNo(currentPage) { + queryParams.value.pageNum = currentPage; + page.value.current = currentPage; + getList(); +} +function changePageSize(pageSize) { + page.value.current = 1; + queryParams.value.pageNum = 1; + queryParams.value.pageSize = pageSize; + getList(); +} +onMounted(() => { + getList(); + /** 鏌ヨ宸ュ巶鍒楄〃 */ + listAll_plant({}) + .then((response) => { + plantList.value = response.data; + }) + .catch((error) => { + console.error("璇锋眰鍑洪敊:", error); + }); +}); +</script> +<style lang="scss" scoped> +.column-with-margin { + margin-right: 0px; +} +.title_bar_line { + display: flex; + justify-content: flex-start; + align-items: center; + color: #333; + margin-bottom: 10px; + .line_short { + width: 5%; + height: 1px; + margin-right: 20px; + border-top: 1px solid #ddd; + } + .line_long { + width: 60%; + height: 1px; + margin-left: 20px; + border-top: 1px solid #ddd; + } +} +.week_flex { + display: flex; + justify-content: flex-start; + align-content: center; + color: #606266; + font-weight: 700; + margin-left: 20px; + &.mt20 { + margin-top: 20px; + margin-left: 0 !important; + } + .week_flex_item { + &:nth-child(1) { + margin-top: 5px; + } + &:nth-child(2) { + margin-left: 20px; + } + } +} +.factory_use_item { + margin-top: 10px; +} +.mart5 { + margin-top: 5px; +} +.custom-height { + height: 200px; /* 鎴栬�呬娇鐢� min-height */ +} +.auto-height-grid .xe-body .xe-body--row { + height: auto; /* 鎴栬�呬娇鐢� min-height */ +} +</style> diff --git a/src/views/mainPlan/abnormalProcessAnalysis/index.vue b/src/views/mainPlan/abnormalProcessAnalysis/index.vue index 0b52b60..ca93cbc 100644 --- a/src/views/mainPlan/abnormalProcessAnalysis/index.vue +++ b/src/views/mainPlan/abnormalProcessAnalysis/index.vue @@ -27,7 +27,7 @@ import HxlhTable from '@/components/HxlhTable/index.vue' import { ref } from "vue"; import { getToken } from "@/utils/auth.js"; -import { ElMessage} from "element-plus"; +// import { ElMessage} from "element-plus"; const { proxy } = getCurrentInstance(); diff --git a/src/views/mainPlan/gasPiping/index.vue b/src/views/mainPlan/gasPiping/index.vue index baadb48..edb3fb4 100644 --- a/src/views/mainPlan/gasPiping/index.vue +++ b/src/views/mainPlan/gasPiping/index.vue @@ -257,7 +257,7 @@ import HxlhTable from "@/components/HxlhTable/index.vue"; import { ref } from "vue"; import { getToken } from "@/utils/auth.js"; -import { ElMessage } from "element-plus"; +// import { ElMessage } from "element-plus"; import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲 const { t, locale } = useI18n(); const { proxy } = getCurrentInstance(); diff --git a/src/views/mainPlan/gasPlanning/index.vue b/src/views/mainPlan/gasPlanning/index.vue index 07687c0..ca82da8 100644 --- a/src/views/mainPlan/gasPlanning/index.vue +++ b/src/views/mainPlan/gasPlanning/index.vue @@ -515,7 +515,7 @@ </div> </template> <script setup name="gasPlanning"> -import { ElMessage } from "element-plus"; +// import { ElMessage } from "element-plus"; import { listGasPlan, getGasPlanSave } from "@/api/mainPlan/gasPlanning"; const height = ref(document.documentElement.clientHeight - 400 + "px;"); import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲 diff --git a/src/views/mainPlan/gasProduceStatics/index.vue b/src/views/mainPlan/gasProduceStatics/index.vue index 29d43d4..303c2f8 100644 --- a/src/views/mainPlan/gasProduceStatics/index.vue +++ b/src/views/mainPlan/gasProduceStatics/index.vue @@ -89,7 +89,7 @@ } from "@/api/mainPlan/gasProduceStatics.js"; import { ref } from "vue"; import * as XLSX from "xlsx"; -import { ElMessage } from "element-plus"; +// import { ElMessage } from "element-plus"; import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲 const { t, locale } = useI18n(); const { proxy } = getCurrentInstance(); diff --git a/src/views/mainPlan/pipeProduceStatics/index.vue b/src/views/mainPlan/pipeProduceStatics/index.vue index a5cc880..6c54a9d 100644 --- a/src/views/mainPlan/pipeProduceStatics/index.vue +++ b/src/views/mainPlan/pipeProduceStatics/index.vue @@ -93,7 +93,7 @@ } from "@/api/mainPlan/gasProduceStatics.js"; import { ref } from "vue"; import * as XLSX from "xlsx"; -import { ElMessage } from "element-plus"; +// import { ElMessage } from "element-plus"; import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲 const { t, locale } = useI18n(); const { proxy } = getCurrentInstance(); diff --git a/src/views/mainPlan/platePlan/index.vue b/src/views/mainPlan/platePlan/index.vue index f3ff9d1..74d6cf9 100644 --- a/src/views/mainPlan/platePlan/index.vue +++ b/src/views/mainPlan/platePlan/index.vue @@ -260,7 +260,7 @@ import HxlhTable from "@/components/HxlhTable/index.vue"; import { ref } from "vue"; import { getToken } from "@/utils/auth.js"; -import { ElMessage } from "element-plus"; +// import { ElMessage } from "element-plus"; import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲 const { proxy } = getCurrentInstance(); const { t, locale } = useI18n(); diff --git a/src/views/mainPlan/platePlanList/index.vue b/src/views/mainPlan/platePlanList/index.vue index 965df29..0224cbb 100644 --- a/src/views/mainPlan/platePlanList/index.vue +++ b/src/views/mainPlan/platePlanList/index.vue @@ -116,7 +116,7 @@ import HxlhTable from "@/components/HxlhTable/index.vue"; import { getToken } from "@/utils/auth"; import { nextTick, onMounted, ref } from "vue"; -import { ElMessage } from "element-plus"; +// import { ElMessage } from "element-plus"; import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲 // import i18n from "@/utils/i18n"; // const t = i18n.global.t diff --git a/src/views/mainPlan/plateProcessStat/index.vue b/src/views/mainPlan/plateProcessStat/index.vue index 774688b..d2a01b7 100644 --- a/src/views/mainPlan/plateProcessStat/index.vue +++ b/src/views/mainPlan/plateProcessStat/index.vue @@ -118,7 +118,7 @@ import HxlhTable from "@/components/HxlhTable/index.vue"; import { getToken } from "@/utils/auth"; import { ref } from "vue"; -import { ElMessage } from "element-plus"; +// import { ElMessage } from "element-plus"; const { proxy } = getCurrentInstance(); import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲 const { t, locale } = useI18n(); diff --git a/src/views/mainPlan/sheetMetalOrderManage/index.vue b/src/views/mainPlan/sheetMetalOrderManage/index.vue index 1d441ba..e2efa66 100644 --- a/src/views/mainPlan/sheetMetalOrderManage/index.vue +++ b/src/views/mainPlan/sheetMetalOrderManage/index.vue @@ -6,44 +6,44 @@ ref="queryRef" :inline="true" v-show="showSearch" - label-width="110px" + :label-width="locale=='zh'?'110px':'200px'" > - <el-form-item label="宸ュ崟鍙�" prop="description"> + <el-form-item :label="$t('plan.query.workOrderNo')" prop="description"> <el-input - style="width: 140px" + :style="{width:locale=='zh'? '200px':'280px'}" v-model="queryParams.description" - placeholder="璇疯緭鍏ラ渶姹傝拷婧疘D" + :placeholder="`${$t('common.common.placeholder')}${$t('plan.query.workOrderNo')}`" clearable @keyup.enter="handleQuery" /> </el-form-item> <!-- <el-row type="flex" justify="left"> <el-col :span="5"> --> - <el-form-item label="闇�姹傝拷婧疘D" prop="description"> + <el-form-item :label="$t('plan.query.requireTraceID')" prop="description"> <el-input - style="width: 140px" + :style="{width:locale=='zh'? '200px':'280px'}" v-model="queryParams.description" - placeholder="璇疯緭鍏ラ渶姹傝拷婧疘D" + :placeholder="`${$t('common.common.placeholder')}${$t('plan.query.requireTraceID')}`" clearable @keyup.enter="handleQuery" /> </el-form-item> <!-- </el-col> <el-col :span="5"> --> - <el-form-item label="鏂欏彿" prop="description"> + <el-form-item :label="$t('plan.query.itemNumber')" prop="description"> <el-input - style="width: 140px" + :style="{width:locale=='zh'? '200px':'280px'}" v-model="queryParams.description" - placeholder="璇疯緭鍏ユ枡鍙�" + :placeholder="`${$t('common.common.placeholder')}${$t('plan.query.itemNumber')}`" clearable @keyup.enter="handleQuery" /> </el-form-item> - <el-form-item label="寤惰繜椋庨櫓鏍囪瘑" prop="description"> + <el-form-item :label="$t('plan.table.delayRiskIdentification')" prop="description"> <el-input - style="width: 140px" + :style="{width:locale=='zh'? '200px':'280px'}" v-model="queryParams.description" - placeholder="璇疯緭鍏ユ枡鍙�" + :placeholder="`${$t('common.common.placeholder')}${$t('plan.table.delayRiskIdentification')}`" clearable @keyup.enter="handleQuery" /> @@ -52,9 +52,9 @@ <el-col :span="14" style="text-align: right"> --> <el-form-item class="column-with-margin"> <el-button type="primary" icon="Search" @click="handleQuery" - >鏌ヨ</el-button + >{{$t('common.common.query')}}</el-button > - <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button> + <el-button icon="Refresh" @click="resetQuery">{{$t('common.common.reset')}}</el-button> </el-form-item> <!-- </el-col> </el-row> --> @@ -69,7 +69,7 @@ :disabled="multiple" @click="handleBatchUpdatePlanDate" v-hasPermi="['apsPlatePlan:edit']" - >鎵归噺鏇存柊宸ュ崟璁″垝鏃ユ湡</el-button + >{{$t('plan.btns.batchUpdateOrderDate')}}</el-button > </el-col> <el-col :span="1.5"> @@ -79,7 +79,7 @@ icon="Edit" @click="handleUpdate" v-hasPermi="['apsPlatePlan:edit']" - >鐢熸垚閽i噾璁″垝宸ュ崟</el-button + >{{$t('plan.btns.generatePlanOrder')}}</el-button > </el-col> <right-toolbar @@ -98,7 +98,6 @@ @changePageNo="changePageNo" @changePageSize="changePageSize" @on-checkbox="handleCheckboxChange" - class="auto-height-grid" > <template #buttons="{ row }"> <el-button @@ -106,12 +105,12 @@ link @click="handleCheckView(row)" v-hasPermi="['aps:calendar:update']" - >鏌ョ湅闇�姹�</el-button + >{{$t('plan.btns.viewRequirement')}}</el-button > </template> </HxlhTable> <el-dialog - :title="'鏌ョ湅鍏宠仈闇�姹�'" + :title="$t('plan.title.viewAssociatedRequirements')" v-model="openDialog" width="900px" append-to-body @@ -126,15 +125,41 @@ </HxlhTable> </el-dialog> <el-dialog - :title="'鎵归噺鏇存柊宸ュ崟璁″垝鏃ユ湡'" + :title="$t('plan.btns.batchUpdateOrderDate')" v-model="openBatchDialog" width="900px" append-to-body > + <div class="mode_box"> + <span>{{$t('plan.title.setMode')}}</span> + <el-radio-group v-model="radio"> + <el-radio :label="1">{{$t('plan.btns.batchUpdateOrderDate')}}</el-radio> + <el-radio :label="2">{{$t('plan.title.CustomizePlannedCompletionDate')}}</el-radio> + </el-radio-group> + </div> + <div class="red_color">{{$t('plan.title.tipsBugSheetMetal')}}</div> + <div class="mode_box" v-if="radio===2"> + <span>{{$t('plan.title.CustomizePlannedCompletionDate')}}</span> + <el-date-picker + v-model="value4" + type="dates" + :placeholder="$t('plan.title.CustomizePlannedCompletionDate')" + /> + </div> <HxlhTable + v-if="radio===1" style="width: 100%" - :columns="subGridOptions" - :data="subList" + :columns="subUpdateGridOptions" + :data="subUpdateList" + :loading="loading" + :height="heightSub" + > + </HxlhTable> + <HxlhTable + v-if="radio===2" + style="width: 100%" + :columns="subUpdateCustomGridOptions" + :data="subUpdateList" :loading="loading" :height="heightSub" > @@ -159,9 +184,14 @@ import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲 const { t, locale } = useI18n(); const { proxy } = getCurrentInstance(); +const radio = ref(1); const openDialog = ref(false); const openBatchDialog = ref(false); const subGridOptions = ref([]); +const subUpdateGridOptions = ref([]); +const subUpdateCustomGridOptions = ref([]); +const subList = ref([]); +const subUpdateList = ref([]); // const tableRef = ref(); const calendarList = ref([]); const loading = ref(true); @@ -314,7 +344,7 @@ align: "center", }, { - title: "鎿嶄綔", + title: t("common.common.operate"), width: 100, fixed: "right", slots: { default: "buttons" }, @@ -377,12 +407,6 @@ align: "center", }, { - title: t("plan.table.requirementPlanCompletionDate"), - field: "updateTime", - width: 100, - align: "center", - }, - { title: t("plan.table.planStartDay"), field: "updateTime", width: 100, @@ -419,20 +443,135 @@ align: "center", }, ]; + subUpdateGridOptions.value = [ + { + title: t("basic.table.requirementID"), + field: "description", + width: 150, + align: "center", + }, + { + title: t("basic.table.requirementTraceabilityID"), + field: "type", + width: 200, + align: "center", + }, + { + title: t("plan.table.workOrderNo"), + field: "effectiveDate", + width: 200, + align: "center", + }, + { + title: t("basic.table.matchQuantity"), + field: "expiringDate", + width: 200, + align: "center", + }, + { + title: t("basic.table.workOrderType"), + field: "expiringDate", + width: 200, + align: "center", + }, + { + title: t("plan.table.itemNumber"), + field: "createTime", + width: 200, + align: "center", + }, + { + title: t("plan.table.planStartDay"), + field: "updateTime", + width: 100, + align: "center", + }, + { + title: t("plan.table.planEndDayDate"), + field: "updateTime", + width: 100, + align: "center", + }, + { + title: t("plan.table.startDateOfDemandPlan"), + field: "updateTime", + width: 100, + align: "center", + }, + { + title: t("plan.table.requirementPlanCompletionDate"), + field: "updateTime", + width: 100, + align: "center", + }, + ]; + subUpdateCustomGridOptions.value = [ + { + title: t("basic.table.requirementID"), + field: "description", + width: 150, + align: "center", + }, + { + title: t("basic.table.requirementTraceabilityID"), + field: "type", + width: 200, + align: "center", + }, + { + title: t("plan.table.workOrderNo"), + field: "effectiveDate", + width: 200, + align: "center", + }, + { + title: t("basic.table.matchQuantity"), + field: "expiringDate", + width: 200, + align: "center", + }, + { + title: t("basic.table.workOrderType"), + field: "expiringDate", + width: 200, + align: "center", + }, + { + title: t("plan.table.itemNumber"), + field: "createTime", + width: 200, + align: "center", + }, + { + title: t("plan.table.planStartDay"), + field: "updateTime", + width: 100, + align: "center", + }, + { + title: t("plan.table.planEndDayDate"), + field: "updateTime", + width: 100, + align: "center", + }, + { + title: t("plan.table.customizePlannedCompletionDate"), + field: "updateTime", + width: 100, + align: "center", + }, + ] }, { immediate: true, deep: true, } ); -function handleBatchUpdatePlanDate(){ - openBatchDialog.value = true +function handleBatchUpdatePlanDate() { + openBatchDialog.value = true; } function handleCheckView(row) { openDialog.value = true; - // listProcessRoute({ workOrderNo: row.documentNumber }).then((data) => { - // subList.value = data.rows; - // }); } /** 鏌ヨ鏃ュ巻绠$悊鍒楄〃 */ function getList() { @@ -442,48 +581,26 @@ page.value.total = response.total; loading.value = false; }); - axios - .all([ - /** 鏌ヨ宸ュ巶鍒楄〃 */ - listAll_plant({}), - /** 鏌ヨ杞﹂棿鍒楄〃 */ - listAll_shop({}), - ]) - .then( - axios.spread((response1, response2) => { - plantList.value = response1.data; - shopList.value = response2.data; - loading.value = false; - }) - ) - .catch((error) => { - console.error("璇锋眰鍑洪敊:", error); - }); + // axios + // .all([ + // /** 鏌ヨ宸ュ巶鍒楄〃 */ + // listAll_plant({}), + // /** 鏌ヨ杞﹂棿鍒楄〃 */ + // listAll_shop({}), + // ]) + // .then( + // axios.spread((response1, response2) => { + // plantList.value = response1.data; + // shopList.value = response2.data; + // loading.value = false; + // }) + // ) + // .catch((error) => { + // console.error("璇锋眰鍑洪敊:", error); + // }); } - -// 鍙栨秷鎸夐挳 -function cancel() { - open.value = false; - reset(); -} - // 琛ㄥ崟閲嶇疆 function reset() { - form.value = { - id: null, - description: null, - type: "1", - effectiveDate: null, - expiringDate: null, - content: null, - applicableFactory: null, - applicableWorkshop: null, - applicableProcess: null, - createBy: null, - createTime: null, - updateBy: null, - updateTime: null, - }; proxy.resetForm("calendarRef"); } @@ -498,29 +615,6 @@ proxy.resetForm("queryRef"); handleQuery(); } - -// 澶氶�夋閫変腑鏁版嵁 -function handleSelectionChange(selection) { - ids.value = selection.map((item) => item.id); - single.value = selection.length != 1; - multiple.value = !selection.length; -} - -/** 鏂板鎸夐挳鎿嶄綔 */ -async function handleAdd() { - reset(); - open.value = true; - title.value = "娣诲姞鏃ュ巻绠$悊"; -} -/** 閫夋嫨宸ュ巶鍚庝簨浠� 鍔犺浇杞﹂棿 鍜� 宸ュ簭 **/ -function changePlant(plant) { - listAps_shop({ plantCode: plant }).then((response) => { - shopList.value = response.rows; - }); - selectProcessNameList({ orgCode: plant }).then((response) => { - processList.value = response.rows; - }); -} function changePageNo(currentPage) { queryParams.value.pageNum = currentPage; page.value.current = currentPage; @@ -534,9 +628,11 @@ } // 澶氶�夋閫変腑鏁版嵁 const handleCheckboxChange = (data) => { + console.log(data, "handleCheckboxChange"); ids.value = data.records.map((item) => item.id); single.value = data.records.length !== 1; multiple.value = !data.records.length; + subUpdateList.value = data.records; }; onMounted(() => { getList(); @@ -546,55 +642,18 @@ .column-with-margin { margin-right: 0px; } -.title_bar_line { - display: flex; - justify-content: flex-start; - align-items: center; - color: #333; +.mode_box{ + margin-left: 30px; margin-bottom: 10px; - .line_short { - width: 5%; - height: 1px; - margin-right: 20px; - border-top: 1px solid #ddd; - } - .line_long { - width: 60%; - height: 1px; - margin-left: 20px; - border-top: 1px solid #ddd; + & span{ + padding-right: 20px; } } -.week_flex { - display: flex; - justify-content: flex-start; - align-content: center; - color: #606266; - font-weight: 700; - margin-left: 20px; - &.mt20 { - margin-top: 20px; - margin-left: 0 !important; - } - .week_flex_item { - &:nth-child(1) { - margin-top: 5px; - } - &:nth-child(2) { - margin-left: 20px; - } - } -} -.factory_use_item { - margin-top: 10px; +.red_color{ + color:#f56c6c; + margin-bottom:10px; } .mart5 { margin-top: 5px; -} -.custom-height { - height: 200px; /* 鎴栬�呬娇鐢� min-height */ -} -.auto-height-grid .xe-body .xe-body--row { - height: auto; /* 鎴栬�呬娇鐢� min-height */ } </style> diff --git a/src/views/partPlan/index.vue b/src/views/partPlan/index.vue index 26f9129..60b09a8 100644 --- a/src/views/partPlan/index.vue +++ b/src/views/partPlan/index.vue @@ -299,7 +299,7 @@ import HxlhTable from "@/components/HxlhTable"; import { getToken } from "@/utils/auth"; import { ref } from "vue"; -import { ElMessage } from "element-plus"; +// import { ElMessage } from "element-plus"; const { proxy } = getCurrentInstance(); import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲 diff --git a/src/views/register.vue b/src/views/register.vue index 457bba9..71c2959 100644 --- a/src/views/register.vue +++ b/src/views/register.vue @@ -76,7 +76,7 @@ </template> <script setup> -import { ElMessageBox } from "element-plus"; +// import { ElMessageBox } from "element-plus"; import { getCodeImg, register } from "@/api/login"; const title = import.meta.env.VITE_APP_TITLE; diff --git a/vite/plugins/auto-import.js b/vite/plugins/auto-import.js deleted file mode 100644 index a5d3576..0000000 --- a/vite/plugins/auto-import.js +++ /dev/null @@ -1,12 +0,0 @@ -import autoImport from 'unplugin-auto-import/vite' - -export default function createAutoImport() { - return autoImport({ - imports: [ - 'vue', - 'vue-router', - 'pinia' - ], - dts: false - }) -} diff --git a/vite/plugins/index.js b/vite/plugins/index.js index 10e17c3..55320db 100644 --- a/vite/plugins/index.js +++ b/vite/plugins/index.js @@ -1,15 +1,26 @@ -import vue from '@vitejs/plugin-vue' - -import createAutoImport from './auto-import' -import createSvgIcon from './svg-icon' -import createCompression from './compression' -import createSetupExtend from './setup-extend' - +import vue from "@vitejs/plugin-vue"; +import createSvgIcon from "./svg-icon"; +import createCompression from "./compression"; +import createSetupExtend from "./setup-extend"; +import Components from "unplugin-vue-components/vite"; +import autoImport from "unplugin-auto-import/vite"; +import { ElementPlusResolver } from "unplugin-vue-components/resolvers"; export default function createVitePlugins(viteEnv, isBuild = false) { - const vitePlugins = [vue()] - vitePlugins.push(createAutoImport()) - vitePlugins.push(createSetupExtend()) - vitePlugins.push(createSvgIcon(isBuild)) - isBuild && vitePlugins.push(...createCompression(viteEnv)) - return vitePlugins + const vitePlugins = [vue()]; + vitePlugins.push(createSetupExtend()); + vitePlugins.push(createSvgIcon(isBuild)); + isBuild && vitePlugins.push(...createCompression(viteEnv)); + vitePlugins.push( + autoImport({ + imports: ["vue", "vue-router", "pinia"], + dts: false, + // 鑷姩瀵煎叆 Element Plus 鐩稿叧鍑芥暟 + resolvers: [ElementPlusResolver()], + }), + Components({ + // 鑷姩瀵煎叆 Element Plus 缁勪欢 + resolvers: [ElementPlusResolver()], + }) + ); + return vitePlugins; } -- Gitblit v1.9.3