Skip to content

Commit 10abdc4

Browse files
committed
DEMO-3:update
1 parent e298238 commit 10abdc4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1238
-506
lines changed

.DS_Store

0 Bytes
Binary file not shown.

Demo-3/.DS_Store

6 KB
Binary file not shown.

Demo-3/example/.browserslistrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 1%
2+
last 2 versions
3+
not dead

Demo-3/example/.eslintrc.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true
5+
},
6+
'extends': [
7+
'plugin:vue/essential',
8+
'eslint:recommended'
9+
],
10+
parserOptions: {
11+
parser: 'babel-eslint'
12+
},
13+
rules: {
14+
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
15+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
16+
}
17+
}

Demo-3/example/.gitignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
server.url.config.js
5+
template.js
6+
7+
# local env files
8+
.env.local
9+
.env.*.local
10+
11+
# Log files
12+
npm-debug.log*
13+
yarn-debug.log*
14+
yarn-error.log*
15+
16+
# Editor directories and files
17+
.idea
18+
.vscode
19+
*.suo
20+
*.ntvs*
21+
*.njsproj
22+
*.sln
23+
*.sw?

Demo-3/example/babel.config.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Description:
3+
* Author: LuckRain7
4+
* Date: 2020-05-06 11:10:22
5+
*/
6+
module.exports = {
7+
presets: ["@vue/cli-plugin-babel/preset"],
8+
// plugins: [
9+
// [
10+
// "import",
11+
// { libraryName: "ant-design-vue", libraryDirectory: "es", style: true },
12+
// ],
13+
// ],
14+
};

Demo-3/example/package.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "example",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "vue-cli-service serve",
7+
"build": "vue-cli-service build",
8+
"lint": "vue-cli-service lint"
9+
},
10+
"dependencies": {
11+
"ant-design-vue": "^1.5.4",
12+
"core-js": "^3.6.4",
13+
"esri-loader": "^2.14.0",
14+
"vue": "^2.6.11"
15+
},
16+
"devDependencies": {
17+
"@vue/cli-plugin-babel": "~4.3.0",
18+
"@vue/cli-plugin-eslint": "~4.3.0",
19+
"@vue/cli-service": "~4.3.0",
20+
"babel-eslint": "^10.1.0",
21+
"babel-plugin-import": "^1.13.0",
22+
"eslint": "^6.7.2",
23+
"eslint-plugin-vue": "^6.2.2",
24+
"less": "^3.0.4",
25+
"less-loader": "^5.0.0",
26+
"vue-template-compiler": "^2.6.11"
27+
}
28+
}

Demo-3/example/public/favicon.ico

4.19 KB
Binary file not shown.

Demo-3/example/public/index.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8+
<title><%= htmlWebpackPlugin.options.title %></title>
9+
</head>
10+
<body>
11+
<noscript>
12+
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13+
</noscript>
14+
<div id="app"></div>
15+
<!-- built files will be auto injected -->
16+
</body>
17+
</html>
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
1-
<!--
2-
* @Description:
3-
* @Author: LuckRain7
4-
* @Date: 2020-05-06 11:10:22
5-
-->
61
<template>
72
<div id="app">
8-
<!-- 头部组件 -->
9-
<my-header />
10-
11-
<!-- 地图主题组件 -->
12-
<div class="main">
13-
<div id="map"></div>
14-
</div>
15-
3+
<!-- 头部 -->
4+
<Header />
165
<!-- 工具条组件 -->
176
<tool-bar
187
@measurement="measurement"
198
@baseMapChange="baseMapChange"
209
@draw="draw"
2110
@showLegend="showLegend"
2211
@showLayerList="showLayerList"
23-
></tool-bar>
24-
12+
>
13+
</tool-bar>
2514
<!-- 测量组件 -->
26-
<measurement
27-
:show="isShowMeasurement"
28-
@closMmeasurement="measurement"
29-
></measurement>
30-
31-
15+
<Measurement :show="isShowMeasurement" @closMmeasurement="measurement">
16+
</Measurement>
17+
<!-- 地图部分 -->
18+
<div class="main">
19+
<div id="map"></div>
20+
</div>
3221
</div>
3322
</template>
3423

3524
<script>
36-
import MyHeader from "./components/Header.vue";
37-
import ToolBar from "./components/ToolBar.vue";
38-
import Measurement from "./components/Measurement.vue";
25+
import Header from "@/components/Header.vue"; // 引入头部组件
26+
import ToolBar from "@/components/ToolBar.vue"; // 工具条组件
27+
import Measurement from "@/components/Measurement.vue"; // 测量组件
28+
import ArcGIS from "@/map/index.js";
29+
const Map = new ArcGIS();
3930
40-
// 引入 ArcGIS 模块,并进行实例化
41-
import ArcGIS from "./map/index.js";
42-
let Map = new ArcGIS();
4331
export default {
4432
name: "App",
4533
34+
components: {
35+
Header,
36+
ToolBar,
37+
Measurement,
38+
},
39+
data() {
40+
return {
41+
isShowMeasurement: false,
42+
};
43+
},
44+
4645
mounted() {
47-
Map.init("map"); // 初始化地图模块
46+
Map.init("map");
4847
},
48+
4949
methods: {
5050
// 测量
5151
measurement(type) {
@@ -58,7 +58,7 @@ export default {
5858
this.isShowMeasurement = true;
5959
}
6060
},
61-
/* 地图切换 */
61+
// 地图切换
6262
baseMapChange(type) {
6363
Map.baseMapChange(type);
6464
},
@@ -68,23 +68,13 @@ export default {
6868
},
6969
// 显示图例
7070
showLegend() {
71-
console.log("开启图例");
71+
console.log("显示图例");
7272
},
7373
// 显示图层
7474
showLayerList() {
75-
console.log("开启图层");
75+
console.log("显示图层");
7676
},
7777
},
78-
data() {
79-
return {
80-
isShowMeasurement: false, // 测量窗口
81-
};
82-
},
83-
components: {
84-
MyHeader,
85-
ToolBar,
86-
Measurement,
87-
},
8878
};
8979
</script>
9080

@@ -108,4 +98,4 @@ body {
10898
height: 100%;
10999
}
110100
}
111-
</style>
101+
</style>

Demo-3/example/src/assets/data.js

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/*
2+
* Description:
3+
* Author: LuckRain7
4+
* Date: 2020-05-18 23:04:19
5+
*/
6+
7+
export const treeData = [
8+
{
9+
title: "惠农信息图层",
10+
key: "huinong",
11+
checkable: false,
12+
children: [
13+
{
14+
title: "合作社",
15+
key: "hezuoshe",
16+
checkable: false,
17+
selectable: false,
18+
children: [
19+
{ title: "示范合作社", key: "shifan" },
20+
{ title: "农机合作社", key: "nongji" },
21+
{ title: "农民合作社", key: "nongmin" },
22+
],
23+
},
24+
{
25+
title: "土壤",
26+
selectable: false,
27+
key: "turangleixing",
28+
checkable: false,
29+
children: [{ title: "土壤类型", key: "turangleixing" }],
30+
},
31+
32+
{
33+
title: "水利设施",
34+
key: "shuilisheshi",
35+
checkable: false,
36+
children: [
37+
{ title: "大中型水库", key: "max" },
38+
{ title: "小型水库", key: "min" },
39+
],
40+
},
41+
{
42+
title: "雨量分析",
43+
key: "雨量",
44+
},
45+
],
46+
},
47+
{
48+
title: "社区信息图层",
49+
key: "社区",
50+
checkable: false,
51+
selectable: false,
52+
children: [{ title: "xx", key: "xx" }],
53+
},
54+
{
55+
title: "人才信息图层",
56+
key: "rencai",
57+
checkable: false,
58+
children: [{ title: "xx", key: "xx" }],
59+
},
60+
{
61+
title: "产业园区信息图层",
62+
key: "yuanqu",
63+
checkable: false,
64+
children: [{ title: "xx", key: "xx" }],
65+
},
66+
{
67+
title: "边界图层",
68+
key: "bianjie",
69+
checkable: false,
70+
children: [
71+
{ title: "诸城边界", key: "bianjie-zhucheng" },
72+
{ title: "社区边界", key: "bianjie-shequ" },
73+
{ title: "乡镇边界", key: "bianjie-xiangzhen" },
74+
],
75+
},
76+
];
77+
78+
export const treeData2 = 1;
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!--
2+
* @Description:
3+
* @Author: LuckRain7
4+
* @Date: 2020-06-08 09:01:59
5+
-->
6+
<template>
7+
<div class="content-buffer">
8+
<div class="title">
9+
缓冲区查询内容
10+
</div>
11+
<div class="main-content"></div>
12+
</div>
13+
</template>
14+
15+
<script>
16+
export default {
17+
props: {
18+
data: {
19+
type: Array,
20+
default: function() {
21+
return [];
22+
},
23+
},
24+
},
25+
};
26+
</script>
27+
28+
<style></style>

0 commit comments

Comments
 (0)