From d71cab20de4e8a00336c57a1fcbc21d5c06e45f5 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Tue, 17 Dec 2024 13:31:42 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E6=B8=85=E5=8D=95=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 9 +-------- env/.env.dev | 4 ++-- src/http/api/equip.ts | 3 +++ src/views/equip/list.vue | 20 +++++++++++++++++++- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/components.d.ts b/components.d.ts index f8b97b9..0326538 100644 --- a/components.d.ts +++ b/components.d.ts @@ -17,31 +17,24 @@ declare module 'vue' { ElCascader: typeof import('element-plus/es')['ElCascader'] ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] ElCol: typeof import('element-plus/es')['ElCol'] - ElCollapse: typeof import('element-plus/es')['ElCollapse'] - ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] ElDialog: typeof import('element-plus/es')['ElDialog'] - ElDivider: typeof import('element-plus/es')['ElDivider'] + ElEmpty: typeof import('element-plus/es')['ElEmpty'] ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] 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'] 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'] - ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTag: typeof import('element-plus/es')['ElTag'] diff --git a/env/.env.dev b/env/.env.dev index f15b960..d3ffc20 100644 --- a/env/.env.dev +++ b/env/.env.dev @@ -10,8 +10,8 @@ VITE_API_URL = '/proxyApi' # VITE_proxyTarget = 'http://192.168.2.246:28080' # 马帅 # VITE_proxyTarget = 'http://192.168.2.127:28080' # 梁超 # VITE_proxyTarget = 'http://36.33.26.201:17788/proxyApi' # 测试服务 -VITE_proxyTarget = 'http://192.168.0.244:28580' # 测试服务 -# VITE_proxyTarget = 'http://192.168.2.72:28080' # 盛旭 +# VITE_proxyTarget = 'http://192.168.0.244:28580' # 测试服务 +VITE_proxyTarget = 'http://192.168.2.75:28080' # 盛旭 # VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型) # VITE_proxyTarget = 'http://10.40.92.16:9502' # 牛 (个人中心 基础信息企业申请认证) diff --git a/src/http/api/equip.ts b/src/http/api/equip.ts index 6372e55..eb9744c 100644 --- a/src/http/api/equip.ts +++ b/src/http/api/equip.ts @@ -9,6 +9,9 @@ export const getTypeListApi = (data: any = {}) => { export const getDeviceListApi = (data: any) => { return post('/material-mall/dev/list', data) } +export const getCompanyCountApi = (data: any) => { + return post('/material-mall/dev/getCompanyCount', data) +} //获取装备详情 export const getDetail = (id = '', isHome: any) => { diff --git a/src/views/equip/list.vue b/src/views/equip/list.vue index cc8800a..fb57d2b 100644 --- a/src/views/equip/list.vue +++ b/src/views/equip/list.vue @@ -189,7 +189,8 @@ import { apiGetEquipTypeList, getTypeListApi, getDeviceListApi, -} from '@/http/api/equip' + getCompanyCountApi, +} from 'http/api/equip' import { getCompanyListApi, getGoodsClassListApi } from 'http/api/home' import $bus from '@/utils/bus' import NavMenu from '@/components/Navmenu/index.vue' @@ -534,6 +535,23 @@ const getDeviceListData = async (params: any = null, keyWord: any = null) => { Object.assign(searchParams, pageData) const { data: res } = await getDeviceListApi(searchParams) + + const searchParams_2 = JSON.parse(JSON.stringify(searchParams)) + searchParams_2.companyId = '' + const result: any = await getCompanyCountApi(searchParams_2) + screenChooseList[4].list.forEach((e: any, index: any) => { + if (index != 0) { + e.name = e.companyName + `(${0})` + } + }) + for (let key in result.data) { + screenChooseList[4].list.forEach((e: any, index: any) => { + if (e.companyId == key) { + e.name = '' + e.name = e.companyName + `(${result.data[key]})` + } + }) + } equipList.value = res.rows total.value = res.total }