Commit df12633c authored by yanzhengyang's avatar yanzhengyang

新增出差申请列表导出

parent b0b4384e
...@@ -124,6 +124,7 @@ ...@@ -124,6 +124,7 @@
<!-- 表格数据 --> <!-- 表格数据 -->
<el-table v-loading="loading" :data="tripApplicationList" border style="width: 100%" <el-table v-loading="loading" :data="tripApplicationList" border style="width: 100%"
@selection-change="handleSelectionChange"
:row-class-name="tableRowClassName"> :row-class-name="tableRowClassName">
<el-table-column type="selection" width="40" align="right"/> <el-table-column type="selection" width="40" align="right"/>
<el-table-column label="项目编号" align="center" prop="projectNumber" min-width="150"/> <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', ' ...@@ -201,7 +202,7 @@ const { cost_daily_status, project_type } = proxy.useDict('cost_daily_status', '
const tripApplicationList = ref([]); const tripApplicationList = ref([]);
const loading = ref(true); const loading = ref(true);
const ids = ref([])
const total = ref(0); const total = ref(0);
const projectOption = ref([]); const projectOption = ref([]);
...@@ -306,19 +307,26 @@ function handleDelete(row) { ...@@ -306,19 +307,26 @@ function handleDelete(row) {
}).catch(() => {}); }).catch(() => {});
} }
/** 导出按钮操作 */
// function handleExport() {
// proxy.download("system/role/export", {
// ...queryParams.value,
// }, `role_${new Date().getTime()}.xlsx`);
// }
/** 多选框选中数据 */ /** 多选框选中数据 */
// function handleSelectionChange(selection) { function handleSelectionChange(val) {
// ids.value = selection.map(item => item.roleId); ids.value = val.map((item)=>{
// single.value = selection.length != 1; return item.id
// multiple.value = !selection.length; })
// } }
/** 导出按钮操作 */
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() { 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