档案目录导出修改

master
wanglei 1 year ago
parent 6b58c8e422
commit 485c8428bf

@ -26,6 +26,16 @@
v-hasPermi="['dangan:catalog:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['dangan:catalog:export']"
>导出档案一级目录</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
@ -89,7 +99,7 @@
row-key="id"
:default-expand-all="isExpandAll"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" border>
<el-table-column label="目录名称" align="left" header-align="center" prop="muName" min-width="160">
<el-table-column label="目录名称" align="left" header-align="center" prop="muName" min-width="250">
<template slot-scope="scope">
<el-link type="primary" @click="handleDAXX(scope.row)">{{ scope.row.muName }}</el-link>
@ -119,7 +129,7 @@
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200px">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="220px">
<template slot-scope="scope">
<el-button
size="mini"
@ -156,6 +166,14 @@
v-hasPermi="['dangan:pictureRecard:list']"
@click="handleSCJL(scope.row)"
>上传记录</el-button>
<el-button
v-if="scope.row.children&&scope.row.children.length>0"
type="text"
icon="el-icon-download"
size="mini"
@click="handleExport(scope.row)"
v-hasPermi="['dangan:catalog:export']"
>导出</el-button>
</template>
</el-table-column>
</el-table>
@ -646,7 +664,22 @@ export default {
this.queryParams.xuhao=1;
this.getList();
}
}
},
/** 导出按钮操作 */
handleExport(row) {
if(row&&row.id!==undefined){
this.download('dangan/catalog/export', {
...this.queryParams,
id: row.id
}, `档案目录_${new Date().getTime()}.xlsx`)
}else {
this.download('dangan/catalog/export', {
...this.queryParams,
id: 0
}, `档案目录_${new Date().getTime()}.xlsx`)
}
},
}
};
</script>

Loading…
Cancel
Save