|
@@ -114,7 +114,7 @@
|
|
|
autocomplete="off"
|
|
|
spellcheck="false"
|
|
|
autocorrect="off"
|
|
|
- placeholder="您可以试着这样问我,如“帮我在萧山区推荐一宗30-100亩左右的工业用地”"
|
|
|
+ placeholder="您可以试着这样问我,如“帮我在萧山区推荐3宗50-80亩之间的工业用地”"
|
|
|
autofocus=""
|
|
|
>
|
|
|
</textarea>
|
|
@@ -174,13 +174,11 @@
|
|
|
<div class="number">{{ i + 1 }}</div>
|
|
|
<div class="content">
|
|
|
<h3>
|
|
|
- {{ citem.ydxz }}({{
|
|
|
- citem.ydmj ? citem.ydmj.toFixed(2) : "-"
|
|
|
- }}公顷)
|
|
|
+ {{ citem.ydxz }}
|
|
|
</h3>
|
|
|
<p>
|
|
|
<span class="content-item"
|
|
|
- >用地性质:{{ citem.ydxz ? citem.ydxz : "-" }}</span
|
|
|
+ >单元名称:{{ citem.dymc ? citem.dymc : "-" }}</span
|
|
|
>
|
|
|
<span class="content-item"
|
|
|
>行政区:{{ citem.xzqmc ? citem.xzqmc : "-" }}</span
|
|
@@ -318,6 +316,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ geoLayer: null,
|
|
|
nearMarkerList: [],
|
|
|
radarScanStyle: {
|
|
|
width: "100%",
|
|
@@ -334,7 +333,7 @@ export default {
|
|
|
name: "请帮我在杭州市萧山机场附近推荐几块总价不超过2000万的工业用地",
|
|
|
},
|
|
|
{
|
|
|
- name: "帮我在萧山区推荐一宗30-100亩左右的工业用地",
|
|
|
+ name: "帮我在萧山区推荐3宗50-80亩之间的工业用地",
|
|
|
},
|
|
|
{
|
|
|
name: "请帮我杭州市找几块在开发区内,园区主导产业为新能源的工业用地",
|
|
@@ -541,7 +540,7 @@ export default {
|
|
|
// geom: "POLYGON((120.502129268 30.168593076,120.501546244 30.167333288,120.501537309 30.167317156,120.501526002 30.167302191,120.500703524 30.167926949,120.499290933 30.168947797,120.499089718 30.169139869,120.499102336 30.169156599,120.499478655 30.169583076,120.499495744 30.169599471,120.499515679 30.169613228,120.499537927 30.169623978,120.499561893 30.169631437,120.499586937 30.169635401,120.499612391 30.169635768,120.499637573 30.169632527,120.49966181 30.169625764,120.500722401 30.169244194,120.502044364 30.168768574,120.502068293 30.168757769,120.502089718 30.168743538,120.502107997 30.168726308,120.50212258 30.168706597,120.50213303 30.168684996,120.502139035 30.168662151,120.502140414 30.16863875,120.502137126 30.168615492,120.502129268 30.168593076))",
|
|
|
// },
|
|
|
// ];
|
|
|
-
|
|
|
+ // this.addGdLayer(this.xgdk);
|
|
|
// this.detailData = {
|
|
|
// id: 48668,
|
|
|
// dkid: "1895353609416212480",
|
|
@@ -566,6 +565,29 @@ export default {
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ addGdLayer(dklist) {
|
|
|
+ if (this.geoLayer) {
|
|
|
+ this.map.removeLayer(this.geoLayer);
|
|
|
+ this.geoLayer = null;
|
|
|
+ }
|
|
|
+ let that = this;
|
|
|
+ if (dklist && dklist.length) {
|
|
|
+ let idGroup = dklist.map((item) => item.objectid);
|
|
|
+ let sql = "(" + idGroup.join(",") + ")";
|
|
|
+ let queryGeometryUrl = window.ApplicationConfig.queryGeometryListUrl;
|
|
|
+ axios.get(queryGeometryUrl, { params: { items: sql } }).then((data) => {
|
|
|
+ if (data && data.data && data.data.length) {
|
|
|
+ let geojsonList = data.data.map((ele) => JSON.parse(ele.geom));
|
|
|
+ that.geoLayer = L.geoJSON(geojsonList, {
|
|
|
+ style: function (feature) {
|
|
|
+ return { color: "blue" };
|
|
|
+ },
|
|
|
+ });
|
|
|
+ that.geoLayer.addTo(that.map);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
toggleLayerControl() {
|
|
|
this.showLayerControl = !this.showLayerControl;
|
|
|
if (!this.showLegend) {
|
|
@@ -649,38 +671,49 @@ export default {
|
|
|
this.$Message.info("请输入");
|
|
|
return;
|
|
|
}
|
|
|
- this.inputText = this.input;
|
|
|
- this.zwinputText = "";
|
|
|
- this.questionModal = false;
|
|
|
- this.histories = new ArrayQueue(5);
|
|
|
- // this.hzData = [];
|
|
|
- // var item = { name: this.inputText, loading: true };
|
|
|
- // this.hzData.push(item);
|
|
|
- this.toggleTab(0);
|
|
|
+ // this.inputText = this.input;
|
|
|
+ // this.zwinputText = "";
|
|
|
+ // this.questionModal = false;
|
|
|
+ // this.histories = new ArrayQueue(5);
|
|
|
+ // // this.hzData = [];
|
|
|
+ // // var item = { name: this.inputText, loading: true };
|
|
|
+ // // this.hzData.push(item);
|
|
|
+ // this.toggleTab(0);
|
|
|
+ this.hotQuestionReset();
|
|
|
},
|
|
|
hotQuestionReset() {
|
|
|
if (this.inputText == "" || this.inputText == null) {
|
|
|
// this.$Message.info("请输入");
|
|
|
// return;
|
|
|
- this.inputText = "帮我在萧山区推荐一宗30-100亩左右的工业用地";
|
|
|
+ this.inputText = "帮我在萧山区推荐3宗50-80亩之间的工业用地";
|
|
|
}
|
|
|
-
|
|
|
+ this.hideDetail();
|
|
|
this.zwinputText = "";
|
|
|
this.questionModal = false;
|
|
|
this.histories = new ArrayQueue(5);
|
|
|
+ if (this.geoLayer) {
|
|
|
+ this.map.removeLayer(this.geoLayer);
|
|
|
+ this.geoLayer = null;
|
|
|
+ }
|
|
|
+ if (this.geojsonLayer) {
|
|
|
+ this.map.removeLayer(this.geojsonLayer);
|
|
|
+ this.geojsonLayer = null;
|
|
|
+ }
|
|
|
this.toggleInfoTab();
|
|
|
this.toggleTab(0);
|
|
|
},
|
|
|
zwsend() {
|
|
|
if (!this.zwinputText) {
|
|
|
- this.zwinputText = "帮我在萧山区推荐一宗30-100亩左右的工业用地";
|
|
|
+ this.zwinputText = "帮我在萧山区推荐3宗50-80亩之间的工业用地";
|
|
|
}
|
|
|
- var item = { name: this.zwinputText, loading: true };
|
|
|
- // this.hzData = [item]
|
|
|
- this.hzData.push(item);
|
|
|
- this.activeIndex = 0;
|
|
|
- this.toggleInfoTab();
|
|
|
- this.send();
|
|
|
+ // var item = { name: this.zwinputText, loading: true };
|
|
|
+ // // this.hzData = [item]
|
|
|
+ // this.hzData.push(item);
|
|
|
+ // this.activeIndex = 0;
|
|
|
+ // this.toggleInfoTab();
|
|
|
+ // this.send();
|
|
|
+ this.inputText = this.zwinputText;
|
|
|
+ this.hotQuestionReset();
|
|
|
},
|
|
|
//ai超时超过3.5分钟 或者报错处理,结束请求提示未查询到信息
|
|
|
checkTimeOut() {
|
|
@@ -926,41 +959,12 @@ export default {
|
|
|
},
|
|
|
//显示地块详情,先获取地块图斑,定位、路线、和地类分析需要叠加获取相交地块
|
|
|
showDetailModal(item, index) {
|
|
|
- // if (
|
|
|
- // (this.activeItem && this.activeItem.id != item.id) ||
|
|
|
- // this.activeItem == null
|
|
|
- // ) {
|
|
|
- // if (this.dkIndex != index) {
|
|
|
- // if (this.geojsonLayer) {
|
|
|
- // this.map.removeLayer(this.geojsonLayer);
|
|
|
- // this.geojsonLayer = null;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // this.clearMark();
|
|
|
- // this.showDetail = true;
|
|
|
- // this.activeItem = item;
|
|
|
- // this.dkIndex = index;
|
|
|
- // //高亮marker
|
|
|
- // this.hightMarker(index);
|
|
|
- // } else {
|
|
|
- // if (this.geojsonLayer) {
|
|
|
- // this.map.removeLayer(this.geojsonLayer);
|
|
|
- // this.geojsonLayer = null;
|
|
|
- // }
|
|
|
- // this.showDetail = false;
|
|
|
- // this.clearMark();
|
|
|
- // this.activeItem = null;
|
|
|
- // }
|
|
|
this.clearMark();
|
|
|
this.activeItem = item;
|
|
|
//高亮marker
|
|
|
this.hightMarker(index);
|
|
|
this.showDetail = true;
|
|
|
this.dkIndex = index;
|
|
|
- if (this.geojsonLayer) {
|
|
|
- this.map.removeLayer(this.geojsonLayer);
|
|
|
- this.geojsonLayer = null;
|
|
|
- }
|
|
|
this.goLocation(item, index);
|
|
|
},
|
|
|
//地块收藏点击查看详情
|
|
@@ -975,14 +979,14 @@ export default {
|
|
|
//隐藏详情
|
|
|
hideDetail() {
|
|
|
this.showDetail = false;
|
|
|
- if (this.geojsonLayer) {
|
|
|
- this.map.removeLayer(this.geojsonLayer);
|
|
|
- this.geojsonLayer = null;
|
|
|
- }
|
|
|
- if (this.identifyGeojsonLayer) {
|
|
|
- this.map.removeLayer(this.identifyGeojsonLayer);
|
|
|
- }
|
|
|
- this.clearMark();
|
|
|
+ // if (this.geojsonLayer) {
|
|
|
+ // this.map.removeLayer(this.geojsonLayer);
|
|
|
+ // this.geojsonLayer = null;
|
|
|
+ // }
|
|
|
+ // if (this.identifyGeojsonLayer) {
|
|
|
+ // this.map.removeLayer(this.identifyGeojsonLayer);
|
|
|
+ // }
|
|
|
+ // this.clearMark();
|
|
|
},
|
|
|
//收藏
|
|
|
doCollect(collect) {
|
|
@@ -1048,47 +1052,25 @@ export default {
|
|
|
if (this.identifyGeojsonLayer) {
|
|
|
this.map.removeLayer(this.identifyGeojsonLayer);
|
|
|
}
|
|
|
- this.detailData = item;
|
|
|
- let geojson = wkt.parse(item.geom);
|
|
|
- var geos = L.geoJSON(geojson, {
|
|
|
- style: function (feature) {
|
|
|
- return { color: "red", fillOpacity: 0 };
|
|
|
- },
|
|
|
- });
|
|
|
|
|
|
- // this.dkGeo = geos;
|
|
|
- // this.dkGeoJson = geojson;
|
|
|
- this.geojsonLayer = geos.addTo(this.map);
|
|
|
- this.map.fitBounds(geos.getBounds());
|
|
|
- // console.log("item:" + item);
|
|
|
- // let query =
|
|
|
- // window.ApplicationConfig.geoserverUrl +
|
|
|
- // "?service=WFS&version=1.0.0&request=GetFeature&typeName=" +
|
|
|
- // window.ApplicationConfig.gdLayerName +
|
|
|
- // "&maxFeatures=50&outputFormat=application%2Fjson&cql_filter=id=" +
|
|
|
- // item.id;
|
|
|
- // axios.get(query).then((data) => {
|
|
|
- // console.log(data);
|
|
|
- // if (data.data.features.length < 1) {
|
|
|
- // this.$Message.info("未查询到数据");
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // this.detailData = data.data.features[0].properties;
|
|
|
- // this.detailData.center_wkt = item.center_wkt;
|
|
|
- // var geojson = data.data.features[0].geometry;
|
|
|
- // this.detailData.wkt = wkt.stringify(geojson);
|
|
|
- // console.log("this.detailData");
|
|
|
- // console.log(this.detailData);
|
|
|
- // var geos = L.geoJSON(geojson, {
|
|
|
- // style: function (feature) {
|
|
|
- // return { color: "red", fillOpacity: 0 };
|
|
|
- // },
|
|
|
- // });
|
|
|
-
|
|
|
- // this.dkGeo = geos;
|
|
|
- // this.dkGeoJson = geojson;
|
|
|
- // this.geojsonLayer = geos.addTo(this.map);
|
|
|
- // this.map.fitBounds(geos.getBounds());
|
|
|
+ let queryGeometryUrl = window.ApplicationConfig.queryGeometryUrl;
|
|
|
+ let that =this;
|
|
|
+ axios
|
|
|
+ .get(queryGeometryUrl, { params: { id: item.objectid } })
|
|
|
+ .then((data) => {
|
|
|
+ if (data && data.data && data.data.length) {
|
|
|
+ that.detailData = data.data[0];
|
|
|
+ let geojson = wkt.parse(data.data[0].geom);
|
|
|
+ var geos = L.geoJSON(geojson, {
|
|
|
+ style: function (feature) {
|
|
|
+ return { color: "red", fillOpacity: 0 };
|
|
|
+ },
|
|
|
+ });
|
|
|
+ that.geojsonLayer = geos.addTo(that.map);
|
|
|
+ that.map.fitBounds(geos.getBounds(), { maxZoom: 17 });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
// });
|
|
|
},
|
|
|
//获取地块信息
|
|
@@ -1126,6 +1108,7 @@ export default {
|
|
|
this.map.removeLayer(this.markerLayer);
|
|
|
this.markerLayer = null;
|
|
|
}
|
|
|
+
|
|
|
if (this.polyline) {
|
|
|
this.map.removeLayer(this.polyline);
|
|
|
this.polylines = null;
|
|
@@ -1428,7 +1411,7 @@ export default {
|
|
|
question = this.zwinputText.trim();
|
|
|
}
|
|
|
let mock = false;
|
|
|
- if (question === "帮我在萧山区推荐一宗31亩左右的工业用地") {
|
|
|
+ if (question === "帮我在萧山区推荐三宗31亩左右的工业用地") {
|
|
|
mock = true;
|
|
|
}
|
|
|
|
|
@@ -1542,7 +1525,7 @@ export default {
|
|
|
if (e.data != "[FINISH]" && e.data != "[DONE]") {
|
|
|
const responseData = JSON.parse(e.data);
|
|
|
const responses = responseData["agent_responses"];
|
|
|
- console.log("responses: ", responses);
|
|
|
+ // console.log("responses: ", responses);
|
|
|
const lastRes = responses[responses.length - 1];
|
|
|
var lastUpRes = null;
|
|
|
responses.forEach((item, index) => {
|
|
@@ -1552,7 +1535,7 @@ export default {
|
|
|
item.exec_res.indexOf("\n```json\n") > -1
|
|
|
) {
|
|
|
lastUpRes = responses[index];
|
|
|
- console.log("lastUpRes: ", lastUpRes);
|
|
|
+ // console.log("lastUpRes: ", lastUpRes);
|
|
|
}
|
|
|
});
|
|
|
const user_request = responseData.user_request;
|
|
@@ -1577,8 +1560,6 @@ export default {
|
|
|
!executed
|
|
|
) {
|
|
|
T.loading = false;
|
|
|
- // T.summary = lastChoice.content.replaceAll('\n```json\n', '').replaceAll('```json\n', '')
|
|
|
- // .replaceAll('\n```\n', '')
|
|
|
T.hzData.forEach((item, index) => {
|
|
|
if (index == T.hzData.length - 1) {
|
|
|
T.hzData[index].summary = lastChoice.content
|
|
@@ -1609,8 +1590,9 @@ export default {
|
|
|
T.xgdk = dk;
|
|
|
T.clearMark();
|
|
|
T.showXgdkCenterPoint();
|
|
|
+ T.addGdLayer(T.xgdk);
|
|
|
T.answer = e.data;
|
|
|
- T.burialPoint();
|
|
|
+ // T.burialPoint();
|
|
|
} else {
|
|
|
T.xgdk = [];
|
|
|
T.clearMark();
|