代码优化
This commit is contained in:
parent
6792becdbb
commit
acc00f3887
|
|
@ -9,6 +9,8 @@ declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
Breadcrumb: typeof import('./src/components/Breadcrumb/index.vue')['default']
|
Breadcrumb: typeof import('./src/components/Breadcrumb/index.vue')['default']
|
||||||
ElBadge: typeof import('element-plus/es')['ElBadge']
|
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']
|
ElButton: typeof import('element-plus/es')['ElButton']
|
||||||
ElCarousel: typeof import('element-plus/es')['ElCarousel']
|
ElCarousel: typeof import('element-plus/es')['ElCarousel']
|
||||||
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
|
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
|
||||||
|
|
@ -16,21 +18,30 @@ declare module 'vue' {
|
||||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||||
ElCol: typeof import('element-plus/es')['ElCol']
|
ElCol: typeof import('element-plus/es')['ElCol']
|
||||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||||
|
ElCountdown: typeof import('element-plus/es')['ElCountdown']
|
||||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||||
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
||||||
ElForm: typeof import('element-plus/es')['ElForm']
|
ElForm: typeof import('element-plus/es')['ElForm']
|
||||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||||
|
ElHeader: typeof import('element-plus/es')['ElHeader']
|
||||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||||
ElImage: typeof import('element-plus/es')['ElImage']
|
ElImage: typeof import('element-plus/es')['ElImage']
|
||||||
ElInput: typeof import('element-plus/es')['ElInput']
|
ElInput: typeof import('element-plus/es')['ElInput']
|
||||||
|
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||||
ElOption: typeof import('element-plus/es')['ElOption']
|
ElOption: typeof import('element-plus/es')['ElOption']
|
||||||
|
ElPageHeader: typeof import('element-plus/es')['ElPageHeader']
|
||||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||||
|
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
|
||||||
ElProgress: typeof import('element-plus/es')['ElProgress']
|
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']
|
ElRow: typeof import('element-plus/es')['ElRow']
|
||||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
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']
|
ElTable: typeof import('element-plus/es')['ElTable']
|
||||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||||
ElTag: typeof import('element-plus/es')['ElTag']
|
ElTag: typeof import('element-plus/es')['ElTag']
|
||||||
|
|
|
||||||
|
|
@ -23,14 +23,20 @@ const isShowLogout = computed(() => {
|
||||||
return store.token
|
return store.token
|
||||||
})
|
})
|
||||||
|
|
||||||
if (userStore.companyList.length === 0) {
|
const setActiveCompanyName = () => {
|
||||||
getCompanyList()
|
|
||||||
} else {
|
|
||||||
const companyList = userStore.companyList
|
const companyList = userStore.companyList
|
||||||
const activeCompany: any = companyList.filter(
|
const activeCompany: any = companyList.filter(
|
||||||
(e: any) => e.companyId == store.userInfo.companyId,
|
(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('搜索设备关键词')
|
const placeholderText = ref('搜索设备关键词')
|
||||||
|
|
|
||||||
|
|
@ -30,15 +30,20 @@ const isShowLogout = computed(() => {
|
||||||
return store.token
|
return store.token
|
||||||
})
|
})
|
||||||
|
|
||||||
if (userStore.companyList.length === 0) {
|
const setActiveCompanyName = () => {
|
||||||
getCompanyList()
|
|
||||||
} else {
|
|
||||||
const companyList = userStore.companyList
|
const companyList = userStore.companyList
|
||||||
const activeCompany: any = companyList.filter(
|
const activeCompany: any = companyList.filter(
|
||||||
(e: any) => e.companyId == store.userInfo.companyId,
|
(e: any) => e.companyId == store.userInfo.companyId,
|
||||||
)
|
)
|
||||||
activeLoginCompanyName.value = activeCompany[0].companyName
|
activeLoginCompanyName.value = activeCompany[0]?.companyName
|
||||||
console.log(activeCompany, '用户信息')
|
}
|
||||||
|
|
||||||
|
if (userStore.companyList.length === 0) {
|
||||||
|
getCompanyList().then((res) => {
|
||||||
|
setActiveCompanyName()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
setActiveCompanyName()
|
||||||
}
|
}
|
||||||
|
|
||||||
const placeholderText = ref('搜索设备关键词')
|
const placeholderText = ref('搜索设备关键词')
|
||||||
|
|
@ -180,7 +185,8 @@ const onJumpUser = () => {
|
||||||
if (roles?.length > 0) {
|
if (roles?.length > 0) {
|
||||||
const isAdmin = roles.some((e: any) => e.roleKey == 'admin')
|
const isAdmin = roles.some((e: any) => e.roleKey == 'admin')
|
||||||
if (isAdmin) {
|
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 {
|
} else {
|
||||||
router.push({ name: 'my-user' })
|
router.push({ name: 'my-user' })
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -228,7 +228,7 @@ if (props.orderStatus == 7) {
|
||||||
stepList.value[3].title = '租赁结束'
|
stepList.value[3].title = '租赁结束'
|
||||||
stepList.value[4].title = '退租已结算'
|
stepList.value[4].title = '退租已结算'
|
||||||
stepList.value[5].title = '结算已确认'
|
stepList.value[5].title = '结算已确认'
|
||||||
currentActive.value = 6
|
currentActive.value = 7
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -324,7 +324,11 @@ const confirmFail = async (index: number) => {
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
}
|
}
|
||||||
|
|
||||||
const onViewOverhaulDetails = () => {}
|
const onViewOverhaulDetails = (orderId: any) => {
|
||||||
|
settleListTitle.value = '检修详情'
|
||||||
|
currentOrderId.value = orderId
|
||||||
|
getOverhaulDetails(orderId)
|
||||||
|
}
|
||||||
|
|
||||||
//费用清单
|
//费用清单
|
||||||
const handleViewList = async (orderId: any) => {
|
const handleViewList = async (orderId: any) => {
|
||||||
|
|
@ -717,14 +721,14 @@ const costSubmit = () => {
|
||||||
>
|
>
|
||||||
费用清单
|
费用清单
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button
|
<el-button
|
||||||
v-if="item.orderStatus == 6 && item.isLeaseContent == 1"
|
v-if="item.orderStatus == 7 && item.isLeaseContent == 1"
|
||||||
@click="onViewOverhaulDetails()"
|
@click="onViewOverhaulDetails(item.orderId)"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
检修详情
|
检修详情
|
||||||
</el-button> -->
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="item.orderStatus == 6 && item.isLeaseContent == 1"
|
v-if="item.orderStatus == 6 && item.isLeaseContent == 1"
|
||||||
@click="onCostConfirm(item.orderId)"
|
@click="onCostConfirm(item.orderId)"
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,7 @@ if (props.orderStatus == 7) {
|
||||||
stepList.value[3].title = '租赁结束'
|
stepList.value[3].title = '租赁结束'
|
||||||
stepList.value[4].title = '退租已结算'
|
stepList.value[4].title = '退租已结算'
|
||||||
stepList.value[5].title = '结算已确认'
|
stepList.value[5].title = '结算已确认'
|
||||||
currentActive.value = 6
|
currentActive.value = 7
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -548,8 +548,12 @@ const dialogFormVisibleSettleRepair: any = ref(false)
|
||||||
const handleViewRepair = (item: any) => {
|
const handleViewRepair = (item: any) => {
|
||||||
viewOrderDetailsOrderId.value = ''
|
viewOrderDetailsOrderId.value = ''
|
||||||
viewOrderDetailsOrderId.value = item.orderId
|
viewOrderDetailsOrderId.value = item.orderId
|
||||||
viewOrderDetailsType.value = 2
|
addOrEditDialogCostStatus.value = item.orderStatus
|
||||||
addOrEditDialogVisible.value = true
|
addOrEditDialogCostVisible.value = true
|
||||||
|
// viewOrderDetailsOrderId.value = ''
|
||||||
|
// viewOrderDetailsOrderId.value = item.orderId
|
||||||
|
// viewOrderDetailsType.value = 2
|
||||||
|
// addOrEditDialogVisible.value = true
|
||||||
|
|
||||||
// settleListTitle.value = '检修详情'
|
// settleListTitle.value = '检修详情'
|
||||||
// moneyParams1.value = {
|
// moneyParams1.value = {
|
||||||
|
|
@ -934,7 +938,7 @@ const handleViewWord = () => {
|
||||||
费用结算
|
费用结算
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="item.orderStatus == '6'"
|
v-if="item.orderStatus == '6' || item.orderStatus == '7'"
|
||||||
@click="handleViewRepair(item)"
|
@click="handleViewRepair(item)"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
|
|
@ -942,7 +946,7 @@ const handleViewWord = () => {
|
||||||
检修详情
|
检修详情
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="item.orderStatus == '6'"
|
v-if="item.orderStatus == '6' || item.orderStatus == '7'"
|
||||||
@click="handleViewList(item)"
|
@click="handleViewList(item)"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue