Commit 83aacf1b authored by xinzhedeai's avatar xinzhedeai

add: 新华 剖面 update from liqilin

parent 5afb27b3
ENV = 'development'
# 开发服务器端口配置
VUE_APP_LOCAL_PORT = 8080
VUE_APP_BASE_API = 'http://192.168.2.11:8080'
VUE_APP_LOCAL_API = 'http://192.168.2.37:9003'
\ No newline at end of file
...@@ -19,7 +19,6 @@ selenium-debug.log ...@@ -19,7 +19,6 @@ selenium-debug.log
*.njsproj *.njsproj
*.sln *.sln
*.local *.local
*.env.development
*dist.rar *dist.rar
package-lock.json package-lock.json
......
This diff is collapsed.
...@@ -53,12 +53,12 @@ const formatPos = (arr) => { ...@@ -53,12 +53,12 @@ const formatPos = (arr) => {
for (let i = 0; i < arr.length; i++) { for (let i = 0; i < arr.length; i++) {
/**( /**(
* *
* *
* 界 * 界
* - 清 * - 清
* - 存 * - 存
* *
) */ ) */
if (!x) x = arr[i]; if (!x) x = arr[i];
...@@ -112,9 +112,9 @@ function calcelatepoduCopy(podupoints) { ...@@ -112,9 +112,9 @@ function calcelatepoduCopy(podupoints) {
/** /**
* let point1 = podupoints[i]; * let point1 = podupoints[i];
let point2 = podupoints[i + 1]; let point2 = podupoints[i + 1];
* *
* *
* *
* var point1 = turf.point([109.104262, 37.831315]); * var point1 = turf.point([109.104262, 37.831315]);
var point2 = turf.point([109.104261, 37.831315]); var point2 = turf.point([109.104261, 37.831315]);
var bearing = turf.bearing(point1, point2); var bearing = turf.bearing(point1, point2);
...@@ -212,7 +212,7 @@ const initCesiumPoint = ( ...@@ -212,7 +212,7 @@ const initCesiumPoint = (
{ _longitude, _latitude, _height }, { _longitude, _latitude, _height },
{ text, fillColor } = { text: "", fillColor: "" } { text, fillColor } = { text: "", fillColor: "" }
) => { ) => {
debugger; debugger;
if (_height < 15) return; if (_height < 15) return;
...@@ -293,7 +293,7 @@ const initCesiumpolyline = ( ...@@ -293,7 +293,7 @@ const initCesiumpolyline = (
// if(switchModule.) // if(switchModule.)
const pointConf = { const pointConf = {
text: ` text: `
经度 : ${String(_longitude).slice(0, 8)} 经度 : ${String(_longitude).slice(0, 8)}
纬度 : ${String(_latitude).slice(0, 8)} 纬度 : ${String(_latitude).slice(0, 8)}
高程 : ${String(_height).slice(0, 6)}(米)`, 高程 : ${String(_height).slice(0, 6)}(米)`,
...@@ -333,8 +333,8 @@ const initCesiumpolyline = ( ...@@ -333,8 +333,8 @@ const initCesiumpolyline = (
let { distance, elevationDifference, slopeDegrees, bearing } = opt; let { distance, elevationDifference, slopeDegrees, bearing } = opt;
/** /**
* *
* *
* distance: { * distance: {
name: "距离", name: "距离",
value: distance, value: distance,
...@@ -351,13 +351,13 @@ const initCesiumpolyline = ( ...@@ -351,13 +351,13 @@ const initCesiumpolyline = (
name: "当前轮 - 参数", name: "当前轮 - 参数",
value: podupoints, value: podupoints,
}, },
* *
* *
*/ */
/** /**
* *
* text: ` * text: `
经度 : ${String(_longitude).slice(0, 8)} 经度 : ${String(_longitude).slice(0, 8)}
纬度 : ${String(_latitude).slice(0, 8)} 纬度 : ${String(_latitude).slice(0, 8)}
高程 : ${String(_height).slice(0, 6)}(米)`, 高程 : ${String(_height).slice(0, 6)}(米)`,
...@@ -366,10 +366,9 @@ const initCesiumpolyline = ( ...@@ -366,10 +366,9 @@ const initCesiumpolyline = (
const styleOpt = { const styleOpt = {
text: ` 平距 : ${distance.value}\n 空间距离 : ${Math.sqrt( text: ` 平距 : ${distance.value}\n 空间距离 : ${Math.sqrt(
distance.value * distance.value + distance.value * distance.value +
elevationDifference.value * elevationDifference.value elevationDifference.value * elevationDifference.value
)}\n 高差 : ${elevationDifference.value}(米)\n 坡度 : ${ )}\n 高差 : ${elevationDifference.value}(米)\n 坡度 : ${slopeDegrees.value
slopeDegrees.value }`,
}`,
fillColor: Cesium.Color.GREEN, fillColor: Cesium.Color.GREEN,
}; };
...@@ -432,7 +431,7 @@ const xD = (old, cur) => { ...@@ -432,7 +431,7 @@ const xD = (old, cur) => {
// ================================================================ 模板函数 | S // ================================================================ 模板函数 | S
/** /**
* *
// 面 // 面
var polyEntity = viewer.entities.add({ var polyEntity = viewer.entities.add({
name: 'Area Measurement', name: 'Area Measurement',
...@@ -463,7 +462,7 @@ const xD = (old, cur) => { ...@@ -463,7 +462,7 @@ const xD = (old, cur) => {
} }
}); });
* *
*/ */
// ================================================================ 模板函数 | E // ================================================================ 模板函数 | E
......
This diff is collapsed.
<!-- <!--
/** /**
* 表单通用组件 * 表单通用组件
...@@ -53,75 +52,82 @@ ...@@ -53,75 +52,82 @@
*/ */
--> -->
<template> <template>
<!--工具栏--> <!--工具栏-->
<div class="head-container" v-if="form.config.search && form.config.search[0]"> <div class="head-container" v-if="form.config.search && form.config.search[0]">
<!-- 搜索 --> <!-- 搜索 -->
<template v-for="(item, index) in form.config.search"> <template v-for="(item, index) in form.config.search">
<label v-if="item.name" class="el-form-item-label">{{item.name}}</label> <label v-if="item.name" class="el-form-item-label">{{ item.name }}</label>
<template v-if="item.type==='string'"> <template v-if="item.type === 'string'">
<el-input v-model="form.query[item.word]" clearable :placeholder="'请输入'+item.name" :style="'width:'+item.width" @clear="item.clear && item.clear.call(_self.$parent)"/> <el-input v-model="form.query[item.word]" clearable :placeholder="'请输入' + item.name"
</template> :style="'width:' + item.width" @clear="item.clear && item.clear.call(_self.$parent)" />
<template v-if="item.type==='select'"> </template>
<el-select v-model="form.query[item.word]" :placeholder="'请选择'+item.name" size="small" :style="'width:'+(item.width || 'auto')" :disabled="item.disabled" clearable @change="onEventInfos(item.change)" @clear="item.clear && item.clear.call(_self.$parent)"> <template v-if="item.type === 'select'">
<el-option v-for="obj in Dict.selectList[item.word]" :label="obj[item.key] || obj.name" :value="obj[item.val] || obj.value" ></el-option> <el-select v-model="form.query[item.word]" :placeholder="'请选择' + item.name" size="small"
</el-select> :style="'width:' + (item.width || 'auto')" :disabled="item.disabled" clearable
</template> @change="onEventInfos(item.change)" @clear="item.clear && item.clear.call(_self.$parent)">
<template v-else-if="item.type === 'checkbox'"> <el-option v-for="obj in Dict.selectList[item.word]" :label="obj[item.key] || obj.name"
<el-checkbox v-model="form.query[item.word]" :label="item.label"></el-checkbox> :value="obj[item.val] || obj.value"></el-option>
</template> </el-select>
<template v-else-if="item.type.indexOf('date') > -1"> </template>
<el-date-picker <template v-else-if="item.type === 'checkbox'">
v-model="form.query[item.word]" <el-checkbox v-model="form.query[item.word]" :label="item.label"></el-checkbox>
:style="'width:'+item.width" </template>
:type="item.type" <template v-else-if="item.type.indexOf('date') > -1">
:value-format="item.format || 'yyyy-MM-dd'" <el-date-picker v-model="form.query[item.word]" :style="'width:' + item.width" :type="item.type"
:default-time="item.defaultTime" :value-format="item.format || 'yyyy-MM-dd'" :default-time="item.defaultTime" range-separator="至"
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" clearable
start-placeholder="开始日期" @change="item.change && item.change.call(_self, $event)">
end-placeholder="结束日期" </el-date-picker>
clearable </template>
@change="item.change && item.change.call(_self, $event)" <el-button v-else-if="item.type === 'button'" size="mini" :type="item.btntype || 'success'" :icon="item.icon"
> @click="item.click && item.click.call(_self.$parent, $event)">{{ item.label }}</el-button>
</el-date-picker> </template>
</template> </div>
<el-button v-else-if="item.type==='button'" size="mini" :type="item.btntype || 'success'" :icon="item.icon" @click="item.click && item.click.call(_self.$parent, $event)">{{item.label}}</el-button>
</template>
</div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
} }
}, },
props:{ props: {
form: { form: {
type: Object, type: Object,
default: {}, default: {},
}, },
Dict: { Dict: {
type: Object, type: Object,
default: {}, default: {},
}, },
}, },
beforeCreate(){ beforeCreate() {
}, },
created(){ created() {
}, },
mounted() { mounted() {
}, },
methods: { methods: {
onEventInfos:qf.vue.onEventInfos, onEventInfos: qf.vue.onEventInfos,
}, },
} }
</script> </script>
<style lang="scss" scope> <style lang="scss" scope>
.head-container{ .head-container {
.el-form-item-label{ .el-form-item-label {
font-weight:500;margin-left:15px; font-weight: 500;
&:first-child{margin-left:0;} margin-left: 15px;
}
.el-button{margin-left:20px;} &:first-child {
.el-checkbox{margin-right:5px;} margin-left: 0;
} }
}
.el-button {
margin-left: 20px;
}
.el-checkbox {
margin-right: 5px;
}
}
</style> </style>
...@@ -8,13 +8,11 @@ import Config from '@/settings' ...@@ -8,13 +8,11 @@ import Config from '@/settings'
axios.defaults.withCredentials = true; axios.defaults.withCredentials = true;
//var baseURL = (VUE_APP_API.ServiceURL || process.env.VUE_APP_LOCAL_API) + '/'; //var baseURL = (VUE_APP_API.ServiceURL || process.env.VUE_APP_LOCAL_API) + '/';
var baseURL = process.env.NODE_ENV var baseURL = process.env.NODE_ENV === 'development' ? process.env.VUE_APP_LOCAL_API + '/' : (process.env.VUE_APP_BASE_API || process.env.VUE_APP_LOCAL_API) + '/';
=== 'development' ? process.env.VUE_APP_LOCAL_API + '/' : (VUE_APP_API.ServiceURL || process.env.VUE_APP_LOCAL_API) + '/';
// 创建axios实例 // 创建axios实例
const service = axios.create({ const service = axios.create({
baseURL: baseURL, baseURL: 'http://192.168.2.37:9003',
timeout: Config.timeout // 请求超时时间 timeout: Config.timeout // 请求超时时间
}) })
// request拦截器 // request拦截器
...@@ -46,21 +44,21 @@ service.interceptors.response.use( ...@@ -46,21 +44,21 @@ service.interceptors.response.use(
break break
// token 过期 // token 过期
case 401: case 401:
Notification({ Notification({
title: '登录过期,请重新登录', title: '登录过期,请重新登录',
duration: 2000, duration: 2000,
type: 'warning' type: 'warning'
}) })
setTimeout(() => { setTimeout(() => {
window.localStorage.removeItem('token') window.localStorage.removeItem('token')
window.location = '#/'; window.location = '#/';
location.reload() location.reload()
}, 1000) }, 1000)
break break
default: default:
break break
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -12,8 +12,8 @@ function resolve(dir) { ...@@ -12,8 +12,8 @@ function resolve(dir) {
}; };
const name = defaultSettings.title; // 网址标题 const name = defaultSettings.title; // 网址标题
const port = process.env.VUE_APP_LOCAL_PORT; // 端口配置 const port = 9527; // 端口配置
const VUE_APP_BASE_API = process.env.VUE_APP_BASE_API; const VUE_APP_BASE_API = 'http://192.168.2.37:9003';
// All configuration item explanations can be find in https://cli.vuejs.org/config/ // All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = { module.exports = {
...@@ -63,14 +63,14 @@ module.exports = { ...@@ -63,14 +63,14 @@ module.exports = {
}, },
proxy: { proxy: {
'/api': { '/api': {
target: process.env.VUE_APP_BASE_API, target: VUE_APP_BASE_API,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
'^/api': 'api' '^/api': 'api'
} }
}, },
'/auth': { '/auth': {
target: process.env.VUE_APP_BASE_API, target: VUE_APP_BASE_API,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
'^/auth': 'auth' '^/auth': 'auth'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment