Commit d46762d3 by 李伟康

```

feat(usedCarManagement): 新增车辆图片下载功能并优化导出逻辑

- 在车辆管理模块的路由配置中新增“图片下载”按钮权限及处理函数
- 在车辆管理页面中增加图片下载按钮,并调整编辑按钮样式
- 优化导出相关方法命名及判断逻辑,提升代码可读性
- 修复 formatter 函数的语法格式问题
```
1 parent c2cf677c
...@@ -206,7 +206,7 @@ export const routerName = { ...@@ -206,7 +206,7 @@ export const routerName = {
authId: "9200405", authId: "9200405",
name: "编辑车辆", name: "编辑车辆",
parentId: "92004" parentId: "92004"
} },
] ]
}, },
{ {
...@@ -222,6 +222,12 @@ export const routerName = { ...@@ -222,6 +222,12 @@ export const routerName = {
category: "Button", category: "Button",
type: "primary", type: "primary",
handle: "handleExport" handle: "handleExport"
},
{
authId: "9200406",
parentId: "92004",
label: "图片下载",
handle: "handleDownLoad"
} }
], ],
component: _import("usedCarManagement/vehicleManagement/index") component: _import("usedCarManagement/vehicleManagement/index")
......
...@@ -81,12 +81,18 @@ ...@@ -81,12 +81,18 @@
/> />
</span> </span>
<!-- 编辑 --> <!-- 编辑 -->
<span> <span style="margin-right: 10px">
<auth-button <auth-button
:data="scope.scope" :data="scope.scope"
:show-btn-ids="['9200402']" :show-btn-ids="['9200402']"
/> />
</span> </span>
<span>
<auth-button
:data="scope.scope"
:show-btn-ids="['9200406']"
/>
</span>
</div> </div>
</d2-table> </d2-table>
</div> </div>
...@@ -313,7 +319,7 @@ export default { ...@@ -313,7 +319,7 @@ export default {
label: "是否事故", label: "是否事故",
prop: "hasAccident", prop: "hasAccident",
minWidth: 120, minWidth: 120,
formatter: cellValue => { formatter: cellValue => {
return HAS_ACCIDENT[cellValue.hasAccident] || '-' return HAS_ACCIDENT[cellValue.hasAccident] || '-'
} }
}, },
...@@ -428,7 +434,7 @@ export default { ...@@ -428,7 +434,7 @@ export default {
} }
}) })
}, },
filterIds() { filterIds () {
let ids = [] let ids = []
if (this.$refs.vehicleManagementTable.mutiSelectArr.contentIndex?.length) { if (this.$refs.vehicleManagementTable.mutiSelectArr.contentIndex?.length) {
this.$refs.vehicleManagementTable.mutiSelectArr.contentIndex.forEach((item) => { this.$refs.vehicleManagementTable.mutiSelectArr.contentIndex.forEach((item) => {
...@@ -437,6 +443,24 @@ export default { ...@@ -437,6 +443,24 @@ export default {
} }
return ids return ids
}, },
handleDownLoad (row) {
let params = {
method: '/carManagement/exportCarManageInfoImageZipAsync',
server_provider_type: 'gsc',
server_provider_name: 'gsc-vcp-web-facade',
id: row.id
}
const list = [
...this.dowloadList,
{
name: "车辆管理车辆图片",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
},
handleExport () { handleExport () {
let params = { let params = {
method: '/carManagement/exportCarManageInfoAsync', method: '/carManagement/exportCarManageInfoAsync',
...@@ -444,8 +468,8 @@ export default { ...@@ -444,8 +468,8 @@ export default {
server_provider_name: 'gsc-vcp-web-facade', server_provider_name: 'gsc-vcp-web-facade',
...this.getParams(), ...this.getParams(),
}, },
ids = this.filterIds() ids = this.filterIds()
if(ids.length) params.ids = ids if (ids.length) params.ids = ids
const list = [ const list = [
...this.dowloadList, ...this.dowloadList,
{ {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!