diff --git a/src/api/tiankongdi/index.ts b/src/api/tiankongdi/index.ts index 12edc228..1577c58a 100644 --- a/src/api/tiankongdi/index.ts +++ b/src/api/tiankongdi/index.ts @@ -35,6 +35,8 @@ enum Api { AddtaskFavorite = '/api/DroneCaseInfoSingle/AddtaskFavorite', // 审核列表删除收藏 DeleteTaskCase = '/api/DroneCaseInfoSingle/DeleteTaskCase', + // 获取当前账号可以看见的乡镇 + loadStreet = '/api/DroneCaseInfoSingle/loadStreet' } /** @@ -43,6 +45,9 @@ enum Api { export function getLoadTaskCount(params?: taskCountParams) { return defHttp.get({ url: Api.LoadTaskCount, params }); } +export function getLoadStreet() { + return defHttp.get({ url: Api.loadStreet }); +} /** * @description: getCaseFlowLog diff --git a/src/views/demo/tiankongdi/curbspotcity/MapList/index.vue b/src/views/demo/tiankongdi/curbspotcity/MapList/index.vue index 00f9c49a..232fa088 100644 --- a/src/views/demo/tiankongdi/curbspotcity/MapList/index.vue +++ b/src/views/demo/tiankongdi/curbspotcity/MapList/index.vue @@ -66,12 +66,13 @@ allowClear style="flex: 1;" v-model:value="props.infoScreenData.streetId" - :options="props.streetsAreaOptions" + :options="streetsAreaOptions" @change="(value) => emits('mapListScreenChange',value,'streetId')" />
- { return true }) const showInfoData = ref() +const streetsAreaOptions = ref([ + { label: '全部', value: '' }, +]) + onMounted(() => { + getLoadStreet().then(res => { + console.log(res) + res.forEach(item => { + streetsAreaOptions.value.push({ + label: item.Name, + value: item.Id, + }) + }) + }) console.log('onMounted') })