|
@@ -50,7 +50,7 @@
|
|
|
import dataForm from '@common/src/components/frame/form.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: dock } = createNamespacedHelpers('dock');
|
|
|
-const { mapActions: code } = createNamespacedHelpers('code');
|
|
|
+const { mapActions: place } = createNamespacedHelpers('place');
|
|
|
|
|
|
export default {
|
|
|
metaInfo() {
|
|
@@ -88,10 +88,7 @@ export default {
|
|
|
},
|
|
|
// 省市
|
|
|
provinceList: [],
|
|
|
- placeList: [
|
|
|
- { name: '长春市', code: '210000' },
|
|
|
- { name: '吉林市', code: '210001' },
|
|
|
- ],
|
|
|
+ placeList: [],
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
@@ -99,7 +96,7 @@ export default {
|
|
|
await this.search();
|
|
|
},
|
|
|
methods: {
|
|
|
- ...code({ codeQuery: 'query' }),
|
|
|
+ ...place({ placeQuery: 'query' }),
|
|
|
...dock(['query', 'fetch', 'create', 'update']),
|
|
|
async search() {
|
|
|
if (this.id) {
|
|
@@ -140,12 +137,18 @@ export default {
|
|
|
this.$router.push({ path: '/live' });
|
|
|
},
|
|
|
// 选择省,查询市
|
|
|
- changeshenge() {},
|
|
|
+ async changeshenge(code) {
|
|
|
+ let res = await this.placeQuery({ code: code });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `placeList`, res.data);
|
|
|
+ }
|
|
|
+ },
|
|
|
// 查询省市
|
|
|
async searhOther() {
|
|
|
- let res = await this.palcequery({ level: 1 });
|
|
|
- console.log(res);
|
|
|
- // this.$set(this, `option`, res.data);
|
|
|
+ let res = await this.placeQuery();
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `provinceList`, res.data);
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
computed: {
|