|
@@ -42,6 +42,7 @@ export default {
|
|
|
created() {
|
|
|
this.searchinfo();
|
|
|
this.search();
|
|
|
+ this.searchplace();
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|
|
@@ -63,6 +64,16 @@ export default {
|
|
|
this.$set(this, `options`, res.data);
|
|
|
},
|
|
|
|
|
|
+ async searchplace() {
|
|
|
+ if (this.id) {
|
|
|
+ let level = 2;
|
|
|
+ let ress = await this.livefetch(this.id);
|
|
|
+ let parent = ress.data.place;
|
|
|
+ let res = await this.palcequery({ level, parent });
|
|
|
+ this.$set(this, `options`, res.data);
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
async searchinfo() {
|
|
|
let level = 1;
|
|
|
let res = await this.palcequery({ level });
|
|
@@ -72,8 +83,10 @@ export default {
|
|
|
},
|
|
|
|
|
|
async search() {
|
|
|
- let res = await this.livefetch(this.id);
|
|
|
- this.$set(this, `form`, res.data);
|
|
|
+ if (this.id) {
|
|
|
+ let res = await this.livefetch(this.id);
|
|
|
+ this.$set(this, `form`, res.data);
|
|
|
+ }
|
|
|
},
|
|
|
async onSubmit({ data }) {
|
|
|
console.log(data);
|