联调初始代码
|
@ -0,0 +1,3 @@
|
|||
> 1%
|
||||
last 2 versions
|
||||
not dead
|
|
@ -0,0 +1,7 @@
|
|||
[*.{js,jsx,ts,tsx,vue}]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = crlf
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
max_line_length = 100
|
|
@ -0,0 +1,9 @@
|
|||
# just a flag
|
||||
ENV = 'development'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = '/dev-api'
|
||||
|
||||
VUE_APP_REALITY_API = '/dev-reality-api'
|
||||
|
||||
VUE_APP_FILE_API = '/dev-file-api'
|
|
@ -0,0 +1,7 @@
|
|||
# just a flag
|
||||
ENV = 'production'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
VUE_APP_REALITY_API = '/prod-reality-api'
|
||||
VUE_APP_FILE_API = '/prod-file-api'
|
|
@ -0,0 +1,11 @@
|
|||
NODE_ENV = production
|
||||
|
||||
# just a flag
|
||||
ENV = 'staging'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = '/stage-api'
|
||||
|
||||
VUE_APP_REALITY_API = '/stage-reality-api'
|
||||
VUE_APP_FILE_API = '/stage-file-api'
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
node: true
|
||||
},
|
||||
'extends': [
|
||||
'plugin:vue/essential',
|
||||
'eslint:recommended'
|
||||
],
|
||||
parserOptions: {
|
||||
parser: 'babel-eslint'
|
||||
},
|
||||
rules: {
|
||||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
*.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
# idea
|
||||
.idea
|
||||
/*.lock
|
|
@ -0,0 +1,24 @@
|
|||
# microwave-project
|
||||
|
||||
# Project setup
|
||||
```
|
||||
yarn install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
yarn serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
yarn build
|
||||
```
|
||||
|
||||
### Lints and fixes files
|
||||
```
|
||||
yarn lint
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
|
@ -0,0 +1,10 @@
|
|||
module.exports = {
|
||||
presets: ['@vue/app'],
|
||||
plugins: [
|
||||
['import', {
|
||||
libraryName: 'vant',
|
||||
libraryDirectory: 'es',
|
||||
style: true,
|
||||
}, 'vant']
|
||||
],
|
||||
};
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "vue-cesium-self",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"start": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"animate.css": "^4.1.1",
|
||||
"axios": "^0.20.0",
|
||||
"babel-plugin-component": "^1.1.1",
|
||||
"babel-plugin-import": "^1.13.1",
|
||||
"cesium": "1.68",
|
||||
"cesium-navigation-es6": "^1.0.9",
|
||||
"core-js": "^3.6.5",
|
||||
"echarts": "^4.9.0",
|
||||
"echarts-stat": "^1.2.0",
|
||||
"element-ui": "^2.15.5",
|
||||
"jquery": "^3.5.1",
|
||||
"js-cookie": "^3.0.1",
|
||||
"jszip": "^3.10.1",
|
||||
"less": "^3.12.2",
|
||||
"less-loader": "^7.0.2",
|
||||
"moment": "^2.29.4",
|
||||
"path-to-regexp": "2.4.0",
|
||||
"terraformer-wkt-parser": "^1.2.1",
|
||||
"vue": "^2.6.11",
|
||||
"vue-pdf": "^4.3.0",
|
||||
"vue-router": "^3.2.0",
|
||||
"vuex": "^3.4.0",
|
||||
"wellknown": "^0.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~4.5.0",
|
||||
"@vue/cli-plugin-eslint": "~4.5.0",
|
||||
"@vue/cli-plugin-router": "~4.5.0",
|
||||
"@vue/cli-plugin-vuex": "~4.5.0",
|
||||
"@vue/cli-service": "~4.5.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"vue-template-compiler": "^2.6.11"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">
|
||||
<link rel="icon" href="static/images/logo.png">
|
||||
<title>微波</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<svg id="add" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="20" height="20" viewBox="0 0 24 24"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
focusable="false"
|
||||
role="none"
|
||||
style="pointer-events: none; display: block;fill:currentColor;color:white">
|
||||
<g>
|
||||
<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 371 B |
|
@ -0,0 +1,10 @@
|
|||
<svg id="ctrlPageScale" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="20" height="20" viewBox="0 0 24 24"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
focusable="false"
|
||||
role="none"
|
||||
style="pointer-events: none; display: block;fill:currentColor;color:white">
|
||||
<g>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 10l3.01-4.5L15 10H9zm0 4h6l-2.99 4.5L9 14zm-6 5.01h18V4.99H3v14.02z"></path>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 532 B |
|
@ -0,0 +1,10 @@
|
|||
<svg id="download" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="20" height="20" viewBox="0 0 24 24"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
focusable="false"
|
||||
role="none"
|
||||
style="pointer-events: none; display: block;fill:currentColor;color:white">
|
||||
<g>
|
||||
<path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"></path>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 382 B |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 12 KiB |
|
@ -0,0 +1,10 @@
|
|||
<svg id="menu" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="24" height="24" viewBox="0 0 24 24"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
focusable="false"
|
||||
role="none"
|
||||
style="pointer-events: none; display: block;fill:currentColor;color:white;text-align: center;">
|
||||
<g>
|
||||
<path d="M2 4h16v2H2zM2 9h16v2H2zM2 14h16v2H2z"></path>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 394 B |
|
@ -0,0 +1,10 @@
|
|||
<svg id="minus" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="20" height="20" viewBox="0 0 24 24"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
focusable="false"
|
||||
role="none"
|
||||
style="pointer-events: none; display: block;fill:currentColor;color:white">
|
||||
<g>
|
||||
<path d="M19 13H5v-2h14v2z"></path>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 355 B |
|
@ -0,0 +1,10 @@
|
|||
<svg id="moreMenu" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="20" height="20" viewBox="0 0 24 24"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
focusable="false"
|
||||
role="none"
|
||||
style="pointer-events: none; display: block;fill:currentColor;color:white">
|
||||
<g>
|
||||
<path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 486 B |
After Width: | Height: | Size: 244 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 148 KiB |
|
@ -0,0 +1,10 @@
|
|||
<svg id="print" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="20" height="20" viewBox="0 0 24 24"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
focusable="false"
|
||||
role="none"
|
||||
style="pointer-events: none; display: block;fill:currentColor;color:white">
|
||||
<g>
|
||||
<path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"></path>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 483 B |
|
@ -0,0 +1,11 @@
|
|||
<svg id="rotate" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="20" height="20" viewBox="0 0 24 24"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
focusable="false"
|
||||
role="none"
|
||||
style="pointer-events: none; display: block;fill:currentColor;color:white">
|
||||
<g>
|
||||
<path d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M7.34 6.41L.86 12.9l6.49 6.48 6.49-6.48-6.5-6.49zM3.69 12.9l3.66-3.66L11 12.9l-3.66 3.66-3.65-3.66zm15.67-6.26C17.61 4.88 15.3 4 13 4V.76L8.76 5 13 9.24V6c1.79 0 3.58.68 4.95 2.05 2.73 2.73 2.73 7.17 0 9.9C16.58 19.32 14.79 20 13 20c-.97 0-1.94-.21-2.84-.61l-1.49 1.49C10.02 21.62 11.51 22 13 22c2.3 0 4.61-.88 6.36-2.64 3.52-3.51 3.52-9.21 0-12.72z"></path>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 740 B |
|
@ -0,0 +1,26 @@
|
|||
<template>
|
||||
<div id="app">
|
||||
<router-view/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
created: function () {
|
||||
// 在页面加载时读取sessionStorage里的状态信息
|
||||
sessionStorage.getItem('umeetCloudVuex') && this.$store.replaceState(Object.assign(this.$store.state, JSON.parse(sessionStorage.getItem('umeetCloudVuex'))));
|
||||
// 在页面刷新时将vuex里的信息保存到sessionStorage里
|
||||
window.addEventListener('beforeunload', () => {
|
||||
sessionStorage.setItem('umeetCloudVuex', JSON.stringify(this.$store.state))
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
html, body, #app{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,17 @@
|
|||
import request from '@/lib/request'
|
||||
|
||||
// 提交审核信息
|
||||
export function orderExamine(data){
|
||||
return request({
|
||||
url:'orderExamine/orderExamineMsg',
|
||||
method:'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
//获取订单审核信息
|
||||
export function getExamineMsg(orderId){
|
||||
return request({
|
||||
url:'orderExamine/getExamineMsg?orderId='+orderId,
|
||||
method:'get'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
import request from "@/lib/request";
|
||||
// 获取待检验产品订单列表
|
||||
export function getOrderListByStatus(data) {
|
||||
return request({
|
||||
url: "orderStatus/getOrderListByStatus",
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
||||
// 获取待检验产品订单列表
|
||||
export function getOrderListOfPending(data) {
|
||||
return request({
|
||||
url: "orderStatus/getOrderListOfPending",
|
||||
method: "post",
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
data
|
||||
});
|
||||
}
|
||||
// 获取待检验产品产品值
|
||||
export function getProductValue(data) {
|
||||
return request({
|
||||
url: "GetValue/GetProductValue",
|
||||
method: "post",
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
data
|
||||
});
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
import request from "@/lib/request";
|
||||
// 添加产品并且进行数据发布
|
||||
export function addProduct(data) {
|
||||
return request({
|
||||
url: "/productUpload/uploadProduct",
|
||||
method: "post",
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
data
|
||||
});
|
||||
}
|
||||
// 添加订单
|
||||
export function getProductList(pscId, userId, page, limit) {
|
||||
return request({
|
||||
url:
|
||||
"productUpload/getProductList?productSubclassId=" +
|
||||
pscId +
|
||||
"&userId=" +
|
||||
userId +
|
||||
"&page=" +
|
||||
page +
|
||||
"&limit=" +
|
||||
limit,
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
// 更新产品的等级与时间
|
||||
export function updateProduct(data) {
|
||||
return request({
|
||||
url: "/productUpload/updateProductMsg",
|
||||
method: "post",
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
data
|
||||
});
|
||||
}
|
||||
// 添加订单
|
||||
export function addOrder(data) {
|
||||
return request({
|
||||
url: "/validationOrder/addOrder",
|
||||
method: "post",
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
data
|
||||
});
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
import request from '@/lib/request'
|
||||
|
||||
// 获取样本数据
|
||||
export function getStarSamples(data){
|
||||
return request({
|
||||
url:'/readExcel/parseExcel',
|
||||
method:'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取lc样本数据
|
||||
export function getLcSamples(data){
|
||||
return request({
|
||||
url:'/mockSample/getLcSample',
|
||||
method:'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取otg样本数据
|
||||
export function getOtgSamples(data){
|
||||
return request({
|
||||
url:'/mockSample/getOtgSample',
|
||||
method:'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取sol样本数据
|
||||
export function getSolSamples(data){
|
||||
return request({
|
||||
url:'/mockSample/getSolSample',
|
||||
method:'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 选中的样本数据入库
|
||||
|
||||
export function insertSampleList(data){
|
||||
return request({
|
||||
url:'/metaDataOrder/insertSampleList',
|
||||
method:'post',
|
||||
headers:{'Content-Type':'multipart/form-data'},
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 地表覆盖类型关联入库
|
||||
export function addCoverType(data){
|
||||
return request({
|
||||
url:'/landCoverType/addCoverType',
|
||||
method:'post',
|
||||
headers:{'Content-Type':'multipart/form-data'},
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 地表覆盖类型关联批量入库
|
||||
export function addCoverTypeBatch(data){
|
||||
return request({
|
||||
url:'/landCoverType/addCoverTypeBatch',
|
||||
method:'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 地表覆盖类型关联入库
|
||||
export function initOrderStage(data){
|
||||
return request({
|
||||
url:'orderStatus/initOrderStage',
|
||||
method:'post',
|
||||
headers:{'Content-Type':'multipart/form-data'},
|
||||
data
|
||||
})
|
||||
}
|
|
@ -0,0 +1,210 @@
|
|||
import request from "@/lib/request";
|
||||
import realityRequest from "@/lib/request-reality";
|
||||
import fileRequest from "@/lib/request-file";
|
||||
|
||||
// 真实性校验方法
|
||||
export function checkReality(data) {
|
||||
return realityRequest({
|
||||
url: "check/reality",
|
||||
method: "post",
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
export function checkTest(data) {
|
||||
return realityRequest({
|
||||
url: "check/my",
|
||||
method: "post",
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 获取元数据信息
|
||||
export function getProductMetaMsg(data) {
|
||||
return realityRequest({
|
||||
url: "common/getMetadataInfo",
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
||||
// 获取待检验产品订单列表
|
||||
export function getPendingList(data) {
|
||||
return request({
|
||||
url: "validationOrder/getPendingList",
|
||||
method: "post",
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
//更新订单信息
|
||||
export function updateOrderMsg(data) {
|
||||
return request({
|
||||
url: "validationOrder/update",
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
||||
// 获取订单信息
|
||||
export function getProductMsg(data) {
|
||||
return request({
|
||||
url: "validationOrder/getOrderMsg",
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
//更新订单编辑状态
|
||||
export function updateOrderStatus(orderId) {
|
||||
return request({
|
||||
url: "/validationOrder/updateTime?id=" + orderId,
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
//更新订单编辑状态
|
||||
export function disOrderStatus(orderId) {
|
||||
return request({
|
||||
url: "/validationOrder/updateByIdTimeNull?id=" + orderId,
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
// 根据抽样算法获取抽样后样本数据
|
||||
export function getSampleData(data) {
|
||||
return realityRequest({
|
||||
url: "sampleGet/getSampleData",
|
||||
method: "post",
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 分层抽样获取样本数据
|
||||
export function getSamplesByLayer(data) {
|
||||
return realityRequest({
|
||||
url: "sampleGet/getSamplesByLayer",
|
||||
method: "post",
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 获取订单关联的所有样本数据
|
||||
export function getOrderSamples(orderId, productType) {
|
||||
return request({
|
||||
url: "metaDataOrder/getOrderSamples?orderId=" + orderId + "&productType=" + productType,
|
||||
method: "post"
|
||||
});
|
||||
}
|
||||
// 根据样本ID删除订单样本数据
|
||||
export function deleteOrderSamplesByID(sampleId, productType) {
|
||||
return request({
|
||||
url:
|
||||
"metaDataOrder/deleteOrderSamplesByID?sampleId=" +
|
||||
sampleId +
|
||||
"&productType=" +
|
||||
productType,
|
||||
method: "post"
|
||||
});
|
||||
}
|
||||
// 抽样后样本数据入库
|
||||
export function addConnectSamples(data) {
|
||||
return request({
|
||||
url: "metaDataOrder/updateConnectSamples",
|
||||
method: "post",
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
data
|
||||
});
|
||||
}
|
||||
// 查询订单关联的地物映射关系
|
||||
export function getCoverTypes(orderId) {
|
||||
return request({
|
||||
url: "landCoverType/getCoverType?orderId=" + orderId,
|
||||
method: "post"
|
||||
});
|
||||
}
|
||||
|
||||
// 地表覆盖类型与空基类型关联
|
||||
export function updateFeature(data) {
|
||||
return request({
|
||||
url: "landCoverType/updateCoverType",
|
||||
method: "post",
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 订单反馈
|
||||
export function orderFeedback(data) {
|
||||
return request({
|
||||
url: "ordersFeedback/orderFeedback",
|
||||
method: "post",
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 订单状态更新
|
||||
export function updateOrderStage(data) {
|
||||
return request({
|
||||
url: "orderStatus/updateOrderStage",
|
||||
method: "post",
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 导出pdf模板
|
||||
export function exportWord(data, pdfName, localTiffPath, httpTiffPath, productType) {
|
||||
return fileRequest({
|
||||
url:
|
||||
"importPDF/importWordAndPDF?reportName=" +
|
||||
pdfName +
|
||||
"&localTiffPath=" +
|
||||
localTiffPath +
|
||||
"&httpTiffPath=" +
|
||||
httpTiffPath +
|
||||
"&productType=" +
|
||||
productType,
|
||||
method: "post",
|
||||
// headers:{'Content-Type':'multipart/form-data'},
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
//下载PDF报告
|
||||
export function downloadPdf(url) {
|
||||
return request({
|
||||
url: url,
|
||||
responseType: "blob",
|
||||
method: "GET"
|
||||
});
|
||||
}
|
||||
|
||||
// 添加报告信息
|
||||
export function addReportMsg(data) {
|
||||
return request({
|
||||
url: "validationReport/addReportMsg",
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
||||
// 查询报告信息
|
||||
export function getReportMsg(orderId) {
|
||||
return request({
|
||||
url: "validationReport/getReportMsg?orderId=" + orderId,
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
//获取订单处理失败的信息
|
||||
export function getFeedbackMsg(orderId) {
|
||||
return request({
|
||||
url: "ordersFeedback/getFeedbackMsg?orderId=" + orderId,
|
||||
method: "get"
|
||||
});
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
import request from '@/lib/request'
|
||||
|
||||
// 用户登录
|
||||
export function login(data){
|
||||
return request({
|
||||
url:'user/login',
|
||||
method:'post',
|
||||
data
|
||||
})
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html,body,#app {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow:hidden;
|
||||
}
|
||||
.cesium-viewer-bottom{
|
||||
display: none !important;
|
||||
}
|
After Width: | Height: | Size: 7.7 KiB |
|
@ -0,0 +1,89 @@
|
|||
<template>
|
||||
<el-breadcrumb class="navbread" separator="/">
|
||||
<transition-group name="breadcrumb">
|
||||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
||||
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span>
|
||||
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
|
||||
</el-breadcrumb-item>
|
||||
</transition-group>
|
||||
</el-breadcrumb>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pathToRegexp from 'path-to-regexp'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
levelList: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route(route) {
|
||||
// if you go to the redirect page, do not update the breadcrumbs
|
||||
if (route.path.startsWith('/redirect/')) {
|
||||
return
|
||||
}
|
||||
this.getBreadcrumb()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getBreadcrumb()
|
||||
},
|
||||
methods: {
|
||||
getBreadcrumb() {
|
||||
// only show routes with meta.title
|
||||
let matched = this.$route.matched.filter(item => item.meta && item.meta.title)
|
||||
const first = matched[0]
|
||||
|
||||
if (!this.isDashboard(first)) {
|
||||
matched = [{ path: '/', meta: { title: '首页' }}].concat(matched)
|
||||
}
|
||||
|
||||
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
|
||||
},
|
||||
isDashboard(route) {
|
||||
const name = route && route.name
|
||||
if (!name) {
|
||||
return false
|
||||
}
|
||||
return name.trim().toLocaleLowerCase() === '首页'.toLocaleLowerCase()
|
||||
},
|
||||
pathCompile(path) {
|
||||
const { params } = this.$route
|
||||
var toPath = pathToRegexp.compile(path)
|
||||
return toPath(params)
|
||||
},
|
||||
handleLink(item) {
|
||||
const { redirect, path } = item
|
||||
if (redirect) {
|
||||
this.$router.push(redirect)
|
||||
return
|
||||
}
|
||||
this.$router.push(this.pathCompile(path))
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang='less'>
|
||||
.app-breadcrumb.el-breadcrumb {
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
line-height: 50px;
|
||||
margin-left: 8px;
|
||||
|
||||
.no-redirect {
|
||||
color: #97a8be;
|
||||
cursor: text;
|
||||
}
|
||||
}
|
||||
// .navbread{
|
||||
// display: inline-block;
|
||||
// vertical-align: top;
|
||||
// font-size: 16px;
|
||||
// // font-weight: 400;
|
||||
// position: relative;
|
||||
// top: 2.5px;
|
||||
// }
|
||||
</style>
|
|
@ -0,0 +1,101 @@
|
|||
<template>
|
||||
<div :class="{'hidden':hidden}" class="pagination-container">
|
||||
<el-pagination
|
||||
:background="background"
|
||||
:current-page.sync="currentPage"
|
||||
:page-size.sync="pageSize"
|
||||
:layout="layout"
|
||||
:page-sizes="pageSizes"
|
||||
:total="total"
|
||||
v-bind="$attrs"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { scrollTo } from '@/lib/scroll-to'
|
||||
|
||||
export default {
|
||||
name: 'Pagination',
|
||||
props: {
|
||||
total: {
|
||||
required: true,
|
||||
type: Number
|
||||
},
|
||||
page: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
limit: {
|
||||
type: Number,
|
||||
default: 20
|
||||
},
|
||||
pageSizes: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [10, 20, 30, 50]
|
||||
}
|
||||
},
|
||||
layout: {
|
||||
type: String,
|
||||
default: 'total, sizes, prev, pager, next, jumper'
|
||||
},
|
||||
background: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
autoScroll: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
hidden: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
currentPage: {
|
||||
get() {
|
||||
return this.page
|
||||
},
|
||||
set(val) {
|
||||
this.$emit('update:page', val)
|
||||
}
|
||||
},
|
||||
pageSize: {
|
||||
get() {
|
||||
return this.limit
|
||||
},
|
||||
set(val) {
|
||||
this.$emit('update:limit', val)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSizeChange(val) {
|
||||
this.$emit('pagination', { page: this.currentPage, limit: val })
|
||||
if (this.autoScroll) {
|
||||
scrollTo(0, 800)
|
||||
}
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.$emit('pagination', { page: val, limit: this.pageSize })
|
||||
if (this.autoScroll) {
|
||||
scrollTo(0, 800)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pagination-container {
|
||||
background: #fff;
|
||||
padding: 16px;
|
||||
}
|
||||
.pagination-container.hidden {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,43 @@
|
|||
<template>
|
||||
<div id="qtReportEchart" ref="chart"></div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "qtReportEchart",
|
||||
props: {},
|
||||
mounted() {
|
||||
this.$nextTick(function() {
|
||||
this.drawPie();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
drawPie() {
|
||||
let myCharts = this.$echarts.init(this.$refs.chart);
|
||||
let option = {
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: [820, 932, 901, 934, 1290, 1330, 1320]
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: [820, 932, 901, 934, 1290, 1330, 1320],
|
||||
type: 'line',
|
||||
smooth: true
|
||||
}
|
||||
]
|
||||
};
|
||||
option &&myCharts.setOption(option);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
#qtReportEchart {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,61 @@
|
|||
<template>
|
||||
<div id="rtReportEcharts" ref="chart"></div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "rtReportEcharts",
|
||||
props: {},
|
||||
mounted() {
|
||||
this.$nextTick(function() {
|
||||
this.drawPie();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
drawPie() {
|
||||
let myCharts = this.$echarts.init(this.$refs.chart);
|
||||
let option = {
|
||||
xAxis: {},
|
||||
yAxis: {},
|
||||
series: [
|
||||
{
|
||||
symbolSize: 20,
|
||||
data: [
|
||||
[10.0, 8.04],
|
||||
[8.07, 6.95],
|
||||
[13.0, 7.58],
|
||||
[9.05, 8.81],
|
||||
[11.0, 8.33],
|
||||
[14.0, 7.66],
|
||||
[13.4, 6.81],
|
||||
[10.0, 6.33],
|
||||
[14.0, 8.96],
|
||||
[12.5, 6.82],
|
||||
[9.15, 7.2],
|
||||
[11.5, 7.2],
|
||||
[3.03, 4.23],
|
||||
[12.2, 7.83],
|
||||
[2.02, 4.47],
|
||||
[1.05, 3.33],
|
||||
[4.05, 4.96],
|
||||
[6.03, 7.24],
|
||||
[12.0, 6.26],
|
||||
[12.0, 8.84],
|
||||
[7.08, 5.82],
|
||||
[5.02, 5.68]
|
||||
],
|
||||
type: 'scatter'
|
||||
}
|
||||
]
|
||||
};
|
||||
option &&myCharts.setOption(option);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
#rtReportEcharts {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,37 @@
|
|||
<template>
|
||||
<div class="header">
|
||||
<img src="/static/images/header.png" alt="#" style="height: 50px; margin-top: 5px" />
|
||||
<i class="el-icon-user-solid userName">
|
||||
<span>{{ userName }}</span>
|
||||
</i>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods: {},
|
||||
computed: {
|
||||
userName: function() {
|
||||
return localStorage.getItem("userName");
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.header {
|
||||
background: white;
|
||||
height: 60px;
|
||||
}
|
||||
.userName {
|
||||
font-size: 20px;
|
||||
color: #354595;
|
||||
float: right;
|
||||
margin-top: 30px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.userName span {
|
||||
color: #000;
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,52 @@
|
|||
<template>
|
||||
<div class="iconbox" @click="daichuli" title="登录">
|
||||
<div><span class="yuan"></span><span class="box"></span></div>
|
||||
<div><span class="yuan"></span><span class="box"></span></div>
|
||||
<div><span class="yuan"></span><span class="box"></span></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "iconBox",
|
||||
components: {},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {
|
||||
daichuli() {
|
||||
this.$router.push({ path: this.configration.path.login, query: {} });
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang='less'>
|
||||
.iconbox {
|
||||
/* width: 80px; */
|
||||
position: absolute;
|
||||
left: 3px;
|
||||
top: 70px;
|
||||
background-color: transparent;
|
||||
z-index: 1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.iconbox div {
|
||||
height: 10px;
|
||||
}
|
||||
.yuan {
|
||||
display: inline-block;
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
background-color: white;
|
||||
border-radius: 50%;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.box {
|
||||
height: 5px;
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
background-color: white;
|
||||
margin-left: 3px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,340 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
class="demo-form-inline"
|
||||
style="padding: 20px 0 0 30px; text-algin: center"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="提交日期">
|
||||
<el-date-picker
|
||||
v-model="searchForm.submitDate"
|
||||
type="datetimerange"
|
||||
range-separator="~"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
popper-class="date-style"
|
||||
value-format=" yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="卫星类型">
|
||||
<el-select
|
||||
v-model="searchForm.satellite"
|
||||
placeholder="请选择卫星"
|
||||
@change="bindLoad"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in stlOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="载荷选择">
|
||||
<el-select v-model="searchForm.load" placeholder="全部">
|
||||
<el-option
|
||||
v-for="item in loadOpt"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产品大类">
|
||||
<el-select
|
||||
v-model="searchForm.category"
|
||||
placeholder="全部"
|
||||
@change="getCategory($event)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in cgOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产品小类">
|
||||
<el-select v-model="searchForm.cldCategory" placeholder="全部">
|
||||
<el-option
|
||||
v-for="item in cldcgOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="检验类型">
|
||||
<el-select v-model="searchForm.checkoutFun" placeholder="全部">
|
||||
<el-option
|
||||
v-for="item in ckfOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="订单编号">
|
||||
<el-input v-model="searchForm.orderCode"> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="extSearch">
|
||||
<el-form-item label="订单状态">
|
||||
<el-select
|
||||
v-model="searchForm.extOption"
|
||||
placeholder="全部"
|
||||
ref="test11"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in extOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="submitSearch">
|
||||
<el-button type="primary" @click="search">查询</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
let categorySele = [
|
||||
{ value: "", label: "" },
|
||||
{ value: 1, label: "几何产品" },
|
||||
{ value: 2, label: "辐射产品" },
|
||||
{ value: 3, label: "陆表产品" },
|
||||
{ value: 4, label: "植被产品" },
|
||||
];
|
||||
let allCategory = [
|
||||
{ pro: 1, label: "", value: "" },
|
||||
{ pro: 2, label: "", value: "" },
|
||||
{ pro: 3, label: "", value: "" },
|
||||
{ pro: 4, label: "", value: "" },
|
||||
{ pro: 1, label: "正射校正", value: 1 },
|
||||
{ pro: 1, label: "高程产品", value: 2 },
|
||||
{ pro: 2, label: "后向散射系数", value: 3 },
|
||||
{ pro: 2, label: "大气延迟校正", value: 4 },
|
||||
{ pro: 3, label: "地表粗糙度", value: 9 },
|
||||
{ pro: 3, label: "地表覆盖类型", value: 6 },
|
||||
{ pro: 3, label: "土壤水分", value: 7 },
|
||||
{ pro: 3, label: "地表盐碱度", value: 8 },
|
||||
{ pro: 3, label: "干涉测量形变产品", value: 5 },
|
||||
{ pro: 4, label: "植被高度", value: 10 },
|
||||
{ pro: 4, label: "叶面积指数", value: 11 },
|
||||
{ pro: 4, label: "植被物候", value: 12 },
|
||||
];
|
||||
export default {
|
||||
props: {
|
||||
getOrderList: {
|
||||
type: Function,
|
||||
default: null,
|
||||
},
|
||||
extSearch: {},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
|
||||
searchForm: {
|
||||
submitDate: "",
|
||||
satellite: "",
|
||||
load: "",
|
||||
category: "",
|
||||
cldCategory: "",
|
||||
checkoutFun: "",
|
||||
orderCode: "",
|
||||
extOption: "",
|
||||
},
|
||||
stlOptions: [
|
||||
{
|
||||
value: "",
|
||||
label: "",
|
||||
},
|
||||
{
|
||||
value: "1米C-SAR卫星",
|
||||
label: "1米C-SAR卫星",
|
||||
},
|
||||
{
|
||||
value: "3米L-SAR卫星",
|
||||
label: "3米L-SAR卫星",
|
||||
},
|
||||
{
|
||||
value: "5米S-SAR卫星",
|
||||
label: "5米S-SAR卫星",
|
||||
},
|
||||
{
|
||||
value: "高轨20米SAR卫星",
|
||||
label: "高轨20米SAR卫星",
|
||||
},
|
||||
],
|
||||
loadOptions: [
|
||||
{
|
||||
value: "",
|
||||
label: "",
|
||||
},
|
||||
{
|
||||
value: "1米C-SAR",
|
||||
label: "1米C-SAR",
|
||||
},
|
||||
{
|
||||
value: "3米L-SAR",
|
||||
label: "3米L-SAR",
|
||||
},
|
||||
{
|
||||
value: "5米S-SAR",
|
||||
label: "5米S-SAR",
|
||||
},
|
||||
{
|
||||
value: "高轨20米SAR",
|
||||
label: "高轨20米SAR",
|
||||
},
|
||||
],
|
||||
loadOpt: [],
|
||||
cgOptions: categorySele,
|
||||
cldcgOptions: [],
|
||||
ckfOptions: [
|
||||
{
|
||||
value: "",
|
||||
label: "",
|
||||
},
|
||||
{
|
||||
value: "directChk",
|
||||
label: "直接检验",
|
||||
},
|
||||
],
|
||||
extOptions: [
|
||||
{ value: "", label: "" },
|
||||
{ value: "2", label: "处理成功" },
|
||||
{ value: "3", label: "处理失败" },
|
||||
{ value: "6", label: "审核通过" },
|
||||
{ value: "7", label: "审核未通过" },
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 根据卫星选择载荷
|
||||
bindLoad(val) {
|
||||
const item = this.loadOptions.filter(
|
||||
(item) => item.value + "卫星" === val
|
||||
);
|
||||
if (item && item.length > 0) {
|
||||
this.loadOpt = item;
|
||||
this.searchForm.load = item[0].value;
|
||||
} else {
|
||||
this.loadOpt = [];
|
||||
this.searchForm.load = "";
|
||||
}
|
||||
},
|
||||
// 获取产品分类
|
||||
getCategory(prov) {
|
||||
this.searchForm.cldCategory = "";
|
||||
let roles = [];
|
||||
this.cldcgOptions = [];
|
||||
this.cldCategory = "";
|
||||
for (var val of allCategory) {
|
||||
if (prov === val.pro) {
|
||||
roles.push({ label: val.label, value: val.value });
|
||||
}
|
||||
}
|
||||
this.cldcgOptions = roles;
|
||||
this.cldCategory = this.cldcgOptions[0].value;
|
||||
},
|
||||
//表格查询功能
|
||||
search() {
|
||||
//按下查询按钮则搜索结果从第一页显示
|
||||
this.$emit("initPage");
|
||||
if (this.getOrderList) {
|
||||
this.getOrderList();
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
/deep/.el-date-editor--datetimerange.el-input,
|
||||
.el-date-editor--datetimerange.el-input__inner {
|
||||
width: 270px;
|
||||
height: 35px;
|
||||
line-height: 30px;
|
||||
}
|
||||
/deep/.el-range-editor.el-input__inner {
|
||||
padding: 1px 10px;
|
||||
}
|
||||
/deep/ .el-input {
|
||||
width: 270px;
|
||||
}
|
||||
.submitSearch {
|
||||
text-align: center;
|
||||
}
|
||||
/deep/.submitSearch .el-button--primary {
|
||||
width: 160px;
|
||||
height: 35px;
|
||||
// margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
/deep/.el-button {
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
// /deep/.date-style .el-date-picker {
|
||||
// width: 190px !important;
|
||||
// height: 235px !important;
|
||||
|
||||
// // .el-picker-panel {
|
||||
// line-height: 0px;
|
||||
// // }
|
||||
// .el-picker-panel__content {
|
||||
// width: 155px !important;
|
||||
// height: 180px !important;
|
||||
// }
|
||||
// table {
|
||||
// font-size: 11px;
|
||||
// }
|
||||
// .el-date-picker__header {
|
||||
// margin: 5px;
|
||||
// }
|
||||
// .el-date-picker__header-label {
|
||||
// font-size: 11px;
|
||||
// }
|
||||
// .el-date-picker__header el-date-picker__header-label {
|
||||
// font-size: 11px;
|
||||
// }
|
||||
// .el-date-table td, .el-date-table td div {
|
||||
// height: 22px;
|
||||
// }
|
||||
// .el-month-table td .cell,
|
||||
// .el-year-table td .cell,
|
||||
// .el-date-table td .cell {
|
||||
// width: 100%;
|
||||
// }
|
||||
// }
|
||||
</style>
|
|
@ -0,0 +1,55 @@
|
|||
<template>
|
||||
<div class="info">
|
||||
<div class="box">
|
||||
<el-checkbox
|
||||
v-model="prodChecked"
|
||||
@change="prodCheckChanged"
|
||||
class="checkbox"
|
||||
>待检验产品</el-checkbox
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "otgProductInfo",
|
||||
data() {
|
||||
return {
|
||||
prodChecked: true,
|
||||
sampleChecked: true,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
prodCheckChanged() {
|
||||
if (this.prodChecked) {
|
||||
this.$emit("addLayer");
|
||||
} else {
|
||||
this.$emit("removeLayer");
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.info {
|
||||
position: absolute;
|
||||
/* left: 10px; */
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
background-color: transparent;
|
||||
z-index: 2;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.iconbox div {
|
||||
border-radius: 5px;
|
||||
}
|
||||
.box {
|
||||
background-color: white;
|
||||
margin-left: 3px;
|
||||
border-radius: 5px;
|
||||
align-items: center;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,330 @@
|
|||
<template>
|
||||
<div class="pdfLoad">
|
||||
<div class="pdfCtrl">
|
||||
<div class="ctrlStart">
|
||||
<!-- 缩略图菜单按钮 -->
|
||||
<!-- <div class="viewMenu"></div> -->
|
||||
<span class="pdfName">{{pdfName}}</span>
|
||||
</div>
|
||||
<div class="ctrlCenter">
|
||||
<div class="pageCtrl" >
|
||||
<div class="pageNum">
|
||||
<el-input v-model="changePageNum" @change="changePage"></el-input>
|
||||
</div>
|
||||
<span style="margin:0 5px 0 5px">/</span>
|
||||
<span>{{pageTotalNum}}</span>
|
||||
</div>
|
||||
<span class="halvingLine">|</span>
|
||||
<div class="changeScale">
|
||||
<div class="minus" @click="scaleSmall"></div>
|
||||
<div class="csVal">
|
||||
<el-input v-model="changeScaleVal"></el-input>
|
||||
</div>
|
||||
<div class="add" @click="scaleBig"></div>
|
||||
</div>
|
||||
<span class="halvingLine">|</span>
|
||||
<div class="ctrlStyle">
|
||||
<!-- 缩放适应宽度按钮 -->
|
||||
<!-- <div class="ctrlPageScale"></div> -->
|
||||
<div class="rotate" @click="counterClock"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ctrlEnd">
|
||||
<!-- <div class="ctrlEndMenu moreMenu"></div> -->
|
||||
<div class="ctrlEndMenu print" @click="pdfPrintAll"></div>
|
||||
<div class="ctrlEndMenu download" @click="pdfDownload"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pdfDom">
|
||||
<pdf
|
||||
ref="pdf"
|
||||
:src="pdfUrl"
|
||||
:page="pageNum"
|
||||
:rotate="pageRotate"
|
||||
@progress="loadedRatio = $event"
|
||||
@page-loaded="pageLoaded($event)"
|
||||
@num-pages="pageTotalNum=$event"
|
||||
@error="pdfError($event)"
|
||||
@link-clicked="page = $event"
|
||||
></pdf>
|
||||
<!-- <pdf v-for="i in numPages" :key="i" :src="pdfsrc" :page="i"></pdf> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import pdf from 'vue-pdf'
|
||||
export default {
|
||||
components: {
|
||||
pdf
|
||||
},
|
||||
mounted() {
|
||||
// this.getNumPages(this.pdfUrl)
|
||||
},
|
||||
props:{
|
||||
pdfPath:{
|
||||
require:true
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
pdfName:'DBFGLX_202108051103.pdf',
|
||||
pdfUrl:'static/data/DBTRSF_202110201117536410.pdf',
|
||||
pageNum: 1,
|
||||
pageTotalNum: 1,
|
||||
changePageNum:1,
|
||||
pageRotate: 0,
|
||||
// 加载进度
|
||||
loadedRatio: 0,
|
||||
curPageNum: 0,
|
||||
numPages:1,
|
||||
changeScaleVal:"100%",
|
||||
// pdfsrc:'',
|
||||
pdfScale:100
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.init();
|
||||
},
|
||||
methods:{
|
||||
init(){
|
||||
const pos = this.pdfPath.lastIndexOf("/");
|
||||
this.pdfName = this.pdfPath.substr(pos+1)
|
||||
// this.pdfUrl = 'http://10.0.35.70:8085/microwaveData/pdf/'+this.pdfName;
|
||||
this.pdfUrl = this.configration.urlprefix.pdfUrlPrefix+this.pdfName;
|
||||
},
|
||||
getNumPages(url) {
|
||||
var loadingTask = pdf.createLoadingTask(url)
|
||||
loadingTask.promise.then(pdf =>{
|
||||
this.pdfsrc = loadingTask
|
||||
this.numPages = pdf.numPages
|
||||
this.pageTotalNum = pdf.numPages
|
||||
}).catch((err) => {
|
||||
console.error('pdf加载失败')
|
||||
})
|
||||
|
||||
},
|
||||
// 上一页函数
|
||||
prePage() {
|
||||
var page = this.pageNum
|
||||
page = page > 1 ? page - 1 : this.pageTotalNum
|
||||
this.pageNum = page
|
||||
},
|
||||
nextPage() {
|
||||
var page = this.pageNum
|
||||
page = page < this.pageTotalNum ? page + 1 : 1
|
||||
this.pageNum = page
|
||||
},
|
||||
changePage(){
|
||||
if(this.changePageNum <= 0 || this.changePageNum > this.pageTotalNum)return;
|
||||
var page = Number(this.changePageNum)
|
||||
this.pageNum = page
|
||||
},
|
||||
// 页面逆时针翻转90度。
|
||||
counterClock() {
|
||||
this.pageRotate -= 90
|
||||
},
|
||||
// 页面加载回调函数,其中e为当前页数
|
||||
pageLoaded(e) {
|
||||
this.curPageNum = e
|
||||
},
|
||||
// 其他的一些回调函数。
|
||||
pdfError(error) {
|
||||
console.error(error)
|
||||
},
|
||||
scaleBig() {
|
||||
this.pdfScale += 5;
|
||||
this.$refs.pdf.$el.style.width = parseInt(this.pdfScale) + "%";
|
||||
this.changeScaleVal = parseInt(this.pdfScale) + "%"
|
||||
},
|
||||
scaleSmall() {
|
||||
this.pdfScale += -5;
|
||||
this.$refs.pdf.$el.style.width = parseInt(this.pdfScale) + "%";
|
||||
this.changeScaleVal = parseInt(this.pdfScale) + "%"
|
||||
},
|
||||
//下载PDF
|
||||
pdfDownload () {
|
||||
var url = this.pdfUrl
|
||||
var tempLink = document.createElement('a')
|
||||
tempLink.style.display = 'none'
|
||||
tempLink.href = url
|
||||
tempLink.setAttribute('download', 'my.pdf')
|
||||
if (typeof tempLink.download === 'undefined') {
|
||||
tempLink.setAttribute('target', '_blank')
|
||||
}
|
||||
document.body.appendChild(tempLink)
|
||||
tempLink.click()
|
||||
document.body.removeChild(tempLink)
|
||||
},
|
||||
pdfPrintAll() {
|
||||
this.$refs.pdf.print()
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.padLoad{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.pdfCtrl{
|
||||
// width: 100%;
|
||||
height: 56px;
|
||||
background-color: rgb(50,54,57);
|
||||
color: white;
|
||||
// padding: 0 16px;
|
||||
font-size: 15px;
|
||||
}
|
||||
.ctrlStart {
|
||||
width: 25%;
|
||||
height: 100%;
|
||||
float: left;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
padding-inline-end: 20px;
|
||||
vertical-align: middle;
|
||||
.viewMenu{
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin:3px 0 0 3px;
|
||||
background-image: url(/static/images/menu.svg);
|
||||
cursor: pointer;
|
||||
}
|
||||
.pdfName {
|
||||
font-size: 0.87rem;
|
||||
font-weight: 500;
|
||||
margin-inline-start: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: gray;
|
||||
}
|
||||
}
|
||||
|
||||
.ctrlCenter{
|
||||
width: 50%;
|
||||
float: left;
|
||||
height: inherit;
|
||||
line-height: 56px;
|
||||
text-align: center;
|
||||
.pageCtrl{
|
||||
float: left;
|
||||
display: flex;
|
||||
}
|
||||
.changeScale{
|
||||
float: left;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
vertical-align: middle;
|
||||
.minus{
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-image: url(/static/images/minus.svg);
|
||||
cursor: pointer;
|
||||
}
|
||||
.csVal{
|
||||
margin: 0 4px 0 6px;
|
||||
}
|
||||
.add{
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-image: url(/static/images/add.svg);
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.ctrlStyle{
|
||||
// width: calc(35% - 21px);
|
||||
height: inherit;
|
||||
float: left;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
vertical-align: middle;
|
||||
.ctrlPageScale{
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 0 10px 0 10px;
|
||||
background-image: url(/static/images/ctrlPageScale.svg);
|
||||
cursor: pointer;
|
||||
}
|
||||
.rotate{
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-image: url(/static/images/rotate.svg);
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
/deep/.csVal .el-input__inner {
|
||||
background-color: #0e0e0e;
|
||||
border-radius: 1px;
|
||||
border: 1px solid rgb(50,54,57);
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
padding: 0;
|
||||
width: 50px;
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
/deep/.pageNum .el-input__inner {
|
||||
-webkit-appearance: none;
|
||||
background-color: #0e0e0e;
|
||||
background-image: none;
|
||||
border-radius: 1px;
|
||||
border: 1px solid rgb(50,54,57);
|
||||
box-sizing: border-box;
|
||||
font-size: inherit;
|
||||
height: 26px;
|
||||
line-height: 17px;
|
||||
outline: 0;
|
||||
padding: 0;
|
||||
transition: border-color .2s cubic-bezier(.645,.045,.355,1);
|
||||
width: 22px;
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
.ctrlEnd{
|
||||
padding-inline-end: 20px;
|
||||
// width: calc(25% - 40px);
|
||||
height: inherit;
|
||||
float: right;
|
||||
line-height: 56px;
|
||||
text-align: end;
|
||||
i{
|
||||
margin: 0 6px 0 6px;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
// 分割线
|
||||
.halvingLine{
|
||||
float:left;
|
||||
margin: 0 10px 0 10px;
|
||||
color: #c1bdbd;
|
||||
width: 3px;
|
||||
}
|
||||
|
||||
.ctrlEndMenu{
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
float: right;
|
||||
margin: 18px 0 0 6px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.download{
|
||||
background-image: url(/static/images/download.svg);
|
||||
}
|
||||
.print{
|
||||
background-image: url(/static/images/print.svg);
|
||||
}
|
||||
.moreMenu{
|
||||
background-image: url(/static/images/moreMenu.svg);
|
||||
}
|
||||
.pdfDom{
|
||||
width: inherit;
|
||||
height: 883px;
|
||||
background-color: white;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
overflow-x: auto;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,73 @@
|
|||
<template>
|
||||
<div class="info">
|
||||
<div class="box">
|
||||
<el-checkbox
|
||||
v-model="prodChecked"
|
||||
@change="prodCheckChanged"
|
||||
class="checkbox"
|
||||
>待检验产品</el-checkbox
|
||||
>
|
||||
<el-checkbox
|
||||
v-model="sampleChecked"
|
||||
@change="sampleCheckChanged"
|
||||
class="checkbox"
|
||||
>样本点</el-checkbox
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "productInfo",
|
||||
data() {
|
||||
return {
|
||||
prodChecked: true,
|
||||
sampleChecked: true,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
prodCheckChanged() {
|
||||
if (this.prodChecked) {
|
||||
this.$emit("addLayer");
|
||||
} else {
|
||||
this.$emit("removeLayer");
|
||||
}
|
||||
},
|
||||
sampleCheckChanged() {
|
||||
if (this.sampleChecked) {
|
||||
this.$emit("addSample");
|
||||
} else {
|
||||
this.$emit("removeSample");
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.info {
|
||||
margin-left: 10px;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
left: 30px;
|
||||
top: 30px;
|
||||
background-color: transparent;
|
||||
z-index: 999;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.iconbox div {
|
||||
width: 160px;
|
||||
height: 75px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.box {
|
||||
height: 55px;
|
||||
width: 160px;
|
||||
background-color: white;
|
||||
margin-left: 3px;
|
||||
border-radius: 5px;
|
||||
align-items: center;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,253 @@
|
|||
<template>
|
||||
<div class="qtReport">
|
||||
<div class="realResult">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span><span class="sp2">真实性检验结果</span>
|
||||
</div>
|
||||
<div class="resContent">
|
||||
<div>
|
||||
<el-tabs v-model="activeTabs">
|
||||
<el-tab-pane label="误差矩阵" name="pixel">
|
||||
<ReportTable
|
||||
:errorMatrix="errorMatrix"
|
||||
activeTabs="pixel"
|
||||
></ReportTable>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="百分比(%)" name="percentage">
|
||||
<ReportTable
|
||||
:errorMatrix="errorMatrix"
|
||||
activeTabs="percentage"
|
||||
></ReportTable>
|
||||
</el-tab-pane> -->
|
||||
<!-- <el-tab-pane label="精度评价" name="preEval">
|
||||
<ReportTable :errorMatrix="errorMatrix" activeTabs="preEval"></ReportTable>
|
||||
</el-tab-pane> -->
|
||||
<el-tab-pane label="用户精度" name="userPre">
|
||||
<ReportTable
|
||||
:errorMatrix="errorMatrix"
|
||||
:preResults="preResults['用户精度']"
|
||||
activeTabs="userPre"
|
||||
></ReportTable>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="生产者精度" name="producerPre">
|
||||
<ReportTable
|
||||
:errorMatrix="errorMatrix"
|
||||
:preResults="preResults['生产者精度']"
|
||||
activeTabs="producerPre"
|
||||
></ReportTable>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="错分精度" name="errorPre">
|
||||
<ReportTable
|
||||
:errorMatrix="errorMatrix"
|
||||
:preResults="preResults['错分误差']"
|
||||
activeTabs="errorPre"
|
||||
></ReportTable>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="漏分精度" name="LeakagePre">
|
||||
<ReportTable
|
||||
:errorMatrix="errorMatrix"
|
||||
:preResults="preResults['漏分误差']"
|
||||
activeTabs="LeakagePre"
|
||||
></ReportTable>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="groudCoverType">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span
|
||||
><span class="sp2">{{ pdSubTypeName }}误差结果图</span>
|
||||
</div>
|
||||
<div class="gctContent">
|
||||
<div id="qtReportEchart" ref="chart"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ReportTable from "@/components/reportTable";
|
||||
import { productTypeMap } from "@/lib/variateMap";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ReportTable,
|
||||
},
|
||||
props: {
|
||||
realRes: {
|
||||
require: true,
|
||||
},
|
||||
pdSubType: {
|
||||
require: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeTabs: "pixel",
|
||||
pdSubTypeName: null,
|
||||
myCharts: null,
|
||||
errorMatrix: null,
|
||||
preResults: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.initParam();
|
||||
},
|
||||
mounted() {
|
||||
this.myCharts = this.$echarts.init(this.$refs.chart);
|
||||
if (this.realRes.rocCoordinateValues !== undefined)
|
||||
this.drawPie(this.realRes.rocCoordinateValues);
|
||||
},
|
||||
methods: {
|
||||
initParam() {
|
||||
if (this.realRes !== undefined) {
|
||||
this.pdSubTypeName = productTypeMap(this.pdSubType);
|
||||
this.errorMatrix = this.realRes.report["" + 8 + ""]
|
||||
? this.realRes.report["" + 8 + ""]
|
||||
: [];
|
||||
this.preResults = this.realRes.results ? this.realRes.results : {};
|
||||
}
|
||||
},
|
||||
drawPie(rocVal) {
|
||||
let allData = [];
|
||||
for (let i in rocVal) {
|
||||
let ad = [];
|
||||
ad.push(
|
||||
parseFloat(rocVal[i].cre_falseAlarmX.toFixed(3)),
|
||||
parseFloat(rocVal[i].cre_reCallY.toFixed(3))
|
||||
);
|
||||
allData.push(ad);
|
||||
}
|
||||
let option = {
|
||||
animation: false,
|
||||
tooltip: {
|
||||
formatter: "({c})",
|
||||
},
|
||||
xAxis: {
|
||||
name: "漏分精度",
|
||||
nameLocation: "middle",
|
||||
nameTextStyle: {
|
||||
lineHeight: 30,
|
||||
height: 60,
|
||||
fontWeight: "bold",
|
||||
},
|
||||
min: 0,
|
||||
max: 1,
|
||||
axisLabel: {
|
||||
formatter: function (value) {
|
||||
return Number(value).toFixed(1);
|
||||
},
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
name: "用户精度",
|
||||
nameTextStyle: {
|
||||
lineHeight: 30,
|
||||
height: 60,
|
||||
fontWeight: "bold",
|
||||
},
|
||||
min: 0,
|
||||
max: 1,
|
||||
axisLabel: {
|
||||
formatter: function (value) {
|
||||
return Number(value).toFixed(1);
|
||||
},
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
symbolSize: 10,
|
||||
data: allData,
|
||||
type: "scatter",
|
||||
},
|
||||
],
|
||||
};
|
||||
option && this.myCharts.setOption(option);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.qtReport {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.realResult {
|
||||
width: 100%;
|
||||
height: calc(55% - 5px);
|
||||
background-color: white;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.groudCoverType {
|
||||
width: 100%;
|
||||
height: 45%;
|
||||
background-color: white;
|
||||
}
|
||||
.resContent {
|
||||
// border: 1px black solid;
|
||||
height: calc(100% - 60px);
|
||||
width: calc(100% - 20px);
|
||||
margin: 10px;
|
||||
font-size: 20px;
|
||||
overflow-y: scroll;
|
||||
.rptitle {
|
||||
display: block;
|
||||
float: left;
|
||||
font-size: 16px;
|
||||
span {
|
||||
color: #354595;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.sampling {
|
||||
width: calc(40% - 6px);
|
||||
text-align: start;
|
||||
margin-left: 6px;
|
||||
}
|
||||
.pixelDeal {
|
||||
width: calc(60% - 6px);
|
||||
text-align: end;
|
||||
margin-right: 6px;
|
||||
}
|
||||
}
|
||||
/deep/.resContent .el-tabs__header {
|
||||
margin: 0;
|
||||
}
|
||||
/deep/.resContent .el-tabs__item {
|
||||
padding: 0 13px;
|
||||
}
|
||||
.gctContent {
|
||||
border: 1px black solid;
|
||||
height: calc(100% - 60px);
|
||||
width: calc(100% - 20px);
|
||||
margin: 10px;
|
||||
}
|
||||
#qtReportEchart {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.box1 {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid rgb(205, 205, 205, 0.5);
|
||||
}
|
||||
.sp1 {
|
||||
display: inline-block;
|
||||
width: 7px;
|
||||
height: 26px;
|
||||
background-color: #354595;
|
||||
vertical-align: top;
|
||||
margin-left: 20px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.sp2 {
|
||||
margin-left: 10px;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #354595;
|
||||
vertical-align: top;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,671 @@
|
|||
<template>
|
||||
<div class="soilMositure">
|
||||
<div class="otgCard">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span><span class="sp2">样本库</span>
|
||||
</div>
|
||||
<div class="otgCardContent">
|
||||
<el-form :inline="true" :model="simpleForm" class="demo-form-inline">
|
||||
<el-form-item style="margin-left: 15px">
|
||||
<!-- <el-select
|
||||
v-model="simpleForm.sampleFun"
|
||||
:disabled="sampleFun !== ''"
|
||||
size="mini"
|
||||
placeholder="请选择抽样方法"
|
||||
@change="changeSampleFun"
|
||||
>
|
||||
<el-option label="" value=""></el-option>
|
||||
<el-option label="随机抽样" value="0"></el-option>
|
||||
<el-option label="分层抽样" value="1"></el-option>
|
||||
<el-option label="等距抽样" value="2"></el-option>
|
||||
</el-select> -->
|
||||
<el-cascader
|
||||
v-model="simpleForm.sampleFun"
|
||||
:disabled="sampleFun !== ''"
|
||||
:options="funcOpt"
|
||||
size="mini"
|
||||
placeholder="请选择抽样方法"
|
||||
popper-class="cascader-popper"
|
||||
@change="changeSampleFun"
|
||||
clearable
|
||||
:show-all-levels="false"
|
||||
></el-cascader>
|
||||
<el-button
|
||||
v-if="isDeepSpace"
|
||||
class="edit-btn"
|
||||
plain
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit-outline"
|
||||
@click="editDeepSpace"
|
||||
></el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input
|
||||
v-model="simpleForm.sampleNum"
|
||||
size="mini"
|
||||
placeholder="请输入样本个数"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="samplesCk">确定</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
v-loading="loading"
|
||||
element-loading-text="拼命加载中"
|
||||
element-loading-spinner="el-icon-loading"
|
||||
element-loading-background="rgba(0, 0, 0, 0.8)"
|
||||
:data="simpleData"
|
||||
tooltip-effect="dark"
|
||||
:header-cell-style="headerRowClass"
|
||||
style="width: 98%; margin-left: 1%; margin-top: 15px"
|
||||
highlight-current-row
|
||||
@current-change="tableRowClk"
|
||||
:stripe="true"
|
||||
:cell-style="tableRowClassName"
|
||||
height="370"
|
||||
>
|
||||
<el-table-column label width="35">
|
||||
<template slot-scope="scope">
|
||||
<el-radio :label="scope.row" v-model="radioClkMsg"></el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="序号" type="index" width="70">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="sampleId"
|
||||
label="样本编号"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="纬度(°)" sortable show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.lat.toFixed(8)
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="经度(°)" sortable>
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.lon.toFixed(8)
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="高程" sortable prop="alt"></el-table-column> -->
|
||||
<el-table-column
|
||||
label="采样时间"
|
||||
sortable
|
||||
prop="dataTime"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="选取点纬度" prop="sameLat"></el-table-column>
|
||||
<el-table-column label="选取点经度" prop="sameLon"></el-table-column>
|
||||
<!-- <el-table-column label="选取点高度" prop="sameAlt"></el-table-column> -->
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope"
|
||||
><i
|
||||
class="el-icon-delete"
|
||||
@click="deleteSelected(scope.$index, simpleData)"
|
||||
></i
|
||||
></template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <Pagination :page-sizes="[13, 26, 39]" v-show="total>0" :total="total" :page.sync="simpleForm.pageNum" :limit.sync="simpleForm.pageSize" @pagination="getSimpleList" /> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="sceneShow">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span><span class="sp2">同名点选取</span>
|
||||
</div>
|
||||
<div class="sscPre">
|
||||
<div class="sscTitle">
|
||||
<div class="sscCircle"></div>
|
||||
<span>产品展示</span>
|
||||
</div>
|
||||
<div class="sscTitle">
|
||||
<div class="sscCircle"></div>
|
||||
<span>局部放大图</span>
|
||||
</div>
|
||||
<div class="sscTitle">
|
||||
<div class="sscCircle"></div>
|
||||
<span>辅助图像</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sscPre">
|
||||
<div class="sceneShowContent" style="position: relative">
|
||||
<otg-product-info
|
||||
@removeLayer="removeLayer('far')"
|
||||
@addLayer="addLayer('far')"
|
||||
></otg-product-info>
|
||||
<div
|
||||
id="farViewer"
|
||||
style="height: 100%; width: 100%"
|
||||
@click="pickValueFar"
|
||||
></div>
|
||||
</div>
|
||||
<div class="sceneShowContent" style="position: relative">
|
||||
<div id="nearViewer" style="height: 100%; width: 100%"></div>
|
||||
<otg-product-info
|
||||
@removeLayer="removeLayer('near')"
|
||||
@addLayer="addLayer('near')"
|
||||
></otg-product-info>
|
||||
<div class="poiCK">
|
||||
<el-button type="primary" :disabled="ckPoint" @click="ckSamePoi"
|
||||
>选取点</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
style="margin: 5px 0px"
|
||||
:disabled="savePoint"
|
||||
@click="saveSamePoi"
|
||||
>保存点</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sceneShowContent" style="position: relative">
|
||||
<div style="height: 100%">
|
||||
<img
|
||||
id="alImg"
|
||||
src="static/images/otg3.png"
|
||||
style="height: 100%; width: 100%"
|
||||
alt="fzImg"
|
||||
/>
|
||||
</div>
|
||||
<div class="imgCtrl">
|
||||
<el-radio-group v-model="imgChoose" @change="changeImg">
|
||||
<el-radio label="pointPs">点之记</el-radio><br />
|
||||
<el-radio label="nearImg" style="margin: 5px 0 5px 0"
|
||||
>近景</el-radio
|
||||
><br />
|
||||
<el-radio label="farImg">远景</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<SampleSetting
|
||||
:stepSampling="stepSampling"
|
||||
@handleStepSampling="handleStepSampling"
|
||||
@handleDepthList="handleDepthList"
|
||||
:sampleCldFun="sampleCldFun"
|
||||
ref="sampleSettingPanel"
|
||||
></SampleSetting>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from "@/components/Pagination";
|
||||
import OtgProductInfo from "@/components/otgProductInfo";
|
||||
import {
|
||||
getSampleData,
|
||||
getOrderSamples,
|
||||
getSamplesByLayer,
|
||||
deleteOrderSamplesByID,
|
||||
} from "@/api/pendingOrder";
|
||||
import otgCesiumUtils from "@/lib/otgCesiumUtils";
|
||||
import SampleSetting from "@/components/ration/sampleSetting/index.vue";
|
||||
import WKT from "terraformer-wkt-parser";
|
||||
import Formator from "@/mixins/formator";
|
||||
import cu from "@/lib/cesiumUtils";
|
||||
|
||||
export default {
|
||||
components: { Pagination, SampleSetting, OtgProductInfo },
|
||||
mixins: [Formator],
|
||||
props: {
|
||||
sampleFun: {
|
||||
require: true,
|
||||
type: String,
|
||||
},
|
||||
sampleCldFun: {
|
||||
require: false,
|
||||
type: String,
|
||||
},
|
||||
pixelFun: {
|
||||
require: true,
|
||||
type: String,
|
||||
},
|
||||
geoWorkSpace: {
|
||||
require: true,
|
||||
type: String,
|
||||
},
|
||||
geoLayerName: {
|
||||
require: true,
|
||||
type: String,
|
||||
},
|
||||
geoLayerPos: {
|
||||
require: true,
|
||||
},
|
||||
pixelNum: {
|
||||
require: true,
|
||||
},
|
||||
orderId: {
|
||||
require: true,
|
||||
},
|
||||
productSubType: {
|
||||
require: true,
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
formatDate(inputTime) {
|
||||
if (!inputTime && typeof inputTime !== "number") {
|
||||
return "";
|
||||
}
|
||||
var localTime = "";
|
||||
inputTime = new Date(inputTime);
|
||||
const offset = new Date().getTimezoneOffset();
|
||||
localTime = new Date(inputTime - offset * 60000).toISOString();
|
||||
localTime = localTime.substr(0, localTime.lastIndexOf("."));
|
||||
localTime = localTime.replace("T", " ");
|
||||
return localTime;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
simpleForm: {
|
||||
sampleFun: "",
|
||||
sampleNum: "",
|
||||
pageNum: 1,
|
||||
pageSize: 13,
|
||||
},
|
||||
simpleData: [],
|
||||
loading: true,
|
||||
allSampleData: [],
|
||||
multipleSelection: [],
|
||||
simpleDataTotal: 0,
|
||||
total: 0,
|
||||
radioClkMsg: "",
|
||||
imgChoose: "pointPs",
|
||||
ckPoint: true,
|
||||
savePoint: true,
|
||||
stepSampling: false,
|
||||
collectPointSignPic: "static/images/otg3.png", //点之记
|
||||
measurePicClose: "static/images/otg2.png", //实测近景
|
||||
measurePicDistant: "static/images/otg1.png", //实测远景
|
||||
funcOpt: [],
|
||||
isDeepSpace: false,
|
||||
depthList: [],
|
||||
};
|
||||
},
|
||||
// watch:{
|
||||
// geoWorkSpace:function(value){
|
||||
// otgCesiumUtils.addlayer(value,this.geoLayerName)
|
||||
// }
|
||||
// },
|
||||
mounted() {
|
||||
otgCesiumUtils.initCesium(["farViewer", "nearViewer"]);
|
||||
otgCesiumUtils.addlayer(this.geoWorkSpace, this.geoLayerName);
|
||||
const cLon = (
|
||||
(Number(this.geoLayerPos[0]) + Number(this.geoLayerPos[2])) /
|
||||
2
|
||||
).toFixed(8);
|
||||
const cLat = (
|
||||
(Number(this.geoLayerPos[1]) + Number(this.geoLayerPos[3])) /
|
||||
2
|
||||
).toFixed(8);
|
||||
otgCesiumUtils.flyToLayer(cLon, cLat);
|
||||
},
|
||||
created() {
|
||||
this.funcOpt = this.configration.funcOpt;
|
||||
this.getSplData();
|
||||
this.initParam();
|
||||
},
|
||||
methods: {
|
||||
handleStepSampling(newVal) {
|
||||
this.stepSampling = newVal;
|
||||
},
|
||||
handleDepthList(newVal) {
|
||||
// console.log('handleDepthList', newVal)
|
||||
this.depthList = newVal;
|
||||
},
|
||||
editDeepSpace() {
|
||||
this.stepSampling = true;
|
||||
},
|
||||
initParam() {
|
||||
if (this.sampleCldFun) {
|
||||
this.simpleForm.sampleFun = new Array(
|
||||
this.sampleFun,
|
||||
this.sampleCldFun
|
||||
);
|
||||
} else {
|
||||
this.simpleForm.sampleFun = new Array(this.sampleFun);
|
||||
}
|
||||
const ssf = Number(this.simpleForm.sampleFun[0]);
|
||||
if (
|
||||
this.simpleForm.sampleFun.length >= 1 &&
|
||||
ssf === 1 &&
|
||||
Number(this.simpleForm.sampleFun[1]) === 0
|
||||
) {
|
||||
this.isDeepSpace = true;
|
||||
} else {
|
||||
this.isDeepSpace = false;
|
||||
}
|
||||
// this.stepSampling = this.sampleFun == "1" && this?.sampleCldFun == "0";
|
||||
},
|
||||
changeSampleFun(sfVal) {
|
||||
if (Array.isArray(sfVal)) {
|
||||
const ssf = Number(sfVal[0]);
|
||||
if (sfVal.length >= 1 && ssf === 1 && Number(sfVal[1]) === 0) {
|
||||
this.isDeepSpace = true;
|
||||
} else {
|
||||
this.isDeepSpace = false;
|
||||
}
|
||||
}
|
||||
// const ssf = Number(sfVal);
|
||||
// if (ssf === 1 && this.sampleCldFun !== '') this.stepSampling = true;
|
||||
// else this.stepSampling = false;
|
||||
},
|
||||
samplesCk() {
|
||||
const self = this;
|
||||
if (self.simpleForm.sampleFun[0] === "") {
|
||||
self.$message.error("请选择抽样方法");
|
||||
return false;
|
||||
}
|
||||
const ssf = self.simpleForm.sampleFun,
|
||||
st = self.simpleDataTotal,
|
||||
ssn = self.simpleForm.sampleNum;
|
||||
if (ssn == "") {
|
||||
this.$message.error("请选择抽样个数");
|
||||
this.getSplData();
|
||||
return false;
|
||||
}
|
||||
if (ssn > st) {
|
||||
this.$message.error("抽样数不可大于总样本数量");
|
||||
return false;
|
||||
}
|
||||
if (ssn < 0) {
|
||||
this.$message.error("样本个数不可为负数");
|
||||
return false;
|
||||
}
|
||||
if (Number(ssf[0]) === 1) {
|
||||
const stepSampParams = self.$refs.sampleSettingPanel;
|
||||
// const hierarchyVal = stepSampParams.hierarchyVal;
|
||||
const hierarchyVal = ssf[1];
|
||||
if (hierarchyVal === "" || hierarchyVal === undefined) {
|
||||
self.stepSampling = true;
|
||||
return false;
|
||||
}
|
||||
const ssForm = new FormData();
|
||||
ssForm.append("samplesList", JSON.stringify(this.allSampleData));
|
||||
ssForm.append("stepType", Number(hierarchyVal));
|
||||
ssForm.append("orderID", this.orderId);
|
||||
// ssForm.append("productType",this.productSubType);
|
||||
if (hierarchyVal === "0") {
|
||||
// const depthList = stepSampParams.depthList;
|
||||
const depthList = this.depthList;
|
||||
// console.log('=====', depthList)
|
||||
ssForm.append("condition", JSON.stringify(depthList));
|
||||
} else if (hierarchyVal === "2") {
|
||||
const jsonContent = JSON.parse(stepSampParams.jsonContent);
|
||||
// const jsonContentWKT = WKT.convert(jsonContent.geometries[0]);
|
||||
const jg = jsonContent.geometries;
|
||||
const newPolygon = [];
|
||||
for (let i in jg) {
|
||||
const jsonContentWKT = WKT.convert(jg[i]);
|
||||
newPolygon.push({ coordinates: jsonContentWKT });
|
||||
}
|
||||
ssForm.append("condition", JSON.stringify(newPolygon));
|
||||
}
|
||||
ssForm.append("splCount", ssn);
|
||||
getSamplesByLayer(ssForm).then((res) => {
|
||||
if (res.length === 0 || res === []) {
|
||||
self.multipleSelection = self.simpleData = [];
|
||||
cu.removePoint();
|
||||
this.$message.error("当前分层设置返回列表为空");
|
||||
return false;
|
||||
} else {
|
||||
const dl = [];
|
||||
for (let i in res) {
|
||||
const ri = res[i];
|
||||
for (let j in ri) {
|
||||
dl.push(ri[j]);
|
||||
}
|
||||
}
|
||||
self.multipleSelection = self.simpleData = dl;
|
||||
cu.removePoint();
|
||||
for (let i in dl) {
|
||||
cu.addPoint(dl[i].lon, dl[i].lat, dl[i].alt);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
const spFrom = new FormData();
|
||||
spFrom.append("sampleFun", Number(ssf[0])); //抽样方法
|
||||
spFrom.append("minNum", 0);
|
||||
spFrom.append("MaxNum", st - 1); //样本总数
|
||||
spFrom.append("splCount", ssn); //抽样个数
|
||||
getSampleData(spFrom).then((res) => {
|
||||
const dl = [];
|
||||
for (const i in res) {
|
||||
dl.push(self.allSampleData[res[i]]);
|
||||
}
|
||||
self.multipleSelection = self.simpleData = dl;
|
||||
});
|
||||
}
|
||||
},
|
||||
headerRowClass() {
|
||||
return "background:#E4E9F1; font-weight: bold;color: #645f5f;text-align:center";
|
||||
},
|
||||
tableRowClassName({ rowIndex }) {
|
||||
if ((rowIndex + 1) % 2 !== 0) {
|
||||
return "background:#F5F7FA;text-align:center";
|
||||
} else {
|
||||
return "background:#FFFFFF;text-align:center";
|
||||
}
|
||||
},
|
||||
tableRowClk(row) {
|
||||
this.radioClkMsg = row;
|
||||
otgCesiumUtils.removePoint();
|
||||
const lon = row.lon,
|
||||
lat = row.lat,
|
||||
alt = row.alt;
|
||||
otgCesiumUtils.addPointToFarViewer(lon, lat, alt);
|
||||
otgCesiumUtils.addPointToNearViewer(lon, lat, alt);
|
||||
this.ckPoint = false;
|
||||
const cus = this.configration.urlprefix.samePoiImgsUrl;
|
||||
if (row.collectPointSignpic !== null) {
|
||||
this.collectPointSignPic = cus + row.collectPointSignpic;
|
||||
var alImgDom = document.getElementById("alImg");
|
||||
alImgDom.src = this.collectPointSignPic;
|
||||
}
|
||||
if (row.measureClose !== null)
|
||||
this.measurePicClose = cus + row.measureClose;
|
||||
if (row.measureDistant !== null)
|
||||
this.measurePicDistant = cus + row.measureDistant;
|
||||
},
|
||||
// 选择相同的点
|
||||
ckSamePoi() {
|
||||
// console.log('选择同名点');
|
||||
otgCesiumUtils.drawPoint((point) => {
|
||||
this.radioClkMsg.sameLon = Number(point[0]);
|
||||
this.radioClkMsg.sameLat = Number(point[1]);
|
||||
this.radioClkMsg.sameAlt = Number(point[2]);
|
||||
});
|
||||
this.savePoint = false;
|
||||
},
|
||||
// 保存相同的点
|
||||
saveSamePoi() {
|
||||
// console.log("保存同名点成功");
|
||||
this.ckPoint = true;
|
||||
this.savePoint = true;
|
||||
otgCesiumUtils.stopDrowPoi();
|
||||
},
|
||||
changeImg(val) {
|
||||
var alImgDom = document.getElementById("alImg");
|
||||
switch (val) {
|
||||
case "pointPs":
|
||||
alImgDom.src = this.collectPointSignPic;
|
||||
break;
|
||||
case "nearImg":
|
||||
alImgDom.src = this.measurePicClose;
|
||||
break;
|
||||
case "farImg":
|
||||
alImgDom.src = this.measurePicDistant;
|
||||
}
|
||||
},
|
||||
getSplData() {
|
||||
getOrderSamples(this.orderId, this.productSubType).then((res) => {
|
||||
// console.log(res)
|
||||
if (res.code == 200) {
|
||||
this.multipleSelection =
|
||||
this.allSampleData =
|
||||
this.simpleData =
|
||||
res.data;
|
||||
this.loading = false;
|
||||
this.$refs.multipleTable.toggleAllSelection();
|
||||
let min = Number.MAX_SAFE_INTEGER;
|
||||
let max = Number.MIN_SAFE_INTEGER;
|
||||
this.$store.commit("setAltRange", null);
|
||||
this.allSampleData.forEach((k, v) => {
|
||||
k.dataTime = this.formatDatetime(k.dataTime);
|
||||
min = min > k.alt ? k.alt : min;
|
||||
max = max < k.alt ? k.alt : max;
|
||||
});
|
||||
if (this.allSampleData.length > 0) {
|
||||
this.$store.commit("setAltRange", min + "," + (max + 1));
|
||||
}
|
||||
this.simpleDataTotal = this.total = res.data.length;
|
||||
}
|
||||
});
|
||||
},
|
||||
deleteSelected(index, simpleData) {
|
||||
simpleData.splice(index, 1);
|
||||
// deleteOrderSamplesByID(sampleId, this.productSubType).then((res) => {
|
||||
// if (res.code == 200) {
|
||||
// this.getSplData();
|
||||
// }
|
||||
// });
|
||||
},
|
||||
pickValueFar() {
|
||||
otgCesiumUtils.handleClickFar();
|
||||
},
|
||||
pickValueNear() {
|
||||
otgCesiumUtils.handleClickNear();
|
||||
},
|
||||
addLayer(layerType) {
|
||||
if (layerType === "far")
|
||||
otgCesiumUtils.addFarlayer(this.geoWorkSpace, this.geoLayerName);
|
||||
else if (layerType === "near")
|
||||
otgCesiumUtils.addNearlayer(this.geoWorkSpace, this.geoLayerName);
|
||||
},
|
||||
removeLayer(layerType) {
|
||||
if (layerType === "far") otgCesiumUtils.clearFarLayers();
|
||||
else if (layerType === "near") otgCesiumUtils.clearNearLayers();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.otgCard {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
font-size: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
/deep/.otgCard .el-form-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.otgCardContent {
|
||||
margin: 15px;
|
||||
height: 450px;
|
||||
}
|
||||
.sceneShow {
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
margin-top: 20px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
.sscPre {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.sceneShowContent {
|
||||
margin: 5px 15px 0 15px;
|
||||
width: 33%;
|
||||
height: 360px;
|
||||
background-color: rgb(110, 110, 207);
|
||||
}
|
||||
.imgCtrl {
|
||||
position: absolute;
|
||||
bottom: 3px;
|
||||
left: 3px;
|
||||
width: 90px;
|
||||
height: 70px;
|
||||
background-color: #aaaaaa;
|
||||
padding: 4px 0 0 10px;
|
||||
}
|
||||
.poiCK {
|
||||
position: absolute;
|
||||
bottom: 1px;
|
||||
width: 90px;
|
||||
height: 60px;
|
||||
background-color: #aaaaaa;
|
||||
padding: 4px 0 0 10px;
|
||||
}
|
||||
.sscTitle {
|
||||
margin: 15px 15px 0 15px;
|
||||
width: 33%;
|
||||
height: 30px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
color: gray;
|
||||
}
|
||||
.sscCircle {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
border-radius: 50%;
|
||||
background-color: #0072e5;
|
||||
margin: 0 4px 0 4px;
|
||||
}
|
||||
.box1 {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid rgb(205, 205, 205, 0.5);
|
||||
}
|
||||
.sp1 {
|
||||
display: inline-block;
|
||||
width: 7px;
|
||||
height: 26px;
|
||||
background-color: #354595;
|
||||
vertical-align: top;
|
||||
// position: absolute;
|
||||
margin-left: 20px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.sp2 {
|
||||
margin-left: 10px;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #354595;
|
||||
vertical-align: top;
|
||||
}
|
||||
// 分层抽样弹出框设置
|
||||
/deep/.sampleFunParam .el-upload-dragger .el-icon-upload {
|
||||
margin: 0;
|
||||
line-height: 30px;
|
||||
font-size: 20px;
|
||||
color: black;
|
||||
}
|
||||
.sampleFunParam .upload-demo {
|
||||
display: inline-block;
|
||||
}
|
||||
/deep/.sampleFunParam .el-upload-dragger {
|
||||
width: 150px;
|
||||
height: 35px;
|
||||
margin-left: 15px;
|
||||
margin-top: 20px;
|
||||
border: 1px solid #d9d9d9;
|
||||
}
|
||||
/deep/.sampleFunParam .el-dialog__body {
|
||||
padding: 20px 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.edit-btn {
|
||||
margin-left: 15px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,704 @@
|
|||
<template>
|
||||
<div class="qualitative">
|
||||
<div class="featureMap">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span
|
||||
><span class="sp2">{{
|
||||
productSubType == 6 ? "地表覆盖类型表" : "植被物候类型表"
|
||||
}}</span>
|
||||
</div>
|
||||
<el-table
|
||||
ref="featureMapMultipleTable"
|
||||
:data="featureMapData"
|
||||
tooltip-effect="dark"
|
||||
:header-cell-style="headerRowClass"
|
||||
style="width: 98%; margin-left: 1%; margin-top: 15px"
|
||||
:stripe="true"
|
||||
:cell-style="tableRowClassName"
|
||||
height="230"
|
||||
>
|
||||
<el-table-column label="序号" type="index" width="70">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="typeName"
|
||||
:label="productSubType == 6 ? '地物类型名称' : '物候类型名称'"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="typeNameKg"
|
||||
label="空基类型名称"
|
||||
show-overflow-tooltip
|
||||
v-if="false"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model="scope.row.typeNameKg"
|
||||
placeholder="请选择"
|
||||
@change="selectRfName(scope.row)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in rfNameOpt"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="用户类型实际值">
|
||||
<template slot-scope="scope">{{ scope.row.typeId }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="空基代码实际值">
|
||||
<template slot-scope="scope">{{ scope.row.typeIdKg }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="qualiteSample">
|
||||
<div class="qsLeft">
|
||||
<div class="smps">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span><span class="sp2">样本库</span>
|
||||
</div>
|
||||
<div>
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="simpleForm"
|
||||
class="demo-form-inline"
|
||||
>
|
||||
<el-form-item>
|
||||
<el-cascader
|
||||
v-model="simpleForm.sampleFun"
|
||||
:disabled="sampleFun !== ''"
|
||||
:options="funcOpt"
|
||||
size="mini"
|
||||
placeholder="请选择抽样方法"
|
||||
popper-class="cascader-popper"
|
||||
@change="changeSampleFun"
|
||||
clearable
|
||||
:show-all-levels="false"
|
||||
></el-cascader>
|
||||
<el-button
|
||||
v-if="isDeepSpace"
|
||||
class="edit-btn"
|
||||
plain
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit-outline"
|
||||
@click="editDeepSpace"
|
||||
></el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input
|
||||
v-model="simpleForm.sampleNum"
|
||||
size="mini"
|
||||
placeholder="请输入样本个数"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="samplesCk">确定</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
v-loading="loading"
|
||||
element-loading-text="拼命加载中"
|
||||
element-loading-spinner="el-icon-loading"
|
||||
element-loading-background="rgba(0, 0, 0, 0.8)"
|
||||
:data="simpleData"
|
||||
tooltip-effect="dark"
|
||||
:header-cell-style="headerRowClass"
|
||||
style="width: 98%; margin-left: 1%"
|
||||
@selection-change="handleSelectionChange"
|
||||
:stripe="true"
|
||||
:cell-style="tableRowClassName"
|
||||
height="400"
|
||||
size="medium"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column label="序号" type="index" width="70">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="sampleId"
|
||||
label="样本编号"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="lat"
|
||||
label="纬度"
|
||||
sortable
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="lon"
|
||||
label="经度"
|
||||
sortable
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="coverName"
|
||||
label="类别"
|
||||
show-overflow-tooltip
|
||||
sortable
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="dataTime"
|
||||
label="采样时间"
|
||||
sortable
|
||||
show-overflow-tooltip
|
||||
min-width="120px;"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope"
|
||||
><i
|
||||
class="el-icon-delete"
|
||||
@click="deleteSelected(scope.$index, simpleData)"
|
||||
></i
|
||||
></template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pixelDeal" v-if="false">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span><span class="sp2">像元级处理模型设置</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="cardsp">目标分辨率:{{ pixelNum }}</span>
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="pixelFormData"
|
||||
class="demo-form-inline"
|
||||
>
|
||||
<el-form-item label="像元级处理模型:">
|
||||
<el-select
|
||||
size="mini"
|
||||
v-model="pixelFormData.pixelDealFun"
|
||||
placeholder="选择像元级处理方法"
|
||||
:disabled="pdShow"
|
||||
>
|
||||
<el-option label="" value=""></el-option>
|
||||
<el-option label="均值法" value="0"></el-option>
|
||||
<el-option label="最邻近法" value="1"></el-option>
|
||||
<el-option label="克里格法" value="2"></el-option>
|
||||
<el-option label="块克里格法" value="3"></el-option>
|
||||
<el-option label="MSN法" value="4"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit">确认</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="qsRight">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span
|
||||
><span class="sp2">待检验产品及样本分布结果</span>
|
||||
</div>
|
||||
<div
|
||||
id="sceneShowContent"
|
||||
@click="pickValue"
|
||||
style="overflow: hidden; position: relative"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
<SampleSetting
|
||||
:stepSampling="stepSampling"
|
||||
@handleStepSampling="handleStepSampling"
|
||||
@handleDepthList="handleDepthList"
|
||||
:sampleCldFun="sampleCldFun"
|
||||
ref="sampleSettingPanel"
|
||||
></SampleSetting>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getCoverTypes,
|
||||
getSampleData,
|
||||
getOrderSamples,
|
||||
getSamplesByLayer,
|
||||
deleteOrderSamplesByID,
|
||||
} from "@/api/pendingOrder";
|
||||
import cu from "@/lib/cesiumUtils";
|
||||
import SampleSetting from "@/components/ration/sampleSetting/index.vue";
|
||||
import WKT from "terraformer-wkt-parser";
|
||||
import Formator from "@/mixins/formator";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
SampleSetting,
|
||||
},
|
||||
mixins: [Formator],
|
||||
props: {
|
||||
sampleFun: {
|
||||
require: true,
|
||||
type: String,
|
||||
},
|
||||
sampleCldFun: {
|
||||
require: false,
|
||||
type: String,
|
||||
},
|
||||
pixelFun: {
|
||||
require: true,
|
||||
type: String,
|
||||
},
|
||||
geoWorkSpace: {
|
||||
require: true,
|
||||
type: String,
|
||||
},
|
||||
geoLayerName: {
|
||||
require: true,
|
||||
type: String,
|
||||
},
|
||||
geoLayerPos: {
|
||||
require: true,
|
||||
},
|
||||
pixelNum: {
|
||||
require: true,
|
||||
},
|
||||
orderId: {
|
||||
require: true,
|
||||
},
|
||||
productSubType: {
|
||||
require: true,
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
formatDate(inputTime) {
|
||||
if (!inputTime && typeof inputTime !== "number") {
|
||||
return "";
|
||||
}
|
||||
var localTime = "";
|
||||
inputTime = new Date(inputTime);
|
||||
const offset = new Date().getTimezoneOffset();
|
||||
localTime = new Date(inputTime - offset * 60000).toISOString();
|
||||
localTime = localTime.substr(0, localTime.lastIndexOf("."));
|
||||
localTime = localTime.replace("T", " ");
|
||||
return localTime;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
featureMapData: [],
|
||||
rfNameOpt: [],
|
||||
simpleForm: {
|
||||
sampleFun: "",
|
||||
sampleNum: "",
|
||||
},
|
||||
simpleData: [],
|
||||
loading: true,
|
||||
allSampleData: [],
|
||||
simpleDataTotal: 0,
|
||||
multipleSelection: [],
|
||||
pixelFormData: {
|
||||
pixelDealFun: "",
|
||||
},
|
||||
stepSampling: false,
|
||||
funcOpt: [],
|
||||
isDeepSpace: false,
|
||||
depthList: [],
|
||||
};
|
||||
},
|
||||
// watch:{
|
||||
// geoWorkSpace:function(value){
|
||||
// cu.addlayer(value,this.geoLayerName)
|
||||
// cu.flyToLayer(this.geoLayerPos[0],this.geoLayerPos[1]);
|
||||
// }
|
||||
// },
|
||||
mounted() {
|
||||
cu.initCesium("sceneShowContent");
|
||||
cu.handleClick();
|
||||
cu.addlayer(this.geoWorkSpace, this.geoLayerName);
|
||||
let gp = this.geoLayerPos;
|
||||
cu.flyToLayerRect(gp[0], gp[1], gp[2], gp[3]);
|
||||
},
|
||||
created() {
|
||||
if (this.productSubType === 6) {
|
||||
this.rfNameOpt = this.configration.groTypeName;
|
||||
} else if (this.productSubType === 12) {
|
||||
this.rfNameOpt = this.configration.vegetationPhenologyGroTypeName;
|
||||
}
|
||||
|
||||
this.funcOpt = this.configration.funcOpt;
|
||||
this.getCoverType();
|
||||
this.getSplData();
|
||||
this.initParam();
|
||||
},
|
||||
methods: {
|
||||
handleStepSampling(newVal) {
|
||||
this.stepSampling = newVal;
|
||||
},
|
||||
handleDepthList(newVal) {
|
||||
// console.log('handleDepthList', newVal)
|
||||
this.depthList = newVal;
|
||||
},
|
||||
editDeepSpace() {
|
||||
this.stepSampling = true;
|
||||
},
|
||||
initParam() {
|
||||
if (this.pixelFun !== "") this.pdShow = true;
|
||||
this.pixelFormData.pixelDealFun = this.pixelFun;
|
||||
if (this.sampleCldFun) {
|
||||
this.simpleForm.sampleFun = new Array(
|
||||
this.sampleFun,
|
||||
this.sampleCldFun
|
||||
);
|
||||
} else {
|
||||
this.simpleForm.sampleFun = new Array(this.sampleFun);
|
||||
}
|
||||
const ssf = Number(this.simpleForm.sampleFun[0]);
|
||||
if (
|
||||
this.simpleForm.sampleFun.length >= 1 &&
|
||||
ssf === 1 &&
|
||||
Number(this.simpleForm.sampleFun[1]) === 0
|
||||
) {
|
||||
this.isDeepSpace = true;
|
||||
} else {
|
||||
this.isDeepSpace = false;
|
||||
}
|
||||
// this.stepSampling = this.sampleFun == "1" && this?.sampleCldFun == "0";
|
||||
},
|
||||
onSubmit() {},
|
||||
tableRowClassName({ rowIndex }) {
|
||||
if ((rowIndex + 1) % 2 !== 0) {
|
||||
return "background:#F5F7FA;text-align:center";
|
||||
} else {
|
||||
return "background:#FFFFFF;text-align:center";
|
||||
}
|
||||
},
|
||||
headerRowClass() {
|
||||
return "background: #E4E9F1;text-align:center";
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
cu.removePoint();
|
||||
if (val.length !== 0) {
|
||||
for (let i in val) {
|
||||
cu.addPoint(val[i].lon, val[i].lat, val[i].alt);
|
||||
}
|
||||
}
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
selectRfName(row) {
|
||||
const typeNameMap = {
|
||||
城市: "01",
|
||||
水体: "02",
|
||||
森林: "03",
|
||||
灌木地: "20",
|
||||
草地: "10",
|
||||
水域: "60",
|
||||
山地: "80",
|
||||
出芽期: "1",
|
||||
分蘖期: "2",
|
||||
越冬期: "3",
|
||||
返青期: "4",
|
||||
起身期: "5",
|
||||
拔节期: "6",
|
||||
孕穗期: "7",
|
||||
抽穗期: "8",
|
||||
扬花期: "9",
|
||||
灌浆期: "10",
|
||||
成熟期: "11",
|
||||
};
|
||||
row.typeIdKg = typeNameMap[row.typeNameKg];
|
||||
},
|
||||
getRealVal(name) {
|
||||
const typeNameMap = {
|
||||
城市: "01",
|
||||
水体: "02",
|
||||
森林: "03",
|
||||
灌木地: "20",
|
||||
草地: "10",
|
||||
水域: "60",
|
||||
山地: "80",
|
||||
出芽期: "1",
|
||||
分蘖期: "2",
|
||||
越冬期: "3",
|
||||
返青期: "4",
|
||||
起身期: "5",
|
||||
拔节期: "6",
|
||||
孕穗期: "7",
|
||||
抽穗期: "8",
|
||||
扬花期: "9",
|
||||
灌浆期: "10",
|
||||
成熟期: "11",
|
||||
};
|
||||
return typeNameMap[name];
|
||||
},
|
||||
getCoverType() {
|
||||
getCoverTypes(this.orderId).then((res) => {
|
||||
if (res.msg === "操作成功" && res?.data) {
|
||||
const rd = res.data;
|
||||
if (rd.length > 0) {
|
||||
for (let i = 0; i < rd.length; i++) {
|
||||
rd[i].typeNameKg = rd[i].typeName;
|
||||
rd[i].typeIdKg = this.getRealVal(rd[i].typeName);
|
||||
}
|
||||
}
|
||||
this.featureMapData = rd;
|
||||
}
|
||||
});
|
||||
},
|
||||
getSplData() {
|
||||
// console.log(this.productSubType)
|
||||
getOrderSamples(this.orderId, this.productSubType).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.multipleSelection =
|
||||
this.allSampleData =
|
||||
this.simpleData =
|
||||
res.data;
|
||||
this.loading = false;
|
||||
this.$refs.multipleTable.toggleAllSelection();
|
||||
let min = Number.MAX_SAFE_INTEGER;
|
||||
let max = Number.MIN_SAFE_INTEGER;
|
||||
this.$store.commit("setAltRange", null);
|
||||
this.allSampleData.forEach((k, v) => {
|
||||
k.dataTime = this.formatDatetime(k.dataTime);
|
||||
min = min > k.alt ? k.alt : min;
|
||||
max = max < k.alt ? k.alt : max;
|
||||
});
|
||||
if (this.allSampleData.length > 0) {
|
||||
this.$store.commit("setAltRange", min + "," + (max + 1));
|
||||
}
|
||||
this.simpleDataTotal = res.data.length;
|
||||
}
|
||||
});
|
||||
},
|
||||
changeSampleFun(sfVal) {
|
||||
if (Array.isArray(sfVal)) {
|
||||
const ssf = Number(sfVal[0]);
|
||||
this.$store.commit("setSampleFun", sfVal.length === 0 ? null : ssf);
|
||||
if (sfVal.length >= 1 && ssf === 1 && Number(sfVal[1]) === 0) {
|
||||
this.isDeepSpace = true;
|
||||
} else {
|
||||
this.isDeepSpace = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
samplesCk() {
|
||||
const self = this;
|
||||
if (self.simpleForm.sampleFun[0] === "") {
|
||||
self.$message.error("请选择抽样方法");
|
||||
return false;
|
||||
}
|
||||
const ssf = self.simpleForm.sampleFun,
|
||||
st = self.simpleDataTotal,
|
||||
ssn = self.simpleForm.sampleNum;
|
||||
if (ssn == "") {
|
||||
this.$message.error("请选择抽样个数");
|
||||
this.getSplData();
|
||||
return false;
|
||||
}
|
||||
if (ssn > st) {
|
||||
this.$message.error("抽样数不可大于总样本数量");
|
||||
return false;
|
||||
}
|
||||
if (ssn < 0) {
|
||||
this.$message.error("样本个数不可为负数");
|
||||
return false;
|
||||
}
|
||||
if (Number(ssf[0]) === 1) {
|
||||
// self.stepSampling = true;
|
||||
const stepSampParams = self.$refs.sampleSettingPanel;
|
||||
// const hierarchyVal = stepSampParams.hierarchyVal;
|
||||
const hierarchyVal = ssf[1];
|
||||
if (hierarchyVal === "" || hierarchyVal === undefined) {
|
||||
self.stepSampling = true;
|
||||
return false;
|
||||
}
|
||||
const ssForm = new FormData();
|
||||
ssForm.append("samplesList", JSON.stringify(this.allSampleData));
|
||||
ssForm.append("stepType", Number(hierarchyVal));
|
||||
ssForm.append("orderID", this.orderId);
|
||||
// ssForm.append("productType",this.productSubType);
|
||||
if (hierarchyVal === "0") {
|
||||
// const depthList = stepSampParams.depthList;
|
||||
const depthList = this.depthList;
|
||||
// console.log('=====', depthList)
|
||||
ssForm.append("condition", JSON.stringify(depthList));
|
||||
} else if (hierarchyVal === "2") {
|
||||
const jsonContent = JSON.parse(stepSampParams.jsonContent);
|
||||
// const jsonContentWKT = WKT.convert(jsonContent.geometries[0]);
|
||||
const jg = jsonContent.geometries;
|
||||
const newPolygon = [];
|
||||
for (let i in jg) {
|
||||
const jsonContentWKT = WKT.convert(jg[i]);
|
||||
newPolygon.push({ coordinates: jsonContentWKT });
|
||||
}
|
||||
ssForm.append("condition", JSON.stringify(newPolygon));
|
||||
}
|
||||
ssForm.append("splCount", ssn);
|
||||
getSamplesByLayer(ssForm).then((res) => {
|
||||
if (res.length === 0 || res === []) {
|
||||
self.multipleSelection = self.simpleData = [];
|
||||
cu.removePoint();
|
||||
this.$message.error("当前分层设置返回列表为空");
|
||||
return false;
|
||||
} else {
|
||||
const dl = [];
|
||||
for (let i in res) {
|
||||
const ri = res[i];
|
||||
for (let j in ri) {
|
||||
dl.push(ri[j]);
|
||||
}
|
||||
}
|
||||
self.multipleSelection = self.simpleData = dl;
|
||||
self.$refs.multipleTable.toggleAllSelection();
|
||||
cu.removePoint();
|
||||
for (let i in dl) {
|
||||
cu.addPoint(dl[i].lon, dl[i].lat, dl[i].alt);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
const spFrom = new FormData();
|
||||
spFrom.append("sampleFun", Number(ssf[0])); //抽样方法
|
||||
spFrom.append("minNum", 0);
|
||||
spFrom.append("MaxNum", st - 1); //样本总数
|
||||
spFrom.append("splCount", ssn); //抽样个数
|
||||
getSampleData(spFrom).then((res) => {
|
||||
const dl = [];
|
||||
for (const i in res) {
|
||||
dl.push(self.allSampleData[res[i]]);
|
||||
}
|
||||
self.multipleSelection = self.simpleData = dl;
|
||||
self.$refs.multipleTable.toggleAllSelection();
|
||||
cu.removePoint();
|
||||
for (let i in dl) {
|
||||
cu.addPoint(dl[i].lon, dl[i].lat, dl[i].alt);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
deleteSelected(index, simpleData) {
|
||||
simpleData.splice(index, 1);
|
||||
// deleteOrderSamplesByID(sampleId, this.productSubType).then((res) => {
|
||||
// if (res.code == 200) {
|
||||
// this.getSplData();
|
||||
// }
|
||||
// });
|
||||
},
|
||||
pickValue() {
|
||||
cu.handleClick();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.featureMap {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
background-color: white;
|
||||
margin-top: 10px;
|
||||
}
|
||||
/deep/.featureMap .el-select .el-input__inner {
|
||||
height: 35px;
|
||||
}
|
||||
.qualiteSample {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.qsLeft {
|
||||
width: 56%;
|
||||
height: 500px;
|
||||
float: left;
|
||||
margin-right: 4px;
|
||||
}
|
||||
.qsRight {
|
||||
width: calc(44% - 4px);
|
||||
height: 500px;
|
||||
background-color: white;
|
||||
float: left;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.smps {
|
||||
height: 500px;
|
||||
background-color: white;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
/deep/.smps .el-form-item {
|
||||
margin-left: 15px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
// /deep/.smps .el-table th > .cell {
|
||||
// font-size: 15px;
|
||||
// }
|
||||
// /deep/.smps .el-table .cell {
|
||||
// font-size: 13px;
|
||||
// }
|
||||
|
||||
.pixelDeal {
|
||||
height: 165px;
|
||||
background-color: white;
|
||||
}
|
||||
/deep/.pixelDeal .el-form-item {
|
||||
margin-left: 15px;
|
||||
}
|
||||
.cardsp {
|
||||
display: block;
|
||||
margin-left: 17px;
|
||||
font-size: 15px;
|
||||
color: #606266;
|
||||
line-height: 40px;
|
||||
}
|
||||
#sceneShowContent {
|
||||
margin: 10px;
|
||||
height: calc(100% - 60px);
|
||||
background-color: rgb(110, 110, 207);
|
||||
}
|
||||
.box1 {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid rgb(205, 205, 205, 0.5);
|
||||
}
|
||||
.sp1 {
|
||||
display: inline-block;
|
||||
width: 7px;
|
||||
height: 26px;
|
||||
background-color: #354595;
|
||||
vertical-align: top;
|
||||
margin-left: 20px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.sp2 {
|
||||
margin-left: 10px;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #354595;
|
||||
vertical-align: top;
|
||||
}
|
||||
// 分层抽样弹出框设置
|
||||
/deep/.sampleFunParam .el-upload-dragger .el-icon-upload {
|
||||
margin: 0;
|
||||
line-height: 30px;
|
||||
font-size: 20px;
|
||||
color: black;
|
||||
}
|
||||
.sampleFunParam .upload-demo {
|
||||
display: inline-block;
|
||||
}
|
||||
/deep/.sampleFunParam .el-upload-dragger {
|
||||
width: 150px;
|
||||
height: 35px;
|
||||
margin-left: 15px;
|
||||
margin-top: 20px;
|
||||
border: 1px solid #d9d9d9;
|
||||
}
|
||||
/deep/.sampleFunParam .el-dialog__body {
|
||||
padding: 20px 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.edit-btn {
|
||||
margin-left: 15px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,265 @@
|
|||
<template>
|
||||
<div class="sampleFunParam">
|
||||
<el-dialog title="深度空间分层抽样设置" :visible.sync="stepSampling" width="35%">
|
||||
<!-- <el-select
|
||||
v-model="hierarchyVal"
|
||||
placeholder="分层选择"
|
||||
@change="setHierarchy"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in hierarchyOpt"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select> -->
|
||||
<div class="hint">
|
||||
<!-- <span>{{ hierarchyVal === "0" ? altRangeText : "" }}</span> -->
|
||||
<span>{{ altRangeText }}</span>
|
||||
</div>
|
||||
<div v-if="hierarchyVal === '2'">
|
||||
<span class="sp3">范围数据上传</span>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
drag
|
||||
multiple
|
||||
accept=".json,.geoJson,.topoJson"
|
||||
action="/"
|
||||
:http-request="uploadJsonFile"
|
||||
:show-file-list="false"
|
||||
>
|
||||
<i class="el-icon-upload"></i>上传geoJson
|
||||
</el-upload>
|
||||
</div>
|
||||
<div class="cardtable">
|
||||
<el-table :data="depthList" style="width: 66%; margin-left: 20%">
|
||||
<el-table-column label="序号" width="60" align="center" type="index">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="startDepth"
|
||||
label="起始范围"
|
||||
align="center"
|
||||
width="80"
|
||||
>
|
||||
<template slot-scope="{ row, $index }">
|
||||
<div
|
||||
@click.stop="
|
||||
{
|
||||
{
|
||||
changeNum($index, 'editStartDepthInput');
|
||||
}
|
||||
}
|
||||
"
|
||||
>
|
||||
<el-input
|
||||
v-if="editable[$index]"
|
||||
v-model="row.startDepth"
|
||||
size="mini"
|
||||
class="editStartDepthInput"
|
||||
></el-input>
|
||||
<span v-else>{{ row.startDepth }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="endDepth"
|
||||
label="结束范围"
|
||||
align="center"
|
||||
width="80"
|
||||
>
|
||||
<template slot-scope="{ row, $index }">
|
||||
<div
|
||||
@click.stop="
|
||||
{
|
||||
{
|
||||
changeNum($index, 'editEndDepthInput');
|
||||
}
|
||||
}
|
||||
"
|
||||
>
|
||||
<el-input
|
||||
v-if="editable[$index]"
|
||||
v-model="row.endDepth"
|
||||
size="mini"
|
||||
class="editEndDepthInput"
|
||||
></el-input>
|
||||
<span v-else>{{ row.endDepth }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
style="height: 25px"
|
||||
type="danger"
|
||||
size="small"
|
||||
icon="el-icon-plus"
|
||||
@click="addDepthT(scope.$index, scope.row)"
|
||||
></el-button>
|
||||
<el-button
|
||||
style="height: 25px"
|
||||
type="danger"
|
||||
size="small"
|
||||
icon="el-icon-minus"
|
||||
@click="removeDepthT(scope.$index, scope.row)"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancelSampleFunSet">取消</el-button>
|
||||
<el-button type="primary" @click="submitSampleFunSet">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
stepSampling: {
|
||||
require: true,
|
||||
},
|
||||
sampleCldFun: {
|
||||
require: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// stepShow: false,
|
||||
hierarchyVal: "0",
|
||||
hierarchyOpt: [
|
||||
{
|
||||
value: "0",
|
||||
label: "深度空间分层",
|
||||
},
|
||||
{
|
||||
value: "1",
|
||||
label: "场站网空间分层",
|
||||
},
|
||||
// , {
|
||||
// value: '2',
|
||||
// label: '空间区域分层'
|
||||
// }
|
||||
],
|
||||
depthList: [],
|
||||
editable: [],
|
||||
jsonContent: null,
|
||||
depths: []
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
stepSampling: function (value) {},
|
||||
'$store.state.altRange': function(value) {
|
||||
const temp = (value === null || value === "") ? [1, 5] : value.split(',');
|
||||
this.depths = temp;
|
||||
this.depthList = [{
|
||||
startDepth: this.depths[0],
|
||||
endDepth: this.depths[1],
|
||||
}]
|
||||
this.$emit('handleDepthList', this.depthList)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
altRangeText: function () {
|
||||
return this.$store.state.altRange === null ||
|
||||
this.$store.state.altRange === ""
|
||||
? ""
|
||||
: "分层深度区间不包括结束深度值;实际样本深度范围:[" +
|
||||
this.$store.state.altRange +
|
||||
")";
|
||||
},
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.initParams();
|
||||
this.changeNum(0, 'editStartDepthInput');
|
||||
this.changeNum(0, 'editEndDepthInput');
|
||||
},
|
||||
methods: {
|
||||
initParams() {
|
||||
this.depthList = [{
|
||||
startDepth: this.depths[0],
|
||||
endDepth: this.depths[1],
|
||||
}];
|
||||
this.$emit('handleDepthList', this.depthList);
|
||||
},
|
||||
// 修改地表覆盖
|
||||
changeNum(index, className) {
|
||||
// tableList为表格数据
|
||||
this.editable = new Array(this.depthList.length);
|
||||
this.editable[index] = true;
|
||||
// this.saveItem = this.depthList[index];
|
||||
this.$set(this.editable, index, true);
|
||||
//让input自动获取焦点
|
||||
this.$nextTick(function () {
|
||||
var editInputList = document.getElementsByClassName(className);
|
||||
editInputList[0]?.children[0]?.focus();
|
||||
});
|
||||
},
|
||||
addDepthT() {
|
||||
this.depthList.push({ startDepth: this.depths[0], endDepth: this.depths[1] });
|
||||
},
|
||||
removeDepthT(index) {
|
||||
if(this.depthList.length === 1) return;
|
||||
this.depthList.splice(index, 1);
|
||||
},
|
||||
setHierarchy(val) {
|
||||
// console.log("当前值", val);
|
||||
if (val === "0") {
|
||||
this.depthList = [
|
||||
{
|
||||
startDepth: "1",
|
||||
endDepth: "5",
|
||||
},
|
||||
];
|
||||
} else {
|
||||
this.depthList = [];
|
||||
}
|
||||
},
|
||||
uploadJsonFile(option) {
|
||||
console.log(option.file);
|
||||
const self = this;
|
||||
//新建一个FileReader
|
||||
const reader = new FileReader();
|
||||
//读取文件
|
||||
reader.readAsText(option.file, "UTF-8");
|
||||
//读取完文件之后会回来这里
|
||||
reader.onload = function (evt) {
|
||||
// 读取文件内容
|
||||
const fileString = evt.target.result;
|
||||
// console.log(fileString);
|
||||
self.jsonContent = fileString;
|
||||
};
|
||||
},
|
||||
submitSampleFunSet() {
|
||||
// console.log(this.jsonContent)
|
||||
if (this.hierarchyVal === "2" && this.jsonContent === null) {
|
||||
this.$message.error("请上传深度JSON文件");
|
||||
return false;
|
||||
}
|
||||
// this.stepShow = false;
|
||||
this.$emit('handleStepSampling', false);
|
||||
this.$emit('handleDepthList', this.depthList);
|
||||
},
|
||||
cancelSampleFunSet() {
|
||||
// this.stepShow = false;
|
||||
this.$emit('handleStepSampling', false);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.sp3 {
|
||||
position: relative;
|
||||
top: -13px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.sampleFunParam .upload-demo {
|
||||
display: inline-block;
|
||||
}
|
||||
.hint {
|
||||
padding: 15px 0;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,562 @@
|
|||
<template>
|
||||
<div class="soilMositure">
|
||||
<div class="smBodyLeft">
|
||||
<div class="smps">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span><span class="sp2">样本库</span>
|
||||
</div>
|
||||
<div>
|
||||
<el-form :inline="true" :model="simpleForm" class="demo-form-inline">
|
||||
<el-form-item>
|
||||
<!-- <el-select
|
||||
v-model="simpleForm.sampleFun"
|
||||
:disabled="sampleFun !== ''"
|
||||
size="mini"
|
||||
placeholder="请选择抽样方法"
|
||||
@change="changeSampleFun"
|
||||
>
|
||||
<el-option label="" value=""></el-option>
|
||||
<el-option label="随机抽样" value="0"></el-option>
|
||||
<el-option label="分层抽样" value="1"></el-option>
|
||||
<el-option label="等距抽样" value="2"></el-option>
|
||||
</el-select> -->
|
||||
<el-cascader
|
||||
v-model="simpleForm.sampleFun"
|
||||
:disabled="sampleFun !== ''"
|
||||
:options="funcOpt"
|
||||
size="mini"
|
||||
placeholder="请选择抽样方法"
|
||||
popper-class="cascader-popper"
|
||||
@change="changeSampleFun"
|
||||
clearable
|
||||
:show-all-levels="false"
|
||||
></el-cascader>
|
||||
<el-button
|
||||
v-if="isDeepSpace"
|
||||
class="edit-btn"
|
||||
plain
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit-outline"
|
||||
@click="editDeepSpace"
|
||||
></el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input
|
||||
v-model="simpleForm.sampleNum"
|
||||
size="mini"
|
||||
placeholder="请输入样本个数"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="samplesCk">确定</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
v-loading="loading"
|
||||
element-loading-text="拼命加载中"
|
||||
element-loading-spinner="el-icon-loading"
|
||||
element-loading-background="rgba(0, 0, 0, 0.8)"
|
||||
:data="simpleData"
|
||||
tooltip-effect="dark"
|
||||
:header-cell-style="headerRowClass"
|
||||
style="width: 98%; margin-left: 1%"
|
||||
@selection-change="handleSelectionChange"
|
||||
:stripe="true"
|
||||
:cell-style="tableRowClassName"
|
||||
height="460"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column label="序号" type="index" width="70">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="sampleId"
|
||||
label="样本编号"
|
||||
show-overflow-tooltip
|
||||
min-width="100px;"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="lat"
|
||||
label="纬度"
|
||||
sortable
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="lon"
|
||||
label="经度"
|
||||
sortable
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="dataValue"
|
||||
:label="productSubTypeName"
|
||||
show-overflow-tooltip
|
||||
sortable
|
||||
min-width="150px;"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="dataTime"
|
||||
label="采样时间"
|
||||
sortable
|
||||
show-overflow-tooltip
|
||||
min-width="120px;"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope"
|
||||
><i
|
||||
class="el-icon-delete"
|
||||
@click="deleteSelected(scope.$index, simpleData)"
|
||||
></i
|
||||
></template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="smBodyRight">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span
|
||||
><span class="sp2">待检验产品及样本分布结果</span>
|
||||
</div>
|
||||
<div
|
||||
class="sceneShowContent"
|
||||
id="cesiumView"
|
||||
@click="pickValue"
|
||||
style="overflow: hidden; position: relative"
|
||||
></div>
|
||||
</div>
|
||||
<SampleSetting
|
||||
:stepSampling="stepSampling"
|
||||
@handleStepSampling="handleStepSampling"
|
||||
@handleDepthList="handleDepthList"
|
||||
:sampleCldFun="sampleCldFun"
|
||||
ref="sampleSettingPanel"
|
||||
></SampleSetting>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getSampleData,
|
||||
getOrderSamples,
|
||||
getSamplesByLayer,
|
||||
deleteOrderSamplesByID,
|
||||
} from "@/api/pendingOrder";
|
||||
import cu from "@/lib/cesiumUtils";
|
||||
import SampleSetting from "@/components/ration/sampleSetting/index.vue";
|
||||
import WKT from "terraformer-wkt-parser";
|
||||
import Formator from "@/mixins/formator";
|
||||
export default {
|
||||
components: {
|
||||
SampleSetting,
|
||||
},
|
||||
mixins: [Formator],
|
||||
props: {
|
||||
sampleFun: {
|
||||
require: true,
|
||||
type: String,
|
||||
},
|
||||
sampleCldFun: {
|
||||
require: false,
|
||||
type: String,
|
||||
},
|
||||
pixelFun: {
|
||||
require: true,
|
||||
type: String,
|
||||
},
|
||||
geoWorkSpace: {
|
||||
require: true,
|
||||
type: String,
|
||||
},
|
||||
geoLayerName: {
|
||||
require: true,
|
||||
type: String,
|
||||
},
|
||||
geoLayerPos: {
|
||||
require: true,
|
||||
},
|
||||
pixelNum: {
|
||||
require: true,
|
||||
},
|
||||
orderId: {
|
||||
require: true,
|
||||
},
|
||||
productSubType: {
|
||||
require: true,
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
formatDate(inputTime) {
|
||||
if (!inputTime && typeof inputTime !== "number") {
|
||||
return "";
|
||||
}
|
||||
var localTime = "";
|
||||
inputTime = new Date(inputTime);
|
||||
const offset = new Date().getTimezoneOffset();
|
||||
localTime = new Date(inputTime - offset * 60000).toISOString();
|
||||
localTime = localTime.substr(0, localTime.lastIndexOf("."));
|
||||
localTime = localTime.replace("T", " ");
|
||||
return localTime;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
simpleForm: {
|
||||
sampleFun: "",
|
||||
sampleNum: "",
|
||||
},
|
||||
simpleData: [],
|
||||
loading: true,
|
||||
allSampleData: [],
|
||||
simpleDataTotal: 0,
|
||||
smLabel: "土壤水分",
|
||||
pixelFormData: {
|
||||
pixelDealFun: "",
|
||||
},
|
||||
multipleSelection: [],
|
||||
pdShow: false,
|
||||
stepSampling: false,
|
||||
funcOpt: [],
|
||||
isDeepSpace: false,
|
||||
depthList: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
cu.initCesium("cesiumView");
|
||||
cu.handleClick();
|
||||
cu.addlayer(this.geoWorkSpace, this.geoLayerName);
|
||||
let gp = this.geoLayerPos;
|
||||
cu.flyToLayerRect(gp[0], gp[1], gp[2], gp[3]);
|
||||
},
|
||||
created() {
|
||||
this.funcOpt = this.configration.funcOpt;
|
||||
this.getSplData();
|
||||
this.initParam();
|
||||
},
|
||||
methods: {
|
||||
handleStepSampling(newVal) {
|
||||
this.stepSampling = newVal;
|
||||
},
|
||||
handleDepthList(newVal) {
|
||||
// console.log('handleDepthList', newVal)
|
||||
this.depthList = newVal;
|
||||
},
|
||||
editDeepSpace() {
|
||||
this.stepSampling = true;
|
||||
},
|
||||
initParam() {
|
||||
if (this.sampleCldFun) {
|
||||
this.simpleForm.sampleFun = new Array(
|
||||
this.sampleFun,
|
||||
this.sampleCldFun
|
||||
);
|
||||
} else {
|
||||
this.simpleForm.sampleFun = new Array(this.sampleFun);
|
||||
}
|
||||
const ssf = Number(this.simpleForm.sampleFun[0]);
|
||||
if (
|
||||
this.simpleForm.sampleFun.length >= 1 &&
|
||||
ssf === 1 &&
|
||||
Number(this.simpleForm.sampleFun[1]) === 0
|
||||
) {
|
||||
this.isDeepSpace = true;
|
||||
} else {
|
||||
this.isDeepSpace = false;
|
||||
}
|
||||
// this.stepSampling = this.sampleFun == "1" && this?.sampleCldFun == "0";
|
||||
},
|
||||
pickValue() {
|
||||
cu.handleClick();
|
||||
},
|
||||
changeSampleFun(sfVal) {
|
||||
//保存样本抽样方法
|
||||
if (Array.isArray(sfVal)) {
|
||||
const ssf = Number(sfVal[0]);
|
||||
this.$store.commit("setSampleFun", sfVal.length === 0 ? null : ssf);
|
||||
if (sfVal.length >= 1 && ssf === 1 && Number(sfVal[1]) === 0) {
|
||||
this.isDeepSpace = true;
|
||||
} else {
|
||||
this.isDeepSpace = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
samplesCk() {
|
||||
const self = this;
|
||||
if (self.simpleForm.sampleFun[0] === "") {
|
||||
self.$message.error("请选择抽样方法");
|
||||
return false;
|
||||
}
|
||||
const ssf = self.simpleForm.sampleFun,
|
||||
st = self.simpleDataTotal,
|
||||
ssn = self.simpleForm.sampleNum;
|
||||
if (ssn == "") {
|
||||
this.$message.error("请选择抽样个数");
|
||||
this.getSplData();
|
||||
return false;
|
||||
}
|
||||
if (ssn > st) {
|
||||
this.$message.error("抽样数不可大于总样本数量");
|
||||
return false;
|
||||
}
|
||||
if (ssn < 0) {
|
||||
this.$message.error("样本个数不可为负数");
|
||||
return false;
|
||||
}
|
||||
if (Number(ssf[0]) === 1) {
|
||||
const stepSampParams = self.$refs.sampleSettingPanel;
|
||||
// const hierarchyVal = stepSampParams.hierarchyVal;
|
||||
const hierarchyVal = ssf[1];
|
||||
if (hierarchyVal === "" || hierarchyVal === undefined) {
|
||||
self.stepSampling = true;
|
||||
return false;
|
||||
}
|
||||
const ssForm = new FormData();
|
||||
ssForm.append("samplesList", JSON.stringify(self.allSampleData));
|
||||
ssForm.append("stepType", Number(hierarchyVal));
|
||||
ssForm.append("orderID", self.orderId);
|
||||
// ssForm.append("productType",this.productSubType);
|
||||
if (hierarchyVal === "0") {
|
||||
// const depthList = stepSampParams.depthList;
|
||||
const depthList = this.depthList;
|
||||
// console.log('=====', depthList)
|
||||
ssForm.append("condition", JSON.stringify(depthList));
|
||||
} else if (hierarchyVal === "2") {
|
||||
const jsonContent = JSON.parse(stepSampParams.jsonContent);
|
||||
// const jsonContentWKT = WKT.convert(jsonContent.geometries[0]);
|
||||
const jg = jsonContent.geometries;
|
||||
const newPolygon = [];
|
||||
for (let i in jg) {
|
||||
const jsonContentWKT = WKT.convert(jg[i]);
|
||||
newPolygon.push({ coordinates: jsonContentWKT });
|
||||
}
|
||||
ssForm.append("condition", JSON.stringify(newPolygon));
|
||||
}
|
||||
ssForm.append("splCount", ssn);
|
||||
getSamplesByLayer(ssForm).then((res) => {
|
||||
if (res.length === 0 || res === []) {
|
||||
self.multipleSelection = self.simpleData = [];
|
||||
cu.removePoint();
|
||||
self.$message.error("当前分层设置返回列表为空");
|
||||
return false;
|
||||
} else {
|
||||
const dl = [];
|
||||
for (let i in res) {
|
||||
const ri = res[i];
|
||||
for (let j in ri) {
|
||||
ri[j]["hierarchicalIdentification"] = i;
|
||||
dl.push(ri[j]);
|
||||
}
|
||||
}
|
||||
self.multipleSelection = self.simpleData = dl;
|
||||
self.$refs.multipleTable.toggleAllSelection();
|
||||
cu.removePoint();
|
||||
for (let i in dl) {
|
||||
cu.addPoint(dl[i].lon, dl[i].lat, dl[i].alt);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
const spFrom = new FormData();
|
||||
spFrom.append("sampleFun", Number(ssf[0])); //抽样方法
|
||||
spFrom.append("minNum", 0);
|
||||
spFrom.append("MaxNum", st - 1); //样本总数
|
||||
spFrom.append("splCount", ssn); //抽样个数
|
||||
getSampleData(spFrom).then((res) => {
|
||||
const dl = [];
|
||||
for (const i in res) {
|
||||
let sri = self.allSampleData[res[i]];
|
||||
sri["hierarchicalIdentification"] = "0";
|
||||
dl.push(sri);
|
||||
}
|
||||
self.multipleSelection = self.simpleData = dl;
|
||||
self.$refs.multipleTable.toggleAllSelection();
|
||||
cu.removePoint();
|
||||
for (let i in dl) {
|
||||
cu.addPoint(dl[i].lon, dl[i].lat, dl[i].alt);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
tableRowClassName({ rowIndex }) {
|
||||
if ((rowIndex + 1) % 2 !== 0) {
|
||||
return "background:#F5F7FA;text-align:center";
|
||||
} else {
|
||||
return "background:#FFFFFF;text-align:center";
|
||||
}
|
||||
},
|
||||
headerRowClass() {
|
||||
return "background: #E4E9F1;text-align:center";
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
cu.removePoint();
|
||||
if (val.length !== 0) {
|
||||
for (let i in val) {
|
||||
cu.addPoint(val[i].lon, val[i].lat, val[i].alt);
|
||||
}
|
||||
}
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
getSplData() {
|
||||
getOrderSamples(this.orderId, this.productSubType).then((res) => {
|
||||
if (res.code == 200) {
|
||||
let rd = res.data;
|
||||
for (const i in rd) {
|
||||
rd[i]["hierarchicalIdentification"] = "0";
|
||||
}
|
||||
this.multipleSelection = this.allSampleData = this.simpleData = rd;
|
||||
this.loading = false;
|
||||
this.$refs.multipleTable.toggleAllSelection();
|
||||
let min = Number.MAX_SAFE_INTEGER;
|
||||
let max = Number.MIN_SAFE_INTEGER;
|
||||
this.$store.commit("setAltRange", null);
|
||||
this.allSampleData.forEach((k, v) => {
|
||||
k.dataTime = this.formatDatetime(k.dataTime);
|
||||
min = min > k.alt ? k.alt : min;
|
||||
max = max < k.alt ? k.alt : max;
|
||||
});
|
||||
if (this.allSampleData.length > 0) {
|
||||
this.$store.commit("setAltRange", min + "," + (max + 1));
|
||||
}
|
||||
this.simpleDataTotal = this.simpleForm.total = rd.length;
|
||||
}
|
||||
});
|
||||
},
|
||||
deleteSelected(index, simpleData) {
|
||||
simpleData.splice(index, 1);
|
||||
// deleteOrderSamplesByID(sampleId, this.productSubType).then((res) => {
|
||||
// if (res.code == 200) {
|
||||
// this.getSplData();
|
||||
// }
|
||||
// });
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
productSubTypeName: function () {
|
||||
return this.configration.subProductName[this.productSubType];
|
||||
},
|
||||
globalSampleFun: function () {
|
||||
return this.$store.state.sampleFun;
|
||||
},
|
||||
globalPixelFun: function () {
|
||||
return this.$store.state.pixelFun;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.soilMositure {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.smBodyLeft {
|
||||
width: 56%;
|
||||
height: 570px;
|
||||
float: left;
|
||||
margin-right: 4px;
|
||||
}
|
||||
.smBodyRight {
|
||||
width: calc(44% - 4px);
|
||||
height: 570px;
|
||||
background-color: white;
|
||||
float: left;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.smps {
|
||||
height: 570px;
|
||||
background-color: white;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
/deep/.smps .el-form-item {
|
||||
margin-left: 15px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
/deep/.smps .el-table th > .cell {
|
||||
font-size: 15px;
|
||||
}
|
||||
/deep/.smps .el-table .cell {
|
||||
font-size: 13px;
|
||||
}
|
||||
.block .pagination-container {
|
||||
padding: 0px;
|
||||
margin-top: 6px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pixelDeal {
|
||||
height: 165px;
|
||||
background-color: white;
|
||||
}
|
||||
/deep/.pixelDeal .el-form-item {
|
||||
margin-left: 15px;
|
||||
}
|
||||
.cardsp {
|
||||
display: block;
|
||||
margin-left: 17px;
|
||||
font-size: 15px;
|
||||
color: #606266;
|
||||
line-height: 40px;
|
||||
}
|
||||
.sceneShowContent {
|
||||
margin: 10px;
|
||||
height: calc(100% - 60px);
|
||||
background-color: rgb(110, 110, 207);
|
||||
}
|
||||
.box1 {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid rgb(205, 205, 205, 0.5);
|
||||
}
|
||||
.sp1 {
|
||||
display: inline-block;
|
||||
width: 7px;
|
||||
height: 26px;
|
||||
background-color: #354595;
|
||||
vertical-align: top;
|
||||
margin-left: 20px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.sp2 {
|
||||
margin-left: 10px;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #354595;
|
||||
vertical-align: top;
|
||||
}
|
||||
.sp3 {
|
||||
position: relative;
|
||||
top: -13px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
// 分层抽样弹出框设置
|
||||
/deep/.sampleFunParam .el-upload-dragger .el-icon-upload {
|
||||
margin: 0;
|
||||
line-height: 30px;
|
||||
font-size: 20px;
|
||||
color: black;
|
||||
}
|
||||
.sampleFunParam .upload-demo {
|
||||
display: inline-block;
|
||||
}
|
||||
/deep/.sampleFunParam .el-upload-dragger {
|
||||
width: 150px;
|
||||
height: 35px;
|
||||
margin-left: 15px;
|
||||
margin-top: 20px;
|
||||
border: 1px solid #d9d9d9;
|
||||
}
|
||||
/deep/.sampleFunParam .el-dialog__body {
|
||||
padding: 20px 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.edit-btn {
|
||||
margin-left: 15px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,279 @@
|
|||
<template>
|
||||
<div class="qtReportTable">
|
||||
<el-table
|
||||
:header-cell-style="headerRowClass"
|
||||
:cell-style="tableRowClassName"
|
||||
style="width: 100%"
|
||||
:data="tData"
|
||||
:stripe="true"
|
||||
size="medium"
|
||||
height="400"
|
||||
>
|
||||
<el-table-column
|
||||
label="待检验地物类型"
|
||||
property="待检验地物类型"
|
||||
align="center"
|
||||
width="160"
|
||||
>
|
||||
<el-table-column
|
||||
label="样本真值"
|
||||
property="样本真值"
|
||||
align="center"
|
||||
width="160"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-for="(item, index) in tHeader"
|
||||
:key="index"
|
||||
:label="item"
|
||||
:property="item"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row[item] }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
errorMatrix: {
|
||||
require: false,
|
||||
},
|
||||
preResults: {
|
||||
require: false,
|
||||
},
|
||||
activeTabs: {
|
||||
require: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
realCheckRes: [],
|
||||
tableKey: [],
|
||||
tData: [],
|
||||
tHeader: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.creatTableData();
|
||||
},
|
||||
methods: {
|
||||
headerRowClass() {
|
||||
return "background: #E4E9F1;text-align:center";
|
||||
},
|
||||
tableRowClassName({ rowIndex }) {
|
||||
if ((rowIndex + 1) % 2 !== 0) {
|
||||
return "background:#F5F7FA;text-align:center";
|
||||
} else {
|
||||
return "background:#FFFFFF;text-align:center";
|
||||
}
|
||||
},
|
||||
creatTableData() {
|
||||
if (this.errorMatrix[0]) {
|
||||
const em = this.errorMatrix;
|
||||
const at = this.activeTabs;
|
||||
const pr = this.preResults;
|
||||
let tes = null;
|
||||
this.tHeader.push("样本真值");
|
||||
let rowHeaderRaw = em[em[0].length];
|
||||
for (let i = 0; i < rowHeaderRaw.length; i++) {
|
||||
this.tHeader.push(rowHeaderRaw[i]);
|
||||
}
|
||||
switch (at) {
|
||||
//像元数count
|
||||
case "pixel":
|
||||
tes = "count";
|
||||
this.tHeader.push("合计");
|
||||
break;
|
||||
// percentage(百分比)
|
||||
// case "percentage":
|
||||
// tes = "percentage";
|
||||
// this.tHeader.push("合计");
|
||||
// break;
|
||||
// userViscosity(用户精度)
|
||||
case "userPre":
|
||||
tes = "count";
|
||||
this.tHeader.push("用户精度");
|
||||
// tes = "userViscosity";
|
||||
break;
|
||||
// producerAccuracy(生产者精度)
|
||||
case "producerPre":
|
||||
tes = "count";
|
||||
// tes = "producerAccuracy";
|
||||
break;
|
||||
// commissionErrors(错分误差)
|
||||
case "errorPre":
|
||||
tes = "count";
|
||||
this.tHeader.push("错分精度");
|
||||
break;
|
||||
// omissionErrors(漏分误差)
|
||||
case "LeakagePre":
|
||||
tes = "count";
|
||||
this.tHeader.push("漏分精度");
|
||||
// tes = "omissionErrors";
|
||||
break;
|
||||
}
|
||||
|
||||
let rows = [];
|
||||
let colHeaderRaw = em[em[0].length + 1];
|
||||
let rcr = [];
|
||||
let all = 0;
|
||||
for (let i = 0; i < em[0].length; i++) {
|
||||
const ei = em[i];
|
||||
let objR = new Object();
|
||||
let tv = 0;
|
||||
let rowJson = {};
|
||||
rowJson[this.tHeader[0]] = colHeaderRaw[i];
|
||||
for (let j = 0; j < em[i].length; j++) {
|
||||
rowJson[this.tHeader[j + 1]] = parseFloat(ei[j][tes].toFixed(4));
|
||||
objR[[j]] = ei[j][tes];
|
||||
//计算合计值
|
||||
tv += ei[j][tes];
|
||||
}
|
||||
all += tv;
|
||||
// if (pr !== undefined) {
|
||||
if (at === "userPre" || at === "errorPre" || at === "LeakagePre")
|
||||
rowJson[this.tHeader[em[i].length + 1]] = parseFloat(
|
||||
pr[rowJson[this.tHeader[0]]].toFixed(3)
|
||||
);
|
||||
else rowJson[this.tHeader[em[i].length + 1]] = tv.toFixed(0);
|
||||
// }
|
||||
rows.push(rowJson);
|
||||
rcr.push(objR);
|
||||
}
|
||||
const newRcr = this.verticalTotal(rcr);
|
||||
newRcr.push(all);
|
||||
let lastRow = {};
|
||||
if (at === "pixel") {
|
||||
lastRow[this.tHeader[0]] = "合计";
|
||||
let m = 1;
|
||||
for (let i in newRcr) {
|
||||
lastRow[this.tHeader[m++]] = newRcr[i].toFixed(0);
|
||||
}
|
||||
rows.push(lastRow);
|
||||
} else if (at === "producerPre") {
|
||||
lastRow[this.tHeader[0]] = "生产者精度";
|
||||
// if (pr !== undefined) {
|
||||
for (var i in pr) {
|
||||
lastRow[i] = parseFloat(pr[i].toFixed(3));
|
||||
}
|
||||
// }
|
||||
rows.push(lastRow);
|
||||
}
|
||||
this.tHeader = this.tHeader.slice(1);
|
||||
this.tData = rows;
|
||||
}
|
||||
},
|
||||
// 数组根据key值进行合并
|
||||
newMap(a1, a2, key) {
|
||||
let ttt = [];
|
||||
for (let i in a1) {
|
||||
const rv = a1[i][key];
|
||||
let newObj = {};
|
||||
for (let j in a2) {
|
||||
const rv2 = a2[j][key];
|
||||
if (rv2 === rv) {
|
||||
ttt.push(Object.assign(newObj, a1[i], a2[j]));
|
||||
}
|
||||
}
|
||||
}
|
||||
return ttt;
|
||||
},
|
||||
// 数组对象根据key值去重
|
||||
deweight(arr, key) {
|
||||
let ret = [];
|
||||
arr.forEach((item) => {
|
||||
let compare = [];
|
||||
ret.forEach((retitem) => {
|
||||
compare.push(retitem[key]);
|
||||
});
|
||||
if (compare.indexOf(item[key]) === -1) {
|
||||
ret.push(item);
|
||||
}
|
||||
});
|
||||
return ret;
|
||||
},
|
||||
verticalTotal(matrix) {
|
||||
let result = [];
|
||||
let len = matrix.length;
|
||||
for (let i = 0; i < len; i++) {
|
||||
let sum = 0;
|
||||
for (let j = 0; j < len; j++) {
|
||||
sum += matrix[j][i];
|
||||
}
|
||||
result.push(sum);
|
||||
}
|
||||
return result;
|
||||
},
|
||||
arrSum(a) {
|
||||
let res = a.reduce((result, next) => {
|
||||
if (!result) result = {};
|
||||
Object.keys(next).forEach((key) => {
|
||||
//数值类型
|
||||
if (typeof next[key] == "number") {
|
||||
result[key] = (result[key] ? result[key] : 0) + next[key];
|
||||
}
|
||||
//数组类型
|
||||
if (next[key] instanceof Array) {
|
||||
result[key] = (result[key] ? result[key] : []).concat(next[key]);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
});
|
||||
return res;
|
||||
},
|
||||
changeRowCodeToName(rowCode, rowCodeMap) {
|
||||
if (rowCode == null) return null;
|
||||
else return rowCodeMap[rowCode];
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less">
|
||||
.qtReportTable {
|
||||
.el-table thead.is-group th {
|
||||
background: none;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.el-table thead.is-group tr:first-of-type th:first-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
.el-table thead.is-group tr:first-of-type th:first-of-type div.cell {
|
||||
text-align: right;
|
||||
}
|
||||
.el-table thead.is-group tr:last-of-type th:first-of-type div.cell {
|
||||
text-align: left;
|
||||
}
|
||||
.el-table thead.is-group tr:first-of-type th:first-of-type:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 2px;
|
||||
height: 200px;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: #000;
|
||||
opacity: 0.3;
|
||||
display: block;
|
||||
transform: rotate(-73.5deg);
|
||||
-webkit-transform-origin: top;
|
||||
transform-origin: top;
|
||||
}
|
||||
.el-table thead.is-group tr:last-of-type th:first-of-type:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 2px;
|
||||
height: 200px;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background-color: #000;
|
||||
opacity: 0.3;
|
||||
display: block;
|
||||
transform: rotate(-74deg);
|
||||
-webkit-transform-origin: bottom;
|
||||
transform-origin: bottom;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,542 @@
|
|||
<template>
|
||||
<div class="rtReport">
|
||||
<div class="realResult">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span><span class="sp2">真实性检验结果</span>
|
||||
</div>
|
||||
<div class="resContent">
|
||||
<el-table
|
||||
:header-cell-style="headerRowClass"
|
||||
:cell-style="tableRowClassName"
|
||||
style="width: 100%"
|
||||
:data="tDatas"
|
||||
:stripe="true"
|
||||
class="table-head-transparent"
|
||||
size="medium"
|
||||
>
|
||||
<el-table-column
|
||||
v-for="(item, index) in Object.keys(tData).slice(0, midValue)"
|
||||
:key="index"
|
||||
:label="item | truthFunFilter"
|
||||
:property="item"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row[item] }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table
|
||||
:header-cell-style="headerRowClass"
|
||||
:cell-style="tableRowClassName"
|
||||
style="width: 100%; margin-top: 16px"
|
||||
:data="tDatas"
|
||||
:stripe="true"
|
||||
class="table-head-transparent"
|
||||
size="medium"
|
||||
>
|
||||
<el-table-column
|
||||
v-for="(item, index) in Object.keys(tData).slice(midValue)"
|
||||
:key="index"
|
||||
:label="item | truthFunFilter"
|
||||
:property="item"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row[item] }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--<span v-for="(item,index) in resMap" :key="index">{{item.name | truthFunFilter}}:{{item.val}}</span>-->
|
||||
<div v-if="meanError.length !== 0 && meanError !== []">
|
||||
<el-table
|
||||
:header-cell-style="headerRowClass"
|
||||
:cell-style="tableRowClassName"
|
||||
style="width: 100%"
|
||||
:data="meanError"
|
||||
:stripe="true"
|
||||
size="medium"
|
||||
>
|
||||
<el-table-column
|
||||
prop="3_0"
|
||||
label="平均相对误差:相对X轴误差"
|
||||
align="center"
|
||||
v-if="meanError[0]['3_0'] != null"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="3_1"
|
||||
label="平均相对误差:相对Y轴误差"
|
||||
align="center"
|
||||
v-if="meanError[0]['3_1'] != null"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="4_0"
|
||||
label="平均绝对相对误差:相对X轴误差"
|
||||
align="center"
|
||||
v-if="meanError[0]['4_0'] != null"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="4_1"
|
||||
label="平均绝对相对误差:相对Y轴误差"
|
||||
align="center"
|
||||
v-if="meanError[0]['4_1'] != null"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<!--<span>相对误差:</span>-->
|
||||
<!-- <div v-if="relativeError.length !== 0 && relativeError !== []">
|
||||
<el-table
|
||||
:data="relativeError"
|
||||
size="medium"
|
||||
>
|
||||
<el-table-column
|
||||
prop="cre_orthoXRelativeError"
|
||||
label="相对误差:相对X轴误差"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="cre_orthoYRelativeError"
|
||||
label="相对误差:相对Y轴误差"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="errorGraph">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span
|
||||
><span class="sp2">{{ pdSubTypeName }}误差结果图</span>
|
||||
</div>
|
||||
<div class="errContent">
|
||||
<div id="rtReportEcharts" ref="chart"></div>
|
||||
<div class="legend" v-if="pdSubType === 1">
|
||||
<div class="line">
|
||||
<span class="circle"></span>
|
||||
<span>样本点</span>
|
||||
</div>
|
||||
<div class="line">
|
||||
<span class="circle_2"></span>
|
||||
<span>选取点</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { productTypeMap } from "@/lib/variateMap";
|
||||
import { truthFunVal, productSubTypeVal } from "@/lib/contract";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
realRes: {
|
||||
require: true,
|
||||
},
|
||||
pdSubType: {
|
||||
require: true,
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
truthFunFilter(truthFun) {
|
||||
const truthFunMap = {
|
||||
0: "平均误差",
|
||||
1: "平均绝对误差",
|
||||
2: "相对误差",
|
||||
3: "平均相对误差",
|
||||
4: "平均绝对相对误差",
|
||||
5: "均方根误差",
|
||||
6: "平面中误差",
|
||||
7: "相关系数",
|
||||
8: "误差矩阵",
|
||||
9: "总体分类精度",
|
||||
10: "Kappa系数",
|
||||
};
|
||||
return truthFunMap[truthFun];
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
resMap: [],
|
||||
myCharts: null,
|
||||
relativeError: [],
|
||||
meanError: [],
|
||||
pdSubTypeName: "",
|
||||
tData: {},
|
||||
tDatas: null,
|
||||
midValue: 10,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.initParam();
|
||||
},
|
||||
mounted() {
|
||||
this.myCharts = this.$echarts.init(this.$refs.chart);
|
||||
if (this.pdSubType === 1) {
|
||||
this.drawOtgEchart(this.realRes.otgVal);
|
||||
let da = {};
|
||||
let dae = {};
|
||||
for (let i = 0; i < this.resMap.length; i++) {
|
||||
const o = this.resMap[i];
|
||||
if (typeof o.val === "number" || typeof o.val === "string") {
|
||||
da[o.name] = o.val;
|
||||
} else if (Number(o.name) === truthFunVal.ACM_MEANRELATIVEERROR) {
|
||||
dae[o.name + "_0"] = o.val.X轴平均相对误差;
|
||||
dae[o.name + "_1"] = o.val.Y轴平均相对误差;
|
||||
} else if (
|
||||
Number(o.name) === truthFunVal.ACM_MEANABSOLUTERELATIVEERROR
|
||||
) {
|
||||
dae[o.name + "_0"] = o.val.X轴平均相对绝对误差;
|
||||
dae[o.name + "_1"] = o.val.Y轴平均相对绝对误差;
|
||||
}
|
||||
}
|
||||
if (Object.keys(dae).length !== 0) {
|
||||
this.meanError = [dae];
|
||||
}
|
||||
this.tData = da;
|
||||
this.tDatas = [da];
|
||||
} else {
|
||||
this.drawPie(this.realRes.errorImageValue);
|
||||
let da = {};
|
||||
this.midValue =
|
||||
this.resMap.length - 1 >= 3
|
||||
? Math.ceil((this.resMap.length - 1) / 2)
|
||||
: this.resMap.length;
|
||||
|
||||
for (let i = 0; i < this.resMap.length; i++) {
|
||||
const o = this.resMap[i];
|
||||
if (
|
||||
Number(o.name) === truthFunVal.ACM_RELATIVEERROR ||
|
||||
Number(o.name) === truthFunVal.ACM_REALVALLIST
|
||||
)
|
||||
continue; //跳过执行相对误差与真值列表
|
||||
da[o.name] =
|
||||
typeof o.val === "number" || typeof o.val === "string"
|
||||
? o.val
|
||||
: o.val[0];
|
||||
}
|
||||
this.tDatas = [da];
|
||||
this.tData = da;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
headerRowClass() {
|
||||
return "background: #E4E9F1;text-align:center";
|
||||
},
|
||||
tableRowClassName({ rowIndex }) {
|
||||
if ((rowIndex + 1) % 2 !== 0) {
|
||||
return "background:#F5F7FA;text-align:center";
|
||||
} else {
|
||||
return "background:#FFFFFF;text-align:center";
|
||||
}
|
||||
},
|
||||
getProductDes() {
|
||||
let prodDes = null;
|
||||
switch (this.pdSubType) {
|
||||
case 2:
|
||||
prodDes = "高程值,单位:米";
|
||||
break;
|
||||
case 3:
|
||||
prodDes = "后向散射系数,单位:dB";
|
||||
break;
|
||||
case 4:
|
||||
prodDes = "延迟相位值";
|
||||
break;
|
||||
case 5:
|
||||
prodDes = "形变量,单位:米";
|
||||
break;
|
||||
case 7:
|
||||
prodDes = "土壤含水量";
|
||||
break;
|
||||
case 8:
|
||||
prodDes = "土壤盐碱度";
|
||||
break;
|
||||
case 9:
|
||||
prodDes = "地表粗糙度";
|
||||
break;
|
||||
case 10:
|
||||
prodDes = "植被高度值,单位:米";
|
||||
break;
|
||||
case 11:
|
||||
prodDes = "叶面积指数";
|
||||
break;
|
||||
}
|
||||
return prodDes;
|
||||
},
|
||||
initParam() {
|
||||
// console.log('报告信息',this.realRes)
|
||||
if (this.realRes !== undefined) {
|
||||
this.pdSubTypeName = productTypeMap(this.pdSubType);
|
||||
const rr = this.realRes.report;
|
||||
if (this.pdSubType === productSubTypeVal.ACS_ORTHOPHOTO) {
|
||||
for (var i in rr) {
|
||||
let rVal = rr[i];
|
||||
switch (Number(i)) {
|
||||
case truthFunVal.ACM_RELATIVEERROR: //相对误差
|
||||
this.relativeError = rVal;
|
||||
break;
|
||||
case truthFunVal.ACM_MEANRELATIVEERROR: //平均相对误差
|
||||
const objMap1 = {
|
||||
cre_orthoXMeanRelativeError: "X轴平均相对误差",
|
||||
cre_orthoYMeanRelativeError: "Y轴平均相对误差",
|
||||
};
|
||||
rVal = Object.fromEntries(
|
||||
Object.entries(rVal).map(([k, v]) => [objMap1[k] || k, v])
|
||||
);
|
||||
this.resMap.push({ name: i, val: rVal });
|
||||
break;
|
||||
case truthFunVal.ACM_MEANABSOLUTERELATIVEERROR: //平均绝对相对误差
|
||||
const objMap2 = {
|
||||
cre_orthoXMeanAbsoluteRelativeError: "X轴平均相对绝对误差",
|
||||
cre_orthoYMeanAbsoluteRelativeError: "Y轴平均相对绝对误差",
|
||||
};
|
||||
rVal = Object.fromEntries(
|
||||
Object.entries(rVal).map(([k, v]) => [objMap2[k] || k, v])
|
||||
);
|
||||
this.resMap.push({ name: i, val: rVal });
|
||||
break;
|
||||
default:
|
||||
this.resMap.push({ name: i, val: rVal });
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (var i in rr) {
|
||||
let rVal = rr[i];
|
||||
this.resMap.push({ name: i, val: rVal });
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
drawPie(errorVala) {
|
||||
let data = [];
|
||||
let xArr = [];
|
||||
for (let i in errorVala) {
|
||||
const a = [errorVala[i].cre_imageValue, errorVala[i].cre_deviation];
|
||||
xArr.push(errorVala[i].cre_imageValue);
|
||||
data.push(a);
|
||||
}
|
||||
const x_limit = Math.abs(Math.max(...xArr) / xArr.length);
|
||||
//多项式回归
|
||||
// var myRegression = this.$ecstat.regression("polynomial", data, 3);
|
||||
let myRegression = this.$ecstat.regression("linear", data);
|
||||
|
||||
myRegression.points.sort(function (a, b) {
|
||||
return a[0] - b[0];
|
||||
});
|
||||
var option = {
|
||||
animation: false,
|
||||
xAxis: {
|
||||
name: "像元值(" + this.getProductDes() + ")",
|
||||
nameLocation: "middle",
|
||||
min: (Math.min(...xArr) - x_limit).toFixed(5),
|
||||
max: (Math.max(...xArr) + x_limit).toFixed(5),
|
||||
nameTextStyle: {
|
||||
lineHeight: 30,
|
||||
height: 60,
|
||||
fontWeight: "bold",
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
name: "误差",
|
||||
nameTextStyle: {
|
||||
lineHeight: 30,
|
||||
height: 60,
|
||||
fontWeight: "bold",
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
symbolSize: 10,
|
||||
type: "scatter",
|
||||
data: data,
|
||||
},
|
||||
{
|
||||
type: "line",
|
||||
smooth: true,
|
||||
showSymbol: false,
|
||||
data: myRegression.points,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: "#91cc75",
|
||||
lineStyle: {
|
||||
width: 3,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
option && this.myCharts.setOption(option);
|
||||
},
|
||||
drawOtgEchart(otgVal) {
|
||||
let xl = [];
|
||||
let yl = [];
|
||||
let allData = [];
|
||||
for (let i in otgVal) {
|
||||
xl.push(otgVal[i].x);
|
||||
yl.push(otgVal[i].y);
|
||||
|
||||
let ad = [];
|
||||
ad.push(otgVal[i].x, otgVal[i].y);
|
||||
allData.push(ad);
|
||||
const j = Number(i) + 1;
|
||||
if (Number.isInteger(j / 2)) {
|
||||
allData.push("-");
|
||||
}
|
||||
}
|
||||
let xMax = Math.max(...xl),
|
||||
xMin = Math.min(...xl);
|
||||
let yMax = Math.max(...yl),
|
||||
yMin = Math.min(...yl);
|
||||
const avgxVal = (xMax - xMin) / 8;
|
||||
const avgyVal = (yMax - yMin) / 8;
|
||||
let option = {
|
||||
grid: {
|
||||
left: "14%",
|
||||
},
|
||||
animation: false,
|
||||
xAxis: {
|
||||
name: "经度(°)",
|
||||
nameLocation: "middle",
|
||||
nameTextStyle: {
|
||||
lineHeight: 30,
|
||||
height: 60,
|
||||
fontWeight: "bold",
|
||||
},
|
||||
min: Number(xMin - avgxVal * 2).toFixed(4),
|
||||
max: Number(xMax + avgxVal * 2).toFixed(4),
|
||||
axisLabel: {
|
||||
formatter: function (value) {
|
||||
return Number(value);
|
||||
},
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
name: "纬度(°)",
|
||||
nameTextStyle: {
|
||||
lineHeight: 30,
|
||||
height: 60,
|
||||
fontWeight: "bold",
|
||||
},
|
||||
min: Number(yMin - avgyVal * 2).toFixed(4),
|
||||
max: Number(yMax + avgyVal * 2).toFixed(4),
|
||||
axisLabel: {
|
||||
formatter: function (value) {
|
||||
return Number(value);
|
||||
},
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
symbolSize: 8,
|
||||
data: allData,
|
||||
type: "line",
|
||||
itemStyle: {
|
||||
color: function (params) {
|
||||
if ((params.dataIndex + 1) % 3 === 2) return "#0000CD";
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
option && this.myCharts.setOption(option);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.rtReport {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.realResult {
|
||||
width: 100%;
|
||||
height: calc(55% - 5px);
|
||||
background-color: white;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.errorGraph {
|
||||
width: 100%;
|
||||
height: 45%;
|
||||
background-color: white;
|
||||
}
|
||||
.resContent {
|
||||
border: 1px black solid;
|
||||
height: calc(100% - 60px);
|
||||
width: calc(100% - 20px);
|
||||
margin: 10px;
|
||||
font-size: 20px;
|
||||
overflow-y: scroll;
|
||||
span {
|
||||
display: block;
|
||||
margin: 10px;
|
||||
}
|
||||
}
|
||||
.errContent {
|
||||
border: 1px black solid;
|
||||
height: calc(100% - 60px);
|
||||
width: calc(100% - 20px);
|
||||
margin: 10px;
|
||||
position: relative;
|
||||
}
|
||||
#rtReportEcharts {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.box1 {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid rgb(205, 205, 205, 0.5);
|
||||
}
|
||||
.sp1 {
|
||||
display: inline-block;
|
||||
width: 7px;
|
||||
height: 26px;
|
||||
background-color: #354595;
|
||||
vertical-align: top;
|
||||
margin-left: 20px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.sp2 {
|
||||
margin-left: 10px;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #354595;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.legend {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
right: 20px;
|
||||
background-color: transparent;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.line {
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 0 5px;
|
||||
.circle {
|
||||
display: inline-block;
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border: 1px solid rgb(194, 53, 49);
|
||||
border-radius: 50%;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.circle_2 {
|
||||
display: inline-block;
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
margin-right: 5px;
|
||||
border: 1px solid #0000cd;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,122 @@
|
|||
const path = {
|
||||
daichuli: "/daichuli", //待处理订单列表
|
||||
orderUnprocessed: "/orderUnprocessed", //订单反馈
|
||||
inspection: "/inspection", //检验处理
|
||||
report: "/report", //报告生成
|
||||
yichuli: "/yichuli",
|
||||
daishenhe: "/daishenhe",
|
||||
yishenhe: "/yishenhe",
|
||||
login: "/"
|
||||
};
|
||||
|
||||
const url = {
|
||||
otgSamplesPath:
|
||||
"/home/estar/eStarProject/webProject/microwave-project/microwaveData/sampleData/otgSamples.xlsx", //正射1
|
||||
lcSamplesPath:
|
||||
"/home/estar/eStarProject/webProject/microwave-project/microwaveData/sampleData/lcSamples.xlsx", //地表覆盖6
|
||||
solSamplesPath:
|
||||
"/home/estar/eStarProject/webProject/microwave-project/microwaveData/sampleData/solSamples.xlsx", //土壤水分7
|
||||
adcSamplePath:
|
||||
"/home/estar/eStarProject/webProject/microwave-project/microwaveData/sampleData/Atmospheric_Delay_Correction_Sample.xlsx", //干涉测量大气延迟校正4
|
||||
bscSamplePath:
|
||||
"/home/estar/eStarProject/webProject/microwave-project/microwaveData/sampleData/Back_Scattering_Coefficient_Sample.xlsx", // 后向散射系数3
|
||||
dSamplePath:
|
||||
"/home/estar/eStarProject/webProject/microwave-project/microwaveData/sampleData/Deformation_Sample.xlsx", // 干涉测量形变5
|
||||
glaiSamplePath:
|
||||
"/home/estar/eStarProject/webProject/microwave-project/microwaveData/sampleData/Ground_Leaf_Area_Index_Sample.xlsx", // 叶面积指数11
|
||||
gvhSamplePath:
|
||||
"/home/estar/eStarProject/webProject/microwave-project/microwaveData/sampleData/Ground_Vegetation_Height_Sample.xlsx", // 植被高度10
|
||||
demSamplePath:
|
||||
"/home/estar/eStarProject/webProject/microwave-project/microwaveData/sampleData/demSample.xlsx", // 高程产品2
|
||||
ssiSamplePath:
|
||||
"/home/estar/eStarProject/webProject/microwave-project/microwaveData/sampleData/Soil_Salinity_Inversion_Sample.xlsx", // 土壤盐碱度8
|
||||
srSamplePath:
|
||||
"/home/estar/eStarProject/webProject/microwave-project/microwaveData/sampleData/Surface_Roughness_Sample.xlsx", // 地表粗糙度9
|
||||
vpSamplePath:
|
||||
"/home/estar/eStarProject/webProject/microwave-project/microwaveData/sampleData/Vegetation_Phenology_Sample.xlsx" //Vegetation_Phenology_Sample.xlsx',// 植被物候12
|
||||
};
|
||||
const urlprefix = {
|
||||
pdfUrlPrefix: "http://10.0.36.121:8085/microwaveData/pdf/", ///192.168.106.132
|
||||
geoserverUrl: "http://10.0.36.121:8087/geoserver/gwc/service/wmts",
|
||||
otgGeoServerUrl: "http://10.0.36.121:8087/geoserver/gwc/service/wmts"
|
||||
};
|
||||
|
||||
const subProductName = [
|
||||
"", //0
|
||||
"正射校正", //1
|
||||
"高程产品", //2
|
||||
"后向散射系数", //3
|
||||
"大气延迟校正", //4
|
||||
"干涉测量形变", //5
|
||||
"地表覆盖类型", //6
|
||||
"土壤水分", //7
|
||||
"土壤盐碱度", //8
|
||||
"地表粗糙度", //9
|
||||
"植被高度", //10
|
||||
"叶面积指数", //11
|
||||
"植被物候" //12
|
||||
];
|
||||
|
||||
// 地物类型名称
|
||||
const groTypeName = [
|
||||
{
|
||||
value: "城市",
|
||||
label: "城市"
|
||||
},
|
||||
{
|
||||
value: "水体",
|
||||
label: "水体"
|
||||
},
|
||||
{
|
||||
value: "森林",
|
||||
label: "森林"
|
||||
},
|
||||
{
|
||||
value: "灌木地",
|
||||
label: "灌木地"
|
||||
},
|
||||
{
|
||||
value: "草地",
|
||||
label: "草地"
|
||||
},
|
||||
{
|
||||
value: "林地",
|
||||
label: "林地"
|
||||
},
|
||||
{
|
||||
value: "湖泊",
|
||||
label: "湖泊"
|
||||
},
|
||||
{
|
||||
value: "大棚旱地",
|
||||
label: "大棚旱地"
|
||||
},
|
||||
{
|
||||
value: "水域",
|
||||
label: "水域"
|
||||
},
|
||||
{
|
||||
value: "有林地阔叶林",
|
||||
label: "有林地阔叶林"
|
||||
},
|
||||
{
|
||||
value: "城镇用地",
|
||||
label: "城镇用地"
|
||||
},
|
||||
{
|
||||
value: "道路交通",
|
||||
label: "道路交通"
|
||||
},
|
||||
{
|
||||
value: "出芽期",
|
||||
label: "出芽期"
|
||||
}
|
||||
];
|
||||
|
||||
export default {
|
||||
path,
|
||||
url,
|
||||
urlprefix,
|
||||
subProductName,
|
||||
groTypeName
|
||||
};
|
|
@ -0,0 +1,223 @@
|
|||
const path = {
|
||||
daichuli: "/daichuli", //待处理订单列表
|
||||
orderUnprocessed: "/orderUnprocessed", //订单反馈
|
||||
inspection: "/inspection", //检验处理
|
||||
report: "/report", //报告生成
|
||||
yichuli: "/yichuli",
|
||||
daishenhe: "/daishenhe",
|
||||
yishenhe: "/yishenhe",
|
||||
login: "/"
|
||||
};
|
||||
|
||||
const prefix = "D:/deveEnvironment/nginx-1.18.0/html/microwaveData/sampleExcel";
|
||||
// const newPrefix = "/home/estar/eStarProject/webProject/microwave-project/microwaveData/sampleData";
|
||||
const newPrefix = "D:/deveEnvironment/nginx-1.18.0/html/microwaveData/sampleExcelNew";
|
||||
|
||||
const url = {
|
||||
otgSamplesPath: `${newPrefix}/otgSamples.xlsx`, //正射1
|
||||
lcSamplesPath: `${newPrefix}/lcSamples.xlsx`, //地表覆盖6
|
||||
solSamplesPath: `${newPrefix}/solSamples.xlsx`, //土壤水分7
|
||||
adcSamplePath: `${newPrefix}/Atmospheric_Delay_Correction_Sample.xlsx`, //干涉测量大气延迟校正4
|
||||
bscSamplePath: `${newPrefix}/Back_Scattering_Coefficient_Sample.xlsx`, // 后向散射系数3
|
||||
dSamplePath: `${newPrefix}/Deformation_Sample.xlsx`, // 干涉测量形变5
|
||||
glaiSamplePath: `${newPrefix}/Ground_Leaf_Area_Index_Sample.xlsx`, // 叶面积指数11
|
||||
gvhSamplePath: `${newPrefix}/Ground_Vegetation_Height_Sample.xlsx`, // 植被高度10
|
||||
demSamplePath: `${newPrefix}/demSample.xlsx`, // 高程产品2
|
||||
ssiSamplePath: `${newPrefix}/Soil_Salinity_Inversion_Sample.xlsx`, // 土壤盐碱度8
|
||||
srSamplePath: `${newPrefix}/Surface_Roughness_Sample.xlsx`, // 地表粗糙度9
|
||||
vpSamplePath: `${newPrefix}/Vegetation_Phenology_Sample.xlsx` //Vegetation_Phenology_Sample.xlsx,// 植被物候12
|
||||
};
|
||||
// const serverUrl = "http://10.0.36.121";
|
||||
const serverUrl = "http://192.168.1.104";
|
||||
// const serverUrl = "http://211.157.180.211";
|
||||
const urlprefix = {
|
||||
pdfUrlPrefix: `${serverUrl}:18085/microwaveData/pdf/`,
|
||||
samePoiImgsUrl: `${serverUrl}:18085/microwaveData/samePoiImgs/`,
|
||||
geoserverUrl: `${serverUrl}:8087/geoserver/gwc/service/wmts`,
|
||||
otgGeoServerUrl: `${serverUrl}:8087/geoserver/gwc/service/wmts`
|
||||
};
|
||||
|
||||
const subProductName = [
|
||||
"", //0
|
||||
"正射校正", //1
|
||||
"高程产品", //2
|
||||
"后向散射系数", //3
|
||||
"大气延迟校正", //4
|
||||
"干涉测量形变", //5
|
||||
"地表覆盖类型", //6
|
||||
"土壤水分", //7
|
||||
"土壤盐碱度", //8
|
||||
"地表粗糙度", //9
|
||||
"植被高度", //10
|
||||
"叶面积指数", //11
|
||||
"植被物候" //12
|
||||
];
|
||||
|
||||
// 地物类型名称
|
||||
const groTypeName = [
|
||||
{
|
||||
value: "城市",
|
||||
label: "城市"
|
||||
},
|
||||
{
|
||||
value: "水体",
|
||||
label: "水体"
|
||||
},
|
||||
{
|
||||
value: "森林",
|
||||
label: "森林"
|
||||
},
|
||||
{
|
||||
value: "灌木地",
|
||||
label: "灌木地"
|
||||
},
|
||||
{
|
||||
value: "草地",
|
||||
label: "草地"
|
||||
},
|
||||
{
|
||||
value: "水域",
|
||||
label: "水域"
|
||||
},
|
||||
{
|
||||
value: "山地",
|
||||
label: "山地"
|
||||
}
|
||||
];
|
||||
|
||||
// 植被物候地物类型名称
|
||||
const vegetationPhenologyGroTypeName = [
|
||||
{
|
||||
value: "出芽期",
|
||||
label: "出芽期"
|
||||
},
|
||||
{
|
||||
value: "分蘖期",
|
||||
label: "分蘖期"
|
||||
},
|
||||
{
|
||||
value: "越冬期",
|
||||
label: "越冬期"
|
||||
},
|
||||
{
|
||||
value: "返青期",
|
||||
label: "返青期"
|
||||
},
|
||||
{
|
||||
value: "起身期",
|
||||
label: "起身期"
|
||||
},
|
||||
{
|
||||
value: "拔节期",
|
||||
label: "拔节期"
|
||||
},
|
||||
{
|
||||
value: "孕穗期",
|
||||
label: "孕穗期"
|
||||
},
|
||||
{
|
||||
value: "抽穗期",
|
||||
label: "抽穗期"
|
||||
},
|
||||
{
|
||||
value: "扬花期",
|
||||
label: "扬花期"
|
||||
},
|
||||
{
|
||||
value: "灌浆期",
|
||||
label: "灌浆期"
|
||||
},
|
||||
{
|
||||
value: "成熟期",
|
||||
label: "成熟期"
|
||||
}
|
||||
];
|
||||
|
||||
// 抽样方法
|
||||
const funcOpt = [
|
||||
{
|
||||
name: "随机抽样",
|
||||
label: "随机抽样",
|
||||
value: "0",
|
||||
pixelDealFun: [
|
||||
{
|
||||
name: "均值法",
|
||||
value: "0"
|
||||
},
|
||||
{
|
||||
name: "最邻近法",
|
||||
value: "1"
|
||||
},
|
||||
{
|
||||
name: "克里格法",
|
||||
value: "2"
|
||||
},
|
||||
{
|
||||
name: "块克里格法",
|
||||
value: "3"
|
||||
},
|
||||
{
|
||||
name: "MSN法",
|
||||
value: "4"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "分层抽样",
|
||||
label: "分层抽样",
|
||||
value: "1",
|
||||
pixelDealFun: [
|
||||
{
|
||||
name: "MSN法",
|
||||
value: "4"
|
||||
}
|
||||
],
|
||||
children: [
|
||||
{
|
||||
value: "0",
|
||||
label: "深度空间分层"
|
||||
},
|
||||
{
|
||||
value: "1",
|
||||
label: "场站网空间分层"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "等距抽样",
|
||||
label: "等距抽样",
|
||||
value: "2",
|
||||
pixelDealFun: [
|
||||
{
|
||||
name: "均值法",
|
||||
value: "0"
|
||||
},
|
||||
{
|
||||
name: "最邻近法",
|
||||
value: "1"
|
||||
},
|
||||
{
|
||||
name: "克里格法",
|
||||
value: "2"
|
||||
},
|
||||
{
|
||||
name: "块克里格法",
|
||||
value: "3"
|
||||
},
|
||||
{
|
||||
name: "MSN法",
|
||||
value: "4"
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
export default {
|
||||
path,
|
||||
url,
|
||||
urlprefix,
|
||||
subProductName,
|
||||
groTypeName,
|
||||
vegetationPhenologyGroTypeName,
|
||||
funcOpt
|
||||
};
|
|
@ -0,0 +1,15 @@
|
|||
import Cookies from 'js-cookie'
|
||||
|
||||
const TokenKey = 'microwave_check_token'
|
||||
|
||||
export function getToken() {
|
||||
return Cookies.get(TokenKey)
|
||||
}
|
||||
|
||||
export function setToken(token) {
|
||||
return Cookies.set(TokenKey, token)
|
||||
}
|
||||
|
||||
export function removeToken() {
|
||||
return Cookies.remove(TokenKey)
|
||||
}
|
|
@ -0,0 +1,287 @@
|
|||
import CesiumNavigation from "cesium-navigation-es6";
|
||||
import configValue from "../config/config.js";
|
||||
import { getProductValue } from "@/api/common";
|
||||
|
||||
const iconClose = require("@/assets/images/close.png");
|
||||
|
||||
class CesiumUtils {
|
||||
//初始化地图
|
||||
static initCesium(divMapId) {
|
||||
let Cesium = window.Cesium;
|
||||
this.Cesium = Cesium;
|
||||
let options = {
|
||||
selectionIndicator: false,
|
||||
homeButton: false, //主页按钮,默认true
|
||||
// scene3DOnly: true, // 每个几何实例仅以3D渲染以节省GPU内存
|
||||
animation: false, //动画控制,默认true
|
||||
baseLayerPicker: false, //是否显示图层选择控件
|
||||
geocoder: false, //地名查找,默认true
|
||||
timeline: false, //时间线,默认true
|
||||
navigationHelpButton: false, //导航帮助说明,默认true
|
||||
sceneModePicker: false, //是否显示投影方式控件
|
||||
infoBox: false, //点击要素之后显示的信息,默认true
|
||||
fullscreenButton: false, //全屏按钮,默认显示true
|
||||
navigationInstructionsInitiallyVisible: false,
|
||||
mapMode2D: Cesium.MapMode2D.INFINITE_SCROLL,
|
||||
imageryProvider: new Cesium.WebMapTileServiceImageryProvider({
|
||||
url:
|
||||
"http://{s}.tianditu.gov.cn/img_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=d7648495378ad7ebe74327207dfc09a8",
|
||||
layer: "tdtBasicLayer",
|
||||
style: "default",
|
||||
maximumLevel: 18,
|
||||
format: "image/jpeg",
|
||||
tileMatrixSetID: "GoogleMapsCompatible",
|
||||
show: true,
|
||||
subdomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"]
|
||||
})
|
||||
};
|
||||
let viewer = new Cesium.Viewer(divMapId, options);
|
||||
window.selfDefine.viewer = viewer;
|
||||
this.viewer = viewer;
|
||||
viewer.scene.globe.depthTestAgainstTerrain = false;
|
||||
viewer.camera.setView({
|
||||
destination: Cesium.Cartesian3.fromDegrees(105.973421, 38.757527, 7000000.0),
|
||||
duration: 4
|
||||
});
|
||||
var optionsNav = {};
|
||||
// 用于在使用重置导航重置地图视图时设置默认视图控制。接受的值是Cesium.Cartographic 和 Cesium.Rectangle.
|
||||
optionsNav.defaultResetView = new Cesium.Cartographic.fromDegrees(
|
||||
105.973421,
|
||||
38.757527,
|
||||
7000000
|
||||
);
|
||||
// 用于启用或禁用罗盘。true是启用罗盘,false是禁用罗盘。默认值为true。如果将选项设置为false,则罗盘将不会添加到地图中。
|
||||
optionsNav.enableCompass = true;
|
||||
// 用于启用或禁用缩放控件。true是启用,false是禁用。默认值为true。如果将选项设置为false,则缩放控件将不会添加到地图中。
|
||||
optionsNav.enableZoomControls = true;
|
||||
// 用于启用或禁用距离图例。true是启用,false是禁用。默认值为true。如果将选项设置为false,距离图例将不会添加到地图中。
|
||||
optionsNav.enableDistanceLegend = true;
|
||||
// 用于启用或禁用指南针外环。true是启用,false是禁用。默认值为true。如果将选项设置为false,则该环将可见但无效。
|
||||
optionsNav.enableCompassOuterRing = false;
|
||||
// console.log('CesiumNavigation:', CesiumNavigation);
|
||||
CesiumNavigation(viewer, optionsNav);
|
||||
}
|
||||
|
||||
//添加wms
|
||||
static addlayer(geoWorkspace, layerName) {
|
||||
let matrixIds = [
|
||||
"EPSG:4326:0",
|
||||
"EPSG:4326:1",
|
||||
"EPSG:4326:2",
|
||||
"EPSG:4326:3",
|
||||
"EPSG:4326:4",
|
||||
"EPSG:4326:5",
|
||||
"EPSG:4326:6",
|
||||
"EPSG:4326:7",
|
||||
"EPSG:4326:8",
|
||||
"EPSG:4326:9",
|
||||
"EPSG:4326:10",
|
||||
"EPSG:4326:11",
|
||||
"EPSG:4326:12",
|
||||
"EPSG:4326:13",
|
||||
"EPSG:4326:14",
|
||||
"EPSG:4326:15",
|
||||
"EPSG:4326:16",
|
||||
"EPSG:4326:17",
|
||||
"EPSG:4326:18",
|
||||
"EPSG:4326:19",
|
||||
"EPSG:4326:20",
|
||||
"EPSG:4326:21"
|
||||
];
|
||||
let privide = new Cesium.WebMapTileServiceImageryProvider({
|
||||
url: configValue.urlprefix.geoserverUrl,
|
||||
// url: 'http://39.105.100.186:8087/geoserver/gwc/service/wmts',
|
||||
layer: geoWorkspace + ":" + layerName,
|
||||
style: "",
|
||||
format: "image/png",
|
||||
tileMatrixSetID: "EPSG:4326",
|
||||
tileMatrixLabels: matrixIds,
|
||||
tilingScheme: new Cesium.GeographicTilingScheme({
|
||||
numberOfLevelZeroTilesX: 2,
|
||||
numberOfLevelZeroTilesY: 1
|
||||
})
|
||||
});
|
||||
let layer1 = new this.Cesium.ImageryLayer(privide);
|
||||
this.privide = layer1;
|
||||
//wms服务
|
||||
this.viewer.imageryLayers.add(layer1);
|
||||
// this.viewer.camera.flyTo({
|
||||
// destination: Cesium.Cartesian3.fromDegrees(113.3706577887299, 22.99824617654343, 300000.0)
|
||||
// });
|
||||
}
|
||||
|
||||
// 定位到tif影像处
|
||||
static flyToLayer(cLon, cLat) {
|
||||
this.viewer.camera.flyTo({
|
||||
destination: Cesium.Cartesian3.fromDegrees(cLon, cLat, 30000)
|
||||
});
|
||||
}
|
||||
|
||||
static flyToLayerRect(minLon, minLat, maxLon, maxLat) {
|
||||
minLon = Number(minLon);
|
||||
minLat = Number(minLat);
|
||||
maxLon = Number(maxLon);
|
||||
maxLat = Number(maxLat);
|
||||
const ctLon = ((minLon + maxLon) / 2).toFixed(8);
|
||||
const ctLat = ((minLat + maxLat) / 2).toFixed(8);
|
||||
const west = minLon * 2 - ctLon;
|
||||
const south = minLat * 2 - ctLat;
|
||||
const east = maxLon * 2 - ctLon;
|
||||
const north = maxLat * 2 - ctLat;
|
||||
const rectangle = Cesium.Rectangle.fromDegrees(west, south, east, north);
|
||||
this.viewer.camera.flyTo({
|
||||
destination: rectangle
|
||||
});
|
||||
}
|
||||
|
||||
static clearLayers() {
|
||||
for (var i = this.viewer.imageryLayers.length - 1; i >= 0; --i) {
|
||||
if (!this.viewer.imageryLayers.get(i).isBaseLayer()) {
|
||||
this.viewer.imageryLayers.remove(this.viewer.imageryLayers.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//删除wms
|
||||
static closelayer() {
|
||||
//wms服务
|
||||
this.viewer.imageryLayers.remove(this.privide);
|
||||
}
|
||||
|
||||
static addPoint(pLon, pLat, pAlt) {
|
||||
var pointEntity = this.viewer.entities.add({
|
||||
position: Cesium.Cartesian3.fromDegrees(pLon, pLat, pAlt),
|
||||
point: {
|
||||
pixelSize: 10,
|
||||
color: Cesium.Color.YELLOW
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
static removePoint() {
|
||||
this.viewer.entities.removeAll();
|
||||
}
|
||||
|
||||
//鼠标点击
|
||||
static handleClick() {
|
||||
var scene = this.viewer.scene;
|
||||
var handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
|
||||
const that = this;
|
||||
|
||||
handler.setInputAction(function(movement) {
|
||||
// 清除历史单击点
|
||||
handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
||||
// movement.position 像素的x、y坐标
|
||||
var cartesian = that.viewer.camera.pickEllipsoid(
|
||||
movement.position,
|
||||
scene.globe.ellipsoid
|
||||
);
|
||||
if (cartesian) {
|
||||
var cartographic = Cesium.Cartographic.fromCartesian(cartesian); // 转弧度
|
||||
// 将弧度转换为度数
|
||||
var longitudeString = Cesium.Math.toDegrees(cartographic.longitude).toFixed(6);
|
||||
var latitudeString = Cesium.Math.toDegrees(cartographic.latitude).toFixed(6);
|
||||
}
|
||||
// 取回像元值
|
||||
let pValue = 0;
|
||||
const of = new FormData();
|
||||
of.append("dataPath", sessionStorage.getItem("tifPath"));
|
||||
of.append("lon", longitudeString);
|
||||
of.append("lat", latitudeString);
|
||||
|
||||
getProductValue(of).then(res => {
|
||||
pValue = res;
|
||||
// 清空容器
|
||||
const pendPreview =
|
||||
document.getElementById("PendPreview") ||
|
||||
document.getElementById("cesium_container") ||
|
||||
document.getElementById("cesiumView") ||
|
||||
document.getElementById("auditPreview") ||
|
||||
document.getElementById("checkedPreview") ||
|
||||
document.getElementById("sceneShowContent");
|
||||
const closeIcon = document.getElementsByClassName("close-icon");
|
||||
if (closeIcon.length > 0) {
|
||||
for (let i = 0; i < closeIcon.length; i++) {
|
||||
pendPreview.removeChild(closeIcon[i]);
|
||||
}
|
||||
}
|
||||
const closeDom = document.createElement("div");
|
||||
closeDom.classList.add("close-icon");
|
||||
closeDom.style.cssText = `display: none;`;
|
||||
closeDom.innerHTML = `
|
||||
<div style='padding: 20px; border-radius: 10px; background: white; font-family: sans-serif; font-size: 20px;'>
|
||||
<div style=''>像素值:${pValue}</div>
|
||||
<img class='closeIcon' src='${iconClose}' style='cursor: pointer; width: 20px; height: 20px; position: absolute; top: 3px; right: 3px;' />
|
||||
</div>
|
||||
`;
|
||||
that.viewer.container.append(closeDom);
|
||||
scene.postRender.addEventListener(() => {
|
||||
const windowCoord = Cesium.SceneTransforms.wgs84ToWindowCoordinates(
|
||||
that.viewer.scene,
|
||||
Cesium.Cartesian3.fromDegrees(
|
||||
Number(longitudeString),
|
||||
Number(latitudeString),
|
||||
50
|
||||
)
|
||||
);
|
||||
// const x = windowCoord.x - closeDom.offsetWidth / 2
|
||||
// const y = windowCoord.y - closeDom.offsetHeight
|
||||
const x = windowCoord.x;
|
||||
const y = windowCoord.y;
|
||||
closeDom.style.cssText = `
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
transform: translate3d(${Math.round(x)}px, ${Math.round(y)}px, 0);
|
||||
display: inline-block;
|
||||
`;
|
||||
});
|
||||
const close = document.getElementsByClassName("closeIcon")[0];
|
||||
close.addEventListener(
|
||||
"click",
|
||||
() => {
|
||||
const pendPreview =
|
||||
document.getElementById("PendPreview") ||
|
||||
document.getElementById("cesium_container") ||
|
||||
document.getElementById("cesiumView") ||
|
||||
document.getElementById("auditPreview") ||
|
||||
document.getElementById("checkedPreview") ||
|
||||
document.getElementById("sceneShowContent");
|
||||
const closeIcon = document.getElementsByClassName("close-icon");
|
||||
if (closeIcon.length > 0) {
|
||||
for (let i = 0; i < closeIcon.length; i++) {
|
||||
pendPreview.removeChild(closeIcon[i]);
|
||||
}
|
||||
}
|
||||
},
|
||||
false
|
||||
);
|
||||
|
||||
// pValue = res;
|
||||
// dataSource.entities.add({
|
||||
// position: new Cesium.Cartesian3.fromDegrees(
|
||||
// Number(longitudeString),
|
||||
// Number(latitudeString),
|
||||
// 50
|
||||
// ),
|
||||
// label: {
|
||||
// text: "像素值:" + pValue,
|
||||
// font: "20px sans-serif",
|
||||
// showBackground: true,
|
||||
// eyeOffset: new Cesium.Cartesian3(0, 3.5, 0),
|
||||
// fillColor: Cesium.Color.BLACK, //字体颜色
|
||||
// backgroundColor: Cesium.Color.WHITE, //背景颜色
|
||||
// style: Cesium.LabelStyle.FILL, //label样式
|
||||
// outlineWidth: 2,
|
||||
// verticalOrigin: Cesium.VerticalOrigin.CENTER, //垂直位置
|
||||
// horizontalOrigin: Cesium.HorizontalOrigin.CENTER, //水平位置
|
||||
// pixelOffset: new Cesium.Cartesian2(0, -20) //偏移
|
||||
// }
|
||||
// });
|
||||
// that.viewer.dataSources.add(dataSource);
|
||||
});
|
||||
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
||||
}
|
||||
}
|
||||
|
||||
export default CesiumUtils;
|
|
@ -0,0 +1,36 @@
|
|||
export const productSubTypeVal = {
|
||||
ACS_ORTHOPHOTO: 1, // 正射产品校验
|
||||
ACS_DEM: 2, // 高程产品校验
|
||||
ACS_BACKSCATTERINGCOEFFICIENT: 3, // 后向散射系数产品校验
|
||||
ACS_ATMOSPHERICDELAYCORRECTION: 4, // 大气延迟校正产品校验
|
||||
ACS_DEFORMATION: 5, // 干涉测量形变产品校验
|
||||
ACS_TYPESOFLANDCOVER: 6, // 地表覆盖类型产品校验
|
||||
ACS_SOILMOISTURE: 7, // 土壤水分产品校验
|
||||
ACS_SOILSALINITYINVERSION: 8, // 土壤盐碱度产品校验
|
||||
ACS_SURFACEROUGHNESS: 9, // 地表粗糙度产品校验
|
||||
ACS_GROUNDVEGETATIONHEIGHT: 10, // 植被高度产品校验
|
||||
ACS_GROUNDLEAFAREAINDEX: 11, // 叶面积指数产品校验
|
||||
ACS_VEGETATIONPHENOLOGY: 12 // 植被物候产品校验
|
||||
};
|
||||
export const pixelFunVal = {
|
||||
PHM_AVERAGING: 0, // 均值法
|
||||
PHM_NEIGHBOR: 1, // 最邻近法
|
||||
PHM_POINTKRIGING: 2, // 克里格法
|
||||
PHM_BLOCKKRIGING: 3, // 块克里格法
|
||||
PHM_MSN: 4 // MSN法
|
||||
};
|
||||
export const truthFunVal = {
|
||||
ACM_MEANERROR: 0, // 平均误差
|
||||
ACM_MEANABSOLUTEERROR: 1, // 平均绝对误差
|
||||
ACM_RELATIVEERROR: 2, // 相对误差
|
||||
ACM_MEANRELATIVEERROR: 3, // 平均相对误差
|
||||
ACM_ROOTMANSQUAREERROR: 5, // 均方根误差
|
||||
ACM_CORRELATIONCOEFFICIENT: 7, // 相关系数
|
||||
ACM_ERRORMATRIX: 8, // 误差矩阵(混淆矩阵)
|
||||
ACM_OVERALLACCURACY: 9, // 总体分类精度
|
||||
ACM_KAPPA: 10, // Kappa系数
|
||||
ACM_MEANABSOLUTERELATIVEERROR: 4, // 平均绝对相对误差
|
||||
ACM_PLANENESSERROR: 6, // 平面中误差
|
||||
ACM_REALVALLIST: 11, //真值数组记录
|
||||
ACM_OTGERROR:12, //正射误差记录
|
||||
};
|
|
@ -0,0 +1,311 @@
|
|||
import configValue from "../config/config.js";
|
||||
import { getProductValue } from "@/api/common";
|
||||
class otgCesiumUtils {
|
||||
//初始化地图
|
||||
static initCesium(divMapId) {
|
||||
let Cesium = window.Cesium;
|
||||
this.Cesium = Cesium;
|
||||
let options = {
|
||||
selectionIndicator: false,
|
||||
homeButton: false, //主页按钮,默认true
|
||||
// scene3DOnly: true, // 每个几何实例仅以3D渲染以节省GPU内存
|
||||
animation: false, //动画控制,默认true
|
||||
baseLayerPicker: false, //是否显示图层选择控件
|
||||
geocoder: false, //地名查找,默认true
|
||||
timeline: false, //时间线,默认true
|
||||
navigationHelpButton: false, //导航帮助说明,默认true
|
||||
sceneModePicker: false, //是否显示投影方式控件
|
||||
infoBox: false, //点击要素之后显示的信息,默认true
|
||||
fullscreenButton: false, //全屏按钮,默认显示true
|
||||
navigationInstructionsInitiallyVisible: false,
|
||||
mapMode2D: Cesium.MapMode2D.INFINITE_SCROLL,
|
||||
imageryProvider: new Cesium.WebMapTileServiceImageryProvider({
|
||||
url:
|
||||
"http://{s}.tianditu.gov.cn/img_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=d7648495378ad7ebe74327207dfc09a8",
|
||||
layer: "tdtBasicLayer",
|
||||
style: "default",
|
||||
maximumLevel: 18,
|
||||
format: "image/jpeg",
|
||||
tileMatrixSetID: "GoogleMapsCompatible",
|
||||
show: true,
|
||||
subdomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"]
|
||||
})
|
||||
};
|
||||
let farViewer = new Cesium.Viewer(divMapId[0], options);
|
||||
let nearViewer = new Cesium.Viewer(divMapId[1], options);
|
||||
window.selfDefine.farViewer = farViewer;
|
||||
window.selfDefine.nearViewer = nearViewer;
|
||||
this.farViewer = farViewer;
|
||||
this.nearViewer = nearViewer;
|
||||
|
||||
farViewer.scene.globe.depthTestAgainstTerrain = false;
|
||||
nearViewer.scene.globe.depthTestAgainstTerrain = false;
|
||||
}
|
||||
|
||||
//添加wms
|
||||
static addlayer(geoWorkspace, layerName) {
|
||||
// let privide2 = new Cesium.WebMapServiceImageryProvider({
|
||||
// url: "http://127.0.0.1:8087/geoserver/microwave/wms", //服务地址
|
||||
// layers: geoWorkspace+':'+layerName, //服务图层,需要修改成你自己发布的名称
|
||||
// parameters: {
|
||||
// service: "WMS",
|
||||
// format: "image/png",
|
||||
// transparent: true
|
||||
// }
|
||||
// });
|
||||
// let layer2= new this.Cesium.ImageryLayer(privide2)
|
||||
// this.privide2=layer2
|
||||
let privide1 = this.creatTwoViewerLayer(geoWorkspace, layerName);
|
||||
let layer1 = new Cesium.ImageryLayer(privide1);
|
||||
let privide2 = this.creatTwoViewerLayer(geoWorkspace, layerName);
|
||||
let layer2 = new Cesium.ImageryLayer(privide2);
|
||||
this.nearViewer.imageryLayers.add(layer1);
|
||||
this.farViewer.imageryLayers.add(layer2);
|
||||
}
|
||||
//切换添加产品展示图层
|
||||
static addFarlayer(geoWorkspace, layerName) {
|
||||
let privide2 = this.creatTwoViewerLayer(geoWorkspace, layerName);
|
||||
let layer2 = new Cesium.ImageryLayer(privide2);
|
||||
this.farViewer.imageryLayers.add(layer2);
|
||||
}
|
||||
//切换添加局部放大图图层
|
||||
static addNearlayer(geoWorkspace, layerName) {
|
||||
let privide1 = this.creatTwoViewerLayer(geoWorkspace, layerName);
|
||||
let layer1 = new Cesium.ImageryLayer(privide1);
|
||||
this.nearViewer.imageryLayers.add(layer1);
|
||||
}
|
||||
|
||||
static creatTwoViewerLayer(geoWorkspace, layerName) {
|
||||
let matrixIds = [
|
||||
"EPSG:4326:0",
|
||||
"EPSG:4326:1",
|
||||
"EPSG:4326:2",
|
||||
"EPSG:4326:3",
|
||||
"EPSG:4326:4",
|
||||
"EPSG:4326:5",
|
||||
"EPSG:4326:6",
|
||||
"EPSG:4326:7",
|
||||
"EPSG:4326:8",
|
||||
"EPSG:4326:9",
|
||||
"EPSG:4326:10",
|
||||
"EPSG:4326:11",
|
||||
"EPSG:4326:12",
|
||||
"EPSG:4326:13",
|
||||
"EPSG:4326:14",
|
||||
"EPSG:4326:15",
|
||||
"EPSG:4326:16",
|
||||
"EPSG:4326:17",
|
||||
"EPSG:4326:18",
|
||||
"EPSG:4326:19",
|
||||
"EPSG:4326:20",
|
||||
"EPSG:4326:21"
|
||||
];
|
||||
return new Cesium.WebMapTileServiceImageryProvider({
|
||||
url: configValue.urlprefix.otgGeoServerUrl,
|
||||
// url: 'http://39.105.100.186:8087/geoserver/gwc/service/wmts',
|
||||
layer: geoWorkspace + ":" + layerName,
|
||||
style: "",
|
||||
format: "image/png",
|
||||
tileMatrixSetID: "EPSG:4326",
|
||||
tileMatrixLabels: matrixIds,
|
||||
tilingScheme: new Cesium.GeographicTilingScheme({
|
||||
numberOfLevelZeroTilesX: 2,
|
||||
numberOfLevelZeroTilesY: 1
|
||||
})
|
||||
});
|
||||
}
|
||||
// 定位到tif影像处
|
||||
static flyToLayer(cLon, cLat) {
|
||||
this.farViewer.camera.flyTo({
|
||||
destination: Cesium.Cartesian3.fromDegrees(cLon, cLat, 50000.0)
|
||||
});
|
||||
this.nearViewer.camera.flyTo({
|
||||
destination: Cesium.Cartesian3.fromDegrees(cLon, cLat, 30000.0)
|
||||
});
|
||||
}
|
||||
//删除wms
|
||||
static closelayer() {
|
||||
//wms服务
|
||||
this.farViewer.imageryLayers.remove(this.privide);
|
||||
this.nearViewer.imageryLayers.remove(this.privide);
|
||||
}
|
||||
static clearFarLayers() {
|
||||
for (var i = this.farViewer.imageryLayers.length - 1; i >= 0; --i) {
|
||||
if (!this.farViewer.imageryLayers.get(i).isBaseLayer()) {
|
||||
this.farViewer.imageryLayers.remove(this.farViewer.imageryLayers.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
static clearNearLayers() {
|
||||
for (var i = this.nearViewer.imageryLayers.length - 1; i >= 0; --i) {
|
||||
if (!this.nearViewer.imageryLayers.get(i).isBaseLayer()) {
|
||||
this.nearViewer.imageryLayers.remove(this.nearViewer.imageryLayers.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
static addPointToFarViewer(pLon, pLat, pAlt) {
|
||||
var peOfFarViewer = this.farViewer.entities.add({
|
||||
position: Cesium.Cartesian3.fromDegrees(pLon, pLat, pAlt),
|
||||
point: {
|
||||
pixelSize: 10,
|
||||
color: Cesium.Color.YELLOW
|
||||
}
|
||||
});
|
||||
this.farViewer.camera.flyTo({
|
||||
destination: Cesium.Cartesian3.fromDegrees(pLon, pLat, 5000)
|
||||
});
|
||||
}
|
||||
static addPointToNearViewer(pLon, pLat, pAlt) {
|
||||
var peOfNearViewer = this.nearViewer.entities.add({
|
||||
position: Cesium.Cartesian3.fromDegrees(pLon, pLat, pAlt),
|
||||
point: {
|
||||
pixelSize: 10,
|
||||
color: Cesium.Color.YELLOW
|
||||
}
|
||||
});
|
||||
this.nearViewer.camera.flyTo({
|
||||
destination: Cesium.Cartesian3.fromDegrees(pLon, pLat, 1000)
|
||||
});
|
||||
}
|
||||
|
||||
static removePoint() {
|
||||
this.farViewer.entities.removeAll();
|
||||
this.nearViewer.entities.removeAll();
|
||||
}
|
||||
static drawPoint(callback) {
|
||||
let self = this;
|
||||
//坐标存储
|
||||
// let positions,newPoi;
|
||||
this.handler = new Cesium.ScreenSpaceEventHandler(self.nearViewer.scene.canvas);
|
||||
let ellipsoid = self.nearViewer.scene.globe.ellipsoid;
|
||||
//单击鼠标左键画点
|
||||
this.handler.setInputAction(function(movement) {
|
||||
let cartesian = self.nearViewer.scene.camera.pickEllipsoid(
|
||||
movement.position,
|
||||
self.nearViewer.scene.globe.ellipsoid
|
||||
);
|
||||
let c = ellipsoid.cartesianToCartographic(cartesian);
|
||||
let spLon = Cesium.Math.toDegrees(c.longitude).toFixed(8);
|
||||
let spLat = Cesium.Math.toDegrees(c.latitude).toFixed(8);
|
||||
let spAlt = c.height.toFixed(2);
|
||||
const positions = [spLon, spLat, spAlt];
|
||||
self.nearViewer.entities.removeById("theSamePoint");
|
||||
const newPoi = self.nearViewer.entities.add({
|
||||
id: "theSamePoint",
|
||||
position: cartesian,
|
||||
point: {
|
||||
color: Cesium.Color.RED,
|
||||
pixelSize: 10
|
||||
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND
|
||||
}
|
||||
});
|
||||
callback(positions);
|
||||
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
||||
}
|
||||
static stopDrowPoi() {
|
||||
this.handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
||||
}
|
||||
//Far viewer 鼠标点击
|
||||
static handleClickFar() {
|
||||
var scene = this.farViewer.scene;
|
||||
var handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
|
||||
const that = this;
|
||||
handler.setInputAction(function onLeftClick(movement) {
|
||||
//清除历史单击点
|
||||
handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
||||
var cartesian = that.farViewer.camera.pickEllipsoid(
|
||||
movement.position,
|
||||
scene.globe.ellipsoid
|
||||
);
|
||||
if (cartesian) {
|
||||
var cartographic = Cesium.Cartographic.fromCartesian(cartesian);
|
||||
var longitudeString = Cesium.Math.toDegrees(cartographic.longitude).toFixed(6);
|
||||
var latitudeString = Cesium.Math.toDegrees(cartographic.latitude).toFixed(6);
|
||||
}
|
||||
//取回像元值
|
||||
let pValue = 0;
|
||||
that.farViewer.dataSources.removeAll();
|
||||
const dataSource = new Cesium.CustomDataSource("textPoint");
|
||||
const of = new FormData();
|
||||
of.append("dataPath", sessionStorage.getItem("tifPath"));
|
||||
of.append("lon", longitudeString);
|
||||
of.append("lat", latitudeString);
|
||||
getProductValue(of).then(res => {
|
||||
pValue = res;
|
||||
dataSource.entities.add({
|
||||
position: new Cesium.Cartesian3.fromDegrees(
|
||||
Number(longitudeString),
|
||||
Number(latitudeString),
|
||||
50
|
||||
),
|
||||
label: {
|
||||
text: "像素值:" + pValue,
|
||||
font: "20px sans-serif",
|
||||
showBackground: true,
|
||||
eyeOffset: new Cesium.Cartesian3(0, 3.5, 0),
|
||||
fillColor: Cesium.Color.BLACK, //字体颜色
|
||||
backgroundColor: Cesium.Color.WHITE, //背景颜色
|
||||
style: Cesium.LabelStyle.FILL, //label样式
|
||||
outlineWidth: 2,
|
||||
verticalOrigin: Cesium.VerticalOrigin.CENTER, //垂直位置
|
||||
horizontalOrigin: Cesium.HorizontalOrigin.CENTER, //水平位置
|
||||
pixelOffset: new Cesium.Cartesian2(0, -20) //偏移
|
||||
}
|
||||
});
|
||||
that.farViewer.dataSources.add(dataSource);
|
||||
});
|
||||
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
||||
}
|
||||
//Near viewer 鼠标点击
|
||||
static handleClickNear() {
|
||||
var scene = this.nearViewer.scene;
|
||||
var handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
|
||||
const that = this;
|
||||
handler.setInputAction(function onLeftClick(movement) {
|
||||
//清除历史单击点
|
||||
handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
||||
var cartesian = that.nearViewer.camera.pickEllipsoid(
|
||||
movement.position,
|
||||
scene.globe.ellipsoid
|
||||
);
|
||||
if (cartesian) {
|
||||
var cartographic = Cesium.Cartographic.fromCartesian(cartesian);
|
||||
var longitudeString = Cesium.Math.toDegrees(cartographic.longitude).toFixed(6);
|
||||
var latitudeString = Cesium.Math.toDegrees(cartographic.latitude).toFixed(6);
|
||||
}
|
||||
//取回像元值
|
||||
let pValue = 0;
|
||||
that.nearViewer.dataSources.removeAll();
|
||||
const dataSource = new Cesium.CustomDataSource("textPoint");
|
||||
const of = new FormData();
|
||||
of.append("dataPath", sessionStorage.getItem("tifPath"));
|
||||
of.append("lon", longitudeString);
|
||||
of.append("lat", latitudeString);
|
||||
getProductValue(of).then(res => {
|
||||
dataSource.entities.add({
|
||||
position: new Cesium.Cartesian3.fromDegrees(
|
||||
Number(longitudeString),
|
||||
Number(latitudeString),
|
||||
50
|
||||
),
|
||||
label: {
|
||||
text: "像素值:" + pValue,
|
||||
font: "20px sans-serif",
|
||||
showBackground: true,
|
||||
eyeOffset: new Cesium.Cartesian3(0, 3.5, 0),
|
||||
fillColor: Cesium.Color.BLACK, //字体颜色
|
||||
backgroundColor: Cesium.Color.WHITE, //背景颜色
|
||||
style: Cesium.LabelStyle.FILL, //label样式
|
||||
outlineWidth: 2,
|
||||
verticalOrigin: Cesium.VerticalOrigin.CENTER, //垂直位置
|
||||
horizontalOrigin: Cesium.HorizontalOrigin.CENTER, //水平位置
|
||||
pixelOffset: new Cesium.Cartesian2(0, -20) //偏移
|
||||
}
|
||||
});
|
||||
that.nearViewer.dataSources.add(dataSource);
|
||||
});
|
||||
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
||||
}
|
||||
}
|
||||
|
||||
export default otgCesiumUtils;
|
|
@ -0,0 +1,60 @@
|
|||
import axios from 'axios'
|
||||
import { Message } from 'element-ui'
|
||||
|
||||
// create an axios instance
|
||||
const service = axios.create({
|
||||
baseURL: process.env.VUE_APP_FILE_API, // url = base url + request url
|
||||
// withCredentials: true, // send cookies when cross-domain requests
|
||||
timeout: 5000000 // request timeout
|
||||
})
|
||||
|
||||
// request interceptor
|
||||
service.interceptors.request.use(
|
||||
config => {
|
||||
// do something before request is sent
|
||||
// if (store.getters.token) {
|
||||
// config.headers['X-Token'] = getToken()
|
||||
// }
|
||||
return config
|
||||
},
|
||||
error => {
|
||||
// do something with request error
|
||||
console.log(error) // for debug
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
// response interceptor
|
||||
service.interceptors.response.use(
|
||||
response => {
|
||||
const res = response.data
|
||||
// if the custom code is not 20000, it is judged as an error.
|
||||
// if (res.code !== 200) {
|
||||
// if(res.code === 500){
|
||||
// return res
|
||||
// }
|
||||
// Message({
|
||||
// message: res.message || 'Error',
|
||||
// type: 'error',
|
||||
// duration: 5 * 1000
|
||||
// })
|
||||
// // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
|
||||
// if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
|
||||
// return Promise.reject(new Error(res.message || 'Error'))
|
||||
// }
|
||||
// } else {
|
||||
return res
|
||||
// }
|
||||
},
|
||||
error => {
|
||||
console.log('err' + error) // for debug
|
||||
Message({
|
||||
message: error.message,
|
||||
type: 'error',
|
||||
duration: 5 * 1000
|
||||
})
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
export default service
|
|
@ -0,0 +1,60 @@
|
|||
import axios from 'axios'
|
||||
import { Message } from 'element-ui'
|
||||
|
||||
// create an axios instance
|
||||
const service = axios.create({
|
||||
baseURL: process.env.VUE_APP_REALITY_API, // url = base url + request url
|
||||
// withCredentials: true, // send cookies when cross-domain requests
|
||||
timeout: 5000000 // request timeout
|
||||
})
|
||||
|
||||
// request interceptor
|
||||
service.interceptors.request.use(
|
||||
config => {
|
||||
// do something before request is sent
|
||||
// if (store.getters.token) {
|
||||
// config.headers['X-Token'] = getToken()
|
||||
// }
|
||||
return config
|
||||
},
|
||||
error => {
|
||||
// do something with request error
|
||||
console.log(error) // for debug
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
// response interceptor
|
||||
service.interceptors.response.use(
|
||||
response => {
|
||||
const res = response.data
|
||||
// if the custom code is not 20000, it is judged as an error.
|
||||
// if (res.code !== 200) {
|
||||
// if(res.code === 500){
|
||||
// return res
|
||||
// }
|
||||
// Message({
|
||||
// message: res.message || 'Error',
|
||||
// type: 'error',
|
||||
// duration: 5 * 1000
|
||||
// })
|
||||
// // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
|
||||
// if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
|
||||
// return Promise.reject(new Error(res.message || 'Error'))
|
||||
// }
|
||||
// } else {
|
||||
return res
|
||||
// }
|
||||
},
|
||||
error => {
|
||||
console.log('err' + error) // for debug
|
||||
Message({
|
||||
message: error.message,
|
||||
type: 'error',
|
||||
duration: 5 * 1000
|
||||
})
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
export default service
|
|
@ -0,0 +1,60 @@
|
|||
import axios from 'axios'
|
||||
import { Message } from 'element-ui'
|
||||
|
||||
// create an axios instance
|
||||
const service = axios.create({
|
||||
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
|
||||
// withCredentials: true, // send cookies when cross-domain requests
|
||||
timeout: 5000000 // request timeout
|
||||
})
|
||||
|
||||
// request interceptor
|
||||
service.interceptors.request.use(
|
||||
config => {
|
||||
// do something before request is sent
|
||||
// if (store.getters.token) {
|
||||
// config.headers['X-Token'] = getToken()
|
||||
// }
|
||||
return config
|
||||
},
|
||||
error => {
|
||||
// do something with request error
|
||||
console.log(error) // for debug
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
// response interceptor
|
||||
service.interceptors.response.use(
|
||||
response => {
|
||||
const res = response.data
|
||||
// if the custom code is not 20000, it is judged as an error.
|
||||
// if (res.code !== 200) {
|
||||
// if(res.code === 500){
|
||||
// return res
|
||||
// }
|
||||
// Message({
|
||||
// message: res.message || 'Error',
|
||||
// type: 'error',
|
||||
// duration: 5 * 1000
|
||||
// })
|
||||
// // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
|
||||
// if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
|
||||
// return Promise.reject(new Error(res.message || 'Error'))
|
||||
// }
|
||||
// } else {
|
||||
return res
|
||||
// }
|
||||
},
|
||||
error => {
|
||||
console.log('err' + error) // for debug
|
||||
Message({
|
||||
message: error.message,
|
||||
type: 'error',
|
||||
duration: 5 * 1000
|
||||
})
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
export default service
|
|
@ -0,0 +1,58 @@
|
|||
Math.easeInOutQuad = function(t, b, c, d) {
|
||||
t /= d / 2
|
||||
if (t < 1) {
|
||||
return c / 2 * t * t + b
|
||||
}
|
||||
t--
|
||||
return -c / 2 * (t * (t - 2) - 1) + b
|
||||
}
|
||||
|
||||
// requestAnimationFrame for Smart Animating http://goo.gl/sx5sts
|
||||
var requestAnimFrame = (function() {
|
||||
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60) }
|
||||
})()
|
||||
|
||||
/**
|
||||
* Because it's so fucking difficult to detect the scrolling element, just move them all
|
||||
* @param {number} amount
|
||||
*/
|
||||
function move(amount) {
|
||||
document.documentElement.scrollTop = amount
|
||||
document.body.parentNode.scrollTop = amount
|
||||
document.body.scrollTop = amount
|
||||
}
|
||||
|
||||
function position() {
|
||||
return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} to
|
||||
* @param {number} duration
|
||||
* @param {Function} callback
|
||||
*/
|
||||
export function scrollTo(to, duration, callback) {
|
||||
const start = position()
|
||||
const change = to - start
|
||||
const increment = 20
|
||||
let currentTime = 0
|
||||
duration = (typeof (duration) === 'undefined') ? 500 : duration
|
||||
var animateScroll = function() {
|
||||
// increment the time
|
||||
currentTime += increment
|
||||
// find the value with the quadratic in-out easing function
|
||||
var val = Math.easeInOutQuad(currentTime, start, change, duration)
|
||||
// move the document.body
|
||||
move(val)
|
||||
// do the animation unless its over
|
||||
if (currentTime < duration) {
|
||||
requestAnimFrame(animateScroll)
|
||||
} else {
|
||||
if (callback && typeof (callback) === 'function') {
|
||||
// the animation is done so lets callback
|
||||
callback()
|
||||
}
|
||||
}
|
||||
}
|
||||
animateScroll()
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
//产品枚举映射
|
||||
export function productTypeMap(pdtype) {
|
||||
const pdtypeMap = {
|
||||
1: "正射产品",
|
||||
2: "高程产品",
|
||||
3: "后向散射系数产品",
|
||||
4: "大气延迟校正产品",
|
||||
5: "干涉测量形变产品",
|
||||
6: "地表覆盖类型产品",
|
||||
7: "土壤水分产品",
|
||||
8: "土壤盐碱度产品",
|
||||
9: "地表粗糙度产品",
|
||||
10: "植被高度产品",
|
||||
11: "叶面积指数产品",
|
||||
12: "植被物候产品"
|
||||
};
|
||||
if (pdtype == null) return null;
|
||||
else return pdtypeMap[pdtype];
|
||||
}
|
||||
|
||||
//产品--样本类型映射
|
||||
export function productTypeSplMap(pdtype) {
|
||||
const pdtypeMap = {
|
||||
1: "正射样本",
|
||||
2: "高程样本",
|
||||
3: "后向散射系数样本",
|
||||
4: "大气延迟校正样本",
|
||||
5: "干涉测量形变样本",
|
||||
6: "地表覆盖类型样本",
|
||||
7: "土壤水分样本",
|
||||
8: "土壤盐碱度样本",
|
||||
9: "地表粗糙度样本",
|
||||
10: "植被高度样本",
|
||||
11: "叶面积指数样本",
|
||||
12: "植被物候样本"
|
||||
};
|
||||
if (pdtype == null) return null;
|
||||
else return pdtypeMap[pdtype];
|
||||
}
|
||||
|
||||
//真实性检验方法映射
|
||||
export function truthFunctionsMap(truthFun) {
|
||||
const truthFunMap = {
|
||||
0: "平均误差",
|
||||
1: "平均绝对误差",
|
||||
2: "相对误差",
|
||||
3: "平均相对误差",
|
||||
4: "平均绝对相对误差",
|
||||
5: "均方根误差",
|
||||
6: "平面中误差",
|
||||
7: "相关系数",
|
||||
8: "误差矩阵",
|
||||
9: "总体分类精度",
|
||||
10: "Kappa系数",
|
||||
11: "产品真值",
|
||||
12: "正射误差列表"
|
||||
};
|
||||
if (truthFun == null) return null;
|
||||
else return truthFunMap[truthFun];
|
||||
}
|
||||
|
||||
// 抽样方法枚举转换
|
||||
export function transformSlp(sampleFun) {
|
||||
const sampleFunMap = {
|
||||
"0": "随机抽样",
|
||||
"1": "分层抽样",
|
||||
"2": "等距抽样"
|
||||
};
|
||||
if (sampleFun == null) return null;
|
||||
else return sampleFunMap[sampleFun];
|
||||
}
|
||||
// 像元级方法枚举转换
|
||||
export function transformPcMethod(pixelDealFun) {
|
||||
const pixelDealFunMap = {
|
||||
"0": "均值法",
|
||||
"1": "最邻近法",
|
||||
"2": "克里格法",
|
||||
"3": "块克里格法",
|
||||
"4": "MSN法"
|
||||
};
|
||||
if (pixelDealFun == null) return null;
|
||||
else return pixelDealFunMap[pixelDealFun];
|
||||
}
|
||||
|
||||
export const PIXELDEALFUNOPTION = [
|
||||
{
|
||||
value: "0",
|
||||
label: "均值法"
|
||||
},
|
||||
{
|
||||
value: "1",
|
||||
label: "最邻近法"
|
||||
},
|
||||
{
|
||||
value: "2",
|
||||
label: "克里格法"
|
||||
},
|
||||
{
|
||||
value: "3",
|
||||
label: "块克里格法"
|
||||
},
|
||||
{
|
||||
value: "4",
|
||||
label: "MSN法"
|
||||
}
|
||||
];
|
|
@ -0,0 +1,41 @@
|
|||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
import moment from 'moment'
|
||||
import "animate.css"
|
||||
import "./assets/css/global.css";
|
||||
import ElementUI from 'element-ui';
|
||||
import 'element-ui/lib/theme-chalk/index.css';
|
||||
import 'element-ui/lib/theme-chalk/base.css';
|
||||
import config from './config/config.js'
|
||||
Vue.use(ElementUI)
|
||||
|
||||
import '../node_modules/cesium/Build/Cesium/Widgets/widgets.css';
|
||||
import * as Cesium from "../node_modules/cesium/Build/Cesium/Cesium.js";
|
||||
window.Cesium = Cesium;
|
||||
|
||||
|
||||
//全局bus 组件传值
|
||||
Vue.prototype.bus=new Vue();
|
||||
|
||||
// 加入moment所有的组件
|
||||
Vue.prototype.$moment = moment;
|
||||
// echarts
|
||||
import echarts from 'echarts' //引入echarts
|
||||
import ecstat from 'echarts-stat'/*echarts统计组件*/
|
||||
Vue.prototype.$ecstat = ecstat /*echarts统计组件*/
|
||||
Vue.prototype.$echarts = echarts; //引入组件
|
||||
Vue.prototype.configration = config;
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
window.selfDefine = {
|
||||
viewer: null
|
||||
};
|
||||
|
||||
new Vue({
|
||||
router,
|
||||
store,
|
||||
render: h => h(App)
|
||||
}).$mount('#app')
|
|
@ -0,0 +1,18 @@
|
|||
export default {
|
||||
methods:{
|
||||
formatDatetime(inputTime){
|
||||
//如果为空值则返回空字符串
|
||||
if(!inputTime ){//&& typeof inputTime !== 'number'){
|
||||
return '';
|
||||
}
|
||||
var localTime = '';
|
||||
//获取毫秒数
|
||||
inputTime = new Date(inputTime).getTime();
|
||||
const offset = (new Date()).getTimezoneOffset();
|
||||
localTime = (new Date(inputTime - offset * 60000)).toISOString();
|
||||
localTime = localTime.substr(0, localTime.lastIndexOf('.'));
|
||||
localTime = localTime.replace('T', ' ');
|
||||
return localTime;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,143 @@
|
|||
import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
import Home from '../views/Home.vue'
|
||||
import Login from '../views/Login.vue'
|
||||
|
||||
Vue.use(VueRouter)
|
||||
|
||||
import about from "../views/About.vue"
|
||||
import daichuli from "../views/Daichuli/index.vue"
|
||||
import yichuli from "../views/Yichuli/index.vue"
|
||||
import daishenhe from "../views/Daishenhe/index.vue"
|
||||
import yishenhe from "../views/Yishenhe/index.vue"
|
||||
import orderUnprocessed from '../views/Daichuli/Feedback/index.vue'
|
||||
import AuditDsh from '../views/Daishenhe/Audit/index.vue'
|
||||
import feedbackYcl from '../views/Yichuli/Feedback/index.vue'
|
||||
import feedbackYsh from '../views/Yishenhe/Feedback/index.vue'
|
||||
import Inspection from '../views/Daichuli/Feedback/Inspection/index.vue'
|
||||
import Report from '../views/Daichuli/Feedback/Inspection/Report/index.vue'
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'Login',
|
||||
component: Login,
|
||||
meta: { title: "首页" }
|
||||
},
|
||||
{
|
||||
path: '/home',
|
||||
name: 'Home',
|
||||
component: Home,
|
||||
meta: { title: "首页" }
|
||||
},
|
||||
{
|
||||
path: '/about',
|
||||
component: about,
|
||||
children: [
|
||||
{
|
||||
path: '/daichuli',
|
||||
component: daichuli,
|
||||
name: '待处理的检验订单',
|
||||
meta: {
|
||||
requireAuth: true,
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/orderUnprocessed',
|
||||
component: orderUnprocessed,
|
||||
name: '订单反馈',
|
||||
meta: {
|
||||
requireAuth: true,
|
||||
breadNumber: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/inspection',
|
||||
component: Inspection,
|
||||
name: '检验处理',
|
||||
meta: {
|
||||
requireAuth: true,
|
||||
breadNumber: 3
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/report',
|
||||
component: Report,
|
||||
name: '报告生成',
|
||||
meta: {
|
||||
requireAuth: true,
|
||||
breadNumber: 4
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/yichuli',
|
||||
component: yichuli,
|
||||
name: '已处理检验订单',
|
||||
meta: {
|
||||
requireAuth: true,
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/feedbackycl',
|
||||
component: feedbackYcl,
|
||||
name: '订单处理信息',
|
||||
meta: {
|
||||
requireAuth: true,
|
||||
breadNumber: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/daishenhe',
|
||||
component: daishenhe,
|
||||
name: '待审核检验订单',
|
||||
meta: {
|
||||
requireAuth: true,
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/auditdsh',
|
||||
component: AuditDsh,
|
||||
name: '订单审核',
|
||||
meta: {
|
||||
requireAuth: true,
|
||||
breadNumber: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/yishenhe',
|
||||
component: yishenhe,
|
||||
name: '已审核检验订单',
|
||||
meta: {
|
||||
requireAuth: true,
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/feedbackysh',
|
||||
component: feedbackYsh,
|
||||
name: '已审核订单信息',
|
||||
meta: {
|
||||
requireAuth: true,
|
||||
breadNumber: 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
//获取原型对象上的push函数
|
||||
const originalPush = VueRouter.prototype.push
|
||||
//修改原型对象中的push方法
|
||||
VueRouter.prototype.push = function push(location) {
|
||||
return originalPush.call(this, location).catch(err => err)
|
||||
}
|
||||
|
||||
const router = new VueRouter({
|
||||
mode:'history',
|
||||
routes
|
||||
})
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
sessionStorage.setItem('prePage',from.path)
|
||||
next()
|
||||
})
|
||||
|
||||
export default router
|
|
@ -0,0 +1,28 @@
|
|||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
|
||||
Vue.use(Vuex);
|
||||
const state = {
|
||||
breadListState: [], // 面包屑列表数据
|
||||
pixelFun:null,
|
||||
sampleFun:null,
|
||||
altRange:null
|
||||
};
|
||||
|
||||
export default new Vuex.Store({
|
||||
state,
|
||||
mutations: {
|
||||
breadListMutations (getters, list) {
|
||||
getters.breadListState = list;
|
||||
},
|
||||
setPixelFun(getters, val){
|
||||
getters.pixelFun=val;
|
||||
},
|
||||
setSampleFun(getters, val){
|
||||
getters.sampleFun=val
|
||||
},
|
||||
setAltRange(getters, val){
|
||||
getters.altRange=val
|
||||
}
|
||||
}
|
||||
});
|
|
@ -0,0 +1,298 @@
|
|||
<template>
|
||||
<div class="layout">
|
||||
<el-container>
|
||||
<!-- 侧边栏 -->
|
||||
<div style="max-width: 300px; height: 100%; background-color: #061278">
|
||||
<el-menu
|
||||
:default-active="activeMenu"
|
||||
class="el-menu-vertical-demo"
|
||||
background-color="#061278"
|
||||
text-color="#fff"
|
||||
active-text-color="#ffd04b"
|
||||
:router="true"
|
||||
:collapse="isCollapse"
|
||||
>
|
||||
<el-menu-item index="/daichuli" v-show="userType === '2'">
|
||||
<i class="el-icon-s-order"></i>
|
||||
<span slot="title">待处理的检验订单</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/yichuli" v-show="userType === '2'">
|
||||
<i class="el-icon-s-claim"></i>
|
||||
<span slot="title">已处理的检验订单</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/daishenhe" v-show="userType === '3'">
|
||||
<i class="el-icon-s-open"></i>
|
||||
<span slot="title">待审核的检验订单</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/yishenhe" v-show="userType === '3'">
|
||||
<i class="el-icon-s-check"></i>
|
||||
<span slot="title">已审核的检验订单</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/" class="toHome">
|
||||
<i class="el-icon-s-home"></i>
|
||||
<span slot="title">返回首页</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</div>
|
||||
<el-container>
|
||||
<!-- 页码头部标题 -->
|
||||
<el-header>
|
||||
<vheader></vheader>
|
||||
</el-header>
|
||||
<div class="lline">
|
||||
<!-- 导航折叠按钮 -->
|
||||
<el-radio-group
|
||||
v-model="isCollapse"
|
||||
style="margin-bottom: 20px"
|
||||
@change="btnClick"
|
||||
class="navbtn"
|
||||
>
|
||||
<el-radio-button :label="false" class="icon1" v-show="btn1Show">
|
||||
<i class="el-icon-s-unfold"></i>
|
||||
</el-radio-button>
|
||||
<el-radio-button :label="true" class="icon2" v-show="btn2Show">
|
||||
<i class="el-icon-s-fold"></i>
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
<!--面包屑列表-->
|
||||
<el-breadcrumb class="navbread" separator="/">
|
||||
<el-breadcrumb-item
|
||||
v-for="(item, index) in breadList"
|
||||
:key="index"
|
||||
@click.native="breadcrumbClick(item)"
|
||||
:v-if="item.name"
|
||||
style="cursor: pointer"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
<!-- 主页 -->
|
||||
<el-main>
|
||||
<!-- 路由组件 -->
|
||||
<transition name="Fade" mode="out-in">
|
||||
<router-view></router-view>
|
||||
</transition>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import vheader from "../components/home/header/index.vue";
|
||||
|
||||
export default {
|
||||
// name:'nav',
|
||||
components: { vheader },
|
||||
data() {
|
||||
return {
|
||||
breadList: [],
|
||||
isCollapse: false,
|
||||
btn1Show: false,
|
||||
btn2Show: true,
|
||||
activeMenu: "/daichuli",
|
||||
userType: null,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$route() {
|
||||
this.getBreadcrumb();
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getBreadcrumb();
|
||||
this.userType = localStorage.userType;
|
||||
this.activeMenu = this.$route.path;
|
||||
},
|
||||
methods: {
|
||||
btnClick() {
|
||||
this.btn1Show = !this.btn1Show;
|
||||
this.btn2Show = !this.btn1Show;
|
||||
},
|
||||
// 面包屑数据处理
|
||||
getBreadcrumb() {
|
||||
let that = this;
|
||||
// 由于本项目大部分属于‘一级’页面,所以在设置路由时候,一级页面不设置breadNumber = 1,‘二级’页面以上才设置breadNumber
|
||||
let breadNumber =
|
||||
typeof this.$route.meta.breadNumber !== "undefined"
|
||||
? this.$route.meta.breadNumber
|
||||
: 1;
|
||||
// 获取当前页面的名字和路由,并组合成新的对象
|
||||
let newBread = { name: this.$route.name, path: this.$route.fullPath };
|
||||
let vuexBreadList = []; // 默认初始化面包屑数据
|
||||
if (breadNumber !== 1) {
|
||||
// 当前面包屑breadNumber大于1时才会从vuex中获取值
|
||||
vuexBreadList = that.$store.state.breadListState; // 获取breadList数组
|
||||
}
|
||||
if (breadNumber < vuexBreadList.length) {
|
||||
// "回退"面包屑----判断条件:当前路由breadNumber小于vuexBreadList的长度
|
||||
vuexBreadList.splice(
|
||||
breadNumber - vuexBreadList.length,
|
||||
vuexBreadList.length - breadNumber
|
||||
);
|
||||
}
|
||||
if (breadNumber > vuexBreadList.length) {
|
||||
// 添加面包屑----判断条件:当前路由breadNumber大于vuexBreadList的长度
|
||||
vuexBreadList.push(newBread);
|
||||
}
|
||||
// 处理完数据后,将最终的数据更新到vuex(用于页面刷新)
|
||||
that.$store.commit("breadListMutations", vuexBreadList);
|
||||
// 处理完数据后,将最终的数据更新为新的面包屑数组
|
||||
that.breadList = vuexBreadList;
|
||||
},
|
||||
// 面包屑点击事件
|
||||
breadcrumbClick(item) {
|
||||
this.$router.push({
|
||||
path: item.path,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang='less'>
|
||||
.Fade-enter,
|
||||
.Fade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
.Fade-enter-to,
|
||||
.Fade-leave {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.Fade-enter-active,
|
||||
.Fade-leave-active {
|
||||
transition: all 0.4s;
|
||||
}
|
||||
|
||||
.lline {
|
||||
padding-left: 20px;
|
||||
padding-top: 15px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
// background-color: gainsboro;
|
||||
background-color: #e4e8f1;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
/deep/.el-breadcrumb__inner.is-link:hover {
|
||||
color: #303133;
|
||||
}
|
||||
/deep/.el-menu {
|
||||
border-right: 0;
|
||||
}
|
||||
/deep/.el-breadcrumb__inner.is-link {
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
}
|
||||
.navbtn {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
.navbread {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
font-size: 20px;
|
||||
// font-weight: 400;
|
||||
position: relative;
|
||||
top: 2.5px;
|
||||
}
|
||||
.icon1 {
|
||||
position: relative;
|
||||
left: 0px;
|
||||
}
|
||||
.icon2 {
|
||||
position: relative;
|
||||
left: 0px;
|
||||
}
|
||||
/deep/.el-radio-button__inner:hover {
|
||||
color: #333;
|
||||
}
|
||||
/deep/.el-radio-button__orig-radio:checked + .el-radio-button__inner {
|
||||
border-color: #e4ebf1;
|
||||
// border-color:gainsboro;
|
||||
box-shadow: -1px 0 0 0 #e4ebf1;
|
||||
}
|
||||
/deep/.el-radio-button__inner {
|
||||
font-size: 25px;
|
||||
padding: 0 10px 0 0;
|
||||
}
|
||||
/deep/.el-radio-button__orig-radio:checked + .el-radio-button__inner {
|
||||
background-color: #e4ebf1;
|
||||
}
|
||||
/deep/.el-radio-button__inner {
|
||||
background-color: #e4ebf1;
|
||||
}
|
||||
.el-menu-vertical-demo:not(.el-menu--collapse) {
|
||||
width: 260px;
|
||||
height: 100%;
|
||||
}
|
||||
.el-menu-item {
|
||||
font-size: 20px;
|
||||
font-family: "PingFangSC-Medium";
|
||||
position: relative;
|
||||
top: 60px;
|
||||
}
|
||||
.el-menu-item,
|
||||
.el-submenu__title {
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
text-align: center;
|
||||
}
|
||||
.el-menu-item.is-active {
|
||||
background-color: #409eff !important;
|
||||
color: white !important;
|
||||
}
|
||||
.layout .el-container {
|
||||
height: 100vh;
|
||||
}
|
||||
.el-header {
|
||||
background-color: white;
|
||||
color: #333;
|
||||
}
|
||||
.el-aside {
|
||||
background-color: #354595;
|
||||
color: #333;
|
||||
|
||||
line-height: 200px;
|
||||
}
|
||||
|
||||
.el-main {
|
||||
// background-color: gainsboro;
|
||||
background-color: #e4e8f1;
|
||||
color: #333;
|
||||
padding-top: 0px;
|
||||
}
|
||||
.el-breadcrumb {
|
||||
margin-left: 15px;
|
||||
}
|
||||
body > .el-container {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.el-container:nth-child(5) .el-aside,
|
||||
.el-container:nth-child(6) .el-aside {
|
||||
line-height: 260px;
|
||||
}
|
||||
|
||||
.el-container:nth-child(7) .el-aside {
|
||||
line-height: 320px;
|
||||
}
|
||||
h1 {
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
font-size: 20px;
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
.el-menu .toHome {
|
||||
position: absolute;
|
||||
top: unset;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
}
|
||||
.el-menu--collapse {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,693 @@
|
|||
<template>
|
||||
<div class="report">
|
||||
<div class="rpHeader">
|
||||
<div class="rphLeft">
|
||||
<QtReport
|
||||
ref="reportQT"
|
||||
:realRes="realRes"
|
||||
:pdSubType="pdSubType"
|
||||
v-if="pdSubType === 6 || pdSubType === 12"
|
||||
></QtReport>
|
||||
<RtReport
|
||||
ref="reportRT"
|
||||
:realRes="realRes"
|
||||
:pdSubType="pdSubType"
|
||||
v-else
|
||||
></RtReport>
|
||||
</div>
|
||||
<div class="rphRight">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span><span class="sp2">产品检验报告PDF</span>
|
||||
</div>
|
||||
<div
|
||||
class="pdfContent"
|
||||
v-loading="pdfLoading"
|
||||
element-loading-text="PDF生成中..."
|
||||
element-loading-spinner="el-icon-loading"
|
||||
>
|
||||
<!-- <PdfLoad :pdfPath="pdfPath" v-if="pdfLoading === false"></PdfLoad> -->
|
||||
<iframe
|
||||
class="pdfPage"
|
||||
:src="pdfPath"
|
||||
frameborder="0"
|
||||
v-if="pdfLoading === false"
|
||||
></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rpShow">
|
||||
<el-tabs type="card">
|
||||
<el-tab-pane label="查看待检验产品">
|
||||
<div
|
||||
class="earth"
|
||||
id="cesiumView"
|
||||
@click="pickValue"
|
||||
style="overflow: hidden; position: relative"
|
||||
></div>
|
||||
<div class="cstop">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="rpDataMsg"
|
||||
class="demo-form-inline"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-form-item label="卫星" class="ysjMsg">
|
||||
<el-input
|
||||
class="ysjMsgMrg"
|
||||
v-model="rpDataMsg.satellite"
|
||||
placeholder="采样卫星"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="载荷名称" class="ysjMsg">
|
||||
<el-input
|
||||
v-model="rpDataMsg.load"
|
||||
placeholder="载荷方式"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="空间分辨率" class="ysjMsg2">
|
||||
<el-input
|
||||
v-model="rpDataMsg.spatialRes"
|
||||
placeholder="空间分辨率"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间" class="ysjMsg">
|
||||
<el-input
|
||||
class="ysjMsgMrg"
|
||||
v-model="formatDateStr"
|
||||
placeholder="采样时间"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="级别" prop="resource" class="ysjMsg2">
|
||||
<el-radio-group v-model="rpDataMsg.level">
|
||||
<el-radio label="3"></el-radio>
|
||||
<el-radio label="4"></el-radio>
|
||||
<el-radio label="5"></el-radio>
|
||||
<!-- <el-radio label="其他"></el-radio> -->
|
||||
</el-radio-group> </el-form-item
|
||||
><br />
|
||||
<el-form-item label="坐标系统" class="ysjMsg">
|
||||
<el-input
|
||||
v-model="rpDataMsg.coordinateSys"
|
||||
placeholder="坐标系统"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最小纬度" class="ysjMsg">
|
||||
<el-input
|
||||
v-model="rpDataMsg.minLat"
|
||||
placeholder="最小纬度"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大纬度" class="ysjMsg2">
|
||||
<el-input
|
||||
style="margin-left: 6px"
|
||||
v-model="rpDataMsg.maxLat"
|
||||
placeholder="最大纬度"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最小经度" class="ysjMsg">
|
||||
<el-input
|
||||
v-model="rpDataMsg.minLon"
|
||||
placeholder="最小经度"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大经度" class="ysjMsg2">
|
||||
<el-input
|
||||
v-model="rpDataMsg.maxLon"
|
||||
placeholder="最大经度"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="查看样本数据">
|
||||
<el-table
|
||||
:header-cell-style="headerRowClass"
|
||||
:cell-style="tableRowClassName"
|
||||
style="width: 98%; margin-left: 1%; margin-top: 15px"
|
||||
:data="sampleData"
|
||||
:stripe="true"
|
||||
height="520"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="80">
|
||||
</el-table-column>
|
||||
<el-table-column prop="sampleId" label="样本编号" sortable>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lon" label="经度"></el-table-column>
|
||||
<el-table-column prop="lat" label="纬度"></el-table-column>
|
||||
<el-table-column prop="alt" label="高度"></el-table-column>
|
||||
<el-table-column prop="dataTime" label="采样日期" sortable>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.dataTime | formatDate }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="addTime"
|
||||
label="预处理时间"
|
||||
sortable
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.addTime | formatDate }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="dataValue"
|
||||
label="可信度"
|
||||
sortable
|
||||
align="center"
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<div class="rpBottom">
|
||||
<el-button type="primary" @click="downloadReport">下载PDF报告</el-button>
|
||||
<el-button type="primary" @click="submitReport">保存并提交</el-button>
|
||||
<el-button type="primary" @click="reExamine">重新检验</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import RtReport from "@/components/rtReport";
|
||||
import QtReport from "@/components/qtReport";
|
||||
import PdfLoad from "@/components/pdfLoad";
|
||||
import cu from "@/lib/cesiumUtils";
|
||||
import {
|
||||
downloadPdf,
|
||||
updateOrderStage,
|
||||
updateOrderMsg,
|
||||
disOrderStatus,
|
||||
addReportMsg,
|
||||
exportWord,
|
||||
} from "@/api/pendingOrder";
|
||||
import { productSubTypeVal, truthFunVal } from "@/lib/contract.js";
|
||||
import {
|
||||
truthFunctionsMap,
|
||||
productTypeMap,
|
||||
productTypeSplMap,
|
||||
} from "@/lib/variateMap";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
RtReport,
|
||||
QtReport,
|
||||
PdfLoad,
|
||||
},
|
||||
filters: {
|
||||
formatDate(inputTime) {
|
||||
if (!inputTime && typeof inputTime !== "number") {
|
||||
return "";
|
||||
}
|
||||
var localTime = "";
|
||||
inputTime = new Date(inputTime);
|
||||
const offset = new Date().getTimezoneOffset();
|
||||
localTime = new Date(inputTime - offset * 60000).toISOString();
|
||||
localTime = localTime.substr(0, localTime.lastIndexOf("."));
|
||||
localTime = localTime.replace("T", " ");
|
||||
return localTime;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
queryParams: null,
|
||||
reportMsg: "",
|
||||
pdSubType: undefined,
|
||||
pdfLoading: true,
|
||||
pdfPath: "", // pdf文件地址
|
||||
sampleData: [],
|
||||
rpDataMsg: {
|
||||
user: "",
|
||||
satellite: "5米光学卫星",
|
||||
load: "可见/近红外相机",
|
||||
spatialRes: "0.00000307°",
|
||||
date: "2021-08-03 16:52:40",
|
||||
level: "3",
|
||||
coordinateSys: "WGS84",
|
||||
centerPoint: "POINT(118.32,34.7)",
|
||||
minLat: "116.13622332",
|
||||
maxLat: "118.3422222",
|
||||
minLon: "34.211234",
|
||||
maxLon: "35.3455667",
|
||||
},
|
||||
realRes: undefined,
|
||||
base64Data: null,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
cu.initCesium("cesiumView");
|
||||
const geoWS = this.reportMsg.geoWS;
|
||||
const geoLN = this.reportMsg.geoLN;
|
||||
cu.addlayer(geoWS, geoLN);
|
||||
const gp = this.reportMsg.geoLayerPos;
|
||||
cu.flyToLayerRect(gp[0], gp[1], gp[2], gp[3]);
|
||||
|
||||
const sd = this.sampleData;
|
||||
for (let i in sd) {
|
||||
cu.addPoint(sd[i].lon, sd[i].lat, sd[i].alt);
|
||||
}
|
||||
|
||||
if (this.pdSubType === 6 || this.pdSubType === 12) {
|
||||
this.base64Data = this.$refs.reportQT.myCharts.getDataURL();
|
||||
} else {
|
||||
this.base64Data = this.$refs.reportRT.myCharts.getDataURL();
|
||||
}
|
||||
this.exportPdf(this.reportMsg);
|
||||
},
|
||||
created() {
|
||||
if (
|
||||
Object.keys(this.$route.params).length > 0 &&
|
||||
sessionStorage.getItem("prePage") === this.configration.path.inspection
|
||||
) {
|
||||
this.queryParams = this.$route.params;
|
||||
} else {
|
||||
this.queryParams = JSON.parse(
|
||||
localStorage.getItem(this.configration.path.inspection)
|
||||
);
|
||||
}
|
||||
document.body.scrollTop = 0;
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
tableRowClassName({ rowIndex }) {
|
||||
if ((rowIndex + 1) % 2 !== 0) {
|
||||
return "background:#F5F7FA;text-align:center";
|
||||
} else {
|
||||
return "background:#FFFFFF;text-align:center";
|
||||
}
|
||||
},
|
||||
headerRowClass() {
|
||||
return "background: #E4E9F1;text-align:center";
|
||||
},
|
||||
init() {
|
||||
const self = this;
|
||||
const rpm = (self.reportMsg = this.queryParams);
|
||||
// console.log('sendMsg',rpm);
|
||||
self.realRes = rpm.reportResult;
|
||||
self.pdSubType = rpm.pdSubType;
|
||||
const rsl = (self.sampleData = rpm.sampleList);
|
||||
// 设置样本数据展示(正射需要额外设置)
|
||||
if (rpm.pdSubType === productSubTypeVal.ACS_ORTHOPHOTO) {
|
||||
let otgVal = [];
|
||||
for (let i in rsl) {
|
||||
if (rsl[i].sameLon !== null) {
|
||||
otgVal.push({ name: "mPoint", x: rsl[i].lon, y: rsl[i].lat });
|
||||
otgVal.push({
|
||||
name: "sPoint",
|
||||
x: rsl[i].sameLon,
|
||||
y: rsl[i].sameLat,
|
||||
});
|
||||
}
|
||||
}
|
||||
self.realRes.otgVal = otgVal;
|
||||
}
|
||||
const md = rpm.metaData;
|
||||
self.rpDataMsg = {
|
||||
satellite: md.satellite,
|
||||
load: md.load,
|
||||
spatialRes: md.resRatio,
|
||||
date: md.producedDate,
|
||||
level: md.proLevel,
|
||||
coordinateSys: md.coordinateSys,
|
||||
minLat: md.minLat,
|
||||
maxLat: md.maxLat,
|
||||
minLon: md.minLon,
|
||||
maxLon: md.maxLon,
|
||||
centerPoint: "POINT(" + md.centerLon + "," + md.centerLat + ")",
|
||||
};
|
||||
},
|
||||
// 生产报告
|
||||
exportPdf(rpm) {
|
||||
const self = this;
|
||||
const asmo = rpm.orderMsg;
|
||||
const asmp = rpm.productMsg;
|
||||
const asmm = rpm.metaData;
|
||||
// 设置真实性检验参数
|
||||
const rpVal = rpm.reportResult.report;
|
||||
const crTime = rpm.reportResult.time;
|
||||
let iat = "";
|
||||
let iatResArr = [];
|
||||
const psId = self.pdSubType;
|
||||
const psVal = productSubTypeVal;
|
||||
let errorList = [];
|
||||
let realList = [];
|
||||
let otgError = [];
|
||||
for (let i in rpVal) {
|
||||
let ri = rpVal[i];
|
||||
const ni = Number(i);
|
||||
// 真实性检验算法判断(8,2,3)
|
||||
if (
|
||||
ni === truthFunVal.ACM_ERRORMATRIX ||
|
||||
ni === truthFunVal.ACM_RELATIVEERROR ||
|
||||
ni === truthFunVal.ACM_REALVALLIST
|
||||
) {
|
||||
ri = JSON.stringify(rpVal[i]);
|
||||
}
|
||||
if (
|
||||
(ni === truthFunVal.ACM_MEANABSOLUTERELATIVEERROR ||
|
||||
ni === truthFunVal.ACM_MEANRELATIVEERROR) &&
|
||||
psId === psVal.ACS_ORTHOPHOTO
|
||||
) {
|
||||
ri = JSON.stringify(rpVal[i]);
|
||||
}
|
||||
if (ni === truthFunVal.ACM_RELATIVEERROR) errorList = rpVal[i];
|
||||
if (ni === truthFunVal.ACM_REALVALLIST) realList = rpVal[i];
|
||||
if (ni === truthFunVal.ACM_OTGERROR) otgError = rpVal[i];
|
||||
iatResArr.push(truthFunctionsMap(i) + ":" + ri);
|
||||
if (
|
||||
ni !== truthFunVal.ACM_OTGERROR &&
|
||||
ni !== truthFunVal.ACM_REALVALLIST
|
||||
)
|
||||
iat += truthFunctionsMap(i) + ",";
|
||||
}
|
||||
if (iat.length > 0) iat = iat.substr(0, iat.length - 1);
|
||||
// 设置产品类型
|
||||
let category = undefined;
|
||||
if (psId === psVal.ACS_ORTHOPHOTO || psId === psVal.ACS_DEM)
|
||||
category = "几何";
|
||||
else if (
|
||||
psId === psVal.ACS_BACKSCATTERINGCOEFFICIENT ||
|
||||
psId === psVal.ACS_ATMOSPHERICDELAYCORRECTION
|
||||
)
|
||||
category = "辐射";
|
||||
else if (
|
||||
psId === psVal.ACS_GROUNDLEAFAREAINDEX ||
|
||||
psId === psVal.ACS_VEGETATIONPHENOLOGY ||
|
||||
psId === psVal.ACS_GROUNDVEGETATIONHEIGHT
|
||||
)
|
||||
category = "植被";
|
||||
else category = "陆表";
|
||||
const pdfMsg = {
|
||||
category: category,
|
||||
categoryType: productTypeSplMap(self.pdSubType),
|
||||
product: productTypeMap(self.pdSubType),
|
||||
orderID: asmo.order_code,
|
||||
reportMaker: localStorage.userName,
|
||||
orderCreateTime: asmo.create_date,
|
||||
orderStartTime: crTime.startTime,
|
||||
orderEndTime: crTime.endTime,
|
||||
reportCreateTime: asmo.create_date,
|
||||
inspectorName: localStorage.userName,
|
||||
productFileName: asmp.fileName,
|
||||
resolution: asmm.resRatio + "",
|
||||
productCreateTime: asmp.productDate,
|
||||
coordinatSeystem: asmm.coordinateSys,
|
||||
sampleTimeRequest:
|
||||
asmo.simple_start_time + " - " + asmo.simple_end_time,
|
||||
sampleType: "点",
|
||||
sampleCount: rpm.sampleList.length + "",
|
||||
// areaLeftUp: asmm.minLon + "," + asmm.maxLat,
|
||||
// areaRightDown: asmm.maxLon + "," + asmm.minLat,
|
||||
minLon: asmm.minLon,
|
||||
maxLon: asmm.maxLon,
|
||||
minLat: asmm.minLat,
|
||||
maxLat: asmm.maxLat,
|
||||
inspectionAlgorithm: iat,
|
||||
sampleList: JSON.stringify(rpm.sampleList),
|
||||
inspectionResultList: iatResArr,
|
||||
imgData: this.base64Data,
|
||||
errorList: errorList,
|
||||
realList: realList,
|
||||
otgError: otgError,
|
||||
};
|
||||
const pdfName = productTypeMap(self.pdSubType) + "报告";
|
||||
const localTiffPath = rpm.tifPath;
|
||||
const httpTiffPath = null;
|
||||
// console.log("1111111", pdfMsg);
|
||||
exportWord(pdfMsg, pdfName, localTiffPath, httpTiffPath, psId).then(
|
||||
(res) => {
|
||||
if (res.msg === "success") {
|
||||
const ru = res.pdfUrl;
|
||||
const pos = ru.lastIndexOf("/");
|
||||
const pdfName = ru.substr(pos + 1);
|
||||
self.pdfPath = this.configration.urlprefix.pdfUrlPrefix + pdfName;
|
||||
self.pdfLoading = false;
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
// 下载报告
|
||||
downloadReport() {
|
||||
const pdfPath = this.pdfPath;
|
||||
if (pdfPath !== null || pdfPath !== undefined) {
|
||||
const pdfName = pdfPath.substr(pdfPath.lastIndexOf("/") + 1); //截取文件名称字符串
|
||||
downloadPdf(pdfPath).then((res) => {
|
||||
if (res.size > 0) {
|
||||
const content = res;
|
||||
const blob = new Blob([content]);
|
||||
const fileName = pdfName;
|
||||
if ("download" in document.createElement("a")) {
|
||||
// 非IE下载
|
||||
const elink = document.createElement("a");
|
||||
elink.download = fileName;
|
||||
elink.style.display = "none";
|
||||
elink.href = URL.createObjectURL(blob);
|
||||
document.body.appendChild(elink);
|
||||
elink.click();
|
||||
URL.revokeObjectURL(elink.href); // 释放URL 对象
|
||||
document.body.removeChild(elink);
|
||||
} else {
|
||||
// IE10+下载
|
||||
navigator.msSaveBlob(blob, fileName);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 提交检验结果以及报告结果
|
||||
submitReport() {
|
||||
// 更新订单状态
|
||||
const os = 2; //审核完成
|
||||
this.updateOrder(os);
|
||||
// 上传报告
|
||||
const rpm = this.reportMsg;
|
||||
const pp = this.pdfPath;
|
||||
if (pp !== null || pp !== undefined) {
|
||||
const pos = pp.lastIndexOf("/");
|
||||
const pdfName = pp.substr(pos + 1);
|
||||
const rf = new FormData();
|
||||
rf.append("orderId", rpm.orderId);
|
||||
rf.append("reportName", pdfName);
|
||||
rf.append("reportPath", pp);
|
||||
addReportMsg(rf).then((res) => {
|
||||
// console.log(res);
|
||||
if (res.code === 200) {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "订单处理成功",
|
||||
});
|
||||
updateOrderMsg({
|
||||
id: rpm.orderId,
|
||||
auditId: rpm.userId,
|
||||
auditName: localStorage.userName,
|
||||
});
|
||||
disOrderStatus(rpm.orderId);
|
||||
this.$router.push({ name: "待处理的检验订单" });
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 重新检验
|
||||
reExamine() {
|
||||
const os = 8;
|
||||
this.updateOrder(os);
|
||||
this.$router.push({ name: "待处理的检验订单" });
|
||||
},
|
||||
// 更新订单状态
|
||||
updateOrder(orderStatus) {
|
||||
const rpm = this.reportMsg;
|
||||
const up = new FormData();
|
||||
up.append("orderId", rpm.orderId);
|
||||
up.append("orderStatus", orderStatus);
|
||||
up.append("userId", rpm.userId);
|
||||
updateOrderStage(up);
|
||||
},
|
||||
pickValue() {
|
||||
cu.handleClick();
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
formatDateStr: function () {
|
||||
let inputTime = this.rpDataMsg.date;
|
||||
if (!inputTime) {
|
||||
//&& typeof inputTime !== 'number'){
|
||||
return "";
|
||||
}
|
||||
var localTime = "";
|
||||
inputTime = new Date(inputTime).getTime();
|
||||
const offset = new Date().getTimezoneOffset();
|
||||
localTime = new Date(inputTime - offset * 60000).toISOString();
|
||||
localTime = localTime.substr(0, localTime.lastIndexOf("."));
|
||||
localTime = localTime.replace("T", " ");
|
||||
return localTime;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.rpHeader {
|
||||
height: 1000px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.rphLeft {
|
||||
width: calc(50% - 5px);
|
||||
height: 100%;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.rphRight {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
float: left;
|
||||
background-color: white;
|
||||
}
|
||||
.pdfContent {
|
||||
background-color: #343537;
|
||||
height: calc(100% - 60px);
|
||||
margin: 10px;
|
||||
border: 1px solid #343537;
|
||||
.pdfPage {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.rpShow {
|
||||
padding-top: 20px;
|
||||
background-color: white;
|
||||
width: 100%;
|
||||
height: 650px;
|
||||
.earth {
|
||||
width: 98%;
|
||||
height: 400px;
|
||||
background-color: darkblue;
|
||||
margin-left: 1%;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
.rpBottom {
|
||||
position: relative;
|
||||
display: block;
|
||||
margin-top: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
/deep/.rpBottom {
|
||||
.el-button--primary {
|
||||
width: 170px;
|
||||
height: 35px;
|
||||
margin-bottom: 20px;
|
||||
background-color: #354595;
|
||||
margin-left: 10px;
|
||||
border-color: #354595;
|
||||
}
|
||||
}
|
||||
.box1 {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid rgb(205, 205, 205, 0.5);
|
||||
}
|
||||
.sp1 {
|
||||
display: inline-block;
|
||||
width: 7px;
|
||||
height: 26px;
|
||||
background-color: #354595;
|
||||
vertical-align: top;
|
||||
margin-left: 20px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.sp2 {
|
||||
margin-left: 10px;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #354595;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.cstop {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 0;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
.ysjMsg {
|
||||
width: 18%;
|
||||
}
|
||||
.ysjMsgMrg {
|
||||
margin-left: 14px;
|
||||
}
|
||||
.ysjMsg2 {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
/deep/.cstop .el-input.is-disabled .el-input__inner {
|
||||
width: 140px;
|
||||
height: 33px;
|
||||
}
|
||||
/deep/.cstop .el-form--inline .el-form-item__label {
|
||||
text-align: justify;
|
||||
// text-align-last: justify;
|
||||
font-size: 15px;
|
||||
}
|
||||
/deep/.cstop .el-radio {
|
||||
margin-right: 10px;
|
||||
}
|
||||
/deep/.cstop .el-radio__inner::after {
|
||||
background-color: #354595;
|
||||
}
|
||||
/deep/.cstop .el-radio__input.is-checked .el-radio__inner {
|
||||
border-color: #354595;
|
||||
background: white;
|
||||
}
|
||||
/deep/.cstop .el-radio__input.is-disabled .el-radio__inner {
|
||||
border-color: #354595;
|
||||
}
|
||||
/deep/.cstop .el-radio__input.is-disabled.is-checked .el-radio__inner::after {
|
||||
background-color: #354595;
|
||||
}
|
||||
/deep/.cstop .el-radio__input.is-checked + .el-radio__label {
|
||||
color: #606266;
|
||||
}
|
||||
/deep/.cstop .el-radio__inner {
|
||||
border: 2px solid #354595;
|
||||
}
|
||||
|
||||
// /deep/.el-input.is-disabled .el-input__inner {
|
||||
// width: 120px;
|
||||
// }
|
||||
// /deep/.el-form--inline .el-form-item__label {
|
||||
// // width: 90px;
|
||||
// text-align: justify;
|
||||
// // text-align-last: justify;
|
||||
// font-size: 14px;
|
||||
// margin-left: 15px;
|
||||
// padding: 0 5px 0 0;
|
||||
// }
|
||||
/deep/.el-tabs__item:hover {
|
||||
color: black;
|
||||
}
|
||||
/deep/.el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
|
||||
color: white;
|
||||
background-color: #409eff;
|
||||
border-color: #409eff;
|
||||
}
|
||||
/deep/.el-tabs__nav-scroll {
|
||||
text-align: center;
|
||||
margin-bottom: 10px;
|
||||
// display: block;
|
||||
}
|
||||
/deep/.el-tabs--card > .el-tabs__header .el-tabs__nav {
|
||||
display: block;
|
||||
left: 41.5%;
|
||||
// transform: translateX(-50%);
|
||||
// margin: 0 auto;
|
||||
// text-align: center;
|
||||
position: relative;
|
||||
}
|
||||
/deep/.el-tabs--card > .el-tabs__header {
|
||||
border-bottom: 0;
|
||||
// border-bottom: 1px solid #E4E7ED;
|
||||
}
|
||||
/deep/.el-tabs--card > .el-tabs__header .el-tabs__nav {
|
||||
border-bottom: 1px solid #e4e7ed;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,963 @@
|
|||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<transition name="Fade" mode="out-in">
|
||||
<router-view></router-view>
|
||||
</transition>
|
||||
</div>
|
||||
<div class="page" v-show="pageshow">
|
||||
<div class="daichuli">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span><span class="sp2">订单信息</span>
|
||||
</div>
|
||||
<el-table
|
||||
:data="orderData"
|
||||
:header-cell-style="{ background: '#E4E9F1' }"
|
||||
:cell-style="tableRowClassName"
|
||||
style="width: 98%; margin-left: 1%; margin-top: 15px"
|
||||
:default-sort="{ prop: 'date', order: 'descending' }"
|
||||
>
|
||||
<el-table-column
|
||||
prop="orderCode"
|
||||
label="订单编号"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="orderSource"
|
||||
label="订单来源"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.orderSource | orderSourceFilter }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="uploadDate" label="提交时间" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.uploadDate | formatDate }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="fileName" label="文件名" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="fileSize"
|
||||
label="文件大小"
|
||||
sortable
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.fileSize | transformByte }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="fileFormat"
|
||||
label="文件格式"
|
||||
sortable
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="元数据" align="center">
|
||||
<el-button type="primary" @click="changePage">查看</el-button>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="daichuli2" v-show="isShow">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span><span class="sp2">元数据查看</span>
|
||||
</div>
|
||||
<div class="cstop">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="formInline"
|
||||
class="demo-form-inline"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-form-item label="卫星" class="ysjMsg">
|
||||
<el-input
|
||||
class="ysjMsgMrg"
|
||||
v-model="formInline.satellite"
|
||||
placeholder="卫星名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="载荷名称" class="ysjMsg">
|
||||
<el-input
|
||||
v-model="formInline.load"
|
||||
placeholder="载荷方式"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="空间分辨率" class="ysjMsg2">
|
||||
<el-input
|
||||
v-model="formInline.resRatio"
|
||||
placeholder="空间分辨率"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间" class="ysjMsg" prop="producedDate">
|
||||
<el-input
|
||||
class="ysjMsgMrg"
|
||||
v-model="formatDateStr"
|
||||
placeholder="生产时间"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="级别" prop="resource" class="ysjMsg2">
|
||||
<el-radio-group v-model="formInline.proLevel">
|
||||
<el-radio label="3"></el-radio>
|
||||
<el-radio label="4"></el-radio>
|
||||
<el-radio label="5"></el-radio>
|
||||
<!-- <el-radio label="其他"></el-radio> -->
|
||||
</el-radio-group> </el-form-item
|
||||
><br />
|
||||
<el-form-item label="坐标系统" class="ysjMsg">
|
||||
<el-input
|
||||
v-model="formInline.coordinateSys"
|
||||
placeholder="坐标系统"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最小纬度" class="ysjMsg">
|
||||
<el-input
|
||||
v-model="formInline.minLat"
|
||||
placeholder="最小纬度"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大纬度" class="ysjMsg2">
|
||||
<el-input
|
||||
style="margin-left: 6px"
|
||||
v-model="formInline.maxLat"
|
||||
placeholder="最大纬度"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最小经度" class="ysjMsg">
|
||||
<el-input
|
||||
v-model="formInline.minLon"
|
||||
placeholder="最小经度"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大经度" class="ysjMsg2">
|
||||
<el-input
|
||||
v-model="formInline.maxLon"
|
||||
placeholder="最大经度"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="daichuli1">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span><span class="sp2">待检验产品预览</span
|
||||
><el-button type="primary" size="small" @click="downLoadPro"
|
||||
>下载</el-button
|
||||
>
|
||||
</div>
|
||||
<product-info
|
||||
@removeLayer="removeLayer"
|
||||
@addLayer="addLayer"
|
||||
@removeSample="removeSplData"
|
||||
@addSample="getSplData"
|
||||
></product-info>
|
||||
<div class="preview">
|
||||
<div
|
||||
id="PendPreview"
|
||||
@click="pickValue"
|
||||
style="overflow: hidden; position: relative"
|
||||
></div>
|
||||
<!-- <div v-if="shadeIsShow" class="shade" @click="enterPreview">
|
||||
<svg aria-hidden="true" width="22" height="22" focusable="false" data-prefix="fas" data-icon="hand-pointer" class="svg-inline--fa fa-hand-pointer fa-w-14 fa-lg " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
|
||||
<path fill="currentColor" d="M448 240v96c0 3.084-.356 6.159-1.063 9.162l-32 136C410.686 499.23 394.562 512 376 512H168a40.004 40.004 0 0 1-32.35-16.473l-127.997-176c-12.993-17.866-9.043-42.883 8.822-55.876 17.867-12.994 42.884-9.043 55.877 8.823L104 315.992V40c0-22.091 17.908-40 40-40s40 17.909 40 40v200h8v-40c0-22.091 17.908-40 40-40s40 17.909 40 40v40h8v-24c0-22.091 17.908-40 40-40s40 17.909 40 40v24h8c0-22.091 17.908-40 40-40s40 17.909 40 40zm-256 80h-8v96h8v-96zm88 0h-8v96h8v-96zm88 0h-8v96h8v-96z"></path>
|
||||
</svg>
|
||||
点击进入
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="daichuli1" v-if="groudClassShow">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span
|
||||
><span class="sp2">{{
|
||||
orderMsg.product_subclass_id == 6
|
||||
? "地表覆盖类型表"
|
||||
: "植被物候类型表"
|
||||
}}</span>
|
||||
</div>
|
||||
<el-table
|
||||
:data="groudClassData"
|
||||
:header-cell-style="{ background: '#E4E9F1' }"
|
||||
:cell-style="tableRowClassName"
|
||||
style="width: 98%; margin-left: 1%; margin-top: 15px"
|
||||
height="200"
|
||||
>
|
||||
<el-table-column label="序号" align="center" type="index" width="100">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="typeName"
|
||||
label="地物类型名称"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="typeId"
|
||||
label="像素实际值"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<div class="dealGrp">
|
||||
<el-button type="primary" @click="inspection">处理</el-button>
|
||||
<el-button type="primary" @click="dialogFormVisible = true"
|
||||
>无法处理</el-button
|
||||
>
|
||||
<el-button type="primary" @click="todaichuli">取消</el-button>
|
||||
</div>
|
||||
<!-- 无法处理弹窗 -->
|
||||
<div class="unableDeal">
|
||||
<el-dialog title="" :visible.sync="dialogFormVisible" width="35%">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span><span class="sp2">反馈信息</span>
|
||||
</div>
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="unDeal"
|
||||
class="demo-form-inline"
|
||||
ref="feedbackForm"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="反馈结果">
|
||||
<el-radio-group v-model="unDeal.udMsg">
|
||||
<el-radio label="无法处理"></el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="原因"
|
||||
prop="udReason"
|
||||
:rules="[{ message: ' ', required: true }]"
|
||||
>
|
||||
<el-select v-model="unDeal.udReason" placeholder="选择原因">
|
||||
<el-option
|
||||
v-for="item in udrOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片上传">
|
||||
<div class="tupian">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action="/"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
:before-upload="beforeUpload"
|
||||
:http-request="uploadImgFile"
|
||||
:on-remove="removeUploadFile"
|
||||
list-type="picture"
|
||||
>
|
||||
<el-button size="small" type="white"
|
||||
><i class="el-icon-upload"></i>上传图片</el-button
|
||||
>
|
||||
</el-upload>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<div class="beizhu">
|
||||
<el-form-item label="备注">
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="unDeal.remark"
|
||||
style="margin-left: -40px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="subFeedback">保存</el-button>
|
||||
<el-button type="primary" @click="dialogFormVisible = false"
|
||||
>取 消</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import cu from "@/lib/cesiumUtils";
|
||||
import {
|
||||
getProductMsg,
|
||||
getProductMetaMsg,
|
||||
getCoverTypes,
|
||||
orderFeedback,
|
||||
updateOrderMsg,
|
||||
disOrderStatus,
|
||||
updateOrderStage,
|
||||
getOrderSamples,
|
||||
downloadPdf,
|
||||
} from "@/api/pendingOrder";
|
||||
import qs from "qs";
|
||||
import ProductInfo from "../../../components/productInfo/index";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ProductInfo,
|
||||
},
|
||||
mounted() {
|
||||
cu.initCesium("PendPreview");
|
||||
cu.handleClick();
|
||||
},
|
||||
created() {
|
||||
if (
|
||||
Object.keys(this.$route.params).length > 0 &&
|
||||
sessionStorage.getItem("prePage") === this.configration.path.daichuli
|
||||
) {
|
||||
this.queryParams = this.$route.params;
|
||||
} else {
|
||||
this.queryParams = JSON.parse(
|
||||
localStorage.getItem(this.configration.path.daichuli)
|
||||
);
|
||||
}
|
||||
document.body.scrollTop = 0;
|
||||
this.initOrderMsg();
|
||||
this.getSplData();
|
||||
},
|
||||
filters: {
|
||||
orderSourceFilter(orderSource) {
|
||||
const orderSourceMap = {
|
||||
0: "用户上传",
|
||||
1: "历史上传",
|
||||
2: "平台共享",
|
||||
};
|
||||
return orderSourceMap[orderSource];
|
||||
},
|
||||
transformByte(size) {
|
||||
if (!size) {
|
||||
return "0B";
|
||||
}
|
||||
var num = 1024.0;
|
||||
if (size < num) {
|
||||
return size + "B";
|
||||
}
|
||||
if (size < Math.pow(num, 2)) {
|
||||
return (size / num).toFixed(2) + "K";
|
||||
}
|
||||
if (size < Math.pow(num, 3)) {
|
||||
return (size / Math.pow(num, 2)).toFixed(2) + "M";
|
||||
}
|
||||
if (size < Math.pow(num, 4)) {
|
||||
return (size / Math.pow(num, 3)).toFixed(2) + "G";
|
||||
}
|
||||
return (size / Math.pow(num, 4)).toFixed(2) + "T"; // T
|
||||
},
|
||||
formatDate(inputTime) {
|
||||
if (!inputTime && typeof inputTime !== "number") {
|
||||
return "";
|
||||
}
|
||||
var localTime = "";
|
||||
inputTime = new Date(inputTime);
|
||||
const offset = new Date().getTimezoneOffset();
|
||||
localTime = new Date(inputTime - offset * 60000).toISOString();
|
||||
localTime = localTime.substr(0, localTime.lastIndexOf("."));
|
||||
localTime = localTime.replace("T", " ");
|
||||
return localTime;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
queryParams: null,
|
||||
orderMsg: "",
|
||||
userId: null,
|
||||
productMsg: "",
|
||||
pageshow: true,
|
||||
isShow: false,
|
||||
formInline: {
|
||||
satellite: "", //卫星
|
||||
load: "", //载荷
|
||||
resRatio: "0.000307", //空间分辨率
|
||||
producedDate: "",
|
||||
proLevel: "4", //产品级别
|
||||
coordinateSys: "WGS84", //坐标系
|
||||
minLat: "116.13622332", //最小经度
|
||||
maxLat: "118.342222", //最大经度
|
||||
minLon: "34.211234", //最小纬度
|
||||
maxLon: "35.3455666", //最大纬度
|
||||
centerLon: "",
|
||||
centerLat: "",
|
||||
},
|
||||
orderData: [
|
||||
{
|
||||
orderCode: "219088784675",
|
||||
orderSource: "本地上传",
|
||||
uploadDate: "2021-05-24",
|
||||
fileName: "XXXXX产品.zip",
|
||||
fileSize: "1.0GB",
|
||||
fileFormat: "geotiff",
|
||||
},
|
||||
],
|
||||
tifPath: "",
|
||||
unDeal: {
|
||||
udMsg: "无法处理",
|
||||
udReason: "",
|
||||
remark: "",
|
||||
},
|
||||
udrOptions: [
|
||||
{
|
||||
value: "待检验产品格式不支持",
|
||||
label: "待检验产品格式不支持",
|
||||
},
|
||||
{
|
||||
value: "缺少地面实测数据",
|
||||
label: "缺少地面实测数据",
|
||||
},
|
||||
{
|
||||
value: "添加样本分布不均匀",
|
||||
label: "添加样本分布不均匀",
|
||||
},
|
||||
{
|
||||
value: "实测数据样本数量不满足要求",
|
||||
label: "实测数据样本数量不满足要求",
|
||||
},
|
||||
{
|
||||
value: "其他",
|
||||
label: "其他",
|
||||
},
|
||||
],
|
||||
feedbackImg: null,
|
||||
imgLocalUrl: null,
|
||||
imgFileList: [],
|
||||
dialogTableVisible: false,
|
||||
dialogFormVisible: false,
|
||||
groudClassShow: false,
|
||||
groudClassData: [
|
||||
{
|
||||
groClaName: "林地",
|
||||
pixelNum: "10",
|
||||
},
|
||||
{
|
||||
groClaName: "草地",
|
||||
pixelNum: "02",
|
||||
},
|
||||
],
|
||||
workSpace: null,
|
||||
layerName: null,
|
||||
|
||||
shadeIsShow: true,
|
||||
tempPos: null,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
formatDateStr: function () {
|
||||
let inputTime = this.formInline.producedDate;
|
||||
if (!inputTime) {
|
||||
//&& typeof inputTime !== 'number'){
|
||||
return "";
|
||||
}
|
||||
var localTime = "";
|
||||
inputTime = new Date(inputTime).getTime();
|
||||
const offset = new Date().getTimezoneOffset();
|
||||
localTime = new Date(inputTime - offset * 60000).toISOString();
|
||||
localTime = localTime.substr(0, localTime.lastIndexOf("."));
|
||||
localTime = localTime.replace("T", " ");
|
||||
return localTime;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
enterPreview() {
|
||||
// cu.initCesium("PendPreview");
|
||||
// this.initOrderMsg();
|
||||
const res = this.tempPos;
|
||||
cu.flyToLayerRect(
|
||||
res.boundBoxMinX,
|
||||
res.boundBoxMinY,
|
||||
res.boundingBoxMaxX,
|
||||
res.boundBoxMaxY
|
||||
);
|
||||
this.getSplData();
|
||||
this.shadeIsShow = false;
|
||||
},
|
||||
initOrderMsg() {
|
||||
const self = this;
|
||||
const om = (self.orderMsg = this.queryParams);
|
||||
// console.log("11111111", om);
|
||||
this.userId = Number(localStorage.userId);
|
||||
const orderId = self.orderMsg.id,
|
||||
pdType = self.orderMsg.product_subclass_id,
|
||||
pdUId = self.orderMsg.product_upload_id;
|
||||
getProductMsg(qs.stringify({ productId: pdUId })).then((res) => {
|
||||
// console.log(res[0])
|
||||
if (res || res.length !== 0) {
|
||||
const r = res[0];
|
||||
this.tifPath = r.tifPath;
|
||||
sessionStorage.setItem("tifPath", r.tifPath);
|
||||
self.productMsg = r;
|
||||
self.orderData = [];
|
||||
self.orderData.push({
|
||||
orderCode: om.order_code,
|
||||
orderSource: om.order_resource,
|
||||
uploadDate: om.create_date,
|
||||
fileName: r.fileName,
|
||||
fileSize: r.fileSize,
|
||||
fileFormat: r.fileFormat,
|
||||
});
|
||||
getProductMetaMsg(qs.stringify({ dataPath: r.tifPath })).then(
|
||||
(res) => {
|
||||
if (res !== null) {
|
||||
self.formInline = {
|
||||
satellite: om.satellite_name,
|
||||
load: om.satellite_load_name,
|
||||
resRatio:
|
||||
res.imageResolution > 0.01
|
||||
? res.imageResolution
|
||||
: (res.imageResolution * 111194.926).toFixed(2) + "米",
|
||||
coordinateSys: res.coordinateSystem,
|
||||
minLat: res.boundBoxMinY.toFixed(8),
|
||||
maxLat: res.boundBoxMaxY.toFixed(8),
|
||||
minLon: res.boundBoxMinX.toFixed(8),
|
||||
maxLon: res.boundingBoxMaxX.toFixed(8),
|
||||
centerLon: res.centerPosition.x,
|
||||
centerLat: res.centerPosition.y,
|
||||
producedDate: r.productDate,
|
||||
proLevel: r.productLevel + "",
|
||||
};
|
||||
//cu.flyToLayer(res.centerPosition.x,res.centerPosition.y)
|
||||
// this.tempPos = res;
|
||||
cu.flyToLayerRect(
|
||||
res.boundBoxMinX,
|
||||
res.boundBoxMinY,
|
||||
res.boundingBoxMaxX,
|
||||
res.boundBoxMaxY
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
const geoWS = r.geoWorkspace;
|
||||
const geoLN = r.layerName;
|
||||
this.workSpace = geoWS;
|
||||
this.layerName = geoLN;
|
||||
cu.addlayer(geoWS, geoLN);
|
||||
}
|
||||
});
|
||||
if (pdType === 6 || pdType === 12) {
|
||||
self.groudClassShow = true;
|
||||
getCoverTypes(orderId).then((res) => {
|
||||
if (res.msg === "操作成功") {
|
||||
self.groudClassData = res.data;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
inspection() {
|
||||
// this.pageshow=false
|
||||
let param = {
|
||||
userId: this.userId,
|
||||
orderMsg: this.orderMsg,
|
||||
productMsg: this.productMsg,
|
||||
orderData: this.orderData,
|
||||
metaMsg: this.formInline,
|
||||
};
|
||||
localStorage.setItem(
|
||||
this.configration.path.orderUnprocessed,
|
||||
JSON.stringify(param)
|
||||
);
|
||||
this.$router.push({ name: "检验处理", params: param });
|
||||
},
|
||||
changePage() {
|
||||
this.isShow = !this.isShow;
|
||||
},
|
||||
todaichuli() {
|
||||
this.$router.push(this.configration.path.daichuli);
|
||||
},
|
||||
backpage() {
|
||||
this.$router.go(-1);
|
||||
this.bus.$emit("aaaa", true);
|
||||
},
|
||||
tableRowClassName({ rowIndex }) {
|
||||
if ((rowIndex + 1) % 2 !== 0) {
|
||||
return "background:#F5F7FA";
|
||||
} else {
|
||||
return "background:#FFFFFF";
|
||||
}
|
||||
},
|
||||
uploadImgFile(option) {
|
||||
this.feedbackImg = option.file;
|
||||
},
|
||||
beforeUpload(file) {
|
||||
if (this.imgFileList.length > 0) {
|
||||
this.$message({
|
||||
message: "只能保存一张图片,请删除后再次上传!",
|
||||
type: "warning",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
this.imgFileList.push(file);
|
||||
this.imgLocalUrl = window.URL.createObjectURL(file);
|
||||
},
|
||||
removeUploadFile(file) {
|
||||
this.imgFileList.pop(file);
|
||||
},
|
||||
//订单反馈
|
||||
subFeedback() {
|
||||
this.$refs["feedbackForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
const fb = new FormData();
|
||||
fb.append("orderId", this.orderMsg.id);
|
||||
fb.append("userId", this.userId);
|
||||
fb.append("feedbackResult", this.unDeal.udMsg);
|
||||
fb.append("feedbackReason", this.unDeal.udReason);
|
||||
fb.append("feedbackContext", this.unDeal.remark);
|
||||
fb.append("imgFile", this.feedbackImg);
|
||||
orderFeedback(fb).then((res) => {
|
||||
if (res.code === 200 || res.message === "反馈成功") {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "反馈成功",
|
||||
});
|
||||
this.imgLocalUrl = null;
|
||||
this.dialogFormVisible = false;
|
||||
updateOrderMsg({
|
||||
id: this.orderMsg.id,
|
||||
auditId: this.userId,
|
||||
auditName: localStorage.userName,
|
||||
});
|
||||
disOrderStatus(this.orderMsg.id);
|
||||
const up = new FormData();
|
||||
up.append("orderId", this.orderMsg.id);
|
||||
up.append("orderStatus", 3);
|
||||
up.append("userId", this.orderMsg.user_id);
|
||||
updateOrderStage(up).then((res) => {
|
||||
if (res.code === 200)
|
||||
this.$router.push({ name: "待处理的检验订单" });
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
message: "无法处理的原因不能为空值!",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取样本
|
||||
getSplData() {
|
||||
getOrderSamples(this.orderMsg.id, this.orderMsg.product_subclass_id).then(
|
||||
(res) => {
|
||||
if (res.code == 200) {
|
||||
const sp = res.data;
|
||||
if (sp.length === 0) {
|
||||
this.$message({
|
||||
type: "warning",
|
||||
message: "没有样本数据",
|
||||
});
|
||||
} else {
|
||||
cu.removePoint();
|
||||
for (let i in sp) {
|
||||
cu.addPoint(sp[i].lon, sp[i].lat, sp[i].alt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
// 下载产品数据
|
||||
downLoadPro() {
|
||||
// console.log(this.productMsg);
|
||||
const zipPath = this.productMsg.filePath;
|
||||
if (zipPath !== null || zipPath !== undefined) {
|
||||
const pdfName = zipPath.substr(zipPath.lastIndexOf("/") + 1); //截取文件名称字符串
|
||||
if ("download" in document.createElement("a")) {
|
||||
const elink = document.createElement("a");
|
||||
elink.download = pdfName;
|
||||
elink.style.display = "none";
|
||||
elink.href = zipPath;
|
||||
document.body.appendChild(elink);
|
||||
elink.click();
|
||||
document.body.removeChild(elink);
|
||||
} else {
|
||||
location.href = zipPath;
|
||||
}
|
||||
// downloadPdf(zipPath).then((res) => {
|
||||
// // console.log(res);
|
||||
// if (res.size > 0) {
|
||||
// const content = res;
|
||||
// const blob = new Blob([content]);
|
||||
// const fileName = pdfName;
|
||||
// if ("download" in document.createElement("a")) {
|
||||
// // 非IE下载
|
||||
// const elink = document.createElement("a");
|
||||
// elink.download = fileName;
|
||||
// elink.style.display = "none";
|
||||
// elink.href = URL.createObjectURL(blob);
|
||||
// document.body.appendChild(elink);
|
||||
// elink.click();
|
||||
// URL.revokeObjectURL(elink.href); // 释放URL 对象
|
||||
// document.body.removeChild(elink);
|
||||
// } else {
|
||||
// // IE10+下载
|
||||
// navigator.msSaveBlob(blob, fileName);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
},
|
||||
pickValue() {
|
||||
cu.handleClick();
|
||||
},
|
||||
addLayer() {
|
||||
cu.addlayer(this.workSpace, this.layerName);
|
||||
},
|
||||
removeLayer() {
|
||||
cu.clearLayers();
|
||||
},
|
||||
removeSplData() {
|
||||
cu.removePoint();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.Fade-enter,
|
||||
.Fade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
.Fade-enter-to,
|
||||
.Fade-leave {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.Fade-enter-active,
|
||||
.Fade-leave-active {
|
||||
transition: all 0.4s;
|
||||
}
|
||||
|
||||
.daichuli {
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
font-size: 20px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.daichuli1 {
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
font-size: 20px;
|
||||
margin-top: 20px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
.daichuli2 {
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
font-size: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.sp1 {
|
||||
display: inline-block;
|
||||
width: 7px;
|
||||
height: 26px;
|
||||
background-color: #354595;
|
||||
position: relative;
|
||||
left: 20px;
|
||||
top: 6px;
|
||||
}
|
||||
.sp2 {
|
||||
margin-left: 30px;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #354595;
|
||||
}
|
||||
.box1 {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid rgb(205, 205, 205, 0.5);
|
||||
}
|
||||
/deep/.daichuli .el-button--primary {
|
||||
color: #fff;
|
||||
background-color: #409eff;
|
||||
border-color: #409eff;
|
||||
width: 100px;
|
||||
height: 30px;
|
||||
}
|
||||
/deep/.daichuli .el-button--primary:focus {
|
||||
background-color: #354595;
|
||||
border-color: #354595;
|
||||
}
|
||||
/deep/ .daichuli1 .el-button--primary {
|
||||
color: #fff;
|
||||
background-color: #409eff;
|
||||
border-color: #409eff;
|
||||
width: 100px;
|
||||
height: 30px;
|
||||
margin-left: 30px;
|
||||
position: relative;
|
||||
top: -3px;
|
||||
}
|
||||
#PendPreview {
|
||||
width: 98%;
|
||||
height: 600px;
|
||||
background-color: #354595;
|
||||
margin-left: 1%;
|
||||
margin-top: -60px;
|
||||
}
|
||||
.dealGrp {
|
||||
// margin-top: 20px;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
}
|
||||
/deep/.dealGrp .el-button--primary {
|
||||
width: 170px;
|
||||
height: 35px;
|
||||
margin-bottom: 20px;
|
||||
background-color: #354595;
|
||||
margin-left: 10px;
|
||||
border-color: #354595;
|
||||
}
|
||||
/deep/.daichuli1 .el-button--primary:hover {
|
||||
background-color: #354595;
|
||||
}
|
||||
/deep/.daichuli1 .el-button--primary:focus {
|
||||
background-color: #6979cc;
|
||||
border-color: #6979cc;
|
||||
}
|
||||
.cstop {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 0;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
.ysjMsg {
|
||||
width: 18%;
|
||||
}
|
||||
.ysjMsgMrg {
|
||||
margin-left: 14px;
|
||||
}
|
||||
.ysjMsg2 {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
/deep/.cstop .el-input.is-disabled .el-input__inner {
|
||||
width: 140px;
|
||||
height: 33px;
|
||||
}
|
||||
/deep/.cstop .el-form--inline .el-form-item__label {
|
||||
text-align: justify;
|
||||
// text-align-last: justify;
|
||||
font-size: 15px;
|
||||
}
|
||||
/deep/.cstop .el-radio {
|
||||
margin-right: 10px;
|
||||
}
|
||||
/deep/.cstop .el-radio__inner::after {
|
||||
background-color: #354595;
|
||||
}
|
||||
/deep/.cstop .el-radio__input.is-checked .el-radio__inner {
|
||||
border-color: #354595;
|
||||
background: white;
|
||||
}
|
||||
/deep/.cstop .el-radio__input.is-disabled .el-radio__inner {
|
||||
border-color: #354595;
|
||||
}
|
||||
/deep/.cstop .el-radio__input.is-disabled.is-checked .el-radio__inner::after {
|
||||
background-color: #354595;
|
||||
}
|
||||
/deep/.cstop .el-radio__input.is-checked + .el-radio__label {
|
||||
color: #606266;
|
||||
}
|
||||
/deep/.cstop .el-radio__inner {
|
||||
border: 2px solid #354595;
|
||||
}
|
||||
|
||||
.unableDeal .box1 {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 10px;
|
||||
z-index: 9999;
|
||||
}
|
||||
/deep/.unableDeal .el-radio {
|
||||
padding: 0 30px 0 20px;
|
||||
}
|
||||
/deep/.unableDeal .el-select .el-input {
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
/deep/.unableDeal .el-upload-dragger .el-icon-upload {
|
||||
font-size: 20px;
|
||||
color: black;
|
||||
}
|
||||
.upload-demo {
|
||||
display: inline-block;
|
||||
}
|
||||
.el-upload-dragger {
|
||||
margin-left: 0px;
|
||||
}
|
||||
/deep/.unableDeal .el-upload-dragger .el-icon-upload {
|
||||
margin: 0;
|
||||
line-height: 30px;
|
||||
}
|
||||
/deep/.unableDeal .el-form-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
/deep/.unableDeal .el-input__inner {
|
||||
height: 35px;
|
||||
}
|
||||
/deep/.unableDeal .el-upload-dragger {
|
||||
width: 150px;
|
||||
height: 35px;
|
||||
margin-left: 27px;
|
||||
margin-top: 20px;
|
||||
border: 1px solid #d9d9d9;
|
||||
}
|
||||
/deep/.unableDeal .el-textarea__inner {
|
||||
margin-left: 40px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.sp3 {
|
||||
position: relative;
|
||||
top: -13px;
|
||||
}
|
||||
// /deep/.el-textarea__inner{
|
||||
// margin-left: 70px;
|
||||
// margin-top: 20px;
|
||||
// }
|
||||
/deep/.beizhu .el-form-item__label {
|
||||
margin-top: 20px;
|
||||
}
|
||||
/deep/.dialog-footer {
|
||||
text-align: center;
|
||||
}
|
||||
/deep/.dialog-footer .el-button--primary {
|
||||
width: 150px;
|
||||
height: 35px;
|
||||
background-color: #354595;
|
||||
border-color: #354595;
|
||||
}
|
||||
/deep/.el-button {
|
||||
line-height: 0;
|
||||
}
|
||||
.imgPreview {
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
display: block;
|
||||
}
|
||||
.preview {
|
||||
width: 98%;
|
||||
height: 600px;
|
||||
margin-left: 1%;
|
||||
margin-top: -60px;
|
||||
position: relative;
|
||||
}
|
||||
.shade {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
width: 98%;
|
||||
height: 600px;
|
||||
appearance: none;
|
||||
background-color: rgba(14, 20, 34, 0.3);
|
||||
cursor: pointer;
|
||||
margin-left: 1%;
|
||||
line-height: 600px;
|
||||
text-align: center;
|
||||
color: white;
|
||||
z-index: 1000;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,332 @@
|
|||
<template>
|
||||
<div>
|
||||
<transition name="Fade" mode="in-out">
|
||||
<router-view></router-view>
|
||||
</transition>
|
||||
<div>
|
||||
<div class="daichuli">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span><span class="sp2">订单查询</span>
|
||||
</div>
|
||||
<OrderSearch
|
||||
:getOrderList="getOrderList"
|
||||
ref="orderSearchPanel"
|
||||
@initPage="initPage"
|
||||
></OrderSearch>
|
||||
</div>
|
||||
<div class="daichuli1">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span><span class="sp2">查询结果</span>
|
||||
</div>
|
||||
<el-table
|
||||
:header-cell-style="{ background: '#E4E9F1' }"
|
||||
:cell-style="tableRowClassName"
|
||||
:data="pendingData"
|
||||
style="width: 98%; margin-left: 1%; margin-top: 15px"
|
||||
>
|
||||
<el-table-column
|
||||
prop="orderCode"
|
||||
label="订单编号"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.order_code }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="uploadDate"
|
||||
label="提交日期"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.create_date | formatDate }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="satelliteType" label="卫星类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.satellite_name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="load" label="载荷名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.satellite_load_name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="category" label="产品大类" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.product_id | categoryFilter }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="cldCategory" label="产品小类" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.product_subclass_id | cldCategoryFilter }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
prop="checkoutFun"
|
||||
label="检验类型"
|
||||
align="center"
|
||||
>
|
||||
直接检验
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="user_id" label="订单创建者" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.userName }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="changePage(scope.row)"
|
||||
>订单处理</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<Pagination
|
||||
:page-sizes="[6, 12, 18]"
|
||||
:total="pageForm.total"
|
||||
:page.sync="pageForm.page"
|
||||
:limit.sync="pageForm.limit"
|
||||
@pagination="getOrderList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OrderSearch from "@/components/orderSearch";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import { getOrderListByStatus } from "@/api/common";
|
||||
import { updateOrderStatus } from "@/api/pendingOrder";
|
||||
export default {
|
||||
components: { Pagination, OrderSearch },
|
||||
filters: {
|
||||
categoryFilter(category) {
|
||||
const categoryMap = {
|
||||
1: "几何产品",
|
||||
2: "辐射产品",
|
||||
3: "陆表产品",
|
||||
4: "植被产品",
|
||||
};
|
||||
return categoryMap[category];
|
||||
},
|
||||
cldCategoryFilter(cldCategory) {
|
||||
const cldCategoryMap = {
|
||||
1: "正射校正",
|
||||
2: "高程产品",
|
||||
5: "干涉测量形变产品",
|
||||
3: "后向散射系数",
|
||||
4: "大气延迟校正",
|
||||
9: "地表粗糙度",
|
||||
6: "地表覆盖类型",
|
||||
7: "土壤水分",
|
||||
8: "地表盐碱度",
|
||||
10: "植被高度",
|
||||
11: "叶面积指数",
|
||||
12: "植被物候",
|
||||
};
|
||||
return cldCategoryMap[cldCategory];
|
||||
},
|
||||
formatDate(inputTime) {
|
||||
if (!inputTime && typeof inputTime !== "number") {
|
||||
return "";
|
||||
}
|
||||
var localTime = "";
|
||||
inputTime = new Date(inputTime);
|
||||
const offset = new Date().getTimezoneOffset();
|
||||
localTime = new Date(inputTime - offset * 60000).toISOString();
|
||||
localTime = localTime.substr(0, localTime.lastIndexOf("."));
|
||||
localTime = localTime.replace("T", " ");
|
||||
return localTime;
|
||||
},
|
||||
userIdFilter(userId) {
|
||||
const userIdMap = {
|
||||
1: "默认",
|
||||
2: "测试员",
|
||||
3: "陈鹏",
|
||||
4: "卢慧龙",
|
||||
5: "郜琪",
|
||||
};
|
||||
return userIdMap[userId];
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pendingData: [],
|
||||
pageForm: {
|
||||
total: 0,
|
||||
page: 1,
|
||||
limit: 6,
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getOrderList();
|
||||
},
|
||||
methods: {
|
||||
getOrderList() {
|
||||
const searchVal = this.$refs.orderSearchPanel;
|
||||
const sf = searchVal.searchForm;
|
||||
sf.page = this.pageForm.page;
|
||||
sf.limit = this.pageForm.limit;
|
||||
sf.status = [8];
|
||||
getOrderListByStatus(sf).then((res) => {
|
||||
// console.log(res);
|
||||
if (res.code === 200) {
|
||||
this.pendingData = res.data.dataList;
|
||||
this.pageForm.total = res.data.count;
|
||||
}
|
||||
});
|
||||
},
|
||||
initPage() {
|
||||
this.pageForm.page = 1;
|
||||
},
|
||||
tableRowClassName({ rowIndex }) {
|
||||
if ((rowIndex + 1) % 2 !== 0) {
|
||||
return "background:#F5F7FA";
|
||||
} else {
|
||||
return "background:#FFFFFF";
|
||||
}
|
||||
},
|
||||
changePage(orderMsg) {
|
||||
// this.$router.push("/orderUnprocessed");
|
||||
localStorage.setItem(
|
||||
this.configration.path.daichuli,
|
||||
JSON.stringify(orderMsg)
|
||||
);
|
||||
updateOrderStatus(orderMsg.id).then((res) => {
|
||||
if (res?.code === 401) {
|
||||
this.$message.warning(res.msg);
|
||||
return false;
|
||||
} else {
|
||||
this.$router.push({ name: "订单反馈", params: orderMsg });
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.Fade-enter,
|
||||
.Fade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
.Fade-enter-to,
|
||||
.Fade-leave {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.Fade-enter-active,
|
||||
.Fade-leave-active {
|
||||
transition: all 0.4s;
|
||||
}
|
||||
|
||||
.daichuli {
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
font-size: 16px;
|
||||
}
|
||||
.daichuli1 {
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
font-size: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.sp1 {
|
||||
display: inline-block;
|
||||
width: 7px;
|
||||
height: 26px;
|
||||
background-color: #354595;
|
||||
position: relative;
|
||||
left: 20px;
|
||||
top: 6px;
|
||||
}
|
||||
/deep/.el-icon-arrow-up:before {
|
||||
content: "\e78f";
|
||||
}
|
||||
.sp2 {
|
||||
margin-left: 30px;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #354595;
|
||||
}
|
||||
.box1 {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid rgb(205, 205, 205, 0.5);
|
||||
}
|
||||
|
||||
/deep/.el-date-editor--datetimerange.el-input,
|
||||
.el-date-editor--datetimerange.el-input__inner {
|
||||
width: 270px;
|
||||
height: 35px;
|
||||
line-height: 30px;
|
||||
}
|
||||
/deep/.el-range-editor.el-input__inner {
|
||||
padding: 1px 10px;
|
||||
}
|
||||
// /deep/.daichuli .el-select {
|
||||
// width: 270px;
|
||||
// }
|
||||
// /deep/.daichuli .el-input__inner {
|
||||
// height: 35px;
|
||||
// line-height: 35px;
|
||||
// }
|
||||
.inp1 {
|
||||
width: 270px;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
}
|
||||
// /deep/.daichuli .el-input__inner {
|
||||
// width: 270px;
|
||||
// height: 35px;
|
||||
// line-height: 35px;
|
||||
// }
|
||||
.sp31 {
|
||||
display: inline-block;
|
||||
}
|
||||
/deep/.daichuli .el-input {
|
||||
width: 270px;
|
||||
}
|
||||
.box28 {
|
||||
text-align: center;
|
||||
}
|
||||
/deep/.daichuli .el-button--primary {
|
||||
width: 170px;
|
||||
height: 35px;
|
||||
// margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
/deep/.el-button {
|
||||
line-height: 0;
|
||||
}
|
||||
.block {
|
||||
margin-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
/deep/.daichuli1 .el-button--primary {
|
||||
color: #354595;
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
}
|
||||
/deep/.daichuli1 .el-button--primary:hover {
|
||||
background-color: #409eff;
|
||||
color: #fff;
|
||||
}
|
||||
/deep/.el-input__icon {
|
||||
line-height: 35px;
|
||||
}
|
||||
/deep/.el-table th > .cell {
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,594 @@
|
|||
<template>
|
||||
<div>
|
||||
<div class="orderMsg">
|
||||
<div class="title">
|
||||
<span class="sp1"></span><span class="sp2">订单信息</span>
|
||||
</div>
|
||||
<el-table
|
||||
:data="orderList"
|
||||
:header-cell-style="{ background: '#E4E9F1' }"
|
||||
:cell-style="tableRowClassName"
|
||||
style="width: 98%; margin-left: 1%; margin-top: 15px"
|
||||
:default-sort="{ prop: 'date', order: 'descending' }"
|
||||
>
|
||||
<el-table-column
|
||||
prop="orderCode"
|
||||
label="订单编号"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="orderSource"
|
||||
label="订单来源"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.orderSource | orderSourceFilter }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="uploadDate" label="提交时间" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.uploadDate | formatDate }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="fileName" label="文件名" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="fileSize"
|
||||
label="文件大小"
|
||||
sortable
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.fileSize | transformByte }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="fileFormat"
|
||||
label="文件格式"
|
||||
sortable
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="元数据" align="center">
|
||||
<el-button type="primary" @click="openMetaCode">查看</el-button>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="metaMsg" v-show="metaShow">
|
||||
<div class="title">
|
||||
<span class="sp1"></span><span class="sp2">元数据信息</span>
|
||||
</div>
|
||||
<div class="cstop">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="metaFormMsg"
|
||||
class="demo-form-inline"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-form-item label="卫星" class="ysjMsg">
|
||||
<el-input
|
||||
class="ysjMsgMrg"
|
||||
v-model="metaFormMsg.satellite"
|
||||
placeholder="卫星名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="载荷" class="ysjMsg">
|
||||
<el-input
|
||||
class="ysjMsgMrg"
|
||||
v-model="metaFormMsg.load"
|
||||
placeholder="载荷方式"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="空间分辨率" class="ysjMsg2">
|
||||
<el-input
|
||||
v-model="metaFormMsg.resRatio"
|
||||
placeholder="空间分辨率"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间" class="ysjMsg">
|
||||
<el-input
|
||||
class="ysjMsgMrg"
|
||||
v-model="formatDateStr"
|
||||
placeholder="生产时间"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="级别" prop="resource" class="ysjMsg2">
|
||||
<el-radio-group v-model="metaFormMsg.proLevel">
|
||||
<el-radio label="3"></el-radio>
|
||||
<el-radio label="4"></el-radio>
|
||||
<el-radio label="5"></el-radio>
|
||||
<!-- <el-radio label="其他"></el-radio> -->
|
||||
</el-radio-group> </el-form-item
|
||||
><br />
|
||||
<el-form-item label="坐标系统" class="ysjMsg">
|
||||
<el-input
|
||||
v-model="metaFormMsg.coordinateSys"
|
||||
placeholder="坐标系统"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最小纬度" class="ysjMsg">
|
||||
<el-input
|
||||
v-model="metaFormMsg.minLat"
|
||||
placeholder="最小纬度"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大纬度" class="ysjMsg2">
|
||||
<el-input
|
||||
style="margin-left: 6px"
|
||||
v-model="metaFormMsg.maxLat"
|
||||
placeholder="最大纬度"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最小经度" class="ysjMsg">
|
||||
<el-input
|
||||
v-model="metaFormMsg.minLon"
|
||||
placeholder="最小经度"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大经度" class="ysjMsg2">
|
||||
<el-input
|
||||
v-model="metaFormMsg.maxLon"
|
||||
placeholder="最大经度"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="showOrderMsg">
|
||||
<div class="orderScene">
|
||||
<div class="title">
|
||||
<span class="sp1"></span><span class="sp2">待审核产品预览</span>
|
||||
</div>
|
||||
<div
|
||||
id="auditPreview"
|
||||
@click="pickValue"
|
||||
style="overflow: hidden; position: relative"
|
||||
></div>
|
||||
</div>
|
||||
<div class="orderPdf">
|
||||
<div class="title">
|
||||
<span class="sp1"></span><span class="sp2">检验报告</span>
|
||||
</div>
|
||||
<div class="pdfDom">
|
||||
<iframe class="pdfPage" :src="pdfUrl" frameborder="0"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="orderAudit">
|
||||
<div class="title">
|
||||
<span class="sp1"></span><span class="sp2">审核信息</span>
|
||||
</div>
|
||||
<div class="radiogroup">
|
||||
<el-radio-group v-model="auditVal">
|
||||
<el-radio label="1">审核通过</el-radio>
|
||||
<el-radio label="2">审核不通过</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<el-input
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
placeholder="请输入内容"
|
||||
v-model="auditText"
|
||||
>
|
||||
</el-input>
|
||||
<div class="btngroup">
|
||||
<el-button class="shbtn" type="primary" @click="cancleSubmit"
|
||||
>取消</el-button
|
||||
>
|
||||
<el-button class="shbtn" type="primary" @click="submitAuditMsg"
|
||||
>确定</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import cu from "@/lib/cesiumUtils";
|
||||
import {
|
||||
getProductMsg,
|
||||
getProductMetaMsg,
|
||||
getOrderSamples,
|
||||
updateOrderMsg,
|
||||
disOrderStatus,
|
||||
updateOrderStage,
|
||||
getReportMsg,
|
||||
} from "@/api/pendingOrder";
|
||||
import { orderExamine } from "@/api/audit";
|
||||
import qs from "qs";
|
||||
|
||||
export default {
|
||||
filters: {
|
||||
orderSourceFilter(orderSource) {
|
||||
const orderSourceMap = {
|
||||
0: "用户上传",
|
||||
1: "历史上传",
|
||||
2: "平台共享",
|
||||
};
|
||||
return orderSourceMap[orderSource];
|
||||
},
|
||||
transformByte(size) {
|
||||
if (!size) {
|
||||
return "0B";
|
||||
}
|
||||
var num = 1024.0;
|
||||
if (size < num) {
|
||||
return size + "B";
|
||||
}
|
||||
if (size < Math.pow(num, 2)) {
|
||||
return (size / num).toFixed(2) + "K";
|
||||
}
|
||||
if (size < Math.pow(num, 3)) {
|
||||
return (size / Math.pow(num, 2)).toFixed(2) + "M";
|
||||
}
|
||||
if (size < Math.pow(num, 4)) {
|
||||
return (size / Math.pow(num, 3)).toFixed(2) + "G";
|
||||
}
|
||||
return (size / Math.pow(num, 4)).toFixed(2) + "T"; // T
|
||||
},
|
||||
formatDate(inputTime) {
|
||||
if (!inputTime && typeof inputTime !== "number") {
|
||||
return "";
|
||||
}
|
||||
var localTime = "";
|
||||
inputTime = new Date(inputTime);
|
||||
const offset = new Date().getTimezoneOffset();
|
||||
localTime = new Date(inputTime - offset * 60000).toISOString();
|
||||
localTime = localTime.substr(0, localTime.lastIndexOf("."));
|
||||
localTime = localTime.replace("T", " ");
|
||||
return localTime;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
cu.initCesium("auditPreview");
|
||||
cu.handleClick();
|
||||
},
|
||||
created() {
|
||||
if (
|
||||
Object.keys(this.$route.params).length > 0 &&
|
||||
sessionStorage.getItem("prePage") === this.configration.path.daishenhe
|
||||
) {
|
||||
this.queryParams = this.$route.params;
|
||||
} else {
|
||||
this.queryParams = JSON.parse(
|
||||
localStorage.getItem(this.configration.path.daishenhe)
|
||||
);
|
||||
}
|
||||
console.log("111111", this.queryParams);
|
||||
document.body.scrollTop = 0;
|
||||
this.initOrderMsg();
|
||||
const samplesList = this.queryParams.sample;
|
||||
this.getSplData(samplesList);
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
queryParams: null,
|
||||
metaShow: false,
|
||||
orderList: [],
|
||||
metaFormMsg: {
|
||||
satellite: "", //卫星
|
||||
load: "", //载荷
|
||||
resRatio: "0.000307", //空间分辨率
|
||||
proLevel: "4", //产品级别
|
||||
coordinateSys: "WGS84", //坐标系
|
||||
minLat: "116.13622332", //最小经度
|
||||
maxLat: "118.342222", //最大经度
|
||||
minLon: "34.211234", //最小纬度
|
||||
maxLon: "35.3455666", //最大纬度
|
||||
},
|
||||
pdfUrl: "static/data/download.pdf",
|
||||
auditVal: "1",
|
||||
auditText: "",
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
formatDateStr: function () {
|
||||
let inputTime = this.metaFormMsg.producedDate;
|
||||
if (!inputTime) {
|
||||
//&& typeof inputTime !== 'number'){
|
||||
return "";
|
||||
}
|
||||
var localTime = "";
|
||||
inputTime = new Date(inputTime).getTime();
|
||||
const offset = new Date().getTimezoneOffset();
|
||||
localTime = new Date(inputTime - offset * 60000).toISOString();
|
||||
localTime = localTime.substr(0, localTime.lastIndexOf("."));
|
||||
localTime = localTime.replace("T", " ");
|
||||
return localTime;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
initOrderMsg() {
|
||||
const self = this;
|
||||
const om = this.queryParams;
|
||||
const pdUId = om.product_upload_id;
|
||||
getProductMsg(qs.stringify({ productId: pdUId })).then((res) => {
|
||||
if (res || res.length !== 0) {
|
||||
const r = res[0];
|
||||
sessionStorage.setItem("tifPath", r.tifPath);
|
||||
self.orderList = [];
|
||||
self.orderList.push({
|
||||
orderCode: om.order_code,
|
||||
orderSource: om.order_resource,
|
||||
uploadDate: om.create_date,
|
||||
fileName: r.fileName,
|
||||
fileSize: r.fileSize,
|
||||
fileFormat: r.fileFormat,
|
||||
});
|
||||
getProductMetaMsg(qs.stringify({ dataPath: r.tifPath })).then(
|
||||
(res) => {
|
||||
if (res !== null) {
|
||||
self.metaFormMsg = {
|
||||
satellite: om.satellite_name,
|
||||
load: om.satellite_load_name,
|
||||
resRatio:
|
||||
res.imageResolution > 0.01
|
||||
? res.imageResolution
|
||||
: (res.imageResolution * 111194.926).toFixed(2) + "米",
|
||||
coordinateSys: res.coordinateSystem,
|
||||
minLat: res.boundBoxMinY.toFixed(8),
|
||||
maxLat: res.boundBoxMaxY.toFixed(8),
|
||||
minLon: res.boundBoxMinX.toFixed(8),
|
||||
maxLon: res.boundingBoxMaxX.toFixed(8),
|
||||
producedDate: r.productDate,
|
||||
proLevel: r.productLevel + "",
|
||||
};
|
||||
cu.flyToLayerRect(
|
||||
res.boundBoxMinX,
|
||||
res.boundBoxMinY,
|
||||
res.boundingBoxMaxX,
|
||||
res.boundBoxMaxY
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
const geoWS = r.geoWorkspace;
|
||||
const geoLN = r.layerName;
|
||||
cu.addlayer(geoWS, geoLN);
|
||||
}
|
||||
});
|
||||
this.getNumPages(om.id);
|
||||
},
|
||||
getNumPages(orderId) {
|
||||
getReportMsg(orderId).then((res) => {
|
||||
console.log(res);
|
||||
if (res.code === 200 && res.data.length !== 0) {
|
||||
const rpMsg = res.data[0];
|
||||
this.pdfUrl = rpMsg.validationReportDownload;
|
||||
}
|
||||
});
|
||||
},
|
||||
tableRowClassName({ rowIndex }) {
|
||||
if ((rowIndex + 1) % 2 !== 0) {
|
||||
return "background:#F5F7FA";
|
||||
} else {
|
||||
return "background:#FFFFFF";
|
||||
}
|
||||
},
|
||||
openMetaCode() {
|
||||
this.metaShow = !this.metaShow;
|
||||
},
|
||||
submitAuditMsg() {
|
||||
const om = this.queryParams;
|
||||
const oe = {
|
||||
orderId: om.id,
|
||||
userId: localStorage.userId,
|
||||
exContext: this.auditText,
|
||||
exResult: Number(this.auditVal),
|
||||
};
|
||||
let os = 6;
|
||||
if (this.auditVal === "2") os = 7;
|
||||
orderExamine(qs.stringify(oe)).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "订单审核成功",
|
||||
});
|
||||
updateOrderMsg({
|
||||
id: om.id,
|
||||
inspectionId: localStorage.userId,
|
||||
inspectionName: localStorage.userName,
|
||||
});
|
||||
disOrderStatus(om.id);
|
||||
const up = new FormData();
|
||||
up.append("orderId", om.id);
|
||||
up.append("orderStatus", os);
|
||||
up.append("userId", om.user_id);
|
||||
updateOrderStage(up).then((res) => {
|
||||
if (res.code === 200) this.$router.push({ name: "待审核检验订单" });
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
cancleSubmit() {
|
||||
this.$router.push({ name: "待审核检验订单" });
|
||||
},
|
||||
// 获取样本
|
||||
getSplData(spl) {
|
||||
const om = this.queryParams;
|
||||
getOrderSamples(om.id, om.product_subclass_id).then((res) => {
|
||||
if (res.code == 200) {
|
||||
const sp = res.data;
|
||||
if (sp.length === 0) {
|
||||
this.$message({
|
||||
type: "warning",
|
||||
message: "没有样本数据",
|
||||
});
|
||||
} else {
|
||||
let sp = JSON.parse(spl);
|
||||
cu.removePoint();
|
||||
for (let i in sp) {
|
||||
cu.addPoint(sp[i].lon, sp[i].lat, sp[i].alt);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
pickValue() {
|
||||
cu.handleClick();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.orderMsg {
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
font-size: 20px;
|
||||
height: 180px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.metaMsg {
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
font-size: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.showOrderMsg {
|
||||
width: 100%;
|
||||
// background-color: white;
|
||||
font-size: 20px;
|
||||
margin: 20px 0 20px 0;
|
||||
height: 600px;
|
||||
}
|
||||
.title {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid rgb(205, 205, 205, 0.5);
|
||||
}
|
||||
.orderScene {
|
||||
width: 50%;
|
||||
height: inherit;
|
||||
background-color: white;
|
||||
float: left;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
#auditPreview {
|
||||
width: 98%;
|
||||
height: calc(100% - 45px);
|
||||
background-color: #354595;
|
||||
margin-left: 1%;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.orderPdf {
|
||||
width: calc(50% - 10px);
|
||||
margin-left: 10px;
|
||||
float: left;
|
||||
background-color: white;
|
||||
height: inherit;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
.orderPdf {
|
||||
width: calc(50% - 10px);
|
||||
margin-left: 10px;
|
||||
float: left;
|
||||
background-color: white;
|
||||
height: inherit;
|
||||
padding-bottom: 5px;
|
||||
.pdfDom {
|
||||
height: 560px;
|
||||
background-color: white;
|
||||
.pdfPage {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.orderAudit {
|
||||
background-color: white;
|
||||
}
|
||||
.radiogroup {
|
||||
margin-top: 20px;
|
||||
margin-left: 20px;
|
||||
height: 50px;
|
||||
}
|
||||
.btngroup {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
// margin-left: 40%;
|
||||
text-align: center;
|
||||
}
|
||||
.shbtn {
|
||||
width: 150px;
|
||||
height: 35px;
|
||||
background-color: #354595;
|
||||
border: 0;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.sp1 {
|
||||
display: inline-block;
|
||||
width: 7px;
|
||||
height: 26px;
|
||||
background-color: #354595;
|
||||
position: relative;
|
||||
left: 20px;
|
||||
top: 6px;
|
||||
}
|
||||
.sp2 {
|
||||
margin-left: 30px;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #354595;
|
||||
}
|
||||
.cstop {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 0;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
.ysjMsg {
|
||||
width: 18%;
|
||||
}
|
||||
.ysjMsgMrg {
|
||||
margin-left: 14px;
|
||||
}
|
||||
.ysjMsg2 {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
/deep/.cstop .el-input.is-disabled .el-input__inner {
|
||||
width: 140px;
|
||||
height: 33px;
|
||||
}
|
||||
/deep/.cstop .el-form--inline .el-form-item__label {
|
||||
text-align: justify;
|
||||
// text-align-last: justify;
|
||||
font-size: 15px;
|
||||
}
|
||||
/deep/.cstop .el-radio {
|
||||
margin-right: 10px;
|
||||
}
|
||||
/deep/.cstop .el-radio__inner::after {
|
||||
background-color: #354595;
|
||||
}
|
||||
/deep/.cstop .el-radio__input.is-checked .el-radio__inner {
|
||||
border-color: #354595;
|
||||
background: white;
|
||||
}
|
||||
/deep/.cstop .el-radio__input.is-disabled .el-radio__inner {
|
||||
border-color: #354595;
|
||||
}
|
||||
/deep/.cstop .el-radio__input.is-disabled.is-checked .el-radio__inner::after {
|
||||
background-color: #354595;
|
||||
}
|
||||
/deep/.cstop .el-radio__input.is-checked + .el-radio__label {
|
||||
color: #606266;
|
||||
}
|
||||
/deep/.cstop .el-radio__inner {
|
||||
border: 2px solid #354595;
|
||||
}
|
||||
/deep/.el-button {
|
||||
line-height: 0;
|
||||
}
|
||||
/deep/.el-textarea__inner {
|
||||
margin-left: 20px;
|
||||
width: 50%;
|
||||
}
|
||||
/deep/.el-textarea__inner:focus {
|
||||
border-color: #354595;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,260 @@
|
|||
<template>
|
||||
<div>
|
||||
<router-view></router-view>
|
||||
<div>
|
||||
<div class="daichuli">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span><span class="sp2">订单查询</span>
|
||||
</div>
|
||||
<OrderSearch
|
||||
:getOrderList="getOrderList"
|
||||
ref="orderSearchPanel"
|
||||
@initPage="initPage"
|
||||
></OrderSearch>
|
||||
</div>
|
||||
<div class="daichuli1">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span><span class="sp2">查询结果</span>
|
||||
</div>
|
||||
<el-table
|
||||
:header-cell-style="{ background: '#E4E9F1' }"
|
||||
:cell-style="tableRowClassName"
|
||||
:data="auditData"
|
||||
style="width: 98%; margin-left: 1%; margin-top: 15px"
|
||||
>
|
||||
<el-table-column
|
||||
prop="order_code"
|
||||
label="订单编号"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="create_date"
|
||||
label="提交日期"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.create_date | formatDate }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="satellite_name"
|
||||
label="卫星类型"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="satellite_load_name"
|
||||
label="载荷"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column prop="product_id" label="产品大类" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.product_id | categoryFilter }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="product_subclass_id"
|
||||
label="产品小类"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.product_subclass_id | cldCategoryFilter }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="validation_method_desc"
|
||||
label="检验类型"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userName" label="创建人员" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="auditName" label="检验人员" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="openAudit(scope.row)"
|
||||
>订单审核</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<Pagination
|
||||
:page-sizes="[6, 12, 18]"
|
||||
:total="pageForm.total"
|
||||
:page.sync="pageForm.page"
|
||||
:limit.sync="pageForm.limit"
|
||||
@pagination="getOrderList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OrderSearch from "@/components/orderSearch";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import { getOrderListByStatus } from "@/api/common";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
OrderSearch,
|
||||
Pagination,
|
||||
},
|
||||
filters: {
|
||||
categoryFilter(category) {
|
||||
const categoryMap = {
|
||||
1: "几何产品",
|
||||
2: "辐射产品",
|
||||
3: "陆表产品",
|
||||
4: "植被产品",
|
||||
};
|
||||
return categoryMap[category];
|
||||
},
|
||||
cldCategoryFilter(cldCategory) {
|
||||
const cldCategoryMap = {
|
||||
1: "正射校正",
|
||||
2: "高程产品",
|
||||
5: "干涉测量形变产品",
|
||||
3: "后向散射系数",
|
||||
4: "大气延迟校正",
|
||||
9: "地表粗糙度",
|
||||
6: "地表覆盖类型",
|
||||
7: "土壤水分",
|
||||
8: "地表盐碱度",
|
||||
10: "植被高度",
|
||||
11: "叶面积指数",
|
||||
12: "植被物候",
|
||||
};
|
||||
return cldCategoryMap[cldCategory];
|
||||
},
|
||||
formatDate(inputTime) {
|
||||
if (!inputTime && typeof inputTime !== "number") {
|
||||
return "";
|
||||
}
|
||||
var localTime = "";
|
||||
inputTime = new Date(inputTime);
|
||||
const offset = new Date().getTimezoneOffset();
|
||||
localTime = new Date(inputTime - offset * 60000).toISOString();
|
||||
localTime = localTime.substr(0, localTime.lastIndexOf("."));
|
||||
localTime = localTime.replace("T", " ");
|
||||
return localTime;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
auditData: [],
|
||||
pageForm: {
|
||||
total: 0,
|
||||
page: 1,
|
||||
limit: 6,
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getOrderList();
|
||||
},
|
||||
methods: {
|
||||
tableRowClassName({ rowIndex }) {
|
||||
if ((rowIndex + 1) % 2 !== 0) {
|
||||
return "background:#F5F7FA";
|
||||
} else {
|
||||
return "background:#FFFFFF";
|
||||
}
|
||||
},
|
||||
openAudit(orderMsg) {
|
||||
localStorage.setItem(
|
||||
this.configration.path.daishenhe,
|
||||
JSON.stringify(orderMsg)
|
||||
);
|
||||
this.$router.push({ name: "订单审核", params: orderMsg });
|
||||
},
|
||||
getOrderList() {
|
||||
const searchVal = this.$refs.orderSearchPanel;
|
||||
const sf = searchVal.searchForm;
|
||||
sf.page = this.pageForm.page;
|
||||
sf.limit = this.pageForm.limit;
|
||||
sf.status = [2];
|
||||
|
||||
getOrderListByStatus(sf).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.auditData = res.data.dataList;
|
||||
this.pageForm.total = res.data.count;
|
||||
}
|
||||
});
|
||||
},
|
||||
initPage() {
|
||||
this.pageForm.page = 1;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.daichuli {
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
font-size: 20px;
|
||||
}
|
||||
.daichuli1 {
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
font-size: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
/deep/.el-icon-arrow-up:before {
|
||||
content: "\e78f";
|
||||
}
|
||||
.sp1 {
|
||||
display: inline-block;
|
||||
width: 7px;
|
||||
height: 26px;
|
||||
background-color: #354595;
|
||||
position: relative;
|
||||
left: 20px;
|
||||
top: 6px;
|
||||
}
|
||||
.sp2 {
|
||||
margin-left: 30px;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #354595;
|
||||
}
|
||||
.box1 {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid rgb(205, 205, 205, 0.5);
|
||||
}
|
||||
.block {
|
||||
margin-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
/deep/.daichuli1 .el-button--primary {
|
||||
color: #354595;
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
}
|
||||
/deep/.daichuli1 .el-button--primary:hover {
|
||||
background-color: #409eff;
|
||||
color: #fff;
|
||||
}
|
||||
/deep/.el-input__icon {
|
||||
line-height: 35px;
|
||||
}
|
||||
/deep/.el-table th > .cell {
|
||||
font-size: 16px;
|
||||
}
|
||||
/deep/.el-button {
|
||||
line-height: 0;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,90 @@
|
|||
<template>
|
||||
<div class="home">
|
||||
<div class="header">
|
||||
<img
|
||||
src="/static/images/header.png"
|
||||
alt="#"
|
||||
style="height: 50px; margin-top: 5px;margin-left:300px"
|
||||
/>
|
||||
<i class="el-icon-user-solid userName" >
|
||||
<span>{{userName}}</span>
|
||||
</i>
|
||||
</div>
|
||||
<div id="cesium_container"></div>
|
||||
<TestProduct v-show="showRightcard"></TestProduct>
|
||||
<Parameter v-show="showLeftcard"></Parameter>
|
||||
<Iconbox></Iconbox>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import cu from "@/lib/cesiumUtils";
|
||||
import TestProduct from "../components/home/testProduct/index.vue";
|
||||
import Parameter from '../components/home/parameter/index.vue';
|
||||
import Iconbox from '../components/home/iconbox/index.vue';
|
||||
export default {
|
||||
name: "Home",
|
||||
data() {
|
||||
return {
|
||||
showRightcard:false,
|
||||
// sendToProParam:{
|
||||
// proID:'1',
|
||||
// ifShow:true,
|
||||
// labelCla:'surfaceRoughness'
|
||||
// },
|
||||
isLabelCla:true,
|
||||
showLeftcard:true,
|
||||
currentUser: null,
|
||||
};
|
||||
},
|
||||
components: {
|
||||
TestProduct,
|
||||
Parameter,
|
||||
Iconbox,
|
||||
},
|
||||
created() {},
|
||||
|
||||
mounted() {
|
||||
// 初始化地图
|
||||
cu.initCesium("cesium_container");
|
||||
// 监听事件
|
||||
this.bus.$on("openMenu", msg => {
|
||||
this.showRightcard=msg.ifShow;
|
||||
// this.sendToProParam = msg;
|
||||
});
|
||||
this.bus.$on('closeleftcard',msg=>{
|
||||
this.showLeftcard=msg
|
||||
})
|
||||
},
|
||||
computed:{
|
||||
userName:function(){
|
||||
return localStorage.getItem("userName")
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.header {
|
||||
background: white;
|
||||
height: 60px;
|
||||
}
|
||||
#cesium_container{
|
||||
display: block;
|
||||
position: absolute;
|
||||
border: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.userName{
|
||||
font-size: 20px;
|
||||
color: #354595;
|
||||
float: right;
|
||||
margin-top: 30px;
|
||||
margin-right: 20px;
|
||||
span{
|
||||
color: #000;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,190 @@
|
|||
<template>
|
||||
<div class="login-container">
|
||||
<el-form
|
||||
class="login-form"
|
||||
:model="loginForm"
|
||||
:rules="loginRules"
|
||||
ref="loginForm"
|
||||
label-width="0px"
|
||||
>
|
||||
<div class="title-container">
|
||||
<h3 class="title">用户登录</h3>
|
||||
</div>
|
||||
|
||||
<el-form-item prop="username">
|
||||
<span class="svg-container">
|
||||
<span class="el-icon-s-custom"></span>
|
||||
</span>
|
||||
<el-input class="inps" placeholder="账号" v-model="loginForm.account">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="password">
|
||||
<span class="svg-container">
|
||||
<span class="el-icon-lock"></span>
|
||||
</span>
|
||||
<el-input
|
||||
class="inps"
|
||||
type="password"
|
||||
placeholder="密码"
|
||||
v-model="loginForm.passWord"
|
||||
show-password
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<div style="text-align: center">
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 40%; margin-top: 20px"
|
||||
round
|
||||
class="submitBtn"
|
||||
@click="submitForm"
|
||||
>登录
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { login } from "@/api/user";
|
||||
export default {
|
||||
name: "Login",
|
||||
data: function () {
|
||||
return {
|
||||
loginForm: {
|
||||
account: "",
|
||||
passWord: "",
|
||||
},
|
||||
loginRules: {
|
||||
account: [{ required: true, message: "请输入账号", trigger: "blur" }],
|
||||
passWord: [{ required: true, message: "请输入密码", trigger: "blur" }],
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
submitForm() {
|
||||
const userAccount = this.loginForm.account;
|
||||
const userPassword = this.loginForm.passWord;
|
||||
if (!userAccount) {
|
||||
return this.$message({
|
||||
type: "error",
|
||||
message: "账号不能为空!",
|
||||
});
|
||||
}
|
||||
if (!userPassword) {
|
||||
return this.$message({
|
||||
type: "error",
|
||||
message: "密码不能为空!",
|
||||
});
|
||||
}
|
||||
login({ userName: userAccount, userPwd: userPassword }).then((res) => {
|
||||
if (res) {
|
||||
localStorage.setItem("userName", res.userName);
|
||||
localStorage.setItem("userId", Number(res.id));
|
||||
localStorage.setItem("userType", res.userClass);
|
||||
switch (res.userClass) {
|
||||
case "1":
|
||||
this.$router.push("/home");
|
||||
break;
|
||||
case "2":
|
||||
this.$router.push("/daichuli");
|
||||
break;
|
||||
case "3":
|
||||
this.$router.push("/daishenhe");
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@supports (-webkit-mask: none) and (not (cater-color: #fff)) {
|
||||
.login-container .el-input input {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
/* reset element-ui css */
|
||||
.login-container {
|
||||
.el-input {
|
||||
display: inline-block;
|
||||
height: 47px;
|
||||
width: 85%;
|
||||
|
||||
input {
|
||||
background: transparent;
|
||||
border: 0px;
|
||||
-webkit-appearance: none;
|
||||
border-radius: 0px;
|
||||
padding: 12px 5px 12px 15px;
|
||||
color: #fff;
|
||||
height: 47px;
|
||||
caret-color: #fff;
|
||||
|
||||
:-webkit-autofill {
|
||||
box-shadow: 0 0 0px 1000px #283443 inset !important;
|
||||
-webkit-text-fill-color: #fff !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
border-radius: 5px;
|
||||
color: #454545;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.login-container {
|
||||
min-height: 100%;
|
||||
width: 100%;
|
||||
background-color: #2d3a4b;
|
||||
overflow: hidden;
|
||||
|
||||
.login-form {
|
||||
position: relative;
|
||||
width: 360px;
|
||||
max-width: 100%;
|
||||
padding: 200px 35px 0;
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.svg-container {
|
||||
padding: 6px 5px 6px 15px;
|
||||
color: #889aa4;
|
||||
vertical-align: middle;
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.title-container {
|
||||
position: relative;
|
||||
|
||||
.title {
|
||||
font-size: 26px;
|
||||
color: #eee;
|
||||
margin: 0px auto 40px auto;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.show-pwd {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 7px;
|
||||
font-size: 16px;
|
||||
color: #889aa4;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,676 @@
|
|||
<template>
|
||||
<div>
|
||||
<div class="orderMsg">
|
||||
<div class="title">
|
||||
<span class="sp1"></span><span class="sp2">订单信息</span>
|
||||
</div>
|
||||
<el-table
|
||||
:data="orderList"
|
||||
:header-cell-style="{ background: '#E4E9F1' }"
|
||||
:cell-style="tableRowClassName"
|
||||
style="width: 98%; margin-left: 1%; margin-top: 15px"
|
||||
:default-sort="{ prop: 'date', order: 'descending' }"
|
||||
>
|
||||
<el-table-column
|
||||
prop="orderCode"
|
||||
label="订单编号"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="orderSource"
|
||||
label="订单来源"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.orderSource | orderSourceFilter }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="uploadDate" label="提交时间" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.uploadDate | formatDate }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="fileName" label="文件名" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="fileSize"
|
||||
label="文件大小"
|
||||
sortable
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.fileSize | transformByte }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="fileFormat"
|
||||
label="文件格式"
|
||||
sortable
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="元数据" align="center">
|
||||
<el-button type="primary" @click="openMetaCode">查看</el-button>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="metaMsg" v-show="metaShow">
|
||||
<div class="title">
|
||||
<span class="sp1"></span><span class="sp2">元数据信息</span>
|
||||
</div>
|
||||
<div class="cstop">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="metaFormMsg"
|
||||
class="demo-form-inline"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-form-item label="卫星" class="ysjMsg">
|
||||
<el-input
|
||||
class="ysjMsgMrg"
|
||||
v-model="metaFormMsg.satellite"
|
||||
placeholder="卫星名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="载荷" class="ysjMsg">
|
||||
<el-input
|
||||
class="ysjMsgMrg"
|
||||
v-model="metaFormMsg.load"
|
||||
placeholder="载荷方式"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="空间分辨率" class="ysjMsg2">
|
||||
<el-input
|
||||
v-model="metaFormMsg.resRatio"
|
||||
placeholder="空间分辨率"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间" class="ysjMsg">
|
||||
<el-input
|
||||
class="ysjMsgMrg"
|
||||
v-model="formatDateStr"
|
||||
placeholder="生产时间"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="级别" prop="resource" class="ysjMsg2">
|
||||
<el-radio-group v-model="metaFormMsg.proLevel">
|
||||
<el-radio label="3"></el-radio>
|
||||
<el-radio label="4"></el-radio>
|
||||
<el-radio label="5"></el-radio>
|
||||
<!-- <el-radio label="其他"></el-radio> -->
|
||||
</el-radio-group> </el-form-item
|
||||
><br />
|
||||
<el-form-item label="坐标系统" class="ysjMsg">
|
||||
<el-input
|
||||
v-model="metaFormMsg.coordinateSys"
|
||||
placeholder="坐标系统"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最小纬度" class="ysjMsg">
|
||||
<el-input
|
||||
v-model="metaFormMsg.minLat"
|
||||
placeholder="最小纬度"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大纬度" class="ysjMsg2">
|
||||
<el-input
|
||||
style="margin-left: 6px"
|
||||
v-model="metaFormMsg.maxLat"
|
||||
placeholder="最大纬度"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最小经度" class="ysjMsg">
|
||||
<el-input
|
||||
v-model="metaFormMsg.minLon"
|
||||
placeholder="最小经度"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大经度" class="ysjMsg2">
|
||||
<el-input
|
||||
v-model="metaFormMsg.maxLon"
|
||||
placeholder="最大经度"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dealMsg">
|
||||
<div class="orderSceneOfFeedback" v-if="failedStatus">
|
||||
<div class="title">
|
||||
<span class="sp1"></span><span class="sp2">已处理产品预览</span>
|
||||
</div>
|
||||
<div id="dealPreview"></div>
|
||||
</div>
|
||||
<div class="orderScene" v-if="failedStatusPdf">
|
||||
<div class="title">
|
||||
<span class="sp1"></span><span class="sp2">已处理产品预览</span>
|
||||
</div>
|
||||
<div id="dealPreview"></div>
|
||||
</div>
|
||||
<div class="orderPdf" v-if="failedStatusPdf">
|
||||
<div class="title">
|
||||
<span class="sp1"></span><span class="sp2">检验报告</span>
|
||||
</div>
|
||||
<div class="pdfDom">
|
||||
<!-- <pdf v-for="i in numPages" :key="i" :src="pdfsrc" :page="i"></pdf> -->
|
||||
<iframe class="pdfPage" :src="pdfUrl" frameborder="0"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="auditMsg" v-if="hasAudit">
|
||||
<div class="title">
|
||||
<span class="sp1"></span><span class="sp2">审核信息</span>
|
||||
</div>
|
||||
<div class="status">
|
||||
<span
|
||||
>审核状态:{{ auditStatus === 1 ? "审核通过" : "审核不通过" }}</span
|
||||
>
|
||||
</div>
|
||||
|
||||
<el-input
|
||||
type="textarea"
|
||||
:disabled="true"
|
||||
rows="3"
|
||||
v-model="auditMsgText"
|
||||
>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="feedbackMsg" v-if="failedStatus">
|
||||
<div class="title">
|
||||
<span class="sp1"></span><span class="sp2">处理信息</span>
|
||||
</div>
|
||||
<div class="desc" style="margin-top: 20px">
|
||||
<el-descriptions title="">
|
||||
<el-descriptions-item label="订单状态">{{
|
||||
feedbackFailure.feedbackResult
|
||||
}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div class="desc">
|
||||
<el-descriptions title="">
|
||||
<el-descriptions-item label="反馈时间">{{
|
||||
feedbackDateStr
|
||||
}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div class="desc">
|
||||
<el-descriptions title="">
|
||||
<el-descriptions-item label="原因">{{
|
||||
feedbackFailure.feedbackReason
|
||||
}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div class="desc">
|
||||
<el-descriptions title="">
|
||||
<el-descriptions-item
|
||||
label="备注"
|
||||
v-if="feedbackFailure.feedbackContext"
|
||||
>{{ feedbackFailure.feedbackContext }}</el-descriptions-item
|
||||
>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<el-image
|
||||
v-if="feedbackFailure.feedbackPicUrl"
|
||||
style="margin-bottom: 5px; margin-left: 20px"
|
||||
:src="feedbackFailure.feedbackPicUrl"
|
||||
fit="cover"
|
||||
>
|
||||
</el-image>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import pdf from 'vue-pdf'
|
||||
import cu from "@/lib/cesiumUtils";
|
||||
import {
|
||||
getProductMsg,
|
||||
getProductMetaMsg,
|
||||
getOrderSamples,
|
||||
getReportMsg,
|
||||
getFeedbackMsg,
|
||||
} from "@/api/pendingOrder";
|
||||
import qs from "qs";
|
||||
import { getExamineMsg } from "@/api/audit";
|
||||
|
||||
export default {
|
||||
filters: {
|
||||
orderSourceFilter(orderSource) {
|
||||
const orderSourceMap = {
|
||||
0: "用户上传",
|
||||
1: "历史上传",
|
||||
2: "平台共享",
|
||||
};
|
||||
return orderSourceMap[orderSource];
|
||||
},
|
||||
transformByte(size) {
|
||||
if (!size) {
|
||||
return "0B";
|
||||
}
|
||||
var num = 1024.0;
|
||||
if (size < num) {
|
||||
return size + "B";
|
||||
}
|
||||
if (size < Math.pow(num, 2)) {
|
||||
return (size / num).toFixed(2) + "K";
|
||||
}
|
||||
if (size < Math.pow(num, 3)) {
|
||||
return (size / Math.pow(num, 2)).toFixed(2) + "M";
|
||||
}
|
||||
if (size < Math.pow(num, 4)) {
|
||||
return (size / Math.pow(num, 3)).toFixed(2) + "G";
|
||||
}
|
||||
return (size / Math.pow(num, 4)).toFixed(2) + "T"; // T
|
||||
},
|
||||
formatDate(inputTime) {
|
||||
if (!inputTime) {
|
||||
//&& typeof inputTime !== 'number'){
|
||||
return "";
|
||||
}
|
||||
var localTime = "";
|
||||
inputTime = new Date(inputTime).getTime();
|
||||
// console.log('inputTim11e',inputTime,'typeof inputTime',typeof inputTime)
|
||||
const offset = new Date().getTimezoneOffset();
|
||||
localTime = new Date(inputTime - offset * 60000).toISOString();
|
||||
localTime = localTime.substr(0, localTime.lastIndexOf("."));
|
||||
localTime = localTime.replace("T", " ");
|
||||
console.log("localTime", localTime);
|
||||
return localTime;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
cu.initCesium("dealPreview");
|
||||
},
|
||||
created() {
|
||||
if (
|
||||
Object.keys(this.$route.params).length > 0 &&
|
||||
sessionStorage.getItem("prePage") === this.configration.path.yichuli
|
||||
) {
|
||||
this.queryParams = this.$route.params;
|
||||
} else {
|
||||
this.queryParams = JSON.parse(
|
||||
localStorage.getItem(this.configration.path.yichuli)
|
||||
);
|
||||
}
|
||||
document.body.scrollTop = 0;
|
||||
this.initOrderMsg();
|
||||
// console.log('11111',this.queryParams)
|
||||
const samplesList = this.queryParams.sample;
|
||||
this.getSplData(samplesList);
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
queryParams: null,
|
||||
metaShow: false,
|
||||
orderList: [],
|
||||
metaFormMsg: {
|
||||
satellite: "", //卫星
|
||||
load: "", //载荷
|
||||
resRatio: "0.000307", //空间分辨率
|
||||
proLevel: "4", //产品级别
|
||||
coordinateSys: "WGS84", //坐标系
|
||||
minLat: "116.13622332", //最小经度
|
||||
maxLat: "118.342222", //最大经度
|
||||
minLon: "34.211234", //最小纬度
|
||||
maxLon: "35.3455666", //最大纬度
|
||||
},
|
||||
pdfUrl: "",
|
||||
// pdfsrc:'',
|
||||
// numPages:1,
|
||||
feedbackFailure: {
|
||||
feedbackDate: "",
|
||||
feedbackResult: "",
|
||||
feedbackReason: "",
|
||||
feedbackContext: "",
|
||||
feedbackPicUrl: "",
|
||||
},
|
||||
failedStatus: false,
|
||||
failedStatusPdf: true,
|
||||
hasAudit: false,
|
||||
auditStatus: 1,
|
||||
auditMsgText: "",
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
formatDateStr: function () {
|
||||
let inputTime = this.metaFormMsg.producedDate;
|
||||
if (!inputTime) {
|
||||
//&& typeof inputTime !== 'number'){
|
||||
return "";
|
||||
}
|
||||
var localTime = "";
|
||||
inputTime = new Date(inputTime).getTime();
|
||||
const offset = new Date().getTimezoneOffset();
|
||||
localTime = new Date(inputTime - offset * 60000).toISOString();
|
||||
localTime = localTime.substr(0, localTime.lastIndexOf("."));
|
||||
localTime = localTime.replace("T", " ");
|
||||
return localTime;
|
||||
},
|
||||
feedbackDateStr: function () {
|
||||
let inputTime = this.feedbackFailure.feedbackDate;
|
||||
if (!inputTime) {
|
||||
//&& typeof inputTime !== 'number'){
|
||||
return "";
|
||||
}
|
||||
var localTime = "";
|
||||
inputTime = new Date(inputTime).getTime();
|
||||
const offset = new Date().getTimezoneOffset();
|
||||
localTime = new Date(inputTime - offset * 60000).toISOString();
|
||||
localTime = localTime.substr(0, localTime.lastIndexOf("."));
|
||||
localTime = localTime.replace("T", " ");
|
||||
return localTime;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
initOrderMsg() {
|
||||
const self = this;
|
||||
const om = this.queryParams;
|
||||
const pdUId = om.product_upload_id;
|
||||
getProductMsg(qs.stringify({ productId: pdUId })).then((res) => {
|
||||
if (res || res.length !== 0) {
|
||||
const r = res[0];
|
||||
self.productMsg = r;
|
||||
self.orderList = [];
|
||||
self.orderList.push({
|
||||
orderCode: om.order_code,
|
||||
orderSource: om.order_resource,
|
||||
uploadDate: om.create_date,
|
||||
fileName: r.fileName,
|
||||
fileSize: r.fileSize,
|
||||
fileFormat: r.fileFormat,
|
||||
});
|
||||
sessionStorage.setItem("tifPath", r.tifPath);
|
||||
getProductMetaMsg(qs.stringify({ dataPath: r.tifPath })).then(
|
||||
(res) => {
|
||||
console.log("111", res);
|
||||
if (res !== null && res !== "") {
|
||||
self.metaFormMsg = {
|
||||
satellite: om.satellite_name,
|
||||
load: om.satellite_load_name,
|
||||
resRatio:
|
||||
res.imageResolution > 0.01
|
||||
? res.imageResolution
|
||||
: (res.imageResolution * 111194.926).toFixed(2) + "米",
|
||||
coordinateSys: res.coordinateSystem,
|
||||
minLat: res.boundBoxMinY.toFixed(8),
|
||||
maxLat: res.boundBoxMaxY.toFixed(8),
|
||||
minLon: res.boundBoxMinX.toFixed(8),
|
||||
maxLon: res.boundingBoxMaxX.toFixed(8),
|
||||
producedDate: r.productDate,
|
||||
proLevel: r.productLevel + "",
|
||||
};
|
||||
cu.flyToLayerRect(
|
||||
res.boundBoxMinX,
|
||||
res.boundBoxMinY,
|
||||
res.boundingBoxMaxX,
|
||||
res.boundBoxMaxY
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
const geoWS = r.geoWorkspace;
|
||||
const geoLN = r.layerName;
|
||||
cu.addlayer(geoWS, geoLN);
|
||||
}
|
||||
});
|
||||
if (
|
||||
om.order_status === 2 ||
|
||||
om.order_status === 6 ||
|
||||
om.order_status === 7
|
||||
) {
|
||||
this.getNumPages(om.id);
|
||||
if (om.order_status === 6 || om.order_status === 7) {
|
||||
this.hasAudit = true;
|
||||
getExamineMsg(om.id).then((res) => {
|
||||
if (res.code === 200 && res.data.length !== 0) {
|
||||
const rs = res.data[0];
|
||||
this.auditMsgText = rs.examineContext;
|
||||
this.auditStatus = rs.examineResult;
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.failedStatus = true;
|
||||
this.failedStatusPdf = false;
|
||||
getFeedbackMsg(om.id).then((res) => {
|
||||
if (res.code === 200 && res.data.length !== 0) {
|
||||
const rd = res.data[0];
|
||||
console.log(rd);
|
||||
self.feedbackFailure.feedbackDate = rd.feedbackDate;
|
||||
self.feedbackFailure.feedbackResult = rd.feedbackResult;
|
||||
self.feedbackFailure.feedbackReason = rd.feedbackReason;
|
||||
self.feedbackFailure.feedbackContext =
|
||||
rd.feedbackContext === "" ? false : rd.feedbackContext;
|
||||
self.feedbackFailure.feedbackPicUrl =
|
||||
rd.feedbackPicUrl === "" ? false : rd.feedbackPicUrl;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
getNumPages(orderId) {
|
||||
getReportMsg(orderId).then((res) => {
|
||||
if (res.code === 200 && res.data.length !== 0) {
|
||||
const rpMsg = res.data[0];
|
||||
this.pdfUrl = rpMsg.validationReportDownload;
|
||||
// const pdfName = rpMsg.validationReportName;
|
||||
// var loadingTask = pdf.createLoadingTask(pdfUrl,{withCredentials: false})
|
||||
// loadingTask.promise.then(pdf =>{
|
||||
// this.pdfsrc = loadingTask
|
||||
// this.numPages = pdf.numPages
|
||||
// }).catch((err) => {
|
||||
// console.error('pdf加载失败')
|
||||
// })
|
||||
}
|
||||
});
|
||||
},
|
||||
tableRowClassName({ rowIndex }) {
|
||||
if ((rowIndex + 1) % 2 !== 0) {
|
||||
return "background:#F5F7FA";
|
||||
} else {
|
||||
return "background:#FFFFFF";
|
||||
}
|
||||
},
|
||||
openMetaCode() {
|
||||
this.metaShow = !this.metaShow;
|
||||
},
|
||||
// 获取样本
|
||||
getSplData(spl) {
|
||||
const om = this.queryParams;
|
||||
getOrderSamples(om.id, om.product_subclass_id).then((res) => {
|
||||
if (res.code == 200) {
|
||||
const sp = res.data;
|
||||
if (sp.length === 0) {
|
||||
this.$message({
|
||||
type: "warning",
|
||||
message: "没有样本数据",
|
||||
});
|
||||
} else {
|
||||
if (om.order_status === 3) {
|
||||
cu.removePoint();
|
||||
for (let i in sp) {
|
||||
cu.addPoint(sp[i].lon, sp[i].lat, sp[i].alt);
|
||||
}
|
||||
} else {
|
||||
let sp = JSON.parse(spl);
|
||||
cu.removePoint();
|
||||
for (let i in sp) {
|
||||
cu.addPoint(sp[i].lon, sp[i].lat, sp[i].alt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.orderMsg {
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
font-size: 20px;
|
||||
height: 180px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.metaMsg {
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
font-size: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.dealMsg {
|
||||
width: 100%;
|
||||
// background-color: white;
|
||||
font-size: 20px;
|
||||
margin: 20px 0 20px 0;
|
||||
height: 600px;
|
||||
}
|
||||
.title {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid rgb(205, 205, 205, 0.5);
|
||||
}
|
||||
.orderScene {
|
||||
width: 50%;
|
||||
height: inherit;
|
||||
background-color: white;
|
||||
float: left;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
.orderSceneOfFeedback {
|
||||
width: 100%;
|
||||
height: inherit;
|
||||
background-color: white;
|
||||
float: left;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
#dealPreview {
|
||||
width: 98%;
|
||||
height: calc(100% - 45px);
|
||||
background-color: #354595;
|
||||
margin-left: 1%;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.orderPdf {
|
||||
width: calc(50% - 10px);
|
||||
margin-left: 10px;
|
||||
float: left;
|
||||
background-color: white;
|
||||
height: inherit;
|
||||
padding-bottom: 5px;
|
||||
.pdfDom {
|
||||
height: 560px;
|
||||
background-color: white;
|
||||
// overflow: hidden;
|
||||
// overflow-y: auto;
|
||||
// overflow-x: auto;
|
||||
.pdfPage {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.feedbackMsg {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.status {
|
||||
margin-left: 20px;
|
||||
font-size: 16px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.desc {
|
||||
margin-left: 20px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.sp1 {
|
||||
display: inline-block;
|
||||
width: 7px;
|
||||
height: 26px;
|
||||
background-color: #354595;
|
||||
position: relative;
|
||||
left: 20px;
|
||||
top: 6px;
|
||||
}
|
||||
.sp2 {
|
||||
margin-left: 30px;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #354595;
|
||||
}
|
||||
.cstop {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 0;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
.ysjMsg {
|
||||
width: 18%;
|
||||
}
|
||||
.ysjMsgMrg {
|
||||
margin-left: 14px;
|
||||
}
|
||||
.ysjMsg2 {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
/deep/.cstop .el-input.is-disabled .el-input__inner {
|
||||
width: 140px;
|
||||
height: 33px;
|
||||
}
|
||||
/deep/.cstop .el-form--inline .el-form-item__label {
|
||||
text-align: justify;
|
||||
// text-align-last: justify;
|
||||
font-size: 15px;
|
||||
}
|
||||
/deep/.cstop .el-radio {
|
||||
margin-right: 10px;
|
||||
}
|
||||
/deep/.cstop .el-radio__inner::after {
|
||||
background-color: #354595;
|
||||
}
|
||||
/deep/.cstop .el-radio__input.is-checked .el-radio__inner {
|
||||
border-color: #354595;
|
||||
background: white;
|
||||
}
|
||||
/deep/.cstop .el-radio__input.is-disabled .el-radio__inner {
|
||||
border-color: #354595;
|
||||
}
|
||||
/deep/.cstop .el-radio__input.is-disabled.is-checked .el-radio__inner::after {
|
||||
background-color: #354595;
|
||||
}
|
||||
/deep/.cstop .el-radio__input.is-checked + .el-radio__label {
|
||||
color: #606266;
|
||||
}
|
||||
/deep/.cstop .el-radio__inner {
|
||||
border: 2px solid #354595;
|
||||
}
|
||||
/deep/.el-button {
|
||||
line-height: 0;
|
||||
}
|
||||
/deep/.el-textarea__inner {
|
||||
margin-left: 20px;
|
||||
width: 50%;
|
||||
height: 30px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
/deep/.el-textarea__inner:focus {
|
||||
border-color: #354595;
|
||||
}
|
||||
.auditMsg {
|
||||
background-color: white;
|
||||
}
|
||||
.status {
|
||||
margin-left: 20px;
|
||||
font-size: 16px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,268 @@
|
|||
<template>
|
||||
<div>
|
||||
<router-view></router-view>
|
||||
<div>
|
||||
<div class="daichuli">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span><span class="sp2">订单查询</span>
|
||||
</div>
|
||||
<OrderSearch
|
||||
:getOrderList="getOrderList"
|
||||
ref="orderSearchPanel"
|
||||
:extSearch="true"
|
||||
@initPage="initPage"
|
||||
></OrderSearch>
|
||||
</div>
|
||||
<div class="daichuli1">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span><span class="sp2">查询结果</span>
|
||||
</div>
|
||||
<el-table
|
||||
:header-cell-style="{ background: '#E4E9F1' }"
|
||||
:cell-style="tableRowClassName"
|
||||
:data="processData"
|
||||
style="width: 98%; margin-left: 1%; margin-top: 15px"
|
||||
>
|
||||
<el-table-column
|
||||
prop="order_code"
|
||||
label="订单编号"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="create_date"
|
||||
label="提交日期"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.create_date | formatDate }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="satellite_name"
|
||||
label="卫星类型"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="satellite_load_name" label="载荷" align="center">
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="product_id" label="产品大类" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.product_id | categoryFilter }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="product_subclass_id"
|
||||
label="产品小类"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.product_subclass_id | cldCategoryFilter }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="validation_method_desc"
|
||||
label="检验类型"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userName" label="创建人员" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="auditName" label="检验人员" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="inspectionName"
|
||||
label="审核人员"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="order_status_desc"
|
||||
label="订单状态"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="changePage(scope.row)"
|
||||
>查看详情</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<Pagination
|
||||
:page-sizes="[6, 12, 18]"
|
||||
:total="pageForm.total"
|
||||
:page.sync="pageForm.page"
|
||||
:limit.sync="pageForm.limit"
|
||||
@pagination="getOrderList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OrderSearch from "@/components/orderSearch";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import { getOrderListByStatus } from "@/api/common";
|
||||
export default {
|
||||
components: {
|
||||
OrderSearch,
|
||||
Pagination,
|
||||
},
|
||||
filters: {
|
||||
categoryFilter(category) {
|
||||
const categoryMap = {
|
||||
1: "几何产品",
|
||||
2: "辐射产品",
|
||||
3: "陆表产品",
|
||||
4: "植被产品",
|
||||
};
|
||||
return categoryMap[category];
|
||||
},
|
||||
cldCategoryFilter(cldCategory) {
|
||||
const cldCategoryMap = {
|
||||
1: "正射校正",
|
||||
2: "高程产品",
|
||||
5: "干涉测量形变产品",
|
||||
3: "后向散射系数",
|
||||
4: "大气延迟校正",
|
||||
9: "地表粗糙度",
|
||||
6: "地表覆盖类型",
|
||||
7: "土壤水分",
|
||||
8: "地表盐碱度",
|
||||
10: "植被高度",
|
||||
11: "叶面积指数",
|
||||
12: "植被物候",
|
||||
};
|
||||
return cldCategoryMap[cldCategory];
|
||||
},
|
||||
formatDate(inputTime) {
|
||||
if (!inputTime && typeof inputTime !== "number") {
|
||||
return "";
|
||||
}
|
||||
var localTime = "";
|
||||
inputTime = new Date(inputTime);
|
||||
const offset = new Date().getTimezoneOffset();
|
||||
localTime = new Date(inputTime - offset * 60000).toISOString();
|
||||
localTime = localTime.substr(0, localTime.lastIndexOf("."));
|
||||
localTime = localTime.replace("T", " ");
|
||||
return localTime;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
processData: [],
|
||||
pageForm: {
|
||||
total: 0,
|
||||
page: 1,
|
||||
limit: 6,
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getOrderList();
|
||||
},
|
||||
methods: {
|
||||
tableRowClassName({ rowIndex }) {
|
||||
if ((rowIndex + 1) % 2 !== 0) {
|
||||
return "background:#F5F7FA";
|
||||
} else {
|
||||
return "background:#FFFFFF";
|
||||
}
|
||||
},
|
||||
changePage(orderMsg) {
|
||||
// this.$router.push("/feedbackycl");
|
||||
localStorage.setItem(
|
||||
this.configration.path.yichuli,
|
||||
JSON.stringify(orderMsg)
|
||||
);
|
||||
// console.log('订单处理信息', orderMsg)
|
||||
this.$router.push({ name: "订单处理信息", params: orderMsg });
|
||||
},
|
||||
getOrderList() {
|
||||
const searchVal = this.$refs.orderSearchPanel;
|
||||
const sf = searchVal.searchForm;
|
||||
sf.auditId = localStorage.userId;
|
||||
if (sf.extOption !== "") sf.status = [sf.extOption];
|
||||
else sf.status = [2, 3, 6, 7];
|
||||
sf.page = this.pageForm.page;
|
||||
sf.limit = this.pageForm.limit;
|
||||
getOrderListByStatus(sf).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.processData = res.data.dataList;
|
||||
this.pageForm.total = res.data.count;
|
||||
}
|
||||
});
|
||||
},
|
||||
initPage() {
|
||||
this.pageForm.page = 1;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.daichuli {
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
font-size: 20px;
|
||||
}
|
||||
.daichuli1 {
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
font-size: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
/deep/.el-icon-arrow-up:before {
|
||||
content: "\e78f";
|
||||
}
|
||||
.sp1 {
|
||||
display: inline-block;
|
||||
width: 7px;
|
||||
height: 26px;
|
||||
background-color: #354595;
|
||||
position: relative;
|
||||
left: 20px;
|
||||
top: 6px;
|
||||
}
|
||||
.sp2 {
|
||||
margin-left: 30px;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #354595;
|
||||
}
|
||||
.box1 {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid rgb(205, 205, 205, 0.5);
|
||||
}
|
||||
.block {
|
||||
margin-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
/deep/.daichuli1 .el-button--primary {
|
||||
color: #354595;
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
}
|
||||
/deep/.daichuli1 .el-button--primary:hover {
|
||||
background-color: #409eff;
|
||||
color: #fff;
|
||||
}
|
||||
/deep/.el-input__icon {
|
||||
line-height: 35px;
|
||||
}
|
||||
/deep/.el-table th > .cell {
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,549 @@
|
|||
<template>
|
||||
<div>
|
||||
<div class="orderMsg">
|
||||
<div class="title">
|
||||
<span class="sp1"></span><span class="sp2">订单信息</span>
|
||||
</div>
|
||||
<el-table
|
||||
:data="orderList"
|
||||
:header-cell-style="{ background: '#E4E9F1' }"
|
||||
:cell-style="tableRowClassName"
|
||||
style="width: 98%; margin-left: 1%; margin-top: 15px"
|
||||
:default-sort="{ prop: 'date', order: 'descending' }"
|
||||
>
|
||||
<el-table-column
|
||||
prop="orderCode"
|
||||
label="订单编号"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="orderSource"
|
||||
label="订单来源"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.orderSource | orderSourceFilter }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="uploadDate" label="提交时间" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.uploadDate | formatDate }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="fileName" label="文件名" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="fileSize"
|
||||
label="文件大小"
|
||||
sortable
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.fileSize | transformByte }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="fileFormat"
|
||||
label="文件格式"
|
||||
sortable
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="元数据" align="center">
|
||||
<el-button type="primary" @click="openMetaCode">查看</el-button>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="metaMsg" v-show="metaShow">
|
||||
<div class="title">
|
||||
<span class="sp1"></span><span class="sp2">元数据信息</span>
|
||||
</div>
|
||||
<div class="cstop">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="metaFormMsg"
|
||||
class="demo-form-inline"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-form-item label="卫星" class="ysjMsg">
|
||||
<el-input
|
||||
class="ysjMsgMrg"
|
||||
v-model="metaFormMsg.satellite"
|
||||
placeholder="卫星名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="载荷" class="ysjMsg">
|
||||
<el-input
|
||||
class="ysjMsgMrg"
|
||||
v-model="metaFormMsg.load"
|
||||
placeholder="载荷方式"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="空间分辨率" class="ysjMsg2">
|
||||
<el-input
|
||||
v-model="metaFormMsg.resRatio"
|
||||
placeholder="空间分辨率"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间" class="ysjMsg">
|
||||
<el-input
|
||||
class="ysjMsgMrg"
|
||||
v-model="formatDateStr"
|
||||
placeholder="生产时间"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="级别" prop="resource" class="ysjMsg2">
|
||||
<el-radio-group v-model="metaFormMsg.proLevel">
|
||||
<el-radio label="3"></el-radio>
|
||||
<el-radio label="4"></el-radio>
|
||||
<el-radio label="5"></el-radio>
|
||||
<!-- <el-radio label="其他"></el-radio> -->
|
||||
</el-radio-group> </el-form-item
|
||||
><br />
|
||||
<el-form-item label="坐标系统" class="ysjMsg">
|
||||
<el-input
|
||||
v-model="metaFormMsg.coordinateSys"
|
||||
placeholder="坐标系统"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最小纬度" class="ysjMsg">
|
||||
<el-input
|
||||
v-model="metaFormMsg.minLat"
|
||||
placeholder="最小纬度"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大纬度" class="ysjMsg2">
|
||||
<el-input
|
||||
style="margin-left: 6px"
|
||||
v-model="metaFormMsg.maxLat"
|
||||
placeholder="最大纬度"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最小经度" class="ysjMsg">
|
||||
<el-input
|
||||
v-model="metaFormMsg.minLon"
|
||||
placeholder="最小经度"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大经度" class="ysjMsg2">
|
||||
<el-input
|
||||
v-model="metaFormMsg.maxLon"
|
||||
placeholder="最大经度"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="orderMsgShow">
|
||||
<div class="orderScene">
|
||||
<div class="title">
|
||||
<span class="sp1"></span><span class="sp2">已审核产品预览</span>
|
||||
</div>
|
||||
<div
|
||||
id="checkedPreview"
|
||||
@click="pickValue"
|
||||
style="overflow: hidden; position: relative"
|
||||
></div>
|
||||
</div>
|
||||
<div class="orderPdf">
|
||||
<div class="title">
|
||||
<span class="sp1"></span><span class="sp2">检验报告</span>
|
||||
</div>
|
||||
<div class="pdfDom">
|
||||
<iframe class="pdfPage" :src="pdfUrl" frameborder="0"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="auditMsg">
|
||||
<div class="title">
|
||||
<span class="sp1"></span><span class="sp2">审核信息</span>
|
||||
</div>
|
||||
<div class="status">
|
||||
<span>审核状态:{{ auditStatus | auditStatusFilter }}</span>
|
||||
</div>
|
||||
|
||||
<el-input
|
||||
type="textarea"
|
||||
:disabled="true"
|
||||
rows="3"
|
||||
v-model="auditMsgText"
|
||||
>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import cu from "@/lib/cesiumUtils";
|
||||
import {
|
||||
getProductMsg,
|
||||
getProductMetaMsg,
|
||||
getOrderSamples,
|
||||
getReportMsg,
|
||||
} from "@/api/pendingOrder";
|
||||
import { getExamineMsg } from "@/api/audit";
|
||||
import qs from "qs";
|
||||
|
||||
export default {
|
||||
filters: {
|
||||
auditStatusFilter(auditStatus) {
|
||||
const auditStatusMap = {
|
||||
1: "审核通过",
|
||||
2: "审核不通过",
|
||||
};
|
||||
return auditStatusMap[auditStatus];
|
||||
},
|
||||
orderSourceFilter(orderSource) {
|
||||
const orderSourceMap = {
|
||||
0: "用户上传",
|
||||
1: "历史上传",
|
||||
2: "平台共享",
|
||||
};
|
||||
return orderSourceMap[orderSource];
|
||||
},
|
||||
transformByte(size) {
|
||||
if (!size) {
|
||||
return "0B";
|
||||
}
|
||||
var num = 1024.0;
|
||||
if (size < num) {
|
||||
return size + "B";
|
||||
}
|
||||
if (size < Math.pow(num, 2)) {
|
||||
return (size / num).toFixed(2) + "K";
|
||||
}
|
||||
if (size < Math.pow(num, 3)) {
|
||||
return (size / Math.pow(num, 2)).toFixed(2) + "M";
|
||||
}
|
||||
if (size < Math.pow(num, 4)) {
|
||||
return (size / Math.pow(num, 3)).toFixed(2) + "G";
|
||||
}
|
||||
return (size / Math.pow(num, 4)).toFixed(2) + "T"; // T
|
||||
},
|
||||
formatDate(inputTime) {
|
||||
if (!inputTime && typeof inputTime !== "number") {
|
||||
return "";
|
||||
}
|
||||
var localTime = "";
|
||||
inputTime = new Date(inputTime);
|
||||
const offset = new Date().getTimezoneOffset();
|
||||
localTime = new Date(inputTime - offset * 60000).toISOString();
|
||||
localTime = localTime.substr(0, localTime.lastIndexOf("."));
|
||||
localTime = localTime.replace("T", " ");
|
||||
return localTime;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
cu.initCesium("checkedPreview");
|
||||
cu.handleClick();
|
||||
},
|
||||
created() {
|
||||
if (
|
||||
Object.keys(this.$route.params).length > 0 &&
|
||||
sessionStorage.getItem("prePage") === this.configration.path.yishenhe
|
||||
) {
|
||||
this.queryParams = this.$route.params;
|
||||
} else {
|
||||
this.queryParams = JSON.parse(
|
||||
localStorage.getItem(this.configration.path.yishenhe)
|
||||
);
|
||||
}
|
||||
document.body.scrollTop = 0;
|
||||
this.initOrderMsg();
|
||||
const samplesList = this.queryParams.sample;
|
||||
this.getSplData(samplesList);
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
queryParams: null,
|
||||
metaShow: false,
|
||||
orderList: [],
|
||||
metaFormMsg: {
|
||||
satellite: "", //卫星
|
||||
load: "", //载荷
|
||||
resRatio: "0.000307", //空间分辨率
|
||||
proLevel: "4", //产品级别
|
||||
coordinateSys: "WGS84", //坐标系
|
||||
minLat: "116.13622332", //最小经度
|
||||
maxLat: "118.342222", //最大经度
|
||||
minLon: "34.211234", //最小纬度
|
||||
maxLon: "35.3455666", //最大纬度
|
||||
},
|
||||
pdfUrl: "",
|
||||
auditStatus: 1,
|
||||
auditMsgText: "",
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
formatDateStr: function () {
|
||||
let inputTime = this.metaFormMsg.producedDate;
|
||||
if (!inputTime) {
|
||||
//&& typeof inputTime !== 'number'){
|
||||
return "";
|
||||
}
|
||||
var localTime = "";
|
||||
inputTime = new Date(inputTime).getTime();
|
||||
const offset = new Date().getTimezoneOffset();
|
||||
localTime = new Date(inputTime - offset * 60000).toISOString();
|
||||
localTime = localTime.substr(0, localTime.lastIndexOf("."));
|
||||
localTime = localTime.replace("T", " ");
|
||||
return localTime;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
initOrderMsg() {
|
||||
const self = this;
|
||||
const om = this.queryParams;
|
||||
const pdUId = om.product_upload_id;
|
||||
getProductMsg(qs.stringify({ productId: pdUId })).then((res) => {
|
||||
if (res || res.length !== 0) {
|
||||
const r = res[0];
|
||||
self.orderList = [];
|
||||
self.orderList.push({
|
||||
orderCode: om.order_code,
|
||||
orderSource: om.order_resource,
|
||||
uploadDate: om.create_date,
|
||||
fileName: r.fileName,
|
||||
fileSize: r.fileSize,
|
||||
fileFormat: r.fileFormat,
|
||||
});
|
||||
sessionStorage.setItem("tifPath", r.tifPath);
|
||||
getProductMetaMsg(qs.stringify({ dataPath: r.tifPath })).then(
|
||||
(res) => {
|
||||
if (res !== null) {
|
||||
self.metaFormMsg = {
|
||||
satellite: om.satellite_name,
|
||||
load: om.satellite_load_name,
|
||||
resRatio:
|
||||
res.imageResolution > 0.01
|
||||
? res.imageResolution
|
||||
: (res.imageResolution * 111194.926).toFixed(2) + "米",
|
||||
coordinateSys: res.coordinateSystem,
|
||||
minLat: res.boundBoxMinY.toFixed(8),
|
||||
maxLat: res.boundBoxMaxY.toFixed(8),
|
||||
minLon: res.boundBoxMinX.toFixed(8),
|
||||
maxLon: res.boundingBoxMaxX.toFixed(8),
|
||||
producedDate: r.productDate,
|
||||
proLevel: r.productLevel + "",
|
||||
};
|
||||
cu.flyToLayerRect(
|
||||
res.boundBoxMinX,
|
||||
res.boundBoxMinY,
|
||||
res.boundingBoxMaxX,
|
||||
res.boundBoxMaxY
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
const geoWS = r.geoWorkspace;
|
||||
const geoLN = r.layerName;
|
||||
cu.addlayer(geoWS, geoLN);
|
||||
}
|
||||
});
|
||||
this.getNumPages(om.id);
|
||||
getExamineMsg(om.id).then((res) => {
|
||||
if (res.code === 200 && res.data.length !== 0) {
|
||||
const rs = res.data[0];
|
||||
this.auditMsgText = rs.examineContext;
|
||||
this.auditStatus = rs.examineResult;
|
||||
}
|
||||
});
|
||||
},
|
||||
getNumPages(orderId) {
|
||||
getReportMsg(orderId).then((res) => {
|
||||
console.log(res);
|
||||
if (res.code === 200 && res.data.length !== 0) {
|
||||
const rpMsg = res.data[0];
|
||||
this.pdfUrl = rpMsg.validationReportDownload;
|
||||
}
|
||||
});
|
||||
},
|
||||
tableRowClassName({ rowIndex }) {
|
||||
if ((rowIndex + 1) % 2 !== 0) {
|
||||
return "background:#F5F7FA";
|
||||
} else {
|
||||
return "background:#FFFFFF";
|
||||
}
|
||||
},
|
||||
openMetaCode() {
|
||||
this.metaShow = !this.metaShow;
|
||||
},
|
||||
// 获取样本
|
||||
getSplData(spl) {
|
||||
const om = this.queryParams;
|
||||
getOrderSamples(om.id, om.product_subclass_id).then((res) => {
|
||||
if (res.code == 200) {
|
||||
const sp = res.data;
|
||||
if (sp.length === 0) {
|
||||
this.$message({
|
||||
type: "warning",
|
||||
message: "没有样本数据",
|
||||
});
|
||||
} else {
|
||||
// cu.removePoint();
|
||||
// for (let i in sp) {
|
||||
// cu.addPoint(sp[i].lon, sp[i].lat, sp[i].alt);
|
||||
// }
|
||||
let sp = JSON.parse(spl);
|
||||
cu.removePoint();
|
||||
for (let i in sp) {
|
||||
cu.addPoint(sp[i].lon, sp[i].lat, sp[i].alt);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
pickValue() {
|
||||
cu.handleClick();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.orderMsg {
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
font-size: 20px;
|
||||
height: 180px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.metaMsg {
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
font-size: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.orderMsgShow {
|
||||
width: 100%;
|
||||
// background-color: white;
|
||||
font-size: 20px;
|
||||
margin: 20px 0 20px 0;
|
||||
height: 600px;
|
||||
}
|
||||
.title {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid rgb(205, 205, 205, 0.5);
|
||||
}
|
||||
.orderScene {
|
||||
width: 50%;
|
||||
height: inherit;
|
||||
background-color: white;
|
||||
float: left;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
#checkedPreview {
|
||||
width: 98%;
|
||||
height: calc(100% - 45px);
|
||||
background-color: #354595;
|
||||
margin-left: 1%;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.orderPdf {
|
||||
width: calc(50% - 10px);
|
||||
margin-left: 10px;
|
||||
float: left;
|
||||
background-color: white;
|
||||
height: inherit;
|
||||
padding-bottom: 5px;
|
||||
.pdfDom {
|
||||
height: 560px;
|
||||
background-color: white;
|
||||
.pdfPage {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.auditMsg {
|
||||
background-color: white;
|
||||
}
|
||||
.status {
|
||||
margin-left: 20px;
|
||||
font-size: 16px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
/deep/.el-textarea__inner {
|
||||
margin-left: 20px;
|
||||
width: 50%;
|
||||
height: 30px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
/deep/.el-textarea__inner:focus {
|
||||
border-color: #354595;
|
||||
}
|
||||
/deep/.el-input__inner {
|
||||
height: 30px;
|
||||
}
|
||||
.sp1 {
|
||||
display: inline-block;
|
||||
width: 7px;
|
||||
height: 26px;
|
||||
background-color: #354595;
|
||||
position: relative;
|
||||
left: 20px;
|
||||
top: 6px;
|
||||
}
|
||||
.sp2 {
|
||||
margin-left: 30px;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #354595;
|
||||
}
|
||||
.cstop {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 0;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
.ysjMsg {
|
||||
width: 18%;
|
||||
}
|
||||
.ysjMsgMrg {
|
||||
margin-left: 14px;
|
||||
}
|
||||
.ysjMsg2 {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
/deep/.cstop .el-input.is-disabled .el-input__inner {
|
||||
width: 140px;
|
||||
height: 33px;
|
||||
}
|
||||
/deep/.cstop .el-form--inline .el-form-item__label {
|
||||
text-align: justify;
|
||||
// text-align-last: justify;
|
||||
font-size: 15px;
|
||||
}
|
||||
/deep/.cstop .el-radio {
|
||||
margin-right: 10px;
|
||||
}
|
||||
/deep/.cstop .el-radio__inner::after {
|
||||
background-color: #354595;
|
||||
}
|
||||
/deep/.cstop .el-radio__input.is-checked .el-radio__inner {
|
||||
border-color: #354595;
|
||||
background: white;
|
||||
}
|
||||
/deep/.cstop .el-radio__input.is-disabled .el-radio__inner {
|
||||
border-color: #354595;
|
||||
}
|
||||
/deep/.cstop .el-radio__input.is-disabled.is-checked .el-radio__inner::after {
|
||||
background-color: #354595;
|
||||
}
|
||||
/deep/.cstop .el-radio__input.is-checked + .el-radio__label {
|
||||
color: #606266;
|
||||
}
|
||||
/deep/.cstop .el-radio__inner {
|
||||
border: 2px solid #354595;
|
||||
}
|
||||
/deep/.el-button {
|
||||
line-height: 0;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,271 @@
|
|||
<template>
|
||||
<div>
|
||||
<router-view></router-view>
|
||||
<div>
|
||||
<div class="daichuli">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span><span class="sp2">订单查询</span>
|
||||
</div>
|
||||
<OrderSearch
|
||||
:getOrderList="getOrderList"
|
||||
ref="orderSearchPanel"
|
||||
@initPage="initPage"
|
||||
></OrderSearch>
|
||||
</div>
|
||||
<div class="daichuli1">
|
||||
<div class="box1">
|
||||
<span class="sp1"></span><span class="sp2">查询结果</span>
|
||||
</div>
|
||||
<el-table
|
||||
:header-cell-style="{ background: '#E4E9F1' }"
|
||||
:cell-style="tableRowClassName"
|
||||
:data="passAuditData"
|
||||
style="width: 98%; margin-left: 1%; margin-top: 15px"
|
||||
>
|
||||
<el-table-column
|
||||
prop="order_code"
|
||||
label="订单编号"
|
||||
width="150"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="create_date"
|
||||
label="提交日期"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.create_date | formatDate }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="satellite_name"
|
||||
label="卫星类型"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="satellite_load_name"
|
||||
label="载荷"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column prop="product_id" label="产品大类" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.product_id | categoryFilter }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="product_subclass_id"
|
||||
label="产品小类"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.product_subclass_id | cldCategoryFilter }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="validation_method_desc"
|
||||
label="检验类型"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userName" label="创建人员" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="auditName" label="检验人员" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="inspectionName"
|
||||
label="审核人员"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="order_status_desc"
|
||||
label="订单状态"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="changePage(scope.row)"
|
||||
>查看详情</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<Pagination
|
||||
:page-sizes="[6, 12, 18]"
|
||||
:total="pageForm.total"
|
||||
:page.sync="pageForm.page"
|
||||
:limit.sync="pageForm.limit"
|
||||
@pagination="getOrderList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OrderSearch from "@/components/orderSearch";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import { getOrderListByStatus } from "@/api/common";
|
||||
export default {
|
||||
components: {
|
||||
OrderSearch,
|
||||
Pagination,
|
||||
},
|
||||
filters: {
|
||||
categoryFilter(category) {
|
||||
const categoryMap = {
|
||||
1: "几何产品",
|
||||
2: "辐射产品",
|
||||
3: "陆表产品",
|
||||
4: "植被产品",
|
||||
};
|
||||
return categoryMap[category];
|
||||
},
|
||||
cldCategoryFilter(cldCategory) {
|
||||
const cldCategoryMap = {
|
||||
1: "正射校正",
|
||||
2: "高程产品",
|
||||
5: "干涉测量形变产品",
|
||||
3: "后向散射系数",
|
||||
4: "大气延迟校正",
|
||||
9: "地表粗糙度",
|
||||
6: "地表覆盖类型",
|
||||
7: "土壤水分",
|
||||
8: "地表盐碱度",
|
||||
10: "植被高度",
|
||||
11: "叶面积指数",
|
||||
12: "植被物候",
|
||||
};
|
||||
return cldCategoryMap[cldCategory];
|
||||
},
|
||||
formatDate(inputTime) {
|
||||
if (!inputTime && typeof inputTime !== "number") {
|
||||
return "";
|
||||
}
|
||||
var localTime = "";
|
||||
inputTime = new Date(inputTime);
|
||||
const offset = new Date().getTimezoneOffset();
|
||||
localTime = new Date(inputTime - offset * 60000).toISOString();
|
||||
localTime = localTime.substr(0, localTime.lastIndexOf("."));
|
||||
localTime = localTime.replace("T", " ");
|
||||
return localTime;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
passAuditData: [],
|
||||
pageForm: {
|
||||
total: 0,
|
||||
page: 1,
|
||||
limit: 6,
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getOrderList();
|
||||
},
|
||||
methods: {
|
||||
tableRowClassName({ rowIndex }) {
|
||||
if ((rowIndex + 1) % 2 !== 0) {
|
||||
return "background:#F5F7FA";
|
||||
} else {
|
||||
return "background:#FFFFFF";
|
||||
}
|
||||
},
|
||||
changePage(orderMsg) {
|
||||
localStorage.setItem(
|
||||
this.configration.path.yishenhe,
|
||||
JSON.stringify(orderMsg)
|
||||
);
|
||||
this.$router.push({ name: "已审核订单信息", params: orderMsg });
|
||||
},
|
||||
getOrderList() {
|
||||
const searchVal = this.$refs.orderSearchPanel;
|
||||
const sf = searchVal.searchForm;
|
||||
sf.inspectionId = Number(localStorage.userId);
|
||||
sf.page = this.pageForm.page;
|
||||
sf.limit = this.pageForm.limit;
|
||||
sf.status = [6, 7];
|
||||
getOrderListByStatus(sf).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.passAuditData = res.data.dataList;
|
||||
this.pageForm.total = res.data.count;
|
||||
}
|
||||
});
|
||||
},
|
||||
initPage() {
|
||||
this.pageForm.page = 1;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.daichuli {
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
font-size: 20px;
|
||||
}
|
||||
.daichuli1 {
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
font-size: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
/deep/.el-icon-arrow-up:before {
|
||||
content: "\e78f";
|
||||
}
|
||||
.sp1 {
|
||||
display: inline-block;
|
||||
width: 7px;
|
||||
height: 26px;
|
||||
background-color: #354595;
|
||||
position: relative;
|
||||
left: 20px;
|
||||
top: 6px;
|
||||
}
|
||||
.sp2 {
|
||||
margin-left: 30px;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #354595;
|
||||
}
|
||||
.box1 {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid rgb(205, 205, 205, 0.5);
|
||||
}
|
||||
.block {
|
||||
margin-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
/deep/.daichuli1 .el-button--primary {
|
||||
color: #354595;
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
}
|
||||
/deep/.daichuli1 .el-button--primary:hover {
|
||||
background-color: #409eff;
|
||||
color: #fff;
|
||||
}
|
||||
/deep/.el-input__icon {
|
||||
line-height: 35px;
|
||||
}
|
||||
/deep/.el-table th > .cell {
|
||||
font-size: 16px;
|
||||
}
|
||||
/deep/.el-button {
|
||||
line-height: 0;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,110 @@
|
|||
// 拷贝文件插件
|
||||
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
||||
const webpack = require("webpack");
|
||||
const path = require("path");
|
||||
let cesiumSource = "./node_modules/cesium/Source";
|
||||
let cesiumWorkers = "../Build/Cesium/Workers";
|
||||
|
||||
module.exports = {
|
||||
// 基本路径
|
||||
publicPath: "./",
|
||||
// 输出文件目录
|
||||
outputDir: "dist",
|
||||
assetsDir: "static",
|
||||
indexPath: "index.html",
|
||||
filenameHashing: true,
|
||||
productionSourceMap: false,
|
||||
lintOnSave: false, // 在保存代码的时候开启eslint代码检查机制
|
||||
devServer: {
|
||||
// 实时保存,编译的配置段
|
||||
port: 8085, // http服务的端口号码设定
|
||||
open: false,
|
||||
proxy: {
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target:'http://192.168.1.104:8086/macApi',
|
||||
// target: "http://211.157.180.211:8086/macApi",
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
["^" + process.env.VUE_APP_BASE_API]: ""
|
||||
}
|
||||
},
|
||||
[process.env.VUE_APP_REALITY_API]: {
|
||||
target:'http://192.168.1.104:18092/microwave',
|
||||
// target: "http://211.157.180.211:18092/microwave",
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
["^" + process.env.VUE_APP_REALITY_API]: ""
|
||||
}
|
||||
},
|
||||
[process.env.VUE_APP_FILE_API]: {
|
||||
target:'http://192.168.1.104:18093/file',
|
||||
// target: "http://211.157.180.211:18093/file",
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
["^" + process.env.VUE_APP_FILE_API]: ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
configureWebpack: {
|
||||
output: {
|
||||
sourcePrefix: " "
|
||||
},
|
||||
amd: {
|
||||
toUrlUndefined: true
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
vue$: "vue/dist/vue.esm.js",
|
||||
//可以对同一个地址起2个不同的别名
|
||||
"@": path.resolve("src"),
|
||||
src: path.resolve("src"),
|
||||
cesium: path.resolve(__dirname, cesiumSource)
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new CopyWebpackPlugin([
|
||||
{ from: path.join(cesiumSource, cesiumWorkers), to: "static/Workers" }
|
||||
]),
|
||||
new CopyWebpackPlugin([
|
||||
{ from: path.join(cesiumSource, "Assets"), to: "static/Assets" }
|
||||
]),
|
||||
new CopyWebpackPlugin([
|
||||
{ from: path.join(cesiumSource, "Widgets"), to: "static/Widgets" }
|
||||
]),
|
||||
new CopyWebpackPlugin([
|
||||
{
|
||||
from: path.join(cesiumSource, "ThirdParty/Workers"),
|
||||
to: "static/ThirdParty/Workers"
|
||||
}
|
||||
]),
|
||||
new webpack.DefinePlugin({
|
||||
CESIUM_BASE_URL: JSON.stringify("./static")
|
||||
})
|
||||
// new CopyWebpackPlugin([ { from: path.join(cesiumSource, cesiumWorkers), to: 'Workers'}]),
|
||||
// new CopyWebpackPlugin([ { from: path.join(cesiumSource, 'Assets'), to: 'Assets'}]),
|
||||
// new CopyWebpackPlugin([ { from: path.join(cesiumSource, 'Widgets'), to: 'Widgets'}]),
|
||||
// new CopyWebpackPlugin([ { from: path.join(cesiumSource, 'ThirdParty/Workers'), to: 'ThirdParty/Workers'}]),
|
||||
// new webpack.DefinePlugin({
|
||||
// //定义 Cesium 从哪里加载资源,如果使用默认的'',
|
||||
// //却变成了绝对路径了,所以这里使用'./',使用相对路径
|
||||
// CESIUM_BASE_URL: JSON.stringify('./')
|
||||
// })
|
||||
],
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
commons: {
|
||||
name: "Cesium",
|
||||
test: /[\\/]node_modules[\\/]cesium/,
|
||||
chunks: "all"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
module: {
|
||||
// unknownContextCritical: /^.\/.*$/,
|
||||
unknownContextCritical: false
|
||||
}
|
||||
}
|
||||
};
|