提交钣金异常页面,前端项目自动导入element组件,i18n文件修改
| | |
| | | "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", |
| | |
| | | <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> |
| | |
| | | </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"; |
| | |
| | | <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' |
| | |
| | | VxeUITable.setI18n('zh-CN', zhCN) |
| | | VxeUITable.setI18n('en-US', enUS) |
| | | const app = createApp(App) |
| | | |
| | | // å
¨å±æ¹æ³æè½½ |
| | | app.config.globalProperties.useDict = useDict |
| | | app.config.globalProperties.download = download |
| | |
| | | |
| | | // 使ç¨element-plus å¹¶ä¸è®¾ç½®å
¨å±çå¤§å° |
| | | app.use(ElementPlus, { |
| | | locale: locale, |
| | | // æ¯æ largeãdefaultãsmall |
| | | size: Cookies.get('size') || 'default' |
| | | }) |
| | |
| | | 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' |
| | |
| | | import 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' |
| | |
| | | import { ElMessage, ElMessageBox, ElNotification, ElLoading } from 'element-plus' |
| | | // import { ElMessage, ElMessageBox, ElNotification, ElLoading } from 'element-plus' |
| | | |
| | | let loadingInstance; |
| | | |
| | |
| | | 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', // 设置é»è®¤è¯è¨ä¸ºä¸æ |
| | |
| | | cancel: "åæ¶", |
| | | placeholder:"请è¾å
¥", |
| | | view:"æ¥ç", |
| | | viewDetails:"æ¥ç详æ
" |
| | | viewDetails:"æ¥ç详æ
", |
| | | operate:"æä½" |
| | | }, |
| | | }; |
| | | export const en = { |
| | |
| | | cancel: "Cancel", |
| | | placeholder:"Please enter the ", |
| | | view:"View", |
| | | viewDetails:"View details" |
| | | viewDetails:"View details", |
| | | operate:"Operate" |
| | | }, |
| | | }; |
| | |
| | | title: { |
| | | pipePlanCapacity: "管路产è½è§å", |
| | | gasPlanCapacity: "æ°æè§å产è½", |
| | | viewAssociatedRequirements:"æ¥çå
³èéæ±", |
| | | setMode:"设置模å¼", |
| | | CustomizePlannedCompletionDate:"èªå®ä¹è®¡åå®å·¥æ¥", |
| | | tipsBugSheetMetal:"å°çæçé£ééæ±ç计åå¼å·¥æ¥å计åå®å·¥æ¥èµå¼ç»å·¥å" |
| | | }, |
| | | options: { |
| | | monthlyStatic: "ææç»è®¡", |
| | |
| | | btns: { |
| | | batchPlanStartDay: "æ¹éä¿®æ¹è®¡åå¼å·¥æ¥", |
| | | batchPlanEndDay: "æ¹éä¿®æ¹è®¡åå®å·¥æ¥", |
| | | batchUpdateOrderDate:"æ¹éæ´æ°å·¥åè®¡åæ¥æ", |
| | | generatePlanOrder:"çæé£é计åå·¥å", |
| | | confirm: "ç¡®å®", |
| | | cancel: "åæ¶", |
| | | viewRequirement:"æ¥çéæ±" |
| | | }, |
| | | query: { |
| | | daterangePlanStartDay: "计åå¼å·¥æ¥", |
| | |
| | | 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", |
| | |
| | | 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", |
| | |
| | | processRouteWorkingHours:"Process route working hours", |
| | | demandQuantity:"Demand Quantity", |
| | | netRequirement:"Net Requirement", |
| | | bomItemID:"Item ID" |
| | | bomItemID:"Item ID", |
| | | customizePlannedCompletionDate:"Customize the planned completion date" |
| | | }, |
| | | }; |
| | |
| | | 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' |
| | |
| | | } 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(); |
| | |
| | | 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(); |
| | | |
| | |
| | | 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([]); |
| | |
| | | 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(); |
| | |
| | | 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([]); |
| | |
| | | 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({ |
| | |
| | | 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(); |
| | | // å页屿§ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
| | |
| | | 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(); |
| | | |
| | |
| | | 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(); |
| | |
| | | </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ä¸ä½¿ç¨å½é
å |
| | |
| | | } 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(); |
| | |
| | | } 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(); |
| | |
| | | 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(); |
| | |
| | | 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 |
| | |
| | | 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(); |
| | |
| | | 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="请è¾å
¥éæ±è¿½æº¯ID" |
| | | :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="éæ±è¿½æº¯ID" 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="请è¾å
¥éæ±è¿½æº¯ID" |
| | | :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" |
| | | /> |
| | |
| | | <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> --> |
| | |
| | | :disabled="multiple" |
| | | @click="handleBatchUpdatePlanDate" |
| | | v-hasPermi="['apsPlatePlan:edit']" |
| | | >æ¹éæ´æ°å·¥åè®¡åæ¥æ</el-button |
| | | >{{$t('plan.btns.batchUpdateOrderDate')}}</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | |
| | | icon="Edit" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['apsPlatePlan:edit']" |
| | | >çæé£é计åå·¥å</el-button |
| | | >{{$t('plan.btns.generatePlanOrder')}}</el-button |
| | | > |
| | | </el-col> |
| | | <right-toolbar |
| | |
| | | @changePageNo="changePageNo" |
| | | @changePageSize="changePageSize" |
| | | @on-checkbox="handleCheckboxChange" |
| | | class="auto-height-grid" |
| | | > |
| | | <template #buttons="{ row }"> |
| | | <el-button |
| | |
| | | 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 |
| | |
| | | </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" |
| | | > |
| | |
| | | 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); |
| | |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: "æä½", |
| | | title: t("common.common.operate"), |
| | | width: 100, |
| | | fixed: "right", |
| | | slots: { default: "buttons" }, |
| | |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.requirementPlanCompletionDate"), |
| | | field: "updateTime", |
| | | width: 100, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.planStartDay"), |
| | | field: "updateTime", |
| | | width: 100, |
| | |
| | | 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() { |
| | |
| | | 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"); |
| | | } |
| | | |
| | |
| | | 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; |
| | |
| | | } |
| | | // å¤éæ¡é䏿°æ® |
| | | 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(); |
| | |
| | | .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> |
| | |
| | | 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ä¸ä½¿ç¨å½é
å |
| | |
| | | </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; |
| | |
| | | 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; |
| | | } |