Commit 36bed85e by cwq0219

员工-导出

1 parent 21a8cdd3
......@@ -104,4 +104,14 @@ const deleteEmployeeApi = params => {
})
}
export default { getListApi, getAllMerchantListApi, getRoleListApi, getAllDictApi, getMerchantTreeApi, getDetailInfoApi, getDetailLogApi, addEmployeeApi, updateEmployeeApi, deleteEmployeeApi }
const exportEmployeeApi = params => {
params.method = `${defaultPath}staff.exportData`
return http({
url: 'rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getListApi, getAllMerchantListApi, getRoleListApi, getAllDictApi, getMerchantTreeApi, getDetailInfoApi, getDetailLogApi, addEmployeeApi, updateEmployeeApi, deleteEmployeeApi, exportEmployeeApi }
......@@ -12,7 +12,7 @@
</template>
<span slot="footer" class="footer-btns">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary">导出</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
</span>
</glsx-combi-form>
</div>
......@@ -290,6 +290,13 @@ export default {
handleSearch() {
this.$refs.employeeRef.refreshTable()
},
handleExport() {
var params = this.getParams()
this.$apis.employee.exportEmployeeApi(params).then(res => {
window.open(res)
})
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!