| | |
| | | > |
| | | <el-table-column prop="id" label="产品ID" width="120" /> |
| | | <el-table-column prop="name" label="产品名称" min-width="200" /> |
| | | <el-table-column prop="productType" label="产品类型" width="120" /> |
| | | <el-table-column prop="industry" label="行业领域" width="150" /> |
| | | <el-table-column prop="submitUnit" label="提报单位" width="150" /> |
| | | <el-table-column prop="typeName" label="产品类型" width="120" /> |
| | | <el-table-column prop="importantAreaName" label="行业领域" width="150" /> |
| | | <el-table-column prop="submissionUnit" label="提报单位" width="150" /> |
| | | <el-table-column prop="shelfStatus" label="上架状态" width="100"> |
| | | <template #default="{ row }"> |
| | | <el-tag :type="getStatusType(row.shelfStatus)" size="small"> |
| | |
| | | </el-card> |
| | | |
| | | <!-- 产品价格查看弹窗 --> |
| | | <ProductPriceViewer |
| | | <!-- <ProductPriceViewer |
| | | v-model="priceViewerVisible" |
| | | :product-id="currentProductId" |
| | | @order="handleOrder" |
| | | /> |
| | | /> --> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { useRouter } from 'vue-router' |
| | | import { ElMessage } from 'element-plus' |
| | | import ProductPriceViewer from '@/views/productManage/productPriceViewer/index.vue' |
| | | import productApi from '@/api/productApi' |
| | | |
| | | interface ProductItem { |
| | | id: string |
| | |
| | | const priceViewerVisible = ref(false) |
| | | const currentProductId = ref('') |
| | | |
| | | // 模拟产品数据 |
| | | const mockProductList: ProductItem[] = [ |
| | | { |
| | | id: '1', |
| | | name: '数字化产品A', |
| | | productType: '软件/平台', |
| | | industry: '交通基础设施', |
| | | submitUnit: '中交一公局', |
| | | submitter: '张三', |
| | | projectUnit: '某高速公路工程', |
| | | industryStage: '应用阶段', |
| | | description: '本产品定位为以建设期BIM数字资产作为数字底盘,结合项目运营维保需求的实时性、交互性、便捷性的三维可视化运维管理系统。系统提供项目数字化、智能化运维管理功能,能够解决建筑运行维护管理中的实际问题,实现信息快速整合与查询、信息有效共享与传递,提升项目综合管理与维护水平。', |
| | | shelfStatus: '待上架' |
| | | }, |
| | | { |
| | | id: '2', |
| | | name: '数字化产品B', |
| | | productType: '硬件/传感', |
| | | industry: '市政工程', |
| | | submitUnit: '中交二航局', |
| | | submitter: '李四', |
| | | projectUnit: '智慧管廊项目', |
| | | industryStage: '研发阶段', |
| | | description: '面向城市管廊监测的传感设备与采集网关,支持边缘计算与远程运维。', |
| | | shelfStatus: '已上架' |
| | | }, |
| | | { |
| | | id: '3', |
| | | name: '数字化产品C', |
| | | productType: '软件/平台', |
| | | industry: '建筑工程', |
| | | submitUnit: '中交三航局', |
| | | submitter: '王五', |
| | | projectUnit: '智慧建筑项目', |
| | | industryStage: '应用阶段', |
| | | description: '基于BIM技术的建筑工程管理平台,提供设计、施工、运维全生命周期管理。', |
| | | shelfStatus: '已下架' |
| | | }, |
| | | { |
| | | id: '10004', |
| | | name: '数字化产品D', |
| | | productType: '硬件/传感', |
| | | industry: '水利工程', |
| | | submitUnit: '中交四航局', |
| | | submitter: '赵六', |
| | | projectUnit: '智慧水利项目', |
| | | industryStage: '研发阶段', |
| | | description: '水利工程监测设备与数据采集系统,支持实时监测和预警。', |
| | | shelfStatus: '已上架' |
| | | } |
| | | ] |
| | | |
| | | // 获取状态类型 |
| | | const getStatusType = (status: string) => { |
| | |
| | | loading.value = true |
| | | try { |
| | | // 模拟API调用 |
| | | await new Promise(resolve => setTimeout(resolve, 500)) |
| | | productList.value = mockProductList |
| | | // await new Promise(resolve => setTimeout(resolve, 500)) |
| | | let data = {"name":"","industrialChainId":"","importantAreaId":"","importantAreaIdList":[],"typeId":"","typeChildId":[],"startDate":"","endDate":"","page":{"current":1,"size":10,"total":3}} |
| | | const res: any = await productApi.getProductList(data) |
| | | if (res?.code === 200) { |
| | | productList.value = res.data.records || [] |
| | | } else { |
| | | productList.value = [] |
| | | ElMessage.error(res?.msg || '获取产品列表失败') |
| | | } |
| | | // productList.value = mockProductList |
| | | } catch (error) { |
| | | console.error('加载产品列表失败:', error) |
| | | ElMessage.error('加载产品列表失败') |
| | |
| | | |
| | | // 查看定价 |
| | | const handleViewPricing = (row: ProductItem) => { |
| | | currentProductId.value = row.id |
| | | priceViewerVisible.value = true |
| | | // currentProductId.value = row.id |
| | | // priceViewerVisible.value = true |
| | | router.push({ |
| | | path: '/product/priceViewer', |
| | | query: { productId: row.id} |
| | | }) |
| | | } |
| | | |
| | | // 处理订购 |