a501ecb4 by 刘远

jikai commit

1 parent 2a10e568
// 左侧 资源目录 组件
<template>
<div>
<div class="container">
<div class="containerList">
<el-card>
<div slot="header" class="clearfix">
<span>查询列表</span>
......@@ -35,51 +35,25 @@
</p>
<p>
<i class="whitecls">地块: </i>
<el-select v-model="value" placeholder="请选择">
<el-select v-model="massif" placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
<el-button type="primary" style="margin-left:64px;">建设项目数据</el-button>
</p>
<p>
<i class="whitecls">1. </i>
<i class="whitecls">X : </i>
<el-input v-model="input"></el-input>
<i class="whitecls">Y : </i>
<el-input v-model="input"></el-input>
<i class="el-icon-thumb redcls"></i>
<i class="el-icon-delete redcls"></i>
</p>
<p>
<i class="whitecls">2. </i>
<!-- ThisPolygon -->
<p v-for="(item, i) in ThisPolygon" :key="i">
<i class="whitecls">{{i}}. </i>
<i class="whitecls">X : </i>
<el-input v-model="input"></el-input>
<el-input v-model.number="item[0]"></el-input>
<i class="whitecls">Y : </i>
<el-input v-model="input"></el-input>
<i class="el-icon-thumb redcls"></i>
<i class="el-icon-delete redcls"></i>
</p>
<p>
<i class="whitecls">3. </i>
<i class="whitecls">X : </i>
<el-input v-model="input"></el-input>
<i class="whitecls">Y : </i>
<el-input v-model="input"></el-input>
<i class="el-icon-thumb redcls"></i>
<i class="el-icon-delete redcls"></i>
</p>
<p>
<i class="whitecls">4. </i>
<i class="whitecls">X : </i>
<el-input v-model="input"></el-input>
<i class="whitecls">Y : </i>
<el-input v-model="input"></el-input>
<i class="el-icon-thumb redcls"></i>
<el-input v-model.number="item[1]"></el-input>
<i class="el-icon-thumb redcls" @click="pickupPoint(i)"></i>
<i class="el-icon-delete redcls"></i>
</p>
<p>
<el-button type="primary" style="margin-right:16px;">添加</el-button>
<el-button type="info" style="margin-right:16px;">清空</el-button>
<el-button type="info" style="margin-right:16px;" @click="clear">清空</el-button>
</p>
<p>
<i class="bluecls">西安市坐标范围</i>
......@@ -89,7 +63,7 @@
</p>
<p class="foot">
<el-button type="primary" style="margin-right:16px;">提交</el-button>
<el-button type="primary" style="margin-right:16px;" @click="toStorage">提交</el-button>
<el-button type="info" style="margin-right:16px;">取消</el-button>
</p>
</div>
......@@ -114,7 +88,7 @@
<div class="flex-left">
<p>
<i class="bluecls">总面积: </i>
<el-input v-model="input"></el-input>
<el-input v-model="area"></el-input>
</p>
<p v-for="o in formData" :key="o.id">
<i class="bluecls">{{ o.layername }}: </i>
......@@ -141,6 +115,7 @@
<script>
import responseData from '../assets/js/map/responseData';
import graphicAnalyze from '../assets/js/json/graphicAnalyze';
import mapManage from '../assets/js/map/towMapObjects';
export default {
name: 'leftAssert',
components: {
......@@ -155,8 +130,10 @@
value: '1',
label: '地块二'
}],
input: '',
formData: []
area: '',
massif: '',
formData: [],
ThisPolygon: [['', ''], ['', ''], ['', ''], ['', '']]
}
},
filters: {
......@@ -173,10 +150,53 @@
this.$http.get('http://192.168.3.194/XAYZT/analizeTask/getTaskListByUserId?userid='
+ responseData.id + '&pageIndex=' + responseData.pageIndex + '&pageSize='
+ responseData.pageSize).then(response => {
console.log(response.data.data.length);
response.status === 200 && (this.data = responseData.data = response.data.data)
});
this.propertySync();
},
methods: {
propertySync() {
},
pickupPoint(index) {
mapManage.drawTool.activate('point1', vertices => {
this.ThisPolygon[index] = vertices[0];
this.ThisPolygon.splice(this.ThisPolygon.length - 1, 0);
mapManage.drawTool.paths.length > 1 && mapManage.drawTool.createPolyline();
});
},
toStorage() {
let i = 0, o, arr = [];
for( ; o = mapManage.drawTool.paths[i++] ; ) {
o[0] = o[0].toFixed(3);
o[1] = o[1].toFixed(3);
arr.push(o.join(' '));
}
let d = new Date(), param = {
userid: responseData.id,
projectLayerList: [
{
// geom: "MultiPolygon(((13189506.916 4356360.289, 13246906.048 4313310.949,13166677.736 4282328.470,13130477.152 4325703.946)))",
geom: "MultiPolygon(((" + arr.join(', ') + ")))",
layerName: "地块一",
projectCode: null,
layerType: "项目用地"
}
],
taskname: '项目' + d.getFullYear() + (d.getMonth() + 1) + d.getDate() + d.getHours() + d.getMinutes() + d.getSeconds(),
landarea: '',
landtype: '[]',
}
this.$http.post('http://192.168.3.194/XAYZT/analizeTask/saveTaskMultipleLayer', param).then(response => {
console.log(response);
});
},
clear() {
this.ThisPolygon = [['', ''], ['', ''], ['', ''], ['', '']];
mapManage.drawTool.paths = [];
mapManage.drawTool.graphicsLayer.graphics.remove(mapManage.drawTool.graphic);
},
createQue() {
this.$refs.newquery.style.display = 'block';
},
......@@ -409,10 +429,10 @@
float: right;
font-size: 22px;
}
.container {
opacity: 0.6;
.containerList {
opacity: 0.7;
}
.container .el-card {
.containerList .el-card {
background-color: #010101;
color: #fff;
transition: .3s;
......@@ -421,7 +441,7 @@
height:834px;
}
.newquery {
opacity: 0.6;
opacity: 0.7;
top: 0px;
left: 450px;
position: absolute;
......@@ -437,7 +457,7 @@
height:556px;
}
.project {
opacity: 0.6;
opacity: 0.7;
top: 0px;
left: 1000px;
position: absolute;
......