江陽區
@@ -43,9 +43,15 @@ import { sendMsg } from "@/api.js"
import axios from "axios"
import { vehicleListApi } from "@/api.js"
import areaChose from "@/view/components/areaChose.vue"
+import { useBreedStore } from "@/store/breed.js"
+import { breedFarmCount } from "@/api.js";
+import {useRouter} from "vue-router"
+const router = useRouter()
const nowPages = ref('index');
-const flag = ref(true)
+const flag = ref(true);
+
+const appStore = useBreedStore();
// 镇列表
const options = [
@@ -96,13 +102,22 @@ const changeArea = (e) => {
}
const changeTown = (e) => {
- console.log(e)
townOptions.forEach(item => {
if (item.value == e) {
sendFn('choseTown', { name: item.label })
}
})
+}
+const farmList = ref([]);
+const handTown = (a, s)=>{
+ breedFarmCount({
+ areaCode: a,
+ streetCode: s
+ }).then(res=>{
+ farmList.value = res.data.farmList || [];
+ flag.value = true;
+ })
}
const getTownList = () => {