根据用户意见修改定量报告问题

tykong-cidian
duxiaoning 2024-06-27 19:30:44 +08:00
parent e0e3847776
commit 51216f3aff
9 changed files with 116 additions and 65 deletions

View File

@ -3,10 +3,10 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
"start": "vue-cli-service serve", "start": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
"build": "vue-cli-service build", "build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
"lint": "vue-cli-service lint" "lint": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service lint"
}, },
"dependencies": { "dependencies": {
"animate.css": "^4.1.1", "animate.css": "^4.1.1",

View File

@ -74,9 +74,9 @@
</div> </div>
<div class="sscPre"> <div class="sscPre">
<div :class="checkRealityWait ? 'sceneShowContent onBorder' : 'sceneShowContent'" id="sceneShowContent"> <div :class="checkRealityWait ? 'sceneShowContent onBorder' : 'sceneShowContent'" id="sceneShowContent">
<div v-show="checkRealityWait" class="topContent"> <!-- <div v-show="checkRealityWait" class="topContent">
<span class="mapTitle">待检验正射校正产品图</span> <span class="mapTitle">待检验正射校正产品图</span>
</div> </div> -->
<div :id="checkRealityWait ? 'mapContent' : 'cesiumContent'"> <div :id="checkRealityWait ? 'mapContent' : 'cesiumContent'">
<canvas v-show="checkRealityWait" id="grid"></canvas> <canvas v-show="checkRealityWait" id="grid"></canvas>
<otg-product-info v-show="screenImgStg" @removeLayer="removeLayer('far')" <otg-product-info v-show="screenImgStg" @removeLayer="removeLayer('far')"

View File

@ -108,9 +108,9 @@
<span class="sp1"></span><span class="sp2">待检验产品及样本分布结果</span> <span class="sp1"></span><span class="sp2">待检验产品及样本分布结果</span>
</div> </div>
<div :class="checkRealityWait ? 'sceneShowContent onBorder' : 'sceneShowContent'" id="sceneShowContent"> <div :class="checkRealityWait ? 'sceneShowContent onBorder' : 'sceneShowContent'" id="sceneShowContent">
<div v-show="checkRealityWait" class="topContent"> <!-- <div v-show="checkRealityWait" class="topContent">
<span class="mapTitle">待检验{{ productSubType | productTypeMap }}</span> <span class="mapTitle">待检验{{ productSubType | productTypeMap }}</span>
</div> </div> -->
<div :id="checkRealityWait ? 'mapContent' : 'cesiumContent'"> <div :id="checkRealityWait ? 'mapContent' : 'cesiumContent'">
<canvas v-show="checkRealityWait" id="grid"></canvas> <canvas v-show="checkRealityWait" id="grid"></canvas>
<div id="cesiumView" @click="pickValue"> <div id="cesiumView" @click="pickValue">

View File

@ -54,9 +54,9 @@
<span class="sp1"></span><span class="sp2">待检验产品及样本分布结果</span> <span class="sp1"></span><span class="sp2">待检验产品及样本分布结果</span>
</div> </div>
<div :class="checkRealityWait ? 'sceneShowContent onBorder' : 'sceneShowContent'" id="sceneShowContent"> <div :class="checkRealityWait ? 'sceneShowContent onBorder' : 'sceneShowContent'" id="sceneShowContent">
<div v-show="checkRealityWait" class="topContent"> <!-- <div v-show="checkRealityWait" class="topContent">
<span class="mapTitle">待检验{{ productSubType | productTypeMap }}</span> <span class="mapTitle">待检验{{ productSubType | productTypeMap }}</span>
</div> </div> -->
<div :id="checkRealityWait ? 'mapContent' : 'cesiumContent'"> <div :id="checkRealityWait ? 'mapContent' : 'cesiumContent'">
<canvas v-show="checkRealityWait" id="grid"></canvas> <canvas v-show="checkRealityWait" id="grid"></canvas>
<div id="cesiumView" @click="pickValue"> <div id="cesiumView" @click="pickValue">

View File

@ -1,16 +1,16 @@
// 绘制黑白相间比例尺 // 绘制黑白相间比例尺
export function drawScaleTwo(value, currentScaleUnit) { export function drawScaleTwo(value, currentScaleUnit) {
var canvas = document.querySelector('#scaleBar'); var canvas = document.querySelector("#scaleBar");
var ctx = canvas.getContext('2d'); var ctx = canvas.getContext("2d");
canvas.height = 23; canvas.height = 23;
// canvas.style.border = "1px solid #000" // canvas.style.border = "1px solid #000"
// 把当前的上下文的状态保存起来 // 把当前的上下文的状态保存起来
ctx.transform(1, 0, 0, 1, 15, 0); ctx.transform(1, 0, 0, 1, 15, 0);
ctx.save(); ctx.save();
//设置比例尺文字样式 //设置比例尺文字样式
const fontSize = '12'; const fontSize = "12";
ctx.font = "normal bold " + fontSize + "px Arial"; ctx.font = "normal bold " + fontSize + "px Arial";
ctx.fillStyle = 'white' ctx.fillStyle = "white";
ctx.textBaseline = "hanging"; ctx.textBaseline = "hanging";
//比例尺最小格宽度、高度 //比例尺最小格宽度、高度
const width = 35; const width = 35;
@ -20,7 +20,7 @@ export function drawScaleTwo(value, currentScaleUnit) {
// if (i < 1) { // if (i < 1) {
// ctx.fillText(0, width * i, 0); // ctx.fillText(0, width * i, 0);
// } else { // } else {
ctx.fillText(parseFloat((i / 5 * value).toFixed(1)), width * i, 0); ctx.fillText(parseFloat(((i / 5) * value).toFixed(1)), width * i, 0);
// } // }
} }
ctx.transform(1, 0, 0, 1, 8, 0); ctx.transform(1, 0, 0, 1, 8, 0);
@ -36,63 +36,89 @@ export function drawScaleTwo(value, currentScaleUnit) {
//描边的意思 //描边的意思
ctx.stroke(); ctx.stroke();
//设置填充的样式 //设置填充的样式
i % 2 === 0 ? ctx.fillStyle = 'black' : ctx.fillStyle = 'white' i % 2 === 0 ? (ctx.fillStyle = "black") : (ctx.fillStyle = "white");
//进行填充的工作 //进行填充的工作
ctx.fill(); ctx.fill();
} }
} }
//绘制格网 //绘制格网
export function drawGrid(row, col, viewDom, extent) { export function drawGrid(row, col, viewDom, extent) {
var canvas = document.querySelector('#grid') var canvas = document.querySelector("#grid");
const thematicMapDom = getcurrentdomwidth('mapContent') const thematicMapDom = getcurrentdomwidth("mapContent");
canvas.width = thematicMapDom.w canvas.width = thematicMapDom.w;
canvas.height = thematicMapDom.h canvas.height = thematicMapDom.h;
// canvas.style.border = '1px solid black' // canvas.style.border = '1px solid black'
var ctx = canvas.getContext('2d') var ctx = canvas.getContext("2d");
//获取格网dom真实宽高 //获取格网dom真实宽高
const gridDom = getcurrentdomwidth('grid') const gridDom = getcurrentdomwidth("grid");
//获取专题图dom真实宽高 //获取专题图dom真实宽高
const map2dDom = getcurrentdomwidth(viewDom) const map2dDom = getcurrentdomwidth(viewDom);
//每一小格宽度 //每一小格宽度
const gridW = map2dDom.concentW / col const gridW = map2dDom.concentW / col;
//每一小格高度 //每一小格高度
const gridH = map2dDom.concentH / row const gridH = map2dDom.concentH / row;
//每一小格高度 //每一小格高度
// const gridH=10 // const gridH=10
for (let i = 0; i < col; i++) { for (let i = 0; i < col; i++) {
//绘制上下格网 //绘制上下格网
ctx.moveTo(i * gridW + (thematicMapDom.paddingL) + 1, thematicMapDom.paddingT) //画笔移动到100100点 ctx.moveTo(i * gridW + thematicMapDom.paddingL + 1, thematicMapDom.paddingT); //画笔移动到100100点
ctx.lineTo(i * gridW + (thematicMapDom.paddingL) + 1, thematicMapDom.paddingT - 2) //从画笔位置画一条直线到200100点 ctx.lineTo(i * gridW + thematicMapDom.paddingL + 1, thematicMapDom.paddingT - 2); //从画笔位置画一条直线到200100点
ctx.moveTo(i * gridW + (thematicMapDom.paddingL - gridDom.paddingL) + 1, thematicMapDom.concentH + thematicMapDom.paddingT) //画笔移动到100100点 ctx.moveTo(
ctx.lineTo(i * gridW + (thematicMapDom.paddingL - gridDom.paddingL) + 1, thematicMapDom.concentH + thematicMapDom.paddingT + 6) //从画笔位置画一条直线到200100点 i * gridW + (thematicMapDom.paddingL - gridDom.paddingL) + 1,
thematicMapDom.concentH + thematicMapDom.paddingT
); //画笔移动到100100点
ctx.lineTo(
i * gridW + (thematicMapDom.paddingL - gridDom.paddingL) + 1,
thematicMapDom.concentH + thematicMapDom.paddingT + 6
); //从画笔位置画一条直线到200100点
//设置线宽 //设置线宽
ctx.lineWidth = 1 ctx.lineWidth = 1;
//设置描边样式 //设置描边样式
ctx.strokeStyle = 'blue' //rgb(),rgba(),red,#fff ctx.strokeStyle = "blue"; //rgb(),rgba(),red,#fff
ctx.stroke() //描边 ctx.stroke(); //描边
//绘制上下坐标文字[113, 30.2, 115, 32.2] //绘制上下坐标文字[113, 30.2, 115, 32.2]
const fontSize = '12' const fontSize = "12";
ctx.font = "normal bold " + fontSize + "px Arial" ctx.font = "normal bold " + fontSize + "px Arial";
ctx.textBaseline = "bottom" ctx.textBaseline = "bottom";
ctx.fillText(DegreesCoverttoDuFenMiao(((extent[2] - extent[0]) / col * i + extent[0]).toString()) + 'E', i * gridW + (thematicMapDom.paddingL - gridDom.paddingL) - 18, thematicMapDom.paddingT) const ftMsg = ((extent[0] - extent[2]) / col) * i + extent[2];
const ftMsgUnit = ftMsg === 0 ? "" : ftMsg < 0 ? "W" : "E";
ctx.fillText(
DegreesCoverttoDuFenMiao(Math.abs(ftMsg).toString()) +
ftMsgUnit,
i * gridW + (thematicMapDom.paddingL - gridDom.paddingL) - 18,
thematicMapDom.paddingT
);
} }
for (let i = 0; i < row; i++) { for (let i = 0; i < row; i++) {
//绘制左右格网 //绘制左右格网
ctx.moveTo(thematicMapDom.paddingL, i * gridH + thematicMapDom.paddingT + 1) ctx.moveTo(thematicMapDom.paddingL, i * gridH + thematicMapDom.paddingT + 1);
ctx.lineTo(thematicMapDom.paddingL - 2, i * gridH + thematicMapDom.paddingT + 1) ctx.lineTo(thematicMapDom.paddingL - 2, i * gridH + thematicMapDom.paddingT + 1);
ctx.moveTo(thematicMapDom.paddingL + thematicMapDom.concentW + 4, i * gridH + thematicMapDom.paddingT + 1) ctx.moveTo(
ctx.lineTo(thematicMapDom.paddingL + thematicMapDom.concentW + 6, i * gridH + thematicMapDom.paddingT + 1) thematicMapDom.paddingL + thematicMapDom.concentW + 4,
i * gridH + thematicMapDom.paddingT + 1
);
ctx.lineTo(
thematicMapDom.paddingL + thematicMapDom.concentW + 6,
i * gridH + thematicMapDom.paddingT + 1
);
//设置线宽 //设置线宽
ctx.lineWidth = 2 ctx.lineWidth = 2;
//设置描边样式 //设置描边样式
ctx.strokeStyle = 'blue' //rgb(),rgba(),red,#fff ctx.strokeStyle = "blue"; //rgb(),rgba(),red,#fff
ctx.stroke() //描边 ctx.stroke(); //描边
//设置比例尺文字样式 //设置比例尺文字样式
ctx.textAlign = "right" ctx.textAlign = "right";
const fontSize = '12' const fontSize = "12";
ctx.font = "normal bold " + fontSize + "px Arial" ctx.font = "normal bold " + fontSize + "px Arial";
ctx.textBaseline = "hanging" ctx.textBaseline = "hanging";
ctx.fillText(DegreesCoverttoDuFenMiao(((extent[3] - extent[1]) / col * i + extent[1]).toString()) + 'N', thematicMapDom.paddingL - 2, i * gridH + thematicMapDom.paddingT + 1) const ftMsg = ((extent[3] - extent[1]) / col) * i + extent[1];
const ftMsgUnit = ftMsg === 0 ? "" : ftMsg > 0 ? "N" : "S";
ctx.fillText(
DegreesCoverttoDuFenMiao(Math.abs(ftMsg).toString()) +
ftMsgUnit,
thematicMapDom.paddingL - 2,
i * gridH + thematicMapDom.paddingT + 1
);
} }
} }
function getcurrentdomwidth(dom) { function getcurrentdomwidth(dom) {
@ -101,22 +127,26 @@ function getcurrentdomwidth(dom) {
const clientHeight = domObj.clientHeight; const clientHeight = domObj.clientHeight;
const offsetWidth = domObj.offsetWidth; const offsetWidth = domObj.offsetWidth;
const offsetHeight = domObj.offsetHeight; const offsetHeight = domObj.offsetHeight;
const clientLeft = parseFloat(getComputedStyle(domObj).getPropertyValue('padding-left')); const clientLeft = parseFloat(getComputedStyle(domObj).getPropertyValue("padding-left"));
const clientTop = parseFloat(getComputedStyle(domObj).getPropertyValue('padding-top')); const clientTop = parseFloat(getComputedStyle(domObj).getPropertyValue("padding-top"));
return { return {
w: clientWidth, w: clientWidth,
h: clientHeight, h: clientHeight,
concentW: offsetWidth, concentW: offsetWidth,
concentH: offsetHeight, concentH: offsetHeight,
paddingL: clientLeft, paddingL: clientLeft,
paddingT: clientTop, paddingT: clientTop
} };
} }
function DegreesCoverttoDuFenMiao(degrees) { function DegreesCoverttoDuFenMiao(degrees) {
let du = degrees.split(".")[0]; let du = degrees.split(".")[0];
let fen = ("0." + degrees.split(".")[1]) * 60 + ''; if (degrees.split(".")[1] !== undefined) {
let miao = (("0." + fen.split(".")[1]) * 60).toFixed(0); const fen = ("0." + degrees.split(".")[1]) * 60 + "";
return du + "°" + fen.split(".")[0] + "" + miao + "″"; const miao = (("0." + fen.split(".")[1]) * 60).toFixed(0);
return du + "°" + fen.split(".")[0] + "" + miao + "″";
} else {
return du + "°";
}
} }
//获取当前日期函数 //获取当前日期函数
export function getNowFormatDate() { export function getNowFormatDate() {
@ -124,5 +154,5 @@ export function getNowFormatDate() {
year = date.getFullYear(), year = date.getFullYear(),
month = date.getMonth() + 1, month = date.getMonth() + 1,
strDate = date.getDate(); strDate = date.getDate();
return `${year}${month}${strDate}` return `${year}${month}${strDate}`;
} }

View File

@ -368,7 +368,8 @@ export default {
productImg: rpm.imgRes.productImg, productImg: rpm.imgRes.productImg,
microwaveDataJson: asmp.microwaveDataJson, microwaveDataJson: asmp.microwaveDataJson,
satellite: asmm.satellite, satellite: asmm.satellite,
load: asmm.load load: asmm.load,
pixelHandleMsg:rpm.pixelHandleMsg
}; };
const pdfName = productTypeMap(self.pdSubType) + "报告"; const pdfName = productTypeMap(self.pdSubType) + "报告";
exportWord( exportWord(

View File

@ -404,6 +404,26 @@ export default {
this.$nextTick(function () { this.$nextTick(function () {
this.screenCapture(this.sampleList, this.geoLayerPos).then(imgRes => { this.screenCapture(this.sampleList, this.geoLayerPos).then(imgRes => {
const rm = res.data; const rm = res.data;
let pixelHandleMsg = null;
if (this.pixelFun !== ""){
switch(this.pixelFun){
case "1":
pixelHandleMsg = "均值法"
break;
case "6":
pixelHandleMsg = "最邻近法"
break;
case "7":
pixelHandleMsg = "克里格法"
break;
case "9":
pixelHandleMsg = "块克里格法"
break;
case "10":
pixelHandleMsg = "MSN法"
break;
}
}
const reportMsg = { const reportMsg = {
pdSubType: this.productSubType, pdSubType: this.productSubType,
reportResult: rm, reportResult: rm,
@ -419,7 +439,8 @@ export default {
token: this.token, token: this.token,
orderMsg: this.orderMsg, orderMsg: this.orderMsg,
productMsg: this.productMsg, productMsg: this.productMsg,
imgRes: imgRes imgRes: imgRes,
pixelHandleMsg:pixelHandleMsg
}; };
localStorage.setItem( localStorage.setItem(
this.configration.path.inspection, this.configration.path.inspection,
@ -430,7 +451,6 @@ export default {
type: "success", type: "success",
}); });
this.checkRealityWait = false; this.checkRealityWait = false;
// console.log(reportMsg, imgRes);
this.$router.push({ name: "报告生成", params: reportMsg }); this.$router.push({ name: "报告生成", params: reportMsg });
}); });
}) })

View File

@ -165,7 +165,7 @@ export default {
// //
// 153079 :153086 153087 152945 // 153079 :153086 153087 152945
this.$router.push("/orderUnprocessed?orderId=153047&token=WEB*1702299264098@DA43_ZZX-yg000087_0149c8db76114f06a91e15707f103a0d"); this.$router.push("/orderUnprocessed?orderId=153883&token=WEB*1715412734577@BYT9_ZZX-gxfw001132_8906acd45c0a45feb0b584207a8f2568");
}, },
}, },
}; };

View File

@ -35,16 +35,16 @@ module.exports = {
} }
}, },
[process.env.VUE_APP_REALITY_API]: { [process.env.VUE_APP_REALITY_API]: {
target: "http://124.16.188.131:28092/microwave", // target: "http://124.16.188.131:28092/microwave",
// target: "http://192.168.8.181:18092/microwave", target: "http://192.168.1.79:18092/microwave",
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
["^" + process.env.VUE_APP_REALITY_API]: "" ["^" + process.env.VUE_APP_REALITY_API]: ""
} }
}, },
[process.env.VUE_APP_FILE_API]: { [process.env.VUE_APP_FILE_API]: {
target: "http://124.16.188.131:28093/file", // target: "http://124.16.188.131:28093/file",
// target: "http://192.168.8.181:18093/file", target: "http://192.168.1.79:18093/file",
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
["^" + process.env.VUE_APP_FILE_API]: "" ["^" + process.env.VUE_APP_FILE_API]: ""