Commit 99817aec by 米嘉伟

文件导出

parent db0c6997
...@@ -335,6 +335,7 @@ export default { ...@@ -335,6 +335,7 @@ export default {
}, },
data () { data () {
return { return {
filenameexport: '文件',
dialogVisible: false, // 弹窗状态 dialogVisible: false, // 弹窗状态
wzChecked: true, // 文字单选 wzChecked: true, // 文字单选
// 滚动指纹 // 滚动指纹
...@@ -523,7 +524,23 @@ export default { ...@@ -523,7 +524,23 @@ export default {
}, },
methods: { 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) { gdzwAll (val) {
this.gdzwyscheckAll = val this.gdzwyscheckAll = val
...@@ -617,52 +634,6 @@ export default { ...@@ -617,52 +634,6 @@ export default {
this.rxcheckAll = checkedCount === this.rxs.length; this.rxcheckAll = checkedCount === this.rxs.length;
this.rxisIndeterminate = checkedCount > 0 && 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> </script>
......
...@@ -561,16 +561,17 @@ export default { ...@@ -561,16 +561,17 @@ export default {
this.$message.error("请选择需要复制条码号的数据!"); this.$message.error("请选择需要复制条码号的数据!");
} else if (this.multipleSelection.length === 1) { } else if (this.multipleSelection.length === 1) {
this.barcode = this.multipleSelection[0].barcode; this.barcode = this.multipleSelection[0].barcode;
this.$axios // 创建隐藏的可下载链接
.get("/api/export/case/" + this.barcode) let eleLink = document.createElement('a')
.then(response => { let url = 'http://192.168.128.112:8099/api/export/case/' + this.barcode
if (response.data.code === 0) { eleLink.download = this.filenameexport
this.$message.success("导出成功"); eleLink.style.display = 'none'
this.dialogVisible = false; eleLink.href = url
} else { // 触发点击
this.$message.error("导出失败"); document.body.appendChild(eleLink)
} eleLink.click()
}); // 然后移除
document.body.removeChild(eleLink)
} else { } else {
this.$message.error("只能复制单条数据的条码号!"); this.$message.error("只能复制单条数据的条码号!");
} }
......
...@@ -682,6 +682,9 @@ export default { ...@@ -682,6 +682,9 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
/deep/.el-radio {
margin-right: 15px;
}
/deep/.el-radio__input.is-checked .el-radio__inner { /deep/.el-radio__input.is-checked .el-radio__inner {
border-color: #055fe7; border-color: #055fe7;
background: #055fe7; background: #055fe7;
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</el-tag> </el-tag>
<!-- 五 --> <!-- 五 -->
<el-table <el-table
max-height="500" max-height="650"
ref="multipleTable" ref="multipleTable"
:data="tableDate" :data="tableDate"
tooltip-effect="dark" tooltip-effect="dark"
...@@ -424,7 +424,7 @@ export default { ...@@ -424,7 +424,7 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.RAList { .RAList {
height: 100%; height: 700px;
box-sizing: border-box; box-sizing: border-box;
padding: 0 24px; padding: 0 24px;
font-family: MicrosoftYaHei; font-family: MicrosoftYaHei;
...@@ -555,6 +555,9 @@ export default { ...@@ -555,6 +555,9 @@ export default {
/deep/.el-form-item__label { /deep/.el-form-item__label {
color: #333333; color: #333333;
} }
/deep/.el-table {
height: 100%;
}
/deep/.el-table th > .cell { /deep/.el-table th > .cell {
font-size: 14px; font-size: 14px;
font-family: MicrosoftYaHei; 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