| | |
| | | /> |
| | | <div class="w-[calc(100%-60px)] h-full"> |
| | | <span class="block text-sm font-medium text-g-800 truncate">{{ |
| | | userInfo.userName |
| | | displayNickname |
| | | }}</span> |
| | | <span class="block mt-0.5 text-xs text-g-500 truncate">{{ userInfo.email }}</span> |
| | | <span class="block mt-0.5 text-xs text-g-500 truncate">{{ displaySubTitle }}</span> |
| | | </div> |
| | | </div> |
| | | <ul class="py-4 mt-3 border-t border-g-300/80"> |
| | | <li class="btn-item" @click="goPage('/system/user-center')"> |
| | | <ArtSvgIcon icon="ri:user-3-line" /> |
| | | <span>{{ $t('topBar.user.userCenter') }}</span> |
| | | </li> |
| | | <li class="btn-item" @click="toDocs()"> |
| | | <ArtSvgIcon icon="ri:book-2-line" /> |
| | | <span>{{ $t('topBar.user.docs') }}</span> |
| | | </li> |
| | | <li class="btn-item" @click="toGithub()"> |
| | | <ArtSvgIcon icon="ri:github-line" /> |
| | | <span>{{ $t('topBar.user.github') }}</span> |
| | | </li> |
| | | <li class="btn-item" @click="lockScreen()"> |
| | | <ArtSvgIcon icon="ri:lock-line" /> |
| | | <span>{{ $t('topBar.user.lockScreen') }}</span> |
| | |
| | | |
| | | <script setup> |
| | | import { useI18n } from 'vue-i18n' |
| | | import { useRouter } from 'vue-router' |
| | | import { ElMessageBox } from 'element-plus' |
| | | import { useUserStore } from '@/store/modules/user' |
| | | import { WEB_LINKS } from '@/utils/constants' |
| | | import { mittBus } from '@/utils/sys' |
| | | defineOptions({ name: 'ArtUserMenu' }) |
| | | const router = useRouter() |
| | | const { t } = useI18n() |
| | | const userStore = useUserStore() |
| | | const { getUserInfo: userInfo } = storeToRefs(userStore) |
| | | const userMenuPopover = ref() |
| | | const goPage = (path) => { |
| | | router.push(path) |
| | | } |
| | | const toDocs = () => { |
| | | window.open(WEB_LINKS.DOCS) |
| | | } |
| | | const toGithub = () => { |
| | | window.open(WEB_LINKS.GITHUB) |
| | | } |
| | | const displayNickname = computed( |
| | | () => |
| | | userInfo.value?.nickname || |
| | | userInfo.value?.nickName || |
| | | userInfo.value?.realName || |
| | | userInfo.value?.userName || |
| | | '-' |
| | | ) |
| | | const displaySubTitle = computed( |
| | | () => userInfo.value?.userName || userInfo.value?.email || '' |
| | | ) |
| | | const lockScreen = () => { |
| | | mittBus.emit('openLockScreen') |
| | | } |
| | |
| | | "noData": "No printable data" |
| | | }, |
| | | "table": { |
| | | "index": "No.", |
| | | "form": { |
| | | "reset": "Reset", |
| | | "submit": "Submit" |
| | | }, |
| | | "searchBar": { |
| | | "reset": "Reset", |
| | | "search": "Search", |
| | | "expand": "Expand", |
| | | "collapse": "Collapse", |
| | | "searchInputPlaceholder": "Please enter", |
| | | "searchSelectPlaceholder": "Please select" |
| | | }, |
| | | "selection": "Select", |
| | | "sizeOptions": { |
| | | "small": "Compact", |
| | | "default": "Default", |
| | | "large": "Loose" |
| | | }, |
| | | "column": { |
| | | "selection": "Select", |
| | | "expand": "Expand", |
| | | "index": "Index" |
| | | }, |
| | | "index": "Index", |
| | | "unit": "Unit", |
| | | "id": "ID", |
| | | "name": "Name", |
| | | "code": "Code", |
| | | "keyword": "Keyword", |
| | | "status": "Status", |
| | | "type": "Type", |
| | | "memo": "Remark", |
| | | "remark": "Remark", |
| | | "createBy": "Created By", |
| | | "createTime": "Created At", |
| | | "updateBy": "Updated By", |
| | |
| | | "wcs": "WCS", |
| | | "source": "Source", |
| | | "supplier": "Supplier", |
| | | "supplierBatch": "Supplier Batch" |
| | | "supplierBatch": "Supplier Batch", |
| | | "batch": "Batch", |
| | | "quantity": "Quantity", |
| | | "materialCode": "Material Code", |
| | | "materialName": "Material Name", |
| | | "menuType": "Menu Type", |
| | | "iconPreview": "Icon Preview", |
| | | "componentKey": "Component Key", |
| | | "permissionKey": "Permission Key", |
| | | "zebra": "Zebra", |
| | | "border": "Border", |
| | | "headerBackground": "Header BG", |
| | | "topLevelMenu": "Top Level Menu", |
| | | "emptyText": "No data" |
| | | }, |
| | | "search": { |
| | | "placeholder": "Search page", |
| | |
| | | "tokenMetric": "Tokens: prompt {prompt} / completion {completion} / total {total}", |
| | | "streaming": "Streaming" |
| | | } |
| | | }, |
| | | "table": { |
| | | "form": { |
| | | "reset": "Reset", |
| | | "submit": "Submit" |
| | | }, |
| | | "searchBar": { |
| | | "reset": "Reset", |
| | | "search": "Search", |
| | | "expand": "Expand", |
| | | "collapse": "Collapse", |
| | | "searchInputPlaceholder": "Please enter", |
| | | "searchSelectPlaceholder": "Please select" |
| | | }, |
| | | "selection": "Select", |
| | | "sizeOptions": { |
| | | "small": "Compact", |
| | | "default": "Default", |
| | | "large": "Loose" |
| | | }, |
| | | "column": { |
| | | "selection": "Select", |
| | | "expand": "Expand", |
| | | "index": "Index" |
| | | }, |
| | | "index": "Index", |
| | | "id": "ID", |
| | | "name": "Name", |
| | | "code": "Code", |
| | | "keyword": "Keyword", |
| | | "operation": "Operation", |
| | | "status": "Status", |
| | | "type": "Type", |
| | | "source": "Source", |
| | | "supplier": "Supplier", |
| | | "supplierBatch": "Supplier Batch", |
| | | "memo": "Remark", |
| | | "remark": "Remark", |
| | | "createBy": "Created By", |
| | | "updateBy": "Updated By", |
| | | "updateTime": "Updated At", |
| | | "createTime": "Created At", |
| | | "unit": "Unit", |
| | | "batch": "Batch", |
| | | "quantity": "Quantity", |
| | | "materialCode": "Material Code", |
| | | "materialName": "Material Name", |
| | | "wcs": "WCS", |
| | | "menuType": "Menu Type", |
| | | "iconPreview": "Icon Preview", |
| | | "componentKey": "Component Key", |
| | | "permissionKey": "Permission Key", |
| | | "sort": "Sort", |
| | | "zebra": "Zebra", |
| | | "border": "Border", |
| | | "headerBackground": "Header BG", |
| | | "topLevelMenu": "Top Level Menu", |
| | | "emptyText": "No data" |
| | | }, |
| | | "message": { |
| | | "requestTimeoutStopped": "Request timed out and waiting has stopped", |
| | |
| | | "noData": "暂无打印数据" |
| | | }, |
| | | "table": { |
| | | "form": { |
| | | "reset": "重置", |
| | | "submit": "提交" |
| | | }, |
| | | "searchBar": { |
| | | "reset": "重置", |
| | | "search": "查询", |
| | | "expand": "展开", |
| | | "collapse": "收起", |
| | | "searchInputPlaceholder": "请输入", |
| | | "searchSelectPlaceholder": "请选择" |
| | | }, |
| | | "selection": "选择", |
| | | "sizeOptions": { |
| | | "small": "紧凑", |
| | | "default": "默认", |
| | | "large": "宽松" |
| | | }, |
| | | "column": { |
| | | "selection": "勾选", |
| | | "expand": "展开", |
| | | "index": "序号" |
| | | }, |
| | | "index": "序号", |
| | | "unit": "单位", |
| | | "id": "ID", |
| | | "name": "名称", |
| | | "code": "编码", |
| | | "keyword": "关键字", |
| | | "status": "状态", |
| | | "type": "类型", |
| | | "memo": "备注", |
| | | "remark": "备注", |
| | | "createBy": "创建人", |
| | | "createTime": "创建时间", |
| | | "updateBy": "更新人", |
| | |
| | | "wcs": "WCS", |
| | | "source": "来源", |
| | | "supplier": "供应商", |
| | | "supplierBatch": "供应商批次" |
| | | "supplierBatch": "供应商批次", |
| | | "batch": "批次", |
| | | "quantity": "数量", |
| | | "materialCode": "物料编码", |
| | | "materialName": "物料名称", |
| | | "menuType": "菜单类型", |
| | | "iconPreview": "图标预览", |
| | | "componentKey": "组件标识", |
| | | "permissionKey": "权限标识", |
| | | "zebra": "斑马纹", |
| | | "border": "边框", |
| | | "headerBackground": "表头背景", |
| | | "topLevelMenu": "顶级菜单", |
| | | "emptyText": "暂无数据" |
| | | }, |
| | | "search": { |
| | | "placeholder": "搜索页面", |
| | |
| | | "tokenMetric": "Tokens: prompt {prompt} / completion {completion} / total {total}", |
| | | "streaming": "生成中" |
| | | } |
| | | }, |
| | | "table": { |
| | | "form": { |
| | | "reset": "重置", |
| | | "submit": "提交" |
| | | }, |
| | | "searchBar": { |
| | | "reset": "重置", |
| | | "search": "查询", |
| | | "expand": "展开", |
| | | "collapse": "收起", |
| | | "searchInputPlaceholder": "请输入", |
| | | "searchSelectPlaceholder": "请选择" |
| | | }, |
| | | "selection": "选择", |
| | | "sizeOptions": { |
| | | "small": "紧凑", |
| | | "default": "默认", |
| | | "large": "宽松" |
| | | }, |
| | | "column": { |
| | | "selection": "勾选", |
| | | "expand": "展开", |
| | | "index": "序号" |
| | | }, |
| | | "index": "序号", |
| | | "id": "ID", |
| | | "name": "名称", |
| | | "code": "编码", |
| | | "keyword": "关键字", |
| | | "operation": "操作", |
| | | "status": "状态", |
| | | "type": "类型", |
| | | "source": "来源", |
| | | "supplier": "供应商", |
| | | "supplierBatch": "供应商批次", |
| | | "memo": "备注", |
| | | "remark": "备注", |
| | | "createBy": "创建人", |
| | | "updateBy": "更新人", |
| | | "updateTime": "更新时间", |
| | | "createTime": "创建时间", |
| | | "unit": "单位", |
| | | "batch": "批次", |
| | | "quantity": "数量", |
| | | "materialCode": "物料编码", |
| | | "materialName": "物料名称", |
| | | "wcs": "WCS", |
| | | "menuType": "菜单类型", |
| | | "iconPreview": "图标预览", |
| | | "componentKey": "组件标识", |
| | | "permissionKey": "权限标识", |
| | | "sort": "排序", |
| | | "zebra": "斑马纹", |
| | | "border": "边框", |
| | | "headerBackground": "表头背景", |
| | | "topLevelMenu": "顶级菜单", |
| | | "emptyText": "暂无数据" |
| | | }, |
| | | "message": { |
| | | "requestTimeoutStopped": "请求超时,已停止等待", |
| | |
| | | ref="formRef" |
| | | :model="formData" |
| | | :rules="rules" |
| | | :validate-on-rule-change="false" |
| | | :key="formKey" |
| | | @keyup.enter="handleSubmit" |
| | | style="margin-top: 25px" |
| | |
| | | </ElButton> |
| | | </div> |
| | | |
| | | <div class="mt-5 text-sm text-gray-600"> |
| | | <span>{{ $t('login.noAccount') }}</span> |
| | | <RouterLink class="text-theme" :to="{ name: 'Register' }">{{ |
| | | $t('login.register') |
| | | }}</RouterLink> |
| | | </div> |
| | | <!-- <div class="mt-5 text-sm text-gray-600">--> |
| | | <!-- <span>{{ $t('login.noAccount') }}</span>--> |
| | | <!-- <RouterLink class="text-theme" :to="{ name: 'Register' }">{{--> |
| | | <!-- $t('login.register')--> |
| | | <!-- }}</RouterLink>--> |
| | | <!-- </div>--> |
| | | </ElForm> |
| | | </div> |
| | | </div> |
| | |
| | | onMounted(async () => { |
| | | hydrateRememberedLogin() |
| | | await loadLoginSupports() |
| | | await nextTick() |
| | | formRef.value?.clearValidate() |
| | | }) |
| | | |
| | | const showLoginSuccessNotice = () => { |
| | |
| | | } catch (error) { |
| | | detailDrawerVisible.value = false |
| | | detailData.value = {} |
| | | ElMessage.error(error?.message || t('pages.basicInfo.basStationArea.messages.detailLoadFailed')) |
| | | ElMessage.error( |
| | | error?.message || t('pages.basicInfo.basStationArea.messages.detailLoadFailed') |
| | | ) |
| | | } finally { |
| | | detailLoading.value = false |
| | | } |
| | |
| | | ) |
| | | await handleShowDialog('edit', detail) |
| | | } catch (error) { |
| | | ElMessage.error(error?.message || t('pages.basicInfo.basStationArea.messages.detailLoadFailed')) |
| | | ElMessage.error( |
| | | error?.message || t('pages.basicInfo.basStationArea.messages.detailLoadFailed') |
| | | ) |
| | | } |
| | | } |
| | | |
| | |
| | | await fetchBasStationAreaPage({ |
| | | ...reportQueryParams.value, |
| | | current: 1, |
| | | pageSize: Number(pagination.total) > 0 ? Number(pagination.total) : Number(payload?.pageSize) || 20 |
| | | pageSize: |
| | | Number(pagination.total) > 0 ? Number(pagination.total) : Number(payload?.pageSize) || 20 |
| | | }) |
| | | ).records |
| | | } |
| | | |
| | | const { previewVisible, previewRows, previewMeta, handlePreviewVisibleChange, handleExport, handlePrint } = |
| | | usePrintExportPage({ |
| | | downloadFileName: 'bas-station-area.xlsx', |
| | | requestExport: (payload) => |
| | | fetchExportBasStationAreaReport(payload, { |
| | | headers: { |
| | | Authorization: userStore.accessToken || '' |
| | | } |
| | | }), |
| | | resolvePrintRecords, |
| | | buildPreviewRows: (records) => |
| | | buildBasStationAreaPrintRows(records, { |
| | | t, |
| | | resolveAreaLabel, |
| | | resolveCrossZoneAreaLabel, |
| | | resolveContainerTypeLabel, |
| | | resolveTypeLabel, |
| | | resolveStationAliasLabel, |
| | | resolveUseStatusLabel |
| | | }), |
| | | buildPreviewMeta |
| | | }) |
| | | const { |
| | | previewVisible, |
| | | previewRows, |
| | | previewMeta, |
| | | handlePreviewVisibleChange, |
| | | handleExport, |
| | | handlePrint |
| | | } = usePrintExportPage({ |
| | | downloadFileName: 'bas-station-area.xlsx', |
| | | requestExport: (payload) => |
| | | fetchExportBasStationAreaReport(payload, { |
| | | headers: { |
| | | Authorization: userStore.accessToken || '' |
| | | } |
| | | }), |
| | | resolvePrintRecords, |
| | | buildPreviewRows: (records) => |
| | | buildBasStationAreaPrintRows(records, { |
| | | t, |
| | | resolveAreaLabel, |
| | | resolveCrossZoneAreaLabel, |
| | | resolveContainerTypeLabel, |
| | | resolveTypeLabel, |
| | | resolveStationAliasLabel, |
| | | resolveUseStatusLabel |
| | | }), |
| | | buildPreviewMeta |
| | | }) |
| | | |
| | | const resolvedPreviewMeta = computed(() => |
| | | buildBasStationAreaReportMeta({ |
| | | previewMeta: previewMeta.value, |
| | | count: previewRows.value.length, |
| | | orientation: previewMeta.value?.reportStyle?.orientation || BAS_STATION_AREA_REPORT_STYLE.orientation, |
| | | orientation: |
| | | previewMeta.value?.reportStyle?.orientation || BAS_STATION_AREA_REPORT_STYLE.orientation, |
| | | t |
| | | }) |
| | | ) |