Commit df12633c authored by yanzhengyang's avatar yanzhengyang

新增出差申请列表导出

parent b0b4384e
......@@ -124,6 +124,7 @@
<!-- 表格数据 -->
<el-table v-loading="loading" :data="tripApplicationList" border style="width: 100%"
@selection-change="handleSelectionChange"
:row-class-name="tableRowClassName">
<el-table-column type="selection" width="40" align="right"/>
<el-table-column label="项目编号" align="center" prop="projectNumber" min-width="150"/>
......@@ -201,7 +202,7 @@ const { cost_daily_status, project_type } = proxy.useDict('cost_daily_status', '
const tripApplicationList = ref([]);
const loading = ref(true);
const ids = ref([])
const total = ref(0);
const projectOption = ref([]);
......@@ -306,19 +307,26 @@ function handleDelete(row) {
}).catch(() => {});
}
/** 导出按钮操作 */
// function handleExport() {
// proxy.download("system/role/export", {
// ...queryParams.value,
// }, `role_${new Date().getTime()}.xlsx`);
// }
/** 多选框选中数据 */
// function handleSelectionChange(selection) {
// ids.value = selection.map(item => item.roleId);
// single.value = selection.length != 1;
// multiple.value = !selection.length;
// }
function handleSelectionChange(val) {
ids.value = val.map((item)=>{
return item.id
})
}
/** 导出按钮操作 */
function handleExport() {
if (ids.value.length === 0) {
proxy.$message.warning('请选择要导出的数据');
}else {
let arr = ids.value.join(",")
let obj = {
ids:arr
}
console.log(obj)
proxy.download('/tripApplication/tripApplication/export', obj, `出差申请.xlsx`)
}
}
/** 添加角色 */
function handleAdd() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment