Commit 999317f7 authored by 李苏's avatar 李苏 💬

调整

parent 3f9d7a5d
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Description: * @Description:
* @Author: lisu lisu@gavelinfo.com * @Author: lisu lisu@gavelinfo.com
* @LastEditors: lisu lisu@gavelinfo.com * @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-09-25 16:20:23 * @LastEditTime: 2024-09-25 18:00:01
* @FilePath: /zghywpc-vue/src/views/yhlywsytst/yhlywsytst/index.vue * @FilePath: /zghywpc-vue/src/views/yhlywsytst/yhlywsytst/index.vue
--> -->
<template> <template>
...@@ -279,9 +279,9 @@ ...@@ -279,9 +279,9 @@
<span>溯源排查</span> <span>溯源排查</span>
<b class="data-title-right">]</b> <b class="data-title-right">]</b>
</div> </div>
<div class="full " style="height: calc(100% - 14px);padding-top: 12px;padding-left: 50px;"> <div class="full " style="height: calc(100% - 14px);padding-top: 12px;padding-left: 25px;">
<el-row :gutter="20" class="search-row-1" style="width: 100%;"> <el-row :gutter="20" class="search-row-1" style="width: 100%;">
<el-col :span="4" class="search-col"> <el-col :span="3" class="search-col">
<div class="search-item"> <div class="search-item">
<span class="search-span"><span style="color: rgb(255, 73, 73); margin-right: 4px;">*</span>功能位置:</span> <span class="search-span"><span style="color: rgb(255, 73, 73); margin-right: 4px;">*</span>功能位置:</span>
<el-input v-model="sypcQueryParams.gnwz"></el-input> <el-input v-model="sypcQueryParams.gnwz"></el-input>
...@@ -316,7 +316,7 @@ ...@@ -316,7 +316,7 @@
<el-input v-model="sypcQueryParams.cz"></el-input> <el-input v-model="sypcQueryParams.cz"></el-input>
</div> </div>
</el-col> </el-col>
<el-col :span="4" class="search-col flex-center"> <el-col :span="3" class="search-col flex-center">
<div class="search-item"> <div class="search-item">
<span class="search-span">流动特性:</span> <span class="search-span">流动特性:</span>
<RelSelect placeholder='' style="width: 100%;" src='ywxxgl/uywxx/init/ldtx ' filterable clearable <RelSelect placeholder='' style="width: 100%;" src='ywxxgl/uywxx/init/ldtx ' filterable clearable
...@@ -329,14 +329,20 @@ ...@@ -329,14 +329,20 @@
<el-button style="background-color: rgba(7,32,96,0.0);border: 1px solid #68D8FE; color: #68D8FE;" <el-button style="background-color: rgba(7,32,96,0.0);border: 1px solid #68D8FE; color: #68D8FE;"
size="mini" @click="sypc()" type="primary">溯源排查</el-button> size="mini" @click="sypc()" type="primary">溯源排查</el-button>
</el-col> </el-col>
<el-col :span="2" class="search-col flex-center" style="padding-right: 10px;" > <el-col :span="2" class="search-col flex-center" style="padding-left: 20px;">
<el-button style="background-color: rgba(7,32,96,0.0);border: 1px solid #68D8FE; color: #68D8FE;" <el-button style="background-color: rgba(7,32,96,0.0);border: 1px solid #68D8FE; color: #68D8FE;"
size="mini" @click="czmx()" type="primary">重置模型</el-button> size="mini" @click="czmx()" type="primary">重置模型</el-button>
</el-col> </el-col>
<el-col :span="2" class="search-col flex-center" style="padding-left: 20px;">
<el-button @click="savePdf()" style="background-color: rgba(7,32,96,0.0);border: 1px solid #68D8FE; color: #68D8FE;"
size="mini" type="primary">溯源日志</el-button>
</el-col>
</el-row> </el-row>
<!-- <!--
<el-row :gutter="24" class="search-row-1" style="width: 100%;"> <el-row :gutter="24" class="search-row-1" style="width: 100%;">
<el-col :span="20" class="search-col"> <el-col :span="20" class="search-col">
...@@ -506,6 +512,8 @@ ...@@ -506,6 +512,8 @@
}, },
data() { data() {
return { return {
/* pdf-*/
pdfBytes:'',
mxbshow: false, mxbshow: false,
sblxCode: '', sblxCode: '',
sblxcxwcxdxx: false, sblxcxwcxdxx: false,
...@@ -618,7 +626,44 @@ ...@@ -618,7 +626,44 @@
this.apiJzbm() this.apiJzbm()
}, },
/* 点击按钮弹出异物,然后选中*/ /* 点击按钮弹出异物,然后选中*/
savePdf(){
if( this.pdfBytes){
const base64String = this.pdfBytes;
const linkSource = `data:application/pdf;base64,${base64String}`;
const downloadLink = document.createElement('a');
const fileName = '排除日志.pdf';
downloadLink.href = linkSource;
downloadLink.download = fileName;
downloadLink.click();
downloadLink.remove()
}else{
this.$warning('请溯源后,再保存为排除日志')
}
},
sypcMethods(res) { sypcMethods(res) {
// function byteStringToUint8Array(byteString) {
// const byteArray = new Uint8Array(byteString.length);
// for (let i = 0; i < byteString.length; i++) {
// byteArray[i] = byteString.charCodeAt(i);
// }
// return byteArray;
// }
// let byteArray =byteStringToUint8Array(res.data.records.pdfBytes)
// const blob = new Blob([byteArray], { type: 'application/pdf' });
// const url = URL.createObjectURL(blob);
// const a = document.createElement('a');
// a.href = url;
// a.download = 'document.pdf'; // 设置下载文件名
// // 触发下载
// document.body.appendChild(a);
// a.click();
// a.remove()
this.pdfBytes=res.data.records.pdfBytes
/* -
-*/
let sbxxList = res.data.records.kshSbInfos || [] let sbxxList = res.data.records.kshSbInfos || []
let zbInfos = res.data.records.zbInfos || [] let zbInfos = res.data.records.zbInfos || []
/* 进行标记设备*/ /* 进行标记设备*/
...@@ -648,7 +693,8 @@ ...@@ -648,7 +693,8 @@
sbxxCodeList.forEach(item => { sbxxCodeList.forEach(item => {
if (model.name.includes(item)) { if (model.name.includes(item)) {
isbh = true isbh = true
}}) }
})
if (isbh) { if (isbh) {
model.visible = true model.visible = true
...@@ -1715,7 +1761,7 @@ ...@@ -1715,7 +1761,7 @@
margin-top: 185px; margin-top: 185px;
width: 28%; width: 28%;
left: 15px; left: 15px;
height: calc(100% - 205px + 10px) ; height: calc(100% - 205px + 10px);
z-index: 12; z-index: 12;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
......
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