吉安感知网项目-前端
张含笑
2026-01-13 4c3428168c42e4e126e0d576b0e15f01ade2ad9c
uniapps/work-wx/src/subPackages/deviceRegistration/add.vue
@@ -260,12 +260,18 @@
      @confirm="onPurchaseDate"
      @cancel="showPurchaseDate = false"
    />
    <!-- 所属区域 -->
     <u-cascader
        show="show"
        v-model="value"
        :data="areaData"
    ></u-cascader>
    </u-form>
</view>
</template>
<script setup>
import { aircraftInfoSaveApi,uploadFileApi } from '@/api/index'
import { ref, computed } from 'vue'
import { aircraftInfoSaveApi,uploadFileApi,areaDataApi } from '@/api/index'
import { ref, computed, onMounted } from 'vue'
import dayjs from 'dayjs'
const formRef = ref(null);
@@ -445,6 +451,16 @@
        });
    });
}
// 获取所属单位
const isShowRegion = ref(false)
const areaData = ref([])
function getAreaData() {
    areaDataApi().then(res => {
        if (res.data.code === 200) {
            areaData.value = res.data.data
        }
    })
}
// 提交图片
function afterReadImage(event) {
    // 获取上传的文件对象
@@ -526,6 +542,9 @@
        // 这里可以添加额外的失败处理逻辑
    }
}
onMounted(() => {
    getAreaData()
})
</script>
<style scoped lang="scss">
.deviceRegistration {