Commit 99817aec by 米嘉伟

文件导出

parent db0c6997
......@@ -335,6 +335,7 @@ export default {
},
data () {
return {
filenameexport: '文件',
dialogVisible: false, // 弹窗状态
wzChecked: true, // 文字单选
// 滚动指纹
......@@ -523,7 +524,23 @@ export default {
},
methods: {
focus () {
// 创建隐藏的可下载链接
let eleLink = document.createElement('a')
let url = 'http://192.168.128.107:8099/api/export/person/' + this.rowData[0].barcode
eleLink.download = this.filenameexport
eleLink.style.display = 'none'
eleLink.href = url
// 触发点击
document.body.appendChild(eleLink)
eleLink.click()
// 然后移除
document.body.removeChild(eleLink)
this.dialogVisible = false;
},
handleClose (done) {
this.dialogVisible = false;
},
// 滚动指纹全选
gdzwAll (val) {
this.gdzwyscheckAll = val
......@@ -617,52 +634,6 @@ export default {
this.rxcheckAll = checkedCount === this.rxs.length;
this.rxisIndeterminate = checkedCount > 0 && checkedCount < this.rxs.length;
},
focus () {
this.$ajax
// .post(
// downloadExcelTemplateProte, //接口
// data, //参数
// { responseType: "blob" } //数据返回类型
// )
// .then((res) => {
// let url = window.URL.createObjectURL(new Blob([res.data]));
// let link = document.createElement("a");
// link.style.display = "none";
// link.href = url;
// link.setAttribute("download", "all_sample_fa_kegg_blast_bst.xls"); //指定下载后的文件名,防跳转
// document.body.appendChild(link);
// link.click();
// })
// .catch(function (error) {
// console.log(error);
// });
// 确认提示
this.$confirm("是否确定提交数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
})
.then(() => {
this.$axios
.post("/api/api/mypsn/add", { myPerson: '' })
.then(response => {
if (response.data.code === 0) {
this.$message.success("导出成功");
} else {
this.$message.error("导出失败");
}
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消提交"
});
});
},
handleClose (done) {
this.dialogVisible = false;
}
}
};
</script>
......
......@@ -561,16 +561,17 @@ export default {
this.$message.error("请选择需要复制条码号的数据!");
} else if (this.multipleSelection.length === 1) {
this.barcode = this.multipleSelection[0].barcode;
this.$axios
.get("/api/export/case/" + this.barcode)
.then(response => {
if (response.data.code === 0) {
this.$message.success("导出成功");
this.dialogVisible = false;
} else {
this.$message.error("导出失败");
}
});
// 创建隐藏的可下载链接
let eleLink = document.createElement('a')
let url = 'http://192.168.128.112:8099/api/export/case/' + this.barcode
eleLink.download = this.filenameexport
eleLink.style.display = 'none'
eleLink.href = url
// 触发点击
document.body.appendChild(eleLink)
eleLink.click()
// 然后移除
document.body.removeChild(eleLink)
} else {
this.$message.error("只能复制单条数据的条码号!");
}
......
......@@ -682,6 +682,9 @@ export default {
display: flex;
justify-content: center;
align-items: center;
/deep/.el-radio {
margin-right: 15px;
}
/deep/.el-radio__input.is-checked .el-radio__inner {
border-color: #055fe7;
background: #055fe7;
......
......@@ -53,7 +53,7 @@
</el-tag>
<!-- 五 -->
<el-table
max-height="500"
max-height="650"
ref="multipleTable"
:data="tableDate"
tooltip-effect="dark"
......@@ -424,7 +424,7 @@ export default {
</script>
<style scoped lang="scss">
.RAList {
height: 100%;
height: 700px;
box-sizing: border-box;
padding: 0 24px;
font-family: MicrosoftYaHei;
......@@ -555,6 +555,9 @@ export default {
/deep/.el-form-item__label {
color: #333333;
}
/deep/.el-table {
height: 100%;
}
/deep/.el-table th > .cell {
font-size: 14px;
font-family: MicrosoftYaHei;
......
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