限制地区

This commit is contained in:
shijingjing
2022-10-10 17:07:03 +08:00
parent f740372e71
commit e898b55fa3

View File

@@ -66,12 +66,12 @@
<script> <script>
import AMapLoader from '@amap/amap-jsapi-loader' import AMapLoader from '@amap/amap-jsapi-loader'
import { mapState } from 'vuex'
export default { export default {
name: 'addResource', name: 'addResource',
props: { props: {
instance: Function, instance: Function,
dict: Object, dict: Object,
areaId: String,
permissions: Function, permissions: Function,
}, },
data() { data() {
@@ -114,9 +114,15 @@ export default {
address: [{ required: true, message: '请输入地址', trigger: 'change' }], address: [{ required: true, message: '请输入地址', trigger: 'change' }],
location: [{ required: true, validator: validLocation, trigger: 'change' }], location: [{ required: true, validator: validLocation, trigger: 'change' }],
}, },
areaId: '',
} }
}, },
computed: {
...mapState(['user'])
},
created() { created() {
this.areaId = this.user.info.areaId
this.getCategoryList() this.getCategoryList()
}, },
methods: { methods: {