|
@@ -4,8 +4,8 @@
|
|
|
<Anchor @goAnchor="goAnchor" />
|
|
|
</div>
|
|
|
<div class="right">
|
|
|
- <Basic name="基本信息" />
|
|
|
- <Geo />
|
|
|
+ <Basic name="基本信息" :info="info.basic" />
|
|
|
+ <Geo :propInfo="info.geo" />
|
|
|
<Project />
|
|
|
<Business />
|
|
|
<div class="bottom">
|
|
@@ -20,7 +20,8 @@ import Basic from "./components/basic.vue";
|
|
|
import Geo from "./components/geo.vue";
|
|
|
import Project from "./components/project.vue";
|
|
|
import Business from "./components/business.vue";
|
|
|
-import FloorController from "@/controller/old-adm/floorController";
|
|
|
+import { mapState } from "vuex";
|
|
|
+import ScanController from "@/controller/old-adm/ScanController";
|
|
|
export default {
|
|
|
components: {
|
|
|
Anchor,
|
|
@@ -29,8 +30,48 @@ export default {
|
|
|
Project,
|
|
|
Business,
|
|
|
},
|
|
|
- mounted() {},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ info: {
|
|
|
+ basic: {
|
|
|
+ id: "",
|
|
|
+ localName: "",
|
|
|
+ },
|
|
|
+ geo: {
|
|
|
+ district: "", // 省市区县
|
|
|
+ address: "", // 详细地址
|
|
|
+ lng: "", // 经度
|
|
|
+ lat: "", // 纬度
|
|
|
+ level: null, // 抗震设防烈度
|
|
|
+ },
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(["selectProject"]),
|
|
|
+ ...mapState("layout", ["projectId"]),
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ console.log(this.selectProject, this.projectId);
|
|
|
+ this.getInfo();
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ getInfo() {
|
|
|
+ ScanController.getAllProject({
|
|
|
+ filters: `projectId=${this.projectId}`,
|
|
|
+ }).then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ if (res.content.length) {
|
|
|
+ let info = res.content[0];
|
|
|
+ const { id, localName, infos } = info;
|
|
|
+ this.info.basic.id = id;
|
|
|
+ this.info.basic.localName = localName;
|
|
|
+
|
|
|
+ this.info.geo.lng = infos.longitude;
|
|
|
+ this.info.geo.lat = infos.latitude;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
goAnchor(anchor) {
|
|
|
let name = anchor + "-container";
|
|
|
let dom = document.querySelector(`.${name}`);
|
|
@@ -40,6 +81,11 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ projectId() {
|
|
|
+ this.getInfo();
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|