diff --git a/src/modules/costManagement/api/index.ts b/src/modules/costManagement/api/index.ts index 047fb8d..bae0ef1 100644 --- a/src/modules/costManagement/api/index.ts +++ b/src/modules/costManagement/api/index.ts @@ -20,39 +20,39 @@ const moduleName = 'costManagement' // } // } - - // 造价表 export const costTable = Object.assign({}, COMMON_METHOD, { serveUrl: '/' + moduleName + '/' + 'costTable' + '/', - // 新增 - addCostTable(itemList) { - return request.post({ url: this.serveUrl + 'addCostTable', data: itemList }) - }, - // 查询数据 - getCostTableDetail(id) { + // 新增 + addCostTable(itemList) { + return request.post({ url: this.serveUrl + 'addCostTable', data: itemList }) + }, + // 查询数据 + getCostTableDetail(id) { return request.get({ url: this.serveUrl + 'getCostTableDetail/' + id }) }, - modifyCostTable(params){ + modifyCostTable(params) { return request.put({ url: this.serveUrl + 'modifyCostTable', data: params }) - + }, + // 导出数据 + exportData(id) { + return request.download({ url: this.serveUrl + 'exportData/'+id }) } }) // 造价明细 export const costItemDetail = Object.assign({}, COMMON_METHOD, { serveUrl: '/' + moduleName + '/' + 'costItemDetail' + '/', - // 全产品造价 - getProductsPageByType(params) { - return request.get({ url: this.serveUrl + 'getProductsPageByType', params }) - }, - // 查询数据 - getCostTableDetail(id) { + // 全产品造价 + getProductsPageByType(params) { + return request.get({ url: this.serveUrl + 'getProductsPageByType', params }) + }, + // 查询数据 + getCostTableDetail(id) { return request.get({ url: this.serveUrl + 'getCostTableDetail/' + id }) }, - modifyCostTable(params){ + modifyCostTable(params) { return request.put({ url: this.serveUrl + 'modifyCostTable', data: params }) - } }) // 字典类型 diff --git a/src/modules/costManagement/view/costTable/index.vue b/src/modules/costManagement/view/costTable/index.vue index b0945ec..f7584f4 100644 --- a/src/modules/costManagement/view/costTable/index.vue +++ b/src/modules/costManagement/view/costTable/index.vue @@ -44,6 +44,14 @@ > + 导出 @@ -185,6 +193,9 @@ function searchChange(val, done) { onLoad() done() } +function exportData(row) { + api.exportData(row.id) +}