Skip to content

Commit 1c24272

Browse files
author
潘卓然Y7000P
committed
【站点】【新增】【新增版本信息&打包跟踪日志机制】
1 parent 37dcd8b commit 1c24272

7 files changed

Lines changed: 198 additions & 40 deletions

File tree

website/README.md

Lines changed: 86 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,127 @@
11
# MapGIS Webclient Javascript Website
22

3+
## 安装依赖环境
34

4-
## Project setup
55
```
6-
npm install
6+
npm install
77
# or
88
yarn install
99
```
1010

11-
### Compiles and hot-reloads for development
11+
### 编译测试
12+
1213
```
13-
npm run serve
14+
npm run serve
1415
# or
1516
yarn serve
1617
```
1718

18-
### Compiles and minifies for production
19+
### 打包
20+
1921
```
20-
npm run build
22+
npm run build
2123
# or
2224
yarn build
2325
```
2426

25-
### Lints and fixes files
27+
### 代码格式检查
28+
2629
```
27-
npm run lint
30+
npm run lint
2831
# or
2932
yarn lint
3033
```
3134

32-
### Customize configuration
33-
See [Configuration Reference](https://cli.vuejs.org/config/).
35+
### 自定义配置
36+
37+
请看 [配置引用](https://cli.vuejs.org/config/).
38+
39+
# 发布
40+
41+
直接将
42+
43+
```
44+
npm run build
45+
# or
46+
yarn build
47+
```
48+
49+
## 1. windows
50+
51+
> window2008 后(包括 2008)版本直接使用 IIS 的 dist 目录发布到对应的 IIS 服务中即可正常使用。
52+
53+
## 2. linux
54+
55+
> 使用 nginx / tomcat 发布 dist 目录的网页
3456
35-
# express 后台运行f发布
57+
## 3. nodejs
3658

37-
1. 安装全局的express环境
38-
``` sh
59+
> 请使用 http-server 来预览网页
60+
61+
```
62+
cd /path/to/website
63+
http-server -p 8899
64+
```
65+
66+
## 4. express windows-server-2003
67+
68+
express 后台运行发布
69+
70+
> 针对 windows-server-2003 的老操作系统,由于其不支持各种新的三维纹理以及特殊的 json 格式,mvt.pbf 格式因此统一处理成二进制文件
71+
72+
1. 安装全局的 express 环境
73+
```sh
3974
npm install -g express-generator@4
4075
```
41-
2. 进入对应的webclient-javascript-vue的express目录下
42-
``` sh
76+
2. 进入对应的 webclient-javascript-vue 的 express 目录下
77+
```sh
4378
cd path/to/website/express
4479
```
45-
3. 在express目录下新建server文件夹,并按需修改app.js中的端口
46-
``` sh
80+
3. 在 express 目录下新建 server 文件夹,并按需修改 app.js 中的端口
81+
```sh
4782
express server && cd server
4883
```
49-
``` js
50-
app.listen(8899)
84+
```js
85+
app.listen(8899);
5186
```
52-
4. 在server目录下安装依赖
53-
``` sh
87+
4. 在 server 目录下安装依赖
88+
```sh
5489
npm install
5590
npm install --save node-windows
5691
npm start
5792
```
58-
5. 复制上一级中的windowserver.js到当前目录,并修改里面的路径
59-
``` js
93+
5. 复制上一级中的 windowserver.js 到当前目录,并修改里面的路径
94+
```js
6095
let svc = new Service({
61-
name: "WebClientTest", //服务名称
62-
description: "WebClient项目NodeJs服务器", //描述
63-
script: "path/to/webclient-javascript-vue/express/server/bin/www", //nodejs项目要启动的文件路径
96+
name: 'WebClientTest', //服务名称
97+
description: 'WebClient项目NodeJs服务器', //描述
98+
script: 'path/to/webclient-javascript-vue/express/server/bin/www' //nodejs项目要启动的文件路径
6499
});
65100
```
66-
6. 启动对应的windowserver脚本,注册为windows的服务
67-
``` sh
101+
6. 启动对应的 windowserver 脚本,注册为 windows 的服务
102+
```sh
68103
node windowserver.js
69104
```
70-
7. 在windows的服务中,启动服务,默认情况是随开机自启的
105+
7. 在 windows 的服务中,启动服务,默认情况是随开机自启的
106+
107+
# 离线部署站点
108+
109+
> 将 public/static/libs/include-xxx-local.js 文本种尾部的 webclient 的配置项中的 ip,端口,协议改成对应的局域网 ip 即可实现。
110+
111+
```js
112+
// public/static/libs/include-xxx-local.js
113+
window.webclient = {
114+
ip: 'develop.smaryun.com',
115+
port: 6163,
116+
protocol: 'http'
117+
};
118+
```
119+
120+
> 示例中的地址自动被替换成对应的局域网的地址
121+
122+
```js
123+
//加载M3D地图文档(服务地址,配置参数)
124+
var { protocol, ip, port } = window.webclient;
125+
landscapeLayer = m3dLayer.append(`${protocol}://${ip}:${port}/igs/rest/g3d/ZondyModels`;
126+
// http://develop.smaryun.com:6163 => http://ip:port
127+
```

website/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"dependencies": {
1212
"axios": "^0.19.0",
1313
"core-js": "^3.3.2",
14+
"echarts": "^4.8.0",
1415
"element-ui": "^2.12.0",
1516
"js-cookie": "^2.2.1",
1617
"less": "^3.10.3",
-1.27 MB
Loading

website/src/views/layout/components/Header/config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const Headers = [
5757
"MapGIS地图服务",
5858
"场景" /* "IGServer-X", "IGServer-S" */,
5959
],
60-
["三维空间分析", "轨迹模拟", "图形绘制", "工具" /* "查询" */],
60+
["三维空间分析", "轨迹模拟", "图形绘制", "工具", "查询"],
6161
[
6262
"客户端可视化",
6363
"客户端-Echarts",
@@ -79,7 +79,7 @@ export const Headers = [
7979
"/gallery/cesium#track",
8080
"/gallery/cesium#drawGraphic",
8181
"/gallery/cesium#measure",
82-
/* "/gallery/cesium#query", */
82+
"/gallery/cesium#query",
8383
],
8484
[
8585
"/gallery/cesium#clientView-heatmap",
@@ -114,7 +114,7 @@ export const Headers = [
114114
"/docs/cesium/module-%25E5%25AE%25A2%25E6%2588%25B7%25E7%25AB%25AF%25E8%25A7%2586%25E5%259B%25BE%25E7%25AE%25A1%25E7%2590%2586.html",
115115
"/docs/cesium/module-%25E5%25AE%25A2%25E6%2588%25B7%25E7%25AB%25AF%25E5%258F%25AF%25E8%25A7%2586%25E5%258C%2596%25E5%2588%2586%25E6%259E%2590.html",
116116
],
117-
["https://cesium.com/docs/cesiumjs-ref-doc/", "http://turfjs.org/"],
117+
["/docs/other/mapgis-cesium/index.html", "http://turfjs.org/"],
118118
],
119119
},
120120
],
@@ -346,7 +346,7 @@ export const SubHeader = [
346346
routes: [
347347
["./docs/cesium/index.html", "igserverx", "igservers"],
348348
["clientview", "http://turfjs.org/", "elasticsearch"],
349-
["https://cesium.com/docs/cesiumjs-ref-doc/"],
349+
["/docs/other/mapgis-cesium/index.html"],
350350
],
351351
},
352352
],

website/src/views/total/Download.vue

Lines changed: 107 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,51 @@
11
<template>
22
<div class="download-wrapper">
3+
<!-- <br />
4+
<el-divider>
5+
<h2>All-in-One整合包</h2>
6+
</el-divider>
7+
<el-row>
8+
<el-tooltip
9+
class="item"
10+
effect="dark"
11+
content="百度网盘链接"
12+
placement="bottom"
13+
>
14+
<el-button type="primary">
15+
<a
16+
href=""
17+
target="_blank"
18+
>完整包</a>
19+
</el-button>
20+
</el-tooltip>
21+
<el-divider direction="vertical"></el-divider>
22+
<span>该包含有webclient主站点、四大脚本SDK、三方cdn以及离线数据</span>
23+
</el-row>
24+
<br />
25+
<el-row>
26+
<el-tooltip
27+
class="item"
28+
effect="dark"
29+
content="包含webclient主站点、四大脚本、三方cdn"
30+
placement="bottom"
31+
>
32+
<el-button type="info">
33+
<a
34+
href=""
35+
target="_blank"
36+
>精简包</a>
37+
</el-button>
38+
</el-tooltip>
39+
<el-divider direction="vertical"></el-divider>
40+
<span>该包含有webclient主站点、四大脚本SDK、三方cdn</span>
41+
</el-row> -->
342
<br />
443
<el-divider>
5-
<h2>下载</h2>
44+
<h2>SDK下载</h2>
645
</el-divider>
746
<el-row>
847
<h4>在这里,可以下载到所有您需要的中地数码 WebClient 产品。</h4>
9-
<h2>10.3.4.10</h2>
48+
<h2>10.3.5.10</h2>
1049
<el-row>
1150
<el-tooltip
1251
class="item"
@@ -30,10 +69,7 @@
3069
content="只包含webclient主脚本"
3170
placement="bottom"
3271
>
33-
<el-button
34-
type="info"
35-
plain
36-
><a
72+
<el-button type="info"><a
3773
href="/static/download/webclient-min.rar"
3874
download="webclient-min.rar"
3975
>精简包</a></el-button>
@@ -55,12 +91,72 @@
5591
npm install @mapgis/webclient
5692
</el-tag>
5793
</el-row>
94+
<br />
95+
<el-divider>
96+
<h2>版本信息</h2>
97+
</el-divider>
98+
<el-row>
99+
<el-col
100+
v-for="(v,i) in version"
101+
:key="i"
102+
:xs="24"
103+
:sm="12"
104+
:md="12"
105+
:lg="12"
106+
:xl="12"
107+
>
108+
<el-divider content-position="center">
109+
<el-tag type="info">{{v.name}}</el-tag>
110+
</el-divider>
111+
<iframe
112+
class="version-frame"
113+
frameborder="0"
114+
:src="`/static/libs/cdn/zondyclient/${v.plugin}.html`"
115+
/>
116+
<br />
117+
</el-col>
118+
</el-row>
58119
</div>
59120
</template>
60121

61122
<script>
62123
export default {
63-
124+
data () {
125+
return {
126+
version: [
127+
{
128+
name: 'Cesium运行时版本',
129+
plugin: 'webclient-cesium-plugins.min'
130+
},
131+
{
132+
name: 'Cesium调试时版本',
133+
plugin: 'webclient-cesium-plugins'
134+
},
135+
{
136+
name: 'MapboxGL运行时版本',
137+
plugin: 'webclient-mapboxgl-plugin.min'
138+
},
139+
{
140+
name: 'MapboxGL调试时版本',
141+
plugin: 'webclient-mapboxgl-plugin'
142+
}, {
143+
name: 'Leaflet运行时版本',
144+
plugin: 'webclient-leaflet-plugin.min'
145+
},
146+
{
147+
name: 'Leaflet调试时版本',
148+
plugin: 'webclient-leaflet-plugin'
149+
}, {
150+
name: 'Openlayers运行时版本',
151+
plugin: 'webclient-openlayers-plugin.min'
152+
},
153+
{
154+
name: 'Openlayers调试时版本',
155+
plugin: 'webclient-openlayers-plugin'
156+
},
157+
]
158+
}
159+
}
64160
}
65161
</script>
66162
<style lang="scss">
@@ -73,5 +169,9 @@ export default {
73169
.download-tag {
74170
width: 100%;
75171
}
172+
.version-frame {
173+
width: 100%;
174+
height: 180px;
175+
}
76176
}
77177
</style>
-8.95 KB
Loading
8.95 KB
Loading

0 commit comments

Comments
 (0)