步骤:
1.elementui的表格
2.点击表格里面的checkbox根据事件change拿到里面选中的值 然后赋给定义数组
3.点击下载 条件判断 将数组里面的东西遍历出来 转化字符串 通过window.location.href="后台数据+遍历出来的id"
//列表选择 // handleSelectionChange(val) { // console.log("val", val); // this.multipleSelection = val; // console.log("this.multipleSelection", this.multipleSelection); // },//批量下载清单 // downList() { // if (this.multipleSelection.length) { // if (this.multipleSelection.length > 20) { // this.$message({ // type: "warning", // message: '下载的清单数量不能超过20个' // }); // return false; // } // let mainArr = []; // this.multipleSelection.forEach(item => { // mainArr.push(item.xId); // }) // let mainIds = mainArr.join(); // window.location.href = `${base.baseUrl}/cloud/medicalcloud/api/prescription/v1/exportBatchPrescriptionPdf?mainIds=${mainIds}`; // this.$refs.multipleTable.clearSelection(); // }else{ // this.$message({ // type: "warning", // message: '请勾选要下载的处方' // }); // } // }