From acc00f3887d92f14e3f0ccba33a2e165eca11e37 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Mon, 9 Dec 2024 13:10:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 11 +++++++++++ src/components/header/index.vue | 14 ++++++++++---- src/layout/header.vue | 18 ++++++++++++------ .../components/order-details.vue | 2 +- .../orderManagement/components/order-home.vue | 14 +++++++++----- .../components/order-details.vue | 2 +- .../components/order-home.vue | 12 ++++++++---- 7 files changed, 52 insertions(+), 21 deletions(-) diff --git a/components.d.ts b/components.d.ts index 432bddb..fd5a679 100644 --- a/components.d.ts +++ b/components.d.ts @@ -9,6 +9,8 @@ declare module 'vue' { export interface GlobalComponents { Breadcrumb: typeof import('./src/components/Breadcrumb/index.vue')['default'] ElBadge: typeof import('element-plus/es')['ElBadge'] + ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] + ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] ElButton: typeof import('element-plus/es')['ElButton'] ElCarousel: typeof import('element-plus/es')['ElCarousel'] ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem'] @@ -16,21 +18,30 @@ declare module 'vue' { ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] ElCol: typeof import('element-plus/es')['ElCol'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] + ElCountdown: typeof import('element-plus/es')['ElCountdown'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] ElDialog: typeof import('element-plus/es')['ElDialog'] ElEmpty: typeof import('element-plus/es')['ElEmpty'] ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] + ElHeader: typeof import('element-plus/es')['ElHeader'] ElIcon: typeof import('element-plus/es')['ElIcon'] ElImage: typeof import('element-plus/es')['ElImage'] ElInput: typeof import('element-plus/es')['ElInput'] + ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElOption: typeof import('element-plus/es')['ElOption'] + ElPageHeader: typeof import('element-plus/es')['ElPageHeader'] ElPagination: typeof import('element-plus/es')['ElPagination'] + ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] ElProgress: typeof import('element-plus/es')['ElProgress'] + ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] + ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElRow: typeof import('element-plus/es')['ElRow'] ElSelect: typeof import('element-plus/es')['ElSelect'] + ElStep: typeof import('element-plus/es')['ElStep'] + ElSteps: typeof import('element-plus/es')['ElSteps'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTag: typeof import('element-plus/es')['ElTag'] diff --git a/src/components/header/index.vue b/src/components/header/index.vue index 2f8c14d..99f4b2d 100644 --- a/src/components/header/index.vue +++ b/src/components/header/index.vue @@ -23,14 +23,20 @@ const isShowLogout = computed(() => { return store.token }) -if (userStore.companyList.length === 0) { - getCompanyList() -} else { +const setActiveCompanyName = () => { const companyList = userStore.companyList const activeCompany: any = companyList.filter( (e: any) => e.companyId == store.userInfo.companyId, ) - activeLoginCompanyName.value = activeCompany[0].companyName + activeLoginCompanyName.value = activeCompany[0]?.companyName +} + +if (userStore.companyList.length === 0) { + getCompanyList().then((res) => { + setActiveCompanyName() + }) +} else { + setActiveCompanyName() } const placeholderText = ref('搜索设备关键词') diff --git a/src/layout/header.vue b/src/layout/header.vue index 49f9a4f..ebba41c 100644 --- a/src/layout/header.vue +++ b/src/layout/header.vue @@ -30,15 +30,20 @@ const isShowLogout = computed(() => { return store.token }) -if (userStore.companyList.length === 0) { - getCompanyList() -} else { +const setActiveCompanyName = () => { const companyList = userStore.companyList const activeCompany: any = companyList.filter( (e: any) => e.companyId == store.userInfo.companyId, ) - activeLoginCompanyName.value = activeCompany[0].companyName - console.log(activeCompany, '用户信息') + activeLoginCompanyName.value = activeCompany[0]?.companyName +} + +if (userStore.companyList.length === 0) { + getCompanyList().then((res) => { + setActiveCompanyName() + }) +} else { + setActiveCompanyName() } const placeholderText = ref('搜索设备关键词') @@ -180,7 +185,8 @@ const onJumpUser = () => { if (roles?.length > 0) { const isAdmin = roles.some((e: any) => e.roleKey == 'admin') if (isAdmin) { - window.location.replace(`http://192.168.0.244:17788?token=${store.token}`) + // window.location.href = `http://192.168.137.101:80/?token=${store.token}` + window.open(`http://192.168.137.101:80/?token=${store.token}`) } else { router.push({ name: 'my-user' }) } diff --git a/src/views/user/orderManagement/components/order-details.vue b/src/views/user/orderManagement/components/order-details.vue index e7e4e00..ee24428 100644 --- a/src/views/user/orderManagement/components/order-details.vue +++ b/src/views/user/orderManagement/components/order-details.vue @@ -228,7 +228,7 @@ if (props.orderStatus == 7) { stepList.value[3].title = '租赁结束' stepList.value[4].title = '退租已结算' stepList.value[5].title = '结算已确认' - currentActive.value = 6 + currentActive.value = 7 } diff --git a/src/views/user/orderManagement/components/order-home.vue b/src/views/user/orderManagement/components/order-home.vue index 5859335..4ac1f71 100644 --- a/src/views/user/orderManagement/components/order-home.vue +++ b/src/views/user/orderManagement/components/order-home.vue @@ -324,7 +324,11 @@ const confirmFail = async (index: number) => { .catch(() => {}) } -const onViewOverhaulDetails = () => {} +const onViewOverhaulDetails = (orderId: any) => { + settleListTitle.value = '检修详情' + currentOrderId.value = orderId + getOverhaulDetails(orderId) +} //费用清单 const handleViewList = async (orderId: any) => { @@ -717,14 +721,14 @@ const costSubmit = () => { > 费用清单 - + diff --git a/src/views/user/orderManagementCz/components/order-home.vue b/src/views/user/orderManagementCz/components/order-home.vue index 1b400a4..04284fd 100644 --- a/src/views/user/orderManagementCz/components/order-home.vue +++ b/src/views/user/orderManagementCz/components/order-home.vue @@ -548,8 +548,12 @@ const dialogFormVisibleSettleRepair: any = ref(false) const handleViewRepair = (item: any) => { viewOrderDetailsOrderId.value = '' viewOrderDetailsOrderId.value = item.orderId - viewOrderDetailsType.value = 2 - addOrEditDialogVisible.value = true + addOrEditDialogCostStatus.value = item.orderStatus + addOrEditDialogCostVisible.value = true + // viewOrderDetailsOrderId.value = '' + // viewOrderDetailsOrderId.value = item.orderId + // viewOrderDetailsType.value = 2 + // addOrEditDialogVisible.value = true // settleListTitle.value = '检修详情' // moneyParams1.value = { @@ -934,7 +938,7 @@ const handleViewWord = () => { 费用结算 { 检修详情